Skip to content
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

feat: windows persistent disk and other misc fixes/refactors #594

Merged
merged 34 commits into from
Oct 4, 2023

Conversation

pendo324
Copy link
Member

@pendo324 pendo324 commented Oct 3, 2023

Issue #, if available:

Description of changes:

  • Adds persistent disk support to Windows
    • This took more work than anticipated, in order to deal with non-Admin users
    • pkg/disk/dpgo/ is brand new code, and should be a focus of the review
    • pkg/winutil/run_windows.go is also new and requires careful review. This is what allows Finch to run as the regular user, except for when it needs Admin access to call diskpart (to create the persistent disk)
  • Fix paths in nerdctl_config_applier to make the post-boot/init shelling work
  • Added winres to allow the finch.exe to have metadata attached to it. This is WIP, need final icons and descriptions etc.
  • Large (in terms of lines changed) refactor of pkg/path/finch.go, but it should have no impact on functionality (needs careful review)
  • Fixed the Makefile's clean target for Windows
  • Most of the other changes are just noise from refactoring (like, literally renaming things). Nothing major, but take a look if possible. Sorry the diff is so large

Testing done:

  • 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.

@pendo324 pendo324 requested review from ginglis13 and vsiravar October 3, 2023 23:35
@pendo324 pendo324 self-assigned this Oct 3, 2023
Vishwas Siravara and others added 19 commits October 3, 2023 19:48
Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Copy link
Contributor

@ginglis13 ginglis13 left a comment

Choose a reason for hiding this comment

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

just a few nits on first pass

Comment on lines +114 to +115
cd deps/finch-core/src/lima/_output && tar -cf - * | tar -xvf - -C $(OUTDIR)/lima
cd deps/finch-core/_output && tar -cf - * | tar -xvf - -C $(OUTDIR)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: repeated line here?

Suggested change
cd deps/finch-core/src/lima/_output && tar -cf - * | tar -xvf - -C $(OUTDIR)/lima
cd deps/finch-core/_output && tar -cf - * | tar -xvf - -C $(OUTDIR)
cd deps/finch-core/src/lima/_output && tar -cf - * | tar -xvf - -C $(OUTDIR)/lima

cmd/finch/virtual_machine_init.go Show resolved Hide resolved
pkg/config/lima_config_applier.go Outdated Show resolved Hide resolved
pkg/disk/disk_windows.go Outdated Show resolved Hide resolved
@vsiravar
Copy link
Contributor

vsiravar commented Oct 4, 2023

Really cool PR, I left a few minor comments from the first pass, especially some files missing licenses.

pkg/disk/disk_windows.go Outdated Show resolved Hide resolved
Signed-off-by: Justin Alvarez <[email protected]>
finch.yaml Show resolved Hide resolved
finch.yaml Show resolved Hide resolved
pkg/disk/disk_windows.go Outdated Show resolved Hide resolved
pkg/disk/disk_windows.go Outdated Show resolved Hide resolved
pkg/disk/disk_windows.go Outdated Show resolved Hide resolved
Signed-off-by: Justin Alvarez <[email protected]>
pkg/winutil/run_windows.go Outdated Show resolved Hide resolved
pkg/disk/disk_unix.go Outdated Show resolved Hide resolved
pkg/winutil/io.go Show resolved Hide resolved
Copy link
Contributor

@vsiravar vsiravar left a comment

Choose a reason for hiding this comment

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

looks great. Left a couple of nits.

Signed-off-by: Justin Alvarez <[email protected]>
@pendo324 pendo324 merged commit 0f2980d into runfinch:windev Oct 4, 2023
2 checks passed
vsiravar added a commit that referenced this pull request Oct 17, 2023
Issue #, if available:

*Description of changes:*
- Adds persistent disk support to Windows
- This took more work than anticipated, in order to deal with non-Admin
users
- `pkg/disk/dpgo/` is brand new code, and should be a focus of the
review
- `pkg/winutil/run_windows.go` is also new and requires careful review.
This is what allows Finch to run as the regular user, except for when it
needs Admin access to call `diskpart` (to create the persistent disk)
- Fix paths in `nerdctl_config_applier` to make the post-boot/init
shelling work
- Added winres to allow the finch.exe to have metadata attached to it.
This is WIP, need final icons and descriptions etc.
- Large (in terms of lines changed) refactor of `pkg/path/finch.go`, but
it should have no impact on functionality (needs careful review)
- Fixed the Makefile's `clean` target for Windows
- Most of the other changes are just noise from refactoring (like,
literally renaming things). Nothing major, but take a look if possible.
Sorry the diff is so large

*Testing done:*

- [x] I've reviewed the guidance in CONTRIBUTING.md

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
Co-authored-by: Vishwas Siravara <[email protected]>
Co-authored-by: Vishwas Siravara <[email protected]>
vsiravar added a commit that referenced this pull request Oct 17, 2023
Issue #, if available:

*Description of changes:*
- Adds persistent disk support to Windows
- This took more work than anticipated, in order to deal with non-Admin
users
- `pkg/disk/dpgo/` is brand new code, and should be a focus of the
review
- `pkg/winutil/run_windows.go` is also new and requires careful review.
This is what allows Finch to run as the regular user, except for when it
needs Admin access to call `diskpart` (to create the persistent disk)
- Fix paths in `nerdctl_config_applier` to make the post-boot/init
shelling work
- Added winres to allow the finch.exe to have metadata attached to it.
This is WIP, need final icons and descriptions etc.
- Large (in terms of lines changed) refactor of `pkg/path/finch.go`, but
it should have no impact on functionality (needs careful review)
- Fixed the Makefile's `clean` target for Windows
- Most of the other changes are just noise from refactoring (like,
literally renaming things). Nothing major, but take a look if possible.
Sorry the diff is so large

*Testing done:*

- [x] I've reviewed the guidance in CONTRIBUTING.md

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
Co-authored-by: Vishwas Siravara <[email protected]>
Co-authored-by: Vishwas Siravara <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
pendo324 added a commit that referenced this pull request Jan 10, 2024
Issue #, if available:

*Description of changes:*
- translation logic to wsl paths
- persistent disk for windows
- CI/CD (workflows to run CI on every PR on windows runners, MSI
builder, Windows release automation)

This PR combines 4 distinct PRs to a separate windev branch. 
- additional disk for windows #594
- translation logic for wsl paths
#581
- CI #581
- Installer #624

This PR also contains bug fixes and modifications to e2e tests.  
*Testing done:*
Yes


- [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: Vishwas Siravara <[email protected]>
Signed-off-by: Vishwas Siravara <[email protected]>
Signed-off-by: Gavin Inglis <[email protected]>
Signed-off-by: Justin Alvarez <[email protected]>
Signed-off-by: chaoningusc <[email protected]>
Signed-off-by: [email protected] <[email protected]>
Signed-off-by: Kevin Li <[email protected]>
Co-authored-by: Vishwas Siravara <[email protected]>
Co-authored-by: Gavin Inglis <[email protected]>
Co-authored-by: Justin <[email protected]>
Co-authored-by: Kevin Li <[email protected]>
Co-authored-by: chaoningusc <[email protected]>
Co-authored-by: Justin Alvarez <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants