-
Notifications
You must be signed in to change notification settings - Fork 74
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
Cloud metadata #1130
Merged
Cloud metadata #1130
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prework
Related GitHub issues and pull requests
Summary
In this PR,
tar_make()
,tar_make_clustermq()
, andtar_make_future()
gain the ability to continuously upload metadata to the cloud. As with local writes to e.g._targets/meta/meta
, the metadata gets uploaded to the cloud everyseconds_meta
seconds unless adeployment = "main"
target is currently blocking the main process. The metadata files live in AWS S3 or GCP GCS, depending on the newrepository_meta
option intar_option_set()
in_targets.R
, and they go to the bucket you set with theresources
option intar_option_set()
. (repository_meta
defaults torepository
, so there is no need to manually opt in to this feature.) Locally on another machine, you can manage the cloud metadata with new functionstar_meta_download()
,tar_meta_sync()
,tar_meta_upload()
, andtar_meta_delete()
.These changes align
targets
with the idea that in cloud computing, you are renting the machines you work with, and you want your EC2 instances and EBS volumes to disappear as soon as possible. With all the metadata and all the target data in a bucket, the local file system that ran the pipeline is free to vanish as soon as the pipeline finishes. You could even set the data store (tar_config_set(store = "...")
) to a node-specific temporary directory to be kinder to shared file systems (e.g. EFS) on enterprise architectures (FYI @rpodcast). Then on a different machine, simply pull the code, and then pull the metadata withtar_meta_download()
. At that point, you can read objects, check the progress of a running pipeline, and even run the pipeline there if the original run finished. In other words,targets
pipelines adopts a similarly decentralized model as Git/GitHub (although it can't realistically go quite that far).Unfortunately, after this PR, cloud targets with custom prefixes may need to rerun. This is because I needed to shift target data to a
PREFIX/objects/
location in order to make room for metadata inPREFIX/meta
. But I think this change is worth this inconvenience, especially given that the solution to #1108 already invalidates existing targets.