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 not storing output artifacts in CI environment (using powerpack-shared-fs-cache) #29495

Closed
2 of 4 tasks
gabrielbryk opened this issue Dec 31, 2024 · 1 comment
Closed
2 of 4 tasks

Comments

@gabrielbryk
Copy link

Current Behavior

When using powerpack-shared-fs-cache in a CI environment (or with CI=1), the cache system:

  • Creates entries in shared.db correctly
  • Stores terminal outputs successfully
  • Creates output asset folders
  • Does not persist output artifacts in the folders
  • (When testing locally) Briefly creates output files but immediately deletes them

Expected Behavior

The powerpack-shared-fs-cache should:

  • Properly store and persist output artifacts in CI environments
  • Maintain cached files in the designated folders
  • Behave consistently between local and CI environments

GitHub Repo

Not sure how to do this as it is reliant on a paid feature (powerpack)

Steps to Reproduce

  1. Set up a project using NX with powerpack-shared-fs-cache
  2. Configure cache settings in nx.json
  3. Set environment variable CI=1
  4. Run a build command that generates output artifacts
  5. Observe that while the cache entries are created, the output artifacts are not persisted

Nx Report

Node           : 22.8.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.15.2

nx (global)        : 20.1.3
nx                 : 20.3.0
@nx/js             : 20.3.0
@nx/jest           : 20.3.0
@nx/eslint         : 20.3.0
@nx/workspace      : 20.3.0
@nx/cypress        : 20.3.0
@nx/devkit         : 20.3.0
@nx/esbuild        : 20.3.0
@nx/eslint-plugin  : 20.3.0
@nx/nest           : 20.3.0
@nx/node           : 20.3.0
@nx/react          : 20.3.0
@nx/vite           : 20.3.0
@nx/web            : 20.3.0
@nx/webpack        : 20.3.0
typescript         : 5.7.2

---------------------------------------
Nx Powerpack
Licensed to ******* for 5 users in 1 workspace until 11/24/2025

@nx/powerpack-shared-fs-cache  : 1.1.1

---------------------------------------
Registered Plugins:
@nx/vite/plugin
@nx/eslint/plugin
@nx/cypress/plugin
@nx/webpack/plugin
@nx/jest/plugin
---------------------------------------
Community plugins:
@nxlv/python : 20.3.

Failure Logs

Package Manager Version

No response

Operating System

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

Additional Information

  • Cache behavior works correctly in local environment without CI=1
  • Documentation doesn't mention any limitations for CI environments
  • The issue appears to be specific to file artifacts, as terminal outputs are cached correctly
  • Observed temporary file creation before deletion suggests a potential cleanup mechanism interfering with cache persistence
@gabrielbryk
Copy link
Author

This issue was resolved in the new @nx/powerpack-shared-fs-cache v1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant