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

Refactor env:update, add tests #2586

Conversation

khamilowicz
Copy link
Contributor

@khamilowicz khamilowicz commented Sep 20, 2024

Why

ENG-13525: Update EAS-CLI for new EnvVar features

Rework the EnvironmentVariableUpdate function - user is able to alter name, and environments.

How

  • Added --variable-name and --variable-environment parameters to identify the variable to update
  • Using parameters from --name and --environment to update the variable using the new updateEnvironmentVariable method.

All commands that were using name parameter to identify a single variable will use variable-name and variable-environment instead. This change will enable user to distinguish between name and environment that is identifying variable that is acted upon, and name and environment that is a parameter for command.

For example, when the user wants to update variable TEST that has environment production and change its name and change its environment, they can use:

eas env:update --variable-name TEST --variable-environment production --name TEST-update --environment production --environment preview

Test Plan

Added tests

Copy link

linear bot commented Sep 20, 2024

Copy link

github-actions bot commented Sep 20, 2024

Size Change: -500 B (0%)

Total Size: 52.9 MB

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

compressed-size-action

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from a0f1412 to 7de87c5 Compare September 20, 2024 11:33
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 7dacc37 to 8351549 Compare September 20, 2024 11:33
@khamilowicz khamilowicz added the no changelog PR that doesn't require a changelog entry label Sep 20, 2024 — with Graphite App
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 7de87c5 to 6f8dad2 Compare September 20, 2024 15:35
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 8351549 to 686de52 Compare September 20, 2024 15:35
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 6f8dad2 to 304bd96 Compare September 20, 2024 16:11
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 686de52 to cf96d31 Compare September 20, 2024 16:11
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 304bd96 to 4bbeae4 Compare September 20, 2024 16:54
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch 3 times, most recently from f3e7c08 to e039833 Compare September 20, 2024 17:16
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 89.13043% with 5 lines in your changes missing coverage. Please review.

Project coverage is 52.75%. Comparing base (37a68c5) to head (960757d).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/env/update.ts 88.89% 4 Missing ⚠️
packages/eas-cli/src/utils/prompts.ts 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2586      +/-   ##
==========================================
+ Coverage   51.87%   52.75%   +0.89%     
==========================================
  Files         563      563              
  Lines       21303    21354      +51     
  Branches     4348     4371      +23     
==========================================
+ Hits        11049    11264     +215     
+ Misses       9366     9242     -124     
+ Partials      888      848      -40     
Flag Coverage Δ
52.75% <89.14%> (+0.89%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 4bbeae4 to f6c69d9 Compare September 23, 2024 09:26
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e039833 to b34acbb Compare September 23, 2024 09:26
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from f6c69d9 to c110713 Compare September 23, 2024 09:43
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from b34acbb to 2818467 Compare September 23, 2024 09:43
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from ff8d302 to e4ec1a0 Compare September 23, 2024 10:37
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 3b540ac to 16a0fe8 Compare September 23, 2024 10:37
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from e4ec1a0 to 91cebca Compare September 23, 2024 13:01
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 16a0fe8 to 076b630 Compare September 23, 2024 13:01
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 91cebca to fd9e830 Compare September 23, 2024 13:19
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 076b630 to ef1335b Compare September 23, 2024 13:19
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from fd9e830 to 6208199 Compare September 24, 2024 10:16
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from ef1335b to 855b3ce Compare September 24, 2024 10:16
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 6208199 to 3091bf1 Compare September 24, 2024 11:06
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 855b3ce to e3dfd4d Compare September 24, 2024 11:06
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 3091bf1 to 30de1cb Compare September 24, 2024 11:13
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e3dfd4d to e8b7509 Compare September 24, 2024 11:13
@khamilowicz khamilowicz marked this pull request as ready for review September 25, 2024 12:32
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 30de1cb to 6ef64f6 Compare September 27, 2024 10:18
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from e8b7509 to 4311ded Compare September 27, 2024 10:18
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split branch from 6ef64f6 to 11957c3 Compare September 27, 2024 10:30
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from 4311ded to b4d4ac6 Compare September 27, 2024 10:30
Copy link
Contributor Author

khamilowicz commented Oct 1, 2024

Merge activity

  • Oct 1, 4:35 AM EDT: @khamilowicz started a stack merge that includes this pull request via Graphite.
  • Oct 1, 4:53 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 1, 4:54 AM EDT: @khamilowicz merged this pull request with Graphite.

@khamilowicz khamilowicz changed the base branch from piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split to graphite-base/2586 October 1, 2024 08:49
@khamilowicz khamilowicz changed the base branch from graphite-base/2586 to main October 1, 2024 08:51
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch from b4d4ac6 to 960757d Compare October 1, 2024 08:52
Copy link

github-actions bot commented Oct 1, 2024

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Copy link

github-actions bot commented Oct 1, 2024

CodeMention:

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

@khamilowicz khamilowicz merged commit 58d2088 into main Oct 1, 2024
7 checks passed
@khamilowicz khamilowicz deleted the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split branch October 1, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog PR that doesn't require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants