-
Notifications
You must be signed in to change notification settings - Fork 6.2k
feat: improve StatefulSet immutable field error messages #21209
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
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
How to test locally
this should change the above added
|
c282940
to
009e46b
Compare
} | ||
|
||
// Format immutable fields error message | ||
if (cleanMessage.includes('attempting to change immutable fields:')) { |
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.
maybe it will be better to move this part to some formatter util that will cover such cases and use it here? i am sure we probably will want cover other formatting cases in future
009e46b
to
e2d8e21
Compare
223a774
to
d79065f
Compare
493abda
to
fcda7ab
Compare
3e13b40
to
9ce0f82
Compare
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.
LGTM!!
@pasha-codefresh any more concerns regarding the changes? |
PING @pasha-codefresh |
c0fc4a6
to
d2c3234
Compare
46abb0c
to
642897c
Compare
Will review it one more time today |
642897c
to
3273a8e
Compare
return message; | ||
} | ||
|
||
const cleanMessage = message; |
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.
why you need this? you not doing any modification of message
.filter(line => line.trim()) | ||
.map(line => { | ||
if (line.startsWith('-')) { | ||
const [field, changes] = line.substring(2).split(':'); |
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.
can you please add some comment that explains why 2 and why split, i think you need move it to private function that will be named formatStatefulSet ( something like this ). And it will be covered at least with some comment to show what all these splits doing.
@aali309 few minor comments and we are good to go |
3273a8e
to
c867313
Compare
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
Signed-off-by: Atif Ali <[email protected]>
…on && add comments Signed-off-by: Atif Ali <[email protected]>
74d8bd9
to
dbf0f84
Compare
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.
LGTM!
) Signed-off-by: Atif Ali <[email protected]> Signed-off-by: Harshit-Bajpai <[email protected]>
) Signed-off-by: Atif Ali <[email protected]>
) Signed-off-by: Atif Ali <[email protected]> Signed-off-by: kingbj0429 <[email protected]>
Checklist:
Fixes: #20899
Depends on: 654
Before:

After:
