Skip to content

fix: strip colon from parsed NewReplicaSet name#543

Open
ejaifeobuks wants to merge 1 commit into
Azure:mainfrom
ejaifeobuks:fix/newreplicaset-colon
Open

fix: strip colon from parsed NewReplicaSet name#543
ejaifeobuks wants to merge 1 commit into
Azure:mainfrom
ejaifeobuks:fix/newreplicaset-colon

Conversation

@ejaifeobuks

Copy link
Copy Markdown
Contributor

This pull request makes a minor adjustment to the way new replica sets are identified in both the Kubectl class and its associated test. The change ensures that the string 'newreplicaset:' (with a colon) is used as the identifier instead of 'newreplicaset' (without a colon), improving the accuracy of matching lines related to new replica sets.

  • Bug fix: Replica set identification
    • Updated the identifier from 'newreplicaset' to 'newreplicaset:' in both the Kubectl class and its test to ensure correct parsing of replica set lines. [1] [2]Include the trailing colon in the 'newreplicaset:' keyword so substring() removes "NewReplicaSet:" entirely. Previously the colon was left behind, causing getNewReplicaSet to return ":" instead of the actual ReplicaSet name.

Also update the getNewReplicaSet unit test to use realistic colon-delimited kubectl describe output, which the previous mock omitted.

Resolves #318

Include the trailing colon in the 'newreplicaset:' keyword so substring() removes "NewReplicaSet:" entirely. Previously the colon was left behind, causing getNewReplicaSet to return ":" instead of the actual ReplicaSet name.

Also update the getNewReplicaSet unit test to use realistic colon-delimited `kubectl describe` output, which the previous mock omitted.

Resolves Azure#318
@ejaifeobuks ejaifeobuks requested a review from a team as a code owner June 30, 2026 18:15
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.

Bug: pod is not restarted if docker tag name is not changed

1 participant