mengw15 opened a new pull request, #8723:
URL: https://github.com/apache/texera/pull/8723

   ### What changes were proposed in this PR?
   
   `bin/single-node/examples/load-examples.sh` derived the owner email that
   file-service matches dataset lookups against by concatenating `@example.com`
   onto the username. On a single-node deployment that never matches: the admin
   seeded from `USER_SYS_ADMIN_USERNAME` has the username itself as its email
   (`AuthResource.createAdminUser`), so the loader logged in as that admin, 
skipped
   its register branch, and every example file upload failed with
   `400 Dataset not found`. Both example datasets were created but left with no
   files and no version, so the two example workflows pointed at CSV paths that 
do
   not exist.
   
   The owner email now comes from the access token's `email` claim, which is
   whatever the server actually stored — correct for the seeded admin and for an
   account the script had to register itself. The register call keeps an
   `@`-shaped address, which the server's format check requires.
   
   Second, the loader now exits non-zero once it has logged an error. Each 
failure
   is still non-fatal so one bad file does not abandon the rest, but they used 
to
   leave no trace: the container printed `=== Example data loading complete ===`
   and exited 0. That is why the broken lookup went unnoticed for two months.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8721.
   
   Introduced by #6402, which had to give the register call a regex-valid 
address
   and changed the shared variable rather than splitting its two roles.
   `release/v1.3` carries it too; `release/v1.2` and earlier do not.
   
   ### How was this PR tested?
   
   New `bin/single-node/tests/test_load_examples_sh.sh` (9 assertions, picked up
   automatically by build.yml's shell-test discovery) drives the loader against 
a
   stub `curl` — no docker, no network, no sleeping. It pins the owner email to 
the
   token's claim, asserts it is never `<username>@example.com`, and asserts 
that a
   failed upload or version create exits non-zero. Both fixes were reverted
   individually to confirm the relevant assertions go red and the suite exits 1.
   
   End to end on a fresh single-node deployment (`down --volumes` then
   `up --with-examples`): the loader now reports `Owner email resolved as 
'texera'`
   and uploads both files, `dataset_version` goes from 0 rows to 2 (both `v1`), 
and
   presigned download of the two paths the example workflows scan returns HTTP 
200.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-5)
   


-- 
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]

Reply via email to