Skip to content

Conversation

@rohanpm
Copy link
Contributor

@rohanpm rohanpm commented May 1, 2020

If you look at the schema defined in Pulp, 'stream' and 'profiles' are
not actually mandatory (not part of the unit key).

Although I believe in practice they're expected to be defined for all
real data, the fact that they're not part of the unit key means they're
omitted from responses in some contexts (e.g. units_succcessful in
associate/unassociate calls), therefore they must not be mandatory here
or crashes will occur when handling those responses.

Declaration of 'profiles' was also tweaked for consistency with other
fields: in other classes, a value which is allowed to be None still has
a type declared (as all types are understood to be nullable), so the
fact that this field can be None is not a reason to omit a type here
either.

One test was tweaked to ensure no crashes when stream is missing.

Relates to RHELDST-861.

If you look at the schema defined in Pulp, 'stream' and 'profiles' are
not actually mandatory (not part of the unit key).

Although I believe in practice they're expected to be defined for all
real data, the fact that they're not part of the unit key means they're
omitted from responses in some contexts (e.g. units_succcessful in
associate/unassociate calls), therefore they must not be mandatory here
or crashes will occur when handling those responses.

Declaration of 'profiles' was also tweaked for consistency with other
fields: in other classes, a value which is allowed to be None still has
a type declared (as all types are understood to be nullable), so the
fact that this field can be None is not a reason to omit a type here
either.

One test was tweaked to ensure no crashes when stream is missing.

Relates to RHELDST-861.
@rohanpm rohanpm marked this pull request as ready for review May 1, 2020 00:12
@rohanpm rohanpm requested review from jbruzl and rajulkumar as code owners May 1, 2020 00:12
@rohanpm rohanpm requested review from a team, midnightercz and negillett May 1, 2020 00:12
negillett
negillett previously approved these changes May 1, 2020
@rohanpm
Copy link
Contributor Author

rohanpm commented May 4, 2020

Did a trivial conflict resolution with the addition of repository_memberships.

@rohanpm rohanpm merged commit 7c8b5ef into release-engineering:master May 4, 2020
@rohanpm rohanpm deleted the modulemd-defaults-schema branch May 4, 2020 22:39
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