Skip to content
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

Remove /v1/unit_data from SDS_API_BASE_URL #1168

Merged
merged 6 commits into from
Jul 21, 2023

Conversation

kylelawsonAND
Copy link
Contributor

@kylelawsonAND kylelawsonAND commented Jul 20, 2023

What is the context of this PR?

The base url used for making requests to SDS was previously configured to not be the base, but the end point v1/unit_data, preventing any future requests to other endpoints from using the env var which details this url.
This PR fixes this by ensuring the env var is actually the base url of SDS and that endpoints are appended to. the base when needed by runner.

Changes

.development.env & .functional-tests.env: SDS_API_BASE_URL now set to http://localhost:5003, having had /v1/unit_data removed from the end of it.

session.py: Imports and uses the renamed method get_supplementary_data_v1.

supplementary_data.py: Renamed method get_supplementary_data to get_supplementary_data_v1, as it now appends /v1/unit_data to the SDS API Base URL.

doc/run-mock-sds-endpoint.md: Fixed reference to the env var SDS_API_BASE_URL to ensure it instructs the reader to correctly set it to the base url.

test_request_supplementary_data.py: Renamed usages of get_supplementary_data to get_supplementary_data_v1

How to review

Ensure all tests are still passing.
Run Runner, Launcher and the Mock SDS and ensure mock data can still be loaded.

# Conflicts:
#	app/services/supplementary_data.py
#	tests/app/services/test_request_supplementary_data.py
@kylelawsonAND
Copy link
Contributor Author

Copy link
Contributor

@katie-gardner katie-gardner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All working nicely, just one comment

doc/run-mock-sds-endpoint.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Yuyuutsu Yuyuutsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment resolved and everything else lgtm !

@MebinAbraham MebinAbraham merged commit 6bb2afe into feature-prepop Jul 21, 2023
@MebinAbraham MebinAbraham deleted the sds-base-url-fix branch July 21, 2023 10:35
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.

4 participants