-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
TechDocs: Deleted pages continue to show up when using an external storage #6132
Comments
One problem of cleaning the folder first is that TechDocs might not work during the upload. Maybe we could have some kind of versioning where the versions are uploaded to separate folders and we just change the reference to the latest one. This would also allow to travel back to older versions of a site. |
S3 has the ability to also delete files on the target which might address this issue there. Not sure if the other storage options also have this option. |
I think we should choose an approach that is platform-agnostic. This keeps the possibility of integration other external storage providers with a minimal set of operations:
I'm not sure if we should keep the whole history though, so I would propose following approach:
What do you think? |
@ottosichert Interesting! When you say I am just curious if this is supported for cloud storage providers. This says GCS doesn't support it. |
Yeah, echo @OrkoHunter. This is conceptually solid, but I think the problem is going to be that we'll still ultimately be limited to working on individual objects by the various cloud providers' APIs (meaning, spotty support for folder-level operations). |
I think you would likely need to delete them recreate the entire structure to get the most breadth. A rename could work as well (if supported), but would end up being a swap with possibly 3 operations. Both cases could lead to an inconsistent state if there are failures between. However that could be just as likely for any copy/sync, except maybe though additional logic errors introduced by added orchestration. Why not support sync where possible and then fallback to something like a destroy / create? As for storing history, I don't see the point. The docs are source controlled already, so this is just taking up more cloud storage that is possible to recreate from git history. It might be useful at some point to support versioned docs though. However that seems to serve a different use case imo. |
Thanks for the input! I would argue though that it is favourable we use only one approach almost everywhere to reduce complexity. So replacing
I actually like that approach, as we now don't need to check for backwards compatibility, it is already included in the happy case. Also, to optimize for manual operations in case of failures, the folder naming should be clear during any steps of the above. Let me know if you have a suggestion to improve it further! |
I think you're still going to run into an issue during implementation that's a result of In order to implement a And if you have that list, you could just as easily load and stash it up front (as |
Manually retrieving all objects within a folder would seem error prone, so I had a look at current APIs that would indeed support moving: |
While having a closer look at the rename/move operations, it seems they are still performed on file-by-file basis, and hence would incur a downtime on the target TechDocs site while publishing. Hence we decided to go for a different approach:
Draft PR: #6488 |
Feature Suggestion
When a page is deleted in the markdown source, the corresponding TechDocs site should reflect that the page is not available.
As of now, when using any of the cloud storage publishers (GCP, AWS, etc.), their
publish
method only uploads generated files into the bucket. This is good to make sure newly created pages are there, existing pages are modified but does not ensure that removed pages get deleted in the bucket.Possible Implementation
Maybe delete the particular TechDocs site's folder before uploading.
The text was updated successfully, but these errors were encountered: