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

next Images Failing to Build #4254

Closed
bryanculver opened this issue Aug 11, 2023 · 8 comments
Closed

next Images Failing to Build #4254

bryanculver opened this issue Aug 11, 2023 · 8 comments
Assignees
Labels
type: bug Something isn't working as expected

Comments

@bryanculver
Copy link
Member

Proposed Changes

Get next images building successfully again: https://github.com/nautobot/nautobot/actions/runs/5836298578/job/15831142881

Justification

Looks like something might have gotten broken with either the Dockerfile changes, or some merges of PRs into nautobot-ui.

@bryanculver bryanculver added the type: bug Something isn't working as expected label Aug 11, 2023
@glennmatthews
Copy link
Contributor

Probably this:

#37 2437.6 npm ERR! - Generating chakra theme typings
#37 2437.6 npm ERR! ✖ An error occurred
#37 2437.6 npm ERR! Error: @swc/core threw an error when attempting to validate swc compiler options.
#37 2437.6 npm ERR! You may be using an old version of swc which does not support the options used by ts-node.
#37 2437.6 npm ERR! Try upgrading to the latest version of swc.
#37 2437.6 npm ERR! Error message from swc:
#37 2437.7 npm ERR! invalid type: unit value, expected a boolean
#37 2437.7 npm ERR! Error: @swc/core threw an error when attempting to validate swc compiler options.
#37 2437.7 npm ERR! You may be using an old version of swc which does not support the options used by ts-node.
#37 2437.7 npm ERR! Try upgrading to the latest version of swc.
#37 2437.7 npm ERR! Error message from swc:
#37 2437.7 npm ERR! invalid type: unit value, expected a boolean
#37 2437.7 npm ERR!     at createVariant (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/transpilers/swc.ts:262:13)
#37 2437.7 npm ERR!     at createSwcOptions (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/transpilers/swc.ts:211:25)
#37 2437.7 npm ERR!     at create (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/transpilers/swc.ts:56:41)
#37 2437.7 npm ERR!     at createTranspiler (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/index.ts:784:16)
#37 2437.7 npm ERR!     at createTranspileOnlyGetOutputFunction (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/index.ts:1341:28)
#37 2437.7 npm ERR!     at createFromPreloadedConfig (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/index.ts:1404:34)
#37 2437.7 npm ERR!     at create (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/index.ts:624:10)
#37 2437.7 npm ERR!     at Object.register (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/ts-node/src/index.ts:591:15)
#37 2437.7 npm ERR!     at readTheme (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js:49:12)
#37 2437.7 npm ERR!     at run (/opt/nautobot/.npm/_cacache/tmp/git-cloneoJGCzW/node_modules/@chakra-ui/cli/dist/scripts/read-theme-file.worker.js:96:23)
#37 2437.7 npm ERR! ERROR: "theme" exited with 1.

@bryanculver
Copy link
Member Author

Looks like it was broken before ejecting: https://github.com/nautobot/nautobot/actions/runs/5822891389/job/15790845824

@HanlinMiao
Copy link
Contributor

Just going through github actions, I think this might be the first time this error occurred? https://github.com/nautobot/nautobot/actions/runs/5547072565/job/15027117876

@bryanculver
Copy link
Member Author

@gsnider2195
Copy link
Contributor

Based on some very limited research this may be related to the arm64 build so we should probably try to replicate on amd64 and arm64 as part of the initial discovery.

@gsnider2195 gsnider2195 self-assigned this Aug 14, 2023
@gsnider2195
Copy link
Contributor

It looks like we started seeing this failure on July 13th with this CI run https://github.com/nautobot/nautobot/actions/runs/5547072565/job/15027117876

Here are the changes to the package.json shortly before this started failing:

1b9fdd8

diff --git a/nautobot/ui/package.json b/nautobot/ui/package.json
index bd662eb08..10c1a6694 100644
--- a/nautobot/ui/package.json
+++ b/nautobot/ui/package.json
@@ -63,7 +63,10 @@
     "devDependencies": {
         "@chakra-ui/cli": "^2.3.0",
         "@craco/craco": "^7.1.0",
-        "prettier": "^2.8.7",
+        "eslint": "^8.44.0",
+        "eslint-config-react-app": "^7.0.1",
+        "markdownlint-cli": "^0.35.0",
+        "prettier": "^2.8.8",
         "react-app-alias": "^2.2.2",
         "react-app-alias-ex": "^2.1.0",
         "source-map-explorer": "^2.5.3"

23ecb95

diff --git a/nautobot/ui/package.json b/nautobot/ui/package.json
index 9c0d45081..bd662eb08 100644
--- a/nautobot/ui/package.json
+++ b/nautobot/ui/package.json
@@ -4,6 +4,7 @@
     "private": true,
     "proxy": "http://nautobot:8080",
     "dependencies": {
+        "@chakra-ui/icons": "^2.0.0",
         "@chakra-ui/react": "^2.5.1",
         "@emotion/react": "^11.10.5",
         "@emotion/styled": "^11.10.5",

c2a1ac6

diff --git a/nautobot/ui/package.json b/nautobot/ui/package.json
index 617d3e587..9c0d45081 100644
--- a/nautobot/ui/package.json
+++ b/nautobot/ui/package.json
@@ -1,6 +1,6 @@
 {
     "name": "nautobot",
-    "version": "2.0.0-alpha.1",
+    "version": "2.0.0-beta.2",
     "private": true,
     "proxy": "http://nautobot:8080",
     "dependencies": {

@gsnider2195
Copy link
Contributor

It appears we're encountering a problem similar to these issues:

I suspect we're running into issues with the caches for arm64 and amd64 getting intermingled so our fix may be to disable the /opt/nautobot/.npm cache or add the TARGETARCH variable to the path.

@gsnider2195
Copy link
Contributor

After more research I've concluded that the slowness of the builds is causing the buildkit garbage collection to clobber our npm cache directory during the npm install steps. As a workaround I've opened PR #4265 to remove the cache mount entirely from the dockerfile until we can resolve the slow build times in CI.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants