Repository navigation
Conversation
Vertica had no override, so it fell back to dbt's default__current_timestamp_in_utc_backcompat, which is just the session-local current_timestamp. With the CI container on America/Los_Angeles, the "UTC" timestamp lagged real UTC by 7 hours, so between 00:00 and 07:00 UTC freshness SLA deadlines looked unpassed and metric stability baselines looked unsettled, and tests that should fail passed. Use current_timestamp at time zone 'UTC' instead, and note in the compose file that the non-UTC TZ is intentional. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
👋 @joostboon |
This branch has not been deployed
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.
Problem
The Vertica CI job fails 12 tests whenever it runs between roughly 00:00 and 07:00 UTC, all with
'pass' == 'fail':test_data_freshness_sla.py:test_no_data_fails,test_stale_data_fails,test_with_where_expressiontest_metric_stability.py:detects_restated_settled_value,detects_restatement_in_any_column,first_check_catches_gradual_drift,quoted_column_details[first_check|last_check],reports_disappearing_bucket[dimensions0|1],reports_disappearing_dimension,tolerates_change_within_thresholdRoot cause
There was no
vertica__edr_current_timestamp_in_utc, so the default implementation used dbt'sdefault__current_timestamp_in_utc_backcompat, which is simplycurrent_timestamp::timestampin the session's local time zone. The CI container runs withTZ=America/Los_Angeles, so the "UTC" timestamp lagged real UTC by 7 hours. During early UTC hours that meant:current_timestamp_in_utc > sla_deadline_utcwas still false, so stale or missing data was not flagged;updated_atearlier than the bucket's settle time, so they were never used as a baseline and restatements went undetected.Fix
Add
vertica__edr_current_timestamp_in_utcreturningcast(current_timestamp at time zone 'UTC' as timestamp). This also fixes the same skew for real Vertica deployments whose server is not set to UTC.The container
TZis left as is and now has a comment explaining it is intentionally non-UTC, since that is what surfaced this bug.Verification
Ran locally against
ghcr.io/ratiopbc/vertica-cewith the container clock skewed:Etc/GMT+12(UTC-12, local date one day behind)Etc/GMT+12Etc/GMT-14(UTC+14)🤖 Generated with Claude Code
Summary by CodeRabbit