Skip to content
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

🔧 Pinterest Schema updated #9537

Closed
wants to merge 176 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
8071019
🔧 Pinterest Schema updated
rfortmann-ewolff Jan 16, 2022
d65b8f9
🐙 octavia-cli: generate open api client (#9277)
alafanechere Jan 17, 2022
d09829b
🎉 Source Mailchimp: support oauth flow (#7159)
annalvova05 Jan 17, 2022
25fb7e7
Source Hubspot: Some incremental CRM objects and engagements (#8887)
lgomezm Jan 17, 2022
cb6d9ab
🐛 Source Github: Remove optional parameter `Accept` for reaction's st…
yevhenii-ldv Jan 17, 2022
edc0925
🎉 SurveyMonkey source: scopes change (#9508)
annalvova05 Jan 17, 2022
032b06d
Add section to UX handbook about pointing to page anchors
sherifnada Jan 18, 2022
6b502d8
🎉 square: added oauth support (#6842)
midavadim Jan 18, 2022
9535f40
🎨 new line formatting
rfortmann-ewolff Jan 18, 2022
c4b365c
fix master formatting (#9571)
subodh1810 Jan 18, 2022
3f9cbec
Destination BigQuery: Accept Dataset ID field prefixed by Project ID …
koji-m Jan 18, 2022
62c433e
Source Salesforce: fix pagination in REST API streams (#9151)
augan-rymkhan Jan 18, 2022
0815100
🎉 New Source: Chartmogul (#9381)
Jan 18, 2022
0187efd
Destination BigQuery: update description for some fields (#9573)
yurii-bidiuk Jan 18, 2022
cbba9fa
🐛 Fix syntax errors in our specification docs (#9576)
timroes Jan 18, 2022
7a26246
🐛 Minor correction in the frontend tech-stack (#9547)
timroes Jan 18, 2022
f3798ed
add node strict check (#9335)
jamakase Jan 18, 2022
0a3713a
Source Salesforce: Deprecate API Type parameter (#9302)
augan-rymkhan Jan 19, 2022
38a5d84
🐛 Prevent SVG icons from leaking into DOM (#9574)
timroes Jan 19, 2022
cb8644e
Remove empty helm workflow (#9592)
Jan 19, 2022
a1e2b63
Update fields in source-connectors specifications: google-ads (#9149)
ycherniaiev Jan 19, 2022
df4b4d6
Update fields in source-connectors specifications: google-analytics-v…
ycherniaiev Jan 19, 2022
89308f7
Snowflake source: keep session alive to avoid breaking connection (#9…
sashaNeshcheret Jan 19, 2022
6990cc7
🐛 Source Intercom: Fix handling of scroll param when it expired (#9513)
lazebnyi Jan 19, 2022
208c146
updated benchmarks databases and scripts (#9597)
andriikorotkov Jan 19, 2022
1832c69
Add SonarQube to CI (#8362)
h-chlor Jan 19, 2022
28b174c
Fix logger for function 'should_retry' (#9619)
yevhenii-ldv Jan 19, 2022
48ca806
Amazon Seller Partner Fix: 0 records read in reports (#9581)
prudhvi85 Jan 19, 2022
9d224f2
add annotations to posgtresql deployment with helm (#9556)
alafanechere Jan 19, 2022
8b149e8
🎉 Source Shopify: implement Oauth2.0 for Airbyte-Cloud (#9591)
bazarnov Jan 19, 2022
97eeb2f
Fix generate.sh from bad trap for ERR signal in by using bash instead…
noahkawasakigoogle Jan 20, 2022
e7da923
Fix record count and add acceptance test to the new scheduler (#9487)
benmoriceau Jan 20, 2022
16133cf
Rm flaky test (#9628)
benmoriceau Jan 20, 2022
3aa0716
Bump Airbyte version from 0.35.5-alpha to 0.35.6-alpha (#9630)
octavia-squidington-iii Jan 20, 2022
b8cd772
Documentation: More details about using an external database (#9611)
alafanechere Jan 20, 2022
e142a4f
Update fields in source-connectors specifications: lever-hiring (#9214)
ycherniaiev Jan 20, 2022
9afbbff
🎉 New Source: Flexport (#8777)
monai Jan 20, 2022
db40932
async container launch kubernetes "process" (#9242)
jrhizor Jan 20, 2022
1108361
remove flexport until it is published (#9647)
jrhizor Jan 20, 2022
0e5f1a8
Publish source shopify: added shop_url to all stream records (#9635)
harshithmullapudi Jan 20, 2022
d3d4d20
Fixes editing of already selected item for array of objects editor (#…
jamakase Jan 20, 2022
1aee597
temporarily disable async orchestrator integration test (#9662)
jrhizor Jan 20, 2022
9fe804a
🎉 Destination-snowflake: start using new S3StreamCopier, and expose t…
etsybaev Jan 20, 2022
d2d0335
Make sure generate.sh has docker running before trying to generate, a…
noahkawasakigoogle Jan 20, 2022
a007953
Add totalStats and streamStats in Attempts API response (#9583)
pmossman Jan 20, 2022
4c83ac1
Migration: add `failureSummary` column to `Attempts` table in jobs da…
pmossman Jan 20, 2022
111131a
change severity of state delta tracker exception and clarify messagin…
pmossman Jan 20, 2022
0bad099
use attemptNumber instead of attemptId where appropriate (#9671)
pmossman Jan 21, 2022
f6f0c33
🐙 octavia-cli: list connectors (#9546)
alafanechere Jan 21, 2022
3dac7ae
Fix demo link in onboarding (#9558)
jamakase Jan 21, 2022
16eb064
Hide for now settings/configuration (#9559)
jamakase Jan 21, 2022
8587487
unblocked shopify from user selection (#9691)
bazarnov Jan 21, 2022
2ddf0bc
🐛 Source Github: add custom pagination size for large streams (#9664)
yevhenii-ldv Jan 21, 2022
e9dba45
fix docker process factory test on ci (#9695)
jrhizor Jan 21, 2022
c524e0a
🎉 Source HubSpot: Add more fields for `email_events` stream (#9641)
grubberr Jan 21, 2022
aa31f6a
🎉 Collapse sonar reports (#9699)
antixar Jan 21, 2022
1a74de6
🎉 New Source: PersistIq (#9515)
Zaimwa9 Jan 21, 2022
7e23ee2
🎉 Source Amazon Seller Partner: Add GET_FLAT_FILE_ALL_ORDERS_DATA_BY_…
ron-damon Jan 21, 2022
6490bf7
fix constructor for connector builds (#9704)
jrhizor Jan 21, 2022
8529928
🎉 Source TikTok Marketing: support oauth flow (#7636)
annalvova05 Jan 21, 2022
0864c00
Revert "use attemptNumber instead of attemptId where appropriate (#96…
pmossman Jan 21, 2022
19ea1b6
Update the cancellation (#9705)
benmoriceau Jan 21, 2022
3d46908
Bump Airbyte version from 0.35.6-alpha to 0.35.7-alpha (#9708)
octavia-squidington-iii Jan 21, 2022
961f2f6
🎉 Codecov: Implement Codecove into Sonar (#9666)
yevhenii-ldv Jan 23, 2022
05c84f5
Improve jobs logs error handling (#9585)
jamakase Jan 23, 2022
b269b9f
🎉 Source e2e test: support custom catalog (#9720)
tuliren Jan 24, 2022
0ed20bc
🐛 Source Salesforce: Fix error during generating schema (#9478)
lazebnyi Jan 24, 2022
aaef33e
Source google ads: fix for page token expired (#9608)
augan-rymkhan Jan 24, 2022
395a6ec
MIT license for docs so its consistent with connectors licensing (#9701)
noahkawasakigoogle Jan 24, 2022
9ecd5a5
Add license check for webapp (#9689)
Jan 24, 2022
62f2afb
🐛 Publish strict-encrypt source-connectors: source-clickhouse-strict…
bazarnov Jan 24, 2022
5a091b1
Destination Snowflake: edit schema name which contains the character …
VitaliiMaltsev Jan 24, 2022
df6610b
:tada: Updated azure blob storage destination (#9682)
andriikorotkov Jan 24, 2022
c83d3aa
🐛 Source Postgres: allow handling of java sql date (#9554)
shrodingers Jan 24, 2022
5e002ad
link in summary (#9760)
alafanechere Jan 24, 2022
0eb3688
Reset error (#9761)
benmoriceau Jan 24, 2022
896c117
Bump Airbyte version from 0.35.7-alpha to 0.35.8-alpha (#9762)
octavia-squidington-iii Jan 24, 2022
d76fe1e
🎉 Source Shopify: Add privileges validation (#9648)
lazebnyi Jan 24, 2022
ded87be
use path for GOOGLE_APPLICATION_CREDENTIALS (#9763)
jrhizor Jan 24, 2022
f5b5fea
fix attempt output persistence for schedulerv2 (#9764)
jrhizor Jan 24, 2022
7e25fdd
Bump Airbyte version from 0.35.8-alpha to 0.35.9-alpha (#9765)
octavia-squidington-iii Jan 24, 2022
f5beea1
Documentation: postgres version update for creating index (#9766)
Jan 25, 2022
d616279
Source hubspot: add Feedback Submissions stream and update Ticket Pip…
vladimir-remar Jan 25, 2022
0dfbfdc
feat: added api to jobs handler to get required debug info (#9703)
harshithmullapudi Jan 25, 2022
e05dfd1
🐙 octavia-cli: add command to list existing sources, destinations and…
alafanechere Jan 25, 2022
7806dbc
Update fields in source-connectors specifications: google-sheets (#9208)
ycherniaiev Jan 25, 2022
7057dc9
🔖 Version Bump in Dockerfile
rfortmann-ewolff Jan 25, 2022
aa9bc5f
⬆️ Dependency in Airbyte connector index updated
rfortmann-ewolff Jan 25, 2022
ed1d26a
S3, GCS Destinations : Fix interface duplication (#9577)
DoNotPanicUA Jan 25, 2022
579923d
Update fields in source-connectors specifications: posthog, recurly, …
igrankova Jan 25, 2022
20d6009
add Sentry docs (#9791)
antixar Jan 25, 2022
2e7ee75
Source GoogleAds: add end_date to config (#8669)
iberchid Jan 25, 2022
926383e
Helm Chart: Fix get minio secrets from Values (#9769)
reggermont Jan 25, 2022
2629098
🐛 Source Salesforce: parse CSV with "unix" dialect (#9757)
grubberr Jan 25, 2022
4a290fa
[#9554 PR] Postgres/Mssql Source: Increase version (#9753)
DoNotPanicUA Jan 25, 2022
8f46b37
add getConfigWithMetadata method to ConfigPersistence (#9795)
lmossman Jan 25, 2022
d0b226b
Address review comments for mock source (#9773)
tuliren Jan 25, 2022
894a072
Bump Airbyte version from 0.35.9-alpha to 0.35.10-alpha (#9800)
octavia-squidington-iii Jan 25, 2022
805c8d9
add FailureReason and AttemptFailureSummary schema (#9527)
pmossman Jan 25, 2022
b40b303
🎉Source HubSpot: Adds form_submission and property_history streams (#…
tinomerl Jan 26, 2022
f78ede0
reintroduce window in days, log warning when sampling occurs (#9480)
eliziario Jan 26, 2022
a6a7ee5
Add data types documentation (#9767)
edgao Jan 26, 2022
dda6902
feat: add publish-external command to slash commands to publish exter…
harshithmullapudi Jan 26, 2022
4b148db
Bmoric/deployment signal (#9799)
benmoriceau Jan 26, 2022
09a202d
add platform project automation github workflow (#9821)
pmossman Jan 26, 2022
16a16ec
fix double with: (#9823)
pmossman Jan 26, 2022
5a8fdc6
Platform project automation (#9825)
pmossman Jan 26, 2022
eafaadf
GitHub Source: add fields for auto merge in pull_request stream (#9…
bleonard Jan 26, 2022
ac32b8e
use project-beta-automations action
pmossman Jan 26, 2022
5bce24c
🎉Source-redshift: added an optional field for schema\s selection (#9721)
etsybaev Jan 26, 2022
9efa44f
Source Github: correct spec + bump connector version (#9580)
marcosmarxm Jan 26, 2022
4d48e77
🎉 Source BigCommerce: add Products Stream (#9516)
guidoturtu Jan 26, 2022
1c6b1fb
Bump Airbyte version from 0.35.10-alpha to 0.35.11-alpha (#9820)
octavia-squidington-iii Jan 26, 2022
4bed602
try adding custom fields
pmossman Jan 26, 2022
1f139da
Update platform-project-automation.yml
pmossman Jan 26, 2022
147d0bb
Update platform-project-automation.yml
pmossman Jan 26, 2022
d08afa8
Update platform-project-automation.yml
pmossman Jan 26, 2022
86b506f
Update platform-project-automation.yml
pmossman Jan 26, 2022
40194c6
:bug: Source Slack schema and retry function (#9575)
marcosmarxm Jan 26, 2022
d7052a4
docs: fix channel name (#9830)
marcosmarxm Jan 27, 2022
e4661fb
Remove regex check from Java source acceptance test (#9829)
tuliren Jan 27, 2022
1c421a9
Source Hubspot: Fix getting submissions for all forms (#9555)
gergelylendvai Jan 27, 2022
e53e290
replace '\\n' -> '\n' (#9793)
grubberr Jan 27, 2022
360e438
Mark web backend APIs as non-public (#9813)
Jan 27, 2022
2a015a8
SAT: Introduce new way to compare records based on PK #9718 (#9768)
keu Jan 27, 2022
2ac3274
Heartbeat for long running activity (#9852)
benmoriceau Jan 27, 2022
ccfe63a
:tada: Destination snowflake - update fields in specifications (#9184)
igrankova Jan 28, 2022
4262d26
Fix reset (#9801)
benmoriceau Jan 28, 2022
2e772e1
add heartbeating when setting up the TemporalAttemptExecution (#9854)
jrhizor Jan 28, 2022
720deaf
Bump Airbyte version from 0.35.11-alpha to 0.35.12-alpha (#9857)
octavia-squidington-iii Jan 28, 2022
cb69017
Source Salesforce: finish the sync with success if rate limit is reac…
augan-rymkhan Jan 28, 2022
f3fa7ad
Documentation: fix typo in configuring Airbyte (SECRET_PERSISTENCE) (…
alafanechere Jan 28, 2022
87a3055
Tweak dbt configuration parameters to reasonable values (#9846)
ChristopheDuong Jan 28, 2022
af38f95
:tada: destination pubsub - update fields in specifications (#9183)
igrankova Jan 28, 2022
8bde528
:tada: destination oracle - update fields in specifications (#9177)
igrankova Jan 28, 2022
a3b44ec
Documentation: using custom connectors (#9833)
alafanechere Jan 28, 2022
c8ee3f8
SAT: check for not allowed keywords `allOf`, `not` in connectors sche…
grubberr Jan 28, 2022
c51608a
add new platform-project-start-sprint workflow skeleton
pmossman Jan 28, 2022
537da16
configure temporal workflow execution ttl (#9838)
jrhizor Jan 28, 2022
57c8185
:tada: Destination oracle-strict-encrypt - update title description (…
midavadim Jan 28, 2022
2f41810
Verify source redshift schema selection in tests (#9862)
tuliren Jan 28, 2022
d70417a
Wrap the `hook-weight` value between double quotes (#9881)
mohamagdy Jan 28, 2022
5391880
🎉 Source and Destination Snowflake: Add jdbc_url_params support for o…
noahkawasakigoogle Jan 28, 2022
d566369
🐛 SAT: Fix test_oneof_usage fail #9860 (#9861)
keu Jan 28, 2022
028d0e2
Add logs (#9882)
benmoriceau Jan 28, 2022
c9b529c
Add the Graveyarded HTTP Request back to docs (#9451)
avaidyanatha Jan 29, 2022
479f0d7
[MVP] Integrate sentry to all java-based connectors (#9745)
alexandertsukanov Jan 30, 2022
a094142
Format code (#9892)
tuliren Jan 30, 2022
c873898
Fix datamodel_code_generator exception in connector build (#9894)
tuliren Jan 30, 2022
8f22595
Allow updating workspace names (#9686)
Jan 31, 2022
0b1b75b
🐛 Source Delighted: output only records in which cursor field is grea…
Zirochkaa Jan 31, 2022
65c37e4
update doc with list of new config tables (#9511)
subodh1810 Jan 31, 2022
27b5ba3
:tada: Source Looker: Migrate to native CDK (#9609)
antixar Jan 31, 2022
94d74bb
Add Streamr destination document (#9155)
thanhlmm Jan 31, 2022
5fd3292
Add Jenkins source from Faros AI to connector catalog (#7837)
cjwooo Jan 31, 2022
c554322
Include DO one-click deployment option (#9803) (#9914)
harshithmullapudi Jan 31, 2022
a8135dd
Revert "Add Jenkins source from Faros AI to connector catalog (#7837)…
harshithmullapudi Jan 31, 2022
df332c7
Revert "Add Streamr destination document (#9155)" (#9918)
harshithmullapudi Jan 31, 2022
fcd0614
Change branch name (#9910)
ChristopheDuong Jan 31, 2022
abf383f
Update fields in source-connectors specifications: postgres (#9807)
grubberr Jan 31, 2022
fd6c312
Bump Airbyte version from 0.35.12-alpha to 0.35.13-alpha (#9911)
octavia-squidington-iii Jan 31, 2022
1096a5a
remove unused github workflow
pmossman Jan 31, 2022
a4b8edf
Add detailed sentry tracing for JDBC destination stream consumer (#9898)
tuliren Jan 31, 2022
0d32ced
add proper retry policy (#9888)
benmoriceau Jan 31, 2022
1bc544a
Use new scheduler when doing a schema update (#9934)
benmoriceau Jan 31, 2022
ff2f665
Bump Airbyte version from 0.35.13-alpha to 0.35.14-alpha (#9944)
octavia-squidington-iii Feb 1, 2022
aa3e00d
Add sentry release for connectors (#9940)
tuliren Feb 1, 2022
8e8f402
🎉 Destination snowflake & bigquery: integrate with sentry (#9945)
tuliren Feb 1, 2022
91fd734
cleanup airbyte_configs table (#9437)
subodh1810 Feb 1, 2022
a518247
🎉 Source e2e-test: integrate with Sentry (#9955)
tuliren Feb 1, 2022
3d9c043
🔧 Pinterest Schema updated
rfortmann-ewolff Jan 16, 2022
7efe322
🎨 new line formatting
rfortmann-ewolff Jan 18, 2022
cc0461e
🔖 Version Bump in Dockerfile
rfortmann-ewolff Jan 25, 2022
5213921
⬆️ Dependency in Airbyte connector index updated
rfortmann-ewolff Jan 25, 2022
4826645
🚧 Stashed changes
rfortmann-ewolff Feb 1, 2022
08ee3d1
Merge branches 'pinterest-schema' and 'pinterest-schema' of github.co…
rfortmann-ewolff Feb 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.35.5-alpha
current_version = 0.35.14-alpha
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-[a-z]+)?
Expand Down
7 changes: 5 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


### SHARED ###
VERSION=0.35.5-alpha
VERSION=0.35.14-alpha

# When using the airbyte-db via default docker image
CONFIG_ROOT=/data
Expand Down Expand Up @@ -50,7 +50,6 @@ CONFIG_DATABASE_PASSWORD=
CONFIG_DATABASE_URL=
CONFIGS_DATABASE_MINIMUM_FLYWAY_MIGRATION_VERSION=0.35.1.001


### AIRBYTE SERVICES ###
TEMPORAL_HOST=airbyte-temporal:7233
INTERNAL_API_HOST=airbyte-server:8001
Expand Down Expand Up @@ -88,3 +87,7 @@ MAX_SYNC_WORKERS=5
MAX_SPEC_WORKERS=5
MAX_CHECK_WORKERS=5
MAX_DISCOVER_WORKERS=5


### FEATURE FLAGS ###
NEW_SCHEDULER=false
1 change: 0 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ SYNC_JOB_MAX_TIMEOUT_DAYS=3

# Sentry
SENTRY_DSN=""

28 changes: 28 additions & 0 deletions .github/actions/ci-java-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Runner CI Java Tests"
description: "Runner CI Java Tests"
inputs:
module-name:
required: true
module-folder:
required: true

runs:
using: "composite"
steps:
- name: Install Java
uses: actions/setup-java@v1
with:
java-version: '17'

- name: "Build"
shell: bash
run: |
rm -rf ${{ inputs.module-folder }}/.venv ${{ inputs.module-folder }}/build
ROOT_DIR=$(git rev-parse --show-toplevel)
ARG=:$(python -c "import os; print(os.path.relpath('${{ inputs.module-folder }}', start='${ROOT_DIR}').replace('/', ':') )")
echo "./gradlew --no-daemon $ARG:build"
./gradlew --no-daemon "$ARG:clean"
./gradlew --no-daemon "$ARG:build"



85 changes: 85 additions & 0 deletions .github/actions/ci-py-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: "Runner CI Python Tests"
description: "Runner CI Python Tests"
inputs:
module-name:
required: true
module-folder:
required: true
outputs:
coverage-paths:
description: "Coverage Paths"
value: ${{ steps.build-coverage-reports.outputs.coverage-paths }}
flake8-logs:
description: "Flake8 Logs"
value: ${{ steps.build-linter-reports.outputs.flake8-logs }}
mypy-logs:
description: "MyPy Logs"
value: ${{ steps.build-linter-reports.outputs.mypy-logs }}
black-diff:
description: "Black Diff"
value: ${{ steps.build-linter-reports.outputs.black-diff }}
isort-diff:
description: "Isort Diff"
value: ${{ steps.build-linter-reports.outputs.isort-diff }}
runs:
using: "composite"
steps:
- name: Build Coverage Reports
id: build-coverage-reports
shell: bash
working-directory: ${{ inputs.module-folder }}
run: |
virtualenv .venv
source .venv/bin/activate
JSON_CONFIG='{"module": "${{ inputs.module-name }}", "folder": "${{ inputs.module-folder }}", "lang": "py"}'
pip install coverage[toml]~=6.2
mkdir -p .venv/source-acceptance-test
mkdir -p reports
SAT_DIR=$(git rev-parse --show-toplevel)/airbyte-integrations/bases/source-acceptance-test
PYPROJECT_CONFIG=$(git rev-parse --show-toplevel)/pyproject.toml
git ls-tree -r HEAD --name-only $SAT_DIR | while read src; do cp -f $src .venv/source-acceptance-test; done
pip install build
python -m build .venv/source-acceptance-test
pip install .venv/source-acceptance-test/dist/source_acceptance_test-*.whl
[ -f requirements.txt ] && pip install --quiet -r requirements.txt
pip install .[tests]
coverage run --rcfile=${PYPROJECT_CONFIG} -m pytest ./unit_tests || true
coverage xml --rcfile=${PYPROJECT_CONFIG} -o reports/coverage.xml || true

rm -rf .venv
echo "::set-output name=coverage-paths::reports/coverage.xml"

- name: Upload coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v2

- name: Build Linter Reports
id: build-linter-reports
shell: bash
working-directory: ${{ inputs.module-folder }}
run: |
JSON_CONFIG='{"module": "${{ inputs.module-name }}", "folder": "${{ inputs.module-folder }}", "lang": "py"}'
REPORT_FOLDER=reports
PYPROJECT_CONFIG=$(git rev-parse --show-toplevel)/pyproject.toml

# run mypy
pip install lxml~=4.7 mypy~=0.910 .
mypy . --config-file=${PYPROJECT_CONFIG} | tee reports/mypy.log || true

# run black
pip install black~=21.12b0
XDG_CACHE_HOME=/dev/null black --config ${PYPROJECT_CONFIG} --diff . | tee reports/black.diff

# run isort
pip install isort~=5.10.1
cp ${PYPROJECT_CONFIG} ./pyproject.toml
isort --diff . | tee reports/isort.diff

# run flake8
pip install mccabe~=0.6.1 pyproject-flake8~=0.0.1a2
pflake8 --exit-zero . | grep ^. | tee reports/flake.txt

echo "::set-output name=mypy-logs::reports/mypy.log"
echo "::set-output name=black-diff::reports/black.diff"
echo "::set-output name=isort-diff::reports/isort.diff"
echo "::set-output name=flake8-logs::reports/flake.txt"
187 changes: 187 additions & 0 deletions .github/actions/ci-tests-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: "Setup CI Tests Env"
description: "Setup CI Tests Env for all module types"
inputs:
module-name:
description: "Unique module name. e.g.: connectors/source-s3, connectors/destination-s3"
required: true
module-folder:
description: "Path to module folder"
required: true
module-lang:
description: "Detected module language. Available values: py, java"
required: true
sonar-gcp-access-key:
required: true
sonar-token:
description: "Access token for using SonarQube API"
required: true
pull-request-id:
description: "Unique PR ID. For example: airbyte/1234"
default: "0"
token:
required: true
remove-sonar-project:
description: "This flag should be used if needed to remove sonar project after using"
default: false
runs:
using: "composite"
steps:

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Tests of CI
shell: bash
run: |
# all CI python packages have the prefix "ci_"
pip install --quiet tox==3.24.4
tox -r -c ./tools/tox_ci.ini
pip install --quiet -e ./tools/ci_*
echo "::echo::off"

- name: Auth with gcloud CLI
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ inputs.sonar-gcp-access-key }}
project_id: dataline-integration-testing
export_default_credentials: true

- name: Create IAP tunnel
id: gcloud-tunnel
shell: bash
run: |
while true; do
PORT=$(( ((RANDOM<<15)|RANDOM) % 49152 + 10000 ))
status="$(nc -z 127.0.0.1 $PORT < /dev/null &>/dev/null; echo $?)"
if [ "${status}" != "0" ]; then
echo "$PORT is free to use";
break;
fi
done
IPS=($(hostname -I))
LOCAL_IP_PORT="${IPS[0]}:${PORT}"
gcloud compute start-iap-tunnel sonarqube-1-vm 80 --local-host-port=${LOCAL_IP_PORT} --zone=europe-central2-a --project dataline-integration-testing &
echo ::set-output name=pid::$!
echo "::set-output name=sonar-host::http://${LOCAL_IP_PORT}/"
echo "::echo::on"

- name: Python Tests
id: ci-py-tests
if: ${{ inputs.module-lang == 'py' }}
uses: ./.github/actions/ci-py-tests
with:
module-name: ${{ inputs.module-name }}
module-folder: ${{ inputs.module-folder }}

- name: Java Tests
id: ci-java-tests
if: ${{ inputs.module-lang == 'java' }}
uses: ./.github/actions/ci-java-tests
with:
module-name: ${{ inputs.module-name }}
module-folder: ${{ inputs.module-folder }}





- name: Prepare SQ Options
shell: bash
id: sq-options
working-directory: ${{ inputs.module-folder }}
run: |
REPORT_FOLDER=reports
mkdir -p ${REPORT_FOLDER}
declare -a REPORT_FILES
declare -a OPTIONS
if [ ${{ inputs.module-lang }} == 'py' ]; then
[ -f ${{ steps.ci-py-tests.outputs.mypy-logs }} ] && ci_sonar_qube --mypy_log ${{ steps.ci-py-tests.outputs.mypy-logs }} --output_file ${REPORT_FOLDER}/issues_mypy.json --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}
[ -f ${{ steps.ci-py-tests.outputs.mypy-logs }} ] && REPORT_FILES+=(${REPORT_FOLDER}/issues_mypy.json)

[ -f ${{ steps.ci-py-tests.outputs.black-diff }} ] && ci_sonar_qube --black_diff ${{ steps.ci-py-tests.outputs.black-diff }} --output_file ${REPORT_FOLDER}/issues_black.json --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}
[ -f ${{ steps.ci-py-tests.outputs.black-diff }} ] && REPORT_FILES+=(${REPORT_FOLDER}/issues_black.json)

[ -f ${{ steps.ci-py-tests.outputs.isort-diff }} ] && ci_sonar_qube --isort_diff ${{ steps.ci-py-tests.outputs.isort-diff }} --output_file ${REPORT_FOLDER}/issues_isort.json --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}
[ -f ${{ steps.ci-py-tests.outputs.isort-diff }} ] && REPORT_FILES+=(${REPORT_FOLDER}/issues_isort.json)

[ -f ${{ steps.ci-py-tests.outputs.coverage-paths }} ] && OPTIONS+=("-Dsonar.python.coverage.reportPaths=${{ steps.ci-py-tests.outputs.coverage-paths }}")
[ -f ${{ steps.ci-py-tests.outputs.flake8-logs }} ] && OPTIONS+=("-Dsonar.python.flake8.reportPaths=${{ steps.ci-py-tests.outputs.flake8-logs }}")
fi
if [ ${{ inputs.module-lang }} == 'java' ]; then
[ -d "./src/main/java" ] && OPTIONS+=("-Dsonar.sources=./src/main/java")
[ -d "./src/test/java" ] && OPTIONS+=("-Dsonar.tests=./src/test/java")
[ -d "./build/test-results" ] && OPTIONS+=("-Dsonar.junit.reportsPath=./build/test-results")
[ -f "./build/jacoco/test.exec" ] && OPTIONS+=("-Dsonar.jacoco.reportPaths=./build/jacoco/test.exec")
[ -d "./build/classes/java/main" ] && OPTIONS+=("-Dsonar.java.binaries=./build/classes/java/main")
[ -d "./build/classes/java/test" ] && OPTIONS+=("-Dsonar.test.binaries=./build/classes/java/test")

fi

# join the array to string format
echo ::set-output name=external_reports::$(IFS=, ; echo "${REPORT_FILES[*]}")
echo ::set-output name=options::$(IFS=' ' ; echo "${OPTIONS[*]}")

- name: Create SonarQube Project
shell: bash
id: create-sq-project
run: |
ci_sonar_qube --pr ${{ inputs.pull-request-id }} --create --module ${{ inputs.module-name }} --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}
echo "::set-output name=sq_project_name::$(ci_sonar_qube --pr ${{ inputs.pull-request-id }} --print_key --module ${{ inputs.module-name }})"
ROOT_DIR=$(git rev-parse --show-toplevel)
MODULE_DIR=$(python -c "print('${{ inputs.module-folder }}'.replace('${ROOT_DIR}', '.'))")
echo "::set-output name=module_dir::${MODULE_DIR}"

- name: SonarQube Scan

uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ inputs.sonar-token }}
SONAR_HOST_URL: ${{ steps.gcloud-tunnel.outputs.sonar-host }}
with:
projectBaseDir: ${{ steps.create-sq-project.outputs.module_dir }}
args: >
-Dsonar.projectKey=${{ steps.create-sq-project.outputs.sq_project_name }}
-Dsonar.verbose=true
-Dsonar.working.directory=/tmp/scannerwork
-Dsonar.language=${{ inputs.module-lang }}
-Dsonar.sourceEncoding=UTF-8
-Dsonar.projectBaseDir=${{ steps.create-sq-project.outputs.module_dir }}
-Dsonar.exclusions=reports/**,*.toml
-Dsonar.externalIssuesReportPaths=${{ steps.sq-options.outputs.external_reports }}
${{ steps.sq-options.outputs.options }}

- name: Generate SonarQube Report
shell: bash
id: generate-sq-report
run: |
# delay because SQ needs time for processing of all input data
sleep 10
REPORT_FILE=/tmp/sq_report_$RANDOM.md
ci_sonar_qube --pr ${{ inputs.pull-request-id }} --report ${REPORT_FILE} --module ${{ inputs.module-name }} --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}
body="$(cat ${REPORT_FILE})"
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "::set-output name=sq-report::$body"

- name: Add Comment
if: ${{ github.event_name == 'pull_request' }}
uses: peter-evans/commit-comment@v1
with:
body: ${{ steps.generate-sq-report.outputs.sq-report }}
token: ${{ inputs.token }}

- name: Remove SonarQube Project
if: ${{ inputs.remove-sonar-project == true }}
shell: bash
id: remove-sq-project
run: |
ci_sonar_qube --pr ${{ inputs.pull-request-id }} --remove --module ${{ inputs.module-name }} --host ${{ steps.gcloud-tunnel.outputs.sonar-host }} --token ${{ inputs.sonar-token }}

- name: Remove IAP tunnel
if: always()
shell: bash
run: |
kill ${{ steps.gcloud-tunnel.outputs.pid }}
42 changes: 0 additions & 42 deletions .github/workflows/detect-changed-modules-and-build-reports.yml

This file was deleted.

Loading