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

Source S3: don't require history to be present to identify legacy state format #29520

Merged
merged 6 commits into from Aug 18, 2023

Conversation

clnoll
Copy link
Contributor

@clnoll clnoll commented Aug 17, 2023

history data is not required for the state message to be valid, so we should handle the case when it's not present.

@github-actions
Copy link
Contributor

Before Merging a Connector Pull Request

Wow! What a great pull request you have here! 🎉

To merge this PR, ensure the following has been done/considered for each connector added or updated:

  • PR name follows PR naming conventions
  • Breaking changes are considered. If a Breaking Change is being introduced, ensure an Airbyte engineer has created a Breaking Change Plan.
  • Connector version has been incremented in the Dockerfile and metadata.yaml according to our Semantic Versioning for Connectors guidelines
  • You've updated the connector's metadata.yaml file any other relevant changes, including a breakingChanges entry for major version bumps. See metadata.yaml docs
  • Secrets in the connector's spec are annotated with airbyte_secret
  • All documentation files are up to date. (README.md, bootstrap.md, docs.md, etc...)
  • Changelog updated in docs/integrations/<source or destination>/<name>.md with an entry for the new version. See changelog example
  • Migration guide updated in docs/integrations/<source or destination>/<name>-migrations.md with an entry for the new version, if the version is a breaking change. See migration guide example
  • If set, you've ensured the icon is present in the platform-internal repo. (Docs)

If the checklist is complete, but the CI check is failing,

  1. Check for hidden checklists in your PR description

  2. Toggle the github label checklist-action-run on/off to re-run the checklist CI.

@octavia-squidington-iii
Copy link
Collaborator

source-s3 test report (commit cfee106a41) - ❌

⏲️ Total pipeline duration: 03mn20s

Step Result
Validate airbyte-integrations/connectors/source-s3/metadata.yaml
Connector version semver check
Connector version increment check
QA checks
Code format checks
Connector package install
Build source-s3 docker image for platform linux/x86_64
Unit tests

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-s3 test

@clnoll clnoll requested a review from girarda August 17, 2023 16:17
Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

what's the scenario leading to a state message without a history?

@clnoll
Copy link
Contributor Author

clnoll commented Aug 17, 2023

@girarda this came up while testing CATs; I'm not totally sure there's a real-world scenario where we'd expect to hit it.

Copy link
Contributor

@maxi297 maxi297 left a comment

Choose a reason for hiding this comment

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

LGTM! Can we merge this into #29471?

@girarda
Copy link
Contributor

girarda commented Aug 18, 2023

I see from this thread that this was because of the abnormal state CAT test. I think the abnormal state is bad in the sense it should have a history, but I'm also fine handling it this way in the connector. Either way, this shouldn't happen in a real life situation. 🚢 !

@@ -68,15 +68,17 @@ def _is_legacy_state(value: StreamState) -> bool:
return False
try:
# Verify datetime format in history
item = list(value.get("history", {}).keys())[0]
datetime.strptime(item, Cursor._DATE_FORMAT)
history = value.get("history", {}).keys()
Copy link
Contributor

Choose a reason for hiding this comment

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

Individually, _is_legacy_state is fine now but set_initial_state will raise ValueError because _convert_legacy_state will have an empty converted_history

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Synced on this - this case shouldn't happen but we will handle it if it does.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Aug 18, 2023
@github-actions
Copy link
Contributor

source-s3 test report (commit 25d7624a1d) - ❌

⏲️ Total pipeline duration: 13mn08s

Step Result
Validate airbyte-integrations/connectors/source-s3/metadata.yaml
Connector version semver check
Connector version increment check
QA checks
Code format checks
Connector package install
Build source-s3 docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-s3 test

@clnoll clnoll enabled auto-merge (squash) August 18, 2023 15:05
@github-actions
Copy link
Contributor

source-s3 test report (commit cfdc274d0c) - ❌

⏲️ Total pipeline duration: 12mn42s

Step Result
Validate airbyte-integrations/connectors/source-s3/metadata.yaml
Connector version semver check
Connector version increment check
QA checks
Code format checks
Connector package install
Build source-s3 docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-s3 test

@github-actions
Copy link
Contributor

source-s3 test report (commit 4148832e14) - ✅

⏲️ Total pipeline duration: 13mn31s

Step Result
Validate airbyte-integrations/connectors/source-s3/metadata.yaml
Connector version semver check
Connector version increment check
QA checks
Code format checks
Connector package install
Build source-s3 docker image for platform linux/x86_64
Unit tests
Integration tests
Acceptance tests

🔗 View the logs here

☁️ View runs for commit in Dagger Cloud

Please note that tests are only run on PR ready for review. Please set your PR to draft mode to not flood the CI engine and upstream service on following commits.
You can run the same pipeline locally on this branch with the airbyte-ci tool with the following command

airbyte-ci connectors --name=source-s3 test

@clnoll clnoll merged commit 620a941 into master Aug 18, 2023
20 of 22 checks passed
@clnoll clnoll deleted the fix-legacy-state-identification branch August 18, 2023 17:35
@sentry-io
Copy link

sentry-io bot commented Aug 25, 2023

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ValueError: The config options you selected are no longer supported. /airbyte/integration_code/source_s3/v4/legacy_c... View Issue
  • ‼️ ValueError: Malformed advanced_options config json: Expecting property name enclosed in double quotes: line 1... /airbyte/integration_code/source_s3/v4/legacy_c... View Issue

Did you find this useful? React with a 👍 or 👎

harrytou pushed a commit to KYVENetwork/airbyte that referenced this pull request Sep 1, 2023
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 connectors/source/s3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants