Skip to content

CONSOLE-5108: Improve K8sResourceCommon docs#16097

Open
logonoff wants to merge 1 commit intoopenshift:mainfrom
logonoff:CONSOLE-5108-s3e9-the-convict
Open

CONSOLE-5108: Improve K8sResourceCommon docs#16097
logonoff wants to merge 1 commit intoopenshift:mainfrom
logonoff:CONSOLE-5108-s3e9-the-convict

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Mar 3, 2026

  • Fully typed ManagedFieldsEntry
  • Fully described OwnerReference, ObjectMetadata, and K8sResourceCommon
  • The above types are interfaces instead of types now

Summary by CodeRabbit

Release Notes

  • Refactor

    • Enhanced type definitions for Kubernetes resource metadata structures with improved field documentation and explicitness.
    • Improved type safety throughout core components by adding explicit type assertions and refining metadata handling logic.
  • Tests

    • Updated test cases to align with refined type definitions and improved type casting practices.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 3, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 3, 2026

@logonoff: This pull request references CONSOLE-5018 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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 requested review from cajieh and rhamilto March 3, 2026 19:27
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dev-console Related to dev-console labels Mar 3, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff

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

The pull request process is described 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 added component/knative Related to knative-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. component/sdk Related to console-plugin-sdk plugin-api-changed Categorizes a PR as containing plugin API changes labels Mar 3, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 3, 2026

@logonoff: This pull request references CONSOLE-5018 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Fully typed ManagedFieldsEntry
  • Fully described OwnerReference, ObjectMetadata, and K8sResourceCommon
  • The above types are interfaces instead of types now

Summary by CodeRabbit

Release Notes

  • Refactor

  • Enhanced type definitions for Kubernetes resource metadata structures with improved field documentation and explicitness.

  • Improved type safety throughout core components by adding explicit type assertions and refining metadata handling logic.

  • Tests

  • Updated test cases to align with refined type definitions and improved type casting practices.

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.

@logonoff logonoff changed the title CONSOLE-5018: Improve K8sResourceCommon docs CONSOLE-5108: Improve K8sResourceCommon docs Mar 3, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Mar 3, 2026

@logonoff: This pull request references CONSOLE-5108 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

  • Fully typed ManagedFieldsEntry
  • Fully described OwnerReference, ObjectMetadata, and K8sResourceCommon
  • The above types are interfaces instead of types now

Summary by CodeRabbit

Release Notes

  • Refactor

  • Enhanced type definitions for Kubernetes resource metadata structures with improved field documentation and explicitness.

  • Improved type safety throughout core components by adding explicit type assertions and refining metadata handling logic.

  • Tests

  • Updated test cases to align with refined type definitions and improved type casting practices.

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.

@logonoff logonoff force-pushed the CONSOLE-5108-s3e9-the-convict branch from c32dd14 to 1451898 Compare March 3, 2026 19:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 3, 2026

📝 Walkthrough

Walkthrough

This pull request refactors Kubernetes-like type definitions in the console SDK from type aliases to interfaces, introducing a new ManagedFieldsEntry interface and expanding ObjectMetadata with additional fields including deletionTimestamp, finalizers, generateName, generation, labels, managedFields, ownerReferences, and resourceVersion. The OwnerReference interface gains a blockOwnerDeletion field. Across the codebase, explicit type assertions are added to ensure omitted-field operations maintain proper TypeScript compatibility, and translation function calls are updated to pass named parameter objects rather than entire metadata objects for improved clarity.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims to improve K8sResourceCommon docs, but the changeset refactors multiple type definitions into interfaces with expanded fields and adds new types, going well beyond documentation. Revise the title to accurately reflect the scope: consider 'CONSOLE-5018: Refactor K8sResourceCommon and related types to interfaces with expanded metadata fields' or similar to match the actual structural changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@logonoff
Copy link
Member Author

logonoff commented Mar 3, 2026

/label px-approved
/label docs-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Mar 3, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

@logonoff: 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/e2e-gcp-console 1451898 link true /test e2e-gcp-console
ci/prow/images 1451898 link true /test images

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dev-console Related to dev-console component/knative Related to knative-plugin component/sdk Related to console-plugin-sdk docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. plugin-api-changed Categorizes a PR as containing plugin API changes px-approved Signifies that Product Support has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants