Skip to content

SAC-30973: Exclude un-auth streams - #91

Open
satyendra101 wants to merge 8 commits into
SAC-28847-add-new-metadatafrom
SAC-30973-un-auth-streams-exclusion
Open

SAC-30973: Exclude un-auth streams#91
satyendra101 wants to merge 8 commits into
SAC-28847-add-new-metadatafrom
SAC-30973-un-auth-streams-exclusion

Conversation

@satyendra101

@satyendra101 satyendra101 commented Jun 3, 2026

Copy link
Copy Markdown

Description of change

  • Added access token context manager check in init
  • Streams are now probed during schema creation to check accessibility
  • Un-auth streams are removed from the catalog by doing a small probe.
  • Added unittests.
    JIRA: https://qlik-dev.atlassian.net/browse/SAC-30973

Manual QA steps

  • Unittests 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 the tap’s discovery/catalog generation so that streams which are inaccessible with the provided credentials are detected early (via lightweight endpoint probes) and excluded from the discovered catalog. It also ensures credentials are verified at startup by using IntercomClient as a context manager, and adds unit tests around the new behavior.

Changes:

  • Add per-stream accessibility probing during schema creation and exclude unauthorized/inaccessible streams from the catalog.
  • Verify credentials on startup by wrapping tap execution in with IntercomClient(...) as client:.
  • Add probe configuration for POST-based streams and introduce unit tests for stream probing and pruning behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/unittests/test_schema.py Adds unit tests for probing/access checks, pruning inaccessible child streams, and catalog filtering.
tests/unittests/test_init.py Updates init tests to account for IntercomClient context manager usage and new discover signature.
tap_intercom/streams.py Adds probe metadata (probe_http_method, probe_search_query) for POST-search based streams.
tap_intercom/schema.py Implements stream probing, inaccessible stream filtering, and child-pruning during schema discovery.
tap_intercom/discover.py Changes discover() to accept an IntercomClient and pass it into get_schemas().
tap_intercom/client.py Adds probe_stream() helper for GET/POST probing.
tap_intercom/init.py Wraps main execution in IntercomClient context manager and threads client into discovery.

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

Comment thread tests/unittests/test_init.py Outdated
Comment thread tests/unittests/test_init.py
Comment thread tap_intercom/schema.py
Comment thread tap_intercom/schema.py Outdated
Comment thread tap_intercom/client.py
Comment thread tap_intercom/schema.py Outdated
Comment thread tap_intercom/schema.py Outdated
Comment thread tap_intercom/schema.py
@satyendra101
satyendra101 changed the base branch from master to SAC-28847-add-new-metadata June 12, 2026 05:35
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.

3 participants