Skip to content

OCPBUGS-137031: Remove extra newline from featuregated CRD manifest reports - #3183

Open
redhat-chai-bot wants to merge 1 commit into
openshift:release-4.22from
redhat-chai-bot:ocpbugs-137031-api-report-newline-release-4.22
Open

redhat-chai-bot wants to merge 1 commit into
openshift:release-4.22from
redhat-chai-bot:ocpbugs-137031-api-report-newline-release-4.22

Conversation

@redhat-chai-bot

Copy link
Copy Markdown
Contributor

Summary

Write marshaled feature-gated CRD report entries directly instead of appending a second newline. The YAML marshaler already terminates each entry with a newline.

  • Add regression coverage for empty, single-entry and multiple-entry output, plus writer errors.
  • Regenerate the 35 combined report files, removing 112 blank lines without changing their parsed YAML content.
  • Leave API types, schemas, feature gates, module versions and verification scripts unchanged.

Validation

  • Regression tests pass under Go 1.25.10 and Go 1.26.0; restoring the old writer reproduces the single/multiple-entry failures.
  • Complete clean-room make update, including protobuf regeneration with protoc 23.4, reproduces the committed tree without changes.
  • Applicable release-4.22 CI commands pass locally: verification, CRD schema/crdify/feature-promotion checks, dependency checks, unit tests, lint and builds.
  • Local isolated integration tests: 4,899 passed, zero failed.
  • Client-go release-4.22 dependency vendoring, generation and build checks pass.
  • All 35 regenerated reports have identical parsed YAML; full-range git diff --check passes and the working tree is clean.

Actual Prow jobs and CI image builds have not run yet; they require this PR.


AI-generated. Review for accuracy.

@rikatz requested from Slack

Chai persona: NID Agentic SDLC

…eports

The empty-partial-schemas generator writes each CRD entry of the
zz_generated.featuregated-crd-manifests.yaml reports with
fmt.Fprintf(w, "%v\n", content). yaml.Marshal output already ends with
a newline, so every entry was followed by a blank line, including the
last one. As a result every report ended with a blank line at EOF,
which whitespace checks such as git diff --check flag in consumers
that vendor these files.

Write the marshaled entry bytes as they are, through a small
writeCRDInfoEntry helper, and add unit tests for the empty, single and
multiple entry cases and for writer error propagation.

Regenerate with make update. The 35 report files only lose their
blank lines; their YAML content and entry order are unchanged, and no
CRD manifest, schema or feature gate output changes.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification

This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration.

Use /test ? to list jobs and /pipeline help for commands.

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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

  • Source mode: Auto
  • Repository: openshift/api
  • Branch: release-4.22
  • File: .coderabbit.yaml
  • Commit: 5e2e491
  • Layers: Repository YAML (base), Central YAML (inherited)
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 9eebc2e0-806d-4682-ab9a-19e8b3b6d773

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

@openshift-ci-robot

Copy link
Copy Markdown

@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-137031, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.22.0) matches configured target version for branch (4.22.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-130323 is in the state Closed (Done), which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-130323 targets the "5.0.0" version, which is one of the valid target versions: 5.0.0, 5.0.z
  • bug has dependents

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Summary

Write marshaled feature-gated CRD report entries directly instead of appending a second newline. The YAML marshaler already terminates each entry with a newline.

  • Add regression coverage for empty, single-entry and multiple-entry output, plus writer errors.
  • Regenerate the 35 combined report files, removing 112 blank lines without changing their parsed YAML content.
  • Leave API types, schemas, feature gates, module versions and verification scripts unchanged.

Validation

  • Regression tests pass under Go 1.25.10 and Go 1.26.0; restoring the old writer reproduces the single/multiple-entry failures.
  • Complete clean-room make update, including protobuf regeneration with protoc 23.4, reproduces the committed tree without changes.
  • Applicable release-4.22 CI commands pass locally: verification, CRD schema/crdify/feature-promotion checks, dependency checks, unit tests, lint and builds.
  • Local isolated integration tests: 4,899 passed, zero failed.
  • Client-go release-4.22 dependency vendoring, generation and build checks pass.
  • All 35 regenerated reports have identical parsed YAML; full-range git diff --check passes and the working tree is clean.

Actual Prow jobs and CI image builds have not run yet; they require this PR.


AI-generated. Review for accuracy.

@rikatz requested from Slack

Chai persona: NID Agentic SDLC

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Hello @redhat-chai-bot! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 17, 2026
@openshift-ci
openshift-ci Bot requested review from danwinship and deads2k November 17, 2026 22:34
@openshift-ci

openshift-ci Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: The following test 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/verify acaae54 link true /test verify

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

Labels

jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants