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

Ensure hostname truly is optional when configuring device images #676

Merged
merged 2 commits into from Oct 9, 2017

Conversation

Projects
None yet
2 participants
@pimterry
Member

pimterry commented Oct 5, 2017

This fixes #600: right now attempting to configure a ResinOS 2.x image includes an optional hostname setting under advanced settings, but if you don't set it reconfix explodes. With this change, it's truly optional: if you don't set it, the image doesn't get anything added.

I've added this in a somewhat hacky way, mainly because it's a painful bug for users in the field that I'd like to sweep through, and we're going to do a proper reconfixication of the CLI soon anyway, so this won't last too long.

I'd be very interested in tidier solutions though, where I can declare hostname as optional in the schema itself. I tried some (fairly complicated) options using choice, but it explodes when neither of the templates I provided matched the entire config.json file when reading the current config file, and that's definitely going to be a problem (unless I have a read and a write schema, but that feels pretty terrible too).

@pimterry pimterry requested review from abrodersen, jviotti and MoranF Oct 5, 2017

@jviotti

jviotti approved these changes Oct 9, 2017

@resin-io-versionbot resin-io-versionbot bot merged commit b4a56e1 into master Oct 9, 2017

5 checks passed

AutoMerges PR merging is in progress
Reviewers 1/1 review approvals met
Versionist Found all required commit footer tags
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@resin-io-versionbot resin-io-versionbot bot deleted the hostname-configuration branch Oct 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment