Bug#818417: [pkg-go] Bug#818417: prometheus: FTBFS: aws.Config does not implement client.ConfigProvider
On Sat, Mar 26, 2016 at 04:51:59PM +1100, Dmitry Smirnov wrote: > On Friday, 25 March 2016 10:46:27 AM AEDT Filippo Giunchedi wrote: > > that should be related to golang-github-aws-aws-sdk-go latest upload, the > > following patch fixes the FTBFS for me > > Just to let you know that I've uploaded new release of AWS-SDK-GO so this > patch might need another test round against latest aws-sdk... thanks Dmitry! I just built prometheus again with 1.1.14 and the patch above and it doesn't FTBFS filippo -- http://esaurito.net - 0x99D49B6B00CAD1E5 - ⠠⠵
Bug#818417: [pkg-go] Bug#818417: prometheus: FTBFS: aws.Config does not implement client.ConfigProvider
On Friday, 25 March 2016 10:46:27 AM AEDT Filippo Giunchedi wrote: > that should be related to golang-github-aws-aws-sdk-go latest upload, the > following patch fixes the FTBFS for me Just to let you know that I've uploaded new release of AWS-SDK-GO so this patch might need another test round against latest aws-sdk... -- Best wishes, Dmitry Smirnov. --- Each generation imagines itself to be more intelligent than the one that went before it, and wiser than the one that comes after it. -- George Orwell, Review of "A Coat of Many Colours: Occasional Essays" by Herbert Read, Poetry Quarterly (Winter 1945) signature.asc Description: This is a digitally signed message part.
Bug#818417: prometheus: FTBFS: aws.Config does not implement client.ConfigProvider
tags 818417 + patch thanks On Wed, Mar 16, 2016 at 03:19:08PM -0700, Martin Michlmayr wrote: > > # github.com/prometheus/prometheus/retrieval/discovery > > src/github.com/prometheus/prometheus/retrieval/discovery/ec2.go:58: > > undefined: defaults.DefaultChainCredentials > > src/github.com/prometheus/prometheus/retrieval/discovery/ec2.go:107: cannot > > use ed.aws (type *aws.Config) as type client.ConfigProvider in argument to > > ec2.New: > > *aws.Config does not implement client.ConfigProvider (missing > > ClientConfig method) that should be related to golang-github-aws-aws-sdk-go latest upload, the following patch fixes the FTBFS for me diff --git a/retrieval/discovery/ec2.go b/retrieval/discovery/ec2.go index 46b3d37..ebfd1b1 100644 --- a/retrieval/discovery/ec2.go +++ b/retrieval/discovery/ec2.go @@ -20,7 +20,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/defaults" + "github.com/aws/aws-sdk-go/aws/session" "github.com/prometheus/common/log" "github.com/prometheus/common/model" @@ -55,7 +55,7 @@ type EC2Discovery struct { func NewEC2Discovery(conf *config.EC2SDConfig) *EC2Discovery { creds := credentials.NewStaticCredentials(conf.AccessKey, conf.SecretKey, "") if conf.AccessKey == "" && conf.SecretKey == "" { - creds = defaults.DefaultChainCredentials + creds = credentials.NewEnvCredentials() } return { aws: { @@ -104,7 +104,7 @@ func (ed *EC2Discovery) Sources() []string { } func (ed *EC2Discovery) refresh() (*config.TargetGroup, error) { - ec2s := ec2.New(ed.aws) + ec2s := ec2.New(session.New(), ed.aws) tg := { Source: *ed.aws.Region, } filippo -- http://esaurito.net - 0x99D49B6B00CAD1E5 - ⠠⠵
Processed: Re: Bug#818417: prometheus: FTBFS: aws.Config does not implement client.ConfigProvider
Processing commands for cont...@bugs.debian.org: > tags 818417 + patch Bug #818417 [prometheus] prometheus: FTBFS: aws.Config does not implement client.ConfigProvider Added tag(s) patch. > thanks Stopping processing here. Please contact me if you need assistance. -- 818417: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818417 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems