ci: set typos action to v1 tag#15
Merged
Merged
Conversation
The cache guard checked ~/.pgrx/pg18/ but pgrx installs to ~/.pgrx/18.2/, so the check always failed and Postgres was compiled from source on every run despite a cache hit. Use a glob to match the actual install path. Also key the cache on the pgrx version instead of the full Cargo.lock hash, since ~/.pgrx only changes when the pgrx or Postgres major version changes.
Avoid duplicating the version string across the install step and the cache key. A single env.PGRX_VERSION variable makes future version bumps a one-line change.
pgrx::Uuid is always 16 bytes, so the length check and InvalidInput error variant were unreachable. Also replace the if-let block with the ? operator and use expect for the infallible UTF-8 conversion of base62 output.
Skip the ~2.5 minute cargo install on cache hits by caching ~/.cargo/bin/cargo-pgrx with a version-based key.
Remove InvalidInput error variant from AGENTS.md and pin cargo-pgrx version in README install instructions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ci: set typos action to v1 tag
ci: pin cargo-pgrx version to match Cargo.toml
ci: fix pgrx cache to avoid rebuilding Postgres
The cache guard checked ~/.pgrx/pg18/ but pgrx installs to
~/.pgrx/18.2/, so the check always failed and Postgres was
compiled from source on every run despite a cache hit. Use a
glob to match the actual install path.
Also key the cache on the pgrx version instead of the full
Cargo.lock hash, since ~/.pgrx only changes when the pgrx or
Postgres major version changes.
Avoid duplicating the version string across the install step
and the cache key. A single env.PGRX_VERSION variable makes
future version bumps a one-line change.
Bump pgrx from 0.16.1 to 0.17.0
Simplify base62_encode and remove dead code
pgrx::Uuid is always 16 bytes, so the length check and
InvalidInput error variant were unreachable. Also replace
the if-let block with the ? operator and use expect for the
infallible UTF-8 conversion of base62 output.
We have now three caches that are hit perfectly:
That's ~8 minutes of compilation saved on every cached run.