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

feat(CVP-4395,CVP-4396): add get package, channel and highest bundle functions in utils #357

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

asergienk
Copy link

@asergienk asergienk commented Jan 27, 2025

This commit adds two functions:

  • get_package_from_catalog: Given an output of 'opm render fbcFragment' command it returns a package name.
  • get_channel_from_catalog: Given an output of 'opm render fbcFragment' command and a olm.package name it returns the 'defaultChannel' value specified in the olm.package entry
  • get_highest_bundle_version: Given an output of 'opm render fbcFragment' command, package and channel it returns the highest bundle version

All functions will be used in the task of a 'deploy-fbc' pipeline in https://github.com/konflux-ci/tekton-integration-catalog

Signed-off-by: asergienk [email protected]

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@6ec3651). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             main      #357   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?        18           
  Lines           ?       502           
  Branches        ?         0           
========================================
  Hits            ?       502           
  Misses          ?         0           
  Partials        ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@asergienk asergienk force-pushed the get_package_name branch 4 times, most recently from 769c61b to 2917951 Compare January 27, 2025 20:00
Copy link
Collaborator

@dirgim dirgim left a comment

Choose a reason for hiding this comment

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

LGTM code-wise, but the gitlint issues will need to be addressed to unblock this:

1: CC1 Body does not contain a 'Signed-off-by' line
3: B6 Body message is missing

@asergienk
Copy link
Author

@dirgim I added a "Signed-off-by" line, and I have a "body message". I think the gitlink checks should pass now. Could you please re-run the ci tests?

@dheerajodha
Copy link
Member

@asergienk You need to add the 'Signed-off-by' line and body message within your commit message.
[Example]

test/utils.sh Show resolved Hide resolved
@asergienk
Copy link
Author

@dheerajodha thank you so much for the clarification and the example! I signed my commit and added a body message to it.

This commit adds two functions:
*get_package_from_catalog:
Given an output of opm render fbcFragment, it returns a package.
*get_channel_from_catalog:
Given an output of opm render fbcFragment and a olm.package,
it returns the 'defaultChannel' value from the olm.package entry
*get_highest_bundle_version:
Given an output of opm render fbcFragment, package and channel,
returns the highest bundle version
**All functions will be used in the tasks of deploy-fbc pipeline
in tekton-integration-catalog

Signed-off-by: Anna Rania <[email protected]>
@asergienk asergienk changed the title feat(CVP-4395,CVP-4396): add get package and channel functions in utils feat(CVP-4395,CVP-4396): add get package, channel and highest bundle functions in utils Jan 28, 2025
@dirgim
Copy link
Collaborator

dirgim commented Jan 28, 2025

/ok-to-test

@dirgim dirgim self-requested a review January 28, 2025 20:18
Copy link
Collaborator

@dirgim dirgim left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@arewm arewm left a comment

Choose a reason for hiding this comment

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

How much will this need to change after #356? Whether those changes are in this PR or that PR (it is a race 😉).

@dheerajodha
Copy link
Member

/ok-to-test

@dheerajodha
Copy link
Member

/retest

@jsztuka
Copy link
Collaborator

jsztuka commented Jan 30, 2025

/approve

Copy link
Collaborator

@jsztuka jsztuka left a comment

Choose a reason for hiding this comment

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

+1

@asergienk
Copy link
Author

How much will this need to change after #356? Whether those changes are in this PR or that PR (it is a race 😉).

@arewm Game on! Time to shift into high gear!😆

@dirgim dirgim merged commit d3a6f43 into konflux-ci:main Jan 30, 2025
7 of 8 checks passed
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.

6 participants