Skip to content
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

Upgrade go-amqp to v1.3.0 #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jeolted
Copy link

@jeolted jeolted commented Feb 2, 2025

Upgraded go-amqp dependency to v1.3.0. The changes since v1.0.1 are mostly
added features.

Fixed some tests that were failing. The end to end tests still fails on
DeviceToCloud tests. This has been failing for a long time already.

Upgraded go-amqp dependency to v1.3.0. The changes since v1.0.1 are mostly
added features.

Fixed some tests that were failing. The end to end tests still fails on
DeviceToCloud tests. This has been failing for a long time already.
@jeolted
Copy link
Author

jeolted commented Feb 2, 2025

I ran all the tests and everything passes except the end to end tests for device to cloud: TestEnd2End/mqtt/x509/DeviceToCloud
TestEnd2End/mqtt/sas/DeviceToCloud
TestEnd2End/mqtt-ws/x509/DeviceToCloud
TestEnd2End/mqtt-ws/sas/DeviceToCloud

These tests has been failing since at least version v0.7.0.

I could receive D2C events in iotservice if using the eventhub instead of relying on the redirect from the iothub.

Works:
go run cmd/iothub-service/main.go watch-events -ehcs $EVENTHUB_CONNECTION_STRING

Doesn't work:
go run cmd/iothub-service/main.go watch-events

The documentation in go-amqp library states that CorrelationID can be:
uint64, UUID, []byte, or string

Sending a 16 byte hex string as CorrelationId will return a UUID type.
@jeolted
Copy link
Author

jeolted commented Feb 13, 2025

I have investigated the errors in the test cases mentioned above and found that the error lies in IoT Hubs implementation (Azure/go-amqp#358).
With a temporary workaround in go-amqp I could get all the tests to pass.

$ go test -count=1 ./...
? github.com/amenzhinsky/iothub/cmd/iothub-device [no test files]
? github.com/amenzhinsky/iothub/cmd/iothub-service [no test files]
? github.com/amenzhinsky/iothub/iotdevice/iotdevicetest [no test files]
? github.com/amenzhinsky/iothub/iotdevice/transport [no test files]
ok github.com/amenzhinsky/iothub/cmd/internal 0.477s
ok github.com/amenzhinsky/iothub/common 1.256s
ok github.com/amenzhinsky/iothub/eventhub 2.365s
ok github.com/amenzhinsky/iothub/iotdevice 4.029s
ok github.com/amenzhinsky/iothub/iotdevice/transport/http 9.952s
ok github.com/amenzhinsky/iothub/iotdevice/transport/mqtt 2.797s
ok github.com/amenzhinsky/iothub/iotservice 20.579s
ok github.com/amenzhinsky/iothub/logger 2.443s
ok github.com/amenzhinsky/iothub/tests 38.116s

@amenzhinsky, would it be possible to approve the workflow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant