adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

`aio app use` currently broken for stage projects without credentials or services #737

Closed MichaelGoberling closed 10 months ago

MichaelGoberling commented 10 months ago

Edit: This is only in stage

Error

➜  state_test git:(main) ✗ AIO_CLI_ENV=stage aio app use 
 ›   Warning: @adobe/aio-cli update available from 9.3.0 to 9.4.0.
 ›   Run npm install -g @adobe/aio-cli to update.
You are currently in:
1. Org: <no org selected>
2. Project: <no project selected>
3. Workspace: <no workspace selected>

? Switch to a new Adobe Developer Console configuration: A. Use the global Org / Project / Workspace configuration:
    1. Org: App Builder ISV
    2. Project: michaelgoberlingtest
    3. Workspace: Dev
 ›   Error: Missing or invalid keys in config: [
 ›     {
 ›       "instancePath": "/project/workspace/details",
 ›       "schemaPath": "#/required",
 ›       "keyword": "required",
 ›       "params": {
 ›         "missingProperty": "credentials"
 ›       },
 ›       "message": "must have required property 'credentials'"
 ›     },
 ›     {
 ›       "instancePath": "/project/workspace/details",
 ›       "schemaPath": "#/required",
 ›       "keyword": "required",
 ›       "params": {
 ›         "missingProperty": "services"
 ›       },
 ›       "message": "must have required property 'services'"
 ›     }
 ›   ]

Cause

Download workspace schema expects credentials and services to always be there, but the download workspace JSON API has been changed to where if there's no credentials or services, those fields are omitted

Proposed resolution

~Change the config schema to make credentials or services optional~ Roll back the change to the dev console api

Even if we change the schema and roll out a new version, users will have to update their CLI. Rolling back the change on the backend will fix this for users on older versions of the CLI

aiojbot commented 10 months ago

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2601

MichaelGoberling commented 10 months ago

Closing this issue as it was fixed on the dev console api side