Skip to content

Commit 2de8b3c

Browse files
Merge branch 'master' into leti/experiment-add-source-in-signup
* master: (38 commits) New Source: Gridly (#18342) 🎉 New Source: Alpha Vantage (#18320) ci_integration_test.sh: cut GITHUB_STEP_SUMMARY (#18895) 🎉 New Source: Datadog [python cdk] (#18150) Hide Reject all button in consent dialog (#18596) feat: add doc url to track event (#18690) fix: install java in oss catalog deploy action (#18887) [CI] Speed up check_images_exist (#18873) Extract open API (#18879) Remove unused interfaces (#18880) add action for deploying oss connector catalog to GCS (#18633) feat: generate full connector catalog json (#18562) Add unsupported_protocol_version column to Connection (#18876) Extract OAuth API (#18818) update images to have non-transparent background (#18874) DiscoverSchema endpoints calculates diff and breaking change (#18571) Validate protocol version on connector update (#18639) Bmoric/extract notification api (#18812) Show version and changelog status for affected connectors (#18845) Bmoric/extract logs api (#18621) ...
2 parents 6c39ed8 + f156be9 commit 2de8b3c

File tree

217 files changed

+6873
-1602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+6873
-1602
lines changed
Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,54 @@
11
<!--- this comment is for `report-connectors-dependency.yml` identification, do not remove -->
22

3-
NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to run corresponding integration tests:
3+
NOTE ⚠️ Changes in this PR affect the following connectors. Make sure to do the following as needed:
4+
- Run integration tests
5+
- Bump connector version
6+
- Add changelog
7+
- Publish the new version
48

5-
<details>
9+
<details {source_open}>
610
<summary>
7-
Sources ({num_sources})
11+
12+
### {source_status_summary} Sources ({num_sources})
813

914
</summary>
1015

11-
{sources}
16+
| Connector | Version | Changelog | Publish |
17+
| --- | :---: | :---: | :---: |
18+
{source_rows}
1219

1320
</details>
1421

15-
<details>
22+
<details {destination_open}>
1623
<summary>
17-
Destinations ({num_destinations})
24+
25+
### {destination_status_summary} Destinations ({num_destinations})
1826

1927
</summary>
2028

21-
{destinations}
29+
| Connector | Version | Changelog | Publish |
30+
| --- | :---: | :---: | :---: |
31+
{destination_rows}
2232

2333
</details>
2434

2535
{others}
36+
37+
<details>
38+
39+
<summary>
40+
41+
### Notes
42+
43+
</summary>
44+
45+
| Category | Status | Actionable Item |
46+
| --- | :---: | --- |
47+
| Version | ❌<br/>mismatch | The version of the connector is different from its normal variant. Please bump the version of the connector. |
48+
| | ⚠<br/>doc not found | The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like `source-jdbc` is not published or documented). Please double-check to make sure that it is not a bug. |
49+
| Changelog | ⚠<br/>doc not found | The connector does not seem to have a documentation file. This can be normal (e.g. basic connector like `source-jdbc` is not published or documented). Please double-check to make sure that it is not a bug. |
50+
| | ❌<br/>changelog missing | There is no chnagelog for the current version of the connector. If you are the author of the current version, please add a changelog. |
51+
| Publish | ⚠<br/>not in seed | The connector is not in the seed file (e.g. `source_definitions.yaml`), so its publication status cannot be checked. This can be normal (e.g. some connectors are cloud-specific, and only listed in the cloud seed file). Please double-check to make sure that it is not a bug. |
52+
| | ❌<br/>diff seed version | The connector exists in the seed file, but the latest version is not listed there. This usually means that the latest version is not published. Please use the `/publish` command to publish the latest version. |
53+
54+
</details>

.github/workflows/create-release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ jobs:
3232
# The sed removes carriage returns so that the body is easier to parse later, and
3333
# escapes backticks so that they are not executed as commands.
3434
PR_BODY=$(printf '%s' "$PR" | jq '.[0].body' | sed 's/\\r//g' | sed 's/`/\\`/g')
35-
echo pr_body=${PR_BODY} >> $GITHUB_OUTPUT
35+
echo "pr_body<<EOF" >> $GITHUB_ENV
36+
echo "$PR_BODY" >> $GITHUB_ENV
37+
echo "EOF" >> $GITHUB_ENV
3638
- name: Extract Changelog
3739
id: extract_changelog
3840
shell: bash
3941
run: |-
4042
set -x
41-
PR_BODY=${{ steps.fetch_pr_body.outputs.pr_body}}
43+
PR_BODY=${{ env.pr_body}}
4244
if [[ $PR_BODY = "null" ]]; then
4345
echo "No PR body exists for this commit, so a release cannot be generated."
4446
exit 1
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy OSS Connector Catalog to GCS
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- airbyte-config/init/src/main/resources/seed
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
deploy-catalog:
14+
name: "Deploy Catalog"
15+
if: github.ref == 'refs/heads/master'
16+
runs-on: ubuntu-latest
17+
concurrency: deploy-oss-connector-catalog
18+
steps:
19+
- name: Checkout Airbyte
20+
uses: actions/checkout@v2
21+
- name: Setup Cloud SDK
22+
uses: google-github-actions/setup-gcloud@v0
23+
with:
24+
service_account_key: ${{ secrets.PROD_SPEC_CACHE_SA_KEY }}
25+
export_default_credentials: true
26+
- name: Install Java
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: "17"
30+
- name: Generate catalog
31+
run: SUB_BUILD=PLATFORM ./gradlew :airbyte-config:init:processResources
32+
- name: Upload catalog to GCS
33+
shell: bash
34+
run: |
35+
gcs_bucket_name="prod-airbyte-cloud-connector-metadata-service"
36+
catalog_path="airbyte-config/init/src/main/resources/seed/oss_catalog.json"
37+
gsutil -h "Cache-Control:public, max-age=10" cp "$catalog_path" "gs://$gcs_bucket_name/oss_catalog.json"

.github/workflows/publish-helm-charts.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ jobs:
109109
id: changelog
110110
run: |
111111
cd ./airbyte/
112-
echo "::set-output name=changelog::$(PAGER=cat git log $(git describe --tags --match "*-helm" $(git rev-list --tags --max-count=1))..HEAD --oneline --decorate=no)"
112+
changelog=$(PAGER=cat git log $(git describe --tags --match "*-helm" $(git rev-list --tags --max-count=1))..HEAD --oneline --decorate=no)
113+
echo "changelog<<EOF" >> $GITHUB_ENV
114+
echo "$changelog" >> $GITHUB_ENV
115+
echo "EOF" >> $GITHUB_ENV
113116
114117
- name: Create Pull Request
115118
uses: peter-evans/create-pull-request@v4
@@ -122,7 +125,7 @@ jobs:
122125
## What
123126
Bump version reference in all Chart.yaml files to ${{ needs.generate-semantic-version.outputs.next-version }}
124127
CHANGELOG:
125-
${{ steps.changelog.outputs.changelog }}
128+
${{ env.changelog }}
126129
commit-message: Bump helm chart version reference to ${{ needs.generate-semantic-version.outputs.next-version }}
127130
delete-branch: true
128131

.github/workflows/release-airbyte-os.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ jobs:
135135
run: |
136136
chmod +x tools/bin/pr_body.sh
137137
body=$(./tools/bin/pr_body.sh)
138-
body="${body//$'\n'/'%0A'}"
139-
echo PR_BODY=$body >> $GITHUB_OUTPUT
138+
echo "PR_BODY<<EOF" >> $GITHUB_ENV
139+
echo "$body" >> $GITHUB_ENV
140+
echo "EOF" >> $GITHUB_ENV
140141
- name: Create Pull Request
141142
id: cpr
142143
uses: peter-evans/create-pull-request@v3
@@ -146,7 +147,7 @@ jobs:
146147
branch-suffix: random
147148
delete-branch: true
148149
title: Bump Airbyte version from ${{ steps.bump_version.outputs.PREV_VERSION }} to ${{ steps.bump_version.outputs.NEW_VERSION }}
149-
body: ${{ steps.pr_body.outputs.PR_BODY }}
150+
body: ${{ env.PR_BODY }}
150151
commit-message: Bump Airbyte version from ${{ steps.bump_version.outputs.PREV_VERSION }} to ${{ steps.bump_version.outputs.NEW_VERSION }}
151152
- name: PR Details
152153
run: |

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ docs/SUMMARY.md
7171
# Files generated by unit tests
7272
**/specs_secrets_mask.yaml
7373

74+
# Files generated for uploading to GCS
75+
airbyte-config/**/resources/seed/oss_catalog.json
76+
7477
# Helm charts .tgz dependencies
7578
charts/**/charts
7679

airbyte-api/src/main/openapi/config.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ tags:
4949
description: Destination related resources.
5050
- name: connection
5151
description: Connection between sources and destinations.
52-
- name: oauth
53-
description: OAuth related resources to delegate access from user.
52+
- name: destination_oauth
53+
description: Source OAuth related resources to delegate access from user.
54+
- name: source_oauth
55+
description: Source OAuth related resources to delegate access from user.
5456
- name: db_migration
5557
description: Database migration related resources.
5658
- name: web_backend
@@ -1762,7 +1764,7 @@ paths:
17621764
/v1/source_oauths/oauth_params/create:
17631765
post:
17641766
tags:
1765-
- oauth
1767+
- source_oauth
17661768
summary: >
17671769
Sets instancewide variables to be used for the oauth flow when creating this source. When set, these variables will be injected
17681770
into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with
@@ -1785,7 +1787,7 @@ paths:
17851787
/v1/source_oauths/get_consent_url:
17861788
post:
17871789
tags:
1788-
- oauth
1790+
- source_oauth
17891791
summary: Given a source connector definition ID, return the URL to the consent screen where to redirect the user to.
17901792
operationId: getSourceOAuthConsent
17911793
requestBody:
@@ -1808,7 +1810,7 @@ paths:
18081810
/v1/source_oauths/complete_oauth:
18091811
post:
18101812
tags:
1811-
- oauth
1813+
- source_oauth
18121814
summary: Given a source def ID generate an access/refresh token etc.
18131815
operationId: completeSourceOAuth
18141816
requestBody:
@@ -1831,7 +1833,7 @@ paths:
18311833
/v1/destination_oauths/get_consent_url:
18321834
post:
18331835
tags:
1834-
- oauth
1836+
- destination_oauth
18351837
summary: Given a destination connector definition ID, return the URL to the consent screen where to redirect the user to.
18361838
operationId: getDestinationOAuthConsent
18371839
requestBody:
@@ -1854,7 +1856,7 @@ paths:
18541856
/v1/destination_oauths/complete_oauth:
18551857
post:
18561858
tags:
1857-
- oauth
1859+
- destination_oauth
18581860
summary: Given a destination def ID generate an access/refresh token etc.
18591861
operationId: completeDestinationOAuth
18601862
requestBody:
@@ -1877,7 +1879,7 @@ paths:
18771879
/v1/destination_oauths/oauth_params/create:
18781880
post:
18791881
tags:
1880-
- oauth
1882+
- destination_oauth
18811883
summary: >
18821884
Sets instancewide variables to be used for the oauth flow when creating this destination. When set, these variables will be injected
18831885
into a connector's configuration before any interaction with the connector image itself. This enables running oauth flows with
@@ -2822,6 +2824,9 @@ components:
28222824
properties:
28232825
sourceId:
28242826
$ref: "#/components/schemas/SourceId"
2827+
connectionId:
2828+
type: string
2829+
format: uuid
28252830
disable_cache:
28262831
type: boolean
28272832
SourceUpdate:
@@ -2883,6 +2888,10 @@ components:
28832888
catalogId:
28842889
type: string
28852890
format: uuid
2891+
catalogDiff:
2892+
$ref: "#/components/schemas/CatalogDiff"
2893+
breakingChange:
2894+
type: boolean
28862895
SourceSearch:
28872896
type: object
28882897
properties:
@@ -3375,6 +3384,8 @@ components:
33753384
type: boolean
33763385
nonBreakingChangesPreference:
33773386
$ref: "#/components/schemas/NonBreakingChangesPreference"
3387+
breakingChange:
3388+
type: boolean
33783389
WebBackendConnectionUpdate:
33793390
type: object
33803391
description: Used to apply a patch-style update to a connection, which means that null properties remain unchanged

airbyte-bootloader/src/test/java/io/airbyte/bootloader/BootloaderAppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void testBootloaderAppBlankDb() throws Exception {
141141
val configsMigrator = new ConfigsDatabaseMigrator(configDatabase, configsFlyway);
142142
// this line should change with every new migration
143143
// to show that you meant to make a new migration to the prod database
144-
assertEquals("0.40.12.001", configsMigrator.getLatestMigration().getVersion().getVersion());
144+
assertEquals("0.40.18.001", configsMigrator.getLatestMigration().getVersion().getVersion());
145145

146146
val jobsPersistence = new DefaultJobPersistence(jobDatabase);
147147
assertEquals(VERSION_0330_ALPHA, jobsPersistence.getVersion().get());
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
3+
*/
4+
5+
package io.airbyte.commons.version;
6+
7+
public record AirbyteProtocolVersionRange(Version min, Version max) {
8+
9+
public boolean isSupported(final Version v) {
10+
final Integer major = getMajor(v);
11+
return getMajor(min) <= major && major <= getMajor(max);
12+
}
13+
14+
private Integer getMajor(final Version v) {
15+
return Integer.valueOf(v.getMajorVersion());
16+
}
17+
18+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
3+
*/
4+
5+
package io.airbyte.commons.version;
6+
7+
import static org.junit.jupiter.api.Assertions.assertFalse;
8+
import static org.junit.jupiter.api.Assertions.assertTrue;
9+
10+
import org.junit.jupiter.api.Test;
11+
12+
class AirbyteProtocolVersionRangeTest {
13+
14+
@Test
15+
void checkRanges() {
16+
final AirbyteProtocolVersionRange range = new AirbyteProtocolVersionRange(new Version("1.2.3"), new Version("4.3.2"));
17+
assertTrue(range.isSupported(new Version("2.0.0")));
18+
assertTrue(range.isSupported(new Version("1.2.3")));
19+
assertTrue(range.isSupported(new Version("4.3.2")));
20+
21+
// We should only be requiring major to be within range
22+
assertTrue(range.isSupported(new Version("1.0.0")));
23+
assertTrue(range.isSupported(new Version("4.4.0")));
24+
25+
assertFalse(range.isSupported(new Version("0.2.3")));
26+
assertFalse(range.isSupported(new Version("5.0.0")));
27+
}
28+
29+
@Test
30+
void checkRangeWithOnlyOneMajor() {
31+
final AirbyteProtocolVersionRange range = new AirbyteProtocolVersionRange(new Version("2.0.0"), new Version("2.1.2"));
32+
33+
assertTrue(range.isSupported(new Version("2.0.0")));
34+
assertTrue(range.isSupported(new Version("2.5.0")));
35+
36+
assertFalse(range.isSupported(new Version("1.0.0")));
37+
assertFalse(range.isSupported(new Version("3.0.0")));
38+
}
39+
40+
}

airbyte-config/config-persistence/src/main/java/io/airbyte/config/persistence/ConfigPersistence.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package io.airbyte.config.persistence;
66

77
import io.airbyte.config.AirbyteConfig;
8-
import io.airbyte.config.ConfigWithMetadata;
98
import io.airbyte.validation.json.JsonValidationException;
109
import java.io.IOException;
1110
import java.util.List;
@@ -21,11 +20,6 @@ public interface ConfigPersistence {
2120

2221
<T> List<T> listConfigs(AirbyteConfig configType, Class<T> clazz) throws JsonValidationException, IOException;
2322

24-
<T> ConfigWithMetadata<T> getConfigWithMetadata(AirbyteConfig configType, String configId, Class<T> clazz)
25-
throws ConfigNotFoundException, JsonValidationException, IOException;
26-
27-
<T> List<ConfigWithMetadata<T>> listConfigsWithMetadata(AirbyteConfig configType, Class<T> clazz) throws JsonValidationException, IOException;
28-
2923
<T> void writeConfig(AirbyteConfig configType, String configId, T config) throws JsonValidationException, IOException;
3024

3125
<T> void writeConfigs(AirbyteConfig configType, Map<String, T> configs) throws IOException, JsonValidationException;

0 commit comments

Comments
 (0)