-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Slack migration to low code #35477
Changes from 91 commits
bd8a4c8
56daf02
8ad4061
2cab1ff
6aae53d
e45624c
c923aa9
be763e2
4883642
3e2c793
d948037
4736e76
b4ef214
c0376ab
ed7dbd7
703880f
a22e333
cb00fc2
854f87d
c68a752
d13e69f
9795a7d
8358894
0b8ee3b
7d55bad
9fa8a29
7cab07a
85e72ed
bdde638
0031711
cd2c611
8d23ce2
162b096
d94c4dd
d2083b9
602b92f
e84a1c2
53718a1
e7a034f
3788cc2
44ef205
21a2e82
175970d
c45a766
7348e7f
563daa1
7192ba2
af74589
3d48905
320a675
53e93d2
f622dcb
e874d06
5c36ec9
a5b26ca
42a499f
b567508
af8d4e4
3ad394f
3d571a3
5cebd2d
a898a70
0c24c5f
dfd3eac
d0f1b69
42f8309
bf4cb5d
b95bbd8
47e850c
2c94e4e
b89e7f4
53c3207
935e818
29979bf
a1ae4f4
87b1544
92c5f05
82e288f
a36d6cd
2537e03
6ce6404
f23f55e
37de0b8
0e92f78
8f967ac
9b48589
f1a317b
6fadec0
f67b342
47c6400
3163df5
e3ee23b
ca452f4
af613b2
deb7918
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[run] | ||
omit = | ||
source_slack/run.py |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ data: | |
connectorSubtype: api | ||
connectorType: source | ||
definitionId: c2281cee-86f9-4a86-bb48-d23286b4c7bd | ||
dockerImageTag: 0.4.1 | ||
dockerImageTag: 1.0.0 | ||
dockerRepository: airbyte/source-slack | ||
documentationUrl: https://docs.airbyte.com/integrations/sources/slack | ||
githubIssueLabel: source-slack | ||
|
@@ -27,6 +27,19 @@ data: | |
oss: | ||
enabled: true | ||
releaseStage: generally_available | ||
releases: | ||
breakingChanges: | ||
1.0.0: | ||
message: | ||
The source slack connector is being migrated from the Python CDK to our declarative low-code CDK. | ||
Due to changes in the handling of state format for incremental substreams, this migration constitutes a breaking change for the channel_messages stream. | ||
Users will need to retest source configuration, refresh the source schema and reset the channel_messages stream after upgrading. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/retest/reset There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
For more information, see our migration documentation for Source Slack. | ||
upgradeDeadline: "2024-05-03" | ||
scopedImpact: | ||
- scopeType: stream | ||
impactedScopes: | ||
- "channel_messages" | ||
suggestedStreams: | ||
streams: | ||
- users | ||
|
@@ -37,5 +50,5 @@ data: | |
supportLevel: certified | ||
tags: | ||
- language:python | ||
- cdk:python | ||
- cdk:low-code | ||
metadataSpecVersion: "1.0" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
version = "0.4.1" | ||
version = "1.0.0" | ||
name = "source-slack" | ||
description = "Source implementation for Slack." | ||
authors = [ "Airbyte <[email protected]>",] | ||
|
@@ -19,6 +19,7 @@ include = "source_slack" | |
python = "^3.9,<3.12" | ||
pendulum = "==2.1.2" | ||
airbyte-cdk = "^0" | ||
freezegun = "^1.4.0" | ||
|
||
[tool.poetry.scripts] | ||
source-slack = "source_slack.run:run" | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,21 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from dataclasses import dataclass | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from typing import List | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
import requests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from airbyte_cdk.sources.declarative.extractors import DpathExtractor | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from airbyte_cdk.sources.declarative.types import Record | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@dataclass | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
class ChannelMembersExtractor(DpathExtractor): | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should properly handle errors from slack. like it was before: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please give me an example that is not covered in this handling errors implementation? Now it works the same as in #35477 (comment), but instead of AirbyteTracedException it raises airbyte_cdk.sources.declarative.exceptions.ReadException. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Transform response from list of strings to list dicts: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
from: ['aa', 'bb'] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
to: [{'member_id': 'aa'}, {{'member_id': 'bb'}] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
""" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
def extract_records(self, response: requests.Response) -> List[Record]: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
records = super().extract_records(response) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
return [{"member_id": record} for record in records] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/slack/Slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated