Skip to content
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

[BACK-2702] Add reason for setting last updated and outdated since #673

Merged
merged 28 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7c4a31b
Add reason for setting last updated and outdated since
toddkazakov Oct 19, 2023
c42af18
add more specific conditions for SetOutdated triggers
Roukoswarf Oct 20, 2023
376b05b
fix some unit tests
Roukoswarf Oct 20, 2023
c267c7f
update to ginkgo v2 and add some unit tests
Roukoswarf Oct 24, 2023
c535a59
fix build and unit tests, still incomplete testing
Roukoswarf Oct 24, 2023
dcbe1fc
fix formatting
Roukoswarf Oct 24, 2023
99d13a5
possibly fix make test
Roukoswarf Oct 24, 2023
3b67506
more test fixes
Roukoswarf Oct 24, 2023
c554a3b
travis use go 1.21 for real
Roukoswarf Oct 24, 2023
99611b2
update vendor
Roukoswarf Oct 24, 2023
8fa2e8d
more unit tests
Roukoswarf Oct 25, 2023
15dc174
more unit tests
Roukoswarf Oct 25, 2023
f407953
formatting
Roukoswarf Oct 25, 2023
4c70f63
add outdatedSinceLimit and minor bugfixes
Roukoswarf Oct 26, 2023
b5e7ec5
zero out OutdatedSinceLimit on update
Roukoswarf Oct 26, 2023
020518c
formatting
Roukoswarf Oct 26, 2023
325b5f8
update deps
Roukoswarf Oct 26, 2023
68d2f2e
cleanup for review
Roukoswarf Oct 30, 2023
be86c05
update deps
Roukoswarf Oct 30, 2023
ebded89
remove direct depend on shopify/sarama
Roukoswarf Oct 30, 2023
620a678
remove dep on github.com/pkg/errors
Roukoswarf Oct 30, 2023
d0a8aaa
remove ginkgo v1
Roukoswarf Oct 30, 2023
ce1820d
address review comments
Roukoswarf Oct 30, 2023
b7cd5cf
update unit test to handle mongodb time rounding
Roukoswarf Nov 1, 2023
bcf85e7
move DataSetsDataCreate summary logic after deduplicator
Roukoswarf Nov 1, 2023
b7b61b7
add schemamigration reason
Roukoswarf Nov 2, 2023
599f396
dont clear LastUpdatedReason on SetOutdated
Roukoswarf Nov 3, 2023
adb3cc5
Merge remote-tracking branch 'origin/master' into ehr-triggers-spike
Roukoswarf Nov 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ dist: jammy
language: go

go:
- 1.20
- 1.21.x

go_import_path: github.com/tidepool-org/platform

env:
global:
- MONGODB=6.0.8
- MONGOSH=1.10.4
- MONGODB=6.0.11
- MONGOSH=1.10.6
- DIST=jammy

before_install:
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ endif

ginkgo:
ifeq ($(shell which ginkgo),)
cd vendor/github.com/onsi/ginkgo/ginkgo && go install -mod=vendor .
cd vendor/github.com/onsi/ginkgo/v2/ginkgo && go install -mod=vendor .
endif

goimports:
Expand Down Expand Up @@ -189,28 +189,28 @@ service-restart-all:
@cd $(ROOT_DIRECTORY) && for SERVICE in migrations tools; do $(MAKE) service-restart SERVICE="$${SERVICE}"; done

test: ginkgo
@echo "ginkgo -requireSuite -slowSpecThreshold=10 -r $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo -requireSuite -slowSpecThreshold=10 -r $(TEST)
@echo "ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r $(TEST)

test-until-failure: ginkgo
@echo "ginkgo -requireSuite -slowSpecThreshold=10 -r -untilItFails $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo -requireSuite -slowSpecThreshold=10 -r -untilItFails $(TEST)
@echo "ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r -untilItFails $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r -untilItFails $(TEST)

test-watch: ginkgo
@echo "ginkgo watch -requireSuite -slowSpecThreshold=10 -r $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo watch -requireSuite -slowSpecThreshold=10 -r $(TEST)
@echo "ginkgo watch --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo watch --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r $(TEST)

ci-test: ginkgo
@echo "ginkgo -requireSuite -slowSpecThreshold=10 -r -randomizeSuites -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress -keepGoing $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo -requireSuite -slowSpecThreshold=10 --compilers=2 -r -randomizeSuites -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress -keepGoing $(TEST)
@echo "ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r --randomize-suites --randomize-all --succinct --fail-on-pending --cover --trace --race --keep-going $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s --compilers=2 -r --randomize-suites --randomize-all --succinct --fail-on-pending --cover --trace --race --keep-going $(TEST)

ci-test-until-failure: ginkgo
@echo "ginkgo -requireSuite -slowSpecThreshold=10 -r -randomizeSuites -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress -keepGoing -untilItFails $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo -requireSuite -slowSpecThreshold=10 -r -randomizeSuites -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress -keepGoing -untilItFails $(TEST)
@echo "ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r --randomize-suites --randomize-all --succinct --fail-on-pending --cover --trace --race --keep-going -untilItFails $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r --randomize-suites --randomize-all --succinct --fail-on-pending --cover --trace --race --keep-going -untilItFails $(TEST)

ci-test-watch: ginkgo
@echo "ginkgo watch -requireSuite -slowSpecThreshold=10 -r -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo watch -requireSuite -slowSpecThreshold=10 -r -randomizeAllSpecs -succinct -failOnPending -cover -trace -race -progress $(TEST)
@echo "ginkgo watch --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r --randomize-all --succinct --fail-on-pending --cover --trace --race $(TEST)"
@cd $(ROOT_DIRECTORY) && . ./env.test.sh && ginkgo watch --require-suite --poll-progress-after=10s --poll-progress-interval=20s -r --randomize-all --succinct --fail-on-pending --cover --trace --race $(TEST)

deploy: clean-deploy deploy-services deploy-migrations deploy-tools

Expand Down
2 changes: 1 addition & 1 deletion alerts/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/data/blood/glucose"
Expand Down
2 changes: 1 addition & 1 deletion apple/device_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"io/ioutil"
"net/http"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/apple"
Expand Down
2 changes: 1 addition & 1 deletion application/application_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package application_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/application"
Expand Down
2 changes: 1 addition & 1 deletion application/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/application"
Expand Down
2 changes: 1 addition & 1 deletion application/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package application_test
import (
"fmt"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/application"
Expand Down
2 changes: 1 addition & 1 deletion application/version_reporter_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package application_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/application"
Expand Down
3 changes: 1 addition & 2 deletions association/association_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package association_test
import (
"strings"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/association"
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package auth_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth"
Expand Down
2 changes: 1 addition & 1 deletion auth/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/ghttp"

Expand Down
2 changes: 1 addition & 1 deletion auth/client/external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net/http"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/ghttp"

Expand Down
3 changes: 1 addition & 2 deletions auth/provider_session_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package auth_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth"
Expand Down
3 changes: 1 addition & 2 deletions auth/restricted_token_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package auth_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth"
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/router_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth/service/api"
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/status_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"

"github.com/ant0ine/go-json-rest/rest"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth/service"
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/v1/oauth_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("OAuth", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/v1/provider_session_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("ProviderSession", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/v1/restricted_token_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("RestrictedToken", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/service/api/v1/router_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

authServiceApiV1 "github.com/tidepool-org/platform/auth/service/api/v1"
Expand Down
2 changes: 1 addition & 1 deletion auth/service/service/client_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package service_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("Client", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/service/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

eventsTest "github.com/tidepool-org/platform/events/test"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/ghttp"

Expand Down
2 changes: 1 addition & 1 deletion auth/store/mongo/provider_session_repository_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mongo_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("ProviderSessionRepository", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/store/mongo/restricted_token_repository_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package mongo_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
)

var _ = Describe("RestrictedTokenRepository", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/store/mongo/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mongo_test
import (
"context"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth/store"
Expand Down
3 changes: 1 addition & 2 deletions auth/user_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package auth_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/auth"
Expand Down
2 changes: 1 addition & 1 deletion aws/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package api_test
import (
awsSdkGoAwsSession "github.com/aws/aws-sdk-go/aws/session"
awsSdkGoServiceS3 "github.com/aws/aws-sdk-go/service/s3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/aws"
Expand Down
2 changes: 1 addition & 1 deletion aws/aws_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package aws_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/aws"
Expand Down
3 changes: 1 addition & 2 deletions blob/blob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import (
"net/url"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/tidepool-org/platform/blob"
Expand Down
2 changes: 1 addition & 1 deletion blob/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/url"
"strconv"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/ghttp"

Expand Down
3 changes: 1 addition & 2 deletions blob/errors_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package blob_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"

"github.com/tidepool-org/platform/blob"
errorsTest "github.com/tidepool-org/platform/errors/test"
Expand Down
2 changes: 1 addition & 1 deletion blob/service/api/v1/v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/tidepool-org/platform/permission"

"github.com/ant0ine/go-json-rest/rest"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"

Expand Down
Loading