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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃彈 Count all cherry picks when setting the version #32689
Conversation
Hey @danielrozenberg! These files were changed:
|
.map((line) => ({ | ||
isCherryPick: line.substring(0, 2) == '- ', | ||
sha: line.substring(2), | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some musings: we had these lines originally to forcefully indicate non-cherry-pick commits. The real issue we have here is that it's (afaiu) programmatically impossible to tell whether a modified commit is a indeed cherry pick or not
This resolved the issue at hand, but returns the original issue that this was supposed to fix, which is that we wanted to have an indicator for when somebody is trying to release a potentially unauthorized version. Not sure how to resolve both of these issues together
// TODO(#27771, danielrozenberg): fail this release quickly if there are | ||
// commits in the tree that are not from the `master` branch. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol yes I'm talking above about exactly this TODO 馃槄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This effectively reverts #29051, which we introduced because some cherry-picks were not being properly picked up as cherry-picks. I can't remember the scenarios where this happens, but I think this is going to actually cause more incorrectly-versioned issues.
An example would really help here. I haven't seen any instances where However I have seen
Is that the rare mis-categorization you're talking about? |
Hmm does the |
Yes. For instance, if I check out one of my PR branches and run
This commit doesn't exist on master (PR isn't merged yet), so it shouldn't count as a cherry-pick. |
That's okay IMO because
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to immediately follow up with a PR that verifies the commits exist on master, but this is good enough to unblock us.
(cherry picked from commit f26666e)
(cherry picked from commit f26666e)
Use case: When cherry-picking, sometimes a non-master commit needs to be cherry-picked to resolve merge conflicts.
What happens: A new AMP version is created instead of appending the existing AMP version with the # of cherry-picked commits.
This is because it grabs the wrong timestamp with
HEAD~{# of master cherry-picked commits}
Example: amp-release-2012301722002, which has 2 master commits and 2 non-master commits, was created as release 2101152047000 instead of the expected
2012301722004
(or2012301722002
depending on how we want to count).Fix: Count both master and non-master commits when setting the AMP version.