Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Source Jira: Fix check command #33353

Merged
merged 5 commits into from Dec 13, 2023

Conversation

tolik0
Copy link
Contributor

@tolik0 tolik0 commented Dec 12, 2023

What

This PR updates the check command to verify access to any available resources instead of limiting the check to just the Labels endpoint.

How

Implemented an AvailabilityStrategy in the base class to enable skipping streams without required permissions. Removed should_retry methods to avoid duplicating the logic of skip_http_status_codes, which already handles skipping slices in case of errors. This enhancement ensures that the sync will not fail if the API token lacks permission for certain resources.

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs 猬滐笍 Ignored (Inspect) Visit Preview Dec 12, 2023 11:04pm

Copy link
Contributor

github-actions bot commented Dec 12, 2023

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 馃帀

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@tolik0 tolik0 self-assigned this Dec 12, 2023
@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Dec 12, 2023
@tolik0 tolik0 marked this pull request as ready for review December 12, 2023 16:36
@tolik0 tolik0 requested a review from a team December 12, 2023 16:36
else:
logger.info(f"API Token have access to stream: {stream.name}, so check is successful.")
return True, None
return False, "This API Token does not have permission to read any of the resources."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to try read all streams on check? this is certified connector and check command should run fast. we can check only known permissions/scopes, and availability strategy will work while reading and skip stream if it is not available.

Copy link
Contributor Author

@tolik0 tolik0 Dec 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@darynaishchenko The updated check method now passes if at least one stream is readable. Without this inspection, the check will be successful even without access to any resources.

@tolik0 tolik0 force-pushed the tolik0/source-jira/fix-check-command branch from 242e474 to 0bc46de Compare December 12, 2023 22:27
@tolik0 tolik0 merged commit 300cc7e into master Dec 13, 2023
25 of 26 checks passed
@tolik0 tolik0 deleted the tolik0/source-jira/fix-check-command branch December 13, 2023 12:19
tmathew0309 pushed a commit to tmathew0309/airbyte that referenced this pull request Jan 12, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
jatinyadav-cc pushed a commit to ollionorg/datapipes-airbyte that referenced this pull request Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants