Skip to content

Commit

Permalink
Merge branch 'master' into test-parallelism-and-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
postamar committed Nov 3, 2023
2 parents 1ae5667 + d0a7a91 commit 0cae1ec
Show file tree
Hide file tree
Showing 50 changed files with 1,462 additions and 751 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
- name: Install Pyenv
if: steps.changes.outputs.gradlecheck_any_changed == 'true'
run: python3 -m pip install virtualenv --user
- name: Docker login
# Some tests use testcontainers which pull images from DockerHub.
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Run Gradle Check
if: steps.changes.outputs.gradlecheck_any_changed == 'true'
uses: burrunan/gradle-cache-action@v1
Expand All @@ -98,7 +104,6 @@ jobs:
read-only: ${{ github.ref != 'refs/heads/master' }}
# TODO: be able to remove the skipSlowTests property
# TODO: remove the format task ASAP
# TODO: roll the CDK tasks into check
arguments: --scan --no-daemon --no-watch-fs format check -DskipSlowTests=true

# In case of self-hosted EC2 errors, remove this block.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ plugins {
id "java-library"
}

java {
compileJava {
options.compilerArgs += "-Xlint:-try"
}
}

dependencies {
annotationProcessor platform(libs.micronaut.bom)
annotationProcessor libs.bundles.micronaut.annotation.processor
Expand All @@ -19,6 +25,7 @@ dependencies {
implementation 'org.apache.ant:ant:1.10.10'
implementation 'org.apache.commons:commons-text:1.10.0'
implementation libs.bundles.datadog
implementation group: 'io.swagger', name: 'swagger-annotations', version: '1.6.2'

implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-api')
implementation project(':airbyte-cdk:java:airbyte-cdk:airbyte-commons')
Expand Down
6 changes: 6 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/airbyte-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ plugins {
id "java-library"
}

java {
compileJava {
options.compilerArgs += "-Xlint:-deprecation"
}
}

def specFile = "$projectDir/src/main/openapi/config.yaml"

def generate = tasks.register('generate')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
java {
compileJava {
options.compilerArgs += "-Xlint:-unchecked"
}
}

dependencies {
annotationProcessor libs.bundles.micronaut.annotation.processor
testAnnotationProcessor libs.bundles.micronaut.test.annotation.processor
Expand Down
6 changes: 6 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/airbyte-commons/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ plugins {
id 'de.undercouch.download' version "5.4.0"
}

java {
compileJava {
options.compilerArgs += "-Xlint:-varargs,-try,-deprecation"
}
}

dependencies {
// Dependencies for this module should be specified in the top-level build.gradle. See readme for more explanation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class MoreIterators {
* @param <T> type
* @return iterator with all elements
*/
@SafeVarargs
public static <T> Iterator<T> of(final T... elements) {
return Arrays.asList(elements).iterator();
}
Expand Down
6 changes: 6 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/config-models-oss/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ plugins {
id "com.github.eirnym.js2p" version "1.0"
}

java {
compileJava {
options.compilerArgs += "-Xlint:-unchecked"
}
}

dependencies {
annotationProcessor libs.bundles.micronaut.annotation.processor
api libs.bundles.micronaut.annotation
Expand Down
9 changes: 7 additions & 2 deletions airbyte-cdk/java/airbyte-cdk/core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

java {
compileJava {
options.compilerArgs += "-Xlint:-deprecation,-try,-rawtypes,-overloads,-cast,-unchecked"
}
}

configurations.all {
resolutionStrategy {
// TODO: Diagnose conflicting dependencies and remove these force overrides:
Expand Down Expand Up @@ -63,8 +69,7 @@ dependencies {
implementation libs.hikaricp
implementation libs.bundles.debezium.bundle

implementation libs.bundles.datadog
// implementation 'com.datadoghq:dd-trace-api'
api libs.bundles.datadog
implementation 'org.apache.sshd:sshd-mina:2.8.0'

implementation libs.testcontainers
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=0.3.0
version=0.4.0
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testGzipAvroFileWriter() throws Exception {
"codec", "zstandard",
"compression_level", 20,
"include_checksum", true))));
runTest(new FileBuffer(AvroSerializedBuffer.DEFAULT_SUFFIX), 970L, 985L, config, getExpectedString());
runTest(new FileBuffer(AvroSerializedBuffer.DEFAULT_SUFFIX), 965L, 985L, config, getExpectedString());
}

@Test
Expand Down
7 changes: 7 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/db-destinations/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

java {
compileJava {
options.compilerArgs += "-Xlint:-deprecation"
}
}

dependencies {
// Depends on core CDK classes (OK 👍)
implementation project(':airbyte-cdk:java:airbyte-cdk:core')
Expand Down
6 changes: 6 additions & 0 deletions airbyte-cdk/java/airbyte-cdk/db-sources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ plugins {
id "java-test-fixtures" // https://docs.gradle.org/current/userguide/java_testing.html#sec:java_test_fixtures
}

java {
compileJava {
options.compilerArgs += "-Xlint:-try,-rawtypes,-unchecked,-removal"
}
}

project.configurations {
// From `base-debezium`:
testFixturesImplementation.extendsFrom implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @param <T> The type associated with the state object managed by this manager.
* @param <S> The type associated with the state object stored in the state managed by this manager.
*/
public abstract class AbstractStateManager<T, S> implements StateManager<T, S> {
public abstract class AbstractStateManager<T, S> implements StateManager {

/**
* The {@link CursorManager} responsible for keeping track of the current cursor value for each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @param <T> The type of the state maintained by the manager.
* @param <S> The type of the stream(s) stored within the state maintained by the manager.
*/
public interface StateManager<T, S> {
public interface StateManager {

Logger LOGGER = LoggerFactory.getLogger(StateManager.class);

Expand Down
3 changes: 2 additions & 1 deletion airbyte-ci/connectors/pipelines/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ This command runs the Python tests for a airbyte-ci poetry package.
## Changelog
| Version | PR | Description |
| ------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| 2.5.3 | [#32090](https://github.com/airbytehq/airbyte/pull/32090) | Do not cache `docker login`. |
| 2.5.5 | [#32114](https://github.com/airbytehq/airbyte/pull/32114) | Create cache mount for `/var/lib/docker` to store images in `dind` context. |
| 2.5.4 | [#32090](https://github.com/airbytehq/airbyte/pull/32090) | Do not cache `docker login`. |
| 2.5.3 | [#31974](https://github.com/airbytehq/airbyte/pull/31974) | Fix latest CDK install and pip cache mount on connector install. |
| 2.5.2 | [#31871](https://github.com/airbytehq/airbyte/pull/31871) | Deactivate PR comments, add HTML report links to the PR status when its ready. |
| 2.5.1 | [#31774](https://github.com/airbytehq/airbyte/pull/31774) | Add a docker configuration check on `airbyte-ci` startup. |
Expand Down
1 change: 1 addition & 0 deletions airbyte-ci/connectors/pipelines/pipelines/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
DOCKER_HOST_NAME = "global-docker-host"
DOCKER_HOST_PORT = 2375
DOCKER_TMP_VOLUME_NAME = "shared-tmp"
DOCKER_VAR_LIB_VOLUME_NAME = "docker-cache"
REPO = git.Repo(search_parent_directories=True)
REPO_PATH = REPO.working_tree_dir
STATIC_REPORT_PREFIX = "airbyte-ci"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from dagger import Client, Container, File, Secret
from pipelines import consts
from pipelines.airbyte_ci.connectors.context import ConnectorContext, PipelineContext
from pipelines.consts import DOCKER_HOST_NAME, DOCKER_HOST_PORT, DOCKER_TMP_VOLUME_NAME
from pipelines.consts import DOCKER_HOST_NAME, DOCKER_HOST_PORT, DOCKER_TMP_VOLUME_NAME, DOCKER_VAR_LIB_VOLUME_NAME
from pipelines.helpers.utils import sh_dash_c


Expand All @@ -26,7 +26,8 @@ def with_global_dockerd_service(
Container: The container running dockerd as a service
"""
dockerd_container = (
dagger_client.container().from_(consts.DOCKER_DIND_IMAGE)
dagger_client.container()
.from_(consts.DOCKER_DIND_IMAGE)
# We set this env var because we need to use a non-default zombie reaper setting.
# The reason for this is that by default it will want to set its parent process ID to 1 when reaping.
# This won't be possible because of container-ception: dind is running inside the dagger engine.
Expand All @@ -49,6 +50,7 @@ def with_global_dockerd_service(
# Expose the docker host port.
.with_exposed_port(DOCKER_HOST_PORT)
# Mount the docker cache volumes.
.with_mounted_cache("/var/lib/docker", dagger_client.cache_volume(DOCKER_VAR_LIB_VOLUME_NAME))
.with_mounted_cache("/tmp", dagger_client.cache_volume(DOCKER_TMP_VOLUME_NAME))
)
if docker_hub_username_secret and docker_hub_password_secret:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-ci/connectors/pipelines/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "pipelines"
version = "2.5.4"
version = "2.5.5"
description = "Packaged maintained by the connector operations team to perform CI for connectors' pipelines"
authors = ["Airbyte <contact@airbyte.io>"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data:
connectorSubtype: vectorstore
connectorType: destination
definitionId: 7b7d7a0d-954c-45a0-bcfc-39a634b97736
dockerImageTag: 0.2.6
dockerImageTag: 0.2.7
dockerRepository: airbyte/destination-weaviate
documentationUrl: https://docs.airbyte.com/integrations/destinations/weaviate
githubIssueLabel: destination-weaviate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from setuptools import find_packages, setup

MAIN_REQUIREMENTS = ["airbyte-cdk[vector-db-based]==0.51.41", "weaviate-client==3.23.2"]
MAIN_REQUIREMENTS = ["airbyte-cdk[vector-db-based]==0.51.41", "weaviate-client==3.25.2"]

TEST_REQUIREMENTS = ["pytest~=6.2", "docker", "pytest-docker"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ acceptance_tests:
bypass_reason: "Hourly reports are disabled, because sync is too long"
- name: campaign_performance_report_hourly
bypass_reason: "Hourly reports are disabled, because sync is too long"
- name: campaign_impression_performance_report_hourly
bypass_reason: "Empty report; hourly data fetched is limited to 180 days"
- name: keyword_performance_report_hourly
bypass_reason: "Hourly reports are disabled, because sync is too long"
- name: geographic_performance_report_hourly
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,46 @@
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "campaign_impression_performance_report_hourly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "campaign_impression_performance_report_daily",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "campaign_impression_performance_report_weekly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "campaign_impression_performance_report_monthly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "keyword_performance_report_hourly",
Expand Down
Loading

0 comments on commit 0cae1ec

Please sign in to comment.