forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github workflows: repo-wide auto-format (airbytehq#29798)
Co-authored-by: postamar <[email protected]>
- Loading branch information
Showing
145 changed files
with
996 additions
and
688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,9 +89,70 @@ jobs: | |
# - run: | | ||
# echo '${{ toJSON(needs) }}' | ||
|
||
format: | ||
needs: changes | ||
runs-on: ubuntu-latest | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: needs.changes.outputs.any_change == 'true' || (always() && github.ref == 'refs/heads/master') | ||
name: "Apply All Formatting Rules" | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Checkout Airbyte | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Cache Build Artifacts | ||
uses: ./.github/actions/cache-build-artifacts | ||
with: | ||
cache-key: ${{ secrets.CACHE_VERSION }}-format | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "zulu" | ||
java-version: "17" | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
|
||
- name: Set up CI Gradle Properties | ||
run: | | ||
mkdir -p ~/.gradle/ | ||
cat > ~/.gradle/gradle.properties <<EOF | ||
org.gradle.jvmargs=-Xmx8g -Xss4m \ | ||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ | ||
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ | ||
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ | ||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ | ||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED | ||
org.gradle.workers.max=8 | ||
org.gradle.vfs.watch=false | ||
EOF | ||
- name: Format | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: ./gradlew format --scan --info --stacktrace | ||
attempt_limit: 3 | ||
attempt_delay: 5000 # in ms | ||
|
||
# This is helpful in the case that we change a previously committed generated file to be ignored by git. | ||
- name: Remove any files that have been gitignored | ||
run: git ls-files -i -c --exclude-from=.gitignore | xargs -r git rm --cached | ||
|
||
- name: Commit Formatting Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Automated Commit - Formatting Changes | ||
commit_user_name: Octavia Squidington III | ||
commit_user_email: [email protected] | ||
|
||
## BUILDS | ||
octavia-cli-build: | ||
needs: changes | ||
needs: | ||
- changes | ||
- format | ||
runs-on: ubuntu-latest | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: needs.changes.outputs.cli == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/master') | ||
|
@@ -133,16 +194,6 @@ jobs: | |
org.gradle.vfs.watch=false | ||
EOF | ||
- name: Format | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: SUB_BUILD=OCTAVIA_CLI ./gradlew format --scan --info --stacktrace | ||
attempt_limit: 3 | ||
attempt_delay: 5000 # in ms | ||
|
||
- name: Ensure no file change | ||
run: ./tools/bin/check_for_file_changes | ||
|
||
- name: Build | ||
uses: Wandalen/[email protected] | ||
with: | ||
|
@@ -158,7 +209,9 @@ jobs: | |
attempt_delay: 5000 # in ms | ||
|
||
python-cdk-build: | ||
needs: changes | ||
needs: | ||
- changes | ||
- format | ||
runs-on: ubuntu-latest | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: needs.changes.outputs.python_cdk == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/master') | ||
|
@@ -203,20 +256,6 @@ jobs: | |
org.gradle.vfs.watch=false | ||
EOF | ||
- name: Format | ||
uses: Wandalen/[email protected] | ||
with: | ||
command: SUB_BUILD=CDK ./gradlew format --scan --info --stacktrace | ||
attempt_limit: 3 | ||
attempt_delay: 5000 # in ms | ||
|
||
- name: Commit Formatting Changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Automated Commit - Formatting Changes | ||
commit_user_name: Octavia Squidington III | ||
commit_user_email: [email protected] | ||
|
||
- name: Build | ||
uses: Wandalen/[email protected] | ||
with: | ||
|
@@ -225,7 +264,9 @@ jobs: | |
attempt_delay: 5000 # in ms | ||
|
||
java-cdk-build: | ||
needs: changes | ||
needs: | ||
- changes | ||
- format | ||
runs-on: ubuntu-latest | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: needs.changes.outputs.java_cdk == 'true' || needs.changes.outputs.build == 'true' || (always() && github.ref == 'refs/heads/master') | ||
|
@@ -272,6 +313,7 @@ jobs: | |
name: "Connectors Base: Start Build EC2 Runner" | ||
needs: | ||
- changes | ||
- format | ||
# Because scheduled builds on master require us to skip the changes job. Use always() to force this to run on master. | ||
if: | | ||
needs.changes.outputs.build == 'true' || needs.changes.outputs.connectors_base == 'true' || needs.changes.outputs.db == 'true' || (always() && github.ref == 'refs/heads/master') | ||
|
4 changes: 0 additions & 4 deletions
4
airbyte-cdk/python/airbyte_cdk/sources/declarative/models/declarative_component_schema.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
airbyte-ci/connectors/ci_credentials/ci_credentials/secrets_manager.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import base64 | ||
import json | ||
import os | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
airbyte-ci/connectors/ci_credentials/tests/test_secrets_manager.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
import base64 | ||
import json | ||
import re | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
|
||
from datetime import datetime | ||
|
||
import pandas as pd | ||
import pytest | ||
|
||
|
5 changes: 3 additions & 2 deletions
5
airbyte-ci/connectors/metadata_service/lib/metadata_service/commands.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
airbyte-ci/connectors/metadata_service/lib/metadata_service/constants.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# | ||
|
||
METADATA_FILE_NAME = "metadata.yaml" | ||
ICON_FILE_NAME = "icon.svg" | ||
METADATA_FOLDER = "metadata" |
7 changes: 6 additions & 1 deletion
7
airbyte-ci/connectors/metadata_service/lib/metadata_service/docker_hub.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
airbyte-ci/connectors/metadata_service/lib/metadata_service/gcs_upload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...data_service/lib/metadata_service/models/generated/ActorDefinitionResourceRequirements.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...e-ci/connectors/metadata_service/lib/metadata_service/models/generated/AirbyteInternal.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/AllowedHosts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...s/metadata_service/lib/metadata_service/models/generated/ConnectorMetadataDefinitionV0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...a_service/lib/metadata_service/models/generated/ConnectorRegistryDestinationDefinition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...tadata_service/lib/metadata_service/models/generated/ConnectorRegistrySourceDefinition.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
.../connectors/metadata_service/lib/metadata_service/models/generated/ConnectorRegistryV0.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ci/connectors/metadata_service/lib/metadata_service/models/generated/ConnectorReleases.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
airbyte-ci/connectors/metadata_service/lib/metadata_service/models/generated/JobType.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.