Skip to content

feat(ci): use caching #23344

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

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

feat(ci): use caching #23344

wants to merge 20 commits into from

Conversation

thomasqueirozb
Copy link
Contributor

@thomasqueirozb thomasqueirozb commented Jul 7, 2025

Summary

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • cargo fmt --all
      • cargo clippy --workspace --all-targets -- -D warnings
      • cargo nextest run --workspace (alternatively, you can run cargo test --all)
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run cargo vdev build licenses to regenerate the license inventory and commit the changes (if any). More details here.

@thomasqueirozb thomasqueirozb added domain: ci Anything related to Vector's CI environment no-changelog Changes in this PR do not need user-facing explanations in the release changelog labels Jul 7, 2025
@github-actions github-actions bot removed the domain: ci Anything related to Vector's CI environment label Jul 7, 2025
@github-actions github-actions bot added the domain: ci Anything related to Vector's CI environment label Jul 7, 2025
@pront pront requested a review from Copilot July 7, 2025 18:21
Copilot

This comment was marked as outdated.

@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Jul 7, 2025

Datadog Report

Branch report: ci-cache
Commit report: 9b596f3
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 18.91s Total Time

@thomasqueirozb thomasqueirozb force-pushed the ci-cache branch 3 times, most recently from e44855a to 098bf7a Compare July 8, 2025 13:15
@pront pront requested a review from Copilot July 8, 2025 14:33
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

/ci-run-all

Copy link
Contributor

@Copilot Copilot AI left a comment

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 introduces caching for the CI environment setup to speed up job execution and reduce redundant tool installations.

  • Updated prepare.sh to install cargo-deb v2.0.2.
  • Added a wrapper workflow (.github/workflows/cache.yml) that calls a composite cache action.
  • Integrated the cache action into the int_tests and e2e_tests jobs in changes.yml.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
scripts/environment/prepare.sh Bumped cargo-deb install version from 2.0.0 to 2.0.2
.github/workflows/changes.yml Added ensure-cache job and injected cache steps into tests
.github/workflows/cache.yml New wrapper workflow to invoke the cache action
.github/actions/cache/action.yml Composite action to pull, check, and bootstrap cached tools
Comments suppressed due to low confidence (2)

.github/actions/cache/action.yml:41

  • Using a magic dummy path (/tmp/i-do-not-exist) for cache existence checks can be confusing. Consider replacing it with a clearly named temporary directory or adding a comment to explain its purpose, improving readability and maintainability.
          ~/.rustup

.github/workflows/cache.yml:7

  • [nitpick] The on.push.paths trigger covers changes to prepare.sh and the cache action, but not the workflow definition itself. Consider adding '.github/workflows/cache.yml' so updates to the wrapper workflow also trigger cache validation.
      - './.github/actions/cache/**'

@pront pront force-pushed the master branch 4 times, most recently from 1720078 to ffe54be Compare July 10, 2025 15:43
@thomasqueirozb thomasqueirozb removed the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Jul 14, 2025
@thomasqueirozb thomasqueirozb added meta: awaiting author Pull requests that are awaiting their author. no-changelog Changes in this PR do not need user-facing explanations in the release changelog and removed meta: awaiting author Pull requests that are awaiting their author. labels Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: ci Anything related to Vector's CI environment no-changelog Changes in this PR do not need user-facing explanations in the release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants