Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Convert docker conformance test to go test framework #11643

Merged
merged 6 commits into from
Feb 6, 2025

Conversation

dereknola
Copy link
Member

@dereknola dereknola commented Jan 23, 2025

Proposed Changes

  • Convert the sonobuoy docker bash tests into the new go docker framework. Replaced sonobuoy with hydrophone. Hydrophone has the advantage of being a ginkgo wrapper around the compiled suite of upstream tests, so we can pipe its output directly into our GinkgoWriter, effectively giving us both our BDD level of It/Context statements and the conformance It/Context statements at a single output level.
  • Replace ONLY the etcd and sqlite versions of sonobuoy for now, and only on the CRON Drone events, I tested these manually, but it takes a long time and I want to see consistent nightly conformance pass before all of the tests. I also am not touching the TAG events, I don't want to break releases.
  • Replace more of the old docker tests in the Drone arm32 pipeline with the go test replacements.
  • Add Eventually clause around a flaky section of the E2E btrfs test

Types of Changes

Testing

Verification

You can see the conformance test pass in this WIP version where I forced it to run on PR https://drone-pr.k3s.io/k3s-io/k3s/10508/1/5

Testing

Linked Issues

#11714
#11419

User-Facing Change


Further Comments

@dereknola dereknola requested a review from a team as a code owner January 23, 2025 18:30
@dereknola dereknola force-pushed the conformance_go branch 3 times, most recently from e831cc9 to f0100d0 Compare January 27, 2025 21:37
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.38%. Comparing base (bb79c2b) to head (0b0e4bc).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11643      +/-   ##
==========================================
- Coverage   49.69%   47.38%   -2.31%     
==========================================
  Files         186      186              
  Lines       19454    19461       +7     
==========================================
- Hits         9667     9221     -446     
- Misses       8397     8904     +507     
+ Partials     1390     1336      -54     
Flag Coverage Δ
e2etests 40.32% <ø> (-3.82%) ⬇️
inttests 35.01% <ø> (+0.01%) ⬆️
unittests 16.94% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dereknola dereknola force-pushed the conformance_go branch 3 times, most recently from c31137a to a158f3f Compare February 4, 2025 22:23
Switch to hydrophone from sonobuoy
Support serial conformance

Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola changed the title [WIP] Conformance go tests Convert docker conformance test to go test framework Feb 5, 2025
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
Signed-off-by: Derek Nola <derek.nola@suse.com>
@dereknola dereknola merged commit 34ae4da into k3s-io:master Feb 6, 2025
44 checks passed
@dereknola dereknola deleted the conformance_go branch February 7, 2025 17:04
dereknola added a commit to dereknola/k3s that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit to dereknola/k3s that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Feb 7, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Feb 8, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Feb 8, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
dereknola added a commit that referenced this pull request Feb 8, 2025
* Migrate conformance docker test

Switch to hydrophone from sonobuoy
Support serial conformance

* Replace docker tests with go version on arm32 Drone pipeline
* Support multiple DB, push hydrophone logs to test output
* Replace  etcd and sqlite conformance tests with golang versions
* Retry on flaky btrfs section
* Fix db cleanup for sqlite, be explicit on the dbtype

Signed-off-by: Derek Nola <derek.nola@suse.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants