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

I want to display multiple reports in one pull request or merge request #165

Open
raigorai opened this issue Oct 29, 2019 · 6 comments
Open

Comments

@raigorai
Copy link

I want to display multiple reports in one pull request or merge request.

This is because a single repository manages multiple microservices.
When a reg-suit run is run for each microservice, the report on the merge request is overwritten.

https://github.com/reg-viz/reg-suit/blob/master/packages/reg-notify-gitlab-plugin/src/use-cases.ts#L13
If I can set the COMMENT_MARK value arbitrarily, I can solve this problem.

Is there a plan to fix it?

@Quramy
Copy link
Member

Quramy commented Oct 29, 2019

Hi. We're interested in your use case.

Perhaps this is not just gitlab plugin's issue.

I think we should introduce something like "project name" into reg-suit in order to use reg-suit with mono-repo.

For example:,

  • packages/service-A/regconfig.json
{
  "project": {
    "name": "service-A",
  },
  "core": {...},
  "plugins": {...}
}
  • packages/service-B/regconfig.json
{
  "project": {
    "name": "service-B",
  },
  "core": {...},
  "plugins": {...}
}

And the project.name property will be used from:

  • sub directory name for S3, GCS plugin
  • as COMMENT_MARK (gitlab, github plugin)

@ra1028
Copy link

ra1028 commented Apr 21, 2020

@Quramy
Same request here.
I'm currently using reg-suit for iOS application products.
I have plans to develop multiple applications in mono-repo in the future and it would be useful to be able to display a separate report for each, IMO.
I think to do that, in addition to the way you mention above, you'd need to be able to configure actualDir on a per-project basis.

@fedevegili
Copy link

@Quramy same use case here, having this project name setting would be amazing.

We don't even need this custom directory inside S3, we could use different buckets for each service inside the monorepo. However, the COMMENT_MARK is crucial. Being able to create a new github check would be nice as well, at the moment only one is displayed.

Do you accept PRs?

@okmttdhr
Copy link

For a workaround, we can refer to Chromatic;

Chromatic provides the following two options for the monorepo use cases.
https://www.chromatic.com/docs/monorepos

  1. Combine multiple projects into a single Storybook
    • With --preserve-missing flag, Chromatic will pass the baselines forward and treat all missing stories as “preserved” without re-capturing them. Which means that we can only test a subset of stories.
    • If you are using a tool like Lerna or Nx, you can also capture only the project with changes
  2. Run Chromatic more than once in a second Chromatic project

These can also be applied to reg-suit.

  1. Combine multiple projects into a single Storybook
    • => In this case, since reg-suit doesn't have an option like --preserve-missing, it is likely to be necessary to capture Storybook of all projects every time. If it's OK for you, you can use this pattern (but if you have a huge number of projects in your monorepo, It doesn't seem to be scalable in principle)
  2. Run reg-suit more than once in a second Chromatic project
    • This is the pattern for running reg-suit run in each of all monorepo projects
    • => This is not possible with reg-suit because, as others have pointed out, only single comment will be created and overwritten (prCommentBehavior: new doesn't scale for monorepos with many projects)

@dougfabris
Copy link

@Quramy any news about a solution to run inside monorepos? We're really interested to run reg-suit in our projects!

@tanmen
Copy link

tanmen commented Apr 1, 2023

I too hope to take advantage of this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants