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-10146] Allow submission of builds in progress #2543

Conversation

radoslawkrzemien
Copy link
Contributor

@radoslawkrzemien radoslawkrzemien commented Sep 10, 2024

Why

https://linear.app/expo/issue/ENG-10146/fr-add-option-to-trigger-auto-submit-while-waiting-for-build-to

How

When using --latest or selecting a build from a list when prompted, now the builds in-progress, in-queue and new are returned as well. All results are then sorted in decreasing order by createdAt and up to limit (4) are returned to the user to pick from

Test Plan

Added tests for the function listing the builds

Manual tests

Creating a build

Screenshot 2024-09-10 at 15 47 45

In-progress build is returned when listing available builds. The description now includes the status as well, to differentiate between the builds in-progress and finished

Screenshot 2024-09-10 at 15 48 01

The finished builds are also returned

Screenshot 2024-09-10 at 15 48 09

Selecting in-progress build creates the submission

Screenshot 2024-09-10 at 15 48 23

Created submission on the website

Screenshot 2024-09-10 at 15 48 54

When prompting the user with a list of builds the in-progress builds are now returned first

See: https://linear.app/expo/issue/ENG-10146/fr-add-option-to-trigger-auto-submit-while-waiting-for-build-to
When prompting the user with a list of builds the build status is now displayed let the user know which are finished and which are still in progress

See: https://linear.app/expo/issue/ENG-10146/fr-add-option-to-trigger-auto-submit-while-waiting-for-build-to
Copy link

linear bot commented Sep 10, 2024

@radoslawkrzemien
Copy link
Contributor Author

/changelog-entry new-feature Allow submitting builds in progress

Copy link

github-actions bot commented Sep 10, 2024

Size Change: +577 B (0%)

Total Size: 52.9 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 52.9 MB +577 B (0%)

compressed-size-action

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.

One general question:

When a submission is created during a build command with --auto-submit it enters special waiting mode on our backend and is only put in the queue when we receive an update from Turtle in WWW that the build is finished or canceled when it fails. Will it behave here the same way? Or is it put in the queue straight away?

@radoslawkrzemien
Copy link
Contributor Author

@szdziedzic As far as I can tell it behaves exactly the same way - waiting for the build to finish first
Screenshot 2024-09-10 at 16 35 27

@radoslawkrzemien
Copy link
Contributor Author

/changelog-entry new-feature Allow submitting builds in progress

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.13%. Comparing base (a7f939f) to head (45b91ac).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2543      +/-   ##
==========================================
+ Coverage   52.09%   52.13%   +0.04%     
==========================================
  Files         559      559              
  Lines       21102    21110       +8     
  Branches     4316     4317       +1     
==========================================
+ Hits        10992    11003      +11     
+ Misses       9232     9229       -3     
  Partials      878      878              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

good job, it generally looks good 🚀, although I think we should also allow to submit new and in-queue builds as well

appId,
limit,
offset: 0,
filter: {
platform,
distribution: DistributionType.Store,
status: BuildStatus.Finished,
status: BuildStatus.InProgress,
Copy link
Member

Choose a reason for hiding this comment

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

What about NEW and IN_QUEUE builds? I believe we should handle submitting these as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see why not, I'll add them

packages/eas-cli/src/submit/utils/builds.ts Show resolved Hide resolved
Query returning the potential builds for submission now also returns build in `new` and `in-queue` statuses. All builds are then sorted decreasingly by `createdAt` and up to `limit` are returned

See: https://linear.app/expo/issue/ENG-10146/fr-add-option-to-trigger-auto-submit-while-waiting-for-build-to
…-10146_allow_submission_of_builds_in_progress

# Conflicts:
#	CHANGELOG.md
@@ -368,6 +369,7 @@ function formatBuildChoice(build: BuildFragment): prompts.Choice {
? chalk.bold(message.length > 200 ? `${message.slice(0, 200)}...` : message)
: null,
},
{ name: 'Status', value: status.replace('_', ' ').toLowerCase() },
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: i'd rather have a mapping Record<status, description>

@radoslawkrzemien
Copy link
Contributor Author

@szdziedzic any further feedback?

…-10146_allow_submission_of_builds_in_progress

# Conflicts:
#	CHANGELOG.md
Copy link

✅ Thank you for adding the changelog entry!

@radoslawkrzemien radoslawkrzemien merged commit dadf58f into main Sep 16, 2024
9 checks passed
@radoslawkrzemien radoslawkrzemien deleted the @radoslawkrzemien/ENG-10146_allow_submission_of_builds_in_progress branch September 16, 2024 09:38
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.

3 participants