8000 DOCK-2605: Fix TRS endpoint response code by svonworl · Pull Request #6114 · dockstore/dockstore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DOCK-2605: Fix TRS endpoint response code #6114

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

Merged

Conversation

svonworl
Copy link
Contributor
@svonworl svonworl commented May 20, 2025

Description
This PR changes the webservice so that when the specified version doesn't exist, the TRS toolsIdVersionsVersionIdTypeFilesGet endpoint responds with a 404 (NOT_FOUND) status code, rather than a 204 (which denotes a successful request that has no response content).

I simplified the involved control structure to something that feels better to me, ymmv.

Review Instructions
Try to reproduce using the example in the ticket, and confirm that the response is now correct.

Issue
https://ucsc-cgl.atlassian.net/browse/DOCK-2605
#6048

Security and Privacy

If there are any concerns that require extra attention from the security team, highlight them here and check the box when complete.

  • Security and Privacy assessed

e.g. Does this change...

  • Any user data we collect, or data location?
  • Access control, authentication or authorization?
  • Encryption features?

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that you pass the basic style checks and unit tests by running mvn clean install
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • Follow the existing JPA patterns for queries, using named parameters, to avoid SQL injection
  • If you are changing dependencies, check the Snyk status check or the dashboard to ensure you are not introducing new high/critical vulnerabilities
  • Assume that inputs to the API can be malicious, and sanitize and/or check for Denial of Service type values, e.g., massive sizes
  • Do not serve user-uploaded binary images through the Dockstore API
  • Ensure that endpoints that only allow privileged access enforce that with the @RolesAllowed annotation
  • Do not create cookies, although this may change in the future
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.

Copy link
codecov bot commented May 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.18%. Comparing base (1b63682) to head (ae1c50b).

Additional details and impacted files
@@                 Coverage Diff                 @@
##             hotfix/1.17.1    #6114      +/-   ##
===================================================
- Coverage            74.21%   74.18%   -0.03%     
+ Complexity            5662     5660       -2     
===================================================
  Files                  389      389              
  Lines                20331    20329       -2     
  Branches              2100     2100              
===================================================
- Hits                 15089    15082       -7     
- Misses                4239     4245       +6     
+ Partials              1003     1002       -1     
Flag Coverage Δ
bitbuckettests 25.94% <0.00%> (+<0.01%) ⬆️
hoverflytests 27.62% <0.00%> (+<0.01%) ⬆️
integrationtests 56.08% <0.00%> (+<0.01%) ⬆️
languageparsingtests 10.82% <0.00%> (+<0.01%) ⬆️
localstacktests 21.34% <0.00%> (+<0.01%) ⬆️
regressionintegrationtests ?
toolintegrationtests 29.90% <0.00%> (+<0.01%) ⬆️
unit-tests_and_non-confidential-tests 26.31% <0.00%> (+<0.01%) ⬆️
workflowintegrationtests 37.36% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svonworl svonworl requested a review from denis-yuen May 20, 2025 20:35
@denis-yuen
Copy link
Member

I simplified the involved control structure to something that feels better to me, ymmv.

yeah, that's probably better

@svonworl svonworl requested a review from kathy-t May 20, 2025 22:17
@svonworl svonworl merged commit eaf6245 into hotfix/1.17.1 May 21, 2025
23 of 24 checks passed
@svonworl svonworl deleted the feature/dock-2605/fix-trs-endpoint-status-code branch May 21, 2025 18:54
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
0