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

Sentry reports on Multiple Reloads of Governance Actions Page #2446

Closed
sentry-io bot opened this issue Nov 29, 2024 · 2 comments · Fixed by #2483 or #2512
Closed

Sentry reports on Multiple Reloads of Governance Actions Page #2446

sentry-io bot opened this issue Nov 29, 2024 · 2 comments · Fixed by #2483 or #2512
Assignees
Labels

Comments

@sentry-io
Copy link

sentry-io bot commented Nov 29, 2024

Context

  • The system throws an exception user error (mzero) during a GET request to governance action list while handling concurrent fetches triggered by page reloads.

Sentry Issue: GOVTOOL-BACKEND-J3

Exception user error (mzero) while handling request Request {requestMethod = "GET", httpVersion = HTTP/1.1, rawPathInfo = "/proposal/list", rawQueryString = "?page=0&pageSize=7&type[]=ParameterChange", requestHeaders = [("Host","dev-sanchonet.govtool.byron.network"),("User-Agent","Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"),("Accept","application/json, text/plain, */*"),("Accept-Encoding","gzip, deflate, br, zstd"),("Accept-Language","en,en-GB;q=0.9,en-US;q=0.8"),("Authorization","Basic Z292dG9vbDpBOEZ4RE1ud0dvY0RlS1FS"),("Cookie","_ga=GA1.1.1789033277.1724837231; ajs_anonymous_id=%2295851626-6b6d-42ce-a52b-0dda5afa3b62%22; _pk_id.1.444d=e800422ca3c50774.1732858397.; _ga_HEZ7H5YRZC=GS1.1.1732883354.83.1.1732885659.0.0.0"),("Priority","u=1, i"),("Referer","https://dev-sanchonet.govtool.byron.network/governance_actions"),("Sec-Ch-Ua","\"Google Chrome\";v=\"131\", \"Chromium\";v=\"131\", \"Not_A Brand\";v=\"24\""),("Sec-Ch-Ua-Mobile","?0"),("Sec-Ch-Ua-Platform","\"Linux\""),("Sec-Fetch-Dest","empty"),("Sec-Fetch-Mode","cors"),("Sec-Fetch-Site","same-origin"),("X-Forwarded-For","113.199.224.235"),("X-Forwarded-Host","dev-sanchonet.govtool.byron.network"),("X-Forwarded-Port","443"),("X-Forwarded-Prefix","/api"),("X-Forwarded-Proto","https"),("X-Forwarded-Server","1bc69d9655d0"),("X-Real-Ip","113.199.224.235")], isSecure = False, remoteHost = 172.20.0.3:57170, pathInfo = ["proposal","list"], queryString = [("page",Just "0"),("pageSize",Just "7"),("type[]",Just "ParameterChange")], requestBody = <IO ByteString>, vault = <Vault>, requestBodyLength = KnownLength 0, requestHeaderHost = Just "dev-sanchonet.govtool.byron.network", requestHeaderRange = Nothing}

Steps to Reproduce

  1. Navigate to the Governance Actions page.
  2. Reload the page while the proposal list is still in the loading (fetching) state.
  3. Observe that the error is logged in Sentry during subsequent API requests.

https://www.loom.com/share/5b90454607734bafa7f68aa2040afe51?sid=ba070593-0712-459c-b8ae-bae692f73da3

@sentry-io sentry-io bot added the Sentry label Nov 29, 2024
@MSzalowski MSzalowski self-assigned this Dec 2, 2024
@bosko-m bosko-m moved this to To do in Govtool all Dec 2, 2024
@MSzalowski MSzalowski moved this from To do to In progress in Govtool all Dec 4, 2024
@placek
Copy link
Contributor

placek commented Dec 4, 2024

The function listProposals is responsible for fetching and returning a paginated list of proposals with filtering and sorting applied. The error user error (mzero) could arise here if certain conditions aren't properly accounted for or if there are unexpected behaviors in intermediate computations. Below are potential areas to debug and resolve the issue:

  1. Empty or missing Data:

If getVotes, cacheRequest, or Proposal.listProposals return unexpected Nothing or invalid data, downstream operations could fail.

  1. Improper pagination:

If page or pageSize result in an invalid range (e.g., take or drop operating on an empty list), mzero could be triggered in computations expecting non-empty results.

  1. My guess: Unhandled MonadFailures:

Operations like list lookups, mapping, or pattern matching in mapSortAndFilterProposals or filter may implicitly use MonadFail, leading to mzero when assumptions are violated.

@MSzalowski MSzalowski linked a pull request Dec 6, 2024 that will close this issue
5 tasks
@MSzalowski MSzalowski moved this from In progress to In review in Govtool all Dec 6, 2024
MSzalowski added a commit that referenced this issue Dec 9, 2024
…-multiple-reloads-of-governance-actions-page

fix(#2446): fix mzero on multiple reloads of Governance Actions
@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all Dec 9, 2024
Copy link
Author

sentry-io bot commented Dec 11, 2024

@bosko-m bosko-m reopened this Dec 11, 2024
@bosko-m bosko-m moved this from Done to To do in Govtool all Dec 11, 2024
@bosko-m bosko-m moved this from Done to Todo in Governance Tools Community Backlog Dec 11, 2024
@MSzalowski MSzalowski linked a pull request Dec 12, 2024 that will close this issue
5 tasks
@MSzalowski MSzalowski moved this from To do to In review in Govtool all Dec 12, 2024
MSzalowski added a commit that referenced this issue Dec 12, 2024
…-multiple-reloads-of-governance-actions-page

fix(#2446): fix mzero parsing error on /proposal/list
@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all Dec 12, 2024
MSzalowski added a commit that referenced this issue Dec 12, 2024
fix(#2446): fix mzero parsing error on /proposal/list
MSzalowski added a commit that referenced this issue Dec 12, 2024
fix(#2446): fix mzero parsing error on /proposal/list
MSzalowski added a commit that referenced this issue Dec 12, 2024
fix(#2446): fix mzero parsing error on /proposal/list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment