moodle / moodle/devdocs

[repo] Problem with Push migated pages to Wikimedia GHA

Open
#991 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted repo
Dominant language
TypeScript
Stars
74
Forks
652
Avg merge
2d 50m
Merged PRs (30d)
12

Description

What is the issue that you're experiencing?

After merging https://github.com/moodle/devdocs/pull/200, the Push migated pages to Wikimedia GHA started failing: https://github.com/moodle/devdocs/actions/runs/8827507626/job/24247452474#logs with the following error:

info: Starting update of migrated pages in remote site
/home/runner/work/devdocs/devdocs/scripts/utils.js:63
    articleData.newDocIds = Array.from(articleData.data.matchAll(docRegexp))
                                                        ^

TypeError: Cannot read properties of undefined (reading 'matchAll')
    at /home/runner/work/devdocs/devdocs/scripts/utils.js:63:57
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /home/runner/work/devdocs/devdocs/scripts/utils.js:322:33
    at async Command.<anonymous> (/home/runner/work/devdocs/devdocs/scripts/wikimedia-sync.js:67:9)

That's probably related to the fact that this page was migrated into an existing page and now /general/community/contribute.md has a duplicated entry in migratedPages.yml.

Are you able to provide a patch for this?

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing Wikimedia workflow run and inspect scripts/utils.js at line 63, then follow its call from scripts/wikimedia-sync.js at line 67. Check migratedPages.yml, especially the duplicated /general/community/contribute.md entry, and verify that the migration data is defined and the workflow completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.