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 env node for all IS_DEV_BUILD CI assignments #1007

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

mokagio
Copy link
Contributor

@mokagio mokagio commented Mar 5, 2025

Related issues

Proposed Changes

Always use env: IS_DEV_BUILD: true in CI to set the IS_DEV_BUILD env var.

In #998 (comment) I got confirmation that it's okay to use this approach for the env var setting.

Given it's already in use, because it would not work otherwise, in the Windows steps, this commit updates all the other steps so we have a consistent setup.

Testing Instructions

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors? – N.A.

In #998 (comment)
I got confirmation that it's okay to use this approach for the env var
setting.

Given it's already in use, because it would not work otherwise, in the
Windows steps, this commit updates all the other steps so we have a
consistent setup.
@@ -67,6 +66,7 @@ steps:
env:
# See https://playwright.dev/docs/ci#debugging-browser-launches
DEBUG: "pw:browser"
IS_DEV_BUILD: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mmm... in the E2E on the mac queue, IS_DEV_BUILD is true in the environment tab, but the build process mustn't be reading it as such, because the Sentry log check reads "production"

See bottom of the list here:
image

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given the packaging steps below correctly send the env var to the Mac VM, my current guess is that the issue here has to do with how the E2E tests are scripted.

Will look into it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Odd... If I run with IS_DEV_BUILD=true on my local, I get sentry development as expected.

image

Also had to export DEBUG=pw:browser" to see the sentry logs.

cc @wojtekn any ideas?

Copy link
Contributor

Choose a reason for hiding this comment

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

The variable is read in the Electron app via process.env.IS_DEV_BUILD to decide whether Sentry should be initialized or not. It seems that when the environment variable is set in env: section, it's not available in the Studio process launched by E2E.

If we want to remove it from the command section, what if we set it explicitly in the package.json where we define e2e script? We do the same for other environment variables with other scripts there.

@@ -113,6 +111,8 @@ steps:

echo "--- 📃 Notarizing Binary"
bundle exec fastlane notarize_binary
env:
IS_DEV_BUILD: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay in universal

image

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay in x64

image

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay in arm64
image

image

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.

2 participants