console icon indicating copy to clipboard operation
console copied to clipboard

Remove namespaced and optional properties of k8s watch hooks

Open rawagner opened this issue 3 years ago • 8 comments

optional property was kept only for easier migration from Firehose to hook. But hook actually does not do anything with it.

namespaced - if I checked correctly, hook does not actually do anything with this prop either. Whether the resource is namespaced or not, is derived from the k8s model.

rawagner avatar Jun 01 '22 10:06 rawagner

Looks good to me, but should we simply remove these props?

You can simply omit them if writing a plugin for 4.10. And if they are present, it will only be a type error, correct? So it shouldn't break 4.10 plugins on 4.11 at runtime?

It's a good time to remove things if we can since 4.10 is still a tech preview.

That is true, it will be only type error.

I've updated the PR, the props are now removed.

There were 2 instances which used the optional prop to pass an info about the 'importance' of the resource. For that purpose I created a new type

export type WatchK8sResourcesOptional<R extends ResourcesObject> = {
  [k in keyof R]: WatchK8sResource & { optional?: boolean };
};

rawagner avatar Jun 02 '22 09:06 rawagner

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rawagner, vojtechszocs

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

The pull request process is described here

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[bot] avatar Jun 02 '22 19:06 openshift-ci[bot]

/retest

rawagner avatar Jun 03 '22 06:06 rawagner

/retest

rawagner avatar Jun 15 '22 10:06 rawagner

/retest

rawagner avatar Jun 21 '22 07:06 rawagner

@rawagner: 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/ceph-storage-plugin 3f0046c91144450d8e31dac5dfd95d0366c5eaef link true /test ceph-storage-plugin

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Jun 21 '22 07:06 openshift-ci[bot]

@rawagner: PR needs rebase.

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/test-infra repository.

openshift-ci[bot] avatar Jun 28 '22 01:06 openshift-ci[bot]

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Sep 26 '22 09:09 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Oct 27 '22 00:10 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Nov 26 '22 08:11 openshift-bot

@openshift-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

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/test-infra repository.

openshift-ci[bot] avatar Nov 26 '22 08:11 openshift-ci[bot]