Skip to content

Conversation

@Ahmad-Hafe
Copy link
Contributor

@Ahmad-Hafe Ahmad-Hafe commented Dec 3, 2023

Short description:

I'm adding a new class to ocp_resources/resource.py

More details:

I need to track resource.instance.status.restartCount which is not applied to the wrapper

What this PR does / why we need it:

to get easy access to instance.status.restartCount

Which issue(s) this PR fixes:

None

Special notes for reviewer:

None

Bug:

None

@redhat-qe-bot
Copy link
Contributor

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).
  • To add a label by comment use /<label name>, to remove, use /<label name> cancel
Supported /retest check runs
  • /retest tox: Retest tox
  • /retest sonarqube: Retest sonarqube
  • /retest python-module-install: Retest python-module-install
Supported labels
  • hold
  • verified
  • wip
  • lgtm

Copy link
Contributor

@jpeimer jpeimer left a comment

Choose a reason for hiding this comment

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

Please remove gerrit links from the commit message

INSTALL_READY = "InstallReady"
SUCCEEDED = "Succeeded"

class restartCount:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not every resource has the restartCount field, so it doesn't look like this suppose to be here

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's more than one resource, it is OK to have it here (the other option is to have duplicates on multiple resources).

@Ahmad-Hafe which resources have restartCount ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think only pods/containers have restartCount. @Ahmad-Hafe is there any other resources?

Copy link
Contributor

Choose a reason for hiding this comment

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

and DataVolumes

Copy link
Collaborator

Choose a reason for hiding this comment

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

iiuc what you need, to get instance.status.restartCount should be a property and not a class

INSTALL_READY = "InstallReady"
SUCCEEDED = "Succeeded"

class restartCount:
Copy link
Collaborator

Choose a reason for hiding this comment

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

iiuc what you need, to get instance.status.restartCount should be a property and not a class

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.

6 participants