Skip to content
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

rsc: Hidden directories should be returned as cleanable outputs #1658

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
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
13 changes: 10 additions & 3 deletions share/wake/lib/system/remote_cache_runner.wake
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,16 @@ export def mkRemoteCacheRunner (rscApi: RemoteCacheApi) (hashFn: RunnerInput =>
outputSymlinks
| map getCacheSearchOutputSymlinkLink

def resolvedDirectories =
def Pair hiddenDirectories publishedDirectories =
outputDirs
| filter (!_.getCacheSearchOutputDirectoryHidden)
| splitBy getCacheSearchOutputDirectoryHidden

def cleanableOutputs =
hiddenDirectories
| map getCacheSearchOutputDirectoryPath

def resolvedDirectories =
publishedDirectories
| map getCacheSearchOutputDirectoryPath

def outputs = resolvedOutputs ++ resolvedDirectories ++ resolvedSymlinks
Expand Down Expand Up @@ -237,7 +244,7 @@ export def mkRemoteCacheRunner (rscApi: RemoteCacheApi) (hashFn: RunnerInput =>
# by the same job. If so, upload the target as a "hidden" output file. On rehydration
# retore the file as normal but don't list it in the outputs.
## -------------------------------------------------------------------------------------- ##
Pass (RunnerOutput inputs outputs Nil predict)
Pass (RunnerOutput inputs outputs cleanableOutputs predict)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this Nil should have triggered something in our brains during code review I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I had the same thought. It was subtle but it should have been a flag


def run (job: Job) (input: RunnerInput): Result RunnerOutput Error =
def label = input.getRunnerInputLabel
Expand Down
Loading