Skip to content

fix(hadron-build, compass): restore Isolated and Readonly special behavior in packaged application COMPASS-8129 #6147

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

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Aug 21, 2024

When we separated Compass compilation process from the app packaging, we stopped passing correct environment to the compile script, which lead to webpack config not setting environment correctly when bundling the assets. This turned both Compass isolated and readonly into "normal" editions even though the installer and the binary were still branded correctly.

This patch fixes the issue by being more explicit in where and how we set the expected env variable, I also modified the Target class, the main source of this information right now, that is used during build and compilation to not have an unsafe default anymore and throw if HADRON_DISTRIBUTION variable was not provided, this should ensure we don't accidentally break it anymore

@gribnoysup gribnoysup force-pushed the compass-8129-fix-hadron-distribution branch from 0ee5301 to 3c3b9cd Compare August 21, 2024 09:40
exports.builder = {
nodejs_version: {
describe: 'What version of node.js is required for this app?',
default: '^7.4.0'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Drive-by, just caught my eye how out of date this was, so I removed this script too

@@ -405,7 +406,7 @@ functions:
<<: *compass-env
DEBUG: ${debug}
npm_config_loglevel: ${npm_loglevel}
COMPASS_DISTRIBUTION: ${compass_distribution}
HADRON_DISTRIBUTION: ${compass_distribution}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it back to HADRON_ because otherwise it's hard to search through the code for all occurences, I'm totally up for changing this to COMPASS_ at some point, but we should probably do this for all the mentions of hadron

@gribnoysup gribnoysup merged commit 9a9b2bb into main Aug 21, 2024
26 of 27 checks passed
@gribnoysup gribnoysup deleted the compass-8129-fix-hadron-distribution branch August 21, 2024 14:10
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.

3 participants