Conversation
- Introduced failure handling in the Environment class to capture and report failed steps during installation. - Added methods to manage resume options and ensure proper messaging for failed steps. - Implemented port conflict detection and resolution logic in DockerEnvironment, including tests for various scenarios. - Created InstallCommandIdentityTest to validate application name and host handling during installation. - Added InstallCommandResumeTest to ensure correct behavior of resume commands and failure messaging. - Refactored TestableInstallCommand to expose additional methods for testing purposes.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
This pull request introduces significant improvements to the Saucebase installation workflow, focusing on robust handling of the application's domain/hostname, improved module compatibility checks, and enhanced failure recovery. The changes ensure that the app's domain is consistently captured, validated, and written to the environment file, and that users are guided through module compatibility and installation failures with clear prompts and resume instructions.
Domain/hostname handling:
--domainoption to bothInstallCommandandNewCommand, with interactive prompts and validation to ensure the app's hostname is captured, normalized, and stored in.envasAPP_HOST. The domain is used for SSL certificate and web server configuration, and users are warned if the domain does not resolve locally. ([[1]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R27),[[2]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R156-R226),[[3]](https://github.com/saucebase-dev/installer/pull/20/files#diff-2bde8d3b845e6edd8ea70ad566edcf41f7193b3d3a4acd956ca3f273f15b6307R36),[[4]](https://github.com/saucebase-dev/installer/pull/20/files#diff-2bde8d3b845e6edd8ea70ad566edcf41f7193b3d3a4acd956ca3f273f15b6307R79-R80),[[5]](https://github.com/saucebase-dev/installer/pull/20/files#diff-2bde8d3b845e6edd8ea70ad566edcf41f7193b3d3a4acd956ca3f273f15b6307R137-R160),[[6]](https://github.com/saucebase-dev/installer/pull/20/files#diff-2bde8d3b845e6edd8ea70ad566edcf41f7193b3d3a4acd956ca3f273f15b6307L219-R252))App identity and environment file updates:
APP_NAME,APP_SLUG, andAPP_HOSTin.envbased on the app directory and chosen domain, replacing only default or empty values to avoid overwriting user edits. For native installs,APP_URLis also updated if needed. ([[1]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R390-R470),[[2]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R333-R334))Module compatibility enforcement:
--modules) are compatible with the selected frontend stack. If incompatible modules are detected, the installation halts with a clear error message listing unsupported modules and their compatible stacks. ([[1]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R261-R296),[[2]](https://github.com/saucebase-dev/installer/pull/20/files#diff-b5ff597dd8114f9bca99d69eb3e0cd3ffda9a09c8fff431f90746330ade4645dR36-R77))Failure handling and resume support:
[[1]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R732-R814),[[2]](https://github.com/saucebase-dev/installer/pull/20/files#diff-b5ff597dd8114f9bca99d69eb3e0cd3ffda9a09c8fff431f90746330ade4645dR9-R11),[[3]](https://github.com/saucebase-dev/installer/pull/20/files#diff-b5ff597dd8114f9bca99d69eb3e0cd3ffda9a09c8fff431f90746330ade4645dR36-R77))Utility and codebase robustness:
optionOrNullfor safer option retrieval, and improved code structure for reading and updating environment variables, quoting paths, and normalizing domains. ([[1]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166L73-R92),[[2]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R156-R226),[[3]](https://github.com/saucebase-dev/installer/pull/20/files#diff-24b2cabf7676cce3456251ae1ef517978994a79fd07642e97b0623743be6b166R390-R470))These changes collectively make the installation process more user-friendly, reliable, and maintainable.