Skip to content

Commit

Permalink
Merge pull request #117 from drone/dron-204-restart-state-issue
Browse files Browse the repository at this point in the history
(bug) fixes issue where context is being used for waitGlobal operation
  • Loading branch information
TP Honey authored May 5, 2022
2 parents 98c1f93 + 1f886a3 commit a03cfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/google/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func New(opts ...Option) (autoscaler.Provider, error) {
func (p *provider) waitZoneOperation(ctx context.Context, name string, zone string) error {
for {
if p.rateLimiter.Allow() {
op, err := p.service.ZoneOperations.Get(p.project, zone, name).Context(ctx).Do()
op, err := p.service.ZoneOperations.Get(p.project, zone, name).Do()
if err != nil {
if gerr, ok := err.(*googleapi.Error); ok &&
gerr.Code == http.StatusNotFound {
Expand All @@ -143,7 +143,7 @@ func (p *provider) waitZoneOperation(ctx context.Context, name string, zone stri
func (p *provider) waitGlobalOperation(ctx context.Context, name string) error {
for {
if p.rateLimiter.Allow() {
op, err := p.service.GlobalOperations.Get(p.project, name).Context(ctx).Do()
op, err := p.service.GlobalOperations.Get(p.project, name).Do()
if err != nil {
return err
}
Expand Down

0 comments on commit a03cfb5

Please sign in to comment.