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

Prevent duplicate incidents #32765

Conversation

DBZclaroty
Copy link
Contributor

@DBZclaroty DBZclaroty commented Feb 6, 2024

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Related Issues

None

Description

Prevent duplicate incidents being fetched.
When fetching incidents, only return incidents that were not received previously.

Must have

  • Tests
  • Documentation

@content-bot content-bot added Contribution Thank you! Contributions are always welcome! External PR Partner Support Level Indicates that the contribution is for Partner supported pack labels Feb 6, 2024
@content-bot content-bot changed the base branch from master to contrib/DBZclaroty_bugfix/claroty/prevent-duplicate-incidents February 6, 2024 14:43
@content-bot
Copy link
Collaborator

Thank you for your contribution. Your generosity and caring are unrivaled! Make sure to register your contribution by filling the Contribution Registration form, so our content wizard @yucohen will know the proposed changes are ready to be reviewed.
For your convenience, here is a link to the contributions SLAs document.

@DBZclaroty DBZclaroty force-pushed the bugfix/claroty/prevent-duplicate-incidents branch 2 times, most recently from 50fb9ab to 5fb2dc8 Compare February 6, 2024 16:03
@DBZclaroty
Copy link
Contributor Author

Reopened this PR because the previous one became unsynced.
link to previous PR 32701
@YuvHayun was reviewing it.

@YuvHayun YuvHayun mentioned this pull request Feb 6, 2024
5 tasks
@YuvHayun YuvHayun requested review from YuvHayun and removed request for yucohen February 6, 2024 16:06
@YuvHayun YuvHayun assigned YuvHayun and unassigned yucohen Feb 6, 2024
@DBZclaroty DBZclaroty marked this pull request as ready for review February 6, 2024 16:08
@YuvHayun
Copy link
Contributor

YuvHayun commented Feb 7, 2024

Looks good, please make sure to sign the contribution form.

@YuvHayun YuvHayun added the pending-contributor The PR is pending the response of its creator label Feb 7, 2024
@content-bot content-bot added Partner-Approved Contribution Form Filled Whether contribution form filled or not. Partner labels Feb 7, 2024
@DBZclaroty DBZclaroty changed the base branch from contrib/DBZclaroty_bugfix/claroty/prevent-duplicate-incidents to master February 7, 2024 11:06
- Improve test of fetch_incidents, to also test for the same incidents being
  retrieved multiple times.
- When fetching incidents, only return incidents that were not received previously
- Updating release notes
- Update Claroty.yml file
@DBZclaroty DBZclaroty force-pushed the bugfix/claroty/prevent-duplicate-incidents branch from 687a3c2 to ee017c1 Compare February 7, 2024 11:14
@DBZclaroty
Copy link
Contributor Author

Hi @YuvHayun , I don't understand how the merge process works here exactly.
I put 'master' as the target branch and now I see this error in the 'Run Validations' job.
Can you help?

https://app.circleci.com/pipelines/github/demisto/content/343411/workflows/f4463bfb-46f6-4c2c-90e9-8c78e16a5fca/jobs/740272

"
Fetching the base branch of pull request #32765.
Cannot merge a contribution directly to master, the pull request reviewer will handle that soon.

Exited with code exit status 1
"

@YuvHayun YuvHayun changed the base branch from master to contrib/DBZclaroty_bugfix/claroty/prevent-duplicate-incidents February 7, 2024 14:45
@YuvHayun
Copy link
Contributor

YuvHayun commented Feb 7, 2024

Hey @DBZclaroty, the merge flow is going like this:
You open an external PR where I give you the CR and merge it
Then I'm merging the external PR and an internal one is opened.
Once the internal one is merged, your pr is in content master.
For more info, you can check our xsoar.pan.dev page.

…idents' into bugfix/claroty/prevent-duplicate-incidents
@DBZclaroty
Copy link
Contributor Author

@YuvHayun Thanks for the response!
Do you know this error in the workflow?
Link
image

@YuvHayun
Copy link
Contributor

YuvHayun commented Feb 7, 2024

You can ignore this, I'm moving the pr to instance test.

@YuvHayun YuvHayun added the ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. label Feb 7, 2024
@content-bot
Copy link
Collaborator

For the Reviewer: Successfully created a pipeline in Gitlab with url: https://gitlab.xdr.pan.local/xdr/cortex-content/content/-/pipelines/812638

@YuvHayun
Copy link
Contributor

YuvHayun commented Feb 7, 2024

Merging to internal PR, you should be able to see the new version in the marketplace within 72 hours.

@YuvHayun YuvHayun merged commit 44d3d84 into demisto:contrib/DBZclaroty_bugfix/claroty/prevent-duplicate-incidents Feb 7, 2024
22 of 23 checks passed
@content-bot content-bot mentioned this pull request Feb 7, 2024
5 tasks
@DBZclaroty
Copy link
Contributor Author

Merging to internal PR, you should be able to see the new version in the marketplace within 72 hours.

Thank you @YuvHayun !

YuvHayun added a commit that referenced this pull request Feb 8, 2024
* Improve type-hints in Claroty.py

* Prevent duplicate incidents being fetched

- Improve test of fetch_incidents, to also test for the same incidents being
  retrieved multiple times.
- When fetching incidents, only return incidents that were not received previously
- Updating release notes
- Update Claroty.yml file

---------

Co-authored-by: DBZclaroty <99262339+DBZclaroty@users.noreply.github.com>
Co-authored-by: Yuval Hayun <70104171+YuvHayun@users.noreply.github.com>
@DBZclaroty
Copy link
Contributor Author

Hi @YuvHayun !
How can I check if these changes are now available to our customer who is using XSOAR?
Thank you

@YuvHayun
Copy link
Contributor

Hey @DBZclaroty, it should be available by now.
You can check for the version in the marketplace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved External PR Partner Support Level Indicates that the contribution is for Partner supported pack Partner Partner-Approved pending-contributor The PR is pending the response of its creator ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR.
Projects
None yet
5 participants