Skip to content

feat: Fix Deployment DAUs to work with local timezones #7647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 30, 2023
Merged
Prev Previous commit
Next Next commit
make gen
  • Loading branch information
Emyrk committed May 23, 2023
commit 448d5fbc94c08b5ff92b62232894cf7f5714c0a2
40 changes: 16 additions & 24 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 16 additions & 24 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/database/querier.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion coderd/database/queries.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion coderd/metricscache/metrics_internal_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package metricscache

import (
"github.com/stretchr/testify/require"
"testing"

"github.com/stretchr/testify/require"
)

func TestClosest(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion coderd/metricscache/metricscache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"context"
"database/sql"
"fmt"
"golang.org/x/xerrors"
"math"
"sync"
"sync/atomic"
"time"

"golang.org/x/xerrors"

"golang.org/x/exp/maps"
"golang.org/x/exp/slices"

Expand Down
9 changes: 5 additions & 4 deletions docs/api/insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ curl -X GET http://coder-server:8080/api/v2/insights/daus \
"amount": 0,
"date": "2019-08-24T14:15:22Z"
}
]
],
"tz_hour_offset": 0
}
```

### Responses

| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DeploymentDAUsResponse](schemas.md#codersdkdeploymentdausresponse) |
| Status | Meaning | Description | Schema |
| ------ | ------------------------------------------------------- | ----------- | -------------------------------------------------------- |
| 200 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | OK | [codersdk.DAUsResponse](schemas.md#codersdkdausresponse) |

To perform this operation, you must be authenticated. [Learn more](authentication.md).
Loading