Skip to content
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

#81/bug/fix cache problem #104

Merged
merged 18 commits into from
May 18, 2024
Merged

Conversation

YoshikiKubotani
Copy link
Collaborator

@YoshikiKubotani YoshikiKubotani commented May 1, 2024

Issue URL

close #81

Change overview

  • Split the existing workflow into two; one for running lint and test, the other for providing cache
  • Remove the registry cache as we do not use built images multiple times in a single workflow
  • Update all actions' version to the latest
  • Use docker/bake-action instead of running the raw docker buildx bake command

How to test

I conducted experiments on a forked repository, so please refer to it for verification. The experiment details and checklist for each item are as follows:

  1. First, prepare the base branch cache-BuildCache-only.

See this pull request for the result below.

  1. Make an appropriate edit on the test/create-first-cache branch and observe the behavior of the lint-and-test workflow when a pull request is created against the cache-BuildCache-only branch.

    • In the lint-and-test workflow, the build is performed without using cache.
    • No cache is created.
  2. Observe the behavior of the cache workflow when test/create-first-cache is merged into the cache-BuildCache-only branch.

    • In the cache workflow, the build process runs to cache the build cache.
    • Cache is created on the base branch.

See this pull request for the result below.

  1. Make an appropriate edit on the test/use-existing-cache branch and observe the behavior of the lint-and-test workflow when a pull request is created against the cache-BuildCache-only branch.

    • In the lint-and-test workflow, the build is performed using cache.
    • The workflow's execution time is reduced compared to 2.
    • No cache is created.
  2. Observe the behavior of the cache workflow when test/use-existing-cache is merged into the cache-BuildCache-only branch.

    • In the cache workflow, almost all processing is skipped since build cache already exists.
    • No cache is created.

See this pull request for the result below.

  1. Edit environments/ci/docker-compose.yaml on the test/create-another-cache branch and observe the behavior of the lint-and-test workflow when a pull request is created against the cache-BuildCache-only branch.

    • In the lint-and-test workflow, the build is performed without using the existing cache due to changes in environment-related files.
    • No cache is created.
  2. Observe the behavior of the cache workflow when test/create-another-cache is merged into the cache-BuildCache-only branch.

    • In the cache workflow, the build process runs to cache the new build cache.
    • Cache is created on the base branch.

Note for reviewers

Note

As the cache will be removed in 7 days if not used, please check the result as soon as possible.

@YoshikiKubotani YoshikiKubotani added the bug Something isn't working label May 1, 2024
@YoshikiKubotani YoshikiKubotani self-assigned this May 1, 2024
Copy link
Contributor

@gatheluck gatheluck left a comment

Choose a reason for hiding this comment

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

Sorry for my late review! LGTM!!

@YoshikiKubotani YoshikiKubotani merged commit 1cdc1fa into develop May 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI cache is not used when a new PR is created
2 participants