Skip to content

Conversation

@debasishbsws
Copy link
Member

  • Previously, all git-checkout nodes in a config were updated with the same commit SHA.
  • This caused incorrect updates when multiple git-checkout steps exist, each referring to different repositories or commits.
  • Now, only the first git-checkout node is updated to prevent partial or broken updates.
  • Reduces incorrect automated updates and the need for manual intervention.

Melange Pull Request Template

Functional Changes

  • This change can build all of Wolfi without errors (describe results in notes)

Notes:

SCA Changes

  • Examining several representative APKs show no regression / the desired effect (details in notes)

Notes:

Linter

  • The new check is clean across Wolfi
  • The new check is opt-in or a warning

Notes:

- Previously, all git-checkout nodes in a config were updated with the same commit SHA.
- This caused incorrect updates when multiple git-checkout steps exist, each referring to different repositories or commits.
- Now, only the first git-checkout node is updated to prevent partial or broken updates.
- Reduces incorrect automated updates and the need for manual intervention.

Signed-off-by: Debasish Biswas <[email protected]>
@debasishbsws
Copy link
Member Author

debasishbsws commented May 2, 2025

This change helps prevent the automation from unnecessarily updating expected-commit SHAs. In some cases — for example, this commit — we’ve seen that automation updates the wrong expected-commit.
As there will almost never be a possibility where updating more that one expected-commit SHA could work. as all the different git-checkout will have different repository with different commits.

@debasishbsws debasishbsws requested review from Copilot and rawlingsj May 2, 2025 08:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a bug where all git-checkout nodes were updated with the same commit SHA. The changes ensure that only the first git-checkout node is updated, preventing incorrect or partial updates.

  • Updated the logic to process only the first git-checkout node
  • Removed the loop that iterated over all git-checkout nodes

@debasishbsws debasishbsws requested a review from a team May 2, 2025 11:30
Filter(yit.WithMapValue("git-checkout"))

for gitCheckoutNode, ok := it(); ok; gitCheckoutNode, ok = it() {
// Only run updateGitCheckout once for the first git-checkout node
Copy link
Member

Choose a reason for hiding this comment

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

This sounds like a limitation. I'd consider instead to request support for checking updates for any of the git-checkouts.

@debasishbsws
Copy link
Member Author

Closing as we already have: #2008

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.

2 participants