Homework 0 forum

Client implementation & Logging & git push

 
Picture of Adrian Matthijs Christian Hamelink
Client implementation & Logging & git push
by Adrian Matthijs Christian Hamelink - Tuesday, 29 September 2020, 09:38
 
I have three questions

[1] The implementation of cli.go requires us to send an POST request to the controller via TCP. This can be done very easily using the standard http library, as seen in the recent bingossip test. Since this library uses TCP under the hood, is this an acceptable solution to the problem, or are we expected to craft the http request manually thought a TCP connection?

[2] With regards to logging, I have seen a lot of code in the controller using log.(L)Lvl formatting. I have been using this too for debugging, and when the program is built, these messages are suppressed since the log.SetDebugVisible is set. However, since it is expected that our program outputs messages to the standard output, does the grading ignore these messages (when running tests for example), or should we remove them from our submitted code?

[3] Is it normal that we cannot push to the main git branch? To test in the CI environment, I had to create another branch where the tests can run. Is this ok for submission?

profile
Re: Client implementation & Logging & git push
by Kirill Nikitin - Tuesday, 29 September 2020, 22:02
 

Hi,

[1] Yes, it is totally fine and, I would even say, preferable to use the http library. You still need to manually populate the http requests though, even with the library.

[2] No need to remove your debugging output for the submission, our grading setup will ignore it.

[3] Yes, it is normal :) We have locked the master branch for us to be able to push updates to the the tests (as we did for the integration tests) or generally the code base without having to merge. Perhaps not a perfect solution but it seems to work. And yes, it is totally fine for the submission.

Best,

Kirill