Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Recent merge broke downstream projects #1073

Closed
orlangure opened this issue Mar 20, 2019 · 8 comments
Closed

Recent merge broke downstream projects #1073

orlangure opened this issue Mar 20, 2019 · 8 comments

Comments

@orlangure
Copy link

orlangure commented Mar 20, 2019

#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.

@songy23 @rghetia

@orlangure
Copy link
Author

@songy23
Copy link
Contributor

songy23 commented Mar 20, 2019

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.

@orlangure
Copy link
Author

@songy23, unfortunately in our case this package is not our direct dependency, so we can't actually lock it down.

@songy23
Copy link
Contributor

songy23 commented Mar 20, 2019

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.

@ZacJoffe
Copy link

ZacJoffe commented Mar 20, 2019

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?

@songy23
Copy link
Contributor

songy23 commented Mar 20, 2019

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.

@rghetia
Copy link
Contributor

rghetia commented Mar 20, 2019

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.

@ZacJoffe
Copy link

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.

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

No branches or pull requests

4 participants