Skip to content

[SAC-31191] - Unauthorized streams exclusion from catalog during discovery - #160

Open
mittal-tushar wants to merge 9 commits into
SAC-28872-add-new-metadatafrom
feat/unauth-streams-exclusion
Open

mittal-tushar wants to merge 9 commits into
SAC-28872-add-new-metadatafrom
feat/unauth-streams-exclusion

Conversation

@mittal-tushar

Copy link
Copy Markdown

Description of change

Ticket: https://qlik-dev.atlassian.net/browse/SAC-31229

  • Exclude unauthorized streams from catalog during discovery

Manual QA steps

  • Discovery: Creds unavailable
  • Sync: Creds unavailable

Rollback steps

  • revert this branch

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 adds discovery-time access checks so streams returning 403 (Forbidden) are excluded from the generated catalog (and child streams are pruned when their parent is inaccessible), along with unit tests validating discovery behavior, bookmark behavior, and sync state handling.

Changes:

  • Add per-stream access probing during do_discover() and prune child streams whose parent isn’t accessible.
  • Add unit tests for discovery access filtering, bookmark read/write behavior, and currently_syncing state handling in sync.
  • Bump package version to 2.3.0 and update changelog.

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_sync.py Adds a unit test ensuring currently_syncing is set/cleared and an initial bookmark is written.
tests/unittests/test_discovery.py Adds unit tests for excluding inaccessible streams and pruning children, plus parent metadata assertion.
tests/unittests/test_bookmarks.py Adds unit tests for bookmark initialization, advancement, and record filtering.
tap_pipedrive/tap.py Introduces discovery-time access filtering and child stream pruning logic.
tap_pipedrive/stream.py Adds check_access() helper used during discovery to probe read access.
setup.py Bumps version to 2.3.0 (but formatting needs cleanup).
CHANGELOG.md Documents the new behavior and tests (wording should be adjusted to match actual behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tap_pipedrive/stream.py Outdated
Comment on lines +124 to +137
params = {
'start': 0,
'limit': 1,
}

previous_initial_state = self.initial_state
if self.initial_state is None:
self.initial_state = self.tap.config.get('start_date')

try:
params = self.update_request_params(params)
except Exception:
# Fallback to a minimal probe if a stream-specific param builder fails.
pass
Comment thread tap_pipedrive/tap.py
Comment thread setup.py
Comment on lines 4 to 6
setup(name="tap-pipedrive",
version="2.2.0",
version="2.3.0",
description="Singer.io tap for extracting data from the Pipedrive API",
Comment thread CHANGELOG.md
Comment thread tap_pipedrive/tap.py
Comment thread tap_pipedrive/stream.py Outdated

@akkumar-qlik akkumar-qlik 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.

In logger when we force fail all stream logger message is not coming for parent stream please check this also and add all logger message of local testing in ticket also.

rsaha-qlik and others added 3 commits September 2, 2026 16:40
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Akarsh Kumar <akarsh.kumar@qlik.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.

4 participants