Skip to content

CI: Touch gmt_data_server.txt and gmt_hash_server.txt so they're not outdated - #9179

Merged
seisman merged 1 commit into
masterfrom
ci/cache
Sep 5, 2026
Merged

seisman merged 1 commit into
masterfrom
ci/cache

Conversation

@seisman

@seisman seisman commented Sep 4, 2026

Copy link
Copy Markdown
Member

As I understand it, GMT tries to refresh remote files if gmt_data_server.txt or gmt_hash_server.txt are 24-hours old.

The files stored in cache are refreshed weekly, so GMT thinks they're outdated. This PR fixes the issue by changing the modifications times of the two files, which has been working well in PyGMT.

@Esteban82 Esteban82 added the maintenance Boring but important stuff for the core devs label Sep 4, 2026
@Esteban82
Esteban82 self-requested a review September 4, 2026 13:52

@Esteban82 Esteban82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks fine.

@seisman
seisman merged commit 596256c into master Sep 5, 2026
10 of 13 checks passed
@seisman
seisman deleted the ci/cache branch September 5, 2026 01:17
Esteban82 added a commit that referenced this pull request Oct 7, 2026
* CI: Restore the server index files from the cache artifact instead of faking them

The gmt-cache artifact carries gmt_data_server.txt and gmt_hash_server.txt only
in server/, while GMT reads them from the root of ~/.gmt/static. Without them
the test run has to fetch the index live; whenever that fetch fails, which
happens on some runs and not others, auto_download is latched off and every
test that needs remote data fails. The blind touch from #9179 does not help:
it creates zero-byte indexes, which GMT rejects and deletes. Copy them up from
server/ and fail loudly if neither copy is usable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* CI: Make the gmt-cache artifact self-contained and fail when incomplete

Put the two index files at the root of the artifact, where GMT reads them,
so the test jobs no longer depend on fetching them live. Fail the job
instead of uploading a partial cache: retry while gmt reports missing files
(GMT <= 6.7 still exits 0 on a failed download), check the final layout,
and refuse to upload nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* CI: Try caching remote data without the #8437 workaround

As suggested in review: with GMT 6.7.0 and GMT_DATA_SERVER set to the name
"static", the data and cache files are written under ~/.gmt/static directly,
so the mv commands and the copy of the index files should not be needed.
Use the name instead of the URL, since a URL is not treated as a ghost server
and puts everything under ~/.gmt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* CI: Copy the hash index into server/ before gmt get -Dcache

gmt get -Dcache reads <USERDIR>/server/gmt_hash_server.txt (gmtget.c), but
GMT writes the hash index to <USERDIR>/, so without this copy it fails with
"Unable to access or read" even with the correct ~/.gmt/static layout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Revert the experiment with GMT_DATA_SERVER=static in the cache job

Reverts d1abd98 and f8eb213. With the name "static" the "Cache GMT data"
job downloads nothing ("Remote download is currently deactivated" from the
first dataset), as it did before #9223 switched to the URL. Restore the URL and
the mv workaround.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Re-apply the experiment with GMT_DATA_SERVER=static in the cache job

Reverts 72fc3f7. Review feedback is that the failed run was a temporary
connection problem and not an effect of d1abd98 and f8eb213, so try
them again.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

* Remove old workaround.

* Restore touch command

* Restore touch command in docker.yml and tests.yml, and add comment.

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants