Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 6f17c75
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:44:00 2023 -0700

    build(deps-dev): bump @mui/x-data-grid from 6.16.1 to 6.16.2 (#3364)

    Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-data-grid) from 6.16.1 to 6.16.2.
    - [Release notes](https://github.com/mui/mui-x/releases)
    - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/mui/mui-x/commits/v6.16.2/packages/grid/x-data-grid)

    ---
    updated-dependencies:
    - dependency-name: "@mui/x-data-grid"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4affe40
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:43:03 2023 -0700

    build(deps): bump @babel/traverse from 7.22.20 to 7.23.2 (#3367)

    Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.20 to 7.23.2.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

    ---
    updated-dependencies:
    - dependency-name: "@babel/traverse"
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 1209194
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 17 08:41:19 2023 -0700

    build(deps-dev): bump @types/react-transition-group from 4.4.6 to 4.4.7 (#3363)

    Bumps [@types/react-transition-group](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-transition-group) from 4.4.6 to 4.4.7.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-transition-group)

    ---
    updated-dependencies:
    - dependency-name: "@types/react-transition-group"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 53c1c7e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 16 12:22:54 2023 -0700

    build(deps): bump google.golang.org/grpc from 1.58.2 to 1.58.3 (#3366)

    Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.58.2 to 1.58.3.
    - [Release notes](https://github.com/grpc/grpc-go/releases)
    - [Commits](grpc/grpc-go@v1.58.2...v1.58.3)

    ---
    updated-dependencies:
    - dependency-name: google.golang.org/grpc
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 48d08f2
Author: Nathaniel Caza <[email protected]>
Date:   Fri Oct 13 11:31:51 2023 -0500

    increase variance in delayminutes (#3359)

commit 4b95ef8
Author: Lakshmi2107 <[email protected]>
Date:   Fri Oct 13 20:45:00 2023 +0530

    add partial search for description (#3195)

    * add partial search for description

    * add contains func

    * escape contains search

    ---------

    Co-authored-by: Lakshmi V <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 3671734
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Oct 12 11:04:33 2023 -0500

    build(deps): bump golang.org/x/net from 0.16.0 to 0.17.0 (#3360)

    Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0.
    - [Commits](golang/net@v0.16.0...v0.17.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/net
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 190c9e5
Author: Katie Sydlik-Badgerow <[email protected]>
Date:   Wed Oct 11 16:34:07 2023 -0400

    ui/service-metrics: service metrics hooks (#3300)

    * add new hook and worker

    * clean up useServiceMetrics

    * add comments

    * use specific type as metric keys

    * update useServiceMetrics hook and add filtering

    * update search to include maintenance mode

commit 53b2e35
Author: Nathaniel Caza <[email protected]>
Date:   Wed Oct 11 14:52:30 2023 -0500

    use sqlc for user favorites (#3288)

commit 2ed8e6f
Author: Nathaniel Caza <[email protected]>
Date:   Tue Oct 10 15:47:00 2023 -0500

    dev: Update Go 1.21.3 and deps (#3356)

    * update go to 1.21.3

    * update go deps

    * make generate

    ---------

    Co-authored-by: Nathaniel Cook <[email protected]>

commit 41754c3
Author: Leya Salazar <[email protected]>
Date:   Tue Oct 10 14:23:12 2023 -0500

    Add Webhook Documentation Links to UI (#3294)

    * working on formField file

    * webhook documentation link

    * delete id from url

    * removed changes to the forms files

    * Update web/src/app/escalation-policies/PolicyStepForm.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * remove more innecesary changes from form conversion work

    * extra line web/src/app/util/NumberField.tsx

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/util/MountWatcher.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/users/UserContactMethodForm.tsx

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/Form.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/FormContainer.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/FormField.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * extra line web/src/app/forms/context.js

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * remove id

    * open in new tab

    * support linking to doc section

    * link directly to webhook section in new tab

    * fix comment

    ---------

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 47b35fc
Author: Nathaniel Cook <[email protected]>
Date:   Tue Oct 10 12:18:27 2023 -0700

    alertmetrics: show metrics up to current time, instead of start of bucket (#3345)

    * show alerts to now in graph, update tooltip label

    * show header range properly

    * update headers

    * fix title

commit 5746a5d
Author: Allen Ding <[email protected]>
Date:   Tue Oct 10 15:11:41 2023 -0400

    chore: user contactmethod sqlc (#3310)

    * convert user/contactmethod to use sqlc

    * clean up validations

    * remove unnecessary validation

    * fix bugs from smoketest

    * clean up transactions with dbtx

    * fix transaction logic

    * remove db from cmstore, update query prefixes

    * remove unecessary newstore func

    ---------

    Co-authored-by: AllenDing <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 935a72a
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Oct 10 11:44:11 2023 -0500

    Bump @apollo/client from 3.8.4 to 3.8.5 (#3352)

    Bumps [@apollo/client](https://github.com/apollographql/apollo-client) from 3.8.4 to 3.8.5.
    - [Release notes](https://github.com/apollographql/apollo-client/releases)
    - [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md)
    - [Commits](apollographql/apollo-client@v3.8.4...v3.8.5)

    ---
    updated-dependencies:
    - dependency-name: "@apollo/client"
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4c6a92c
Author: Allen Ding <[email protected]>
Date:   Tue Oct 10 12:07:45 2023 -0400

    feat: add monthly rotations UI (#3257)

    * add monthly rotation ui features

    * fix handoff summary and use new shiftLength field

    * revert unnecessary changes

    * fix hint alignment

    * update hint styling to match form helper text

    * fix ui bugs

    * fix linting

    * fix ui bugs

    * handle rel format in diff. timezone

    * fix cypress test

    * Update web/src/app/rotations/RotationForm.tsx

    Co-authored-by: Nathaniel Caza <[email protected]>

    ---------

    Co-authored-by: AllenDing <[email protected]>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 7e0a73d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 16:33:29 2023 -0500

    Bump golang.org/x/sys from 0.12.0 to 0.13.0 (#3350)

    Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.12.0 to 0.13.0.
    - [Commits](golang/sys@v0.12.0...v0.13.0)

    ---
    updated-dependencies:
    - dependency-name: golang.org/x/sys
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 8d56ab4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 15:59:37 2023 -0500

    Bump @mui/x-data-grid from 6.14.0 to 6.16.1 (#3346)

    Bumps [@mui/x-data-grid](https://github.com/mui/mui-x/tree/HEAD/packages/grid/x-data-grid) from 6.14.0 to 6.16.1.
    - [Release notes](https://github.com/mui/mui-x/releases)
    - [Changelog](https://github.com/mui/mui-x/blob/master/CHANGELOG.md)
    - [Commits](https://github.com/mui/mui-x/commits/v6.16.1/packages/grid/x-data-grid)

    ---
    updated-dependencies:
    - dependency-name: "@mui/x-data-grid"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit ca9d2bf
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 15:59:27 2023 -0500

    Bump github.com/spf13/viper from 1.16.0 to 1.17.0 (#3348)

    Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.16.0 to 1.17.0.
    - [Release notes](https://github.com/spf13/viper/releases)
    - [Commits](spf13/viper@v1.16.0...v1.17.0)

    ---
    updated-dependencies:
    - dependency-name: github.com/spf13/viper
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Nathaniel Caza <[email protected]>

commit 952279b
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 9 14:19:29 2023 -0500

    Bump @babel/core from 7.22.20 to 7.23.0 (#3354)

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.20 to 7.23.0.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.23.0/packages/babel-core)

    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit d2c1a5b
Author: Nathaniel Caza <[email protected]>
Date:   Mon Oct 9 13:45:06 2023 -0500

    fix wrong param (#3355)

commit 15a0cc5
Author: Nathaniel Caza <[email protected]>
Date:   Fri Oct 6 09:53:06 2023 -0500

    preserve line breaks in markdown (#3344)
  • Loading branch information
andrewbenington committed Oct 17, 2023
1 parent 8ccc94d commit 19b4879
Show file tree
Hide file tree
Showing 56 changed files with 1,656 additions and 523 deletions.
7 changes: 2 additions & 5 deletions app/initstores.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,7 @@ func (app *App) initStores(ctx context.Context) error {
}

if app.ContactMethodStore == nil {
app.ContactMethodStore, err = contactmethod.NewStore(ctx, app.db)
}
if err != nil {
return errors.Wrap(err, "init contact method store")
app.ContactMethodStore = &contactmethod.Store{}
}

if app.NotificationRuleStore == nil {
Expand Down Expand Up @@ -244,7 +241,7 @@ func (app *App) initStores(ctx context.Context) error {
}

if app.FavoriteStore == nil {
app.FavoriteStore, err = favorite.NewStore(ctx, app.db)
app.FavoriteStore, err = favorite.NewStore(ctx)
}
if err != nil {
return errors.Wrap(err, "init favorite store")
Expand Down
1 change: 1 addition & 0 deletions app/inittwilio.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func (app *App) initTwilio(ctx context.Context) error {
app.twilioConfig = &twilio.Config{
BaseURL: app.cfg.TwilioBaseURL,
CMStore: app.ContactMethodStore,
DB: app.db,
}

var err error
Expand Down
10 changes: 0 additions & 10 deletions dataloader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ func NewStoreLoaderWithDB[V any](
})
}

func NewStoreLoaderIntWithDB[V any](
ctx context.Context,
db gadb.DBTX,
fetchMany func(context.Context, gadb.DBTX, []int) ([]V, error),
) *Loader[int, V] {
return NewStoreLoaderInt(ctx, func(ctx context.Context, ids []int) ([]V, error) {
return fetchMany(ctx, db, ids)
})
}

type loaderConfig[K comparable, V any] struct {
FetchFunc func(context.Context, []K) ([]V, error) // FetchFunc should return resources for the provided IDs (order doesn't matter).
IDFunc func(V) K // Should return the unique ID for a given resource.
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/dockerfiles/build-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.21.1-bullseye
FROM docker.io/library/golang:1.21.3-bullseye

RUN apt-get update && apt-get install -y \
apt-transport-https \
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/dockerfiles/goalert/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/goalert/build-env:go1.21.1-postgres13 AS build
FROM docker.io/goalert/build-env:go1.21.3-postgres13 AS build
COPY / /build/
WORKDIR /build
RUN make clean bin/build/goalert-linux-amd64
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/tasks/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ outputs:
- name: bin
image_resource:
type: registry-image
source: { repository: goalert/build-env, tag: go1.21.1-postgres13 }
source: { repository: goalert/build-env, tag: go1.21.3-postgres13 }
run:
path: sh
dir: goalert
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/tasks/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ outputs:
- name: bin
image_resource:
type: registry-image
source: { repository: goalert/build-env, tag: go1.21.1-postgres13 }
source: { repository: goalert/build-env, tag: go1.21.3-postgres13 }
run:
path: sh
dir: goalert
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/tasks/scripts/codecheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$PKG_JSON_VER" != "$DOCKERFILE_VER" ]; then
fi

# assert build-env versions are identical
BUILD_ENV_VER=go1.21.1-postgres13
BUILD_ENV_VER=go1.21.3-postgres13
for file in $(find devtools -name 'Dockerfile*'); do
if ! grep -q "goalert/build-env" "$file"; then
continue
Expand Down
2 changes: 1 addition & 1 deletion devtools/ci/tasks/test-smoketest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ outputs:
- name: debug
image_resource:
type: registry-image
source: { repository: goalert/build-env, tag: go1.21.1-postgres13 }
source: { repository: goalert/build-env, tag: go1.21.3-postgres13 }
run:
path: sh
dir: goalert
Expand Down
2 changes: 1 addition & 1 deletion devtools/resetdb/datagen.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (d *datagen) NewNR(userID, cmID string) {
ID: d.UUID(),
UserID: userID,
ContactMethodID: cmID,
DelayMinutes: d.ints.Gen(60, cmID),
DelayMinutes: d.ints.Gen(600, cmID),
}
d.NotificationRules = append(d.NotificationRules, nr)
}
Expand Down
6 changes: 3 additions & 3 deletions engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (p *Engine) Receive(ctx context.Context, callbackID string, result notifica

var usr *user.User
permission.SudoContext(ctx, func(ctx context.Context) {
cm, serr := p.cfg.ContactMethodStore.FindOne(ctx, cb.ContactMethodID)
cm, serr := p.cfg.ContactMethodStore.FindOne(ctx, p.b.db, cb.ContactMethodID)
if serr != nil {
err = errors.Wrap(serr, "lookup contact method")
return
Expand Down Expand Up @@ -411,7 +411,7 @@ func (p *Engine) Start(ctx context.Context, d notification.Dest) error {

var err error
permission.SudoContext(ctx, func(ctx context.Context) {
err = p.cfg.ContactMethodStore.EnableByValue(ctx, d.Type.CMType(), d.Value)
err = p.cfg.ContactMethodStore.EnableByValue(ctx, p.b.db, d.Type.CMType(), d.Value)
})

return err
Expand All @@ -426,7 +426,7 @@ func (p *Engine) Stop(ctx context.Context, d notification.Dest) error {

var err error
permission.SudoContext(ctx, func(ctx context.Context) {
err = p.cfg.ContactMethodStore.DisableByValue(ctx, d.Type.CMType(), d.Value)
err = p.cfg.ContactMethodStore.DisableByValue(ctx, p.b.db, d.Type.CMType(), d.Value)
})

return err
Expand Down
2 changes: 1 addition & 1 deletion escalation/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var searchTemplate = template.Must(template.New("search").Funcs(search.Helpers()
AND NOT pol.id = any(:omit)
{{end}}
{{if .Search}}
AND {{orderedPrefixSearch "search" "pol.name"}}
AND ({{orderedPrefixSearch "search" "pol.name"}} OR {{contains "search" "pol.description"}})
{{end}}
{{if .After.Name}}
AND
Expand Down
Loading

0 comments on commit 19b4879

Please sign in to comment.