ci: improve ci - #637
Conversation
This reverts commit b23d0c1.
| NEW_VERSION=$(cargo metadata --format-version 1 --no-deps --manifest-path wrappers/Cargo.toml | jq -r '.packages[] | select(.name == "wrappers") | .version') | ||
| echo "NEW_VERSION=${NEW_VERSION}" >> "$GITHUB_ENV" | ||
| cd wrappers && sudo env PATH="$PATH" RUSTUP_HOME="$HOME/.rustup" CARGO_HOME="$HOME/.cargo" PGRX_HOME="$HOME/.pgrx" cargo pgrx install \ | ||
| cd wrappers && cargo pgrx install --sudo \ |
There was a problem hiding this comment.
Using sudo only when copying the extension files to avoid making files to be cached owned by root which broken CI caching and slowed down the build.
| COPY . . | ||
| COPY requirements.txt . | ||
| RUN pip install -r requirements.txt | ||
| COPY . . |
There was a problem hiding this comment.
Optimize by depending the RUN ... step only on the requirements.txt file.
| with: | ||
| key: "" | ||
| prefix: true | ||
|
|
There was a problem hiding this comment.
Remove step which removed the cache slowing the builds.
There was a problem hiding this comment.
Pull request overview
This PR targets CI runtime improvements by making Docker builds more cache-friendly and simplifying the GitHub Actions workflow steps (notably around cache handling and privileged install behavior).
Changes:
- Reordered Python Dockerfile layers to copy/install
requirements.txtbefore the rest of the context to improve layer cache reuse. - Removed the “Delete All Caches” GitHub Actions step from the native test job.
- Updated the extension install step to use
cargo pgrx install --sudo(and removed the prior workaround that exposed the Rust toolchain tosudo).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| wrappers/dockerfiles/notion/Dockerfile | Improves Docker layer caching by separating dependency installation from app source copy. |
| wrappers/dockerfiles/logflare/Dockerfile | Same dependency-layer caching optimization as Notion’s Dockerfile. |
| .github/workflows/test_wrappers.yml | Simplifies CI steps by removing cache deletion and switching to cargo pgrx install --sudo for installs requiring privileges. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This PR improves CI run time by:
The overall times have come down from ~10 mins to ~5 mins.