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

Refine testing GitHub Action workflow dispatch functionality #2816

Open
5 of 20 tasks
JohnHalleyGotway opened this issue Feb 23, 2023 · 2 comments · Fixed by #2818 · May be fixed by #2829
Open
5 of 20 tasks

Refine testing GitHub Action workflow dispatch functionality #2816

JohnHalleyGotway opened this issue Feb 23, 2023 · 2 comments · Fixed by #2818 · May be fixed by #2829
Assignees
Labels
component: testing Software testing issue priority: medium Medium Priority reporting: NRL METplus Naval Research Laboratory METplus Project type: enhancement Improve something that it is currently doing

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Feb 23, 2023

Describe the Enhancement

This was intially discussed during the METplus 5.0 Release Retrospective. In GitHub actions for METplus the testing.yml workflow has a workflow dispatch feature. This enable you to manually trigger runs of that workflow for any feature branch you choose. This issue is to enhance that functionality in 2 ways:

  1. Specify the reference branch. All manually triggered workflow runs are diffed against the develop-ref truth data. Enhance this to let the user pick the reference truth dataset (i.e. develop-ref, main_v11.0-ref, and so on). Alternatively, you could enhance the script logic to automatically pick the right reference dataset.

  2. Improve the GHA run name. Currently, all manually triggered testing workflow runs are simply named Testing, like this:

Screen Shot 2023-02-23 at 10 52 55 AM

Enhance this to include the name of the branch being run at a minimum. Consider also including the reference dataset name, if that's made to be configurable.

Remember to migrate this functionality to the other METplus repos.

Time Estimate

1 day?

Sub-Issues

Consider breaking the enhancement down into sub-issues.
None needed.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

NRL METplus 7730022

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: enhancement Improve something that it is currently doing component: testing Software testing issue priority: medium Medium Priority alert: NEED ACCOUNT KEY Need to assign an account key to this issue labels Feb 23, 2023
@JohnHalleyGotway JohnHalleyGotway changed the title Refine testing workflow dispatch GitHub Action Refine testing GitHub Action workflow dispatch functionality Feb 23, 2023
@georgemccabe
Copy link
Collaborator

Does this issue belong in the METplus repository?

@georgemccabe
Copy link
Collaborator

For (1): I believe this code gets the main_vX.Y truth data for branches that contain main_vX.Y in the name, otherwise it uses develop.

For (2): It looks like run-name can be used to set the workflow run title
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#run-name

@JohnHalleyGotway JohnHalleyGotway added the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Oct 3, 2024
@JohnHalleyGotway JohnHalleyGotway removed their assignment Nov 11, 2024
@JohnHalleyGotway JohnHalleyGotway removed alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle labels Nov 11, 2024
@georgemccabe georgemccabe added the reporting: NRL METplus Naval Research Laboratory METplus Project label Dec 9, 2024
@georgemccabe georgemccabe transferred this issue from dtcenter/MET Dec 9, 2024
georgemccabe added a commit that referenced this issue Dec 9, 2024
…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
@georgemccabe georgemccabe linked a pull request Dec 9, 2024 that will close this issue
16 tasks
@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🔎 In review in METplus-Wrappers-6.1.0 Development Dec 11, 2024
georgemccabe added a commit that referenced this issue 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 added a commit that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: testing Software testing issue priority: medium Medium Priority reporting: NRL METplus Naval Research Laboratory METplus Project type: enhancement Improve something that it is currently doing
Projects
Status: 🔎 In review
2 participants