Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class-generator: update schema and add PodMetrics #2315

Merged
merged 4 commits into from
Feb 12, 2025
Merged

class-generator: update schema and add PodMetrics #2315

merged 4 commits into from
Feb 12, 2025

Conversation

myakove
Copy link
Collaborator

@myakove myakove commented Feb 10, 2025

Summary by CodeRabbit

  • New Features

    • Introduced an enhanced capability for managing and tracking pod resource metrics with improved initialization and data serialization.
  • Chores

    • Updated versioning information to reflect the latest release.
  • Documentation

    • Reformatted class documentation for improved clarity in the Machine class.

Copy link

coderabbitai bot commented Feb 10, 2025

Walkthrough

This pull request updates the cluster version file and introduces a new class in the pod metrics module. The version number in class_generator/__cluster_version__.txt has been incremented from v1.31.2 to v1.31.4. Additionally, a new PodMetrics class is implemented in ocp_resources/pod_metrics.py, which includes initialization, serialization via a to_dict method, explicit typing for the api_group attribute, and error handling for required attributes.

Changes

File(s) Change Summary
class_generator/__cluster_version__.txt Updated version number from v1.31.2 to v1.31.4.
ocp_resources/pod_metrics.py Added new PodMetrics class extending NamespacedResource with a constructor (__init__) accepting optional parameters, a to_dict method for serialization, and explicit typing for api_group with error handling for missing attributes.
class_generator/tests/manifests/Machine/machine.py Reformatted class documentation for Machine, splitting the description into two lines for clarity without altering functionality.

Possibly related issues

Possibly related PRs

Suggested labels

verified, can-be-merged, approved-rnetser, JIRA:MSINTEROP-1446

Suggested reviewers

  • rnetser
  • dbasunag
  • omrirh

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60522c5 and df4b4ef.

📒 Files selected for processing (1)
  • class_generator/tests/manifests/Machine/machine.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: python-module-install
  • GitHub Check: tox
🔇 Additional comments (2)
class_generator/tests/manifests/Machine/machine.py (2)

11-12: LGTM! Improved docstring formatting.

The split of the docstring into separate lines for the schema description and compatibility information improves readability while maintaining the same content.


71-71: Verify the return type annotation of to_dict.

The method is annotated to return None but appears to be modifying internal state. Please verify if this is intentional or if it should return a dictionary like typical serialization methods.

Let's check the parent class implementation:

✅ Verification successful

🏁 Script executed:

#!/bin/bash
# Description: Check the parent class implementation of to_dict
ast-grep --pattern $'class NamespacedResource {
  $$$
  to_dict($$$) {
    $$$
  }
  $$$
}'

Length of output: 92


I'll run a new script to search for the parent class definition of NamespacedResource along with its to_dict method to see its expected return type.


🏁 Script executed:

#!/bin/bash
# Search for the parent class definition and its context around to_dict
rg -A 20 "class NamespacedResource:" .

Length of output: 40


Let's perform an additional search for the definition of NamespacedResource to better understand the parent class's to_dict implementation.


🏁 Script executed:

#!/bin/bash
# Search for any occurrence of 'NamespacedResource' within the repository.
rg -n "class NamespacedResource" .

Length of output: 105


Let's run a new script to search for the definition of the to_dict method within the file that defines NamespacedResource to better understand its behavior.


🏁 Script executed:

#!/bin/bash
# Search for the definition of 'to_dict' in the file containing 'NamespacedResource'
rg -n "def to_dict" ocp_resources/resource.py

Length of output: 118


Return Type Annotation Matches Parent Design.

After verifying that the parent class in ocp_resources/resource.py defines to_dict with a return type of None (as seen by the signatures at lines 577 and 1402), it appears that the generated code's implementation in class_generator/tests/manifests/Machine/machine.py is consistent with the repository's design. No modifications are necessary.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@redhat-qe-bot1
Copy link

Report bugs in Issues

The following are automatically added:

  • Add reviewers from OWNER file (in the root of the repository) under reviewers section.
  • Set PR size label.
  • New issue is created for the PR. (Closed when PR is merged/closed)
  • Run pre-commit if .pre-commit-config.yaml exists in the repo.

Available user actions:

  • To mark PR as WIP comment /wip to the PR, To remove it from the PR comment /wip cancel to the PR.
  • To block merging of PR comment /hold, To un-block merging of PR comment /hold cancel.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To cherry pick a merged PR comment /cherry-pick <target branch to cherry-pick to> in the PR.
    • Multiple target branches can be cherry-picked, separated by spaces. (/cherry-pick branch1 branch2)
    • Cherry-pick will be started when PR is merged
  • To build and push container image command /build-and-push-container in the PR (tag will be the PR number).
    • You can add extra args to the Podman build command
      • Example: /build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=<commit_hash>
  • To add a label by comment use /<label name>, to remove, use /<label name> cancel
  • To assign reviewers based on OWNERS file use /assign-reviewers
  • To check if PR can be merged use /check-can-merge
  • to assign reviewer to PR use /assign-reviewer @<reviewer>
Supported /retest check runs
  • /retest tox: Retest tox
  • /retest python-module-install: Retest python-module-install
  • /retest all: Retest all
Supported labels
  • hold
  • verified
  • wip
  • lgtm

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
ocp_resources/pod_metrics.py (2)

10-13: Enhance the docstring with more details.

Consider expanding the docstring to provide more context about pod metrics, such as what metrics are collected, their purpose, and how they are used.

 class PodMetrics(NamespacedResource):
     """
-    PodMetrics sets resource usage metrics of a pod.
+    PodMetrics represents resource usage metrics of a pod, including CPU and memory
+    consumption of its containers. These metrics are collected within a specified
+    time window and are used for monitoring, autoscaling, and resource optimization.
     """

17-42: Enhance the constructor docstring.

The docstring could be improved by:

  • Adding return type documentation
  • Including type information in parameter descriptions
  • Adding examples of valid values
     def __init__(
         self,
         containers: list[Any] | None = None,
         timestamp: str | None = None,
         window: str | None = None,
         **kwargs: Any,
     ) -> None:
         """
+        Initialize a PodMetrics instance.
+
         Args:
-            containers (list[Any]): Metrics for all containers are collected within the same time window.
+            containers (list[Any] | None): List of container metrics objects. Each object contains
+                resource usage data (CPU, memory) for a container.
+                Example: [{"name": "container1", "usage": {"cpu": "100m", "memory": "256Mi"}}]

-            timestamp (str): Time is a wrapper around time.Time which supports correct marshaling
-              to YAML and JSON.  Wrappers are provided for many of the factory
-              methods that the time package offers.
+            timestamp (str | None): RFC3339 timestamp when metrics were collected.
+                Example: "2024-02-15T10:30:00Z"

-            window (str): Duration is a wrapper around time.Duration which supports correct
-              marshaling to YAML and JSON. In particular, it marshals into
-              strings, which can be used as map keys in json.
+            window (str | None): Duration over which metrics were collected.
+                Example: "5m" for 5 minutes

+            **kwargs (Any): Additional arguments passed to the parent class.
+
+        Returns:
+            None
         """
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 790c85a and 60522c5.

⛔ Files ignored due to path filters (205)
  • class_generator/schema/__not-kind.txt is excluded by !class_generator/schema/**
  • class_generator/schema/__resources-mappings.json is excluded by !class_generator/schema/**
  • class_generator/schema/_definitions.json is excluded by !class_generator/schema/**
  • class_generator/schema/aaq.json is excluded by !class_generator/schema/**
  • class_generator/schema/aaqlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/all.json is excluded by !class_generator/schema/**
  • class_generator/schema/apiresource.json is excluded by !class_generator/schema/**
  • class_generator/schema/apiresourcelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/backingstore.json is excluded by !class_generator/schema/**
  • class_generator/schema/backingstorelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/bucketclass.json is excluded by !class_generator/schema/**
  • class_generator/schema/bucketclasslist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cdi.json is excluded by !class_generator/schema/**
  • class_generator/schema/cdiconfig.json is excluded by !class_generator/schema/**
  • class_generator/schema/cdiconfiglist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cdilist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephblockpool.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephblockpoollist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephblockpoolradosnamespace.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephblockpoolradosnamespacelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephbucketnotification.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephbucketnotificationlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephbuckettopic.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephbuckettopiclist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephclient.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephclientlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephcluster.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephclusterlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephconnection.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephconnectionlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephcosidriver.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephcosidriverlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystem.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystemlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystemmirror.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystemmirrorlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystemsubvolumegroup.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephfilesystemsubvolumegrouplist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephnfs.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephnfslist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectrealm.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectrealmlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectstore.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectstorelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectstoreuser.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectstoreuserlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectzone.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectzonegroup.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectzonegrouplist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephobjectzonelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephrbdmirror.json is excluded by !class_generator/schema/**
  • class_generator/schema/cephrbdmirrorlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/clientprofile.json is excluded by !class_generator/schema/**
  • class_generator/schema/clientprofilelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/clientprofilemapping.json is excluded by !class_generator/schema/**
  • class_generator/schema/clientprofilemappinglist.json is excluded by !class_generator/schema/**
  • class_generator/schema/clustercatalog.json is excluded by !class_generator/schema/**
  • class_generator/schema/clustercataloglist.json is excluded by !class_generator/schema/**
  • class_generator/schema/clusterextension.json is excluded by !class_generator/schema/**
  • class_generator/schema/clusterextensionlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/csiaddonsnode.json is excluded by !class_generator/schema/**
  • class_generator/schema/csiaddonsnodelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/dataimportcron.json is excluded by !class_generator/schema/**
  • class_generator/schema/dataimportcronlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/datasource.json is excluded by !class_generator/schema/**
  • class_generator/schema/datasourcelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/datavolume.json is excluded by !class_generator/schema/**
  • class_generator/schema/datavolumelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/driver.json is excluded by !class_generator/schema/**
  • class_generator/schema/driverlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/encryptionkeyrotationcronjob.json is excluded by !class_generator/schema/**
  • class_generator/schema/encryptionkeyrotationcronjoblist.json is excluded by !class_generator/schema/**
  • class_generator/schema/encryptionkeyrotationjob.json is excluded by !class_generator/schema/**
  • class_generator/schema/encryptionkeyrotationjoblist.json is excluded by !class_generator/schema/**
  • class_generator/schema/hostpathprovisioner.json is excluded by !class_generator/schema/**
  • class_generator/schema/hostpathprovisionerlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/hyperconverged.json is excluded by !class_generator/schema/**
  • class_generator/schema/hyperconvergedlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/imagepruner.json is excluded by !class_generator/schema/**
  • class_generator/schema/infrastructure.json is excluded by !class_generator/schema/**
  • class_generator/schema/kubestorageversionmigrator.json is excluded by !class_generator/schema/**
  • class_generator/schema/kubevirt.json is excluded by !class_generator/schema/**
  • class_generator/schema/kubevirtlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolume.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumediscovery.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumediscoverylist.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumediscoveryresult.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumediscoveryresultlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumeset.json is excluded by !class_generator/schema/**
  • class_generator/schema/localvolumesetlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/machine.json is excluded by !class_generator/schema/**
  • class_generator/schema/machinehealthcheck.json is excluded by !class_generator/schema/**
  • class_generator/schema/machineset.json is excluded by !class_generator/schema/**
  • class_generator/schema/migrationpolicy.json is excluded by !class_generator/schema/**
  • class_generator/schema/migrationpolicylist.json is excluded by !class_generator/schema/**
  • class_generator/schema/namespacestore.json is excluded by !class_generator/schema/**
  • class_generator/schema/namespacestorelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkaddonsconfig.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkaddonsconfiglist.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkfence.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkfenceclass.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkfenceclasslist.json is excluded by !class_generator/schema/**
  • class_generator/schema/networkfencelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/nmstate.json is excluded by !class_generator/schema/**
  • class_generator/schema/nmstatelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkconfigurationenactment.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkconfigurationenactmentlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkconfigurationpolicy.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkconfigurationpolicylist.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkstate.json is excluded by !class_generator/schema/**
  • class_generator/schema/nodenetworkstatelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/noobaa.json is excluded by !class_generator/schema/**
  • class_generator/schema/noobaaaccount.json is excluded by !class_generator/schema/**
  • class_generator/schema/noobaaaccountlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/noobaalist.json is excluded by !class_generator/schema/**
  • class_generator/schema/objectbucket.json is excluded by !class_generator/schema/**
  • class_generator/schema/objectbucketclaim.json is excluded by !class_generator/schema/**
  • class_generator/schema/objectbucketclaimlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/objectbucketlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/objecttransfer.json is excluded by !class_generator/schema/**
  • class_generator/schema/objecttransferlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/ocsinitialization.json is excluded by !class_generator/schema/**
  • class_generator/schema/ocsinitializationlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/olm.json is excluded by !class_generator/schema/**
  • class_generator/schema/olmlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/openstackvolumepopulator.json is excluded by !class_generator/schema/**
  • class_generator/schema/openstackvolumepopulatorlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/operatorconfig.json is excluded by !class_generator/schema/**
  • class_generator/schema/operatorconfiglist.json is excluded by !class_generator/schema/**
  • class_generator/schema/ovirtvolumepopulator.json is excluded by !class_generator/schema/**
  • class_generator/schema/ovirtvolumepopulatorlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/persistentvolumeclaimvolumesource.json is excluded by !class_generator/schema/**
  • class_generator/schema/recipe.json is excluded by !class_generator/schema/**
  • class_generator/schema/recipelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/reclaimspacecronjob.json is excluded by !class_generator/schema/**
  • class_generator/schema/reclaimspacecronjoblist.json is excluded by !class_generator/schema/**
  • class_generator/schema/reclaimspacejob.json is excluded by !class_generator/schema/**
  • class_generator/schema/reclaimspacejoblist.json is excluded by !class_generator/schema/**
  • class_generator/schema/route.json is excluded by !class_generator/schema/**
  • class_generator/schema/routelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/ssp.json is excluded by !class_generator/schema/**
  • class_generator/schema/ssplist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclaim.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclaimlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclient.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclientlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storagecluster.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclusterlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclusterpeer.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageclusterpeerlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageconsumer.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageconsumerlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageprofile.json is excluded by !class_generator/schema/**
  • class_generator/schema/storageprofilelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storagerequest.json is excluded by !class_generator/schema/**
  • class_generator/schema/storagerequestlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/storagesystem.json is excluded by !class_generator/schema/**
  • class_generator/schema/storagesystemlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachine.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclone.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclonelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclusterinstancetype.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclusterinstancetypelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclusterpreference.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineclusterpreferencelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineexport.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineexportlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstance.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancemigration.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancemigrationlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancepreset.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancepresetlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancereplicaset.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancereplicasetlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancetype.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachineinstancetypelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinepool.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinepoollist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinepreference.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinepreferencelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinerestore.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinerestorelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinesnapshot.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinesnapshotcontent.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinesnapshotcontentlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/virtualmachinesnapshotlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeclonesource.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeclonesourcelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplication.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplicationclass.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplicationclasslist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplicationcontent.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplicationcontentlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumegroupreplicationlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeimportsource.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeimportsourcelist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumereplication.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumereplicationclass.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumereplicationclasslist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumereplicationlist.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeuploadsource.json is excluded by !class_generator/schema/**
  • class_generator/schema/volumeuploadsourcelist.json is excluded by !class_generator/schema/**
📒 Files selected for processing (2)
  • class_generator/__cluster_version__.txt (1 hunks)
  • ocp_resources/pod_metrics.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • class_generator/cluster_version.txt
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: python-module-install
  • GitHub Check: tox
🔇 Additional comments (2)
ocp_resources/pod_metrics.py (2)

1-8: LGTM!

The imports are appropriate for the functionality being implemented, and the header comment provides useful information about code generation.


15-15: LGTM!

The explicit typing of api_group and its value from NamespacedResource.ApiGroup.METRICS_K8S_IO are appropriate.

@myakove
Copy link
Collaborator Author

myakove commented Feb 10, 2025

/verified

@myakove
Copy link
Collaborator Author

myakove commented Feb 12, 2025

/verified

@myakove
Copy link
Collaborator Author

myakove commented Feb 12, 2025

/verified

@rnetser
Copy link
Collaborator

rnetser commented Feb 12, 2025

/lgtm

@myakove myakove merged commit 54e9068 into main Feb 12, 2025
6 checks passed
@myakove myakove deleted the PodMetrics branch February 12, 2025 12:20
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.

7 participants