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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Source Sentry: migrate to low code #35755

Merged
merged 32 commits into from
Mar 28, 2024

Conversation

darynaishchenko
Copy link
Collaborator

@darynaishchenko darynaishchenko commented Mar 1, 2024

What

resolved: https://github.com/airbytehq/airbyte-internal-issues/issues/6632
Migrate Source Sentry to Low Code.

How

Updated manifest.yaml with declared in low code streams. Added integration tests for empty streams Issues and Events.

Recommended reading order

  1. airbyte-integrations/connectors/source-sentry/source_sentry/manifest.yaml
  2. other files

🚨 User Impact 🚨

No breaking changes.

Sentry low code migration qa

@darynaishchenko darynaishchenko self-assigned this Mar 1, 2024
Copy link

vercel bot commented Mar 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2024 5:20pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/sentry labels Mar 1, 2024
releases:
breakingChanges:
1.0.0:
message: "Source Sentry has been migrated to YAML Declarative Source."
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this a breaking change?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1. Seems like schemas have not changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@girarda @natikgadzhi yes, actually this is not breaking change and low-code version of the connector is compatible with the previous one. According to the migration to low-code guide I thought we migrate all connectors to low-code as breaking change. If it's not I can remove breaking change docs from the pr.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the config, the state, and the schema are compatible, we shouldn't mark this as a breaking change. CC @katmarkham

@octavia-squidington-iv octavia-squidington-iv requested a review from a team March 1, 2024 18:31
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Thank you @darynaishchenko! 🎉

My only question is the same as from @girarda — not sure if the schema changes mandate this to be a breaking change.

@clnoll, should we try and use the regression testing tool on this?

@@ -1,3 +1,3 @@
[run]
omit =
omit =
source_sentry/run.py
Copy link
Contributor

Choose a reason for hiding this comment

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

Some folks had to also add main.py and __init__.py, but if the coverage is hit, I guess we're okay /shrug

Copy link
Contributor

Choose a reason for hiding this comment

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

Note to self: this file should be in the template for new connectors

@@ -4,7 +4,7 @@ acceptance_tests:
- config_path: secrets/config.json
empty_streams:
- name: issues
bypass_reason: "Project sssues are not being returned by the Sentry API."
bypass_reason: "Project issues are not being returned by the Sentry API."
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for catching these 👏

@@ -1,105 +1,149 @@
version: "0.29.0"
version: 0.57.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by this, and I see this in a couple PRs (another one is #35776). Should manifest.version be the minimal version of the CDK that can run this, or should it be the version of the connector? If it's the connector version, should this be 1.0.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This version was added by the connector builder, this is version of cdk, I'm confused with this too, because poetry lock declares another version of cdk. So it looks like I need to update version in manifest.

page_token_option:
type: RequestOption
inject_into: "request_parameter"
field_name: "cursor"
inject_into: request_parameter
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity: what formatting tool are you using? I want to make sure we will setup our tooling so formatting is consistent across the team

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I used manual + IDE + airbyte-ci formatting. page_token_option: was added and formatted by connector builder.

Projects(**stream_args),
Releases(**project_stream_args),
]
class SourceSentry(YamlDeclarativeSource):
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice that all streams could move to declarative. 👏

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, one thing that is different in new and old version is state calculation. Now states equals date of sync, previously it was date of recent record. But for this streams it can be used as dateCreated and lastSeen values can not be updated manually, so date of cursor can not be changed after sync.

releases:
breakingChanges:
1.0.0:
message: "Source Sentry has been migrated to YAML Declarative Source."
Copy link
Contributor

Choose a reason for hiding this comment

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

+1. Seems like schemas have not changed?

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

Two concerns i'd like to address before approving (the rest is nit):

  • the API call change for issues
  • the semi-incremental thing for releases and projects

@octavia-squidington-iv octavia-squidington-iv requested a review from a team March 7, 2024 16:02
Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

Awesome work @darynaishchenko ! 🚢

@darynaishchenko darynaishchenko removed the request for review from a team March 8, 2024 14:02

@HttpMocker()
def test_read(self, http_mocker: HttpMocker):
response = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: please move responses to unit_tests/resource/http/response

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@darynaishchenko darynaishchenko added the low-code-migration This connector has been migrated to the low-code CDK label Mar 25, 2024
@lazebnyi lazebnyi merged commit ca6d722 into master Mar 28, 2024
30 checks passed
@lazebnyi lazebnyi deleted the daryna/source-sentry/migrate-to-low-code branch March 28, 2024 20:10
nurikk pushed a commit to nurikk/airbyte that referenced this pull request Apr 4, 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/sentry low-code-migration This connector has been migrated to the low-code CDK team/connectors-python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants