Skip to content

Commit 4e37051

Browse files
Bazjatinyadav-cc
authored andcommitted
🐛 Source Slack: Join to the channels while read instead of discovery (airbytehq#35131)
1 parent 3cee234 commit 4e37051

File tree

13 files changed

+245
-120
lines changed

13 files changed

+245
-120
lines changed

airbyte-integrations/connectors/source-slack/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Orbit Source
22

33
This is the repository for the Orbit configuration based source connector.
4-
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/orbit).
4+
For information about how to use this connector within Airbyte, see [the documentation](https://docs.airbyte.com/integrations/sources/slack).
55

66
## Local development
77

88
#### Create credentials
9-
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/orbit)
9+
**If you are a community contributor**, follow the instructions in the [documentation](https://docs.airbyte.com/integrations/sources/slack)
1010
to generate the necessary credentials. Then create a file `secrets/config.json` conforming to the `source_orbit/spec.yaml` file.
1111
Note that any directory named `secrets` is gitignored across the entire Airbyte repo, so there is no danger of accidentally checking in sensitive information.
1212
See `integration_tests/sample_config.json` for a sample config file.
1313

14-
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source orbit test creds`
14+
**If you are an Airbyte core member**, copy the credentials in Lastpass under the secret name `source slack test creds`
1515
and place them into `secrets/config.json`.
1616

1717
### Locally running the connector docker image
@@ -20,23 +20,23 @@ and place them into `secrets/config.json`.
2020
#### Build
2121
**Via [`airbyte-ci`](https://github.com/airbytehq/airbyte/blob/master/airbyte-ci/connectors/pipelines/README.md) (recommended):**
2222
```bash
23-
airbyte-ci connectors --name source-orbit build
23+
airbyte-ci connectors --name source-slack build
2424
```
2525

26-
An image will be built with the tag `airbyte/source-orbit:dev`.
26+
An image will be built with the tag `airbyte/source-slack:dev`.
2727

2828
**Via `docker build`:**
2929
```bash
30-
docker build -t airbyte/source-orbit:dev .
30+
docker build -t airbyte/source-slack:dev .
3131
```
3232

3333
#### Run
3434
Then run any of the connector commands as follows:
3535
```
36-
docker run --rm airbyte/source-orbit:dev spec
37-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-orbit:dev check --config /secrets/config.json
38-
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-orbit:dev discover --config /secrets/config.json
39-
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-orbit:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
36+
docker run --rm airbyte/source-slack:dev spec
37+
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-slack:dev check --config /secrets/config.json
38+
docker run --rm -v $(pwd)/secrets:/secrets airbyte/source-slack:dev discover --config /secrets/config.json
39+
docker run --rm -v $(pwd)/secrets:/secrets -v $(pwd)/integration_tests:/integration_tests airbyte/source-slack:dev read --config /secrets/config.json --catalog /integration_tests/configured_catalog.json
4040
```
4141

4242
## Testing

airbyte-integrations/connectors/source-slack/acceptance-test-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ acceptance_tests:
2626
expect_records:
2727
path: "integration_tests/expected_records.jsonl"
2828
timeout_seconds: 4800
29+
ignored_fields:
30+
channels:
31+
- name: updated
32+
bypass_reason: Value can change while interacting with data
2933
full_refresh:
3034
tests:
3135
- config_path: "secrets/config.json"

airbyte-integrations/connectors/source-slack/integration_tests/expected_records.jsonl

Lines changed: 15 additions & 29 deletions
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-slack/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ data:
1010
connectorSubtype: api
1111
connectorType: source
1212
definitionId: c2281cee-86f9-4a86-bb48-d23286b4c7bd
13-
dockerImageTag: 0.3.7
13+
dockerImageTag: 0.3.8
1414
dockerRepository: airbyte/source-slack
1515
documentationUrl: https://docs.airbyte.com/integrations/sources/slack
1616
githubIssueLabel: source-slack

airbyte-integrations/connectors/source-slack/source_slack/schemas/channel_messages.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,36 @@
1010
"properties": {
1111
"type": {
1212
"type": ["null", "string"]
13+
},
14+
"block_id": {
15+
"type": ["null", "string"]
16+
},
17+
"elements": {
18+
"type": ["null", "array"],
19+
"items": {
20+
"type": ["null", "object"],
21+
"additionalProperties": true,
22+
"properties": {
23+
"elements": {
24+
"type": ["null", "array"],
25+
"items": {
26+
"type": ["null", "object"],
27+
"additionalProperties": true,
28+
"properties": {
29+
"text": {
30+
"type": ["null", "string"]
31+
},
32+
"type": {
33+
"type": ["null", "string"]
34+
}
35+
}
36+
}
37+
},
38+
"type": {
39+
"type": ["null", "string"]
40+
}
41+
}
42+
}
1343
}
1444
},
1545
"type": ["null", "object"]

airbyte-integrations/connectors/source-slack/source_slack/schemas/threads.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,39 @@
4949
"properties": {
5050
"type": {
5151
"type": ["null", "string"]
52+
},
53+
"block_id": {
54+
"type": ["null", "string"]
55+
},
56+
"elements": {
57+
"type": ["null", "array"],
58+
"items": {
59+
"type": ["null", "object"],
60+
"additionalProperties": true,
61+
"properties": {
62+
"elements": {
63+
"type": ["null", "array"],
64+
"items": {
65+
"type": ["null", "object"],
66+
"additionalProperties": true,
67+
"properties": {
68+
"text": {
69+
"type": ["null", "string"]
70+
},
71+
"type": {
72+
"type": ["null", "string"]
73+
},
74+
"user_id": {
75+
"type": ["null", "string"]
76+
}
77+
}
78+
}
79+
},
80+
"type": {
81+
"type": ["null", "string"]
82+
}
83+
}
84+
}
5285
}
5386
}
5487
}

airbyte-integrations/connectors/source-slack/source_slack/schemas/users.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"type": "object",
1111
"additionalProperties": true,
1212
"properties": {
13+
"always_active": {
14+
"type": ["null", "boolean"]
15+
},
1316
"avatar_hash": {
1417
"type": "string"
1518
},
@@ -34,6 +37,13 @@
3437
"email": {
3538
"type": "string"
3639
},
40+
"fields": {
41+
"type": ["null", "object"],
42+
"additionalProperties": true
43+
},
44+
"huddle_state": {
45+
"type": "string"
46+
},
3747
"image_24": {
3848
"type": "string"
3949
},
@@ -75,6 +85,18 @@
7585
},
7686
"skype": {
7787
"type": "string"
88+
},
89+
"status_emoji_display_info": {
90+
"type": ["null", "array"],
91+
"items": {
92+
"type": ["null", "string"]
93+
}
94+
},
95+
"status_expiration": {
96+
"type": ["null", "integer"]
97+
},
98+
"status_text_canonical": {
99+
"type": ["null", "string"]
78100
}
79101
}
80102
},

0 commit comments

Comments
 (0)