Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Validate Homu TOML file - #420

Merged
bors-servo merged 1 commit into
servo:masterfrom
Crimack:407_valid_toml
Jul 11, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
Crimack:407_valid_toml

Conversation

@Crimack

@Crimack Crimack commented Jul 1, 2016 •

Copy link
Copy Markdown
Contributor

Draft of resolution to #407. config_path in sls/homu/toml.py is definitely wrong and should be corrected


This change is Reviewable

@Crimack

Crimack commented Jul 1, 2016

Copy link
Copy Markdown
Contributor Author

@aneeshusa I think I see what I've done wrong. I should be checking the generated TOML file at /etc/init/homu.conf on servo-master1 rather than the Jinja template, right?

@Crimack Crimack changed the title Initial attempt to solve issue 407 Validate Homu TOML file Jul 1, 2016
@aneeshusa

Copy link
Copy Markdown
Contributor

Correct!

@Crimack
Crimack force-pushed the 407_valid_toml branch 3 times, most recently from 29d0563 to 7a77865 Compare July 1, 2016 19:48
Comment thread tests/sls/homu/toml.py Outdated
config_path = os.path.join('/home', 'servo', 'homu', 'cfg.toml')
with open(config_path) as conf:
try:
toml.loads(conf.read())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can use toml.load instead which will handle opening and closing the file for us.

@Crimack

Crimack commented Jul 4, 2016

Copy link
Copy Markdown
Contributor Author

I think that's all your comments cleared up. Thank you for the feedback by the way, it was very easy to follow!

The additions to homu/init.sls might be wrong though? I wasn't sure if I should make a new 'block' (not sure what the proper SaltStack term for this is), or add it to one of the existing ones.

Comment thread homu/init.sls Outdated
toml:
pip.installed:
- pkgs:
- toml == 0.9.1 # Ensure this is up to date with requirements.txt

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of a separate Salt state (block), add this to the pip.installed state above that installed Homu. Also, let's say 'in sync' instead of 'up to date'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@aneeshusa

Copy link
Copy Markdown
Contributor

LGTM aside from that last comment, so go ahead and squash when you address that.

@Crimack

Crimack commented Jul 7, 2016

Copy link
Copy Markdown
Contributor Author

All good now I think!

@aneeshusa

Copy link
Copy Markdown
Contributor

Checked this locally in Vagrant and everything looks good. @bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 5e284fa has been approved by aneeshusa

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5e284fa with merge 4d25967...

bors-servo pushed a commit that referenced this pull request Jul 11, 2016
Validate Homu TOML file

Draft of resolution to #407. `config_path` in sls/homu/toml.py is definitely wrong and should be corrected

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/420)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - travis

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants