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

[ENG-11076][eas-cli] prompt user to map channel on update if unmapped #2185

Closed
wants to merge 2 commits into from

Conversation

quinlanj
Copy link
Member

Why

When an update is created with the channel flag, it will error if the channel is not mapped to a branch.

> eas update --channel main
Channel has no branches associated with it. Run 'eas channel:edit' to map a branch

This PR allows the user to select the branch to map in this case:

>  eas-dev update --channel blah
Channel has no branches associated with it.
✔ Which branch would you like blah to point at? › gh/quinlanj/3/orig

Test Plan

  • amended test to expect new behaviour

Copy link

linear bot commented Jan 18, 2024

Copy link

github-actions bot commented Jan 18, 2024

Size Change: -365 B (0%)

Total Size: 50.2 MB

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

compressed-size-action

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e9064b7) 54.11% compared to head (377c7a9) 54.12%.

Files Patch % Lines
...li/src/update/getBranchNameFromChannelNameAsync.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2185      +/-   ##
==========================================
+ Coverage   54.11%   54.12%   +0.02%     
==========================================
  Files         516      516              
  Lines       18815    18822       +7     
  Branches     3771     3771              
==========================================
+ Hits        10179    10185       +6     
- Misses       8615     8616       +1     
  Partials       21       21              

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

@quinlanj
Copy link
Member Author

/changelog-entry chore prompt user to map channel on update if unmapped

Copy link

✅ Thank you for adding the changelog entry!

@wschurman
Copy link
Member

wschurman commented Jan 18, 2024

It feels awkward to me that we allow creating an update with just a channel flag since updates are associated with branches instead of channels. I assume the channel flag was added as a convenience flag for singly-mapped channel-branch combinations?

edit: PR that added it makes it seem like this behavior might have been intentional: #1567
cc @jonsamp

@wschurman
Copy link
Member

I guess my other worry is that this might be too heavy of an operation for people to comprehend what is being done. By pointing an existing channel at an existing branch, any other/existing builds with that channel will now receive compatible updates on that branch. I worry that people running a simple eas update command may not comprehend the potential magnitude of such an operation and may just answer "yes" out of habit, which could have unintended consequences in production.

Copy link
Member

@wschurman wschurman left a comment

Choose a reason for hiding this comment

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

Requesting changes for now to put it back in your queue to assess.

@quinlanj
Copy link
Member Author

@wschurman you raise a really good point in #2185 (comment) . People will have to select a branch to map to a channel (they don't reply y), but I agree someone could just be pressing the Return key out of habit, not expecting that some variant of eas update would change the mapping of their channel.

Closing this PR to retain the original behaviour.

@quinlanj quinlanj closed this Jan 19, 2024
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