Skip to content

Conversation

@wolfeidau
Copy link
Member

This change has been made to cater for situations where a package manager installation is skipped for some reason. It also avoids cascading errors when a build is misconfigured, as any number of failures will result in these paths not being created.

This change has been made to cater for situations where a package manager installation is skipped for some reason. It also avoids cascading errors when a build is misconfigured, as any number of failures will result in these paths not being created.
@wolfeidau wolfeidau requested review from a team December 19, 2025 01:33
Copy link

@zhming0 zhming0 left a comment

Choose a reason for hiding this comment

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

I left two comments, they are not blockers but I think there might be a better way to approach this change? Keen to hear what you think, if you keen to proceed, I will give it a tick

"github.com/stretchr/testify/require"
)

func TestFilterExistingPaths(t *testing.T) {
Copy link

Choose a reason for hiding this comment

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

This is an implementation detail. I wonder if we should start by adding an test case for the Save func instead of this internal function?

// HasWarnings one or more warnings are present in the result
func (sr *SaveResult) HasWarnings() bool {
return len(sr.Warnings) > 0
}
Copy link

Choose a reason for hiding this comment

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

It's not a blocker but I don't anticipate caller side can do anything beyond logging for these warnings. Do you want to consider allowing zstash to take a slog.Logger object and handle logging internally?

Copy link
Member Author

Choose a reason for hiding this comment

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

@zhming0 You make a good point, I was tossing up what to do here.

I am really just putting off solving the logger problem, I need to either pass in the slog logger in https://pkg.go.dev/github.com/buildkite/zstash#NewCache or propegate it via the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants