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

🐛 Fix hubspot datetime empty string #5798

Merged
merged 3 commits into from
Sep 6, 2021
Merged

Conversation

avida
Copy link
Contributor

@avida avida commented Sep 2, 2021

What

Fix for #5714

How

Describe the solution

Recommended reading order

  1. x.java
  2. y.python

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? 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
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions
  • Connector added to connector index 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

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

Connector Generator

  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed.

@github-actions github-actions bot added the area/connectors Connector related issues label Sep 2, 2021
@avida avida force-pushed the drezchykov/5714-hubspot-fix branch from a6fc442 to f31d001 Compare September 2, 2021 08:07
@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label Sep 2, 2021
@avida
Copy link
Contributor Author

avida commented Sep 2, 2021

/test connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1193363183
❌ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1193363183

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 08:10 Inactive
@avida
Copy link
Contributor Author

avida commented Sep 2, 2021

/test connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1193468820
✅ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1193468820

@jrhizor jrhizor temporarily deployed to more-secrets September 2, 2021 08:44 Inactive
@github-actions github-actions bot added the CDK Connector Development Kit label Sep 2, 2021
@avida avida force-pushed the drezchykov/5714-hubspot-fix branch from 256aa64 to 3175184 Compare September 2, 2021 11:05
@avida avida force-pushed the drezchykov/5714-hubspot-fix branch from 3175184 to 22dffb2 Compare September 2, 2021 11:09
@github-actions github-actions bot removed the CDK Connector Development Kit label Sep 2, 2021
@@ -19,7 +19,7 @@ class AirbyteSourceAcceptanceTestPlugin implements Plugin<Project> {
'-w', "$targetMountDirectory",
'-e', "AIRBYTE_SAT_CONNECTOR_DIR=${project.projectDir.absolutePath}",
'airbyte/source-acceptance-test',
'-p', 'integration_tests.acceptance',
'-p', 'source_acceptance_test.plugin',
Copy link
Contributor

@yevhenii-ldv yevhenii-ldv Sep 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand a little, a change in this line leads to the fact that we can delete the acceptance.py and integration_test.py files, but still use the SAT tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, you don't need acceptance.py, all test cases will be picked up by plugin according to acceptance test config

@@ -37,7 +37,7 @@
"PyYAML==5.4",
"pydantic==1.6.*",
"airbyte-protocol",
"jsonschema==2.6.0",
"jsonschema==3.2.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that jsonschema version 3 is backward compatible with version 2 and this change will not generate new bugs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not 100% sure but acceptance test passed fine. There were dependencies conflicts with SAT that failed a build so Ive made this change. AFAIK base-python is outdated and we should move away from it.

@avida avida changed the title Fix hubspot datetime empty string 🐛 Fix hubspot datetime empty string Sep 2, 2021
Copy link
Contributor

@yevhenii-ldv yevhenii-ldv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please, resolve conflicts

@@ -52,7 +52,7 @@ def check_datetime(value: str) -> bool:
return valid_format and valid_time

def check(self, instance, format):
if format == "date-time":
if instance is not None and format == "date-time":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to publish SAT

@avida avida force-pushed the drezchykov/5714-hubspot-fix branch from f8893ac to 973cf6d Compare September 3, 2021 15:16
@avida
Copy link
Contributor Author

avida commented Sep 3, 2021

/publish connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1198514756
❌ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1198514756

@avida
Copy link
Contributor Author

avida commented Sep 3, 2021

/publish connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1198526770
❌ bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1198526770

@jrhizor jrhizor temporarily deployed to more-secrets September 3, 2021 15:25 Inactive
@avida
Copy link
Contributor Author

avida commented Sep 3, 2021

Cannot publish cause github runner' ubuntu-latest image have python with setuptools defect: pypa/setuptools-scm#608 Will try later when image will be updated (hopefully)

@avida
Copy link
Contributor Author

avida commented Sep 6, 2021

/publish connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1204970168
❌ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1204970168

@jrhizor jrhizor temporarily deployed to more-secrets September 6, 2021 06:47 Inactive
@avida
Copy link
Contributor Author

avida commented Sep 6, 2021

/publish connector=bases/source-acceptance-test

🕑 bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1204996942
✅ bases/source-acceptance-test https://github.com/airbytehq/airbyte/actions/runs/1204996942

@jrhizor jrhizor temporarily deployed to more-secrets September 6, 2021 06:59 Inactive
@avida
Copy link
Contributor Author

avida commented Sep 6, 2021

/publish connector=connectors/source-hubspot

🕑 connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1205013037
✅ connectors/source-hubspot https://github.com/airbytehq/airbyte/actions/runs/1205013037

@jrhizor jrhizor temporarily deployed to more-secrets September 6, 2021 07:05 Inactive
@avida avida merged commit 60fd9d5 into master Sep 6, 2021
@avida avida deleted the drezchykov/5714-hubspot-fix branch September 6, 2021 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hubspot Connector 0.1.11 Fails on Some Tables due to outputting empty strings as dates
4 participants