Skip to content

Commit

Permalink
update libyavirt and fix GetExitCode bug in Virt (#606)
Browse files Browse the repository at this point in the history
* update libyavirt

* fix: return default exit code when attach console
  • Loading branch information
yuyang0 authored Jul 14, 2023
1 parent 5787bb2 commit 5a76c4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion engine/virt/virt.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (v *Virt) Execute(ctx context.Context, ID string, config *enginetypes.ExecC

// ExecExitCode get return code of a specific execution.
func (v *Virt) ExecExitCode(ctx context.Context, ID, execID string) (code int, err error) {
if strings.Contains(execID, "_") {
if strings.HasPrefix(execID, virttypes.MagicPrefix) {
return 0, nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b
github.com/panjf2000/ants/v2 v2.7.3
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/projecteru2/libyavirt v0.0.0-20230621055438-179374d3115d
github.com/projecteru2/libyavirt v0.0.0-20230705102231-8199e310da06
github.com/prometheus/client_golang v1.15.0
github.com/rs/zerolog v1.29.1
github.com/sanity-io/litter v1.5.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/projecteru2/libyavirt v0.0.0-20230621055438-179374d3115d h1:L+mU66mq9qBDFyFGs3O0KDqo1ZzCTu7ZfRvQ6j/hDRY=
github.com/projecteru2/libyavirt v0.0.0-20230621055438-179374d3115d/go.mod h1:N41KaKmqbailweGs4x/mt2H0O0Y7MizObZQ+igLdzpw=
github.com/projecteru2/libyavirt v0.0.0-20230705102231-8199e310da06 h1:p/1vyEftIPf9LPuMMr7STDllXlVzrWc1eUHHuUPcE9o=
github.com/projecteru2/libyavirt v0.0.0-20230705102231-8199e310da06/go.mod h1:N41KaKmqbailweGs4x/mt2H0O0Y7MizObZQ+igLdzpw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
Expand Down

0 comments on commit 5a76c4f

Please sign in to comment.