Skip to content

Commit 795ab63

Browse files
Artifact v2 fix finalize artifact sqlite backend (#374)
1 parent bc92409 commit 795ab63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Runner.Server/Controllers/ArtifactControllerV2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public string FinalizeArtifact([FromBody, Protobuf] Github.Actions.Results.Api.V
9696
var artifactsMinAttempt = long.Parse(User.FindFirst("artifactsMinAttempt")?.Value ?? "-1");
9797
var runid = long.Parse(body.WorkflowRunBackendId);
9898

99-
var container = (from fileContainer in _context.ArtifactFileContainer where (fileContainer.Container.Attempt.Attempt >= artifactsMinAttempt || artifactsMinAttempt == -1) && (fileContainer.Container.Attempt.Attempt <= attempt || attempt == -1) && fileContainer.Container.Attempt.WorkflowRun.Id == runid && fileContainer.Files.Count == 1 && !fileContainer.Files.FirstOrDefault().FileName.Contains('/') && fileContainer.Files.FirstOrDefault().FileName.EndsWith(".zip") && body.Name.ToLower() == fileContainer.Name.ToLower() orderby fileContainer.Container.Attempt.Attempt descending select fileContainer).First();
99+
var container = (from fileContainer in _context.ArtifactFileContainer where (fileContainer.Container.Attempt.Attempt >= artifactsMinAttempt || artifactsMinAttempt == -1) && (fileContainer.Container.Attempt.Attempt <= attempt || attempt == -1) && fileContainer.Container.Attempt.WorkflowRun.Id == runid && fileContainer.Files.Count == 1 && body.Name.ToLower() == fileContainer.Name.ToLower() orderby fileContainer.Container.Attempt.Attempt descending select fileContainer).First();
100100
container.Size = body.Size;
101101
var resp = new Github.Actions.Results.Api.V1.FinalizeArtifactResponse
102102
{

0 commit comments

Comments
 (0)