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

fix(compute/deploy): check compute product entitlement when creating service #1179

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Integralist
Copy link
Collaborator

A few changes are happening in this PR but the primary change is to check the entitlement the user has to the Compute product and to display a message informing them that the new service they're about to create will be part of a trial access (unless they are already on a trial, or they've paid for access).

Additional changes worth noting:

  • Refactoring the code to avoid passing a function through multiple call sites (just wasn't necessary).
  • Removing the use of a function type that used partial application (a result of the above refactor).
  • Replacing the "trial activation" logic with a simpler "check entitlement" API call.
  • Refactoring the 'deploy' tests so we have a default behaviour for mocking the entitlement call **

** The original test code was duplicating the same mocking code everywhere and it just wasn't necessary. Setting a failure mock mode was the only special case that needed explicit overriding.

@Integralist Integralist added the enhancement New feature or request label Apr 15, 2024
@Integralist Integralist requested a review from daniel-savo April 15, 2024 16:00
@Integralist Integralist force-pushed the integralist/compute-svc-creation branch 2 times, most recently from 87d9554 to 76c451f Compare April 18, 2024 09:17
@Integralist Integralist force-pushed the integralist/compute-svc-creation branch from 76c451f to 5539575 Compare April 18, 2024 10:53
@@ -17,12 +17,30 @@ import (
"github.com/fastly/cli/pkg/useragent"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kpfleming feel free to rebase and take over this PR if you want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants