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] Remove random branch name generation for --auto branch name non-vcs fallback #2747

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Dec 7, 2024

Why

https://exponent-internal.slack.com/archives/C06EFBQK3B7/p1732217583248979

We should never be defaulting to a random branch name for an EAS Update. This would have disastrous consequences for usability and our interfaces, as well as for publishes and channel-branch mappings.

For workflows, this problem is more in the foreground since there's no VCS on the workflow runner.

Closes ENG-14314.

How

Remove fallback, throw an descriptive error when needed.

Test Plan

Run neas update --auto in a directory that doesn't have vcs (remove .git folder). See other error indicating that VCS is required.

Run neas branch:create, see that there's no default suggestion in the prompt.

$ neas update --auto
It looks like you haven't initialized the git repository yet.
EAS requires you to use a git repository for your project.
✔ Would you like us to run 'git init' in <dir> for you? … no
A git repository is required for building your project. Initialize it and run this command again.
    Error: update command failed.

$ neas branch:create
✖ Provide a branch name:

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Dec 7, 2024

Size Change: +1.35 kB (0%)

Total Size: 53.4 MB

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

compressed-size-action

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

Attention: Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 52.51%. Comparing base (751d3d1) to head (eaa9784).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/project/publish.ts 0.00% 5 Missing ⚠️
packages/eas-cli/src/branch/utils.ts 50.00% 1 Missing ⚠️
packages/eas-cli/src/commands/branch/create.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2747      +/-   ##
==========================================
- Coverage   52.52%   52.51%   -0.00%     
==========================================
  Files         583      583              
  Lines       22572    22576       +4     
  Branches     4445     4447       +2     
==========================================
  Hits        11854    11854              
- Misses      10683    10687       +4     
  Partials       35       35              

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

Copy link

linear bot commented Dec 7, 2024

@wschurman wschurman marked this pull request as ready for review December 7, 2024 00:30
Copy link

github-actions bot commented Dec 7, 2024

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela, @radoslawkrzemien

Generated by CodeMention

@wschurman wschurman force-pushed the @wschurman/12-06-_eas-cli_remove_random_branch_name_generation_for_--auto_branch_name_non-vcs_fallback branch from 96ac085 to 0092ef8 Compare December 7, 2024 00:31
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 to me

@wschurman wschurman force-pushed the @wschurman/12-06-_eas-cli_remove_random_branch_name_generation_for_--auto_branch_name_non-vcs_fallback branch from 0092ef8 to eaa9784 Compare December 10, 2024 16:55
Copy link

✅ Thank you for adding the changelog entry!

@wschurman wschurman merged commit 3740ee4 into main Dec 10, 2024
7 checks passed
@wschurman wschurman deleted the @wschurman/12-06-_eas-cli_remove_random_branch_name_generation_for_--auto_branch_name_non-vcs_fallback branch December 10, 2024 16:56
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