Skip to content

Use new can_renew endpoint for renew subscription table button

Laura Callahan requested to merge 386129-hide_buttons_ramps into master

What does this MR do and why?

Related to #386129 (closed)

Requires https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/6959 to be merged and in production before this can merge

Consumes new canRenew graphQL endpoint. This prevents the renew button on the billing page from showing for ramp subscriptions.

Screenshots or screen recordings

Ramp subscription

Before After
before non ramp after_ramp

Non-ramp subscription

Before After (no change)
before_non_ramp after_non_ramp

How to set up and validate locally

  • Either pull this branch locally or ensure it's already available in GDK
  • Run export GITLAB_SIMULATE_SAAS=1 and restart GDK
  • In the rails console in GDK, run ::Gitlab::CurrentSettings.update(check_namespace_plan: true)
  • Link a ramp subscription to a group in GL
  • Navigate to /groups/GROUP_NAME/-/billings
  • Ensure the renew button does not show
  • Navigate to a group with a non-ramped subscription
  • Ensure the renew button does show

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Laura Callahan

Merge request reports