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

Run validation in CLI to compare resource collection details between existing and compiled app #76

Open
justmisosoup opened this issue Jul 28, 2022 · 1 comment

Comments

@justmisosoup
Copy link
Member

justmisosoup commented Jul 28, 2022

Description

Now that we get info about the main branch app (name from app.json) and new "compiled" app (from app --list resources) we can use that to compare if any of the same collections in the branch app are part of the main line app.

We are implementing a feature that helps prevent customers from accidentally updating a destination resource collection already being used by another application on the platform.

Background

The work has four parts:

  • Exposing existing application information about resources and collections.
  • Exposing the compiled application information about its resources and collections.
  • Running validation to check if there are common destination resources and collection combinations shared in common and flagging an error to the customer.
  • Having a way to bypass this validation and force the deploy. We should still print out anything we notice.

Tasks

  • Run validation in CLI to compare resource and collection data between the existing app and the compiled app.
    • This relationship can be made through the app.json application name.
    • If you're feeling ambitious, we can try comparing against all existing applications on the platform. :)
  • Look for common destination resources and collections.
    • If common collection is found, throw an error and stop deploy.
    • If no common collection is found, proceed with deployment steps.
  • Error should notify them of what was found. We should display the resource and collection and let them know if they intend to update the common resource they can run meroxa app deploy --force or similar command to push through validation.
@justmisosoup
Copy link
Member Author

This will initially start as a spike as part of the work Lyubo has been working on for https://github.com/meroxa/product/issues/427. Once we validate the approach, we can look towards merging this work.

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

No branches or pull requests

1 participant