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

Improve guidance on development/testing #136

Merged
merged 13 commits into from
Nov 24, 2023

Conversation

krksgbr
Copy link
Contributor

@krksgbr krksgbr commented Sep 8, 2023

Some improvements to documentation, prompted by @stoeffel's comment in #130 as well as coming back to PlayOS after a long break and needing to remember how to do certain things.

Checklist

  • [ ] Changelog updated
  • [ ] Code documented
  • [ ] User manual updated

@krksgbr krksgbr added the reviewable Ready for initial or iterative review label Sep 8, 2023
Copy link
Member

@knuton knuton left a comment

Choose a reason for hiding this comment

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

Thanks, good to write more of this down!

I do have some nitpicks. 🤓

Readme.md Outdated
## Testing
### Testing on PlayOS hardware

Changes such as NixOS upgrades, or to anything else that directly interacts with system hardware may necessitate testing on an actual machine. To do so, build a live system:
Copy link
Member

Choose a reason for hiding this comment

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

Two comments:

  • There is a third possibility that sits between testing on QEMU and a physical machine: A VM like VirtualBox, which can simulate a system more fully, including the installer, Grub and A/B partitions.
  • The live system is very useful, but sometimes it's necessary to install a system.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mentioned these points in:

Amend readme with additional details

It isn't clearly explained when to use a live system vs a complete installation, because it's not really clear to me 😅. Not sure how important it is to go into such details. I would think the nature of a particular thing being tested would draw us to one of the options.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure how important it is to go into such details. I would think the nature of a particular thing being tested would draw us to one of the options.

I agree, I wanted to point these out because the added instructions initially were very specifically saying to use a live system, which could be misguiding at times.

It isn't clearly explained when to use a live system vs a complete installation, because it's not really clear to me

As you say, an exhaustive characterization might be hard, but there are some obvious cases, based around the fact that the live system has no A/B partitions and entirely ephemeral storage. So:

  • Testing anything to do with the installer requires a full system
  • Testing anything to do with A/B systems requires a full system
  • Testing anything that spans past one boot (e.g. "Full HD" settings) requires a full system

Copy link
Member

@knuton knuton Nov 11, 2023

Choose a reason for hiding this comment

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

Readme.md Outdated Show resolved Hide resolved
build Outdated Show resolved Hide resolved
build Outdated
Comment on lines 38 to 40
- Status console: ctrl-alt-f8
- Graphical UI: ctrl-alt-f7
- Toggle controller: ctrl-shift-f12
Copy link
Member

Choose a reason for hiding this comment

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

These are not so much VM shortcuts, maybe move to a separate section?

The manual also explains these, should we link it more prominently?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are not so much VM shortcuts, maybe move to a separate section?

I'm not sure I addressed this point in the way you meant, but I renamed the section:
Rename shortcut section in VM hints

Added a link to the manual:
Link user manual in main readme

Copy link
Member

Choose a reason for hiding this comment

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

Toggling the controller works just fine for me with the regular key combination, also in QEMU. Does it not for you?

I was thinking to just move the sendkey explanation to the block above and let the PlayOS shortcut explanations stand on their own.

Copy link
Member

Choose a reason for hiding this comment

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

@@ -14,9 +14,99 @@ PlayOS controller is an OCaml application that manages various system tasks for
- `server/`: main application code
- `bin/`: binaries to start a dev server

## Prerequisites
Since PlayOS uses `Connman` for managing networks, it must be configured on your system.
Replace your NetworkManager config with the following (remember to fill in `<your-host-name>`):
Copy link
Member

Choose a reason for hiding this comment

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

I have a much shorter config on my own machine (I use connman regularly/permanently), was this one necessary for you to use in full?

Maybe also good to note that this assumes NixOS, while it should be possible to build PlayOS on another Linux distro using just nix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't remember the details of why my config is so long, but it very well might contain unnecessary things. Could you share yours?

Add note about assuming NixOS to Connman setup guidance

Copy link
Member

Choose a reason for hiding this comment

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

I think this should be enough (it is, I can use the controller like this):

  networking = {
    hostName = "foo";
    wireless.enable = true;
    networkmanager.enable = false;
  };
  
  services.connman = {
    enable = true;
    networkInterfaceBlacklist = [ "vboxnet" "zt" ];
  };

Copy link
Member

Choose a reason for hiding this comment

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

@krksgbr krksgbr requested a review from knuton September 12, 2023 09:30
@knuton
Copy link
Member

knuton commented Sep 15, 2023

@krksgbr Would you mind if I take your additions and revise the document on the basis of it?

I would push some changes to this PR and you can tell me whether the new explanations and structure match your intentions.

@krksgbr
Copy link
Contributor Author

krksgbr commented Sep 18, 2023

@krksgbr Would you mind if I take your additions and revise the document on the basis of it?

I would push some changes to this PR and you can tell me whether the new explanations and structure match your intentions.

Sure, feel free to do that.

@krksgbr krksgbr added details needed Further information requested to better evaluate changes and removed reviewable Ready for initial or iterative review labels Sep 18, 2023
Break apart and add overview items to make easier to digest.
This configuration seems to have been taken from the PlayOS network
configuration itself and contains several specific configurations that
should not be required on the host.
Only the virtual console key combinations require using the QEMU monitor and sendkey, as they would otherwise act directly on the (Linux) host.
@knuton knuton added reviewable Ready for initial or iterative review and removed details needed Further information requested to better evaluate changes labels Nov 11, 2023
Copy link
Member

@knuton knuton left a comment

Choose a reason for hiding this comment

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

@krksgbr I left my edits, good for me now.

Your turn :)

@krksgbr
Copy link
Contributor Author

krksgbr commented Nov 23, 2023

Thanks! Good for me as well.

@krksgbr krksgbr removed the reviewable Ready for initial or iterative review label Nov 23, 2023
@krksgbr krksgbr merged commit 4a1a5bf into dividat:develop Nov 24, 2023
1 check passed
@krksgbr krksgbr deleted the improve-testing-guidance branch November 24, 2023 15:10
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.

2 participants