Skip to content

feat: clean stale provisioner files #9545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Sep 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
WIP access time
  • Loading branch information
mtojek committed Sep 6, 2023
commit 2af24c2d40cbee6090ee25d998c41f36ba3b56f5
9 changes: 8 additions & 1 deletion provisioner/terraform/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ func cleanStaleTerraformPlugins(ctx context.Context, cachePath string, now time.
// Identify stale plugins
var stalePlugins []string
for _, pluginPath := range pluginPaths {

accessTime, err := latestAccessTime(pluginPath)
if err != nil {
return xerrors.Errorf("unable to evaluate latest access time for directory %q: %w", pluginPath, err)
}
}
// TODO

Expand All @@ -309,3 +312,7 @@ func cleanStaleTerraformPlugins(ctx context.Context, cachePath string, now time.

return nil
}

func latestAccessTime(path string) (time.Time, error) {

}