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

Fix Documention Workflow - Talawa-Admin #1279

Closed
palisadoes opened this issue Dec 25, 2023 · 7 comments
Closed

Fix Documention Workflow - Talawa-Admin #1279

palisadoes opened this issue Dec 25, 2023 · 7 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Dec 25, 2023

Bug Description

Our automated documentation GitHub action PUSH workflow is failing.

Under normal operation it:

  1. Uses the typedoc package to generate documentation
  2. Commits any newly changed documentation files to a dedicated documentation directory
  3. Copies these files to the Talawa-Docs repository

This process has recently started to fail for both Talawa-API and Talawa Admin.

  1. We are not sure why and it needs to fixed.
  2. The workflows help our developers understand the codebase through easily indexed HTML on the docs.talawa.io site

The push workflow files in question are:

Part of the troubleshooting difficulty is that:

  1. The two workflows use different package managers (NPX vs Yarn)
  2. One workflow uses package caching, while the other doesn’t
  3. We are uncertain whether there is an underlying GitHub secret misconfiguration, possibly an expiry.
  4. The files produced by the API workflow are compatible, but the Admin files are not. We don't know why. It could be because the API workflow broke before that of Admin, or vice versa.

To complicate matters, we also recently upgraded Talawa-Docs to Docusaurus v3 as the previous version has been deprecated.

  1. Version 3 uses the new MPX standard for markdown files where all <, >, { and } characters need to be escaped with a \ character.
  2. More details can be found here https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3

We need the markdown files generated by typedoc to be MPX compatible.

Related difficulties

The non MPX compatible files are causing our Talawa-Docs PRs and pushes to fail. This means that it is difficult for us to update our GSoC ideas page. We have to manually do search and replacement of the incompatible characters.

Requirements

These are the requirements to fix this issue

  1. Get one workflow working
  2. Get the other workflow working using the package manager of the first workflow
  3. Standardize on a caching mechanism, or none
  4. Ideally, use identical standardized workflows with environment variables to differentiate between the repos where necessary
  5. The markdown files generated must be MPX compatible using the npx docusaurus-mdx-checker command. This may mean finding a typedoc parameter to make the output markdown files MPX compatible or writing a script to do a search and replace operation in the API and Admin documentation directory tree to fix the issue.
  6. Create a markdown document describing how the fixed workflow works, including any GitHub configuration parameters, so that our team can use it as a reference. This should be added to Talawa Docs. Please coordinate this activity with the members below.

Issue assignment

  1. We greatly prefer a single person working on the equivalent issue in both repositories. Who ever gets assigned to the issue below must ask to be assigned to this one.
  2. This means we will need to assign the issue to someone who currently has no assigned issues

Additional details

Please work with these contributors who have been focused on this issue for some time

  1. @anwersayeed
  2. @tasneemkoushar

Potential internship candidates

@palisadoes palisadoes added the bug Something isn't working label Dec 25, 2023
@palisadoes palisadoes self-assigned this Dec 25, 2023
@github-actions github-actions bot added documentation Improvements or additions to documentation question Further information is requested unapproved labels Dec 25, 2023
@dhiraj0911
Copy link
Contributor

I'd like to work on this

@palisadoes
Copy link
Contributor Author

  1. It appears that files are being copied from Talawa-Admin to Talawa Docs correctly. However there are files in the , but the it's working with Admin, but these files have the offending <, >, { and } characters need to be escaped with a \ character.
  2. You'll need to find a way to make sure that all the markdown files in the talawa-admin-docs/ are fixed when the markdowns are created (preferred) or after the fact.
talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md
talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md
talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md
talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md
talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md
talawa-admin-docs/modules/components_AddOn_AddOn.default.md
talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md
talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md
talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md
talawa-admin-docs/modules/components_CheckIn_mocks.md
talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md
talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md
talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md
talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md
talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md
talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md
talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md
talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md

@palisadoes
Copy link
Contributor Author

This is affecting our ability to merge PRs in Talawa Docs. This is the most recent example.

@dhiraj0911
Copy link
Contributor

dhiraj0911 commented Dec 27, 2023

Done with all the changes

[SUCCESS] All 201 MDX files compiled successfully!

        modified:   .github/workflows/push.yml
        modified:   CODE_STYLE.md
        modified:   package-lock.json
        modified:   talawa-admin-docs/classes/components_AddOn_support_services_Plugin_helper.default.md
        modified:   talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceAttendeeCheckIn.md
        modified:   talawa-admin-docs/interfaces/components_CheckIn_types.InterfaceTableCheckIn.md
        modified:   talawa-admin-docs/interfaces/components_LeftDrawerOrg_LeftDrawerOrg.InterfaceLeftDrawerProps.md
        modified:   talawa-admin-docs/interfaces/components_LeftDrawer_LeftDrawer.InterfaceLeftDrawerProps.md
        modified:   talawa-admin-docs/modules/components_AddOn_AddOn.default.md
        modified:   talawa-admin-docs/modules/components_AddOn_core_AddOnEntry_AddOnEntry.default.md
        modified:   talawa-admin-docs/modules/components_AddOn_core_AddOnRegister_AddOnRegister.default.md
        modified:   talawa-admin-docs/modules/components_ChangeLanguageDropdown_ChangeLanguageDropDown.md
        modified:   talawa-admin-docs/modules/components_CheckIn_mocks.md
        modified:   talawa-admin-docs/modules/components_EventCalendar_EventCalendar.md
        modified:   talawa-admin-docs/modules/components_TaskModals_UpdateTaskModal.md
        modified:   talawa-admin-docs/modules/components_UserPasswordUpdate_UserPasswordUpdate.md
        modified:   talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md
        modified:   talawa-admin-docs/modules/screens_EventDashboard_EventDashboard_mocks.md
        modified:   talawa-admin-docs/modules/screens_MemberDetail_MemberDetail.md
        modified:   talawa-admin-docs/modules/screens_OrgList_OrgListMocks.md
        modified:   talawa-admin-docs/modules/screens_OrganizationDashboard_OrganizationDashboardMocks.md

@Sejal1411
Copy link

i would like to work on the open issues

@palisadoes
Copy link
Contributor Author

@dhiraj0911

  1. What's the update on this?
  2. We need to get this fixed soon.
  3. It's creating a real hardship for us.

@noman2002 @Nitya-Pasrija Please follow up on this

@dhiraj0911
Copy link
Contributor

I'm working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants