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

Support pushing existing secret and sensitive variables #2765

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

khamilowicz
Copy link
Contributor

Why

ENG-14486: Support updating secret variables with eas env:push

#2753

Currently, we don't support adding secrets using the eas env:push command. However, this behavior conflicts with the legacy eas secrets:push command, forcing some users to either convert their secrets to public variables or prefix them with EXPO_SENSITIVE. This pull request addresses this issue by enabling users to update existing secret or sensitive variables without any additional work.

Additionally, the --force option has been added to skip prompts.

Also, an unintended behavior has been fixed: pushing variables would overwrite the existing environments field of eas variables instead of appending to it. If a user has defined a variable in multiple environments and then pushes it to just one, the variable will only be linked to that specific environment.

How

  • A boolean force flag has been added.
  • If a variable from the .env file is already present in eas, its visibility and environments are preserved.

Test Plan

Tested manually

Copy link

linear bot commented Dec 12, 2024

Copy link

Subscribed to pull request

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

Generated by CodeMention

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14486-support-updating-secret-vars-with-eas-envpush branch from 8e43bb3 to d2418ef Compare December 12, 2024 15:43
@khamilowicz
Copy link
Contributor Author

/changelog-entry bug-fix Support pushing existing secret and sensitive environment variables

@khamilowicz khamilowicz changed the title Support pushing to existing secret and sensitive variables Support pushing existing secret and sensitive variables Dec 12, 2024
Copy link

github-actions bot commented Dec 12, 2024

Size Change: +6.39 kB (+0.01%)

Total Size: 53.4 MB

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

compressed-size-action

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 4.34783% with 22 lines in your changes missing coverage. Please review.

Project coverage is 52.49%. Comparing base (1c964d2) to head (422485f).

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/env/push.ts 4.35% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2765      +/-   ##
==========================================
- Coverage   52.50%   52.49%   -0.00%     
==========================================
  Files         583      583              
  Lines       22584    22590       +6     
  Branches     4450     4450              
==========================================
+ Hits        11855    11856       +1     
- Misses      10694    10699       +5     
  Partials       35       35              

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

Copy link
Contributor Author

/changelog-entry bug-fix Support pushing existing secret and sensitive environment variables

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14486-support-updating-secret-vars-with-eas-envpush branch from d2418ef to 42bcb23 Compare December 13, 2024 11:10
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14486-support-updating-secret-vars-with-eas-envpush branch from 42bcb23 to 422485f Compare December 13, 2024 11:23
Copy link

✅ Thank you for adding the changelog entry!

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.

1 participant