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

Bug 1808118: Making logging parameter optional #727

Merged
merged 1 commit into from
Aug 29, 2020
Merged

Bug 1808118: Making logging parameter optional #727

merged 1 commit into from
Aug 29, 2020

Conversation

ricardomaraschini
Copy link
Contributor

Logging has been deprecated in favour of LogLevel, therefore this field
is now optional and should so be updated on api accordingly.

Logging has been deprecated in favour of LogLevel, therefore this field
is now optional and should so be updated on api accordingly.
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Aug 25, 2020
@openshift-ci-robot
Copy link

@ricardomaraschini: This pull request references Bugzilla bug 1808118, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

WIP - Bug 1808118: Making logging parameter optional

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.

@ricardomaraschini ricardomaraschini changed the title WIP - Bug 1808118: Making logging parameter optional Bug 1808118: Making logging parameter optional Aug 26, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 26, 2020
@ricardomaraschini
Copy link
Contributor Author

/assign @dmage

As soon as I have your OK on this matter I will assign someone else.

@@ -81,6 +81,7 @@ type ImageRegistrySpec struct {
// replicas determines the number of registry instances to run.
Replicas int32 `json:"replicas"`
// logging is deprecated, use logLevel instead.
// +optional
Logging int64 `json:"logging"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to have omitempty there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Zero is unfortunately still a valid value. BTW, now that LogLevel has a default value it screw up the whole logic and I gonna have to rethink the PR on CIRO.

Copy link
Contributor

Choose a reason for hiding this comment

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

defaulting to 2 or whatever corresponds to Normal would be an option too.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sttts how defaulting works for upgraded clusters? Will we see the default value after upgrades if the previous version didn't have this field? Or we'll see a zero value?

I'm more curious about logLevel, we expected to see an empty string there.

Copy link
Contributor

Choose a reason for hiding this comment

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

We will see the default. It is applied when receiving something from a client and when reading from etcd.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this is not an option. We can't know if logging was deliberately set to 0 or it is the default integer value. If set by the user we should use "error" if not then we should be using LogLevel field instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we care about logLevels so much? Would ignore the zero here, deprecate and be done with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sttts why do we need this defaulter? I'd rather remove this defaulter than invent some weird aggregator for these fields.

Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed it on today's scrum, we'll use maximum of both

Copy link
Contributor

@sttts sttts Aug 29, 2020

Choose a reason for hiding this comment

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

why do we need this defaulter?

Why do you build non-future proof APIs ? You should never depend on unspecified vs. default value (vs. zero value) of other fields.

@dmage
Copy link
Contributor

dmage commented Aug 28, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2020
@sttts
Copy link
Contributor

sttts commented Aug 29, 2020

/approve

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dmage, ricardomaraschini, sttts

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-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 8a3a835 into openshift:master Aug 29, 2020
@openshift-ci-robot
Copy link

@ricardomaraschini: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state.

Bugzilla bug 1808118 has not been moved to the MODIFIED state.

In response to this:

Bug 1808118: Making logging parameter optional

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.

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. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants