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] Create dynamic logged in context field and clean up erroneous SessionManager context field uses #2648

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented Oct 22, 2024

Why

Noticed while reviewing another PR that the config command was using the session management context, when that context should only be necessary to use in login and logout commands.

Digging in a bit, it was needed because the command only required being logged in in a certain conditional codepath, but there was no context construct available to support this.

Ref: #2517
Ref: #2461

Closes ENG-13892.

How

  1. Add a new context field, DynamicLoggedIn, which requires log in but only when the context function is called.
  2. Change config command to use this.
  3. Change logged in contexts to also expose the authentication info so that session isn't needed in account:view command.

Test Plan

While both logged in and logged out:

neas account:view
neas config
neas config --eas-json-only

Copy link
Member Author

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

Join @wschurman and the rest of your teammates on Graphite Graphite

Copy link

github-actions bot commented Oct 22, 2024

Size Change: -2.72 kB (-0.01%)

Total Size: 53 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 53 MB -2.72 kB (-0.01%)

compressed-size-action

@wschurman wschurman marked this pull request as ready for review October 22, 2024 21:59
Copy link

github-actions bot commented Oct 22, 2024

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela
packages/eas-cli/src/commands/update/** @EvanBacon, @byCedric

Generated by CodeMention

@wschurman wschurman force-pushed the @wschurman/10-22-_eas-cli_create_dynamic_logged_in_context_field_and_clean_up_erroneous_sessionmanager_context_field_uses branch from 8b5a873 to 503c451 Compare October 22, 2024 22:01
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 10 lines in your changes missing coverage. Please review.

Project coverage is 53.01%. Comparing base (3139124) to head (7bc0cb1).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ommandUtils/context/DynamicLoggedInContextField.ts 45.46% 6 Missing ⚠️
...i/src/commandUtils/context/LoggedInContextField.ts 50.00% 1 Missing ⚠️
.../commandUtils/context/MaybeLoggedInContextField.ts 50.00% 1 Missing ⚠️
packages/eas-cli/src/commands/account/view.ts 0.00% 1 Missing ⚠️
packages/eas-cli/src/commands/config.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2648      +/-   ##
==========================================
- Coverage   53.01%   53.01%   -0.00%     
==========================================
  Files         566      567       +1     
  Lines       21637    21647      +10     
  Branches     4241     4242       +1     
==========================================
+ Hits        11469    11474       +5     
- Misses      10138    10143       +5     
  Partials       30       30              

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

Copy link

linear bot commented Oct 22, 2024

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 reasonable

@wschurman wschurman force-pushed the @wschurman/10-22-_eas-cli_create_dynamic_logged_in_context_field_and_clean_up_erroneous_sessionmanager_context_field_uses branch from 503c451 to 7bc0cb1 Compare October 23, 2024 15:51
Copy link

✅ Thank you for adding the changelog entry!

@wschurman wschurman merged commit a212662 into main Oct 23, 2024
7 checks passed
@wschurman wschurman deleted the @wschurman/10-22-_eas-cli_create_dynamic_logged_in_context_field_and_clean_up_erroneous_sessionmanager_context_field_uses branch October 23, 2024 15:52
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