-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update HTTP Response For Not Allowed Requests #199
Conversation
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
- Coverage 35.58% 27.23% -8.36%
==========================================
Files 7 7
Lines 1360 2012 +652
==========================================
+ Hits 484 548 +64
- Misses 829 1417 +588
Partials 47 47 ☔ View full report in Codecov by Sentry. |
/retest |
Going to investigate if there is a way to exempt generated source code from the code coverage check. It appears that before my change as well all the generated |
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 tried it locally with postman and I'm able to see the differences between the fixed version and the registry.devfile.io/index
I believe we can ignore the generated source code by referencing here: https://docs.codecov.com/docs/ignoring-paths#ignoring-specific-file-types By adding WDYT @thepetk @michael-valdron |
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
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
Failing code coverage could be based off prior recorded source changes or using current state of .codecov.yaml
under the main branch rather than the PR changed file.
We should watch out for these failures in upcoming PRs.
Testing out trying to explicitly state the path of a generated code file to ignore because when I looked at the pull it still stated that |
@Jdubrick If I'm understanding correctly, you would like to revert the change to code coverage ignores, |
2cc139c
to
b5a9e5c
Compare
@michael-valdron I was trying to say that I would revert my commit back to the one that excludes We could open an issue into investigating how to backdate the exclusions, and if there is a potential fix to resolve it. My changes to The issue now would be that merging this PR will have the 2 failures for code coverage but you said above that is fine. I agree with that especially if we open an issue into investigating a fix for the coverage. I can open that issue soon. |
@Jdubrick Sorry for misunderstanding just realized what you meant 😆 Yeah I agree with reverting to the pattern since that is more what we are trying to cover with the ignore anyway. Also, +1 on an investigation issue, would be good to open as a follow up to this not respecting the ignore. I would see what the result is on the main branch after this PR is merged first. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jdubrick, michael-valdron, thepetk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please specify the area for this PR
What does does this PR do / why we need it:
This PR updates our API endpoints to properly return a 405 response code for methods that are not allowed (in this case POST/PUT/DELETE), currently all of our endpoints only support GET requests and any other request was returning a 404 code.
Which issue(s) this PR fixes:
Fixes devfile/api#543
PR acceptance criteria:
Documentation (WIP)
How to test changes / Special notes to the reviewer:
Unit tests have been added to make sure they are returning the proper response codes. If you wish you can also spin up the registry on a cluster and test the endpoints using something like Postman.