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

Update logback.xml template for 2.0.0-M1 and make it optional #353

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

juldrixx
Copy link
Contributor

@juldrixx juldrixx commented Jan 11, 2024

Q A
Bug fix? no
New feature? yes
API breaks? no
Deprecations? no
Related tickets partial #360
License Apache 2.0

What's in this PR?

Update of the logback.xml template, to match the one in 2.0.0-M1.
And made it optional (by default disabled).

Why?

NiFi added new appender and updated some of them.
And there is no reason to override the default logback.xml with our template when we don't change anything in it.
I made a function to check if the template needs to be used, but right now it just return false because nothing seems to make use of the template.

Checklist

  • Implementation tested
  • Error handling code meets the guideline
  • Logging code meets the guideline
  • User guide and development docs updated (if needed)
  • Append changelog with changes

@juldrixx juldrixx requested review from erdrix and mh013370 and removed request for erdrix January 11, 2024 10:04
@mh013370
Copy link
Member

Was this logback.xml just copied from the 2.0.0-M1 baseline?

@mh013370
Copy link
Member

mh013370 commented Jan 11, 2024

We should also update the nifi-cluster helm chart logback.xml since it routes all of the appender output to the Console (stdout). It's verbatim copied and it includes an additional Console appender that basically accepts all the other appender outputs. Without this, only the bootstrap log appears in stdout, making it impossible to see nifi logs in something like the Rancher UI.

@juldrixx
Copy link
Contributor Author

Was this logback.xml just copied from the 2.0.0-M1 baseline?

Yes directly copied from the docker image.

@juldrixx
Copy link
Contributor Author

We should also update the nifi-cluster helm chart logback.xml since it routes all of the appender output to the Console (stdout). It's verbatim copied and it includes an additional Console appender that basically accepts all the other appender outputs. Without this, only the bootstrap log appears in stdout, making it impossible to see nifi logs in something like the Rancher UI.

I made the changes, can you confirm them. I'm not sure.

@juldrixx juldrixx requested a review from mh013370 January 11, 2024 10:56
@mh013370
Copy link
Member

We should also update the nifi-cluster helm chart logback.xml since it routes all of the appender output to the Console (stdout). It's verbatim copied and it includes an additional Console appender that basically accepts all the other appender outputs. Without this, only the bootstrap log appears in stdout, making it impossible to see nifi logs in something like the Rancher UI.

I made the changes, can you confirm them. I'm not sure.

Looks good to me

@mh013370
Copy link
Member

Do you think there's any risk in merging this for nifikop 1.x?

@juldrixx
Copy link
Contributor Author

Do you think there's any risk in merging this for nifikop 1.x?

I discussed with @erdrix yesterday about the suppression of the file. And he said that we shouldn't. The objective to have it in the operator like the others files was that the operator will provide its version of the configuration. That could be identitical to the one in NiFi but could be different (better) like for example in case where we could have some use of the NiFi logs in the Operator. And if the user wants the one from NiFi, it should override it. So we should make sure to keep them up to date. What do you think?

@mh013370
Copy link
Member

Do you think there's any risk in merging this for nifikop 1.x?

I discussed with @erdrix yesterday about the suppression of the file. And he said that we shouldn't. The objective to have it in the operator like the others files was that the operator will provide its version of the configuration. That could be identitical to the one in NiFi but could be different (better) like for example in case where we could have some use of the NiFi logs in the Operator. And if the user wants the one from NiFi, it should override it. So we should make sure to keep them up to date. What do you think?

Do you mean that we should keep the templates in nifikop?

@juldrixx
Copy link
Contributor Author

juldrixx commented Jan 12, 2024

Do you think there's any risk in merging this for nifikop 1.x?

I discussed with @erdrix yesterday about the suppression of the file. And he said that we shouldn't. The objective to have it in the operator like the others files was that the operator will provide its version of the configuration. That could be identitical to the one in NiFi but could be different (better) like for example in case where we could have some use of the NiFi logs in the Operator. And if the user wants the one from NiFi, it should override it. So we should make sure to keep them up to date. What do you think?

Do you mean that we should keep the templates in nifikop?

Maybe yes, but we have to see them as the optimal configuration from the point of view of the operator.

@mh013370
Copy link
Member

mh013370 commented Jan 12, 2024

Do you think there's any risk in merging this for nifikop 1.x?

I discussed with @erdrix yesterday about the suppression of the file. And he said that we shouldn't. The objective to have it in the operator like the others files was that the operator will provide its version of the configuration. That could be identitical to the one in NiFi but could be different (better) like for example in case where we could have some use of the NiFi logs in the Operator. And if the user wants the one from NiFi, it should override it. So we should make sure to keep them up to date. What do you think?

Do you mean that we should keep the templates in nifikop?

Maybe yes, but we have to see them as the optimal configuration from the point of view of the operator.

Hmm, okay. I think as long as we keep compatibility well documented (which versions of nifikop are compatible w/ which versions of NiFi), this is okay. I only proposed this as a way to simplify what the operator has to care about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants