Skip to content

Move environment from metadata to job object#2777

Merged
khamilowicz merged 1 commit into
mainfrom
piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata
Jan 30, 2025
Merged

Move environment from metadata to job object#2777
khamilowicz merged 1 commit into
mainfrom
piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata

Conversation

@khamilowicz

@khamilowicz khamilowicz commented Dec 18, 2024

Copy link
Copy Markdown
Contributor

Why

ENG-14307: move environment to job object from metadata

Environment should be considering a first class citizen in job object instead of being stored in the metadata.

How

  • Pass environment in job object
  • remove environment from metadata.

Test Plan

  1. Start a build specifying environment in eas.json.
  2. Build should use the specified environment (check on website in Build details)

@linear

linear Bot commented Dec 18, 2024

Copy link
Copy Markdown

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata branch from f5a90ba to 30dde74 Compare January 23, 2025 13:32
@khamilowicz khamilowicz added the no changelog PR that doesn't require a changelog entry label Jan 23, 2025 — with Graphite App
@github-actions

github-actions Bot commented Jan 23, 2025

Copy link
Copy Markdown

Size Change: +1.79 kB (0%)

Total Size: 53.4 MB

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

compressed-size-action

@codecov

codecov Bot commented Jan 23, 2025

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 52.99%. Comparing base (01ce802) to head (b70bacb).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/build/utils/environment.ts 44.45% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2777      +/-   ##
==========================================
+ Coverage   52.62%   52.99%   +0.37%     
==========================================
  Files         584      585       +1     
  Lines       22638    22680      +42     
  Branches     4467     4723     +256     
==========================================
+ Hits        11910    12016     +106     
+ Misses      10694     9735     -959     
- Partials       34      929     +895     

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

@khamilowicz khamilowicz marked this pull request as ready for review January 23, 2025 13:44
@github-actions

Copy link
Copy Markdown

Subscribed to pull request

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

Generated by CodeMention

Comment thread packages/eas-cli/src/build/utils/environment.ts Outdated
if (buildProfileEnvironment && isEnvironment(buildProfileEnvironment)) {
return buildProfileEnvironment;
}
return null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If a user specifies an invalid value in environment, shouldn't we throw an error and ask him to fix it instead of falling back to defaults?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

eas-json already takes care of this:

image.png

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata branch from 30dde74 to 90ed39a Compare January 27, 2025 16:18
@khamilowicz khamilowicz requested a review from sjchmiela January 27, 2025 16:19
Comment thread packages/eas-cli/src/build/utils/environment.ts Outdated
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
selectedImage: ctx.buildProfile.image,
customNodeVersion: ctx.buildProfile.node,
environment: ctx.buildProfile.environment,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Interesting, we didn't require any mapping before. How did it work?

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata branch from 90ed39a to b70bacb Compare January 29, 2025 16:18
@github-actions

Copy link
Copy Markdown

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

@szdziedzic szdziedzic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good

@khamilowicz khamilowicz merged commit 3159550 into main Jan 30, 2025
@khamilowicz khamilowicz deleted the piotrekszeremeta/eng-14307-move-environment-to-job-object-from-metadata branch January 30, 2025 09:31
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.

3 participants