Repository navigation
fix(teched): make /build/teched feed query HANA-compatible - #2402
Merged
Merged
Conversation
The loadTechEdFeed session query seeded its WHERE with `where`1 = 1`` and
bound the all-day flag as `allDay = ${true}`. Both trip the HANA hdb driver
at param-binding time ("Cannot set parameter at row: 1. Argument must be a
string"), so /build/teched returned {error:...} on DEV and every /teched
island (grid/schedule/calendar) failed to load real data. SQLite tolerates
both forms, so the in-memory unit tests passed and the regression only
surfaced against deployed HANA.
Build the WHERE incrementally without the 1=1 seed — the first active
predicate uses `.where`, later ones chain via `.and` — and use the SQL
literal `TRUE` instead of a bound boolean. Verified against DEV HANA: all
opt paths ({}, upcoming, venue, venue+upcoming) return rows; 344 sessions
carry the sap.com url, 2 all-day rows present, upcoming filter keeps them.
Note: the same `where`1 = 1`` pattern exists in srv/lib/mcp-events-search.js
and mcp-teched-search.js, and a bound `${true}` in mcp-channels-search.js —
latent HANA hazards on those MCP search paths, out of scope here.
Refs #2392
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.
Summary
/build/techedreturned{error: "Cannot set parameter at row: 1. Argument must be a string"}on DEV after the issue TechEd DEV branch Enhancements #2392 merges, breaking all three/techedislands (grid, schedule, calendar) — they fell back to a broken feed and showed no real data.loadTechEdFeedseeded its WHERE withwhere`1 = 1`and bound the all-day flag asallDay = ${true}. The HANAhdbdriver rejects the numeric1literals and the JS boolean as bound params. SQLite tolerates both, so the in-memory unit tests were green and the regression was HANA-only.1=1seed (first active predicate uses.where, rest chain via.and); use the SQL literalTRUEinstead of a bound${true}.Verification (deployed DEV HANA)
Ran the fixed
loadTechEdFeedagainst the live DEVtutorials-hanacontainer for every opt path:{}{upcoming:true}{venue:'BERLIN'}{venue:'VIRTUAL', upcoming:true}Session URLs follow the sap.com catalog pattern, e.g.
https://www.sap.com/events/teched/berlin/flow/sap/te26/catalog/page/catalog/session/….Out of scope (flagged)
The same
where`1 = 1`pattern lives insrv/lib/mcp-events-search.jsandsrv/lib/mcp-teched-search.js, and a bound${true}insrv/lib/mcp-channels-search.js— latent HANA hazards on those MCP search paths. Not touched here; they need their own testing.Refs #2392