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

Use the API backend for online validation #201

Merged
merged 13 commits into from
May 3, 2023
Merged

Conversation

tbroden84
Copy link
Contributor

@tbroden84 tbroden84 commented Apr 18, 2023

Change plan and region validation to no longer use hardcoded values in the provider. Instead use the API backend to do the validation. The plans are validated against each team, in regards to any specific feature flags set, such as preview plans without the need to update the provider. Therefore will now also support all new LavinMQ dedicated plans.

The validation only occurs when plan or region are changed from earlier state, during create or plan/region update.

More changes done in this PR.

  • Added backend computed attribute, store information about which backend being used in the state file.
  • Updated nodes information handling. Only include nodes in create/update request for legacy plans.
  • Updated check on how to determine if the instance is shared/dedicated.
  • Remove old plan validation

Testing requires: 84codes/go-api#34

@tbroden84 tbroden84 changed the title Use the backend for online validation Use the API backend for online validation Apr 21, 2023
@tbroden84 tbroden84 requested a review from dentarg April 21, 2023 06:58
@tbroden84 tbroden84 marked this pull request as ready for review April 21, 2023 06:59
```shell
# Filter out available plans for RabbitMQ
curl -u :xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx \
https://customer.cloudamqp.com/api/plans?backend=rabbitmq
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Each of these examples with filtered requests would require: https://github.com/84codes/customer-console/pull/164

Or if we should just reference our docs.cloudamqp.com.

Copy link
Member

Choose a reason for hiding this comment

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

Yes we should document it there and reference it

Copy link
Member

@dentarg dentarg left a comment

Choose a reason for hiding this comment

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

Looks good to me, I did a tiny bit of testing and experienced no problems :)

@tbroden84 tbroden84 merged commit 71a5718 into main May 3, 2023
@tbroden84 tbroden84 deleted the online-validation branch May 3, 2023 15:02
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