Skip to content

ci: make "create cache" a reusable workflow#91

Merged
jjuyeonkim merged 3 commits into
NOAA-GFDL:developfrom
romanc:romanc/create-cache-reusable-workflow
Oct 27, 2025
Merged

ci: make "create cache" a reusable workflow#91
jjuyeonkim merged 3 commits into
NOAA-GFDL:developfrom
romanc:romanc/create-cache-reusable-workflow

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Oct 24, 2025

Description

Recent (planned) downtime of NCCS portal showed a whole in our translate test data caching strategy. When we run pyFV3 tests as re-usable workflow in e.g. NDSL tests, we don't cache the translate test data. To do so, we can "upgrade" the "create cache" workflow to be re-usable such that we can call it from e.g. NDSL when we create the cache there.

GHA doesn't provide a way to detect workflow_call as an event (e.g. github.event will be workflow_dispatch in that case, which is the same as for a manual dispatch). We thus create an artificial input in case the workflow is called from another workflow. That way we know. The artificial input has a default value such that we don't need to set it from the calling workflow.

How Has This Been Tested?

Tested on my fork, e.g. romanc/NDSL#5.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation: N/A
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
    Depends on ci: make "create cache" a reusable workflow pySHiELD#69
  • New check tests, if applicable, are included: N/A
  • Targeted model if this changed was triggered by a model need/shortcoming: N/A

Copy link
Copy Markdown
Collaborator

@twicki twicki left a comment

Choose a reason for hiding this comment

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

Nice. I don't fully get the magic, but if it works it works!

@jjuyeonkim
Copy link
Copy Markdown
Collaborator

My experience with workflows is limited, so I don't have feedback other than it looks useful.

@jjuyeonkim jjuyeonkim added this pull request to the merge queue Oct 27, 2025
Merged via the queue into NOAA-GFDL:develop with commit a7f98d5 Oct 27, 2025
4 checks passed
@romanc romanc deleted the romanc/create-cache-reusable-workflow branch October 27, 2025 18:39
@romanc romanc mentioned this pull request Oct 28, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants