Repository navigation
fix(devtoberfest): add missing EventRegistrations HANA sequence (#1600) - #1602
Merged
Merged
Conversation
The join handler calls getNextLegacyId('EventRegistrations') which on
HANA does SELECT NEXTVAL from COM_SAP_DEVELOPERS_IMS_EVENTREGISTRATIONS_SEQ.
That .hdbsequence artifact was never created — every other entity in
legacy-id.js's VALID_ENTITIES allowlist has one. The missing sequence made
the NEXTVAL query throw, so POST /api/devtoberfest/join returned 500 on
every environment (DEV + PROD). Unit tests passed because SQLite uses an
in-memory counter, not the sequence.
Add the sequence file (mirrors all sibling _SEQ artifacts) and add
EventRegistrations to the hybrid hana-sequences regression test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1600 — 500 error when registering for Devtoberfest (DEV + PROD).
Root cause
POST /api/devtoberfest/join(srv/routes/devtoberfest-auth.js) callsgetNextLegacyId('EventRegistrations', db). On HANA that runs:But that
.hdbsequenceartifact was never created.EventRegistrationsis in theVALID_ENTITIESallowlist insrv/lib/legacy-id.js, yet unlike all 30+ sibling entities it had nodb/src/*_SEQ.hdbsequencefile. The NEXTVAL query throws → the handler'scatchreturns500 INTERNAL. Environment-independent, which matches the DEV + PROD reports.Unit tests passed because the SQLite path in
getNextLegacyIduses an in-memory counter, never the sequence — so the HANA-only gap was invisible tonpm test.Fix
db/src/COM_SAP_DEVELOPERS_IMS_EVENTREGISTRATIONS_SEQ.hdbsequence(identical shape to every sibling sequence).EventRegistrationsto thetest/hybrid/hana-sequences.test.jsdeployed-sequence list so the regression is guarded.Deploy note
This introduces a new HDI artifact, so it requires a DB module deploy (not backend-only) to create the sequence in the HDI container before the join endpoint recovers.
Test
test/unit/devtoberfest-join-handler.test.js— 9 passed.hana-sequences.test.jsnow asserts the new sequence resolves NEXTVAL (requirescf login, run in CI/hybrid).