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

Can't Extend A Remote Config That Extends A Local Config #2371

Open
Kurt-von-Laven opened this issue Feb 19, 2023 · 3 comments · May be fixed by #2533
Open

Can't Extend A Remote Config That Extends A Local Config #2371

Kurt-von-Laven opened this issue Feb 19, 2023 · 3 comments · May be fixed by #2533
Labels
bug Something isn't working nostale This issue or pull request is not stale, keep it open

Comments

@Kurt-von-Laven
Copy link
Collaborator

Kurt-von-Laven commented Feb 19, 2023

Describe the bug
When you extend a config in a different repository that extends a config within said repository, the keys from the parent config are properly incorporated, but the grandparent config is completely ignored.

To Reproduce
Steps to reproduce the behavior:

  1. Extend a config such as ours, which extends a local config.
  2. Run MegaLinter on your project.
  3. Observe that none of the settings in the base config are respected.

Expected behavior
I expected the inheritance to apply recursively.

Additional context
There were recent fixes for extending local files and extending recursively, but the case where both features are combined isn't handled properly. Renovate has sophisticated support for config inheritance, which may be a helpful reference. One solution might be to specify the base (e.g., repo) URL in one config key and the path relative to the base URL in another.

@Kurt-von-Laven Kurt-von-Laven added the bug Something isn't working label Feb 19, 2023
@bdovaz
Copy link
Collaborator

bdovaz commented Feb 19, 2023

Are you going to work on it? I see that you are quite clear about the implementation.

However, you should keep in mind that it should not break what already works, ie:

  1. being able to indicate an absolute url without any limitation. In that system you mention does not work with Azure DevOps for example.
  2. To be able to continue indicating local relative paths.

In the meantime I am going to create a PR to organize the existing input files for these tests that may help you as there is a bit of chaos right now.

@Kurt-von-Laven
Copy link
Collaborator Author

Thank you for cleaning up the tests! Yeah, the ability to pass an array of objects to EXTENDS, each with a base and relative URL, would achieve all these goals. Happy to work on it, but wanted to get a bit of feedback on this approach before diving in.

@github-actions
Copy link
Contributor

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 Mar 22, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 6, 2023
@bdovaz bdovaz reopened this Apr 6, 2023
@bdovaz bdovaz added nostale This issue or pull request is not stale, keep it open and removed O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity labels Apr 6, 2023
@Kurt-von-Laven Kurt-von-Laven linked a pull request Apr 6, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nostale This issue or pull request is not stale, keep it open
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants