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

Update dockerfile for parcel/watcher package fix #110

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Nov 27, 2023

What does this PR do / why we need it

This PR tries to fix the issue with @parcel/watcher package and the node-gyp dependency. The issue comes from the 2.0.4 of the watcher package. This is a known issue which has been fixed here nrwl/nx#19751. As a result in order to have a full fix of this issue we might need to update to nx 17.1.3.

As the update of nx dep might require a fair amount of changes to the package.json of the project, as a temporary solution we can add overrides to the package.json in order to use the version 2.1.0.

Another required step is to install gcc, make and python3 deps.

More info about the fixes can be found here: parcel-bundler/watcher#156 (comment) & here: nrwl/nx#19457

Other than that, the fix also introduces an ENV var in order to allow users to run the build_viewer.sh script with for specific architectures. This way people running on silicon can choose a different arch.

Which issue(s) does this PR fix

Fixes devfile/api#1356

PR acceptance criteria

  • Unit Tests
  • E2E Tests
  • Documentation
    Update the sidebar if there is a new file added or an existing filename is changed

How to test changes / Special notes to the reviewer

In order to reproduce it to a non-silicon environment I've tried to run:

ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR=$ABSOLUTE_PATH/..

docker buildx build --platform linux/arm64 --no-cache -t registry-viewer $BUILD_DIR \
    --build-arg PROJECT_NAME=registry-viewer \
    --build-arg NEXT_PUBLIC_BASE_PATH=${NEXT_PUBLIC_BASE_PATH:-"/viewer"}

@thepetk thepetk self-assigned this Nov 27, 2023
@thepetk thepetk requested review from Jdubrick and removed request for elsony November 27, 2023 13:50
@thepetk thepetk marked this pull request as draft November 27, 2023 13:51
@thepetk
Copy link
Contributor Author

thepetk commented Nov 27, 2023

@Jdubrick could you check if this workaround resolves the issue you are facing with apple silicon?

@Jdubrick
Copy link
Contributor

I mentioned in the main issue for this that the changes weren't able to fully solve the issue and I was still receiving a 139 error code on the yarn --frozen-lockfile stage. I think these proposed changes however may be a step in the right direction as I feel there is multiple layers of issues here. I'm going to do some more tinkering with this to see if I can get it working.

@thepetk
Copy link
Contributor Author

thepetk commented Nov 28, 2023

I mentioned in the main issue for this that the changes weren't able to fully solve the issue and I was still receiving a 139 error code on the yarn --frozen-lockfile stage. I think these proposed changes however may be a step in the right direction as I feel there is multiple layers of issues here. I'm going to do some more tinkering with this to see if I can get it working.

@Jdubrick yeah I agree. Might be not only one issue and I'm pretty sure we will find it again in the future. Although I'd suggest to merge a fix specifically for your case as atm we only know of this issue for the silicon case.

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Copy link

openshift-ci bot commented Nov 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maysunfaisal, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thepetk thepetk merged commit 163464e into devfile:main Dec 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devfile-web build process throwing errors
3 participants