Skip to content

[GPCAPIM-396] Local SDS Int Integration#188

Draft
ian-robinson-35 wants to merge 8 commits intomainfrom
feature/GPCAPIM-396-sds-int
Draft

[GPCAPIM-396] Local SDS Int Integration#188
ian-robinson-35 wants to merge 8 commits intomainfrom
feature/GPCAPIM-396-sds-int

Conversation

@ian-robinson-35
Copy link
Copy Markdown
Contributor

@ian-robinson-35 ian-robinson-35 commented Apr 23, 2026

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

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.


sds = SdsFhirApiStub()
get = sds.get # type: ignore
def get(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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", "")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This will need to change once the environment config work goes in

Comment thread gateway-api/src/gateway_api/conftest.py Outdated
from gateway_api.clinical_jwt import JWT


class NewEnvVars:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Deployment Complete

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.

1 participant