Skip to content

Bugfix #3446 develop skip DockerHub query - #3447

Merged
georgemccabe merged 5 commits into
developfrom
bugfix_3446_develop_skip_dockerhub_query
Dec 4, 2026
Merged

georgemccabe merged 5 commits into
developfrom
bugfix_3446_develop_skip_dockerhub_query

Conversation

@georgemccabe

@georgemccabe georgemccabe commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Change Summary

Describe the changes proposed by this pull request:

Fixes #3446.

get_data_volumes.main() always queried the DockerHub API for the list of available tags, even though that list is only used to choose a branch-specific input data volume when running a development version. As a result, the difference test step, which only requests output-* volumes from dtcenter/metplus-data-dev, failed with "Could not get truth data to run diff" whenever the DockerHub API returned a non-200 status twice (e.g. medium_range:8 in run 44809364247 on main_v13.0).

The query now runs inside the loop, once, the first time an input data volume is requested while running a development version, which is the only place its result is used.

When the query does run, docker_get_volumes_last_updated() now returns None, with a log message giving the reason, when a request raises a requests.exceptions.RequestException (e.g. a timeout or connection error), returns a non-200 status (the status code is now logged), returns a body that is not JSON, or returns a response without a results key. Previously only two non-200 responses to the first page were handled, and the other cases ended in a traceback instead of the "Try rerunning failed jobs" error. Every page is retried once, including later pages, which previously had no error handling, and a missing next key ends the pagination.

Also removed the handling for all_metplus_data, which no caller passes and which would pull an image tagged with only the version (e.g. metplus-data-dev:develop) that does not exist on DockerHub. It was added for Travis CI in #622.

No release notes or upgrade instructions: this changes only the GitHub Actions scripts under .github/jobs, so a user upgrading from the last release would not notice any difference.

Per discussion, this fix is not being applied to main_v13.0.

Pull Request Testing

  • Describe testing already performed for these changes:

    Ran get_data_volumes.main() locally with docker_get_volumes_last_updated() and run_commands() replaced by stand-ins, for branches main_v13.0 and feature_1, with the DockerHub query both succeeding and failing:

    • output-* (truth data) requests made no query and produced the same volume names as before, even when the query would fail.
    • A request for both a truth data volume and an input volume made one query.
    • Input volume requests still made the query, still selected feature_1-medium_range when it was available, and still returned the error when the query failed.

    Ran docker_get_volumes_last_updated() locally with requests.get replaced by a stand-in:

    • Two good pages, a 429 followed by success, and a page 2 failure followed by success all returned the tags from both pages.
    • Two exceptions, two bodies that were not JSON, two responses without results, and two failures on page 2 each returned None with the reason logged.
    • A page without a next key returned the tags from that page.

    Also ran the real query against DockerHub for develop, which returned 48 tags including develop-medium_range.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Confirm that the Testing workflow on this PR obtains input data volumes and runs the difference tests as before.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [Yes or No]

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

  • 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/4/2026.

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, add 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 and/or METplus-X.Y Development project for the next coordinated release
  • 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.

🤖 Generated with Claude Code

…he result is used, i.e. when a development version requests an input data volume, so difference tests no longer fail when the DockerHub API request fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

coveralls commented Dec 2, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 47424691272

Coverage remained the same at 92.699%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1 coverage regression across 1 file.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1 previously-covered line in 1 file lost coverage.

File Lines Losing Coverage Coverage
metplus/util/config_metplus.py 1 87.85%

Coverage Stats

Coverage Status
Relevant Lines: 10711
Covered Lines: 9929
Line Coverage: 92.7%
Coverage Strength: 1.85 hits per line

💛 - Coveralls

@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🔎 In review in METplus-13.1 Development Dec 2, 2026
@georgemccabe
georgemccabe marked this pull request as ready for review December 2, 2026 20:48
Comment thread .github/jobs/get_data_volumes.py Resolved
Comment thread .github/jobs/get_data_volumes.py Resolved
@claude

claude Bot commented Dec 2, 2026

Copy link
Copy Markdown

Summary

This PR changes .github/jobs/get_data_volumes.py so the DockerHub tag listing is requested only when it is used: a development version asking for at least one input volume other than all_metplus_data. Truth-data (output-*) and released-version requests no longer depend on that API call, so the difference-test step stops failing when DockerHub returns non-200.

Findings

  • .github/jobs/get_data_volumes.py:60 (nit): the new needs_available_volumes predicate duplicates the argument classification done in the loop below, so the two can drift apart.
  • .github/jobs/get_data_volumes.py:69 (pre-existing, not blocking): only AttributeError is handled when the query still runs. Timeouts, connection errors and malformed JSON still produce a raw traceback.

I found no correctness bugs in the new logic. Skipped-query cases give the same volume names as before, because available_volumes is only read in the develop input-volume branch. Both callers, setup_and_run_diff.py (passes output-...) and setup_and_run_use_cases.py, are compatible.

Project conventions

AGENTS.md exists and was used for this review.

  • Branch name bugfix_3446_develop_skip_dockerhub_query and title Bugfix #3446 develop skip DockerHub query follow the convention. The base is develop.
  • Use case groups: no "run": true entries in .github/parm/use_case_groups.json. This is OK.
  • Template: used. Answered items are checked. The two unanswered documentation and testing items are left unchecked, as AGENTS.md says.
  • Milestone: METplus-13.1.0 matches metplus/VERSION on develop (13.1.0-beta1-dev). The METplus-13.1 Development project is not set (no project items on the PR).
  • Release notes and upgrade instructions: none added. The change only touches CI scripts and is not visible to users upgrading, and the description states this with reasoning. That is consistent with AGENTS.md.
  • Documentation and configuration variables: no user-visible behavior or config variables change, so there is nothing to update.
  • Tests: no automated tests exist for .github/jobs scripts. Testing was manual with stubs (described in the PR), and the Testing workflow is the stated check. No tests were added.
  • Files: one file modified, none added, renamed or removed.

Questions for the author

  • Should the PR be added to the METplus-13.1 Development project? It currently has no project items. If this is a permissions limit, ignore it.

georgemccabe and others added 2 commits December 2, 2026 16:07
…erHub inside the loop the first time a development version needs the available volumes, so the decision to query no longer duplicates the loop's logic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ckerHub request raises an exception, returns a non-200 status, or returns a response that is not a page of results, retrying each page once and logging the reason, so failures report the rerun message instead of a traceback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread .github/jobs/docker_utils.py Resolved
Comment thread .github/jobs/docker_utils.py Resolved
georgemccabe and others added 2 commits December 4, 2026 14:02
Co-authored-by: John Halley Gotway <johnhg@ucar.edu>
…request

Co-authored-by: John Halley Gotway <johnhg@ucar.edu>

@JohnHalleyGotway JohnHalleyGotway left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for applying both suggestions, George. I ran the updated docker_get_volumes_last_updated() against DockerHub. For develop it now finds all 158 matching tags, including develop-medium_range, in 8 requests, where before it stopped after 21 requests with 48. The earlier use case run on this PR also confirmed that the input and truth data volumes were both set up and the diff ran. Looks good to me.

@georgemccabe
georgemccabe merged commit afa2db9 into develop Dec 4, 2026
91 of 92 checks passed
@georgemccabe
georgemccabe deleted the bugfix_3446_develop_skip_dockerhub_query branch December 4, 2026 21:22
@github-project-automation github-project-automation Bot moved this from 🔎 In review to 🏁 Done in METplus-13.1 Development Dec 4, 2026
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: Fix difference test failure when the unneeded DockerHub tag query fails

3 participants