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

Do not set operation state to failed if we get a 409 - leave unchanged #1361

Merged
merged 11 commits into from
Jul 5, 2023

Conversation

peterbroadhurst
Copy link
Contributor

In PR chain with #1342 - where the build failed, and the logs showed we'd now successfully got a 409 after FFTM update in hyperledger/firefly-transaction-manager#85, but then had gone on within the operation updater to set the operation to failed:

[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.334Z]  INFO Executing token_transfer operation fc1bed3c-cf0a-49c6-93ca-53bc84b0816f via handler AssetManager httpreq=Lzru5k4n pid=1 req=UQydjKKy
[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.334Z] DEBUG ==> POST http://tokens_1_0:3000/api/v1/transfer breq=l0uT1OYU pid=1 proto=fftokens
[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.342Z] ERROR <== POST http://tokens_1_0:3000/api/v1/transfer [409] (7.97ms) breq=l0uT1OYU pid=1 proto=fftokens
[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.342Z] DEBUG fftokens updating operation default:fc1bed3c-cf0a-49c6-93ca-53bc84b0816f status=Failed error=FF10457: Conflict from tokens service: Conflict: FF21065: ID 'default:fc1bed3c-cf0a-49c6-93ca-53bc84b0816f' is not unique ns=default pid=1
[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.342Z] DEBUG Submitting operation update id=fc1bed3c-cf0a-49c6-93ca-53bc84b0816f status=Failed blockchainTX= worker=opu_003 ns=default pid=1
[36;1mfirefly_core_1_1  |[0m [2023-07-03T20:25:06.342Z]  INFO <-- POST /api/v1/namespaces/default/tokens/transfers [409] (14.28ms): FF10457: Conflict from tokens service: Conflict: FF21065: ID 'default:fc1bed3c-cf0a-49c6-93ca-53bc84b0816f' is not unique httpreq=Lzru5k4n pid=1 req=UQydjKKy

peterbroadhurst and others added 10 commits June 13, 2023 18:17
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
…exible.

Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
Signed-off-by: Nicko Guyer <nicko.guyer@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
…rrency

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
…nged

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Jul 4, 2023

Codecov Report

Merging #1361 (b1c2dc9) into main (bb13408) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1361   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         314      314           
  Lines       21500    21519   +19     
=======================================
+ Hits        21498    21517   +19     
  Misses          1        1           
  Partials        1        1           
Impacted Files Coverage Δ
internal/blockchain/common/common.go 100.00% <100.00%> (ø)
internal/blockchain/ethereum/ethereum.go 100.00% <100.00%> (ø)
internal/blockchain/fabric/fabric.go 100.00% <100.00%> (ø)
internal/database/postgres/postgres.go 100.00% <100.00%> (ø)
internal/operations/manager.go 100.00% <100.00%> (ø)
internal/tokens/fftokens/fftokens.go 100.00% <100.00%> (ø)

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Copy link
Contributor

@nguyer nguyer left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks!

@nguyer nguyer merged commit 0631826 into main Jul 5, 2023
14 checks passed
@nguyer nguyer deleted the tokens-409 branch July 5, 2023 12:20
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.

None yet

3 participants