Repository navigation
fix(#977): qualify DeveloperEnvironmentTabs via-name to fix anonymize 'no such table' in CI - #3164
Merged
Thomas Jung (jung-thomas) merged 1 commit intoNov 21, 2026
Conversation
…cade
The data-subject resolver returned the nested-marker `via: 'DeveloperEnvironmentTabs'`
(bare name). The GDPR anonymize actions are bound to the served AdminService, so
the cascade's `SELECT.from('DeveloperEnvironmentTabs')` resolved to the AdminService
*projection* in that request context and CAP emitted literal
`SELECT ID FROM DeveloperEnvironmentTabs` — a table that does not exist (the physical
table is com_sap_developers_ims_DeveloperEnvironmentTabs). Result: 500 'no such table:
DeveloperEnvironmentTabs' in anonymizeUser/anonymizeByDsrRequest, reddening the unit
suite on CI (green in isolation / direct-db unit context, where the bare name resolves
to the db entity).
Qualify `via` to the full CDS name so it always resolves to the db-layer entity and the
correct namespaced table, in both the served and direct-db contexts. Update the two
tests that asserted the old bare marker/SQL.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Thomas Jung (jung-thomas)
deleted the
worktree-fix-unit-test-pollution-977
branch
November 21, 2026 18:12
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.
The real root cause (supersedes #3160)
PR #3160 was merged but did not fix the red
unit tests— it changed a test's deploy on a disproven cross-file-pollution theory. The actual bug is in the GDPR anonymize cascade.srv/lib/data-subject-resolver.jsreturned the nested-marker with a bare entity name:The GDPR anonymize actions (
anonymizeUser/anonymizeByDsrRequest) are bound to the served AdminService. In that request context, the cascade'sSELECT.from('DeveloperEnvironmentTabs')resolves to the AdminService projection of that name, and CAP emits literal:There is no such physical table (it's
com_sap_developers_ims_DeveloperEnvironmentTabs) → 500 'no such table: DeveloperEnvironmentTabs', failingadmin-service.test.jsandanonymize-dsr-request-number.test.js.Why it was CI-only / green in isolation
The resolver's own unit tests exercise the cascade against
cds.dbdirectly, where the bare name resolves to the db entity and works. Only the served OData path (which the two failing files use viacds.test('serve')) mis-resolves the bare name against the service projection. I verified both names run fine against the direct db; only the served context diverges.Fix
Qualify
viato the full CDS namecom.sap.developers.ims.DeveloperEnvironmentTabs, which resolves to the db-layer entity (correct namespaced table) in both contexts. Updated the two tests that asserted the old bare marker / CQN.Verification
data-subject-resolver,anonymization-cascade-authorid-gap,admin-service,anonymize-dsr-request-number,data-privacy-export,data-privacy-model.unitCI on this PR (the failure is served-context + CI-specific; I could not reproduce it in local scoped subsets, consistent with the mechanism).Follow-ups (not in this PR)
kg-featured-topics-job.test.jschange merged in fix(test): stop CDS singleton leak reddening anonymize unit tests in CI #3160 is harmless; optional to revert its misleading commit message.srv/lib/published-concepts-query.jsorders lists non-deterministically (#3135published-concepts-query*.test.jsfail pairwise). Worth a separate issue.🤖 Generated with Claude Code