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

🐛 📝 DAT: verify that a destination is able to write any ISO8601-compliant date string #5814

Merged
merged 5 commits into from
Dec 1, 2021

Conversation

bazarnov
Copy link
Collaborator

@bazarnov bazarnov commented Sep 2, 2021

What

#5712 - Destination acceptance tests: verify that a destination is able to write any ISO8601-compliant date string

How

  1. Verify snowflake destination is passing acceptance tests before beginning by running ./gradlew :airbyte-integrations:connectors:destination-snowflake:integrationTest (you'll need to place the config in lastpass in the secrets/ directory for this to work)
  2. Identify all the acceptable ISO 8601 json schema date and date-time date string formats (i.e; what are all the acceptable string patterns for each of these formats?). It is probably helpful to list them in a text file in the directory linked above, just for reference e.g: just write out all the formats in a formats_reference.txt file.
  3. Add one stream to the edge_cases_catalog which has two string fields whose format fields are set to date and date-time respectively.
  4. For each format you listed in step 2, add a few records in the records file. Now the destination acceptance test (DAT) will try to insert them into every destination.
  5. Verify that the snowflake tests are now failing.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@sherifnada
Copy link
Contributor

sherifnada commented Sep 7, 2021

discussed offline this morning: since almost all destinations are failing this test we'll keep this branch alive while we merge fixes for the destinations

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2021

CLA assistant check
All committers have signed the CLA.

@yurii-bidiuk yurii-bidiuk force-pushed the bazarnov/5712-dat-iso8601-compliant-date-strings branch from b33872c to c07047e Compare November 30, 2021 15:18
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets November 30, 2021 15:19 Inactive
@yurii-bidiuk yurii-bidiuk force-pushed the bazarnov/5712-dat-iso8601-compliant-date-strings branch from c07047e to 043c576 Compare December 1, 2021 00:55
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 00:57 Inactive
@bazarnov bazarnov removed their assignment Dec 1, 2021
@yurii-bidiuk yurii-bidiuk force-pushed the bazarnov/5712-dat-iso8601-compliant-date-strings branch from 043c576 to 0b5df6f Compare December 1, 2021 10:35
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 10:37 Inactive
@yurii-bidiuk yurii-bidiuk force-pushed the bazarnov/5712-dat-iso8601-compliant-date-strings branch from 0b5df6f to 2603ad8 Compare December 1, 2021 12:02
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 12:04 Inactive
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 12:11 Inactive
@yurii-bidiuk
Copy link
Contributor

The following integration tests are failed on the normalization phase with error like: invalid datetime '1/1/2021':

BigQueryDestinationAcceptanceTest.testSyncWithNormalization()
MySQLDestinationAcceptanceTest.testSyncWithNormalization()
PostgresDestinationAcceptanceTest.testSyncWithNormalization()
RedshiftInsertDestinationAcceptanceTest.testSyncWithNormalization()
SnowflakeS3CopyDestinationAcceptanceTest.testSyncWithNormalization()
SnowflakeInsertDestinationAcceptanceTest.testSyncWithNormalization()
SnowflakeGcsCopyDestinationAcceptanceTest.testSyncWithNormalization()

MSSQLDestinatuionAcceptanceTest.testSyncWithNormalization -> normalization returns null for values when value couldn't be normalized

These two tests are failed with the message like: Invalid format: "20210101T0930" is malformed at "30". It should be fixed on the Java destination side (io.airbyte.integrations.destination.bigquery.BigQueryUtils#transformJsonDateTimeToBigDataFormat):

BigQueryDenormalizedDestinationAcceptanceTest.testSyncNormalizedWithoutNormalization()
BigQueryDenormalizedDestinationAcceptanceTest.testSync()

@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 12:26 Inactive
@yurii-bidiuk yurii-bidiuk temporarily deployed to more-secrets December 1, 2021 13:12 Inactive
@bazarnov bazarnov merged commit e4e95e3 into master Dec 1, 2021
@bazarnov bazarnov deleted the bazarnov/5712-dat-iso8601-compliant-date-strings branch December 1, 2021 13:52
yurii-bidiuk added a commit that referenced this pull request Dec 3, 2021
yurii-bidiuk added a commit that referenced this pull request Dec 3, 2021
@tuliren tuliren mentioned this pull request Dec 3, 2021
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
…iant date string (airbytehq#5814)

* added format_reference.txt, edited edge_case_messages.txt, edge_case_catalog.json

Co-authored-by: Yurii Bidiuk <[email protected]>
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Destination acceptance tests: verify that a destination is able to write any ISO8601-compliant date string
8 participants