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

Feature #2816 enhance workflow dispatch testing #2818

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

georgemccabe
Copy link
Collaborator

@georgemccabe georgemccabe commented Dec 9, 2024

The same changes should be made to main_v6.0 so the updates to the workflow_dispatch drop down for testing workflow will include these changes when main_v6.0 becomes the default branch. It is not necessary to add this for main_v5.1 since we are so close to the release.

Pull Request Testing

  • Describe testing already performed for these changes:

Confirmed that expected workflow run titles result from different runs:

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
  • Review code changes
  • Consider improvements to workflows in other repositories, e.g. set workflow run title
  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes]

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

  • Please complete this pull request review by 12/12/2024.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • For any new datasets, an entry to the METplus Verification Datasets Guide.
  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or METplus-Wrappers-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

…ay the repo that triggered the workflow on workflow_dispatch events. Preserve the behavior of pull_request and push events by displaying the PR title or head commit message respectively
… the repo/title was not provided. Update description of workflow_dispatch argument to describe what it can be used for when triggering manually. Only run step to build URL to commit that triggered workflow if it was triggered from an external repo
@georgemccabe georgemccabe added this to the METplus-6.1.0 milestone Dec 9, 2024
@georgemccabe georgemccabe linked an issue Dec 9, 2024 that may be closed by this pull request
20 tasks
@georgemccabe georgemccabe marked this pull request as ready for review December 10, 2024 18:19
… was added to handle custom workflow run titles
Copy link
Collaborator

@JohnHalleyGotway JohnHalleyGotway left a comment

Choose a reason for hiding this comment

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

@georgemccabe these are great improvements. Thanks a lot for working on them. The only way I can think it improve them would be in the scenario when the testing workflow was triggered by changes in another repository, like this one. The title is currently dtcenter/MET.

The Print GitHub Values for Reference job output already includes this sha from the triggering repo:

    "inputs": {
      "repository": "dtcenter/MET",
      "sha": "1b58927e0b3d077ae3cbbe96dfd6d4c73bd2c27e"
    },

It would be convenient if the title automatically added a link directly to that SHA, like:
dtcenter/MET@bd2c27e

I'm going to state that I approve of these changes as is.

And if enhancing that title to link to the source sha is easily done, that'd be even better!

@georgemccabe
Copy link
Collaborator Author

georgemccabe commented Dec 13, 2024

@JohnHalleyGotway, I don't think there is a way to create a link within the title since the title itself is a link to the workflow logs. However, from the link you provided, you can expand the step that is titled Build URL for commit that triggered workflow get a link to the commit in the external repo.

@georgemccabe georgemccabe merged commit 6dfa458 into develop Dec 13, 2024
77 checks passed
georgemccabe added a commit that referenced this pull request Dec 13, 2024
* per #2816, update title of workflow displayed in Actions tab to display the repo that triggered the workflow on workflow_dispatch events. Preserve the behavior of pull_request and push events by displaying the PR title or head commit message respectively

* fix logic for run-name

* Update event info to note that the workflow was triggered manually if the repo/title was not provided. Update description of workflow_dispatch argument to describe what it can be used for when triggering manually. Only run step to build URL to commit that triggered workflow if it was triggered from an external repo

* add optional argument for workflow_dispatch to specify the title of the workflow run

* revert change to repository argument description since title argument was added to handle custom workflow run titles
@georgemccabe georgemccabe deleted the feature_2816_gha_workflow_dispatch branch December 13, 2024 16:32
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.

Internal: Refine testing GitHub Action workflow dispatch functionality
2 participants