-
Notifications
You must be signed in to change notification settings - Fork 301
Conversation
type machineMetadataOp struct { | ||
Operation string `json:"op"` | ||
Path string | ||
Value string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In relation with the question I asked about a possible TTL feature, I think this structure should be made more future-proof.
In practice, Value
should be an object instead of a string
.
That gives the room to later implement such improvement for example: https://github.com/dalbani/fleet/commit/c0a305037a214351e62442f7d234865699e9520f#diff-82e778d9c582a0fad1db38076b55deaaR47
{"op": "replace", "path": "/YYY/metadata/ping", "value": "splat"}] | ||
` | ||
|
||
resource, rw := fakeMachinesSetup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build of unit test fails at this line as well as other 4 other call sites, because fakeMachinesSetup()
is undefined. In the previous PR #1077 , the function actually did exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified api/machines_test.go
according to your remark.
Running the test suite locally is now successful.
What is the reason why the CI test triggered by GitHub didn't show up any error by the way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified api/machines_test.go according to your remark.
Running the test suite locally is now successful.
What is the reason why the CI test triggered by GitHub didn't show up any error by the way?
Great. Unit test builds now without error. Thanks!
I'm not sure why the travis job didn't get triggered in the first place. Usually it should run no matter whether there's a build error or not. It was maybe a temporary error from travisci.
First of all, thank a lot for the rebase. This helps us a lot go on with the feature. |
I have very little experience with Go and fleet, so if you could give me
some directions, that would be very useful.
|
@dalbani It's basically about trying to reproduce an exact test scenario inside the fleet's functional test framework, where systemd-nspawn instances run. Normally you could just make use of existing helpers that are already available under the source directory One of the examples would be a new functional test |
150d30c
to
4002bf5
Compare
3b60e93
to
875d938
Compare
Gentle ping. Any updates on functional test? |
Oh, dear, I had forgotten with the summer and everything :-) |
@dalbani Thanks for pushing the RPC related code. Good point. I think we should also add the MachineMetadata methods to rpc/registry. |
@dalbani How about adding into RegistryMux like below:
Wouldn't that resolve the testing error of machine being unable to be found, when enable_grpc=on? |
bdc94e8
to
fa5aa3a
Compare
I had another look. Unfortunately it turns out, there are still things to be done. |
20a3e96
to
3aaa1ab
Compare
Ah, sorry for noise. On Tuesday I misunderstood something. |
I am hardly in position to complain, given that I haven't been to the task of writing a functional test :-( Value string into: Value struct {
Value string `json:"value"`
} That would keep the ability to enhance the API in the future, for example for a TTL feature mentioned (and proof-of-concept implemented). By the way, I have "allowed edits from maintainers" on this PR, should you want to edit it directly. |
@dalbani All right, I'll do it for avoiding API breakage. Thanks! |
Source: #1077