-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix: add finch vm settings subcommand #887
Conversation
@haytok |
We are looking into resolving the following error.
Errors
haytok ~/workspace/haytok/finch [add-settings-subcommand]
> make test-unit
go test github.com/runfinch/finch/benchmark github.com/runfinch/finch/benchmark/all github.com/runfinch/finch/benchmark/container github.com/runfinch/finch/benchmark/vm github.com/runfinch/finch/cmd/finch github.com/runfinch/finch/pkg/command github.com/runfinch/finch/pkg/config github.com/runfinch/finch/pkg/dependency github.com/runfinch/finch/pkg/dependency/credhelper github.com/runfinch/finch/pkg/dependency/vmnet github.com/runfinch/finch/pkg/disk github.com/runfinch/finch/pkg/flog github.com/runfinch/finch/pkg/fmemory github.com/runfinch/finch/pkg/fssh github.com/runfinch/finch/pkg/lima github.com/runfinch/finch/pkg/lima/wrapper github.com/runfinch/finch/pkg/mocks github.com/runfinch/finch/pkg/path github.com/runfinch/finch/pkg/support github.com/runfinch/finch/pkg/system github.com/runfinch/finch/pkg/version github.com/runfinch/finch/pkg/winutil -shuffle on
# github.com/runfinch/finch/pkg/config
package github.com/runfinch/finch/pkg/config
imports github.com/runfinch/finch/pkg/mocks
imports github.com/runfinch/finch/pkg/config: import cycle not allowed in test
FAIL github.com/runfinch/finch/pkg/config [setup failed]
? github.com/runfinch/finch/benchmark [no test files]
ok github.com/runfinch/finch/benchmark/all 0.449s [no tests to run]
ok github.com/runfinch/finch/benchmark/container 0.635s [no tests to run]
ok github.com/runfinch/finch/benchmark/vm 0.274s [no tests to run]
ok github.com/runfinch/finch/cmd/finch 0.740s
ok github.com/runfinch/finch/pkg/command 0.572s
? github.com/runfinch/finch/pkg/flog [no test files]
? github.com/runfinch/finch/pkg/fmemory [no test files]
ok github.com/runfinch/finch/pkg/dependency 0.616s
? github.com/runfinch/finch/pkg/lima/wrapper [no test files]
? github.com/runfinch/finch/pkg/mocks [no test files]
ok github.com/runfinch/finch/pkg/dependency/credhelper 0.595s
? github.com/runfinch/finch/pkg/system [no test files]
? github.com/runfinch/finch/pkg/version [no test files]
ok github.com/runfinch/finch/pkg/dependency/vmnet 0.573s
ok github.com/runfinch/finch/pkg/disk 0.566s
ok github.com/runfinch/finch/pkg/fssh 0.656s
ok github.com/runfinch/finch/pkg/lima 0.817s
ok github.com/runfinch/finch/pkg/path 0.882s
ok github.com/runfinch/finch/pkg/support 1.982s
ok github.com/runfinch/finch/pkg/winutil 1.068s
FAIL
make: *** [test-unit] Error 1
haytok ~/workspace/haytok/finch [add-settings-subcommand]
> make check-licenses
go mod download
GOBIN=/Users/haytok/workspace/haytok/finch/tools_bin go install github.com/google/go-licenses
/Users/haytok/workspace/haytok/finch/tools_bin/go-licenses check --ignore golang.org/x,github.com/runfinch/finch --allowed_licenses Apache-2.0,BSD-2-Clause,BSD-3-Clause,ISC,MIT --include_tests ./...
W0412 23:48:14.745128 34321 library.go:141] "github.com/shirou/gopsutil/v3/disk" contains non-Go code that can't be inspected for further dependencies:
/Users/haytok/go/pkg/mod/github.com/shirou/gopsutil/[email protected]/disk/iostat_darwin.c
/Users/haytok/go/pkg/mod/github.com/shirou/gopsutil/[email protected]/disk/iostat_darwin.h
F0412 23:48:14.745449 34321 main.go:75] errors for ["github.com/runfinch/finch/benchmark" "github.com/runfinch/finch/benchmark/all" "github.com/runfinch/finch/benchmark/container" "github.com/runfinch/finch/benchmark/vm" "github.com/runfinch/finch/pkg/flog" "github.com/runfinch/finch/pkg/system" "github.com/runfinch/finch/pkg/command" "github.com/runfinch/finch/pkg/fmemory" "github.com/runfinch/finch/pkg/fssh" "github.com/runfinch/finch/pkg/config" "github.com/runfinch/finch/pkg/dependency" "github.com/runfinch/finch/pkg/path" "github.com/runfinch/finch/pkg/dependency/credhelper" "github.com/runfinch/finch/pkg/dependency/vmnet" "github.com/runfinch/finch/pkg/disk" "github.com/runfinch/finch/pkg/lima" "github.com/runfinch/finch/pkg/lima/wrapper" "github.com/runfinch/finch/pkg/version" "github.com/runfinch/finch/pkg/support" "github.com/runfinch/finch/cmd/finch" "github.com/runfinch/finch/e2e" "github.com/runfinch/finch/e2e/container" "github.com/runfinch/finch/e2e/vm" "github.com/runfinch/finch/pkg/mocks" "github.com/runfinch/finch/pkg/winutil" "github.com/runfinch/finch/benchmark/all [github.com/runfinch/finch/benchmark/all.test]" "github.com/runfinch/finch/benchmark/all.test" "github.com/runfinch/finch/benchmark/container [github.com/runfinch/finch/benchmark/container.test]" "github.com/runfinch/finch/benchmark/container.test" "github.com/runfinch/finch/benchmark/vm [github.com/runfinch/finch/benchmark/vm.test]" "github.com/runfinch/finch/benchmark/vm.test" "github.com/runfinch/finch/cmd/finch [github.com/runfinch/finch/cmd/finch.test]" "github.com/runfinch/finch/cmd/finch.test" "github.com/runfinch/finch/e2e/container [github.com/runfinch/finch/e2e/container.test]" "github.com/runfinch/finch/e2e/container.test" "github.com/runfinch/finch/e2e/vm [github.com/runfinch/finch/e2e/vm.test]" "github.com/runfinch/finch/e2e/vm.test" "github.com/runfinch/finch/pkg/command [github.com/runfinch/finch/pkg/command.test]" "github.com/runfinch/finch/pkg/command_test [github.com/runfinch/finch/pkg/command.test]" "github.com/runfinch/finch/pkg/command.test" "github.com/runfinch/finch/pkg/config [github.com/runfinch/finch/pkg/config.test]" "github.com/runfinch/finch/pkg/config.test" "github.com/runfinch/finch/pkg/dependency [github.com/runfinch/finch/pkg/dependency.test]" "github.com/runfinch/finch/pkg/dependency.test" "github.com/runfinch/finch/pkg/dependency/credhelper [github.com/runfinch/finch/pkg/dependency/credhelper.test]" "github.com/runfinch/finch/pkg/dependency/credhelper.test" "github.com/runfinch/finch/pkg/dependency/vmnet [github.com/runfinch/finch/pkg/dependency/vmnet.test]" "github.com/runfinch/finch/pkg/dependency/vmnet.test" "github.com/runfinch/finch/pkg/disk [github.com/runfinch/finch/pkg/disk.test]" "github.com/runfinch/finch/pkg/disk.test" "github.com/runfinch/finch/pkg/fssh [github.com/runfinch/finch/pkg/fssh.test]" "github.com/runfinch/finch/pkg/fssh.test" "github.com/runfinch/finch/pkg/lima_test [github.com/runfinch/finch/pkg/lima.test]" "github.com/runfinch/finch/pkg/lima.test" "github.com/runfinch/finch/pkg/path [github.com/runfinch/finch/pkg/path.test]" "github.com/runfinch/finch/pkg/path.test" "github.com/runfinch/finch/pkg/support [github.com/runfinch/finch/pkg/support.test]" "github.com/runfinch/finch/pkg/support.test" "github.com/runfinch/finch/pkg/winutil [github.com/runfinch/finch/pkg/winutil.test]" "github.com/runfinch/finch/pkg/winutil.test"]:
github.com/runfinch/finch/pkg/config: -: import cycle not allowed in test
make: *** [check-licenses] Error 1 Other errors have been fixed. |
@Shubhranshu153 |
The current implementation requires updating ~/.finch/finch.yaml to change the CPU and Memory settings in the VM. However, the following issue provides a feature request to set the CPU and memory resources to be allocated to the VM from CLI options. - runfinch#683 Therefore, this fix adds the finch vm settings command to add the ability to set the CPU and memory resources allocated to VMs from the CLI. Signed-off-by: Hayato Kiwata <[email protected]>
Based on the review, the code has been modified. Signed-off-by: Hayato Kiwata <[email protected]>
Signed-off-by: Hayato Kiwata <[email protected]>
fix to pass CI Signed-off-by: Hayato Kiwata <[email protected]>
fix to pass CI Signed-off-by: Hayato Kiwata <[email protected]>
Refactoring so that make test-unit passes. Also, modified and added tests. Signed-off-by: Hayato Kiwata <[email protected]>
The details of the macos-latest CI failure are as follows
Fix to use fewer CPUs in test cases. |
Changed the CPUs value of the test to a value smaller than the CPUs allocated to GitHub Actions. Signed-off-by: Hayato Kiwata <[email protected]>
We implemented the tests by separating the test cases for macOS and Windows. Signed-off-by: Hayato Kiwata <[email protected]>
d0780e8
to
18fabc9
Compare
The unit-tests (windows-latest) is different on Windows than on macOS environments, where This was causing errors in CI. |
Fix tests so that CI passes. Could you please run CI again and review ? |
the same error as below has occured. Therefore, correct the test cpus. |
fix to pass CI Signed-off-by: Hayato Kiwata <[email protected]>
The fix was completed so that the test passes. I ran the tests again with the cpus set to the cpus (
Check test and lint
|
The following error occurred in Erros in the workflow
The part of the test that failed is not related to this changes. Also, this CI did not fail in the workflows we ran in the past.
Therefore, could you please run the CI again when you have time, to see if the test failure is reproducible? |
Thanks for running the CI again! |
Thank you for the contribution. |
Thanks for review !!!!! |
In my previous pull request, we added the functionality to change the number of CPUs and memory size allocated to VMs. - runfinch#887 However, at that time, we did not add documentations for the finch vm settings command. Therefore, in this fix, we will add documentations for the finch vm settings command. Signed-off-by: Hayato Kiwata <[email protected]>
In my previous pull request, we added the functionality to change the number of CPUs and memory size allocated to VMs. - #887 However, at that time, we did not add documentations for the finch vm settings command. Therefore, in this fix, we will add documentations for the finch vm settings command. Issue #, if available: N/A *Description of changes:* Details are described in this commit message. *Testing done:* N/A - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Hayato Kiwata <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.2.0](v1.1.3...v1.2.0) (2024-06-03) ### Build System or External Dependencies * **deps:** Bump github.com/aws/aws-sdk-go-v2 from 1.26.0 to 1.26.1 ([#882](#882)) ([c059d9e](c059d9e)) * **deps:** Bump github.com/aws/aws-sdk-go-v2 from 1.26.1 to 1.27.0 ([#954](#954)) ([b06280c](b06280c)) * **deps:** Bump github.com/docker/cli from 26.0.0+incompatible to 26.0.1+incompatible ([#894](#894)) ([680e23f](680e23f)) * **deps:** Bump github.com/docker/cli from 26.0.1+incompatible to 26.0.2+incompatible ([#906](#906)) ([6fc6ce5](6fc6ce5)) * **deps:** Bump github.com/docker/cli from 26.0.2+incompatible to 26.1.0+incompatible ([#913](#913)) ([bfeb585](bfeb585)) * **deps:** Bump github.com/docker/cli from 26.1.0+incompatible to 26.1.1+incompatible ([#922](#922)) ([7b6b3d2](7b6b3d2)) * **deps:** Bump github.com/docker/cli from 26.1.1+incompatible to 26.1.2+incompatible ([#941](#941)) ([eec3462](eec3462)) * **deps:** Bump github.com/docker/cli from 26.1.2+incompatible to 26.1.3+incompatible ([#952](#952)) ([9a94c57](9a94c57)) * **deps:** Bump github.com/docker/docker from 26.0.0+incompatible to 26.0.1+incompatible ([#892](#892)) ([05610c1](05610c1)) * **deps:** Bump github.com/docker/docker from 26.0.1+incompatible to 26.0.2+incompatible ([#905](#905)) ([69e7d0b](69e7d0b)) * **deps:** Bump github.com/docker/docker from 26.0.2+incompatible to 26.1.0+incompatible ([#912](#912)) ([5e5f8a8](5e5f8a8)) * **deps:** Bump github.com/docker/docker from 26.1.0+incompatible to 26.1.1+incompatible ([#924](#924)) ([79eb863](79eb863)) * **deps:** Bump github.com/docker/docker from 26.1.1+incompatible to 26.1.2+incompatible ([#940](#940)) ([aa3ab01](aa3ab01)) * **deps:** Bump github.com/docker/docker from 26.1.2+incompatible to 26.1.3+incompatible ([#951](#951)) ([cef9d8f](cef9d8f)) * **deps:** Bump github.com/lima-vm/lima from 0.21.0 to 0.22.0 ([#934](#934)) ([62d67d5](62d67d5)) * **deps:** Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 ([#920](#920)) ([939639e](939639e)) * **deps:** Bump github.com/onsi/ginkgo/v2 from 2.17.2 to 2.17.3 ([#933](#933)) ([c56019d](c56019d)) * **deps:** Bump github.com/onsi/ginkgo/v2 from 2.17.3 to 2.19.0 ([#959](#959)) ([08d7a34](08d7a34)) * **deps:** Bump github.com/onsi/gomega from 1.33.0 to 1.33.1 ([#923](#923)) ([e7f4e0d](e7f4e0d)) * **deps:** Bump github.com/runfinch/common-tests from 0.7.18 to 0.7.21 ([#878](#878)) ([e1cbd0a](e1cbd0a)) * **deps:** Bump github.com/runfinch/common-tests from 0.7.21 to 0.7.22 ([#907](#907)) ([84b4a69](84b4a69)) * **deps:** Bump github.com/shirou/gopsutil/v3 from 3.24.2 to 3.24.3 ([#881](#881)) ([465e369](465e369)) * **deps:** Bump github.com/shirou/gopsutil/v3 from 3.24.3 to 3.24.4 ([#925](#925)) ([8cd5643](8cd5643)) * **deps:** Bump github.com/shirou/gopsutil/v3 from 3.24.4 to 3.24.5 ([#962](#962)) ([8e51db3](8e51db3)) * **deps:** Bump github.com/tc-hib/go-winres from 0.3.1 to 0.3.3 ([#893](#893)) ([ebb4c9f](ebb4c9f)) * **deps:** Bump golang.org/x/crypto from 0.22.0 to 0.23.0 ([#928](#928)) ([1687293](1687293)) * **deps:** Bump golang.org/x/text from 0.14.0 to 0.15.0 ([#929](#929)) ([85e1bec](85e1bec)) * **deps:** Bump golang.org/x/tools from 0.19.0 to 0.20.0 ([#889](#889)) ([cfac010](cfac010)) * **deps:** Bump golang.org/x/tools from 0.20.0 to 0.21.0 ([#932](#932)) ([a853a8a](a853a8a)) * **deps:** Bump k8s.io/apimachinery from 0.29.3 to 0.30.0 ([#904](#904)) ([f8b7f25](f8b7f25)) * **deps:** Bump k8s.io/apimachinery from 0.30.0 to 0.30.1 ([#946](#946)) ([dc4ebf9](dc4ebf9)) * **deps:** Bump submodules and dependencies ([#874](#874)) ([a9f73be](a9f73be)) * **deps:** Bump submodules and dependencies ([#895](#895)) ([c7388bb](c7388bb)) * unify macos/windows yamls ([#921](#921)) ([86d9a23](86d9a23)) ### Features * Add the --format option to the finch version command ([#926](#926)) ([a9d04e3](a9d04e3)) * make Virtualization Framework default ([#956](#956)) ([75b69b8](75b69b8)) ### Bug Fixes * add finch vm settings subcommand ([#887](#887)) ([8e809cc](8e809cc)) * Remove unnecessary error handling ([#961](#961)) ([f441fc9](f441fc9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The current implementation requires updating ~/.finch/finch.yaml to change the CPU and Memory settings in the VM.
However, the following issue provides a feature request to set the CPU and memory resources to be allocated to the VM from CLI options.
Therefore, this fix adds the finch vm settings command to add the ability to set the CPU and memory resources allocated to VMs from the CLI.
Issue #, if available: #683
Description of changes: Details are described in this commit message.
Testing done: Yes
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.