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 File type environment variables #2512

Conversation

khamilowicz
Copy link
Contributor

@khamilowicz khamilowicz commented Aug 21, 2024

Why

User should be able to upload files to environment variables and read content of those files

How

  • When an envvar is created with flag --type FILE, selected file is encoded to base64 and sent to www.
  • EnvVarQueries return file contents when includeFileContent file is passed
  • env:get automatically include file content, env:list requires --include-file-content flag
  • Updated environment display - added environments, type and visibility

Test Plan

tested manually, updated tests

Copy link

linear bot commented Aug 21, 2024

Copy link

github-actions bot commented Aug 21, 2024

Size Change: +8.15 kB (+0.02%)

Total Size: 52.9 MB

Filename Size Change
./packages/eas-cli/dist/eas-linux-x64.tar.gz 52.9 MB +8.15 kB (+0.02%)

compressed-size-action

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 64.35644% with 36 lines in your changes missing coverage. Please review.

Project coverage is 53.12%. Comparing base (3f83276) to head (62f3817).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/utils/variableUtils.ts 36.85% 8 Missing and 4 partials ⚠️
packages/eas-cli/src/commands/env/update.ts 73.81% 9 Missing and 2 partials ⚠️
...i/src/graphql/queries/EnvironmentVariablesQuery.ts 14.29% 6 Missing ⚠️
packages/eas-cli/src/commands/env/create.ts 70.59% 4 Missing and 1 partial ⚠️
packages/eas-cli/src/prompts.ts 0.00% 1 Missing ⚠️
packages/eas-cli/src/utils/prompts.ts 83.34% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2512      +/-   ##
==========================================
+ Coverage   53.09%   53.12%   +0.03%     
==========================================
  Files         563      564       +1     
  Lines       21399    21474      +75     
  Branches     4390     4427      +37     
==========================================
+ Hits        11360    11405      +45     
- Misses       9201     9224      +23     
- Partials      838      845       +7     
Flag Coverage Δ
53.12% <64.36%> (+0.03%) ⬆️

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-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from c9cb3bd to a4ea882 Compare August 21, 2024 13:17
@khamilowicz khamilowicz changed the base branch from main to piotrekszeremeta/eng-11920-add-eas-envinit August 21, 2024 13:27
@khamilowicz khamilowicz changed the base branch from piotrekszeremeta/eng-11920-add-eas-envinit to main August 21, 2024 13:27
@khamilowicz khamilowicz added the no changelog PR that doesn't require a changelog entry label Aug 26, 2024
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from a4ea882 to 3db0bb5 Compare September 27, 2024 10:08
@khamilowicz khamilowicz changed the base branch from main to piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split_split_split_split_split September 27, 2024 10:08
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split_split_split_split_split branch from 673e296 to 2c88996 Compare September 27, 2024 10:18
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from 3db0bb5 to bf02d6f 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_split_split_split_split_split branch from 2c88996 to f764418 Compare September 27, 2024 10:30
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from bf02d6f to cc3de5f 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_split_split_split_split_split branch from f764418 to 5cf60fc Compare September 27, 2024 10:43
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from cc3de5f to 9a20a52 Compare September 27, 2024 10:43
@khamilowicz khamilowicz marked this pull request as ready for review September 27, 2024 10:47
@khamilowicz khamilowicz requested review from radoslawkrzemien and removed request for sjchmiela and radoslawkrzemien September 27, 2024 10:48
packages/eas-cli/README.md Outdated Show resolved Hide resolved
@khamilowicz khamilowicz changed the base branch from piotrekszeremeta/eng-13525-eas-cli-should-support-multiple-environments-for-envvars_split_split_split_split_split_split_split_split_split_split_split to graphite-base/2512 October 1, 2024 09:01
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from 9a20a52 to 5efd133 Compare October 1, 2024 09:03
Copy link

github-actions bot commented Oct 1, 2024

CodeMention:

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

@khamilowicz khamilowicz changed the base branch from graphite-base/2512 to main October 1, 2024 09:04
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from 5efd133 to 6cfa43b Compare October 1, 2024 09:04
@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch from 6cfa43b to 62f3817 Compare October 1, 2024 09:30
Copy link

github-actions bot commented Oct 1, 2024

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

@khamilowicz khamilowicz requested a review from szdziedzic October 1, 2024 09:34
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, let's get it released in hidden state and test it 👍

@@ -34,6 +37,7 @@ type CreateFlags = {
value?: string;
link?: boolean;
force?: boolean;
type?: 'string' | 'file';
Copy link
Member

Choose a reason for hiding this comment

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

nit: if we use it in multiple places maybe it's worth extracting it to a type and importing it? 🤔

@khamilowicz khamilowicz merged commit 02022d8 into main Oct 15, 2024
11 checks passed
@khamilowicz khamilowicz deleted the piotrekszeremeta/eng-12331-update-eas-cli-commands-to-support-file-type-env-vars branch October 15, 2024 08:57
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