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

[wip] - do-not-merge - Add test PlacementTableVersionNotEventuallyIncreased #7571

Closed
wants to merge 106 commits into from
Closed
Changes from 5 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
2e298ef
WIP: Moved gRPC implementation to Universal package
ItalyPaleAle Feb 27, 2024
221e3ec
Moved APIs to separate file + error messages
ItalyPaleAle Feb 28, 2024
e9b44e9
Convert some APIs to net/http
ItalyPaleAle Feb 28, 2024
10ebb09
Converted more actor APIs
ItalyPaleAle Feb 28, 2024
9b86c85
Completed conversion of Actor APIs
ItalyPaleAle Feb 28, 2024
ff69ebe
Copyright year
ItalyPaleAle Feb 28, 2024
4d4a070
chore: convert crypto APIs to net/http
ItalyPaleAle Feb 28, 2024
5649727
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee Feb 29, 2024
f87bb8f
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee Feb 29, 2024
f03e8fa
Merge branch 'fowlerlee-7490-placement-api' of github.com:fowlerlee/d…
fowlerlee Feb 29, 2024
3d09f3a
[WIP] - do-not-merge 'fowlerlee-7490-placement-api' of github.com:fow…
fowlerlee Feb 29, 2024
1c977be
Merge branch 'fowlerlee-7490-placement-api' of github.com:fowlerlee/d…
fowlerlee Feb 29, 2024
aad43e4
Fix for issue 7576 (#7581)
gspadotto Mar 4, 2024
9e55bcc
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 4, 2024
97d1a69
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 4, 2024
1401758
dapr-bot owners request (#7592)
mikeee Mar 6, 2024
e537a86
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 6, 2024
789b25e
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 6, 2024
1421069
Update master with `release-1.13` branch (#7595)
JoshVanL Mar 6, 2024
d857658
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 6, 2024
87c7b9d
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 6, 2024
678bff0
Revert "Update master with `release-1.13` branch (#7595)" (#7598)
yaron2 Mar 6, 2024
fb779b9
Make injector resilient to sentry unavailability (#7507)
yaron2 Feb 6, 2024
117d6db
sentry retry up to 30s (#7508)
yaron2 Feb 6, 2024
f876715
Update contrib to 1.13.0-rc.3 (#7509)
yaron2 Feb 7, 2024
d9a1633
Injector: add option to add `DAPR_HOST_IP` env var to daprd (#7511)
ItalyPaleAle Feb 8, 2024
099b780
Fix state encryption regression + add integration test (#7517)
yaron2 Feb 9, 2024
3109076
Test Integration: speed up tests 10% (#7528)
JoshVanL Feb 12, 2024
d37ff6e
Revert selfhosted disk loader to not respect namespace (#7527)
JoshVanL Feb 12, 2024
3b192fb
[1.13] Add warning that Dapr state store encryption could lead to cat…
ItalyPaleAle Feb 12, 2024
21e71de
Add content-length to http channel (#7537)
yaron2 Feb 14, 2024
5c7ffe5
Updates components-contrib to 1.13.0-rc.4 (#7538)
JoshVanL Feb 14, 2024
a5cb6a3
Subscriptions: Fix panic when match rule is empty (#7539)
JoshVanL Feb 15, 2024
fe0c467
Hot Reloading: don't watch files if not enabled (#7521)
JoshVanL Feb 15, 2024
c85ecf0
Remove pubsub content-length test which has been removed from (#7550)
JoshVanL Feb 20, 2024
79c206c
Revert ApiLevel controlling vnodes back to context metadata (#7547)
elena-kolevska Feb 20, 2024
50757fe
Actor Reminders: Default JSON serialization. (#7548)
JoshVanL Feb 21, 2024
c85bf3a
Update contrib to 1.13.0-rc.6 (#7553)
yaron2 Feb 21, 2024
9aca478
Updates components-contrib to 1.13.0-rc.7 (#7562)
JoshVanL Feb 27, 2024
da2868f
update contrib to 1.13.0-rc.8 (#7567)
yaron2 Feb 28, 2024
8c84f6c
Add metadata in binding response even in case of error (#7572)
artursouza Mar 1, 2024
d79ad2d
[Release-1.13] Upgrade to contrib `v1.13.0-rc.10` (#7577)
berndverst Mar 3, 2024
198c4fe
Fix for issue 7576 (#7581) (#7587)
yaron2 Mar 4, 2024
347d78d
Adds v1.13.0 release notes (#7586)
JoshVanL Mar 5, 2024
2658881
chore: bump go to 1.21.8 and protobuf lib to 1.33.0 (#7591)
mikeee Mar 6, 2024
2c78a79
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 6, 2024
a3688ea
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 6, 2024
b0e40d2
Merge pull request #7599 from JoshVanL/update-release-1.13
yaron2 Mar 6, 2024
fd101fd
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 6, 2024
7f20be7
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 6, 2024
0379a5b
Integration tests: run in parallel (#7566)
JoshVanL Mar 7, 2024
2eb0a75
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 7, 2024
bf20002
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 7, 2024
187996b
Fix version skew for release-1.13 (#7603)
JoshVanL Mar 7, 2024
3efb50b
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 7, 2024
de71b1e
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 7, 2024
a5b0b10
Revert pipeline changes from #7591 (#7606)
ItalyPaleAle Mar 7, 2024
2a51770
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 7, 2024
21c68c5
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 7, 2024
de13d91
Operator: Add discard logger to controller manager (#7608)
JoshVanL Mar 8, 2024
7226d98
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 8, 2024
10f31a3
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 8, 2024
e1d423f
Fix daprd hotreload operator stream re-establishment causing tight lo…
JoshVanL Mar 9, 2024
04e341a
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 9, 2024
a7b082a
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 9, 2024
7c3011e
chore: fix some typos (#7614)
avoidalone Mar 11, 2024
cebd97f
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 11, 2024
ced2ecc
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 11, 2024
6c87b4b
Update protoc protobuffer transcompilers (#7585)
JoshVanL Mar 12, 2024
f62ef05
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 12, 2024
6074a13
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 12, 2024
ed56f69
Update logging of empty 200 response for pub/sub messages to indicate…
ckcd Mar 13, 2024
cc01f3e
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 13, 2024
b671fd3
Merge branch 'master' into crypto-stdlib
dapr-bot Mar 13, 2024
41e4af9
Test E2E: Update N-1 and N-2 images
JoshVanL Mar 13, 2024
d3df687
Merge pull request #7624 from JoshVanL/test-e2e-minus-1-2-image
daixiang0 Mar 20, 2024
561866c
Merge branch 'master' into crypto-stdlib
daixiang0 Mar 20, 2024
2ee40a9
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 20, 2024
c5fe927
Merge pull request #7569 from ItalyPaleAle/crypto-stdlib
daixiang0 Mar 25, 2024
1000a21
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 25, 2024
80cdd5b
Remove the legacy port 80 from the sentry service (#7084)
JoshVanL Mar 25, 2024
913b591
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 25, 2024
aa25dd9
Refactor api/errors into builders (#7588)
JoshVanL Mar 25, 2024
bb8d9a2
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 25, 2024
af204e9
Fix build
ItalyPaleAle Mar 26, 2024
075e90e
Test Integration: reserve ports in ordered blocks (#7623)
JoshVanL Mar 26, 2024
1115ece
Integration Test: Add link to talk about integration tests (#7590)
JoshVanL Mar 26, 2024
7952de3
Runtime Manifest Loader Refactor (#7579)
JoshVanL Mar 26, 2024
6ac9a6f
Always tick renewal check every minute (#7565)
JoshVanL Mar 26, 2024
7dda33a
Integration Tests: Adds injector binary (#7520)
JoshVanL Mar 26, 2024
1d084c7
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 26, 2024
5aeb280
Test Integration: fix free-ports in injector process (#7651)
JoshVanL Mar 26, 2024
54a53de
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 26, 2024
b1959bd
chore: update the go-sdk validation workflow (#7650)
mikeee Mar 26, 2024
7479c0f
Merge branch 'master' into universal-actors-reminders
dapr-bot Mar 26, 2024
7b881a7
Merge pull request #7568 from ItalyPaleAle/universal-actors-reminders
JoshVanL Mar 26, 2024
9723f55
Removes legacy SPIFFE TLS clients and servers in favour of the new SP…
JoshVanL Mar 26, 2024
353fef6
Pubsub: Execute in-flight subscribed messages in background context. …
JoshVanL Mar 28, 2024
892acfb
Fix incorrect content-length being sent to HTTP published message (#7…
JoshVanL Mar 28, 2024
37bfe27
Test Integration: hardcode binary tmp for darwin (#7664)
JoshVanL Apr 1, 2024
094b28c
add error handling for placement api to apiErrors
fowlerlee Apr 2, 2024
e0f5424
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee Feb 29, 2024
3faa84b
add error handling for placement api to apiErrors
fowlerlee Apr 2, 2024
0279918
add space to suffix comment for the format check
fowlerlee Apr 2, 2024
683c7c4
fix the merge error
fowlerlee Apr 2, 2024
8895d92
add correct formatting and fix typos in strings
fowlerlee Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions pkg/api/errors/placement.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Copyright 2023 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package errors

import (
"fmt"
"net/http"
"strconv"

"google.golang.org/grpc/codes"

kiterrors "github.com/dapr/kit/errors"
)

func PlacementTableVersionNotEventuallyIncreased(tableVersion int, msg string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @fowlerlee - so you'll want to call this func in place of where the relevant err is thrown. Here is a direct example of me doing that for the pubsub api, but youll need to find where this error is thrown in dapr and do the same thing. You'll want to pass in all relevant err details like maybe the appID (which you can typically find off the universal struct) and any other metadata that may be relevant to a user. Specifically, for the kiterrors code - you'll need to open a PR to dapr/kit to add the placement kiterrors.CodePrefixPlacement similar to this PR. Then you'll want to use that kit error prefix for the .WithErrorInfo().

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cicoyle : I added the error handling to this PR, and fixed some typos I had that were not conforming to the format tests. The issue still requires integration tests, but I'm not certain the form that these should take, since many already exist? I also 'git rebase' to get the master into the feature branch, hence the many commits from the master to this issue PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return kiterrors.NewBuilder(
codes.InvalidArgument,
http.StatusExpectationFailed,
fmt.Sprintf("placement table %s increase failed: %s", strconv.Itoa(tableVersion), msg), msg,
).WithErrorInfo(kiterrors.CodePostfixQueryFailed, nil).
WithResourceInfo("table version", strconv.Itoa(tableVersion), "", "").
Build()
}