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

fix: release_collection should use code matching tag #327

Merged

Conversation

richm
Copy link
Contributor

@richm richm commented Jan 17, 2024

release_collection was not ensuring that the code checked out to
use to build the collection matched the tag/hash specified.

The code will now ensure:

  • if --no-update was used, just ensure the given cur_ref is
    checked out, or main HEAD if cur_ref is None
  • if cur_ref was set to a tag or commit hash, and there have been
    no updates to the role code since that tag/hash, the tag/hash will
    be checked out
  • if there have been updates to the role code since the cur_ref
    • if there is a new tag, check out that tag
    • elif use_commit_hash is set, use main HEAD which is already checked
      out
    • else there have been role updates, but not yet tagged, and we
      are not using the commit hash - ensure cur_ref is checked out

Signed-off-by: Rich Megginson rmeggins@redhat.com

@richm richm requested a review from spetrosi January 17, 2024 19:06
release_collection was not ensuring that the code checked out to
use to build the collection matched the tag/hash specified.

The code will now ensure:
* if --no-update was used, just ensure the given cur_ref is
  checked out, or main HEAD if cur_ref is None
* if cur_ref was set to a tag or commit hash, and there have been
  no updates to the role code since that tag/hash, the tag/hash will
  be checked out
* if there have been updates to the role code since the cur_ref
  * if there is a new tag, check out that tag
  * elif use_commit_hash is set, use main HEAD which is already checked
    out
  * else there have been role updates, but not yet tagged, and we
    are not using the commit hash - ensure cur_ref is checked out

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm richm force-pushed the ensure-correct-tag-used-for-collection branch from 4354747 to 500585f Compare January 17, 2024 19:10
@richm
Copy link
Contributor Author

richm commented Jan 17, 2024

I want to get this merged before the next nightly build. I've tested it locally and it works.

@richm richm merged commit ce72529 into linux-system-roles:main Jan 17, 2024
4 checks passed
@richm richm deleted the ensure-correct-tag-used-for-collection branch January 17, 2024 20:57
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.

1 participant