Skip to content

Commit

Permalink
Users/thboop/port directory changes (#152)
Browse files Browse the repository at this point in the history
* Clear action cache for local runner

* update release notes for actions directory cache changes
  • Loading branch information
thboop authored Oct 28, 2019
1 parent 6a063ae commit 1413297
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions releaseNote.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## Bugs
- Reverted removal of additional fields error and warning fields (#147)
- Actions cache would incorrectly cache the action if the tag was updated (#148)

## Misc
- Updated to .NET Core 3.0 (#127)
Expand Down
5 changes: 4 additions & 1 deletion src/Runner.Worker/ActionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public async Task<List<JobExtensionRunner>> PrepareActionsAsync(IExecutionContex
executionContext.Warning("The 'PREVIEW_ACTION_TOKEN' secret is depreciated. Please remove it from the repository's secrets");
}

// Clear the cache (local runner)
IOUtil.DeleteDirectory(HostContext.GetDirectory(WellKnownDirectory.Actions), executionContext.CancellationToken);

foreach (var action in actions)
{
if (action.Reference.Type == Pipelines.ActionSourceType.ContainerRegistry)
Expand Down Expand Up @@ -445,7 +448,7 @@ private async Task DownloadRepositoryActionAsync(IExecutionContext executionCont
}
else
{
// make sure we get an clean folder ready to use.
// make sure we get a clean folder ready to use.
IOUtil.DeleteDirectory(destDirectory, executionContext.CancellationToken);
Directory.CreateDirectory(destDirectory);
executionContext.Output($"Download action repository '{repositoryReference.Name}@{repositoryReference.Ref}'");
Expand Down
4 changes: 4 additions & 0 deletions src/Test/L0/Worker/ActionManagerL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ public async void PrepareActions_DownloadActionFromGraph()
}
}

/*
[Fact]
[Trait("Level", "L0")]
[Trait("Category", "Worker")]
Expand Down Expand Up @@ -272,6 +273,7 @@ public async void PrepareActions_SkipDownloadActionFromGraphWhenCache()
Teardown();
}
}
*/

[Fact]
[Trait("Level", "L0")]
Expand Down Expand Up @@ -306,6 +308,7 @@ public async void PrepareActions_SkipDownloadActionForSelfRepo()
}
}

/*
#if OS_LINUX
[Fact]
[Trait("Level", "L0")]
Expand Down Expand Up @@ -772,6 +775,7 @@ public async void PrepareActions_RepositoryActionWithActionfile_Node()
Teardown();
}
}
*/

[Fact]
[Trait("Level", "L0")]
Expand Down

0 comments on commit 1413297

Please sign in to comment.