Skip to content

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

Merged
fmalatino merged 6 commits into
NOAA-GFDL:developfrom
romanc:romanc/create-cache-as-reusable-workflow
Oct 27, 2025
Merged

ci: make "create cache" a reusable workflow#69
fmalatino merged 6 commits into
NOAA-GFDL:developfrom
romanc:romanc/create-cache-as-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 pySHiELD 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
  • New check tests, if applicable, are included: N/A
  • Targeted model, if this change was triggered by a model need/shortcoming: N/A

@romanc romanc changed the title Romanc/create cache as reusable workflow ci: make "create cache" a reusable workflow Oct 24, 2025
@romanc
Copy link
Copy Markdown
Collaborator Author

romanc commented Oct 24, 2025

/cc @twicki for some reason I can't tag you as a reviewer

@fmalatino
Copy link
Copy Markdown
Contributor

/cc @twicki for some reason I can't tag you as a reviewer

I just added him as a contributor. Going forward he should be accessible.

@romanc
Copy link
Copy Markdown
Collaborator Author

romanc commented Oct 24, 2025

/cc @twicki for some reason I can't tag you as a reviewer

I just added him as a contributor. Going forward he should be accessible.

Thanks, Frank!

Copy link
Copy Markdown
Contributor

@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!

@romanc
Copy link
Copy Markdown
Collaborator Author

romanc commented Oct 27, 2025

With everybody's approval, can we get this one merged? The merging order for these PRs is

  1. pySHiELD: this one
  2. pyFV3: ci: make "create cache" a reusable workflow pyFV3#91
  3. NDSL: ci: create cache for translate test data NDSL#279

@fmalatino fmalatino added this pull request to the merge queue Oct 27, 2025
Merged via the queue into NOAA-GFDL:develop with commit ee78983 Oct 27, 2025
3 checks passed
@romanc romanc deleted the romanc/create-cache-as-reusable-workflow branch October 27, 2025 17:01
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