Added implementation to exclude unauthorized streams from discovery#52
Open
akkumar-qlik wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates tap discovery to probe stream accessibility and exclude streams (and their children) that return HTTP 403, so unauthorized streams don’t appear in the discovered catalog.
Changes:
- Add per-stream access probing during discovery and prune child streams when their parent is inaccessible.
- Introduce
BaseStream.check_access()to encapsulate the 403-access check behavior. - Update unit/integration tests and bump version + changelog entry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unittests/test_discovery.py | Adds unit coverage for access checks, child pruning, and discover(client) behavior. |
| tests/base.py | Adds helper to compute expected stream names while allowing forbidden streams to be excluded in integration expectations. |
| tap_gitlab/streams/abstracts.py | Adds BaseStream.check_access() and adjusts default schema/metadata initialization for streams without a catalog. |
| tap_gitlab/discover.py | Applies access checks during discovery and prunes inaccessible child streams. |
| tap_gitlab/init.py | Passes the constructed Client into discovery. |
| setup.py | Bumps package version to 1.2.0. |
| CHANGELOG.md | Documents the new discovery behavior in 1.2.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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-30911
Excluded unauthorized streams from catalog during discovery
Child streams are automatically excluded when their parent stream is inaccessible.
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