Skip to content

feat: add active-active subscription and region models, and fetch methods#260

Draft
tstoykov-redis wants to merge 1 commit intomainfrom
feat/byoc-aa
Draft

feat: add active-active subscription and region models, and fetch methods#260
tstoykov-redis wants to merge 1 commit intomainfrom
feat/byoc-aa

Conversation

@tstoykov-redis
Copy link
Copy Markdown
Collaborator

No description provided.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 21, 2026

CLA assistant check
All committers have signed the CLA.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 21, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@burythehammer burythehammer added the enhancement New feature or request label Apr 21, 2026
@burythehammer
Copy link
Copy Markdown
Collaborator

You'll need to bump the go toolchain in order to pass the vuln check. Check my PR for an example, it's one of the commits

Copy link
Copy Markdown
Collaborator

@burythehammer burythehammer left a comment

Choose a reason for hiding this comment

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

Some small comments. Implement them if you wish. Nothing is a blocker or even a bug, except perhaps the nil pointer issue

}
var activeActiveSubscriptions []*ActiveActiveSubscription
for _, sub := range response.Subscriptions {
if *sub.DeploymentType == "active-active" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

you'll probably want to do a nilcheck on DeploymentType before referencing it

if sub.DeploymentType != nil && *sub.DeploymentType == SubscriptionDeploymentTypeActiveActive {  

// ListActiveActive will list all of the current account's active-active subscriptions.
func (a *API) ListActiveActive(ctx context.Context) ([]*ActiveActiveSubscription, error) {
var response listActiveActiveSubscriptionResponse
err := a.client.Get(ctx, "list subscriptions", "/subscriptions", &response)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

should change the comment to "list active active subscriptions" to be explicit

// GetActiveActive will retrieve an existing active-active subscription.
func (a *API) GetActiveActive(ctx context.Context, id int) (*ActiveActiveSubscription, error) {
var response ActiveActiveSubscription
err := a.client.Get(ctx, fmt.Sprintf("retrieve subscription %d", id), fmt.Sprintf("/subscriptions/%d", id), &response)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same issue here - "retrieve active-active subscription"

Comment thread service/regions/model.go
DeploymentCIDR *string `json:"deploymentCIDR,omitempty"`
DryRun *bool `json:"dryRun,omitempty"`
RespVersion *string `json:"respVersion,omitempty"`
VpcId *string `json:"vpcId,omitempty"`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just noticed with this PR that we're being inconsistent across the codebase with how we capitalise ID in the various fields. No change necessarily needed with this PR but it might be nice to go across the codebase, pick a convention, and stick to it (in future)

@burythehammer burythehammer marked this pull request as ready for review April 23, 2026 09:16
@tstoykov-redis tstoykov-redis marked this pull request as draft April 29, 2026 14:08
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.

3 participants