Skip to content

Commit 7c1e49d

Browse files
feat: store more metadata for cached plugin archives
1 parent d0f9cbb commit 7c1e49d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

internal/server/handler_batch.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"net/http"
99
"os"
10+
"strconv"
1011
"strings"
1112

1213
"github.com/Masterminds/semver/v3"
@@ -184,10 +185,12 @@ func (s *Server) batchGetPlugins(w http.ResponseWriter, r *http.Request) {
184185
Body: tarFile,
185186
ContentType: aws.String("application/gzip"),
186187
Metadata: map[string]string{
187-
"checksum": tgzChecksum,
188-
"hash": batchResponse.DownloadHash,
189-
"os": batchResponse.OS,
190-
"arch": batchResponse.Arch,
188+
"checksum": tgzChecksum,
189+
"hash": batchResponse.DownloadHash,
190+
"os": batchResponse.OS,
191+
"arch": batchResponse.Arch,
192+
"plugins": strconv.Itoa(len(batchResponse.Plugins)),
193+
"cache_key": string(batchRequestCacheKey),
191194
},
192195
})
193196
if closeErr := tarFile.Close(); closeErr != nil {

0 commit comments

Comments
 (0)