Recent merge broke downstream projects
orlangure opened this issue · 8 comments
#1071 which was supposed to fix downstream broke it again:
../../../contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go:257:5:
cannot use exmplr.Attachments (type metricdata.Attachments) as type map[string]string in field value
It continues the story of breaking downstream by #1067 and fixing it by census-ecosystem/opencensus-go-exporter-ocagent#49.
Apologies I forgot to mention if you're using Go modules, this kind of issues can be avoided by using a released version in go.mod
:
require (
contrib.go.opencensus.io/exporter/ocagent v0.4.7
go.opencensus.io v0.19.2
...
)
Generally speaking we use master
as a dev branch instead of a release branch.
@songy23, unfortunately in our case this package is not our direct dependency, so we can't actually lock it down.
I see, thanks for the explanation. Assume it's Azure Go SDK, I saw there's an issue on supporting Go modules in Azure/azure-sdk-for-go#2993, hopefully it can help with the dependency issues once it's added.
Can confirm that v0.4.8 doesn't work with the Azure Autorest, and using v0.4.7 in our go.mod file works.
@songy23 may I ask why you use master as a dev branch?
Kind of a convention - we've been used to using master for dev, and creating separate release branches or tags for release. @rghetia mentioned we could consider using a dedicated dev branch for development and use master for releases instead, though I'm not sure if that's the best practice in Go.
once go module is adopted this should not be a problem.
Switching to dev branch will not solve the problem as you can still bring the breaking change from dev to master.
We use Go modules with our codebase, and yes theoretically it shouldn't be an issue as long as the dependency was added when a stable build was checked in. If you were to import the Azure Autorest package today, however, it wouldn't work due to a broken master branch.
While @rghetia is right, the code deployed this morning to the exporter doesn't even compile.