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

Cache Invalidation Issue in CI/CD Pipeline (Jenkins) - Inconsistent Hash Value #17917

Closed
1 of 4 tasks
shivom2k opened this issue Jul 3, 2023 · 1 comment · Fixed by #17926 or #18020
Closed
1 of 4 tasks

Cache Invalidation Issue in CI/CD Pipeline (Jenkins) - Inconsistent Hash Value #17917

shivom2k opened this issue Jul 3, 2023 · 1 comment · Fixed by #17926 or #18020
Assignees

Comments

@shivom2k
Copy link

shivom2k commented Jul 3, 2023

Current Behavior

I am encountering an issue with cache invalidation while running tasks in my CI/CD pipeline using Jenkins with the Nx workspace. The problem specifically relates to the inconsistent hash value of the cache, leading to unexpected behavior during the pipeline execution. even after replaying the same pipeline-build without doing any single change, cache is invalidated as hash value is changing

Expected Behavior

The cache should be utilized effectively during the pipeline run, allowing for faster execution times by reusing previously cached results where possible.

GitHub Repo

No response

Steps to Reproduce

  1. Configure Jenkins to run the Nx tasks in the CI/CD pipeline.
  2. Execute the pipeline and observe the cache behavior.

Nx Report

npm  : 9.5.1
   
   nx               : 15.7.0
   @nrwl/jest       : 15.9.4
   @nrwl/linter     : 15.9.4
   @nrwl/workspace  : 15.7.0
   @nrwl/angular    : 15.9.4
   @nrwl/cli        : 15.7.0
   @nrwl/cypress    : 15.9.4
   @nrwl/devkit     : 15.9.4
   @nrwl/js         : 15.9.4
   @nrwl/tao        : 15.7.0
   @nrwl/webpack    : 15.9.4
   typescript       : 4.9.5
   ---------------------------------------
   Community plugins:
   @ngrx/effects              : 15.3.0
   @ngrx/store                : 15.3.0
   @nx/webpack                : 16.2.1
   rxjs                       : 6.6.7
   @ng-bootstrap/ng-bootstrap : 14.0.1
   @ngrx/store-devtools       : 15.3.0
   @reef/fwk                  : 4.0.7
   ngx-build-plus             : 15.0.0

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

  1. I have observed that the cache behavior in my local development environment is working as expected, with consistent and
    valid hash values.
  2. The cache invalidation issue only arises when running the pipeline in the CI/CD environment using Jenkins.
  3. The problem occurs consistently across multiple pipeline runs.
skrtheboss added a commit to skrtheboss/nx that referenced this issue Jul 3, 2023
…inistic way

External dependency hashes were not deterministic and could cause cache misses,
since the hash was dependent on which task was hashed when.
This was caused by the externalDepsHashCache which was filled with values which are
dependent on the visited set.

Fixes nrwl#17917
@meeroslav meeroslav self-assigned this Jul 4, 2023
skrtheboss added a commit to skrtheboss/nx that referenced this issue Jul 4, 2023
…inistic way

External dependency hashes were not deterministic and could cause cache misses,
since the hash was dependent on which task was hashed when.
This was caused by the externalDepsHashCache which was filled with values which are
dependent on the visited set.

Fixes nrwl#17917
skrtheboss added a commit to skrtheboss/nx that referenced this issue Jul 5, 2023
…inistic way

External dependency hashes were not deterministic and could cause cache misses,
since the hash was dependent on which task was hashed when.
This was caused by the externalDepsHashCache which was filled with values which are
dependent on the visited set.

Fixes nrwl#17917
@github-actions
Copy link

github-actions bot commented Aug 5, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.