Added implementation to exclude unauthorized streams from discovery#16
Open
akkumar-qlik wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code