3 Commits

Author SHA1 Message Date
Tonis Tiigi
10872e1722 http: fix resolver cache nil race
Avoid storing typed nil HTTP metadata in the resolver cache after failed
metadata resolution. Also make resolver cache release functions consistently
callable when no error is returned.

Add a client integration test covering concurrent same-URL HTTP sources with
and without checksum when the server returns 401.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-20 12:48:07 -07:00
Bryce Gibson
d6d7db53eb Fix sigsegv by ensuring a func is returned in failure case.
Signed-off-by: Bryce Gibson <bgibson@limepoint.com>
2026-05-20 15:54:28 +10:00
Tonis Tiigi
df4d2aee3d solver: add ResolverCache support
New ResolverCache interface in JobContext allows build jobs to
memorize and synchronize accesses to mutable remote resources.

This is to make sure that when multiple parts of the same build
job, or build job and source metadata resolver access the same
remote resources, it remains the same for the duration of the
single build request, even if data happens to change on the remote side.

Fix such a possible case in the HTTP source. Even if the server
now returns completely different data, if the same URL was accessed
once for the ongoing build, then the initial contents are always
used until the build completes.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-17 10:29:55 -07:00