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

Various shortio connector cleanups. #5418

Merged
merged 2 commits into from
Aug 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/publish-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
workflow_dispatch:
inputs:
connector:
description: 'Airbyte Connector'
description: "Airbyte Connector"
required: true
run-tests:
description: 'Should run tests when publishing'
description: "Should run tests when publishing"
required: true
default: 'true'
default: "true"
comment-id:
description: 'The comment-id of the slash command. Used to update the comment with the status.'
description: "The comment-id of the slash command. Used to update the comment with the status."
required: false

jobs:
Expand Down Expand Up @@ -48,8 +48,8 @@ jobs:
id: regex
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '^(connectors|bases)/[a-zA-Z0-9-_]+$'
regex_flags: 'i' # required to be set for this plugin
regex_pattern: "^(connectors|bases)/[a-zA-Z0-9-_]+$"
regex_flags: "i" # required to be set for this plugin
search_string: ${{ github.event.inputs.connector }}
- name: Validate input workflow format
if: steps.regex.outputs.first_match != github.event.inputs.connector
Expand Down Expand Up @@ -136,6 +136,7 @@ jobs:
SOURCE_MARKETO_SINGER_INTEGRATION_TEST_CONFIG: ${{ secrets.SOURCE_MARKETO_SINGER_INTEGRATION_TEST_CONFIG }}
SOURCE_RECURLY_INTEGRATION_TEST_CREDS: ${{ secrets.SOURCE_RECURLY_INTEGRATION_TEST_CREDS }}
SOURCE_S3_TEST_CREDS: ${{ secrets.SOURCE_S3_TEST_CREDS }}
SOURCE_SHORTIO_TEST_CREDS: ${{ secrets.SOURCE_SHORTIO_TEST_CREDS }}
SOURCE_STRIPE_CREDS: ${{ secrets.SOURCE_STRIPE_CREDS }}
STRIPE_INTEGRATION_CONNECTED_ACCOUNT_TEST_CREDS: ${{ secrets.STRIPE_INTEGRATION_CONNECTED_ACCOUNT_TEST_CREDS }}
SURVEYMONKEY_TEST_CREDS: ${{ secrets.SURVEYMONKEY_TEST_CREDS }}
Expand Down Expand Up @@ -183,7 +184,7 @@ jobs:
SLACK_USERNAME: Buildozer
SLACK_ICON: https://avatars.slack-edge.com/temp/2020-09-01/1342729352468_209b10acd6ff13a649a1.jpg
SLACK_COLOR: DC143C
SLACK_TITLE: 'Failed to publish connector ${{ github.event.inputs.connector }} from branch ${{ github.ref }}'
SLACK_TITLE: "Failed to publish connector ${{ github.event.inputs.connector }} from branch ${{ github.ref }}"
SLACK_FOOTER: ""
# In case of self-hosted EC2 errors, remove this block.
stop-publish-image-runner:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on:
workflow_dispatch:
inputs:
connector:
description: 'Airbyte Connector'
description: "Airbyte Connector"
required: true
repo:
description: 'Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos.'
description: "Repo to check out code from. Defaults to the main airbyte repo. Set this when building connectors from forked repos."
required: false
default: 'airbytehq/airbyte'
default: "airbytehq/airbyte"
comment-id:
description: 'The comment-id of the slash command. Used to update the comment with the status.'
description: "The comment-id of the slash command. Used to update the comment with the status."
required: false

jobs:
Expand Down Expand Up @@ -48,8 +48,8 @@ jobs:
id: regex
uses: AsasInnab/regex-action@v1
with:
regex_pattern: '^((connectors|bases)/)?[a-zA-Z0-9-_]+$'
regex_flags: 'i' # required to be set for this plugin
regex_pattern: "^((connectors|bases)/)?[a-zA-Z0-9-_]+$"
regex_flags: "i" # required to be set for this plugin
search_string: ${{ github.event.inputs.connector }}
- name: Validate input workflow format
if: steps.regex.outputs.first_match != github.event.inputs.connector
Expand Down Expand Up @@ -136,6 +136,7 @@ jobs:
SOURCE_MARKETO_SINGER_INTEGRATION_TEST_CONFIG: ${{ secrets.SOURCE_MARKETO_SINGER_INTEGRATION_TEST_CONFIG }}
SOURCE_RECURLY_INTEGRATION_TEST_CREDS: ${{ secrets.SOURCE_RECURLY_INTEGRATION_TEST_CREDS }}
SOURCE_S3_TEST_CREDS: ${{ secrets.SOURCE_S3_TEST_CREDS }}
SOURCE_SHORTIO_TEST_CREDS: ${{ secrets.SOURCE_SHORTIO_TEST_CREDS }}
SOURCE_STRIPE_CREDS: ${{ secrets.SOURCE_STRIPE_CREDS }}
STRIPE_INTEGRATION_CONNECTED_ACCOUNT_TEST_CREDS: ${{ secrets.STRIPE_INTEGRATION_CONNECTED_ACCOUNT_TEST_CREDS }}
SURVEYMONKEY_TEST_CREDS: ${{ secrets.SURVEYMONKEY_TEST_CREDS }}
Expand Down Expand Up @@ -178,7 +179,7 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.STATUS_API_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STATUS_API_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-2'
AWS_DEFAULT_REGION: "us-east-2"
- name: Add Success Comment
if: github.event.inputs.comment-id && success()
uses: peter-evans/create-or-update-comment@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _cast_value(declared_field_types: List, field_name: str, field_value):
# do not cast numeric IDs into float, use integer instead
target_type = int if field_name.endswith("_id") else target_type

if target_type_name != "string" and field_value == '':
if target_type_name != "string" and field_value == "":
# do not cast empty strings, return None instead to be properly casted.
field_value = None
return field_value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: []
# TODO uncomment this block to specify that the tests should assert the connector outputs the records provided in the input file a file
# expect_records:
# path: "integration_tests/expected_records.txt"
# extra_fields: no
# exact_order: no
# extra_records: yes
incremental: # TODO if your connector does not implement incremental sync, remove this block
incremental:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
future_state_path: "integration_tests/abnormal_state.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"clicks": {
"dt" : "2022-07-17 14:03:43.449925"
"dt": "2022-07-17 14:03:43.449925"
}
}
Loading