-
Notifications
You must be signed in to change notification settings - Fork 9
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
Validate and set ps_component from purl #832
Conversation
27ef30f
to
ad7061d
Compare
3c4945a
to
7b8e4ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost OK but I would like the alert messages to be improved. Also it is not clear to me what happens when neither the component (which is no optional) nor PURL is provided. Will uniqueness constrain prevent this to be stored in the database? Will the error be human-readable? I would like to see a test for this case to prevent any potential future regression.
c061ad1
to
1d1b316
Compare
1d1b316
to
7b57f6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit better but I still do not think that the validations are correct or on the correct place
67d1cc6
to
2909ad9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for moving the validation logic to the validations. The non-caught exception is however still there. This seems to be the very last issue I have here
2909ad9
to
a8a9b07
Compare
a8a9b07
to
723c212
Compare
0f7a91e
to
01693bf
Compare
01693bf
to
9a976be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great job.
This PR adds validation between
ps_component
andpurl
to check they match each other and also enables the automatic setting ofps_component
if a request contains onlypurl
.Closes OSIDB-3410