Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #1896 +/- ##
=======================================
Coverage 92.88% 92.88%
=======================================
Files 30 30
Lines 5077 5077
=======================================
Hits 4716 4716
Misses 361 361 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| - url: https://dds-dev.dckube3.scilifelab.se/api/v3 | ||
| - url: https://testing.delivery.scilifelab.se/api/v3/ | ||
| description: Endpoint for the test server | ||
| # Uncomment when local testing |
There was a problem hiding this comment.
I think a relative server URL would solve it. With - url: /api/v3 the docs page on each instance (prod, testing, dev, local) points to itself, and we could drop the "Uncomment when local testing" lines as well. The Swagger UI we ship resolves a relative server URL against the host the page is on.
The hardcoded hosts don't work across instances in "Try it out" anyway, since neither prod nor testing sends CORS headers. So on the prod docs page, picking the test server gets blocked by the browser.
Not necessarily a blocker since it works.
samanrassam
left a comment
There was a problem hiding this comment.
Looks good, but dds_web/static/swagger.yaml (the v1 docs) still has the old dds-dev.dckube3.scilifelab.se host on line 38. It's not in public DNS anymore, and the v3 page tells people to use the v1 docs for now, so I think we should fix both in this PR.
Suggested a change in swaggerv3.yaml too with the usage of a relative URL.
Pull Request Template
Before Marking as Ready for Review
dev(or other targeted branch)SPRINTLOG.mdif neededIf the target branch is
master:Summary
Updated v3 endpoint URL in swagger documentation to the current testing.delivery.scilifelab.se one.
Related Issue/Ticket
https://scilifelab.atlassian.net/browse/HMS-2123
Testing
Built with docker compose, then visited localhost:5000/api/documentation/v3 to see that the new URL is there.
Reviewer Notes
The Jira task suggested investigating a way to do this without hard coding. I looked around a bit but I don't think there's a smooth way to do that. The hostname "testing.delivery.scilifelab.se" is only defined in the argocd repository manifest.
Currently, the testing hostname is just "testing." + the prod hostname. So one solution could be to decide that we should always follow this format. However, the prod hostname is also just hard coded in the same file, so there isn't anything to gain from turning the testing hostname into a variable based on the prod hostname currently.
Once all boxes are checked, mark the PR as Ready for Review and tag at least one team member as the initial reviewer.