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

Github Comment Reporter - marker not unique, message is overwritten in monorepo context #3068

Open
ancosma opened this issue Nov 3, 2023 · 5 comments · May be fixed by #3082
Open

Github Comment Reporter - marker not unique, message is overwritten in monorepo context #3068

ancosma opened this issue Nov 3, 2023 · 5 comments · May be fixed by #3082
Labels
bug Something isn't working

Comments

@ancosma
Copy link

ancosma commented Nov 3, 2023

Describe the bug
When used in the context of monorepo and a single PR, we run same workflow multiple time. Each time the working directory we pass to megalinter is a different one. Because megalinter uses only GITHUB_WORKFLOW and GITHUB_JOB it will overwrite the message created by previous run of the megalinter for other directories.

To Reproduce
Steps to reproduce the behavior:

  1. Create a PR
  2. (which) Run a workflow which start same reusable megalinter workflow invoked with 2 different directories

Expected behavior
Because we run same workflow but on different folders, we expect to get 2 comments each reporting for the folder in which megalinter ran.

P.S.:
In order to make the marker unique, it should include the directory in which megalinter ran.
In case you agree with the change, I can create a PR which fixes the issue. Should it be a breaking change or first try to identify the message using the old marker (without directory included) and then try with the marker which uses the directory?

@ancosma ancosma added the bug Something isn't working label Nov 3, 2023
@nvuillam
Copy link
Member

nvuillam commented Nov 4, 2023

@ancosma i'd be delighted to validate such PR, thanks for your offer :)

@Kurt-von-Laven
Copy link
Collaborator

@ancosma, we have historically preferred introducing a fallback option to introducing a breaking change. Can you explain why the fallback option would be needed to avoid a breaking change in this case though?

@nvuillam
Copy link
Member

nvuillam commented Nov 4, 2023

If the directory is root, the marker value must remain the same, to avoid a breaking change
Extended marker should happen only if the linting root has been overridden :)

@Kurt-von-Laven
Copy link
Collaborator

Oh, I see; I was taking that for granted. Yes, that seems like the correct path to me.

@ancosma ancosma linked a pull request Nov 5, 2023 that will close this issue
4 tasks
Copy link
Contributor

github-actions bot commented Dec 5, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 5, 2023
@nvuillam nvuillam removed the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants