Skip to content

v0.41.29

Choose a tag to compare

@github-actions github-actions released this 27 Nov 20:34
2207757

Highlights

A bug-fix release. Each fix was reproduced on 0.41.28 first, through the API or the running gateway, and then verified on the release candidate.

  • A failed archive import no longer wipes the environment's files (#751, @prathameshk421). POST /v1/environments/{id}/import?replace=1 removed the source before it knew the upload was an archive. On 0.41.28:

    • a file that is not an archive answered 422 and left the environment with no files;
    • a truncated tar.gz answered 502 after wiping the source;
    • a zip holding both x and x/… answered 502 and left a partial x behind.

    The archive is now extracted into a private staging directory first. A corrupt, truncated, encrypted or self-conflicting archive answers 422 with its reason, and the source is untouched. Only then is the source replaced or merged.

  • An archive import has a cap on what it unpacks (#759, fixes #757). A few-megabyte zip of zeros unpacks to gigabytes, and a small gzipped tar can hold millions of entries.

    • Bytes: counted as they are written, never taken from the archive's own size fields. HR_ENV_ARCHIVE_MAX_BYTES, default 2 GiB.
    • Entries: counted before any is written. HR_ENV_ARCHIVE_MAX_MEMBERS, default 100,000.
    • Past either, the import answers 422 and the source stays as it was.
  • A git clone from an IPv6 address works on a shared deployment (#753, @aarush323, fixes #749). On a deployment shared by several organizations, a clone connects only to the address the gateway checked. That address was handed to the clone as host:port:address without brackets, so for an IPv6 host the clone refused it ("git pin is not host:port:address"). A git@[…]:path address was also split at its first colon. On 0.41.28 every clone from an IPv6 literal was refused, failing closed.

    Now:

    • The IPv6 host is bracketed.
    • An http(s) clone of a literal address connects straight to it, with redirects still off.
    • ssh gets the address unbracketed.
    • A host that names a network interface (%eth0) is refused before any lookup.
    • Every internal IPv6 spelling is still refused.
  • A cancelled memory write no longer leaves its record lock behind (#750, @leninworld). A write waiting behind another write to the same memory record, and cancelled there (the client went away, or a timeout fired), never gave back its place in the lock's count. The lock outlived every writer, one per record, for the life of the process.

  • Microsoft 365 read_file never cuts a file below one character (#752, @leninworld). A negative max_chars cut the text from its end and reported more hidden characters than the file holds. For a file reading hello, -1 answered hell and "6 more characters not shown".

Thanks to @prathameshk421 for a first contribution, to @aarush323 for a second, and to @leninworld for two more. Each fix came with a test that failed on the bug.

What's Changed

  • docs(protocol): explain open and closed-source harness conformance by @github-actions[bot] in #754
  • fix(gateway): never cut a Microsoft 365 file below one character when max_chars is negative by @leninworld in #752
  • fix(gateway): drop a record lock's waiter count when the waiter is cancelled by @leninworld in #750
  • fix(runner): stage archive imports before replacing source by @prathameshk421 in #751
  • fix(gateway,runner): handle IPv6 literal hosts in git clone pins by @aarush323 in #753
  • fix(runner): cap what one archive import may unpack: 2 GiB counted as written, 100,000 entries by @github-actions[bot] in #759

New Contributors

Full Changelog: v0.41.28...v0.41.29