Skip to content

out_stackdriver: fix bug in k8s_pod process_local_resource_id#8490

Merged
braydonk merged 1 commit intofluent:masterfrom
ryanohnemus:fix_k8s_pod_resource_processing
Feb 16, 2024
Merged

out_stackdriver: fix bug in k8s_pod process_local_resource_id#8490
braydonk merged 1 commit intofluent:masterfrom
ryanohnemus:fix_k8s_pod_resource_processing

Conversation

@ryanohnemus
Copy link
Contributor

The k8s_pod process_local_resource_id does not process the local_resource_id if using a custom_k8s_regex.

The return that is being checked if it is 0, should actually match what is happening in k8s_container and k8s_node sections: https://github.com/fluent/fluent-bit/blob/master/plugins/out_stackdriver/stackdriver.c#L1947 because the return should be > 0 when there is an actual match.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • Example configuration file for the change
  • Debug log output from testing the change
  • Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • Run local packaging test showing all targets (including any new ones) build.
  • Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • Documentation required for this feature

Backporting

  • Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

Signed-off-by: ryanohnemus <ryanohnemus@gmail.com>
Copy link
Contributor

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

I wish this code used named constants for success and failure instead of magic numbers 0, -1, etc. to make it so this sort of thing doesn't go unnoticed this long. Thank you for catching this!

@braydonk braydonk merged commit bf76745 into fluent:master Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants