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

Check unmerged commits in dependencies #1730

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

skitt
Copy link
Member

@skitt skitt commented Sep 30, 2024

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).

@submariner-bot
Copy link

🤖 Created branch: z_pr1730/skitt/check-dependency-branches

@skitt skitt force-pushed the check-dependency-branches branch 2 times, most recently from 7545109 to e75773c Compare October 2, 2024 16:02
# 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
Copy link
Member

@dfarrell07 dfarrell07 Oct 7, 2024

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.

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raised #1737 to track.

@skitt skitt force-pushed the check-dependency-branches branch 3 times, most recently from 7dde182 to 6c3b557 Compare October 8, 2024 07:35
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]>
@skitt skitt force-pushed the check-dependency-branches branch from 6c3b557 to fff1722 Compare October 8, 2024 08:00
@tpantelis tpantelis merged commit 60515ef into submariner-io:devel Oct 10, 2024
45 checks passed
@submariner-bot
Copy link

🤖 Closed branches: [z_pr1730/skitt/check-dependency-branches]

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

Successfully merging this pull request may close these issues.

4 participants