Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename primary branch to main #2761

Closed
mhdawson opened this issue Sep 13, 2021 · 5 comments
Closed

Rename primary branch to main #2761

mhdawson opened this issue Sep 13, 2021 · 5 comments

Comments

@mhdawson
Copy link
Member

We are going through all of the node.js repositories to rename the primary branch to main. Please see nodejs/node#33864 for more context.

There might be a number of places we need to change jobs that use the build repo (although maybe if we use the default branch it might just be ok).

I think to start we should try to capture in this issue what might breach if we rename the default branch and then go from there.

@mhdawson
Copy link
Member Author

mhdawson commented Sep 13, 2021

The clone in the regular ci jobs I think will be ok (for example - https://ci.nodejs.org/job/node-test-commit-linuxone/configure). It is as follows:

git clone https://github.com/nodejs/build.git

which should still be ok if the default is renamed.

@mhdawson
Copy link
Member Author

@richardlau, myself and @sxa looked at this today. The main dependency is on build jobs which pull files from the build repo. Those we believe will all be handled by the github redirects.

We will update those over time but because of the redirects is lower risk to just leave in place and do incrementally.

@nodejs/build FYI you will need to need to retarget their pushes to main going forward. These are the notes GitHub provided when we renamed:

git branch -m master <BRANCH>
git fetch origin
git branch -u origin/<BRANCH> <BRANCH>
git remote set-head origin -a

We added a branch protection rule that should prevent future pushes to master.

@richardlau
Copy link
Member

Had to update some references in the Windows CI jobs where master was being assigned to a SCRIPTS_BRANCH environment variable and used in the build scripts..

Refs: https://github.com/nodejs/jenkins-config-test/commit/49c292378c3daa7cefea7c2f12b0e08658ce6c6c

git fetch --prune --no-tags https://github.com/%SCRIPTS_REPO%.git +refs/heads/%SCRIPTS_BRANCH%:refs/remotes/jenkins_tmp

@richardlau
Copy link
Member

Haven't seen or been made aware of any other issues apart from the broken (now fixed) Windows CI so believe this is done.

@richardlau
Copy link
Member

richardlau commented Jun 1, 2022

nodejs/node#43261 (comment)

Not sure why neither the GitHub widget nor the nodejs-github-bot are picking up the fact that there's been more recent Jenkins runs

I took a look at https://ci.nodejs.org/job/post-build-status-update/ and it is very red. The job was specifying to run the pipeline file from master, I've updated it to main https://github.com/nodejs/jenkins-config-test/commit/08ffb5c0ad3c76f1854450e84f1717fc387a646b (this seems a very big diff for a one word change 🤷 ).

The confusing thing is there were some successful runs about an hour ago so it can't be entirely the branch rename as that happened two weeks ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants