Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Alex Russell boosted
✧✦Catherine✦✧
✧✦Catherine✦✧
@whitequark@mastodon.social  ·  activity timestamp 2 months ago

check out how quickly #GitPages (and #Grebedoc) can check out a giant git repository without any changes!

if supported by the server, it retrieves only a single tree from git (no other branches, no tags, no history, no file contents), backfills it from the existing site contents, and then pulls in any missing files from the git server on-demand

this lets you publish very large repositories as static sites without straining network and compute (for compression, etc) resources!

Sorry, no caption provided by author
Sorry, no caption provided by author
Sorry, no caption provided by author
  • Copy link
  • Flag this post
  • Block
✧✦Catherine✦✧
✧✦Catherine✦✧
@whitequark@mastodon.social  ·  activity timestamp 2 months ago

#GitPages now implements an audit system that allows on-line, background processing of uploaded content to e.g. scan it for viruses, phishing, and other abusive material

I consider this table stakes for any service with open registration, so now I can finally say that git-pages is _almost_ done (it needs a GC and a few minor fixes to other functions)

https://codeberg.org/git-pages/git-pages/issues/82#issuecomment-8707941

screenshot of a shell script that scans the audit log records with clamav and removes content from any sites with viruses, freezing their entire domain after
screenshot of a shell script that scans the audit log records with clamav and removes content from any sites with viruses, freezing their entire domain after
screenshot of a shell script that scans the audit log records with clamav and removes content from any sites with viruses, freezing their entire domain after
  • Copy link
  • Flag this post
  • Block
✧✦Catherine✦✧
✧✦Catherine✦✧
@whitequark@mastodon.social  ·  activity timestamp 2 months ago

#GitPages now supports atomic partial updates using the PATCH method: give it a subdirectory and it will update its contents without touching anything else

you can use it to e.g. upload previews of built documentation without having to maintain giant git checkouts with stale files for thousands of pull requests. and it's efficient, too!

see https://codeberg.org/whitequark/whitequark.codeberg.page/src/commit/fc1c39ab1bfdd934934551de5ed9b7792f9d1d22/.forgejo/workflows/publish.yaml for an example workflow

https://whitequark.codeberg.page/
https://whitequark.codeberg.page/preview/pull/1/

With feature patch: In response to a PATCH request, the server partially updates a site with new content. The URL of the request must be the root URL of the site that is being published.
The request must have a application/x-tar, application/x-tar+gzip, or application/x-tar+zstd body, whose contents is merged with the existing site contents as follows:
A character device entry with major 0 and minor 0 is treated as a "whiteout marker" (following unionfs): it causes any existing file or directory with the same name to be deleted.
A directory entry replaces any existing file or directory with the same name (if any), recursively removing the old contents.
A file or symlink entry replaces any existing file or directory with the same name (if any).
In any case, the parent of an entry must exist and be a directory.
The request must have a Race-Free: yes or Race-Free: no header. Not every backend configuration makes it possible to perform atomic compare-and-swap operations; on backends without atomic CAS support, Race-Free: yes requests will fail, while Race-Free: no requests will provide a best-effort approximation.
If a PATCH request loses a race against another content update request, it may return 409 Conflict. This is true regardless of the Race-Free: header value. Whenever this happens, resubmit the request as-is.
If the site has no contents after the update is applied, performs the same action as DELETE.
With feature patch: In response to a PATCH request, the server partially updates a site with new content. The URL of the request must be the root URL of the site that is being published. The request must have a application/x-tar, application/x-tar+gzip, or application/x-tar+zstd body, whose contents is merged with the existing site contents as follows: A character device entry with major 0 and minor 0 is treated as a "whiteout marker" (following unionfs): it causes any existing file or directory with the same name to be deleted. A directory entry replaces any existing file or directory with the same name (if any), recursively removing the old contents. A file or symlink entry replaces any existing file or directory with the same name (if any). In any case, the parent of an entry must exist and be a directory. The request must have a Race-Free: yes or Race-Free: no header. Not every backend configuration makes it possible to perform atomic compare-and-swap operations; on backends without atomic CAS support, Race-Free: yes requests will fail, while Race-Free: no requests will provide a best-effort approximation. If a PATCH request loses a race against another content update request, it may return 409 Conflict. This is true regardless of the Race-Free: header value. Whenever this happens, resubmit the request as-is. If the site has no contents after the update is applied, performs the same action as DELETE.
With feature patch: In response to a PATCH request, the server partially updates a site with new content. The URL of the request must be the root URL of the site that is being published. The request must have a application/x-tar, application/x-tar+gzip, or application/x-tar+zstd body, whose contents is merged with the existing site contents as follows: A character device entry with major 0 and minor 0 is treated as a "whiteout marker" (following unionfs): it causes any existing file or directory with the same name to be deleted. A directory entry replaces any existing file or directory with the same name (if any), recursively removing the old contents. A file or symlink entry replaces any existing file or directory with the same name (if any). In any case, the parent of an entry must exist and be a directory. The request must have a Race-Free: yes or Race-Free: no header. Not every backend configuration makes it possible to perform atomic compare-and-swap operations; on backends without atomic CAS support, Race-Free: yes requests will fail, while Race-Free: no requests will provide a best-effort approximation. If a PATCH request loses a race against another content update request, it may return 409 Conflict. This is true regardless of the Race-Free: header value. Whenever this happens, resubmit the request as-is. If the site has no contents after the update is applied, performs the same action as DELETE.
  • Copy link
  • Flag this post
  • Block
✧✦Catherine✦✧
✧✦Catherine✦✧
@whitequark@mastodon.social  ·  activity timestamp 2 months ago

check out how quickly #GitPages (and #Grebedoc) can check out a giant git repository without any changes!

if supported by the server, it retrieves only a single tree from git (no other branches, no tags, no history, no file contents), backfills it from the existing site contents, and then pulls in any missing files from the git server on-demand

this lets you publish very large repositories as static sites without straining network and compute (for compression, etc) resources!

Sorry, no caption provided by author
Sorry, no caption provided by author
Sorry, no caption provided by author
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct