[GPCAPIM-396] Local SDS Int Integration#188
Conversation
|
|
||
| sds = SdsFhirApiStub() | ||
| get = sds.get # type: ignore | ||
| def get( |
There was a problem hiding this comment.
I'm interested in what other people think about this pattern, but I think it's nicer than the conditional imports. We're not planning on moving to separately deployment mocks any time soon, so I think a little wrapper function is useful. Not technically part of the scope of this ticket though, so I can revert and discuss separately if we want to.
| # TODO [GPCAPIM-366]: Obtain key from AWS secrets | ||
| # DO NOT PUT A REAL KEY HERE, IT WILL BE VISIBLE ON GITHUB | ||
| return "test_api_key_DO_NOT_REPLACE_HERE" | ||
| return os.environ.get("SDS_API_KEY", "") |
There was a problem hiding this comment.
This will need to change once the environment config work goes in
| from gateway_api.clinical_jwt import JWT | ||
|
|
||
|
|
||
| class NewEnvVars: |
There was a problem hiding this comment.
Stolen from David H's work. I'll fix up the conflicts once the other's in.
| self, | ||
| pds_base_url: str = PdsClient.SANDBOX_URL, | ||
| sds_base_url: str = SdsClient.SANDBOX_URL, | ||
| sds_base_url: str = SdsClient.INT_URL, |
There was a problem hiding this comment.
temp change. The environment variable work should just handle this already so I'll revert at that point
| self.base_url = base_url.rstrip("/") | ||
| self.timeout = timeout | ||
| self.api_key = self._get_api_key() | ||
| self.api_key = api_key |
There was a problem hiding this comment.
This fits better with the env var pattern established in the previous ticket. If we try to read the config from the "app" variable in app.py we get circular imports
|
|
Deployment Complete
|



Description
Moves SDS connection to INT for localInt setup. Will need to make relevant secret and env var updates based on David H's work that's not merged yet.
Context
Part of proving the INT connections locally
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.