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

chore: get_all_manifests.sh: support tags and make it priority #1194

Merged

Conversation

ykaliuta
Copy link
Contributor

@ykaliuta ykaliuta commented Aug 21, 2024

Jira: https://issues.redhat.com/browse/RHOAIENG-11687

Current` script is supposed to be used with branches since it uses "git clone -b" while preparing tagged releases it is useful to fetch tags. "git clone -b" can work with tags as well, but if the same name branch exists it fetches the branch which is not desirable behaviour if tagged release is being produced.

Try to fetch tag. If it fails fallback to branch.

GitHub discussion: #1169 (comment)

Description

How Has This Been Tested?

Screenshot or short clip

Merge criteria

  • You have read the contributors guide.
  • Commit messages are meaningful - have a clear and concise summary and detailed explanation of what was changed and why.
  • Pull Request contains a description of the solution, a link to the JIRA issue, and to any dependent or related Pull Request.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@ykaliuta
Copy link
Contributor Author

@bartoszmajsak

@ykaliuta ykaliuta force-pushed the manifests-branch branch 4 times, most recently from 4921fb0 to ad65664 Compare August 21, 2024 12:56
@VaishnaviHire
Copy link
Member

@ykaliuta Can you add chore: to commit and PR title, it helps with downstream sync to track commits with Jira issues

@ykaliuta ykaliuta changed the title get_all_manifests.sh: support tags and make it priority chore: get_all_manifests.sh: support tags and make it priority Aug 21, 2024
@ykaliuta
Copy link
Contributor Author

@ykaliuta Can you add chore: to commit and PR title, it helps with downstream sync to track commits with Jira issues

yes. But I'm wondering, how it helps?

@AjayJagan
Copy link
Contributor

+1 from me

if ! $git_fetch refs/tags/$ref 2>/dev/null ; then
$git_fetch refs/heads/$ref
fi
git reset --hard FETCH_HEAD
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
git reset --hard FETCH_HEAD
git reset -q --hard FETCH_HEAD

to suspend checkout commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to suspend checkout commit

As you wish :)

Jira: https://issues.redhat.com/browse/RHOAIENG-11687

Current script is supposed to be used with branches since it uses
"git clone -b" while preparing tagged releases it is useful to fetch
tags. "git clone -b" can work with tags as well, but if the same
name branch exists it fetches the branch which is not desireable
behaviour if tagged release is being produced.

Try to fetch tag. If it fails fallback to branch.

GitHub discussion: opendatahub-io#1169 (comment)

Signed-off-by: Yauheni Kaliuta <[email protected]>
Copy link

openshift-ci bot commented Aug 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zdtsw

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bartoszmajsak
Copy link
Contributor

@ykaliuta Thanks for tagging me. I didn't know the tags would be used back when writing the script (or adjusting the existing one), so I'm happy it has been improved. Pinned versions should help in some weird errors I've seen in the past with misaligned "release" branches.

@openshift-merge-bot openshift-merge-bot bot merged commit d2caf7a into opendatahub-io:incubation Aug 21, 2024
8 checks passed
zdtsw pushed a commit to zdtsw-forking/rhods-operator that referenced this pull request Aug 29, 2024
…atahub-io#1194)

Jira: https://issues.redhat.com/browse/RHOAIENG-11687

Current script is supposed to be used with branches since it uses
"git clone -b" while preparing tagged releases it is useful to fetch
tags. "git clone -b" can work with tags as well, but if the same
name branch exists it fetches the branch which is not desireable
behaviour if tagged release is being produced.

Try to fetch tag. If it fails fallback to branch.

GitHub discussion: opendatahub-io#1169 (comment)

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit d2caf7a)
openshift-merge-bot bot pushed a commit to red-hat-data-services/rhods-operator that referenced this pull request Aug 30, 2024
…atahub-io#1194)

Jira: https://issues.redhat.com/browse/RHOAIENG-11687

Current script is supposed to be used with branches since it uses
"git clone -b" while preparing tagged releases it is useful to fetch
tags. "git clone -b" can work with tags as well, but if the same
name branch exists it fetches the branch which is not desireable
behaviour if tagged release is being produced.

Try to fetch tag. If it fails fallback to branch.

GitHub discussion: opendatahub-io#1169 (comment)

Signed-off-by: Yauheni Kaliuta <[email protected]>
(cherry picked from commit d2caf7a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants