Added implementation to exclude unauthorized streams from discovery#57
Open
akkumar-qlik wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a discovery-time permission probe to exclude streams that return HTTP 403 from the generated Singer catalog, and updates unit/integration tests and versioning to reflect the new behavior.
Changes:
- Add
PardotForbiddenErrorand raise it on HTTP 403 responses in the client. - Add discovery-time filtering: check per-stream access, prune child streams when their parent is inaccessible, and fail discovery only if no parent streams are accessible.
- Add/adjust unit tests and update integration-test expectations; bump version and changelog.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tap_pardot/client.py |
Introduces PardotForbiddenError and raises it on HTTP 403 to support permission-aware behavior. |
tap_pardot/discover.py |
Adds _apply_access_checks and _prune_inaccessible_children, invoked during discover() to exclude unauthorized streams. |
tap_pardot/streams.py |
Adds Stream.check_access() to probe per-stream permissions during discovery. |
tests/unittests/test_discover.py |
Adds unit tests for access-check behavior and stream permission probing. |
tests/base.py |
Updates integration-test expected stream names to allow excluding forbidden streams via metadata. |
setup.py |
Bumps package version to 2.1.0. |
CHANGELOG.md |
Documents the new discovery behavior in 2.1.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>
RushiT0122
requested changes
Jun 12, 2026
RushiT0122
left a comment
There was a problem hiding this comment.
parent-tap-stream-id is missing from catalog which is handled in PR#54. Please merge those changes in this PR and retest the changes.
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-30930
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