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

NX DTE not uploading cached results for @nx-tools/nx-container for nextjs #18783

Closed
1 of 4 tasks
FaresKi opened this issue Aug 22, 2023 · 2 comments
Closed
1 of 4 tasks

Comments

@FaresKi
Copy link

FaresKi commented Aug 22, 2023

Current Behavior

I'm not exactly sure if it's a bug or not.

I'm currently using the @nx-tools/nx-container generator to build Docker images out of my apps in my repo.

The "container" generator uses the build generator, originally provided by nx. It requires to run build, and tests, and linting...etc.

That being said, the building is cached thru DTE, and works accordingly. However, the cache isn't uploaded to the CI, and thus the Dockerfile, when fetching the /.next folder, can't find it since the build was cached and thus not executed.

Is there a way to upload the cached results, or not?

Expected Behavior

I would like to be able to upload the cached results to reuse them with other generators.

GitHub Repo

No response

Steps to Reproduce

  1. Generate a nextjs app thru nx
  2. Install the nx-tooling/nx-container above
  3. cache the production build in nx cloud
  4. try to build containers using that cache

Nx Report

Node   : 18.15.0
   OS     : darwin-x64
   pnpm   : 8.6.12
   
   nx (global)        : 16.5.0
   nx                 : 16.6.0
   @nx/js             : 16.6.0
   @nx/jest           : 16.7.0
   @nx/linter         : 16.6.0
   @nx/workspace      : 16.6.0
   @nx/cypress        : 16.7.2
   @nx/eslint-plugin  : 16.6.0
   @nx/next           : 16.6.0
   @nx/react          : 16.7.0
   @nrwl/tao          : 16.5.0
   nx-cloud           : 16.3.0
   typescript         : 5.1.6
   ---------------------------------------
   Community plugins:
   @nx-tools/nx-container : 5.0.3
   ---------------------------------------
   Local workspace plugins:
         @sahl-apps/email-tooling
         @sahl-apps/data-access
         @sahl-apps/zod-types
         @sahl-apps/logger

Failure Logs

>  NX   Running target container for 3 projects and 7 tasks they depend on:

    - sahl-admin-dashboard
    - sahl-showcase-site
    - sahl

> nx run sahl-showcase-site:build:production  [remote cache]
...
[Dockerfile]: ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref i4cj9sxklw2vr2b7ryba6kcd2::g176vuli380pkuys0qon1yief: "/apps/sahl-showcase-site/.next": not found
> nx run sahl:build:production  [remote cache]
...
[Dockerfile]: ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref i4cj9sxklw2vr2b7ryba6kcd2::wk9w78ilbdsrdh4o7rgc8p17s: "/apps/sahl/.next": not found
> nx run sahl-admin-dashboard:build:production (works as expected)
...

Operating System

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

Additional Information

No response

@FrozenPandaz
Copy link
Collaborator

I'm going to close this as a duplicate of gperdomor/nx-tools#877 for now.

Hopefully they can help you. If not, feel free to open another issue here.

@github-actions
Copy link

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 Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants