Skip to content

ROX-34908: Add --no-serialized flag to walker and pg-table-bindings#21014

Open
dashrews78 wants to merge 4 commits into
masterfrom
dashrews/no-serialized-ROX-34908-walker-schema-2
Open

ROX-34908: Add --no-serialized flag to walker and pg-table-bindings#21014
dashrews78 wants to merge 4 commits into
masterfrom
dashrews/no-serialized-ROX-34908-walker-schema-2

Conversation

@dashrews78

@dashrews78 dashrews78 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Walker gains WalkOption/WithNoSerialized() to produce schemas where all
proto fields become individual DB columns with no serialized bytea blob.
Field.Include() returns true for all fields in this mode. The
pg-table-bindings generator accepts --no-serialized and passes it through
to the walker and templates. Also adds MessageBytes DataType for future
use with inlined repeated messages.

This is the foundational PR — no stores use the flag yet. The store
templates, search integration, and test proto follow in subsequent PRs.

Partially generated by AI.

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

Unit test and the rest of the stack.

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: cbd6ab12-f35f-43d0-932f-f52ab097d13f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dashrews/no-serialized-ROX-34908-walker-schema-2

Comment @coderabbitai help to get the list of available commands and usage tips.

@dashrews78

dashrews78 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 2474ba1. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.12.x-117-g2474ba14e5

dashrews78 and others added 2 commits June 9, 2026 06:54
Walker gains WalkOption/WithNoSerialized() to produce schemas where all
proto fields become individual DB columns with no serialized bytea blob.
Field.Include() returns true for all fields in this mode. The
pg-table-bindings generator accepts --no-serialized and passes it through
to the walker and templates. Also adds MessageBytes DataType for future
use with inlined repeated messages.

This is the foundational PR — no stores use the flag yet. The store
templates, search integration, and test proto follow in subsequent PRs.

Partially generated by AI.

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

Moves repeated-field storage strategy from a CLI flag to a per-field
proto annotation. A repeated message field tagged with
sql:"strategy(bytea)" is stored as a MessageBytes column instead of
creating a child table. This keeps schema definition in one place (the
proto file) rather than split between proto and gen.go.

Eliminates the need for the --repeated-field-strategy CLI flag.

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78 dashrews78 force-pushed the dashrews/no-serialized-ROX-34908-walker-schema-2 branch from 026eef1 to 7f03b70 Compare June 9, 2026 10:55
dashrews78 and others added 2 commits June 9, 2026 11:55
…no-serialized

Fix: addCommonFields incorrectly let root NoSerialized schemas fall into
the child-table else branch, adding a spurious idx PK. Restructured to
cleanly separate root vs child cases.

Fail generation if a proto field has sql:"-" when --no-serialized is
used — there is no serialized blob for excluded fields to fall back on.

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78 dashrews78 marked this pull request as ready for review June 9, 2026 17:06
@dashrews78 dashrews78 requested a review from a team as a code owner June 9, 2026 17:06
continue
}

if opts.RepeatedStrategy == "bytea" {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably fine, but do we want to log/handle a case where someone sets RepeatedStrategy to a different value?

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

@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-operator-e2e-tests 2474ba1 link false /test ocp-4-12-operator-e2e-tests
ci/prow/ocp-4-12-nongroovy-e2e-tests 2474ba1 link false /test ocp-4-12-nongroovy-e2e-tests
ci/prow/gke-qa-e2e-tests 2474ba1 link false /test gke-qa-e2e-tests
ci/prow/gke-nongroovy-e2e-tests 2474ba1 link true /test gke-nongroovy-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