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

Create callback returns 403 when promise already completed #502

Closed
wants to merge 1 commit into from

Conversation

dfarr
Copy link
Member

@dfarr dfarr commented Dec 19, 2024

Resolves #500

@dfarr dfarr requested a review from avillega December 19, 2024 22:43
@@ -313,7 +313,7 @@ func (d *DST) Run(r *rand.Rand, api api.API, aio aio.AIO, system *system.System)
func (d *DST) logNonLinearizable(ops []porcupine.Operation, history porcupine.LinearizationInfo) {
// log the linearizations
linearizations := history.PartialLinearizationsOperations()
util.Assert(len(linearizations) == 3, "linearizations must be equal to the number of partitions")
util.Assert(len(linearizations) == 4, "linearizations must be equal to the number of partitions")
Copy link
Member Author

Choose a reason for hiding this comment

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

This just fixes a whoopsie that made it to main

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 53.70370% with 25 lines in your changes missing coverage. Please review.

Project coverage is 56.14%. Comparing base (cc66e51) to head (085cbe5).

Files with missing lines Patch % Lines
test/dst/validator.go 25.00% 16 Missing and 8 partials ⚠️
test/dst/dst.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #502      +/-   ##
==========================================
- Coverage   56.18%   56.14%   -0.05%     
==========================================
  Files         122      122              
  Lines       13332    13373      +41     
==========================================
+ Hits         7491     7508      +17     
- Misses       5390     5406      +16     
- Partials      451      459       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@avillega avillega left a comment

Choose a reason for hiding this comment

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

If we try to create a callback for a promise that is already completed, shouldn't we return the promise as well? That way the sdks can avoid having to do an extra request for the promise.

@dfarr
Copy link
Member Author

dfarr commented Dec 20, 2024

I totally forgot we do this so that any process creating a callback can just continue when the promise complete, duh! Will close this PR.

I discovered this "issue" when using the new callback cli. Let's just log a different message indicating "the promise is already completed" in this case.

@dfarr dfarr closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants