Commit Graph

240 Commits

Author SHA1 Message Date
Gabriel Adrian Samfira
16fbbaeeea
Skip flaky test on Windows
The tty test fails on ltsc2022. Disable that test until we manage to
reproduce and fix it.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-04-05 16:43:48 +03:00
Gabriel Adrian Samfira
c7bdcdfbef
Address some timeout issues in the Windows CI
This change disables Windows Defender real-time monitoring on the test
workers, and increases the test timeout to 20 minutes (default is 10).

The Windows Defender real time monitoring feature scans any newly
created files for malitious contents. This takes up a lot of CPU when
expanding image archives, which contain lots of files. The CI has been
timing out due to the fact that tests take longer than 10 minutes. This
change should address that issue.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-04-01 14:02:20 +03:00
Akihiro Suda
b42e936c55
CI: add Rocky Linux 8
Testing containerd on an EL8 variant will be beneficial for enterprise users.

EL9 is coming soon, but we should keep maintaining EL8 CI for a couple of years for long-time stability.

Fixes issue 6542

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-03-30 21:27:15 +09:00
Kazuyoshi Kato
f72dada151
Merge pull request #6698 from dcantah/skip-windows-critest-tty
Skip tty critest testcase on Windows Server 2022
2022-03-21 11:09:28 -07:00
Daniel Canter
e9bb9c3bc7 Skip tty critest testcase on Windows Server 2022
Skip the 'runtime should support exec with tty=true and stdin=true' test
for now as it's exceedingly flaky only on Ws2022.. Doesn't seem to reproduce
on a local ws2022 machine, but don't want to keep the CI red while we
investigate.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-03-21 09:10:53 -07:00
Kazuyoshi Kato
a19ad9bb6f Use Go 1.18 to build and test containerd
Go 1.18 is released. Go 1.16 is no longer supported by the Go team.
golangci-lint is updated since 1.44.2 doesn't support Go 1.18.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:48:25 +00:00
Phil Estes
56f95e3d8a
Test turning off golang CI lint cache
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-17 18:43:37 -04:00
Kazuyoshi Kato
dc745fc1e5
Merge pull request #6666 from kzys/gha-lint-upgrade
Upgrade golangci-lint and its GitHub Action
2022-03-11 13:15:45 -08:00
Kazuyoshi Kato
622a35a4fa Upgrade golangci-lint and its GitHub Action
The GitHub Action is unstable especially on Windows (see #6618).
This change may not address the issue itself, but using the latest
version makes reporting the upstream the issue easier.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-11 19:49:06 +00:00
Paul "TBBle" Hampson
88de65112a Don't build a second copy of containerd-shim-runhcs-v1.exe
`make binaries` already builds containerd-shim-runhcs-v1.exe next to
containerd.exe, so there's no need to spend time checking out and
building it again.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-11 20:36:56 +11:00
Phil Estes
b0075c98d5
Merge pull request #6601 from gabriel-samfira/set-lates-image-tag
Use the latest tag for azure images
2022-03-08 12:50:29 -05:00
Gabriel Adrian Samfira
718adfe06b
Use the latest image for Windows test workers
This updates the Windows test worker images to the latest one available
in Azure. The updated images contain security and bug fixes.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-08 14:55:44 +02:00
Paul "TBBle" Hampson
48b478381e Skip most of script/setup/prepare_env_windows.ps1
Apart from crictl and go-junit-report, this script is just making the
remote test VMs look like GitHub Actions VMs, i.e. git, make-mingw32,
golang.

And we don't use go-junit-report, so we can save a lot of time (about
five minutes) by just extracting the interesting part.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 19:27:38 +11:00
Paul "TBBle" Hampson
768bf73dd1 Enable cri-tools critest on Windows
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 19:26:49 +11:00
Paul "TBBle" Hampson
59b9788479 Enable CRI Integration tests on Windows
Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 17:32:25 +11:00
Paul "TBBle" Hampson
5b78a9a8f1 Remove hardcoded /tmp in tempfile paths
There's no specific need mentioned at the points it was added, and it
makes the Windows-hosted test run setup slightly weird.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 17:32:25 +11:00
Sebastiaan van Stijn
e0a6f9c7d0
update to go 1.16.15, 1.17.8 to address CVE-2022-24921
Addresses [CVE-2022-24921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24921)

go 1.16.15
--------------------

go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and to the net package.
See the Go 1.16.15 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.15+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.16.14...go1.16.15

go 1.17.8
--------------------

go1.17.8 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and the crypto/x509,
and net packages. See the Go 1.17.8 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.8+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.17.7...go1.17.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-04 16:53:51 +01:00
Sebastiaan van Stijn
f261498e0e
Update Go to 1.16.14, 1.17.7
Includes security fixes for crypto/elliptic (CVE-2022-23806), math/big (CVE-2022-23772),
and cmd/go (CVE-2022-23773).

go1.17.7 (released 2022-02-10) includes security fixes to the crypto/elliptic,
math/big packages and to the go command, as well as bug fixes to the compiler,
linker, runtime, the go command, and the debug/macho, debug/pe, and net/http/httptest
packages. See the Go 1.17.7 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.7+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.17.6...go1.17.7

Update Go to 1.17.6

go1.17.6 (released 2022-01-06) includes fixes to the compiler, linker, runtime,
and the crypto/x509, net/http, and reflect packages. See the Go 1.17.6 milestone
on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 16:28:23 +01:00
Wei Fu
7e821fb618 fix: .dockerignore makes git working tree dirty
The .github/workflows/release/Dockerfile will use working dir as docker
build context. But the .dockerignore will ignore the .github/release/...
and cause dirty. We should remove it and verify git working tree after
build.

Fix: #6484

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-02-08 00:15:50 +08:00
Gabriel Adrian Samfira
4cd9f37f56
Fix windows periodic workflow
This change addresses the following issues:

  * Fix fetching the public IP of the windows instance.
  * Fix generation of repolist.toml.
  * Resource cleanup is now run even if tests fail.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-01-25 21:54:16 +02:00
Derek McGowan
4f552b077e
Compile binaries for go1.16 and go1.17 in CI
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-01-19 12:22:01 -08:00
Phil Estes
2b8386e0d1
Merge pull request #6386 from kzys/codeql-pr
gha: run CodeQL scan on pull requests
2022-01-18 13:52:13 -05:00
Nashwan Azhari
9197971638 Integration: Switch to upload-cloud-storage Gcloud action.
Switch to using the new `google-github-actions/upload-cloud-storage`
GitHub action for uploading the CI results for the Windows Periodic
Tests.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-01-12 03:02:33 +02:00
Nashwan Azhari
8a2b61356d Integration: Switch to using auth Gcloud action in Windows workflow.
Following the forking of `github-google-actions/setup-gcloud` into
individual actions, the functionality for authenticating on Google
Cloud within GitHub workflows has been moved to the
`github-google-actions/auth` action.

This patch updates the Windows Periodic Integration test workflow to use
the new `auth` action, as well as switching to using Workload Identity
Federation-based authorization which is superseding the Service Account
Key-based authorization the Windows Periodic workflow was using thus far.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-01-12 03:02:17 +02:00
Kazuyoshi Kato
8c194d8f3d gha: run CodeQL scan on pull requests
CodeQL should run on pull requests to avoid post-merge surprises.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-01-10 11:28:32 -08:00
Nashwan Azhari
f99e923592 Enable critest tests on Windows Server 2022.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-01-10 11:13:19 +02:00
Nashwan Azhari
55b89eabf5 Parametrize CRITest test images in Windows Periodic workflow.
This patch makes the Windows Periodic workflow pass specific test images
to CRITest. This will allow full control over the container images used
in workflow runs as opposed to relying on the hardcoded defaults in
`cri-tools` to be compatible with all the tested Windows releases.

Depends-On: https://github.com/kubernetes-sigs/cri-tools/pull/855

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-01-10 11:13:19 +02:00
Phil Estes
1b8af3752d
Merge pull request #6292 from aznashwan/windows-integration-conditional-artefact-upload
Integration: Check GCP secrets on Windows CI artifact upload.
2022-01-05 12:37:40 -05:00
Nashwan Azhari
90426378e3 Integration: Check GCP secrets on Windows CI artifact upload.
This patch makes the Windows Integration GitHub workflow conditionally
execute the CI artifact upload to GCP on successful runs iff the GitHub
secrets containing the GCP access info are defined.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-12-27 19:15:46 +02:00
Kevin Parsons
e0a433abfb
Merge pull request #6347 from gabriel-samfira/fix-windows-test-setup
cri-integration: Add Windows defaults and fix spaces issue
2021-12-17 11:49:03 -08:00
Gabriel Adrian Samfira
78ad7a2d3a
cri-integration: Add Windows default paths
This change adds the following:

  * Default paths to REPORT_DIR, CONTAINERD_STATE and
CONTAINERD_ROOT for Windows
  * Removes the need for nssm on Windows. The nssm service
has issues dealing with paths that contain spaces. Also, the
containerd binary is perfectly capable of registering itself
as a service in Windows, and Windows itself can take care of
any failure handling of the service. NSSM is useful for binaries
that do not have any kind of Windows service logic built into
them. That is not the case of containerd.
  * Use wrapper functions that run containerd, ctr and criclt
with properly quoted paths to pipes, sockets, state and root dirs.
Currently, if the state and root dirs contain spaces in them, the
command line flags on both Windows and Linux are not properly set.
The wrapper functions will allow us to use the readiness_check
and keepalive functions to retry the commands, while properly
quoting the paths and avoiding eval.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-15 14:11:58 +02:00
Kevin Parsons
3c3486f91b
Merge pull request #6350 from aznashwan/windows-integration-disable-2004
Remove Windows integration testing for 2004.
2021-12-14 13:17:35 -08:00
Sebastiaan van Stijn
0e472420bf
Update Go to 1.17.5
go1.17.5 (released 2021-12-09) includes security fixes to the syscall and net/http
packages. See the Go 1.17.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.5+label%3ACherryPickApproved

Update Go to 1.17.4
--------------------

go1.17.4 (released 2021-12-02) includes fixes to the compiler, linker, runtime,
and the go/types, net/http, and time packages. See the Go 1.17.4 milestone on
the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.4+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-12 01:25:02 +01:00
Maksym Pavlenko
a95a8b8fff
Merge pull request #6338 from kzys/windows-fail-fast
Don't fail-fast on Windows integration tests
2021-12-10 09:52:03 -08:00
Maksym Pavlenko
95b83fa54f
Merge pull request #6355 from dmcgowan/integration-client-restart-daemon-output
Update restart monitor test to output daemon logs on failure
2021-12-09 13:51:01 -08:00
Derek McGowan
2c96d5b067
Run windows parallel integration test as short
This prevents tests which spawn daemons from running at
the same time as the first integration test.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-09 11:45:38 -08:00
James Sturtevant
68dabdcc69 Use RFC3339 format so rg cleanup works
Signed-off-by: James Sturtevant <jstur@microsoft.com>
2021-12-07 11:04:36 -08:00
Nashwan Azhari
6f9d80907e Remove Windows integration testing for 2004.
Considering Windows 2004's EoL on the 14th of December, 2021,
this PR removes all periodic integration testing for 2004.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-12-07 19:49:33 +02:00
Kazuyoshi Kato
4c1e26cd5b Don't fail-fast on Windows integration tests
As like other integration tests, Windows integration tests should not
fail-fast. So developers can see whether an issue is platform-specific
or not.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-12-06 10:56:33 -08:00
Kazuyoshi Kato
6b0e2414c8 Do not use go get to install executables
https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-12-03 14:56:33 -08:00
Maksym Pavlenko
d06bce4d3d
Merge pull request #6314 from dcantah/ws2022-ci
Add Windows Server 2022 CI runs
2021-12-03 10:51:00 -08:00
Gabriel Adrian Samfira
4ccf287da7
Set CONTAINERD_ROOT in Windows cri-integration
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-03 07:44:44 +02:00
Daniel Canter
ff77dd1121 Add Windows Server 2022 CI runs
GA for ws2022 github actions VMs launched a couple weeks ago so seems like
it's time to try out the CI on this new SKU.

This involved adding new ws2022 runs for the OS matrices in the CI, fixing up
a test in the platforms package and adding a mapping for the ws2022 container image in
integration/client.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2021-12-02 16:18:25 -08:00
Derek McGowan
665877a5bf
Move volume images from gcr to ghcr
With the ghcr images now built and working, switch over to
use these new images and update the default name.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-12-02 10:29:44 -08:00
Gabriel Adrian Samfira
323a62d7b9
Add permissions
Limit the scope of GITHUB_TOKEN to only have write access to packages
and read access to metadata. By default it seems to be granted access
equal to that of the github.actor that triggered the workflow, which
may include access to more than the workflow needs.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-02 18:28:51 +02:00
Gabriel Adrian Samfira
c6d26f0d37
Authenticate against ghcr.io
This change adds a login step that authenticates the runner to
ghcr.io. This allows whomever triggers the action to use github
packages as a destination for the container images.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-02 17:41:54 +02:00
Derek McGowan
591d7097e7
Merge pull request #6290 from gabriel-samfira/add-test-image-build-action
Integration: Add image build workflow
2021-11-30 13:51:24 -08:00
Gabriel Adrian Samfira
7ccd733d25 Add image build workflow
This change adds a new workflow that builds the volume test images
and pushes them to a remote registry.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-11-25 09:26:17 +00:00
Nashwan Azhari
0a25bc1aac Integration: Separate Windows Periodic Tests workflow trigger.
Following PR #6284, the Windows Periodic Workflow is prevented from
running on any repository outside of the original.

While this achieves the goal of preventing senseless Windows workflow
failures in contributors' forks, it makes running the workflow for
contributors (even manually) impossible.

This PR adds a separate workflow file which triggers the Windows
Integration workflow iff it is being run off of the original repository,
thus maintaining the upstream scheduling, while allowing contributors to
manually trigger the workflow on their forks if they so desire.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-24 18:18:14 +02:00
Phil Estes
0a284fcdbc
Merge pull request #6284 from jonyhy96/feat-ci-skip-fork
feat: skip ci for fork
2021-11-23 23:20:37 -05:00