Skip to content

Chore/remove mock api resources - part 1#337

Closed
landonshumway-ia wants to merge 24 commits intocsg-org:developmentfrom
InspiringApps:chore/remove-mock-api
Closed

Chore/remove mock api resources - part 1#337
landonshumway-ia wants to merge 24 commits intocsg-org:developmentfrom
InspiringApps:chore/remove-mock-api

Conversation

@landonshumway-ia
Copy link
Collaborator

@landonshumway-ia landonshumway-ia commented Nov 15, 2024

These mock resources were put in place during the initial POC of the project. We have since moved onto actual API endpoints, so this dead code can be removed from the project.

This must be done in two phases to deal with cross stack dependencies in CloudFormation. This PR is part one, removing
the resources from the API stack. Once this change has been deployed through ALL environments, the second phase will be implemented to remove all the mock S3 resources from the Persistent stack.

Requirements List

  • this will need to be deployed through all environments before the mock S3 resources can be cleaned up.

Description List

  • Removed /v0 endpoints from API
  • Removed /mock endpoints from API
  • Removed license-data lambda package
  • Removed delete-objects lambda package

Testing List

  • yarn test:unit:all should run without errors or warnings
  • yarn serve should run without errors or warnings
  • yarn build should run without errors or warnings
  • For API configuration changes: CDK tests added/updated in backend/compact-connect/tests/unit/test_api.py
  • Code review

Closes #110

To reduce config file duplication
This will allow us to track the history of license
records for a licensee
These are now managed in the common directory, so we can remove
these.
This dependency is needed to work with other timezones
We have the requirement to resolve whether privileges
and licenses are expired by checking the date in the eastern
time zone. We expect this to change, so we are making it
a configuration value to reference everywhere we need to
resolve expiration dates.
We are splitting the concept of license status into two terms.
The first is the status that is uploaded by the jurisdiction,
which we are tracking as the 'jurisdictionStatus'. The second
is the 'status' that is actually used by the system to determine
eligibility for a user to purchase privileges. This adds the
new 'jurisdictionStatus' field
Now that we are calculating the status based off of the
expiration date and the jurisdictionStatus, we do not
need to store the 'status' field in the DB. This
ensures we are stripping the status from the record
that is written to the table.
This was causing deployment issues with
our lambdas that rely on the Authorize.net SDK
The 3.13 runtime was just released this week, so the
dependency mismatch will likely be resolved in the next
couple of months after the runtime has had time to stabilized
CDK has a limitation where if you attempt to remove all references to
a resource from another stack, CDK will attempt to remove the export
for that resource, which then fails because it sees there is still an
external dependency on that resource, creating a 'deadly embrace'
See aws/aws-cdk#12778.

The workaround for this is to set dummy export values to trick CDK
into keeping the unused exports around until you've deployed your
updates to the dependent stack.
@landonshumway-ia
Copy link
Collaborator Author

Moved relevant commits into #344 to address merge conflicts

@landonshumway-ia landonshumway-ia deleted the chore/remove-mock-api branch November 19, 2024 17:42
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.

clean up mock endpoints

1 participant