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

Remove explicit branch inputs from cloud integration test workflows in GHA #2837

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

marcelovilla
Copy link
Member

Reference Issues or PRs

Closes #2836

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

How to test this PR?

You won't be able to see the branch input textbox gone from the GitHub Actions UI until we merge the PR to main. However, you can compare this approach to our local upgrade tests, which don't specify the branch as an input and can still be run from an arbitrary branch:

image

Any other comments?

@marcelovilla marcelovilla changed the title Remove branch inputs Remove explicit branch inputs from cloud integration test workflows in GHA Nov 8, 2024
@Adam-D-Lewis
Copy link
Member

From the issue.

This is not needed as workflows that are run manually (via the workflow_dispatch trigger) already offer a way to select the branch from which they should run:

If I understand you correctly you are saying the blue and green underlined options are identical, but that isn't the case.
image

The blue option is to affect from which branch the workflow runs. If you are modifying the workflow itself, this is a useful option to test your changes. You may still want the test in your workflow to checkout the main branch of the Nebari codebase however. This isn't possible without both options.

I think the customization we currently have is useful and doesn't hurt anything as long as good options are used for the defaults which I think they are.

@marcelovilla
Copy link
Member Author

You may still want the test in your workflow to checkout the main branch of the Nebari codebase however. This isn't possible without both options.

Are you referring to testing the workflow from another branch but have that deploy Nebari from the main branch? Honestly, I don't think this is a very common scenario but I get that if it ever happens to be the case, it would certainly be useful to have a way of choosing branches separately.

The reason I opened this PR is because I think is more intuitive to use the built-in branch selector (like we're doing in other tests), instead of adding an additional on our own. Furthermore, I'm not sure if it might be prone-error. What happens if you select a branch on the drop-down and write another on the textbox? Which one gets checked out? I'm assuming the latter.

@Adam-D-Lewis
Copy link
Member

Adam-D-Lewis commented Nov 11, 2024

Honestly, I don't think this is a very common scenario but I get that if it ever happens to be the case, it would certainly be useful to have a way of choosing branches separately.

Oh I see, I was under the impression that main would always be checked out if we didn't set a branch, but I looked up the docs for the checkout action and I now see that's not the case so yeah, I can support this PR now. :)

    # The branch, tag or SHA to checkout. When checking out the repository that
    # triggered a workflow, this defaults to the reference or SHA for that event.
    # Otherwise, uses the default branch.

Copy link
Member

@Adam-D-Lewis Adam-D-Lewis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @marcelovilla!

@marcelovilla marcelovilla merged commit 59a65e2 into main Nov 12, 2024
4 checks passed
@marcelovilla marcelovilla deleted the remove-branch-inputs branch November 12, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[ENH] - Remove unnecesary branch input in GHA cloud integration tests
2 participants