Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[DEVOPS-1063] improve error message when a worker throws #3664

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

cleverca22
Copy link
Contributor

@cleverca22 cleverca22 commented Sep 25, 2018

(cherry picked from commit 3243271)
without these changes, you get:
[cardano-sl.reporter:Error:ThreadId 627] [2018-09-25 18:16:53.23 UTC] Reporting error with reason "Worker/plugin with logger name "*production*" failed with exception: state-wallet-mainnet-staging/tls/server/server.crt: openBinaryFile: does not exist (No such file or directory){ nodeIps: '[]', peers: 'OutboundQ internal state '{Peers {peersRoutes = Routes {_routesCore = [], _routesRelay = [], _routesEdge = []}, peersClassification = fromList []}}'' }"
with the changes, you get:
[cardano-sl.reporter:Error:ThreadId 627] [2018-09-25 18:16:53.23 UTC] Reporting error with reason "Worker/plugin with work name "doc worker" and logger name "*production*" failed with exception: state-wallet-mainnet-staging/tls/server/server.crt: openBinaryFile: does not exist (No such file or directory){ nodeIps: '[]', peers: 'OutboundQ internal state '{Peers {peersRoutes = Routes {_routesCore = [], _routesRelay = [], _routesEdge = []}, peersClassification = fromList []}}'' }"

it adds work name "doc worker" and now you know where to even look for a problem

Description

Linked issue

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

Screenshots (if available)

Copy link
Contributor

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

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

Let's use Text instead of String. Otherwise this looks good!

@KtorZ
Copy link
Contributor

KtorZ commented Sep 26, 2018

Let's squash those commits upon merging. We don't want to solve 4 times the same conflict when merging :)

, useStackBinaries ? false
# one of "nix", "stack" or "path"
, binaryMethod ? "nix"
, forceDontCheck ? false
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

an unrelated change that got partially polled in by the cherry-pick, i could remove it from this PR

Copy link
Contributor

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

Not sure about the nix changes going on there?
They don't seem related to the workers change so I'd rather have them in a separated PR.

Also, a minor change on moving to add the plugin's name for readability. CI isn't cheap though so I might simply move them as part of another PR,,,

forever $ liftIO $ do
newUpdate <- WalletLayer.waitForUpdate w
logInfo "A new update was found!"
WalletLayer.addUpdate w . cpsSoftwareVersion $ newUpdate
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather have left this file untouched and simply add the workers' names when actually passing the "Plugin" in

https://github.com/input-output-hk/cardano-sl/blob/develop/wallet-new/src/Cardano/Wallet/Action.hs#L84-L105

(same for the Legacy ones, even though less important since they'll be removed soon enough)

Copy link
Contributor

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@cleverca22 cleverca22 merged commit e73ed4d into develop Sep 27, 2018
@cleverca22 cleverca22 deleted the devops-1063 branch September 27, 2018 19:58
KtorZ pushed a commit that referenced this pull request Nov 9, 2018
[DEVOPS-1063] improve error message when a worker throws
KtorZ pushed a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
…hk/devops-1063

[DEVOPS-1063] improve error message when a worker throws
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants