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

[eas-cli] [ENG-8973] Use selected builds profile name if not specified #2101

Conversation

radoslawkrzemien
Copy link
Contributor

@radoslawkrzemien radoslawkrzemien commented Oct 25, 2023

Why

https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile

How

Moved the archive selection before any submit options are determined, and if the archive is selected from EAS then the profile in the submission context is refreshed to use the submit profile with same name as the name of the build profile in the archive (if exists)

Test Plan

Added automated tests and checked parts of the process manually

When corresponding build profile does not exist
Screenshot 2023-10-25 at 19 11 06
Screenshot 2023-10-25 at 19 10 07
Screenshot 2023-10-25 at 19 10 23

When user calls `eas submit` command without specified profile name, the command used to default to `production` profile. If the user then selects one of their builds from EAS which was built with another build profile, then using the `production` submit profile may be confusing. Now, after selecting the build from EAS, command checks if a corresponding submit profile with the same name as seleted build's build profile exists, and if so uses that submit profile

See: https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile
Added tests for IosSubmitCommand and AndroidSubmitCommand checking what params are passed to SubmissionMutation when user selects build from EAS and corresponding submit profile exists/does not exist

See: https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile
@linear
Copy link

linear bot commented Oct 25, 2023

ENG-8973 eas submit doesn't use ASC configuration from selected build profile

If you don't specify a profile when running eas submit, and pick a build from the website, it would make sense (to me) that it would use the corresponding submit profile from eas.json.

However, it ignores it. This is counterintuitive.

My suggestion would be that if a build is picked from the website, to use that profile for the ASC configuration.

@radoslawkrzemien
Copy link
Contributor Author

/changelog-entry new-feature Use corresponding submit profile when selecting build from EAS

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Size Change: +5.23 kB (0%)

Total Size: 42.6 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 42.6 MB +5.23 kB (0%)

compressed-size-action

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #2101 (2a390cd) into main (fe710d0) will increase coverage by 0.06%.
The diff coverage is 86.96%.

@@            Coverage Diff             @@
##             main    #2101      +/-   ##
==========================================
+ Coverage   54.14%   54.20%   +0.06%     
==========================================
  Files         509      509              
  Lines       18624    18652      +28     
  Branches     3922     3933      +11     
==========================================
+ Hits        10083    10108      +25     
- Misses       7854     7857       +3     
  Partials      687      687              
Files Coverage Δ
packages/eas-cli/src/commands/submit.ts 32.73% <ø> (ø)
...ges/eas-cli/src/submit/android/AndroidSubmitter.ts 100.00% <100.00%> (ø)
packages/eas-cli/src/submit/context.ts 100.00% <ø> (ø)
packages/eas-cli/src/submit/ios/IosSubmitter.ts 78.19% <100.00%> (-0.76%) ⬇️
...eas-cli/src/submit/android/AndroidSubmitCommand.ts 79.52% <86.67%> (-0.21%) ⬇️
packages/eas-cli/src/submit/commons.ts 75.76% <84.62%> (+20.76%) ⬆️
...ackages/eas-cli/src/submit/ios/IosSubmitCommand.ts 79.13% <85.72%> (+0.11%) ⬆️

Just noticed that if the user does specify the profile and then selects the build from EAS, that specified profile would then be overwritten by the profile corresponding with the one from selected build. This shouldn't be the case and this commit fixes that

See: https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile
Added tests for cases when matching submit profile exists for selected build but the user explicitly specifies another profile when calling the command

See: https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile
Function should not be called when user specifies the profile name so the message is adjusted to not include such a case

See: https://linear.app/expo/issue/ENG-8973/eas-submit-doesnt-use-asc-configuration-from-selected-build-profile
@github-actions
Copy link

✅ Thank you for adding the changelog entry!

Copy link
Member

@szdziedzic szdziedzic left a comment

Choose a reason for hiding this comment

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

Looks good!

@radoslawkrzemien radoslawkrzemien merged commit 5bf7f27 into main Oct 26, 2023
9 checks passed
@radoslawkrzemien radoslawkrzemien deleted the @radoslawkrzemien/ENG-8973-use-selected-builds-profile-name-if-not-specified branch October 26, 2023 13:20
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