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

New eas.json configuration step in eas update ignores inheritance #1600

Closed
hanzketup opened this issue Dec 30, 2022 · 5 comments
Closed

New eas.json configuration step in eas update ignores inheritance #1600

hanzketup opened this issue Dec 30, 2022 · 5 comments
Assignees
Labels
eas update needs review Issue is ready to be reviewed by a maintainer

Comments

@hanzketup
Copy link

Build/Submit details page URL

No response

Summary

Hello,
Im running into an issue with eas-cli since v3.1.0 with the new feature found in PR #1570

I use EAS to build a branded app for our clients, and this means that i have a ton of different EAS build profiles in eas.json.
To reduce boilerplate all my client production profiles they inherit from a main production profile, that has channel: production.

This setup has worked great for hundreds of updates, but was broken by 3.1.0 since eas update now tries to automatically create channels for the client production profiles.
See reproducible demo.

Seems like a great feature in general though 🙌

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info:

    System:
      OS: macOS 13.0.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
      Yarn: 3.2.0 - ~/.nvm/versions/node/v16.15.0/bin/yarn
      npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
    Managers:
      CocoaPods: 1.11.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    IDEs:
      Android Studio: 2021.3 AI-213.7172.25.2113.9123335
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~47.0.9 => 47.0.9 
      react: 18.1.0 => 18.1.0 
      react-dom: 18.1.0 => 18.1.0 
      react-native: 0.70.5 => 0.70.5 
      react-native-web: ~0.18.7 => 0.18.9 
    npmGlobalPackages:
      eas-cli: 3.1.1
      expo-cli: 6.0.8
    Expo Workflow: manag

Expo doctor:

Some dependencies are incompatible with the installed expo package version:
 - @sentry/react-native - expected version: 4.9.0 - actual version installed: 4.2.2
 - expo-linking - expected version: ~3.3.0 - actual version installed: 3.2.3
 - sentry-expo - expected version: ~6.0.0 - actual version installed: 5.0.3

Error output

No response

Reproducible demo or steps to reproduce from a blank project

eas.json before running eas update (simplified):

{
  "cli": {
    "version": ">= 1.1.1"
  },
  "build": {
    "development": {
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug"
      },
      "ios": {
        "buildConfiguration": "Debug"
      },
      "channel": "development"
    },
    "preview": {
      "distribution": "internal",
      "channel": "preview"
    },
    "production": {
      "channel": "production"
    },
    "clientOneProduction": {
      "extends": "production",
      "env": {
        "VARIANT": "clientOne"
      }
    },
    "clientTwoProduction": {
      "extends": "production",
      "env": {
        "VARIANT": "clientTwo"
      }
    },
  },
  "submit": {
    "production": {}
  }
}

after running eas update

{
  "cli": {
    "version": ">= 1.1.1"
  },
  "build": {
    "development": {
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug"
      },
      "ios": {
        "buildConfiguration": "Debug"
      },
      "channel": "development"
    },
    "preview": {
      "distribution": "internal",
      "channel": "preview"
    },
    "production": {
      "channel": "production"
    },
    "clientOneProduction": {
      "extends": "production",
      "env": {
        "VARIANT": "clientOne"
      },
      channel: "clientOneProduction"
    },
    "clientTwoProduction": {
      "extends": "production",
      "env": {
        "VARIANT": "clientTwo"
      },
      channel: "clientTwoProduction"
    },
  },
  "submit": {
    "production": {}
  }
}

With this error:

InvalidEasJsonError: eas.json is not valid.
    - "build.clientOneProduction.channel" with value "clientOneProduction" fails to match the required pattern: /^[a-z\d][a-z\d._-]*$/
@hanzketup hanzketup added the needs review Issue is ready to be reviewed by a maintainer label Dec 30, 2022
@jonsamp
Copy link
Member

jonsamp commented Jan 3, 2023

Thanks for the bug report! I have a PR out that will fix this issue: #1598

I am getting that wrapped up soon and will get it merged and released in an upcoming version of eas-cli.

@quinlanj
Copy link
Member

Closing this because @jonsamp merged his PR.

@GeeGYMR
Copy link

GeeGYMR commented Feb 26, 2024

Was this solved? i am running into

"Invalid eas.json.
GitHub integration requires the image option.
See https://docs.expo.dev/eas/json/#image to learn more."

I have even tried building my previous branches that worked with github building on the expo website... but now i receive the error specified above

Need this as this is how i build for android apps

@GeorgeCrisan
Copy link

@GeeGYMR
edith eas.json file inside "build" { ....}

replace

"production": {}

to

    "production": {
      "android": {
        "image": "latest"
      },
      "ios": {
        "image": "latest"
      }
    }

@techdevwill
Copy link

@GeeGYMR edith eas.json file inside "build" { ....}

replace

"production": {}

to

    "production": {
      "android": {
        "image": "latest"
      },
      "ios": {
        "image": "latest"
      }
    }

This is the answer as of July 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eas update needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

7 participants