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

[scd] oir upsert: factor out determination of subscriptions to notify #1092

Conversation

Shastick
Copy link
Contributor

Another step towards #1088

@@ -508,6 +508,56 @@ func validateUpsertRequestAgainstPreviousOIR(
return nil
}

func incrementIndicesAndGetRelevantSubscriptions(
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think the primary thing this function is doing is getting relevant subscriptions, with a sub-behavior of incrementing notification indices

Suggested change
func incrementIndicesAndGetRelevantSubscriptions(
func getRelevantSubscriptionsAndIncrementIndices(

@Shastick Shastick force-pushed the oir-upsert-refactor-1c-extract-notification branch from c4bdf24 to 47e45c3 Compare September 2, 2024 07:31
@@ -517,6 +517,56 @@ func validateUpsertRequestAgainstPreviousOIR(
return nil
}

func getRelevantSubscriptionsAndIncrementIndices(
Copy link
Contributor

Choose a reason for hiding this comment

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

Drive-by comment: also use this in DeleteOperationalIntentReference? There seems to be some common logic (although maybe there are some small deviations)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I'll quickly check: if the method can be used as-is I'll update to use it, otherwise I'll keep that for another day

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ended up doing it as it was an easy fix.

@Shastick Shastick force-pushed the oir-upsert-refactor-1c-extract-notification branch from 8228781 to 8eed218 Compare September 2, 2024 19:03
@Shastick Shastick force-pushed the oir-upsert-refactor-1c-extract-notification branch from 8eed218 to 46d34f0 Compare September 2, 2024 20:00
@mickmis mickmis merged commit 7029a60 into interuss:master Sep 3, 2024
6 checks passed
@mickmis mickmis deleted the oir-upsert-refactor-1c-extract-notification branch September 3, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants