damccorm opened a new pull request, #41789:
URL: https://github.com/apache/beam/pull/41789

   Note: this PR was auto-generated by tooling. Before moving it out of draft, 
the author has done a full review of the PR, specifically evaluating it on the 
following criteria:
   
   - The PR is an appropriate fix for the issue (e.g. we're not changing a test 
to avoid a bug)
   - The PR is a simple fix to the issue (e.g. we're not adding infra when we 
could just modify a test)
   - The PR is not covering for other problems (e.g. if we're bumping timeouts, 
it is not because we're covering for a performance problem)
     
   Full details of the methodology of generation and review can be found here - 
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
   
   If you have concerns with the PR or with the underlying methodology used to 
generate this, please comment below - they will be addressed by the author not 
the tooling :)
   
   ## Summary
   
   Fixes concurrent PostgreSQL `UNIQUE` constraint name collisions in 
`CloudSQLVectorWriterConfigTest` in `PostCommit Python Xlang Gcp Dataflow` 
(https://github.com/apache/beam/actions/runs/45016515369).
   
   ## Root Cause
   
   `DatabaseTestHelper` created 
`python_rag_postgres__meta_conf_{10d_ts}{6_hex}` (47 characters) with an 
unnamed `UNIQUE (source, timestamp)` constraint. PostgreSQL auto-generates 
`{table_name}_source_timestamp_key` (68 characters) and silently truncates 
identifiers to `NAMEDATALEN - 1 = 63` bytes — chopping 5 of the 6 random hex 
characters and causing parallel/same-second test runs to collide on the same 
truncated constraint name.
   
   ## Changes
   
   - `sdks/python/apache_beam/ml/rag/ingestion/cloudsql_it_test.py`: Name the 
PostgreSQL constraint explicitly (`CONSTRAINT uq_meta_conf_{self.table_suffix} 
UNIQUE (source, timestamp)`, 29 bytes total) so the full random `table_suffix` 
is preserved well below PostgreSQL's 63-byte limit.
   
   ### Verification
   - Triggered `beam_PostCommit_Python_Xlang_Gcp_Dataflow.yml` workflow run on 
branch: [`46461730706`](https://github.com/apache/beam/actions/runs/46461730706)
   


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