Skip to content

ROX-33417: add timestamptz support via proto tag#19249

Open
dashrews78 wants to merge 4 commits intomasterfrom
dashrews/allow-timestampz-33417
Open

ROX-33417: add timestamptz support via proto tag#19249
dashrews78 wants to merge 4 commits intomasterfrom
dashrews/allow-timestampz-33417

Conversation

@dashrews78
Copy link
Contributor

@dashrews78 dashrews78 commented Mar 2, 2026

Description

Add DateTimeTZ DataType so that timestamp proto fields tagged with
sql:"type(timestamptz)" generate PostgreSQL timestamptz columns
instead of timestamp. The search framework reuses the existing
newTimeQuery path, keeping query behavior identical.

Update code-generation templates (store, singleton, migration_tool) to
emit protocompat.NilOrTime for datetimetz fields. Add a timestamptz
field to TestSingleKeyStruct to exercise the new code path.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

UT sufficient for now. Real testing will occur when types such as virtual machines V2 begin to use it.

@dashrews78 dashrews78 requested a review from a team as a code owner March 2, 2026 15:56
@dashrews78
Copy link
Contributor Author

dashrews78 commented Mar 2, 2026

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 2, 2026

Images are ready for the commit at 6ac7ba2.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-217-g6ac7ba236e.

@dashrews78
Copy link
Contributor Author

/retest

@codecov
Copy link

codecov bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 63.63636% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.64%. Comparing base (5c39661) to head (18cb187).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pkg/postgres/walker/walker.go 0.00% 5 Missing ⚠️
pkg/search/postgres/query_metadata.go 66.66% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19249   +/-   ##
=======================================
  Coverage   49.63%   49.64%           
=======================================
  Files        2679     2679           
  Lines      202130   202149   +19     
=======================================
+ Hits       100319   100348   +29     
+ Misses      94333    94324    -9     
+ Partials     7478     7477    -1     
Flag Coverage Δ
go-unit-tests 49.64% <63.63%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dashrews78 and others added 4 commits March 2, 2026 14:45
Add DateTimeTZ DataType so that timestamp proto fields tagged with
`sql:"type(timestamptz)"` generate PostgreSQL `timestamptz` columns
instead of `timestamp`. The search framework reuses the existing
newTimeQuery path, keeping query behavior identical.

Update code-generation templates (store, singleton, migration_tool) to
emit protocompat.NilOrTime for datetimetz fields. Add a timestamptz
field to TestSingleKeyStruct to exercise the new code path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add timestamptz field to TestStruct proto and add TestTimeTZ and
TestTimeTZHighlights integration tests mirroring the existing timestamp
tests. These exercise the full DateTimeTZ code path end-to-end: schema
generation, pgtype.Timestamptz scanning, and newTimeQuery dispatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78
Copy link
Contributor Author

/retest

@dashrews78
Copy link
Contributor Author

/test ocp-4-20-operator-e2e-tests

@dashrews78
Copy link
Contributor Author

/test ocp-4-20-qa-e2e-tests

@openshift-ci
Copy link

openshift-ci bot commented Mar 3, 2026

@dashrews78: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ocp-4-12-scanner-v4-install-tests 6ac7ba2 link false /test ocp-4-12-scanner-v4-install-tests
ci/prow/ocp-4-20-operator-e2e-tests 6ac7ba2 link false /test ocp-4-20-operator-e2e-tests

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants