Skip to content

Conversation

@Elbehery
Copy link
Member

Fixes #665

cc @ahrtr @ivanvc

Copy link
Member

@ivanvc ivanvc 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 pull request, @Elbehery. I left some comments :)

@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch 2 times, most recently from 383220b to 5b3b4b4 Compare June 12, 2025 18:54
@Elbehery
Copy link
Member Author

/retest

@Elbehery
Copy link
Member Author

the failure was due to server error in GH workflow

Run golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9
prepare environment
Error: Failed to run: Error: Unexpected HTTP response: 500, Error: Unexpected HTTP response: 500
    at /home/runner/work/_actions/golangci/golangci-lint-action/4afd733a84b1f43292c63897423277bb7f4313a9/dist/run/index.js:7965:25
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/golangci/golangci-lint-action/4afd733a84b1f43292c63897423277bb7f4313a9/dist/run/index.js:7878:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: Unexpected HTTP response: 500

@Elbehery
Copy link
Member Author

/retest

@Elbehery
Copy link
Member Author

failure is new

--- FAIL: TestTx_Rollback_Freelist (0.00s)
    btesting.go:54: Opening bbolt DB at: /tmp/TestTx_Rollback_Freelist3715326428/001/db
    db_failpoint_test.go:278: Populate some data to have at least 5 leaf pages.
    db_failpoint_test.go:302: Remove some keys to have at least 3 more free pages.
    db_failpoint_test.go:314: Close and then reopen the db to release all pending free pages.
    btesting.go:96: Closing bbolt DB at: /tmp/TestTx_Rollback_Freelist3715326428/001/db
    btesting.go:126: Reopening bbolt DB at: /tmp/TestTx_Rollback_Freelist3715326428/001/db
    db_failpoint_test.go:318: Enable the `beforeWriteMetaError` failpoint.
    db_failpoint_test.go:319: 
        	Error Trace:	/home/runner/work/bbolt/bbolt/tests/failpoint/db_failpoint_test.go:319
        	Error:      	Received unexpected error:
        	            	failpoint: failpoint does not exist
        	Test:       	TestTx_Rollback_Freelist
    btesting.go:96: Closing bbolt DB at: /tmp/TestTx_Rollback_Freelist3715326428/001/db
FAIL
FAIL	go.etcd.io/bbolt/tests/failpoint	0.022s
ok  	go.etcd.io/bbolt/tests/robustness	0.004s
?   	go.etcd.io/bbolt/tests/utils	[no test files]
?   	go.etcd.io/bbolt/version	[no test files]
FAIL
Error: Process completed with exit code 1.

@Elbehery
Copy link
Member Author

Elbehery commented Jun 12, 2025

@ahrtr hello

TestTx_Rollback_Freelist is consistently failing, also tried running it locally, and it fails !!!

--- FAIL: TestTx_Rollback_Freelist (0.00s)
    btesting.go:54: Opening bbolt DB at: /tmp/TestTx_Rollback_Freelist749001970/001/db
    db_failpoint_test.go:278: Populate some data to have at least 5 leaf pages.
    db_failpoint_test.go:302: Remove some keys to have at least 3 more free pages.
    db_failpoint_test.go:314: Close and then reopen the db to release all pending free pages.
    btesting.go:96: Closing bbolt DB at: /tmp/TestTx_Rollback_Freelist749001970/001/db
    btesting.go:126: Reopening bbolt DB at: /tmp/TestTx_Rollback_Freelist749001970/001/db
    db_failpoint_test.go:318: Enable the `beforeWriteMetaError` failpoint.
    db_failpoint_test.go:319: 
        	Error Trace:	/home/runner/work/bbolt/bbolt/tests/failpoint/db_failpoint_test.go:319
        	Error:      	Received unexpected error:
        	            	failpoint: failpoint does not exist
        	Test:       	TestTx_Rollback_Freelist
    btesting.go:96: Closing bbolt DB at: /tmp/TestTx_Rollback_Freelist749001970/001/db
FAIL
FAIL	go.etcd.io/bbolt/tests/failpoint	0.013s
ok  	go.etcd.io/bbolt/tests/robustness	0.004s
?   	go.etcd.io/bbolt/tests/utils	[no test files]
?   	go.etcd.io/bbolt/version	[no test files]
FAIL
Error: Process completed with exit code 1.

I think #973 is the only possible cause, please correct me if i am wrong

cc @ivanvc @fuweid @tjungblu

@fuweid
Copy link
Member

fuweid commented Jun 12, 2025

@Elbehery some cases need to build with failpoint so I think we need to run make gofail-enable first

@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch from 5b3b4b4 to 9431051 Compare June 12, 2025 21:58
@Elbehery
Copy link
Member Author

@Elbehery some cases need to build with failpoint so I think we need to run make gofail-enable first

used

 make gofail-enable && make test

hope this helps

@Elbehery Elbehery changed the title WIP: chore(CI): Add QEMU to CI Workflow chore(CI): Add QEMU to CI Workflow Jun 12, 2025
@Elbehery Elbehery changed the title chore(CI): Add QEMU to CI Workflow chore(CI): Add QEMU based CI Workflow Jun 12, 2025
@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch from 9431051 to 0956a37 Compare June 13, 2025 06:17
@Elbehery
Copy link
Member Author

@ahrtr hello ✋🏽

following up on your comment

I could add the platforms to the workflow, but I found the following notes on them

Notes:

    aix/ppc64: Supported by Go, but note that AIX binaries are not commonly run/tested on CI environments like GitHub Actions. It may compile but won’t be runnable in the GitHub runner.

    android/arm64: Go supports Android cross-compilation, but compiling for Android may require additional NDK setup for complex use cases.

    solaris/amd64: Also supported by Go, but not natively testable on GitHub runners.

please let me know

cc @ivanvc @fuweid

@ahrtr
Copy link
Member

ahrtr commented Jun 13, 2025

I could add the platforms to the workflow, but I found the following notes on them

Notes:

    aix/ppc64: Supported by Go, but note that AIX binaries are not commonly run/tested on CI environments like GitHub Actions. It may compile but won’t be runnable in the GitHub runner.

    android/arm64: Go supports Android cross-compilation, but compiling for Android may require additional NDK setup for complex use cases.

    solaris/amd64: Also supported by Go, but not natively testable on GitHub runners.

please let me know

My understanding is that it's exactly the reason why we need to use qemu. BTW, where did you see the notes?

@Elbehery
Copy link
Member Author

I could add the platforms to the workflow, but I found the following notes on them

Notes:

    aix/ppc64: Supported by Go, but note that AIX binaries are not commonly run/tested on CI environments like GitHub Actions. It may compile but won’t be runnable in the GitHub runner.

    android/arm64: Go supports Android cross-compilation, but compiling for Android may require additional NDK setup for complex use cases.

    solaris/amd64: Also supported by Go, but not natively testable on GitHub runners.

please let me know

My understanding is that it's exactly the reason why we need to use qemu. BTW, where did you see the notes?

I used AI search, is it ok ? 🤔

@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch from 0956a37 to 9ba6bae Compare June 13, 2025 14:09
@Elbehery
Copy link
Member Author

/retest

@ivanvc
Copy link
Member

ivanvc commented Jun 13, 2025

If we can't run tests for some platforms (i.e., Android, Solaris, AIX). Could we at least cross-compile? If I understand correctly, errors like #988 should be caught at compile time.

@Elbehery
Copy link
Member Author

If we can't run tests for some platforms (i.e., Android, Solaris, AIX). Could we at least cross-compile? If I understand correctly, errors like #988 should be caught at compile time.

yes indeed, it will compile, I am trying to fix the CI and then will add the 3 platforms in #988

@Elbehery
Copy link
Member Author

the failing test is due to gofail not found

Run GOOS=linux GOARCH=mips64 make gofail-enable && make test
  GOOS=linux GOARCH=mips64 make gofail-enable && make test
  shell: /usr/bin/bash -e {0}
go install go.etcd.io/gofail
gofail enable .
make: gofail: No such file or directory
make: *** [Makefile:75: gofail-enable] Error 127
Error: Process completed with exit code 2.

I am adding a commit to use explicit path for gofail binary to be used within other targets 🙏🏽

@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch 3 times, most recently from df6ae3e to 6efa964 Compare June 13, 2025 19:27
@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch 9 times, most recently from 12c4527 to 42e181b Compare June 18, 2025 18:12
@Elbehery
Copy link
Member Author

/retest

@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch from 22a726f to df9a267 Compare June 18, 2025 19:06
Copy link
Member

@ivanvc ivanvc 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 updates, @Elbehery.

I think this could be simplified further if we add a new template that receives the ARCHs and the OS. I can also improve this in a follow-up PR if it's not clear how to implement this.

@Elbehery
Copy link
Member Author

Thanks for the updates, @Elbehery.

I think this could be simplified further if we add a new template that receives the ARCHs and the OS. I can also improve this in a follow-up PR if it's not clear how to implement this.

lgtm 👍🏽

Signed-off-by: Mustafa Elbehery <[email protected]>
@Elbehery Elbehery force-pushed the 20250612-use-qemu-github-workflow branch from df9a267 to 8723401 Compare June 19, 2025 09:13
Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

LGTM. Let's merge, and I'll improve this workflow in a follow-up.

@ivanvc
Copy link
Member

ivanvc commented Jun 20, 2025

/cc @ahrtr

@k8s-ci-robot k8s-ci-robot requested a review from ahrtr June 20, 2025 14:20
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @Elbehery

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, Elbehery, ivanvc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit be68cc2 into etcd-io:main Jun 20, 2025
43 checks passed
@Elbehery Elbehery deleted the 20250612-use-qemu-github-workflow branch June 20, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Introduce qemu to verify all the existing platforms

5 participants