-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata: set cache control headers #26091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, small change for greater peace of mind 馃憤
blob_to_save.cache_control = "no-cache" | ||
|
||
blob_to_save.upload_from_filename(file_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: shall we have a try/catch that make the function return false on error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want the loud error in this case.
But we could change this to
return blob_to_save.exists()
However that doesnt help much in an overwrite scenario
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what uploads the metadata file right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what upload the registry right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct!
Can this be terraformed or re-executed after each metadata / registry upload? |
@alafanechere thanks for the review.
Im talking with ops after the hackdays about this. Looking at some google help forms our best option is to add a serverless function to gcloud that reruns this on every upload. if thats the option I would say lets avoid it and start ensuring the |
* set cache control header to no-cache for metadata upload * set cache control header to no-cache for spec cache upload * set cache control header to no-cache for registry upload * Run formatter
What
Ensure we are not caching the metadata files, spec or registry at the CDN level.
While we had caching disabled, google caches public buckets by default.
More context here: https://airbytehq-team.slack.com/archives/C02U46QK5C3/p1683940962000049?thread_ts=1683925529.873469&cid=C02U46QK5C3
Notes for reviewers
Google does not have a bucket level setting for this 馃槩
So we will want to run this command after deploying