Conversation
- Trim unnecessary trailing whitespaces - Simplify logic in error and disk partition checks - Replace ambiguous return with a more Pythonic `not errors` - Enhance IOError handling for clarity - Update `README.md` for clearer installer purpose and flow
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors installation configuration validation and file-writing logic in create_cfg.py to be more Pythonic and robust, while also clarifying the installer’s purpose in the README. Sequence diagram for installation config validation and writingsequenceDiagram
actor User
participant InstallerCLI
participant InstallConfigManager
participant InstallationData
participant FileSystem
User->>InstallerCLI: start_installation()
InstallerCLI->>InstallConfigManager: create_cfg()
InstallConfigManager->>InstallConfigManager: sanity_check()
InstallConfigManager->>InstallationData: read boot,zfs_config_data,disk,slice,scheme,new_partition
InstallConfigManager-->>InstallConfigManager: is_valid,errors (not_errors,errors)
alt invalid_config
InstallConfigManager-->>InstallerCLI: raise ValueError(error_msg)
InstallerCLI-->>User: display_validation_errors
else valid_config
InstallConfigManager->>FileSystem: open(installation_config,w)
FileSystem-->>InstallConfigManager: file_handle
InstallConfigManager->>FileSystem: write_installation_settings
FileSystem-->>InstallConfigManager: write_success
InstallConfigManager-->>InstallerCLI: return_success
InstallerCLI-->>User: report_install_config_created
end
InstallConfigManager->>FileSystem: may_raise_IOError
FileSystem-->>InstallConfigManager: IOError
InstallConfigManager-->>InstallerCLI: raise IOError_with_context
Updated class diagram for installation configuration managementclassDiagram
class InstallationData {
+boot
+zfs_config_data
+disk
+slice
+scheme
+new_partition
}
class InstallConfigManager {
+sanity_check(cls)
+create_cfg(cls)
}
InstallConfigManager ..> InstallationData : reads
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `install_station/create_cfg.py:161` </location>
<code_context>
f.write("runCommand=pw userdel -n ghostbsd -r\n")
f.write("runCommand=sed -i '' 's/ghostbsd/root/g' /etc/gettytab\n")
f.write("runCommand=sed -i '' 's/ghostbsd/root/g' /etc/ttys\n")
- f.write("runCommand=mv /usr/local/etc/devd/automount_devd"
- ".conf.skip /usr/local/etc/devd/automount_devd.conf\n")
- f.write("runCommand=mv /usr/local/etc/devd/automount_devd"
</code_context>
<issue_to_address>
**question (bug_risk):** Removal of the `automount_devd` mv commands may alter post-install behavior.
These `mv` commands were what enabled devd-based automount on first boot. Without an equivalent replacement, new installs may lose automount (e.g., removable media not mounting automatically). If this behavior is being changed intentionally, please confirm where the new enablement happens or that disabling automount is desired.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
not errorsREADME.mdfor clearer installer purpose and flowSummary by Sourcery
Improve configuration validation clarity in the installer and refresh installer documentation wording.
Enhancements:
Documentation: