Skip to content

Treat CANCELLED as a terminal export status (1.6.4) - #1060

Merged
SteveMcGrath merged 1 commit into
tenable:release/1.6from
tejasdabgar-crest:fix/exports-cancelled-status
Nov 6, 2026
Merged

SteveMcGrath merged 1 commit into
tenable:release/1.6from
tejasdabgar-crest:fix/exports-cancelled-status

Conversation

@tejasdabgar-crest

Copy link
Copy Markdown

When Tenable Vulnerability Management cancels an export server-side, the export status becomes CANCELLED. ExportsIterator only treated ERROR and FINISHED as terminal, so the polling loop in _get_chunks() (and the loop in run_threaded()) kept polling the status indefinitely with no error.

  • Add ExportsIterator._TERMINAL = ['ERROR', 'FINISHED', 'CANCELLED'] and use it in _get_chunks() and run_threaded().
  • _get_status() now raises TioExportsError for CANCELLED as well as ERROR when _term_on_error is set ("has cancelled." / "has errored.").
  • Add tests for cancelled exports in iterator and threaded modes.
  • Bump version to 1.6.4 and update the changelog.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Python Version(s) Tested:
  • Tenable.sc version (if necessary):

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

When Tenable Vulnerability Management cancels an export server-side, the
export status becomes CANCELLED. ExportsIterator only treated ERROR and
FINISHED as terminal, so the polling loop in _get_chunks() (and the loop
in run_threaded()) kept polling the status indefinitely with no error.

- Add ExportsIterator._TERMINAL = ['ERROR', 'FINISHED', 'CANCELLED'] and
  use it in _get_chunks() and run_threaded().
- _get_status() now raises TioExportsError for CANCELLED as well as ERROR
  when _term_on_error is set ("has cancelled." / "has errored.").
- Add tests for cancelled exports in iterator and threaded modes.
- Bump version to 1.6.4 and update the changelog.
@tejasdabgar-crest
tejasdabgar-crest requested a review from a team as a code owner November 6, 2026 15:24
@SteveMcGrath
SteveMcGrath merged commit 89400f0 into tenable:release/1.6 Nov 6, 2026
2 of 9 checks passed
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