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

bug: no children found on probelab root issue #366

Closed
SgtPooki opened this issue May 11, 2023 · 5 comments · Fixed by #367
Closed

bug: no children found on probelab root issue #366

SgtPooki opened this issue May 11, 2023 · 5 comments · Fixed by #367
Assignees

Comments

@SgtPooki
Copy link
Contributor

SgtPooki commented May 11, 2023

prod link: https://starmap.site/roadmap/github.com/protocol/probelab/issues/1#simple

issue link: probe-lab/roadmap#1

image

Reported in slack: https://filecoinproject.slack.com/archives/C0418TBQ9CH/p1683799557680159

@SgtPooki
Copy link
Contributor Author

reproducible locally:

Error: No children found, is this a root issue?
    at handler (webpack-internal:///(api)/./pages/api/roadmap.ts:71:17)
    at async Object.apiResolver (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/api-utils/node.js:366:9)
    at async DevServer.runApi (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/next-server.js:481:9)
    at async Object.fn (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/next-server.js:741:37)
    at async Router.execute (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/router.js:252:36)
    at async DevServer.run (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/base-server.js:365:29)
    at async DevServer.run (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/dev/next-dev-server.js:709:20)
    at async DevServer.handleRequest (/Users/sgtpooki/code/work/protocol.ai/pln-planning-tools/Starmaps/node_modules/next/dist/server/base-server.js:303:20)

@SgtPooki
Copy link
Contributor Author

raw issue.ts response:

{
  "html_url": "https://github.com/protocol/probelab/issues/1",
  "title": "ProbeLab 2023 Roadmap",
  "state": "open",
  "node_id": "I_kwDOIgBDrc5XRnDu",
  "body_html": "<p dir=\"auto\">Title: ProbeLab 2023 Roadmap</p>\n<p dir=\"auto\">Children:</p>\n<ul dir=\"auto\">\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464239539\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/2\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/2/hovercard\" href=\"https://github.com/protocol/probelab/issues/2\">#2</a> - 2022-12-31</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464247542\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/3\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/3/hovercard\" href=\"https://github.com/protocol/probelab/issues/3\">#3</a> - 2023-02-24</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464250751\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/4\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/4/hovercard\" href=\"https://github.com/protocol/probelab/issues/4\">#4</a> - 2023-03-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464251881\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/5\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/5/hovercard\" href=\"https://github.com/protocol/probelab/issues/5\">#5</a> - 2023-03-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464259109\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/6\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/6/hovercard\" href=\"https://github.com/protocol/probelab/issues/6\">#6</a> - 2023-04-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464261197\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/7\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/7/hovercard\" href=\"https://github.com/protocol/probelab/issues/7\">#7</a> - 2023-05-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464262270\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/8\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/8/hovercard\" href=\"https://github.com/protocol/probelab/issues/8\">#8</a> - 2023-06-30</li>\n<li><a class=\"issue-link js-issue-link\" data-error-text=\"Failed to load title\" data-id=\"1464263215\" data-permission-text=\"Title is private\" data-url=\"https://github.com/protocol/probelab/issues/9\" data-hovercard-type=\"issue\" data-hovercard-url=\"/protocol/probelab/issues/9/hovercard\" href=\"https://github.com/protocol/probelab/issues/9\">#9</a> - 2023-09-30</li>\n</ul>",
  "body": "Title: ProbeLab 2023 Roadmap\r\n\r\nChildren:\r\n- https://github.com/protocol/probelab/issues/2 - 2022-12-31\r\n- https://github.com/protocol/probelab/issues/3 - 2023-02-24\r\n- https://github.com/protocol/probelab/issues/4 - 2023-03-30\r\n- https://github.com/protocol/probelab/issues/5 - 2023-03-30\r\n- https://github.com/protocol/probelab/issues/6 - 2023-04-30\r\n- https://github.com/protocol/probelab/issues/7 - 2023-05-30\r\n- https://github.com/protocol/probelab/issues/8 - 2023-06-30\r\n- https://github.com/protocol/probelab/issues/9 - 2023-09-30",
  "labels": [
    "starmaps"
  ],
  "description": ""
}

@AlexxNica
Copy link
Collaborator

@SgtPooki could it be that the parser is trying to look for children under the Title: from the issue's body instead of Children: from probe-lab/roadmap#1?

@SgtPooki
Copy link
Contributor Author

It seems like the post-fixed dates are the problem:

const lines = getCleanedSectionLines(issue.body, /children:/i).map(splitAndGetLastItem).filter(Boolean);

is returning

lines:  [
        '2022-12-31',
        '2023-02-24',
        '2023-03-30',
        '2023-03-30',
        '2023-04-30',
        '2023-05-30',
        '2023-06-30',
        '2023-09-30'
      ]

@SgtPooki
Copy link
Contributor Author

SgtPooki commented May 11, 2023

the PR with fix is out at #367, please check the vercel preview link and test that this is working as expected :)

@github-project-automation github-project-automation bot moved this to Needs Grooming in IPFS-GUI (PL EngRes) May 12, 2023
SgtPooki added a commit that referenced this issue May 12, 2023
* test: create test for issue #366

* fix: allow arbitrary data around children links

fixes #366

* fix: split lines by groups of spaces

Co-authored-by: Nishant Arora <[email protected]>

* fix: s/filter/find/ for getGithubLinkFromLine

---------

Co-authored-by: Nishant Arora <[email protected]>
@github-project-automation github-project-automation bot moved this from Needs Grooming to Done in IPFS-GUI (PL EngRes) May 12, 2023
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 a pull request may close this issue.

2 participants