Skip to content

Commit

Permalink
Merge pull request #30 from opencost/atm/restructure-testharness
Browse files Browse the repository at this point in the history
us PAT to commit
  • Loading branch information
ameijer authored Oct 3, 2024
2 parents 5585492 + 0af7673 commit 8fdf92a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/update-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
update-manifest:
runs-on: ubuntu-latest
steps:
- name: echo actor
run: echo "actor is ${{ github.actor }}"
- uses: actions/checkout@v4
with:
path: ./
Expand All @@ -31,6 +33,7 @@ jobs:
commit: --signoff
message: 'update manifest'
author_name: 'opencost-plugin-bot'
github_token: ${{ secrets.GH_PAT }}



Expand Down
6 changes: 5 additions & 1 deletion pkg/plugins/datadog/cmd/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ func (d *DatadogCostSource) getDDCostsForWindow(window opencost.Window, listPric
if err != nil {
log.Errorf("Error when calling `UsageMeteringApi.GetHourlyUsage`: %v\n", err)
log.Errorf("Full HTTP response: %v\n", r)
ccResp.Errors = append(ccResp.Errors, err.Error())
}

if err == nil {
Expand All @@ -178,6 +177,11 @@ func (d *DatadogCostSource) getDDCostsForWindow(window opencost.Window, listPric

}

if err != nil {
log.Errorf("after calling `UsageMeteringApi.GetHourlyUsage` %d times, still getting error: %v\n", maxTries, err)
ccResp.Errors = append(ccResp.Errors, err.Error())
}

for index := range resp.Data {
// each of these entries gives hourly data steps
for indexMeas := range resp.Data[index].Attributes.Measurements {
Expand Down

0 comments on commit 8fdf92a

Please sign in to comment.