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

Use SEA for test executable instead of pkg #6242

Merged
merged 3 commits into from
May 16, 2024
Merged

Conversation

dlon
Copy link
Member

@dlon dlon commented May 10, 2024

Since the latter is deprecated.

Fix DES-949.


This change is Reviewable

@dlon dlon requested a review from raksooo May 10, 2024 12:53
Copy link

linear bot commented May 10, 2024

DES-949 Replace PKG

@dlon dlon force-pushed the update-test-executable-pack branch from cc123e6 to 541c8fd Compare May 10, 2024 13:40
@dlon dlon marked this pull request as ready for review May 10, 2024 15:34
@dlon dlon force-pushed the update-test-executable-pack branch 2 times, most recently from dce25fa to 59c50a7 Compare May 13, 2024 13:47
Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 8 of 10 files at r1.
Reviewable status: 7 of 10 files reviewed, 3 unresolved discussions (waiting on @dlon)


.github/workflows/desktop-e2e.yml line 248 at r1 (raw file):

        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          node-version: 20

We should use the node-version-file in this workflow as well! This workflow must have been forgotten when we switched to Volta 🤔


.github/workflows/translations.yml line 29 at r1 (raw file):

        uses: actions/setup-node@v4
        with:
          node-version: ${{ steps.volta.outputs.node }}

We should use the node-version-file here as well!


gui/standalone-tests.ts line 79 at r1 (raw file):

  if (process.platform === 'darwin') {
    child_process.spawnSync('/usr/bin/codesign', ['--sign', '-', nodeBin]);

Do we really need to sign it? When I ran the hello example on my mac it worked fine without a signature?

@dlon dlon force-pushed the update-test-executable-pack branch from 59c50a7 to 767b41a Compare May 13, 2024 13:55
Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 6 of 10 files reviewed, 4 unresolved discussions (waiting on @raksooo)


.github/workflows/translations.yml line 29 at r1 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

We should use the node-version-file here as well!

Done.


.github/workflows/translations.yml line 34 at r2 (raw file):

      - name: Update NPM
        run: npm i -g npm@${{ steps.volta.outputs.npm }}

Do you know why we explicitly updated npm here? I suspect it's unnecessary, but I might be wrong.


gui/standalone-tests.ts line 79 at r1 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

Do we really need to sign it? When I ran the hello example on my mac it worked fine without a signature?

I had to sign it. Otherwise, macOS would kill the process. I think this requirement is stricter on arm Macs.

@dlon dlon force-pushed the update-test-executable-pack branch from 70f82fc to 49d73cd Compare May 13, 2024 14:09
Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 6 of 10 files reviewed, 4 unresolved discussions (waiting on @raksooo)


.github/workflows/desktop-e2e.yml line 248 at r1 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

We should use the node-version-file in this workflow as well! This workflow must have been forgotten when we switched to Volta 🤔

Done.


.github/workflows/translations.yml line 34 at r2 (raw file):

Previously, dlon (David Lönnhager) wrote…

Do you know why we explicitly updated npm here? I suspect it's unnecessary, but I might be wrong.

It might be that we were using the wrong npm (somewhere in PATH). shell: bash seemed to fix this.

@dlon dlon changed the base branch from main to disable-electron-publish May 13, 2024 20:47
@dlon dlon force-pushed the update-test-executable-pack branch 3 times, most recently from 1cb72f2 to 145b3c2 Compare May 14, 2024 08:27
@dlon dlon force-pushed the disable-electron-publish branch from 249fd66 to af67e2d Compare May 14, 2024 11:35
Base automatically changed from disable-electron-publish to main May 14, 2024 11:37
@dlon dlon force-pushed the update-test-executable-pack branch from 145b3c2 to 1aa48a1 Compare May 14, 2024 13:08
Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r3, 2 of 2 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dlon)


.github/workflows/translations.yml line 34 at r2 (raw file):

Previously, dlon (David Lönnhager) wrote…

It might be that we were using the wrong npm (somewhere in PATH). shell: bash seemed to fix this.

I'm pretty sure we updated NPM because we don't always use the npm version corresponding to the Node version installed. But maybe that is solved automatically now with node-version-file.


gui/standalone-tests.ts line 79 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I had to sign it. Otherwise, macOS would kill the process. I think this requirement is stricter on arm Macs.

Okay 👍


gui/scripts/build-test-executable.sh line 29 at r5 (raw file):

    local temp_output="./build/temp-test-executable$bin_suffix"
    local output="../dist/app-e2e-tests-$PRODUCT_VERSION-$TARGET$bin_suffix"
    local node_copy_path="./build/test/node$bin_suffix"

We probably shouldn't put anything like node in the build directory. I think it will be packaged into the Electron app by electron-builder 🤔

@dlon dlon force-pushed the update-test-executable-pack branch 4 times, most recently from 2620525 to c31fa91 Compare May 14, 2024 13:50
Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @raksooo)


gui/scripts/build-test-executable.sh line 29 at r5 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

We probably shouldn't put anything like node in the build directory. I think it will be packaged into the Electron app by electron-builder 🤔

Done.

Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @dlon)


gui/scripts/build-test-executable.sh line 38 at r6 (raw file):

    cp "$node_path" "$node_copy_path"
    # shellcheck disable=SC2068
    tar -czf ./build/test/assets.tar.gz ${ASSETS[@]}

This should go in $temp_dir as well right?

Copy link
Member Author

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @raksooo)


gui/scripts/build-test-executable.sh line 38 at r6 (raw file):

Previously, raksooo (Oskar Nyberg) wrote…

This should go in $temp_dir as well right?

Preferably not, since the asset path needs to be specified in standalone-tests.sea.json.

Copy link
Member

@raksooo raksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r6, 1 of 1 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dlon)

@dlon dlon force-pushed the update-test-executable-pack branch from 2526dac to 48a8bf9 Compare May 16, 2024 14:29
Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 9 of 10 files reviewed, 1 unresolved discussion (waiting on @dlon and @raksooo)

@dlon dlon force-pushed the update-test-executable-pack branch from 48a8bf9 to 236c0a8 Compare May 16, 2024 14:43
@dlon dlon merged commit 57253b3 into main May 16, 2024
23 of 24 checks passed
@dlon dlon deleted the update-test-executable-pack branch May 16, 2024 14:47
@raksooo raksooo mentioned this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants