-
Notifications
You must be signed in to change notification settings - Fork 33
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
Hotfix - use DeprecatedWatch for now #52
Conversation
e4a90e2
to
43d76c5
Compare
@@ -139,8 +139,8 @@ func TestGetByIPTinkerbell(t *testing.T) { | |||
t.Fatalf("unexpected filesystem mount format, want: %v, got: %v\n", test.filesystemFormat, hw.Metadata.Instance.Storage.Filesystems[0].Mount.Format) | |||
} | |||
} | |||
if hw.Metadata.Instance.OperatingSystemVersion.OsSlug != test.osSlug { | |||
t.Fatalf("unexpected os slug, want: %v, got: %v\n", test.osSlug, hw.Metadata.Instance.OperatingSystemVersion.OsSlug) | |||
if hw.Metadata.Instance.OperatingSystem.Slug != test.osSlug { |
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.
Maybe it's the hw.Metadata.Instance
that is causing the nil pointer dereference
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.
@kdeng3849
I made the following corrections in metadata JSON:
operating_system_version > operating_system
os_slug > slug
Tests pass but I'm not certain if it is doing what's expected.
At the matster
branch when I debug the test hw.Metadata
fields are NIL. If we print the ehw this is what we have and it doesn't contain metadata. Is it expected?
{"id":"363115b0-f03d-4ce5-9a15-5514193d131a","network":{"interfaces":[{"dhcp":{"arch":"x86_64","hostname":"server001","ip":{"address":"192.168.1.5","gateway":"192.168.1.1","netmask":"255.255.255.248"},"lease_time":86400,"mac":"ec:0d:9a:c0:01:0c"},"netboot":{"allow_pxe":true,"allow_workflow":true,"ipxe":{"contents":"#!ipxe","url":"http://url/menu.ipxe"},"osie":{"kernel":"vmlinuz-x86_64"}}}]}}
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.
Turns out it was returning on the first test case with empty metadata when it should really be continue
. Can you change that for me (also update the comment)? Thanks
Line 113 in 43d76c5
if reflect.DeepEqual(&hw.Metadata, &packet.Metadata{}) { // return if metadata is empty |
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.
Done. 👍🏼
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
=======================================
Coverage 24.40% 24.40%
=======================================
Files 5 5
Lines 504 504
=======================================
Hits 123 123
Misses 359 359
Partials 22 22
Continue to review full report at Codecov.
|
9789ad3
to
eee893f
Compare
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
Signed-off-by: Gaurav Gahlot <[email protected]>
eee893f
to
cd8141b
Compare
Description
The PR fixes build issues in Hegel due to recent changes in Tink wrt to event-driven design.
For now, Hegel will continue using the old watch style with
DeprecatedWatch
.Changes wrt to the new watch stream will be done in a separate PR.
Why is this needed
The PR fixes build issues in Hegel due to recent changes in Tink wrt to event-driven design.