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

Add/delete service commands and app use enhancements #368

Merged
merged 49 commits into from
Feb 3, 2021

Conversation

moritzraho
Copy link
Member

@moritzraho moritzraho commented Jan 26, 2021

Description

  • Easy workspace selection
  • Sync services across workspaces

! BREAKING CHANGE ! aio app use -w for write has been removed and replaced for selecting workspaces
! BREAKING CHANGE ! aio app use -m has been removed

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@moritzraho moritzraho closed this Jan 28, 2021
@moritzraho moritzraho reopened this Jan 28, 2021
@moritzraho moritzraho mentioned this pull request Feb 1, 2021
12 tasks
@moritzraho moritzraho requested a review from shazron February 2, 2021 11:01
Copy link
Member

@shazron shazron left a comment

Choose a reason for hiding this comment

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

You can ignore the comments about periods at the end of the text, a bit nitpicky :)

src/commands/app/add/service.js Outdated Show resolved Hide resolved
src/commands/app/add/service.js Outdated Show resolved Hide resolved
src/commands/app/delete/service.js Outdated Show resolved Hide resolved
src/commands/app/delete/service.js Outdated Show resolved Hide resolved
src/commands/app/delete/service.js Outdated Show resolved Hide resolved
src/commands/app/use.js Outdated Show resolved Hide resolved
src/commands/app/use.js Outdated Show resolved Hide resolved
src/commands/app/use.js Show resolved Hide resolved
src/commands/app/use.js Show resolved Hide resolved
src/commands/app/use.js Show resolved Hide resolved
@shazron
Copy link
Member

shazron commented Feb 3, 2021

if possible, to be complete - fix the 14 JSDoc warnings.

@shazron
Copy link
Member

shazron commented Feb 3, 2021

Log

$ aio app use --workspace
You are currently in:
1. Org: Adobe IO DEMO
2. Project: ShazFF3
3. Workspace: Saturnbase

? Select Workspace: Production
⚠ Services attached to the target Workspace do not match Service subscriptions in the current Workspace
The 'Production' Workspace in Project 'ShazFF3' subscribes to the following Services:
[
  "Adobe Target"
]
Your project requires the following Services based on your current Project / Workspace configuration:
[]
⚠ Warning: you are authorizing to overwrite Services in your *Production* Workspace in Project 'ShazFF3'.
This may break any Applications that currently uses existing Service subscriptions in this Production Workspace.
?
Do you want to sync and update Services for Workspace 'Production' in Project 'ShazFF3' now ?

It will be good to state what the current Workspace is, in the line Your project requires the following Services based on your current Project / Workspace configuration

@shazron
Copy link
Member

shazron commented Feb 3, 2021

Tested, all good:

  • aio app add service
  • aio app delete service
  • aio app use --workspace (change to workspace with different service list, Production and non-Production)
  • aio app use --workspace-name WORKSPACE_NAME (change to workspace with different service list, Production and non-Production)
  • aio app use --workspace --confirm-service-sync (Production and non-Production)
  • aio app use --workspace --no-service-sync (Production and non-Production)

if (workspaceName === 'Production') {
console.error(chalk.bold(chalk.yellow(
`⚠ Warning: you are authorizing to overwrite Services in your *Production* Workspace in Project '${projectName}'.` +
`${EOL}This may break any Applications that currently uses existing Service subscriptions in this Production Workspace.`
Copy link
Member

Choose a reason for hiding this comment

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

grammar: This may break any Applications that currently use existing Service subscriptions in this Production Workspace.

@moritzraho
Copy link
Member Author

All resolved! thanks a lot Shaz!

@moritzraho moritzraho changed the title App use enhancements Add/delete service commands and app use enhancements Feb 3, 2021
@moritzraho moritzraho merged commit 99b2089 into adobe:master Feb 3, 2021
@moritzraho moritzraho deleted the app-use-enhancement branch February 3, 2021 15:18
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.

2 participants