airbytehq / airbytehq/airbyte

CAT investigation: validation checks aren't catching date format issues

Aberta
#41,665 0 comentários 0 reações 0 responsáveis Ver no GitHub
team/tooling team/triage
Linguagem predominante
Python
Estrelas
22.1k
Forks
5.4k
Merge médio
5h
PRs com merge (30d)
671

Descrição

@josephkmh recently had to fix the Source NYTimes connector, whose config & spec were being rejected by the platform due to an invalid date format.

We have CATs that should theoretically cover this and/or similar issues:
- [`test_config_match_spec`](https://github.com/airbytehq/airbyte/blob/929bf06368c46672a97a3db717af145f26855a2f/airbyte-integrations/bases/connector-acceptance-test/connector_acceptance_test/tests/test_core.py#L138), which calls `jsonschema.validate()`.
- [`test_date_pattern`](https://github.com/airbytehq/airbyte/blob/929bf06368c46672a97a3db717af145f26855a2f/airbyte-integrations/bases/connector-acceptance-test/connector_acceptance_test/tests/test_core.py#L138), which checks that properties with a `format` of `date` or `datetime` have a pattern that matches a hardcoded date pattern, but currently only logs a warning if the pattern doesn't match, and more importantly the pattern that is compared against does not seem appropriate as the only pattern that we support.
- [`test_date_format`](https://github.com/airbytehq/airbyte/blob/929bf06368c46672a97a3db717af145f26855a2f/airbyte-integrations/bases/connector-acceptance-test/connector_acceptance_test/tests/test_core.py#L416), which checks that properties with pattern that looks like a date should have their format set to date or date-time, and has the same issues as `test_date_pattern`.

This ticket is to 1) investigate why our `jsonschema.validate()` did not catch the problem before the config/spec was sent to the platform, and 2) take a look at the `test_date_*` tests and see whether these should be modified to include a more robust check, or should be deleted altogether.

Details on what the platform is doing to validate schema are in the Slack thread [here](https://airbytehq-team.slack.com/archives/C03VDJ4FMJB/p1720537414878449).

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.