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

refactor: Migrate go builder to WrappableError #1383

Merged
merged 5 commits into from
Feb 3, 2023
Merged

refactor: Migrate go builder to WrappableError #1383

merged 5 commits into from
Feb 3, 2023

Conversation

datosh
Copy link
Contributor

@datosh datosh commented Dec 13, 2022

Worked on this after discovering #599

I added two questions (as TODO prefixed code comments) where I was not sure which path is the better. Do you have any guidance?

Signed-off-by: Fabian Kammel fk@edgeless.systems

Signed-off-by: Fabian Kammel <fk@edgeless.systems>
Copy link
Collaborator

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Very much appreciated!
@ianlewis PTAL

internal/builders/go/main_test.go Outdated Show resolved Hide resolved
internal/builders/go/pkg/config.go Outdated Show resolved Hide resolved
internal/builders/go/pkg/config.go Show resolved Hide resolved
Copy link
Member

@ianlewis ianlewis left a comment

Choose a reason for hiding this comment

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

Thanks for taking this on!

internal/builders/go/main_test.go Outdated Show resolved Hide resolved
internal/builders/go/pkg/config.go Outdated Show resolved Hide resolved
internal/builders/go/pkg/config.go Show resolved Hide resolved
@ianlewis ianlewis changed the title Migrate go builder to WrappableError refactor: Migrate go builder to WrappableError Dec 14, 2022
Fabian Kammel added 2 commits January 31, 2023 18:25
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
@datosh
Copy link
Contributor Author

datosh commented Jan 31, 2023

I have reworked the tests as discussed @ianlewis based on the structure in attestation_test.go.

I have defined the functions to check errors outside of the tests to keep the cognitive complexity value of the checker low. Also this allowed to reuse the same functions in build_test.go.

@ianlewis ianlewis merged commit 86d7b15 into slsa-framework:main Feb 3, 2023
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