Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Fix Cybersixgill mentions API call #368

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft

Conversation

aloftus23
Copy link
Contributor

@aloftus23 aloftus23 commented Dec 23, 2022

fixes #361
During the latest report run, we noticed random error responses from the intel_items API endpoint.

🗣 Description

Current process: We first get the total number of mentions, then pull down each specific mention in segments of 100. Most of the time, a segment of 100 successfully responds. On failure, the segment is skipped.

Therefore, we redesigned the code to pull down the mentions in segments of 100, then try 10, then try 1. Calling the API in segments of 1 is yet to fail. After 10 iterations of a smaller segments, the rest will try 100 again to speed up the process.

🧪 Testing

All pytests and pre-commits pass. Confirmed no errors in a full report run.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

Fix the mentions api call to collect large numbers in different segments
@aloftus23 aloftus23 added Draft PR PR in draft mode, not passing checks Production ready Code passing checks, internal code review done, merged into staging environment and remove draft PR labels Dec 23, 2022
@aloftus23 aloftus23 self-assigned this Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Draft PR PR in draft mode, not passing checks Production ready Code passing checks, internal code review done, merged into staging environment and remove draft PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cybersixgill Intel_Items (mentions API) Bug
1 participant