Sanitize URL in version check logs to avoid exposing credentials
Strip embedded userinfo (user:password@) from URLs before logging
or including them in error messages, resolving CodeQL alert.
Co-authored-by: alex.s <alex.s@prefect.io>
Co-Authored-By: alex.s <ajstreed1@gmail.com>
Add tests for registry-based exit code messages in executor
Verify that:
- Crashed state message includes the registry explanation
- Resolution hint is logged as a separate INFO message
Co-authored-by: Alexander Streed <alex.s@prefect.io>
Co-Authored-By: alex.s <ajstreed1@gmail.com>
Fix env var leakage between concurrent deployments in worker
Deep-copy base_job_template['job_configuration'] in
BaseJobConfiguration.from_template_and_values() to prevent mutations
from propagating across concurrent flow runs that share the same
cached work pool template.
Closes #21043
Co-authored-by: Alexander Streed <desertaxle@users.noreply.github.com>
Co-Authored-By: alex.s <ajstreed1@gmail.com>
Fix flaky test_bulk_delete_by_state_type with SQLite timeout increase and retry_asserts
The test intermittently fails with a 503 (Service Unavailable) response due to
SQLite 'database is locked' errors. The hosted API server subprocess and test
fixtures like clear_db compete for the SQLite write lock, and the test mode
busy_timeout (30s) was lower than production (60s) despite tests having more
concurrent lock contention from parallel execution.
Two-part fix:
1. Broader: Unify SQLite busy_timeout to 60s for both test and production modes,
and increase the connect_args timeout to match. This reduces SQLite lock errors
across the entire test suite.
2. Targeted: Use the existing retry_asserts utility to retry the HTTP request and
assertions on transient 503 failures, matching the pattern used in other tests
(e.g., test_deployments.py, test_workers.py).
Co-authored-by: bot_apk <apk@cognition.ai>