Skip to content

ci: improve ci - #637

Merged
imor merged 6 commits into
mainfrom
rs/improve-ci
Aug 18, 2026
Merged

ci: improve ci#637
imor merged 6 commits into
mainfrom
rs/improve-ci

Conversation

@imor

@imor imor commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This PR improves CI run time by:

  • Removing unnecessary cache delete step.
  • Adding docker file caching and reducing docker file dependencies to only requirement.txt file where applicable.
  • Fixing broken Rust cache due to root user owning the files to cache, which stopped the files from being copied into the cache.

The overall times have come down from ~10 mins to ~5 mins.

@imor imor changed the title ci: improve ci by removing unecessary cache delete step ci: improve ci Aug 18, 2026
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 \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 . .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Optimize by depending the RUN ... step only on the requirements.txt file.

with:
key: ""
prefix: true

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Remove step which removed the cache slowing the builds.

@imor
imor marked this pull request as ready for review August 18, 2026 07:14
Copilot AI lite review requested due to automatic review settings August 18, 2026 07:14

Copilot AI 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.

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.txt before 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 to sudo).

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.

@imor
imor merged commit 2a1cb01 into main Aug 18, 2026
12 checks passed
@imor
imor deleted the rs/improve-ci branch August 18, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants