Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Cache gmt_hash_server.txt and gmt_data_server.txt files #3020

Merged
merged 5 commits into from
Jan 27, 2024
Merged

Conversation

seisman
Copy link
Member

@seisman seisman commented Jan 27, 2024

gmt_data_server.txt and gmt_hash_server.txt are two files needed for GMT remote files. These two files were located in the ~/.gmt/server directory for GMT<=6.4, but since GMT 6.5, these two files are in the ~/.gmt/ directory.

Comment on lines +80 to +81
~/.gmt/gmt_data_server.txt
~/.gmt/gmt_hash_server.txt
Copy link
Member

Choose a reason for hiding this comment

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

Aren't these files supposed to be downloaded automatically?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally yes, but old GMT versions may fail to download these files on GitHub Actions (see https://github.com/GenericMappingTools/pygmt/actions/runs/7619206138/job/20751859452):

Error: ession [ERROR]: Read error first record in file /home/runner/.gmt/server/gmt_data_server.txt
Error: ession [ERROR]: Deleting /home/runner/.gmt/server/gmt_data_server.txt so it can get regenerated - please try again
Error: h [ERROR]: Unable to open file /home/runner/.gmt/server/gmt_data_server.txt
Error: h [ERROR]: Libcurl Error: HTTP response code said error
Warning: [WARNING]: You can turn remote file download off by setting GMT_DATA_UPDATE_INTERVAL to "off"
Error: h [ERROR]: File earth_relief_01d_p not found!

Copy link
Member

Choose a reason for hiding this comment

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

Ah got it, so this is needed for the GMT legacy tests (using GMT 6.3.0 and 6.4.0). I see that the path has changed from ~/.gmt/server/gmt_data_server.txt to ~/.gmt/gmt_data_server.txt

Copy link
Member

Choose a reason for hiding this comment

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

Do we need to copy ~/.gmt/gmt_data_server.txt to ~/.gmt/server/gmt_data_server.txt though for the GMT Legacy tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need to copy ~/.gmt/gmt_data_server.txt to ~/.gmt/server/gmt_data_server.txt though for the GMT Legacy tests?

My local tests tell me that we have to. Will do it now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 49178fc and the same error is gone in the GMT Legacy Tests workflow (https://github.com/GenericMappingTools/pygmt/actions/runs/7677658040/job/20926661680?pr=3020).

@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog labels Jan 27, 2024
@seisman seisman added this to the 0.11.0 milestone Jan 27, 2024
@seisman seisman merged commit 39950f8 into main Jan 27, 2024
20 of 21 checks passed
@seisman seisman deleted the cache-data branch January 27, 2024 11:23
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 skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants