-
Notifications
You must be signed in to change notification settings - Fork 0
Add env input to build Kayobe docker #33
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
base: main
Are you sure you want to change the base?
Conversation
Adds environment input to build Kayobe docker image workflow template when selector set to input.
Summary of ChangesHello @darmach, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the Kayobe Docker image build process by integrating a conditional environment selection mechanism directly into the GitHub Actions workflow. This enhancement provides greater control and flexibility for users to specify the target environment when manually triggering the build, adapting to specific configuration requirements related to registry sharing. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a workflow input to select an environment when building the Kayobe docker image. My review identifies a significant issue where the workflow's matrix strategy doesn't use the selected environment, causing it to run for all environments instead of the chosen one. I've also suggested making the new input required and providing a default value to improve robustness. The fix for the matrix strategy will require a change outside of the current diff.
| inputs: | ||
| kayobe_environment: | ||
| description: | | ||
| Select the environment the kayobe workflow shall target. | ||
| type: choice | ||
| options: %% github_kayobe_environments %% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple of issues with the current implementation of the workflow input.
-
Input should be required and have a default value: The
kayobe_environmentinput should be marked asrequired: trueto ensure a value is always provided by the user. It's also good practice to provide adefaultvalue, typically the first environment in the list. This prevents the workflow from running with an empty string if the user doesn't make a selection, which would cause failures later on. -
Matrix strategy ignores input: The job's matrix strategy (on line 32) is configured to iterate over all
github_kayobe_environments, ignoring the environment selected via the newworkflow_dispatchinput. This means that even if a user selects a single environment, the job will run for all of them.
To fix this, you should update the inputs block as suggested below, and also modify the strategy.matrix.environment on line 32 to be ['${{ inputs.kayobe_environment }}']. This will ensure the job runs only for the environment selected by the user.
inputs:
kayobe_environment:
description: |
Select the environment the kayobe workflow shall target.
type: choice
required: true
default: %% github_kayobe_environments | first %%
options: %% github_kayobe_environments %%
Adds environment input to build Kayobe docker image workflow template when selector set to input.