mengw15 commented on code in PR #7789:
URL: https://github.com/apache/texera/pull/7789#discussion_r3826068766
##########
sql/updates/36.sql:
##########
@@ -80,22 +98,32 @@ BEGIN
op,
'{operatorProperties,fileName}',
CASE
- WHEN f.fn IS NOT NULL AND left(f.fn, 10) <>
'/datasets/'
+ WHEN f.fn ~ '^/datasets/'
+ AND EXISTS (SELECT 1 FROM dataset d JOIN "user" u
ON d.owner_uid = u.uid
+ WHERE u.email =
split_part(ltrim(f.fn, '/'), '/', 2)
+ AND d.name =
split_part(ltrim(f.fn, '/'), '/', 3))
+ THEN to_jsonb(regexp_replace(f.fn, '^/datasets/',
'/dataset/'))
Review Comment:
This branch can't reach the databases that need it. Liquibase picks
changeSets by ID alone — `bin/local-dev/main.sh:1824` skips on a match in
`databasechangelog` without looking at the file — so the only databases holding
`/datasets/` paths are the ones that already recorded id 36 and will never
re-run it. A database that never ran 36 gets `/dataset/`; one that ran the old
36 keeps `/datasets/` while the code now only resolves `/dataset/`.
It's quiet, too: `local-dev` leaves `MD5SUM` NULL by design (main.sh:1810),
so nothing complains and the stale paths surface only when someone opens one of
those workflows. The 13 fixtures and the k8s run both pipe the SQL in directly,
so they cover the statements but not the tracking that skips them.
Restoring `36.sql` and adding a `38.sql` for the plural rewrite converges
from both states and keeps 36's checksum intact.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]