Skip to content

Added implementation to exclude unauthorized streams from discovery#52

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

Added implementation to exclude unauthorized streams from discovery#52
akkumar-qlik wants to merge 5 commits into
masterfrom
SAC-30911-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-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

  • 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

Copilot AI left a comment

Copy link
Copy Markdown

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 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.

Comment thread tests/unittests/test_discovery.py Outdated
Comment thread CHANGELOG.md Outdated
Comment thread tap_gitlab/discover.py
akkumar-qlik and others added 3 commits June 17, 2026 08:45
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>
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