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] pass server env when resolving fingerprint runtime version #2867

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

Kudo
Copy link
Contributor

@Kudo Kudo commented Feb 4, 2025

Why

receiving an issue for a customer who uses eas environment and continuous-deploy-fingerprint github action. they have build variants setup in their app.config.ts. the app id, scheme and some other properties are determined by their APP_VARIANT variable. the APP_VARIANT is from eas server environment.

when continuous-deploy-fingerprint first calculates fingerprint, it uses eas env:exec for the npx expo-updates fingerprint:generate call. the APP_VARIANT is correctly passed.
then for eas update call, it doesn't pass the APP_VARIANT env and generates an inconsistent fingerprint.

How

pass server env to the getRuntimeVersionInfoObjectsAsync() (npx expo-updates runtimeversion:resolve)

Test Plan

  1. my app.config.js
export default ({ config }) => {
  config.android.package = process.env.APP_VARIANT === 'staging' ? 'dev.expo.kudo.ooxx.staging' : 'dev.expo.kudo.ooxx.default';
  return config;
};
  1. adding APP_VARIANT=staging to my eas project
  2. running EXPO_DEBUG=1 eas update -m "update" --branch preview --environment production to check the expoConfig fingerprint source of "android.package" is dev.expo.kudo.ooxx.staging or dev.expo.kudo.ooxx.default'

Copy link

github-actions bot commented Feb 4, 2025

✅ Thank you for adding the changelog entry!

Copy link

github-actions bot commented Feb 4, 2025

Size Change: +2.94 kB (+0.01%)

Total Size: 53.4 MB

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

compressed-size-action

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 52.35%. Comparing base (077d8b3) to head (3270a27).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
packages/eas-cli/src/commands/update/index.ts 66.67% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2867      +/-   ##
==========================================
- Coverage   52.37%   52.35%   -0.02%     
==========================================
  Files         588      588              
  Lines       23114    23127      +13     
  Branches     4842     4846       +4     
==========================================
+ Hits        12103    12105       +2     
- Misses      10039    10048       +9     
- Partials      972      974       +2     

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

@Kudo Kudo marked this pull request as ready for review February 4, 2025 12:04
Copy link

github-actions bot commented Feb 4, 2025

Subscribed to pull request

File Patterns Mentions
**/* @szdziedzic, @khamilowicz, @sjchmiela, @radoslawkrzemien
packages/eas-cli/src/commands/update/** @wschurman, @quinlanj

Generated by CodeMention

@Kudo Kudo requested a review from wschurman February 4, 2025 12:05
Copy link

@ohri31 ohri31 left a comment

Choose a reason for hiding this comment

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

Looks good!

@wschurman wschurman requested a review from quinlanj February 4, 2025 16:18
@Kudo Kudo merged commit 28f3a92 into main Feb 4, 2025
11 checks passed
@Kudo Kudo deleted the @kudo/update-fingerprint-runtimeversion-serverenv branch February 4, 2025 16:30
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