Fix problems with Tinybird deployment #21884
Draft
+190
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The objective of these changes is to enable running these commands without errors:
tb branch use main
tb branch rm tb_deploy_tinybird_add_column_test
(Clean up if needed)
tb branch create --last-partition --wait tb_deploy_tinybird_add_column_test
tb branch use tb_deploy_tinybird_add_column_test
tb deploy
This also introduces a tentative "version log" to keep track of the latest deployed version in Tinybird.
I have included the first draft of a "version upgrade script",
but I think I have gone overboard with stuff we don't really need, and I am going to cut back its complexity and the amount of stuff that it does. The script has been cut back to a really simple set of commands that perform the necessary data operations.You can test the version upgrade script with the data migration (after deploying):
First initialize the
version_log
datasourcetb datasource truncate version_log --yes
echo "{\"version\":\"0.0.0\",\"step_id\":-1,\"message\":\"Current version statement\"}" > /tmp/msg.ndjson
tb datasource append version_log /tmp/msg.ndjson
Then run the script:
sh scripts/version_upgrade.sh