Skip to content

Commit

Permalink
Add ctx to data tags read call
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgajard committed Apr 26, 2024
1 parent ebc4793 commit 206f1a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pagerdutyplugin/data_source_pagerduty_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ func (d *dataSourceTag) Read(ctx context.Context, req datasource.ReadRequest, re

var tags []*pagerduty.Tag
err := retry.RetryContext(ctx, 2*time.Minute, func() *retry.RetryError {
list, err := d.client.ListTags(pagerduty.ListTagOptions{Query: searchTag})
list, err := d.client.ListTagsPaginated(ctx, pagerduty.ListTagOptions{Query: searchTag, Limit: 100})
if err != nil {
if util.IsBadRequestError(err) {
return retry.NonRetryableError(err)
}
return retry.RetryableError(err)
}
tags = list.Tags
tags = list
return nil
})
if err != nil {
Expand Down

0 comments on commit 206f1a6

Please sign in to comment.