Skip to content

Conversation

@tathagat2241
Copy link
Contributor

Issue

Configuration, Organization, Site, and Project queries were failing with 404 errors in both dev and prod environments.

Root Cause

  • All data in DynamoDB has lowercase gsi1pk values (e.g., "all_configurations", "all_sites")
  • Query code was looking for uppercase values (e.g., "ALL_CONFIGURATIONS", "ALL_SITES")
  • This case mismatch caused queries to return no results

Fix

Changed entityNameToAllPKValue() to generate lowercase values to match existing DynamoDB data.

Verification

Checked DynamoDB and confirmed ALL entities use lowercase:

  • Configuration: "all_configurations"
  • Organization: "all_organizations"
  • Site: "all_sites"
  • Project: "all_projects"

Impact

Fixes queries for all 9 entities using addAllIndex():
Configuration, Organization, Site, Project, Report, ImportJob, ScrapeJob, TrialUser, SiteCandidate

Testing

Will test in dev using gitpkg before final deployment.

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

@github-actions
Copy link

This PR will trigger a patch release when merged.

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.

2 participants