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 building and validating of the OIR #1099

Merged

Conversation

Shastick
Copy link
Contributor

@Shastick Shastick commented Sep 3, 2024

  • Move the "start before end" check into the validation logic in order to fail earlier
  • Move the building of the OIR to a method of the private struct holding validated parameters.

Another step towards #1088

@Shastick Shastick force-pushed the oir-upsert-early-timerange-validate branch 6 times, most recently from 13b4bb3 to d7477df Compare September 3, 2024 16:04
Copy link
Contributor

@mickmis mickmis left a comment

Choose a reason for hiding this comment

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

LGTM

}
}

// validateAndReturnUpsertParams checks that the parametersconti for an Operational Intent Reference upsert are valid.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

// For OIR's in the accepted state, we may not have a attachedSub available,
// in such cases the attachedSub ID on scdmodels.OperationalIntent will be nil
// and will be replaced with the 'NullV4UUID' when sent over to a client.
var subID *dssmodels.ID = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: = nil is useless here

@Shastick Shastick force-pushed the oir-upsert-early-timerange-validate branch from d7477df to 74e6f05 Compare September 6, 2024 10:00
@Shastick
Copy link
Contributor Author

Shastick commented Sep 6, 2024

Updated and ready to merge

@mickmis mickmis merged commit 83bc148 into interuss:master Sep 6, 2024
6 checks passed
@mickmis mickmis deleted the oir-upsert-early-timerange-validate branch September 6, 2024 10:06
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.

2 participants