-
Notifications
You must be signed in to change notification settings - Fork 96
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
[eas-cli] [ENG-9957] Don't overwrite distribution for simulator builds #2073
Merged
radoslawkrzemien
merged 24 commits into
main
from
@radoslawkrzemien/ENG-9957-dont-overwrite-distribution-for-simulator-builds
Jan 31, 2024
Merged
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
c48928b
[eas-cli] Update dependencies
radoslawkrzemien 7679dee
[eas-cli] Don't overwrite distribution
radoslawkrzemien 4b41ba2
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien de4712a
[eas-cli] Merge main
radoslawkrzemien 2dd7e3b
[eas-cli] Check for simulator flag
radoslawkrzemien c9d25b7
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien 35b99d7
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien f9b738a
[eas-cli] Update schema
radoslawkrzemien 4e1da63
[eas-cli] Add flag
radoslawkrzemien cf09ead
[eas-cli] Fix check
radoslawkrzemien 9e25d60
[eas-cli] Fix tests
radoslawkrzemien dfa81f3
[eas-cli] Add warning
radoslawkrzemien e19f1cb
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien 9b442e2
[eas-cli] Add description
radoslawkrzemien 7bc9744
[eas-cli] Add validation
radoslawkrzemien c15b9dd
[eas-cli] Change message
radoslawkrzemien 12895bd
[eas-cli] Replace string
radoslawkrzemien 935dcbc
[eas-cli] Remove redundant check
radoslawkrzemien 24156cd
[eas-cli] Update schema
radoslawkrzemien 1fce06f
[eas-cli] Update schema
radoslawkrzemien 59e7978
update CHANGELOG.md
radoslawkrzemien dd45591
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien 577edaa
Merge remote-tracking branch 'origin/main' into @radoslawkrzemien/ENG…
radoslawkrzemien 049f177
[eas-cli] Update schema
radoslawkrzemien File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,10 +26,7 @@ export async function collectMetadataAsync<T extends Platform>( | |||||
): Promise<Metadata> { | ||||||
const vcsClient = getVcsClient(); | ||||||
const channelOrReleaseChannel = await resolveChannelOrReleaseChannelAsync(ctx); | ||||||
const distribution = | ||||||
('simulator' in ctx.buildProfile && ctx.buildProfile.simulator | ||||||
? 'simulator' | ||||||
: ctx.buildProfile.distribution) ?? 'store'; | ||||||
const distribution = ctx.buildProfile.distribution ?? 'store'; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const metadata: Metadata = { | ||||||
trackingContext: ctx.analyticsEventProperties, | ||||||
...(await maybeResolveVersionsAsync(ctx)), | ||||||
|
@@ -64,6 +61,7 @@ export async function collectMetadataAsync<T extends Platform>( | |||||
buildMode: ctx.buildProfile.config ? BuildMode.CUSTOM : BuildMode.BUILD, | ||||||
customWorkflowName: ctx.customBuildConfigMetadata?.workflowName, | ||||||
developmentClient: ctx.developmentClient, | ||||||
simulator: 'simulator' in ctx.buildProfile && ctx.buildProfile.simulator, | ||||||
}; | ||||||
return sanitizeMetadata(metadata); | ||||||
} | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will break stuff like
eas build:run
🤔I'm wondering if altering the
distributionType
behavior is necessary 🤔.Maybe we can add some new field to Metadata to keep the raw
buildProfile.distribution
value there? I mean it's probably not optimal but I feel that this change can introduce some regressions in some parts of the codebase.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on why
eas build:run
would be broken by this?As for another field for "original distribution" or whatever we want to call it, I'm open for discussion but it feels to me like hacking around an existing hack (overwriting the distribution). I feel like we should remove the reliance on this hardcoded
simulator
value fordistribution
instead of building upon it, wdyt?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it runs a simulator build and fetches it by filtering by distribution = simulator.
Maybe it should handle both options (distribution = simulator or simulator = true) for a while instead of introducing another field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I concur, we should list builds with both
simulator: true
anddistribution: simulator
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's handled in https://github.com/expo/universe/pull/13524