Skip to content
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

add label with parent resource version #151

Merged
merged 2 commits into from
Nov 30, 2023
Merged

add label with parent resource version #151

merged 2 commits into from
Nov 30, 2023

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Nov 29, 2023

type:

enhancement


description:

This PR introduces several changes to improve the handling of workload resource versions:

  • A new field ParentResourceVersion is added to the WatchedContainerData struct in utils.go. This field will store the resource version of the parent workload.
  • The getContainerInfo function in relevancy_manager.go is updated to return the parent resource version. This value is then stored in the WatchedContainerData struct.
  • The generateNetworkNeighborsLabels function in network_neighbors.go is refactored to include the resource version in the generated labels.
  • The ensureInstanceID function in applicationprofile_manager.go is updated to set the ParentResourceVersion field of the WatchedContainerData struct.
  • The test cases in network_neighbors_test.go are updated to reflect these changes.
  • The k8s-interface dependency in go.mod and go.sum is updated to version v0.0.150.

main_files_walkthrough:

files:
  • pkg/utils/utils.go: Added a new field ParentResourceVersion to the WatchedContainerData struct.
  • pkg/relevancymanager/v1/relevancy_manager.go: Updated the getContainerInfo function to return the parent resource version and store it in the WatchedContainerData struct.
  • pkg/networkmanager/network_neighbors.go: Refactored the generateNetworkNeighborsLabels function to include the resource version in the generated labels.
  • pkg/applicationprofilemanager/v1/applicationprofile_manager.go: Updated the ensureInstanceID function to set the ParentResourceVersion field of the WatchedContainerData struct.
  • pkg/networkmanager/network_neighbors_test.go: Updated test cases to reflect the changes in the generateNetworkNeighborsLabels function.
  • go.mod: Updated the k8s-interface dependency to version v0.0.150.
  • go.sum: Updated the k8s-interface dependency to version v0.0.150.

Copy link

Summary:

  • License scan: success
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

1 similar comment
Copy link

Summary:

  • License scan: success
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

@matthyx matthyx requested review from kooomix and amirmalka November 30, 2023 09:58
@matthyx matthyx marked this pull request as ready for review November 30, 2023 09:58
@codiumai-pr-agent-free codiumai-pr-agent-free bot added the enhancement New feature or request label Nov 30, 2023
Copy link

PR Analysis

  • 🎯 Main theme: Adding parent resource version to workload data
  • 📝 PR summary: This PR introduces a new field ParentResourceVersion to the WatchedContainerData struct and updates several functions to handle this new field. It also updates the k8s-interface dependency to version v0.0.150.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: Yes
  • ⏱️ Estimated effort to review [1-5]: 3, because the PR involves changes in multiple files and functions, and understanding the impact of these changes requires a good understanding of the codebase.
  • 🔒 Security concerns: No security concerns found

PR Feedback

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.
see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value.
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, add a /config comment.

Copy link

Summary:

  • License scan: success
  • Credentials scan: success
  • Vulnerabilities scan: success
  • Unit test: success
  • Go linting: success

@matthyx matthyx merged commit 5f429b4 into main Nov 30, 2023
7 of 9 checks passed
@matthyx matthyx deleted the versionlabel branch November 30, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants