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

RHOAIENG-12524: fix(script): Improve generate-metadata-yaml.sh based on feedback #493

Conversation

andyatmiami
Copy link

@andyatmiami andyatmiami commented Dec 9, 2024

https://issues.redhat.com/browse/RHOAIENG-16752

Description

This commit is a follow up from discussions on #472.

The following improvements have been made to the script:

  • Set the executable bit on the script
  • Default values provided for all variables now (including output_file) so the script can and should be ran simply as ./generate-component-metadata.sh
    • Default name now honors the guidance given via a Slack discussion
      • i.e. Kubeflow Notebook Controller
  • Any and all issues reported by shellcheck have been resolved
  • Comments have been added for the file as a whole, as well as on each function, to help improve understanding of the script and its implementation. The "comment template" used is a continuation from the one I experimented with in feat(automation): Add GitHub Action to handle creating a new release #484

Related-to: https://issues.redhat.com/browse/RHOAIENG-12524

How Has This Been Tested?

./generate-metadata-yaml.sh was executed multiple times leveraging a variety of flags to ensure proper behavior.

  • The most "important" test case is running the script without providing any other arguments.
image

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • 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

@openshift-ci openshift-ci bot requested review from atheo89 and harshad16 December 9, 2024 21:56
@andyatmiami
Copy link
Author

⚠️

Please note due to the unresolved discussions on the exact requirements of the name attribute for component_metadata.yaml (source: https://redhat-internal.slack.com/archives/C05NXTEHLGY/p1731327116001979) - the current implementation of the script does NOT identically reproduce the file we have currently in source control.

Screenshot 2024-12-09 at 4 45 21 PM

It seems like Notebook Controller (imho) is the likely outcome that will be decided... so that is what I have implemented as default behavior... but who knows what (and when!) the true resolution of that Slack thread will be!

  • as an aside.. generating Kubeflow Notebook as the name leads to (relatively speaking) much weirder/complicated parsing... which, if I am being honest, also factored into my decision 😎

Copy link
Member

@jstourac jstourac left a comment

Choose a reason for hiding this comment

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

Thank you for the followup changes, Andy! No objections from my side.

/lgtm

@jiridanek
Copy link
Member

We still don't know if the script does what is required, but there's no reason to keep the PR hanging. It may be have to be revisited when we get more instructions from up above

/lgtm

@jiridanek
Copy link
Member

/retest-required

This commit is a follow up from discussions on opendatahub-io#472.

The following improvements have been made to the script:
- Set the executable bit on the script
- Default values provided for all variables now (including `output_file`) so the script can and should be ran simply as `./generate-component-metadata.sh`
    - Default name now honors the guidance given via a [Slack discussion](https://redhat-internal.slack.com/archives/C05NXTEHLGY/p1734032874172439?thread_ts=1731327116.001979&cid=C05NXTEHLGY)
        - i.e. `Kubeflow Notebook Controller`
- Any and all issues reported by `shellcheck` have been resolved
- Comments have been added for the file as a whole, as well as on each function, to help improve understanding of the script and its implementation.  The "comment template" used is a continuation from the one I experiemented with in opendatahub-io#484

Related-to: https://issues.redhat.com/browse/RHOAIENG-12524
@andyatmiami andyatmiami force-pushed the chore/generate_component_metadata_improvements branch from 3bea75e to 5219e3f Compare January 8, 2025 19:37
@openshift-ci openshift-ci bot removed the lgtm label Jan 8, 2025
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@624e616). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #493   +/-   ##
=======================================
  Coverage        ?   33.15%           
=======================================
  Files           ?        2           
  Lines           ?      941           
  Branches        ?        0           
=======================================
  Hits            ?      312           
  Misses          ?      598           
  Partials        ?       31           

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

@atheo89
Copy link
Member

atheo89 commented Jan 9, 2025

/lgtm

@jiridanek
Copy link
Member

/lgtm

1 similar comment
@jstourac
Copy link
Member

jstourac commented Jan 9, 2025

/lgtm

@andyatmiami
Copy link
Author

/approve

Copy link

openshift-ci bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyatmiami

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

@openshift-ci openshift-ci bot added the approved label Jan 9, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 330d816 into opendatahub-io:main Jan 9, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants