generator icon indicating copy to clipboard operation
generator copied to clipboard

feat: introduce monorepo to Generator Repo

Open ayushnau opened this issue 10 months ago • 8 comments

Changes Added.

  1. Turborepo Added.
  2. Converted the generator repo to app, inside the turborepo.
  3. Added the required scripts of the turborepo to the root package.json file.

Related issue(s)

Resolves https://github.com/asyncapi/generator/issues/1044

ayushnau avatar Apr 11 '24 17:04 ayushnau

@asyncapi/bounty_team

aeworxet avatar Apr 16 '24 05:04 aeworxet

additionally:

  • update PR title to match the reality - filters are not here in first iteration
  • you have merge conflicts
  • tests are failing, I suggest running them locally and integration tests fails with Error: An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/generator/generator/./test/test-project'. No such file or directory which probably means some paths in tests also need an update
  • also regular PR testing workflow fails on installation of dependencies, like npm ci is not working with turbo 🤔

derberg avatar Apr 16 '24 07:04 derberg

Some stuff needs update because of docs related links and automation:

* doc hooks.md need update of links pointing to GH that would break, change them to relative link from website, which will be `/docs/tools/generator/api`

* workflow update-docs-in-website needs an update of link that now point to `/generator/docs/`, and probably should point to `/generator/apps/generator/docs/`
  1. in first point you mean https://github.com/asyncapi/generator/blob/master/docs/api.md to https://github.com/asyncapi/generator/blob/master/apps/generator/docs/api.md

AyushNautiyalDeveloper avatar Apr 16 '24 16:04 AyushNautiyalDeveloper

@AyushNautiyalDeveloper no, it just should be /docs/tools/generator/api as I wrote, a relative link, asyncapi.com relative - add it to asyncapi.com and you will see what I mean -> https://www.asyncapi.com/docs/tools/generator/api

links in docs do not have to work in github in markdown, they need to work in website, where people read them

derberg avatar Apr 17 '24 07:04 derberg

@derberg

  1. updated all the links.
  2. The Integration tests are working now.
  3. The npm ci is working fine.

ayushnau avatar Apr 20 '24 06:04 ayushnau

@derberg

  1. We need gitignore in the apps/generator for the test file that we dont want to be pushed. also adding those commands in root gitignore will not be applicable to all the apps. And also having multiple gitignore files for the turborepo is common pattern
  2. updated the readmd file to correct place. Also I guess the readmd file for the generator should move to generator itself. so that we can add general
  3. Added the required files to root.

Also i found that the test are not running properly with the current version. the issue is still not fixed finding ways to run the tests.correctly. and currently i am working on this.

ayushnau avatar May 01 '24 11:05 ayushnau

@ayushnau how is it going, do you need anything?

derberg avatar May 13 '24 08:05 derberg

Quality Gate Failed Quality Gate failed

Failed conditions
4 Security Hotspots
9.3% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar May 16 '24 15:05 sonarqubecloud[bot]

This pr is moved to https://github.com/asyncapi/generator/pull/1213

ayushnau avatar May 22 '24 18:05 ayushnau