Visitar URL original
GH-1393: Cache the downloaded test models between CI runs by rzo1 · Pull Request #1444 · apache/opennlp · GitHub
Skip to content

GH-1393: Cache the downloaded test models between CI runs - #1444

Merged
rzo1 merged 2 commits into
mainfrom
fix/ci-cache-models
Oct 8, 2026
Merged

rzo1 merged 2 commits into
mainfrom
fix/ci-cache-models

Conversation

@rzo1

@rzo1 rzo1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

The CI build now downloads the test models to ~/.opennlp-ci instead of each module's target folder, so mvn clean no longer removes them. That folder is kept in the GitHub Actions cache, keyed per operating system and the ud-models-1.3 model set, so a run with a warm cache does not depend on the model host. Local builds are not affected.

Made by @krickert

Fixes #1393

@rzo1 rzo1 added this to the 3.0.0 milestone Oct 8, 2026
@rzo1 rzo1 self-assigned this Oct 8, 2026
@mawiesne mawiesne added github_actions Pull requests that update GitHub Actions code build Pull requests that update the build chain. improvement Enhancement of existing behavior (Jira: Improvement) labels Oct 8, 2026

@mawiesne mawiesne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thx for the fine PR, it's a good improvement! +1

@rzo1

rzo1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Looking into the SF failures now.

@rzo1

rzo1 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

The failures came from the test download helpers creating <home>/.opennlp with File#mkdir, which silently does nothing when the download home itself (here a fresh ~/.opennlp-ci on a cache miss) does not exist yet. Previously the home was target/, which always existed. 35cd31f switches the helpers to Files#createDirectories; production DownloadUtil already did this.

krickert and others added 2 commits October 8, 2026 13:38
… home

The test download helpers used File#mkdir, which fails silently when the
configured download home itself does not exist yet, e.g. a fresh
~/.opennlp-ci on a CI cache miss. Use Files#createDirectories instead.
@rzo1
rzo1 force-pushed the fix/ci-cache-models branch from 35cd31f to 9a47fee Compare October 8, 2026 11:38
@rzo1
rzo1 merged commit e039a7f into main Oct 8, 2026
10 checks passed
@krickert
krickert deleted the fix/ci-cache-models branch October 11, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Pull requests that update the build chain. github_actions Pull requests that update GitHub Actions code improvement Enhancement of existing behavior (Jira: Improvement)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI downloads every test model on every run, so model host resets fail the build

3 participants