-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
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 221e3ec
Moved APIs to separate file + error messages
ItalyPaleAle e9b44e9
Convert some APIs to net/http
ItalyPaleAle 10ebb09
Converted more actor APIs
ItalyPaleAle 9b86c85
Completed conversion of Actor APIs
ItalyPaleAle ff69ebe
Copyright year
ItalyPaleAle 4d4a070
chore: convert crypto APIs to net/http
ItalyPaleAle 5649727
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee f87bb8f
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee f03e8fa
Merge branch 'fowlerlee-7490-placement-api' of github.com:fowlerlee/d…
fowlerlee 3d09f3a
[WIP] - do-not-merge 'fowlerlee-7490-placement-api' of github.com:fow…
fowlerlee 1c977be
Merge branch 'fowlerlee-7490-placement-api' of github.com:fowlerlee/d…
fowlerlee aad43e4
Fix for issue 7576 (#7581)
gspadotto 9e55bcc
Merge branch 'master' into universal-actors-reminders
dapr-bot 97d1a69
Merge branch 'master' into crypto-stdlib
dapr-bot 1401758
dapr-bot owners request (#7592)
mikeee e537a86
Merge branch 'master' into universal-actors-reminders
dapr-bot 789b25e
Merge branch 'master' into crypto-stdlib
dapr-bot 1421069
Update master with `release-1.13` branch (#7595)
JoshVanL d857658
Merge branch 'master' into universal-actors-reminders
dapr-bot 87c7b9d
Merge branch 'master' into crypto-stdlib
dapr-bot 678bff0
Revert "Update master with `release-1.13` branch (#7595)" (#7598)
yaron2 fb779b9
Make injector resilient to sentry unavailability (#7507)
yaron2 117d6db
sentry retry up to 30s (#7508)
yaron2 f876715
Update contrib to 1.13.0-rc.3 (#7509)
yaron2 d9a1633
Injector: add option to add `DAPR_HOST_IP` env var to daprd (#7511)
ItalyPaleAle 099b780
Fix state encryption regression + add integration test (#7517)
yaron2 3109076
Test Integration: speed up tests 10% (#7528)
JoshVanL d37ff6e
Revert selfhosted disk loader to not respect namespace (#7527)
JoshVanL 3b192fb
[1.13] Add warning that Dapr state store encryption could lead to cat…
ItalyPaleAle 21e71de
Add content-length to http channel (#7537)
yaron2 5c7ffe5
Updates components-contrib to 1.13.0-rc.4 (#7538)
JoshVanL a5cb6a3
Subscriptions: Fix panic when match rule is empty (#7539)
JoshVanL fe0c467
Hot Reloading: don't watch files if not enabled (#7521)
JoshVanL c85ecf0
Remove pubsub content-length test which has been removed from (#7550)
JoshVanL 79c206c
Revert ApiLevel controlling vnodes back to context metadata (#7547)
elena-kolevska 50757fe
Actor Reminders: Default JSON serialization. (#7548)
JoshVanL c85bf3a
Update contrib to 1.13.0-rc.6 (#7553)
yaron2 9aca478
Updates components-contrib to 1.13.0-rc.7 (#7562)
JoshVanL da2868f
update contrib to 1.13.0-rc.8 (#7567)
yaron2 8c84f6c
Add metadata in binding response even in case of error (#7572)
artursouza d79ad2d
[Release-1.13] Upgrade to contrib `v1.13.0-rc.10` (#7577)
berndverst 198c4fe
Fix for issue 7576 (#7581) (#7587)
yaron2 347d78d
Adds v1.13.0 release notes (#7586)
JoshVanL 2658881
chore: bump go to 1.21.8 and protobuf lib to 1.33.0 (#7591)
mikeee 2c78a79
Merge branch 'master' into universal-actors-reminders
dapr-bot a3688ea
Merge branch 'master' into crypto-stdlib
dapr-bot b0e40d2
Merge pull request #7599 from JoshVanL/update-release-1.13
yaron2 fd101fd
Merge branch 'master' into universal-actors-reminders
dapr-bot 7f20be7
Merge branch 'master' into crypto-stdlib
dapr-bot 0379a5b
Integration tests: run in parallel (#7566)
JoshVanL 2eb0a75
Merge branch 'master' into universal-actors-reminders
dapr-bot bf20002
Merge branch 'master' into crypto-stdlib
dapr-bot 187996b
Fix version skew for release-1.13 (#7603)
JoshVanL 3efb50b
Merge branch 'master' into universal-actors-reminders
dapr-bot de71b1e
Merge branch 'master' into crypto-stdlib
dapr-bot a5b0b10
Revert pipeline changes from #7591 (#7606)
ItalyPaleAle 2a51770
Merge branch 'master' into universal-actors-reminders
dapr-bot 21c68c5
Merge branch 'master' into crypto-stdlib
dapr-bot de13d91
Operator: Add discard logger to controller manager (#7608)
JoshVanL 7226d98
Merge branch 'master' into universal-actors-reminders
dapr-bot 10f31a3
Merge branch 'master' into crypto-stdlib
dapr-bot e1d423f
Fix daprd hotreload operator stream re-establishment causing tight lo…
JoshVanL 04e341a
Merge branch 'master' into universal-actors-reminders
dapr-bot a7b082a
Merge branch 'master' into crypto-stdlib
dapr-bot 7c3011e
chore: fix some typos (#7614)
avoidalone cebd97f
Merge branch 'master' into universal-actors-reminders
dapr-bot ced2ecc
Merge branch 'master' into crypto-stdlib
dapr-bot 6c87b4b
Update protoc protobuffer transcompilers (#7585)
JoshVanL f62ef05
Merge branch 'master' into universal-actors-reminders
dapr-bot 6074a13
Merge branch 'master' into crypto-stdlib
dapr-bot ed56f69
Update logging of empty 200 response for pub/sub messages to indicate…
ckcd cc01f3e
Merge branch 'master' into universal-actors-reminders
dapr-bot b671fd3
Merge branch 'master' into crypto-stdlib
dapr-bot 41e4af9
Test E2E: Update N-1 and N-2 images
JoshVanL d3df687
Merge pull request #7624 from JoshVanL/test-e2e-minus-1-2-image
daixiang0 561866c
Merge branch 'master' into crypto-stdlib
daixiang0 2ee40a9
Merge branch 'master' into universal-actors-reminders
dapr-bot c5fe927
Merge pull request #7569 from ItalyPaleAle/crypto-stdlib
daixiang0 1000a21
Merge branch 'master' into universal-actors-reminders
dapr-bot 80cdd5b
Remove the legacy port 80 from the sentry service (#7084)
JoshVanL 913b591
Merge branch 'master' into universal-actors-reminders
dapr-bot aa25dd9
Refactor api/errors into builders (#7588)
JoshVanL bb8d9a2
Merge branch 'master' into universal-actors-reminders
dapr-bot af204e9
Fix build
ItalyPaleAle 075e90e
Test Integration: reserve ports in ordered blocks (#7623)
JoshVanL 1115ece
Integration Test: Add link to talk about integration tests (#7590)
JoshVanL 7952de3
Runtime Manifest Loader Refactor (#7579)
JoshVanL 6ac9a6f
Always tick renewal check every minute (#7565)
JoshVanL 7dda33a
Integration Tests: Adds injector binary (#7520)
JoshVanL 1d084c7
Merge branch 'master' into universal-actors-reminders
dapr-bot 5aeb280
Test Integration: fix free-ports in injector process (#7651)
JoshVanL 54a53de
Merge branch 'master' into universal-actors-reminders
dapr-bot b1959bd
chore: update the go-sdk validation workflow (#7650)
mikeee 7479c0f
Merge branch 'master' into universal-actors-reminders
dapr-bot 7b881a7
Merge pull request #7568 from ItalyPaleAle/universal-actors-reminders
JoshVanL 9723f55
Removes legacy SPIFFE TLS clients and servers in favour of the new SP…
JoshVanL 353fef6
Pubsub: Execute in-flight subscribed messages in background context. …
JoshVanL 892acfb
Fix incorrect content-length being sent to HTTP published message (#7…
JoshVanL 37bfe27
Test Integration: hardcode binary tmp for darwin (#7664)
JoshVanL 094b28c
add error handling for placement api to apiErrors
fowlerlee e0f5424
[wip] - Add test PlacementTableVersionNotEventuallyIncreased
fowlerlee 3faa84b
add error handling for placement api to apiErrors
fowlerlee 0279918
add space to suffix comment for the format check
fowlerlee 683c7c4
fix the merge error
fowlerlee 8895d92
add correct formatting and fix typos in strings
fowlerlee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
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() | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 placementkiterrors.CodePrefixPlacement
similar to this PR. Then you'll want to use that kit error prefix for the.WithErrorInfo()
.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @cicoyle