8000 Append the tags by gauravakto · Pull Request #2731 · akto-api-security/akto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Append the tags #2731

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

Merged
merged 5 commits into from
Jun 30, 2025
Merged

Append the tags #2731

merged 5 commits into from
Jun 30, 2025

Conversation

gauravakto
Copy link
Contributor

This will add the tags of all the service where the request was incoming.

@Copilot Copilot AI review requested due to automatic review settings June 30, 2025 03:42
Copy link
Contributor
@Copilot 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 enhances how tags are appended to collections by filtering out ignored keys, updating the Mongo update operations to add new tags without duplicates, and normalizing CollectionTags equality logic.

  • Refactors getPreservedTags to skip specific tag keys and returns only the incoming tags
  • Changes Mongo updates from set to addEachToSet to avoid overwriting existing tags
  • Updates CollectionTags’s equals/hashCode to ignore the timestamp and removes unused imports

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
libs/utils/src/main/java/com/akto/data_actor/DbLayer.java Filters out ignored tag keys and uses addEachToSet for updates
libs/dao/src/main/java/com/akto/dto/traffic/CollectionTags.java Cleans unused imports and aligns equals/hashCode on key/value/source only
Comments suppressed due to low confidence (1)

libs/dao/src/main/java/com/akto/dto/traffic/CollectionTags.java:46

  • Consider adding unit tests for equals and hashCode to ensure consistency and validate that tags are compared correctly now that lastUpdatedTs is excluded.
    public boolean equals(Object obj) {

gauravakto and others added 4 commits June 30, 2025 09:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gauravakto gauravakto merged commit 5ef646d into feature/cyborg-release Jun 30, 2025
3 checks passed
@gauravakto gauravakto deleted the fix/tags-fix-append-pnly 7FF2 branch June 30, 2025 04:30
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.

2 participants
0