Skip to content

Tdl 26656 transform state#212

Merged
leslievandemark merged 15 commits intomasterfrom
TDL-26656/state-format
Jan 13, 2025
Merged

Tdl 26656 transform state#212
leslievandemark merged 15 commits intomasterfrom
TDL-26656/state-format

Conversation

@leslievandemark
Copy link
Copy Markdown
Contributor

@leslievandemark leslievandemark commented Dec 12, 2024

Description of change

Tap-github supports multiple repositories. The previous bookmark format for tap was:
{bookmarks {repository {stream_name ...}}}
In order to support stream level resets, we need to switch the bookmark format to:
{bookmarks {stream_name {repository ...}}}

This pr update the translate_state function to convert old bookmarks into the new state. New connections will have the new format automatically.

Manual QA steps

  • Created a connection on master with the old bookmark format. Switched to this branch, ran another sync and checked that the format changed. Then, I deselected all the repos in use and added a new repo to make sure state is not dropped.

Risks

  • in 2018 multiple repo support was added here, and bookmarks were converted from {bookmarks {stream_name {bookmark_values...}}} to {bookmarks {repository {stream_name ...}}}. There are 13 connection that still have the old old bookmark format, but they are all either on non-active accounts or paused an require a major version bump. In this update the old old bookmark format is not accommodated, it should be impossible for a connection with that format to run this code, but if I missed something and it happens the tap would error.
  • I fixed the 'events' data generation in the pagination tap-tester test. It will now create and close an issue on each run in singer-io/test-repo. This could create a lot of closed issues over time.

Rollback steps

  • investigate the issue, a new pr will likely need to be created to handle different state formats

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

@leslievandemark leslievandemark changed the title Tdl 26656/state format Tdl 26656 transform state Dec 17, 2024
@leslievandemark leslievandemark merged commit 6aa5d3e into master Jan 13, 2025
@leslievandemark leslievandemark deleted the TDL-26656/state-format branch January 13, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants