Skip to content

Documentation: Improve info for CI/testing in GHA to force using a dev tag of the MET software #2138

@DanielAdriaansen

Description

@DanielAdriaansen

Per discussion with @georgemccabe on Slack:

Is there a way to run the METplus wrappers automation but using a specific branch of the MET repo? Or does this type of testing better suited for doing locally and confirming it runs before the METplus wrappers automation uses the new beta of the MET?
short answer yes, but not as easily as we would like. It is possible to force the METplus automated tests to use a specific Docker tag for MET by setting the MET_FORCE_TAG variable on this line of the workflow file:
https://github.com/dtcenter/METplus/blob/108abbca5044cc07528c441bf20d61ae50742980/.github/workflows/testing.yml#L88

However, that only corresponds to existing MET Docker tags, not GitHub branches. It looks like Docker tags for PRs are created on DockerHub dtcenter/met-dev, but the logic uses the dtcenter/met if you set MET_FORCE_TAG because it was assumed that you would set this to use an older, stable release of MET in this case.

Line that sets MET DockerHub repo:
https://github.com/dtcenter/METplus/blob/108abbca5044cc07528c441bf20d61ae50742980/.github/jobs/docker_setup.sh#L49

It looks like there is a DockerHub image for [dtcenter/met:feature_2285_read_point_data-PR](https://hub.docker.com/layers/dtcenter/met-dev/feature_2285_read_point_data-PR/images/sha256-ac45cd0ce0842ff8bacd1b925dca42766d4f53f5c2e1de9591adbdc72d4a1c1f?context=repo), so you should be able to use that branch if you:
Change line 49 in .github/jobs/docker_setup.sh to MET_DOCKER_REPO=met-dev
Set MET_FORCE_TAG=feature_2285_read_point_data-PR on line 88 in .github/workflows/testing.yml

It would be nice to enhance the automated test logic so it is easier to handle this case without having to change multiple files.

Time Estimate

1 hour

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.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • 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.

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions