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

pkg/cdi: fix build/vet failures on windows. #83

Merged
merged 5 commits into from
Sep 27, 2022

Conversation

klihub
Copy link
Contributor

@klihub klihub commented Sep 20, 2022

Fix two build failures for Windows. One in stock code and another in tests, which show up as a 'go vet' failure. Fix a data read/write race which was probably triggered by the latter Windows fix slightly altering timing in some of tests... or just by sheer luck.

Update the github workflow to run sanity checking (lint, vet) both for Linux and Windows. The checks always run on a Linux distro, but they override GOOS/GOARCH for the toolchain.

Update the github worfklow to do binary test builds/cross-builds both for Linux and Windows.

@klihub klihub force-pushed the fixes/build/windows branch 2 times, most recently from d3fe743 to b58232d Compare September 20, 2022 18:26
@klihub klihub marked this pull request as ready for review September 20, 2022 18:49
@klihub klihub requested review from elezar, bart0sh and bartosh and removed request for bartosh September 20, 2022 18:49
Copy link
Contributor

@bart0sh bart0sh left a comment

Choose a reason for hiding this comment

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

/lgtm

@klihub klihub changed the title pkg/cdi: fix a build failure on windows. pkg/cdi: fix build/vet failures on windows. Sep 21, 2022
Copy link
Contributor

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Some minor comments. I think these are generally no-ops and I'd be happy to merge pending feedback.

(would be nice to update the dates in the license strings).

pkg/cdi/container-edits_windows.go Outdated Show resolved Hide resolved
pkg/cdi/cache_test.go Outdated Show resolved Hide resolved
.github/workflows/sanity.yml Show resolved Hide resolved
pkg/cdi/cache_test_unix.go Show resolved Hide resolved
Fix the most obvious build failure on windows.

Signed-off-by: Krisztian Litkey <[email protected]>
Protect setting/reading external validator against read/write
race.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the fixes/build/windows branch from 5ec6131 to 584db3c Compare September 26, 2022 15:20
@klihub
Copy link
Contributor Author

klihub commented Sep 26, 2022

Some minor comments. I think these are generally no-ops and I'd be happy to merge pending feedback.

(would be nice to update the dates in the license strings).

My preference would be to file another PR which removes any explicitly spelled out dates from all file headers and the copyright template (and create it if we don't have yet such a thing separately in the repo). This is similar to how, for instance, containerd deals with this. It removes this class of problem once and for all.

@elezar
Copy link
Contributor

elezar commented Sep 27, 2022

Some minor comments. I think these are generally no-ops and I'd be happy to merge pending feedback.
(would be nice to update the dates in the license strings).

My preference would be to file another PR which removes any explicitly spelled out dates from all file headers and the copyright template (and create it if we don't have yet such a thing separately in the repo). This is similar to how, for instance, containerd deals with this. It removes this class of problem once and for all.

That sounds great.

@elezar elezar self-requested a review September 27, 2022 08:16
Copy link
Contributor

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Thanks @klihub.

Sorry about the back and forth on the minor points.

@elezar elezar merged commit 5609688 into cncf-tags:main Sep 27, 2022
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.

4 participants