-
Notifications
You must be signed in to change notification settings - Fork 26
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
Check unmerged commits in dependencies #1730
Check unmerged commits in dependencies #1730
Conversation
🤖 Created branch: z_pr1730/skitt/check-dependency-branches |
7545109
to
e75773c
Compare
# vX.Y.Z-0.YYYYMMDDhhmmss-hash | ||
GOWORK=off go list -m -mod=mod -json all | \ | ||
jq -r 'select(.Path | contains("/submariner-io/")) | select(.Main != true) | select(.Version | contains ("-")) | select(.Version | length > 14) | "\(.Path) \(.Version)"' | \ | ||
while read -r project version; do |
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.
Nit: Should there be indentation inside this loop?
Which highlights that shellcheck doesn't do format checking. They recommend shfmt. I can look into it if other people think it would be helpful.
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.
There should indeed, thanks! shfmt
could be useful; our indentation in particular is inconsistent, running shfmt -i 4
would fix that.
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.
Raised #1737 to track.
7dde182
to
6c3b557
Compare
This adds a script which examines submariner-io dependencies with versions referencing untagged git commits, that is to say commits which haven't been released. It ensures that any such dependencies point to a commit in the relevant branch, to avoid merging PRs with pointers to unmerged commits. Since the project rebases on PR merge, the commit hashes change, and dependent PRs can end up being merged with a reference to an in-development commit; that can break local builds. Since Shipyard doesn't have any submariner-io dependencies, this isn't integrated into CI yet; it will be used in other Submariner projects. Signed-off-by: Stephen Kitt <[email protected]>
6c3b557
to
fff1722
Compare
🤖 Closed branches: [z_pr1730/skitt/check-dependency-branches] |
This adds a script which examines submariner-io dependencies with versions referencing untagged git commits, that is to say commits which haven't been released. It ensures that any such dependencies point to a commit in the relevant branch, to avoid merging PRs with pointers to unmerged commits. Since the project rebases on PR merge, the commit hashes change, and dependent PRs can end up being merged with a reference to an in-development commit; that can break local builds.
Since Shipyard doesn't have any submariner-io dependencies, this isn't integrated into CI yet; it will be used in other Submariner projects.
See submariner-io/submariner-operator#3237 for a check involving this (and correctly failing).