Skip to content

fix patch cm with empty labels#1507

Merged
Uburro merged 1 commit intosoperator-release-1.21from
fix-empty-label
Aug 29, 2025
Merged

fix patch cm with empty labels#1507
Uburro merged 1 commit intosoperator-release-1.21from
fix-empty-label

Conversation

@Uburro
Copy link
Collaborator

@Uburro Uburro commented Aug 29, 2025

This PR fixes a potential nil pointer dereference when patching ConfigMaps that have empty or nil labels by ensuring the Labels map is initialized before copying labels from the source.

Adds nil check and initialization for the Labels map in the ConfigMap patch operation
Prevents runtime panics when copying labels to ConfigMaps with nil Labels

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a potential nil pointer dereference when patching ConfigMaps that have empty or nil labels by ensuring the Labels map is initialized before copying labels from the source.

  • Adds nil check and initialization for the Labels map in the ConfigMap patch operation
  • Prevents runtime panics when copying labels to ConfigMaps with nil Labels

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Uburro Uburro merged commit bcd510b into soperator-release-1.21 Aug 29, 2025
5 checks passed
@Uburro Uburro deleted the fix-empty-label branch September 24, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants