purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.67k stars 315 forks source link

learning and tests #638

Closed S-ign closed 3 years ago

S-ign commented 3 years ago

Tips:

topic: Capitalized message with no trailing period

or:

topic, topic2: Capitalized message with no trailing period

make gofmt      # formats the entire project correctly

or format a single golang file correctly:

gofmt -w yourcode.go
git checkout master
git pull origin master
git checkout your-feature
git rebase master
git push your-remote your-feature
hub pull-request    # or submit with the github web ui
# make changes based on reviews...
git add -p      # add new changes
git commit --amend  # combine with existing commit
git push your-remote your-feature -f
# now ping @purpleidea in the github PR since it doesn't notify us automatically

Thanks for contributing to mgmt and welcome to the team!

purpleidea commented 3 years ago

Side note, re discussion in IRC:

I noticed that one of the tests failed in an unusual place in this PR... And I said, gah, I hope it's not a race. So I dug into it, and it turns out it was caused by a bug in your code! (yay, no our fault!) So the good news is the tests work, the bad news is I think we could have caught this issue in a more obvious place. So I added a new commit that should help new developers out by providing a clearer error message.

https://github.com/purpleidea/mgmt/commit/887d374c530915565b0257e6ac6f8c0cda232067

You'll want to rebase your branch against this commit which is now in git master.

Cheers!

purpleidea commented 3 years ago

@S-ign Hey-- I'm not going to do a full review yet-- I'd like you to first make a small examples/lang/whatever.mcl that uses this function, and confirm you got it doing what you expect. This should replace the copied example that you committed in this PR.

When you've succeeded, please update this PR and put a comment here with the command you used to run this example =D

Thanks!

purpleidea commented 3 years ago

(For anyone else reading, @S-ign came to us for a learning experience, so this is not the traditional review process.)