community icon indicating copy to clipboard operation
community copied to clipboard

REQUEST: Repository maintenance on opentelemtry-go

Open MadVikingGod opened this issue 3 years ago • 6 comments

Affected Repository

https://github.com/open-telemetry/opentelemetry-go

Requested changes

Enable the creation of branches named deprecate/v*

I don't know what steps need to be take but it is currently prevented with an error:

$ git push upstream deprecate/v0.20.0 
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH006: Protected branch update failed for refs/heads/deprecate/v0.20.0.
remote: error: Required status check "EasyCLA" is expected.
To https://github.com/open-telemetry/opentelemetry-go.git
 ! [remote rejected]   deprecate/v0.20.0 -> deprecate/v0.20.0 (protected branch hook declined)
error: failed to push some refs to 'https://github.com/open-telemetry/opentelemetry-go.git

Purpose

We are attempting to deprecate several old versions to help with tooling discovering them.

The problem is reported in a number of issues, but the progress will be tracked here: https://github.com/open-telemetry/opentelemetry-go/issues/2328

Expected Duration

1-2 weeks. We'll comment again on this issue once we are done so the permissions can be reverted.

Repository Maintainers

  • @open-telemetry/go-maintainers

MadVikingGod avatar Sep 16 '22 15:09 MadVikingGod

The branch protection rules are quite annoying in github. The rules are applied in the order they were created, so if you need to override the cncf's **/** rule, you need to:

  1. delete the **/** rule
  2. create a deprecate/** matching rule
  3. recreate the **/** rule

dyladan avatar Sep 16 '22 15:09 dyladan

I would also verify with CNCF that this is allowed to be done. is deprecate/* a common idiom in go?

dyladan avatar Sep 16 '22 15:09 dyladan

No, this is so that we can publish a v0.20.1 tag off the v0.20.0 tag.

MadVikingGod avatar Sep 16 '22 15:09 MadVikingGod

This is more of a one-off project to deprecate a number of experiments or moved modules that are no longer supported, but some tooling is still picking up.

MadVikingGod avatar Sep 16 '22 15:09 MadVikingGod

It sounds like the EasyCLA check is not actually running. I wonder if there's a way to create the branches manually and then use PRs to review the deprecation changes & trigger EasyCLA to run.

jmacd avatar Sep 16 '22 19:09 jmacd

It looks like EasyCLA is automagically added. None of the repositories I spot checked (go, go-contrib, collector, and java) seemed to have an entry for EasyCLA.

MadVikingGod avatar Sep 16 '22 20:09 MadVikingGod

@MadVikingGod give it another try. I changed the settings of the default rule to match collector, and other repos that I checked (java). It should work now.

bogdandrutu avatar Sep 23 '22 14:09 bogdandrutu

I just tried again, and I am not able to create a branch.

We might need a particular rule to create the branches.

MadVikingGod avatar Sep 23 '22 16:09 MadVikingGod

@MadVikingGod can you add the commands you are trying to run?

bogdandrutu avatar Oct 03 '22 16:10 bogdandrutu

I've tried two different approaches: From the command line:

# checkout the tag
git checkout v0.20.0
# Create the branch locally
git checkout -b deprecate/v0.20.0
# Push the branch to create the branch in Github
git push upstream deprecate/v0.20.0 

Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
remote: error: GH006: Protected branch update failed for refs/heads/deprecate/v0.20.0.
remote: error: Required status check "EasyCLA" is expected.
To https://github.com/open-telemetry/opentelemetry-go.git
 ! [remote rejected]   deprecate/v0.20.0 -> deprecate/v0.20.0 (protected branch hook declined)
error: failed to push some refs to 'https://github.com/open-telemetry/opentelemetry-go.git'

I also have tried to create the same branch from the github UI, even if I have to make it from main, we can move the HEAD after the fact, I think. This also fails with a similar error.

MadVikingGod avatar Oct 03 '22 16:10 MadVikingGod

Not sure why in the collector repo the collector approvers who have write permissions can create branches.

Found 2 differences which I removed from the **/** rule and not from main:

  • Disabled this rule Restrict who can push to matching branches
  • Disabled this rule Require branches to be up to date before merging

Last try, sorry for taking so long, but want to make sure this works permanently for you and not only when you request.

bogdandrutu avatar Oct 06 '22 18:10 bogdandrutu

I just tried this morning, and I am getting the same error.

MadVikingGod avatar Oct 07 '22 15:10 MadVikingGod

Apparently saving is hard (I don't remember, but when I checked the changes were not saved, so now they are), sorry for causing more work to you.

bogdandrutu avatar Oct 11 '22 17:10 bogdandrutu

@MadVikingGod can this be closed now? thx!

trask avatar Dec 16 '22 19:12 trask

This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

github-actions[bot] avatar Jan 19 '23 17:01 github-actions[bot]

I haven't had cycles to dedicated to this task until recently. I just checked and it is currently working thank you.

MadVikingGod avatar Feb 23 '23 16:02 MadVikingGod