Skip to content

[scd] Extract resolve subscription - #1800

Merged
MariemBaccari merged 3 commits into
interuss:masterfrom
Orbitalize:extract_resolvesubscription
Oct 21, 2026
Merged

MariemBaccari merged 3 commits into
interuss:masterfrom
Orbitalize:extract_resolvesubscription

Conversation

@MariemBaccari

Copy link
Copy Markdown
Contributor

Following feedback on #1797, this PR extracts the subscription resolving logic for put oir reference requests.

@MariemBaccari
MariemBaccari force-pushed the extract_resolvesubscription branch from 2f27564 to a216bf0 Compare October 20, 2026 09:54
@MariemBaccari
MariemBaccari marked this pull request as draft October 20, 2026 11:31
@MariemBaccari
MariemBaccari marked this pull request as ready for review October 20, 2026 11:46

@mickmis mickmis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I opened #1800 but kept removePreviousImplicitSubscription outside of it to avoid having 2 return bool values.

FWIW I think it's perfectly fine to have two return bool values in this case, and abstracts well (or better, at least) the extraction of the subscription data. This could be encapsulated in a ad-hoc struct if that makes you nervous. But up to you that's more of a nit (except for the duplication of previousSubIsBeingReplaced as mentioned in a comment).

Comment thread pkg/scd/operations/operational_intents.go Outdated
validParams *validOIRParams,
) (*scdmodels.Subscription, bool, error) {
var err error
previousSubIsBeingReplaced := previousSub != nil && validParams.SubscriptionID != previousSub.ID

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is now duplicated. Either pass previousSubIsBeingReplaced as argument, or return removePreviousImplicitSubscription out of this function (moving the block // Determine if the previous subscription ... inside this function).

MariemBaccari and others added 2 commits October 21, 2026 11:36
Co-authored-by: Mickaël Misbach <mickael.misbach@orbitalize.com>
@MariemBaccari
MariemBaccari merged commit 00b2bc5 into interuss:master Oct 21, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants