Skip to content

Added implementation to exclude unauthorized streams from discovery#16

Open
akkumar-qlik wants to merge 3 commits into
masterfrom
SAC-30928-un-auth-streams-should-exclude-from-catalog-while-discovery
Open

Added implementation to exclude unauthorized streams from discovery#16
akkumar-qlik wants to merge 3 commits into
masterfrom
SAC-30928-un-auth-streams-should-exclude-from-catalog-while-discovery

Conversation

@akkumar-qlik

Copy link
Copy Markdown

Description of change

https://qlik-dev.atlassian.net/browse/SAC-30928
Excluded unauthorized streams from catalog during discovery
Added unit test case and updated integration test accordingly

Manual QA steps

  • Discovery: Running
  • Sync: Running
  • Unit Tests: Running
  • Integration test: Running

Risks

Rollback steps

  • revert this branch

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

@akkumar-qlik akkumar-qlik self-assigned this Jun 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the tap’s discovery behavior to proactively detect 403-forbidden (unauthorized) streams and exclude them from the discovered catalog, only failing discovery when no parent streams are accessible. It also updates tests and bumps the package version/changelog accordingly.

Changes:

  • Add per-stream access probing during discovery and prune streams (and children) that are inaccessible due to 403.
  • Introduce BaseStream.check_access() to standardize the access probe behavior.
  • Add unit tests for discovery access checks and update tap-tester expectations to allow excluding forbidden streams.

Reviewed changes

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

Show a summary per file
File Description
tests/unittests/test_discovery.py Adds unit coverage for access checks, pruning behavior, and end-to-end discovery exclusions.
tests/base.py Adds a metadata flag + helper to exclude forbidden streams from expected integration test stream sets.
tap_notion/streams/abstracts.py Introduces BaseStream.check_access() to probe stream read permissions (treat 403 as inaccessible).
tap_notion/discover.py Applies access checks before catalog construction and prunes inaccessible children from discovery output.
tap_notion/init.py Wires the tap CLI discovery flow to pass the client into discover().
setup.py Bumps version to 0.0.4.
CHANGELOG.md Documents the new discovery exclusion behavior in 0.0.4.

Comment thread tap_notion/streams/abstracts.py
Comment thread tests/base.py
Comment thread tap_notion/discover.py
Comment thread CHANGELOG.md
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