-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[4.21] OCPBUGS-59514: redacted install config for baremetal #9972
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
base: main
Are you sure you want to change the base?
Conversation
|
@iurygregory: This pull request references Jira Issue OCPBUGS-59514, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this: 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. |
|
/jira refresh |
|
@iurygregory: This pull request references Jira Issue OCPBUGS-59514, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2d85a68 to
2f70ace
Compare
patrickdillon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/label backport-risk-assessed
Hm perhaps I'm missing something obvious, but could you simply do this:
case newConfig.BareMetal != nil:
for _, host := range newConfig.BareMetal.Hosts {
host.BMC.Password = "REDACTED"
}This way you would not need to update this code for future fields. Not sure why other platforms don't do this, so perhaps I am missing something!
|
@patrickdillon thanks for the feedback, let me push a change with your idea and test via cluster-bot! |
2f70ace to
749c837
Compare
|
It looks like another instance of this problem was already fixed by OCPBUGS-61353, but there is still one more that this doesn't solve. Clearly this is going to keep happening though. I don't feel like this is fixed until we have code that uses
I think the problem is that this changes the original install-config, meaning the redacted version will get written to the asset store. The InstallConfig struct is passed by value, so it is safe to overwrite the pullSecret at the top level, but it contains references to nested structs (Platform struct is embedded by value, but it contains pointers to the actual platform implementation), and only the references get copied. We need to either go through (a hopefully better version of) the same rigmarole as the other platforms or generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems ok. Is there any way you can add some commit notes maybe why this is needed? I also like Patrick's comment to add Redacted instead of an empty string; I think it gives an indication for why it was set the way that it was.
+1. I knew I was missing something and this point was exactly it. Ignore my suggestion! |
|
& apologies for misleading you @iurygregory |
18cc555 to
1cb7810
Compare
Assisted-By: Claude Code Sonnet 4 Signed-off-by: Iury Gregory Melo Ferreira <[email protected]>
1cb7810 to
5e4737a
Compare
|
@iurygregory: The following tests failed, say
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. |
Looks like you predicted #10025, Zane. This PR should make the whole copying much easier and individual overrides can be done just like Patrick's previous suggestion. |
Looks like a good scenarios to use Claude 😁 Current approach looks OK to me though resolve the issue today unless you want to wait for #10025, @iurygregory |
Hey @tthvo , I'll be waiting for #10025 to land so I can update things! |
Thanks @patrickdillon I will wait for #10025 to merge so I can update this one. |
No description provided.