-
Notifications
You must be signed in to change notification settings - Fork 68
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
adds basic checking of subscription state #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it is in draft mode, but just two minor suggestions in case they make sense to you. Thanks! 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a suggestion that would require a bit of refactoring, so I'll leave it up to you. LGTM otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get jira link in PR?
ced317c
to
08bdf14
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions about API versions and the subscription endpoint:
-
Can we remove
/internal/api/subscription/register.go
?
I was going to suggest using a different middleware chain for this endpoint that omitsMiddlewareValidateAPIVersion
(since that's only meant for our API versions) but it looks like you've effectively done that already. -
Should
ArmSubscriptionAction
be verfiying theapi-version
parameter is "2.0"?
I can delete
I'm not sure about this, the docs say "system version 2.0" will be used, but it doesn't say anything about requiring 2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍 on moving subscription structs into the arm
package.
What this PR does
Before this PR:
Subscription state was not validated when making requests belonging to a subscription
After this PR:
Subscription state is validated, meaning, requests must be using a subscriptionID which has a 'registered' state stored in the frontends cache.
To add any subscription as registered to the frontend cache run
Jira: ARO-6313
Link to demo recording:
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.