Skip to content

[eas-json] Allow extending with multiple build and submit profiles #2987

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

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

Conversation

khamilowicz
Copy link
Contributor

@khamilowicz khamilowicz commented Apr 14, 2025

Why

ENG-14628: Add ability to extend multiple build profiles in eas.json

#2664

It would be beneficial for users to be able to create more granular build profiles and then compose them into their specific use cases. This can be achieved by allowing specifying multiple profiles that are used for extending current profile:

{
   "build": {
        "parent1": {},
        "parent2": {},
        "development": {
            "extends": ["parent1", "parent2"]
        }
    }
}

How

  • Allow extending profiles with multiple parents
  • The order of parents determines the precedence of profiles' configs.

Test Plan

Added tests.

Manual testing:

One of the ways to test this feature is to create an iOS build using a eas.json file with a similar content:

    "test": {
      "env": {
        "THIS_IS": "test"
      },
    },
    "base": {
      "env": {
        "THIS_IS": "base"
      },
    },
    "development": {
      "extends": [
        "test",
        "base"
      ],
      "env": {
        "THIS_IS": "development"
      },
    },
 }
  1. Test for various combinations of extends and the environment variable presence. Verify in logs which variable is used for which combination.
  2. The precedence should be the following:
  • variable defined in the current profile (development)
  • variable defined in the first specified parent
  • variable defined in the second specified parent

Copy link

linear bot commented Apr 14, 2025

@khamilowicz khamilowicz force-pushed the piotrekszeremeta/eng-14628-add-ability-to-extend-multiple-build-profiles-in-easjson branch from 0e86da0 to aa25cba Compare April 14, 2025 12:07
Copy link

✅ Thank you for adding the changelog entry!

Copy link

Size Change: -1.1 kB (0%)

Total Size: 53.4 MB

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

compressed-size-action

Copy link

codecov bot commented Apr 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.37%. Comparing base (379036a) to head (aa25cba).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2987      +/-   ##
==========================================
+ Coverage   52.36%   52.37%   +0.02%     
==========================================
  Files         596      596              
  Lines       23698    23704       +6     
  Branches     4714     4716       +2     
==========================================
+ Hits        12407    12413       +6     
  Misses      11256    11256              
  Partials       35       35              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@khamilowicz khamilowicz requested a review from sjchmiela April 15, 2025 10:58
@khamilowicz khamilowicz marked this pull request as ready for review April 15, 2025 10:58
Copy link

Subscribed to pull request

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

Generated by CodeMention

@khamilowicz khamilowicz requested a review from Copilot April 15, 2025 11:03
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

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