Skip to content

LOG-6661: fix inconsistency for syslog facillity and severity templating #2958

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

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

jcantrill
Copy link
Contributor

Description

This change:

  • Restricts syslog.(severity|facility) to the template pattern supported elsewhere in the API
  • Removes the capability to use the 5.x syslog template notation (e.g. $$.message.foo)
  • Updates tests to validate changes

Links

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 7, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 7, 2025

@jcantrill: This pull request references LOG-6661 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 bug to target the "4.8.0" version, but no target version was set.

In response to this:

Description

This change:

  • Restricts syslog.(severity|facility) to the template pattern supported elsewhere in the API
  • Removes the capability to use the 5.x syslog template notation (e.g. $$.message.foo)
  • Updates tests to validate changes

Links

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.

@jcantrill jcantrill added release/6.2 and removed jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Feb 7, 2025
@openshift-ci openshift-ci bot requested review from alanconway and cahartma February 7, 2025 19:06
Copy link
Contributor

openshift-ci bot commented Feb 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2025
@jcantrill
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 7, 2025
@jcantrill
Copy link
Contributor Author

/test unit

@jcantrill
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2025
@@ -112,8 +112,8 @@ var _ = Describe("vector syslog clf output", func() {
spec.Syslog = &obs.Syslog{
URL: "tls://logserver:6514",
RFC: obs.SyslogRFC5424,
Facility: "$$.message.facility",
Severity: "$$.message.severity",
Facility: `{.facility||"none"}`,
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 "none" is not correct fallback value

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 it matters for the context of the test

@@ -1099,6 +1100,7 @@ type Syslog struct {
// local0 local1 local2 local3 local4 local5 local6 local7
//
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Pattern:=`^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$`
Copy link
Contributor

Choose a reason for hiding this comment

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

pattern not match kernel and other words without {}

@@ -1083,6 +1083,7 @@ type Syslog struct {
// Emergency Alert Critical Error Warning Notice Informational Debug
//
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Pattern:=`^\{(\.[a-zA-Z0-9_]+|\."[^"]+")(\.[a-zA-Z0-9_]+|\."[^"]+")*\}$`
Copy link
Contributor

Choose a reason for hiding this comment

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

pattern not match word without {}

@jcantrill
Copy link
Contributor Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 12, 2025
@jcantrill
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2025
@vparfonov
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2025
@vparfonov
Copy link
Contributor

/test unit

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD b9497a2 and 2 for PR HEAD 4ab008d in total

@jcantrill
Copy link
Contributor Author

/test functional

Copy link
Contributor

openshift-ci bot commented Feb 13, 2025

@jcantrill: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test ci-index-cluster-logging-operator-bundle
/test e2e-target
/test functional-target
/test images
/test lint
/test unit

The following commands are available to trigger optional jobs:

/test upgrade

Use /test all to run all jobs.

In response to this:

/test functional

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.

@jcantrill
Copy link
Contributor Author

/test functional-target

@jcantrill
Copy link
Contributor Author

/test e2e-target

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD d5cf253 and 1 for PR HEAD 4ab008d in total

@vparfonov
Copy link
Contributor

/test e2e-target

2 similar comments
@vparfonov
Copy link
Contributor

/test e2e-target

@jcantrill
Copy link
Contributor Author

/test e2e-target

Copy link
Contributor

openshift-ci bot commented Feb 14, 2025

@jcantrill: all tests passed!

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

@openshift-merge-bot openshift-merge-bot bot merged commit bd2e22a into openshift:master Feb 14, 2025
8 checks passed
@jcantrill jcantrill deleted the log6661_onmaster branch February 17, 2025 16:03
@jcantrill
Copy link
Contributor Author

/cherrypick release-6.1

@openshift-cherrypick-robot

@jcantrill: new pull request created: #2963

In response to this:

/cherrypick release-6.1

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.

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. lgtm Indicates that a PR is ready to be merged. release/6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants