-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Preview changes to other files in onboarding branches #20797
Comments
Hi there, Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. To get started, please read our guide on creating a minimal reproduction. We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment. Good luck, The Renovate team |
Here is a minimal reproduction: https://github.com/jtdoepke/renovate-20797 |
@RahulGautamSingh this highlights something about our onboarding which I had forgotten. While the config is read from the onboarding branch, Renovate still reads dependencies from the default branch. I guess the current approach was considered a feature - Renovate can update the onboarding PR based on latest dependencies in the default branch without needing to push to the onboarding branch (which may be modified). It also means that I'm not going to close this, because it's a valid request to be able to do this, but I'm not sure we can without either loss of existing functionality or a major code rewrite. |
Then we should handle this before trying to reduce cloning for onboarding. Will look into it and let you know how much work is needed. |
We still don't want to rebase/update the onboarding branch right? We onky want to update the PR body with the new extraction result. |
Maybe we can add an option where the user gets to decide which branch he wants to picks as the baseBranch. If the option is true we handle modified onboarding branches differently else we use existing logic. When an onboarding branch is modified
What do you say? @rarkins |
I'm not sure how to get this to work. If the branch is unmodified (with our onboarding default config) we could either:
Both should product the same result (in the PR body). The second one is less efficient because we commit more frequently. The question from this feature request is what to do when the onboarding branch is modified. I had one idea, not sure if it floats, but.. The onboarding branch will be merged into the default branch. Meaning whatever modifications which have been made will be merged in. Maybe we can do this:
This will mean that default branch SHA we extract from won't be the same as what's on the server, but it shouldn't matter to the user (they are not exposed to SHAs during onboarding). We might need to think about it for caching though. Second problem is that if the onboarding branch is conflicted with the default branch then we can't merge. But maybe we document that we can't proceed if the onboarding branch is in conflict - user needs to resolve it. |
Can we use the workaround logic mentioned above by author? The all we need to do is to add |
And where would that new config option live? In the It just doesn't seem elegant to me. |
This comment was marked as resolved.
This comment was marked as resolved.
@jtdoepke How were you able to get a onboardingPr generated for your reproduction as the Did you makes changes to the extraction logic and add |
@rarkins I tried what you mentioned and it will work. We will need the following additions:
|
Why not merge every time if it works in both cases? And yes, let's make sure it's local merge only. Why/when are we calling |
I expected that type of logic would be executed before we merge |
We don't perform |
I thought we were just discussing merging it? |
My bad, I thoguht you meant why it wasn't there to begin with. |
Also, there is no point in merging if the |
There is one more issue: The possible solutions can be to:
|
We definitely should add onboarding branch info to the cache |
I can begin work now:
|
What would you like Renovate to be able to do?
Renovate ignores changes to files other than the
renovate.json
config file in onboarding branches.A common pattern for using the regex manager is to pass dependency details to Renovate in a comment e.g.
However, if you add those comments in the onboarding branch, the dependencies don't show up in the description of the pull request because Renovate generates that preview based on
baseBranches
.I can work around this by temporarily adding
to
renovate.json
, and then removing it before the merge, but it's inconvenient.If you have any ideas on how this should be implemented, please tell us here.
If the target branch of the onboarding pull request is in
baseBranches
, then Renovate should preview what the results of merging all files in the pull request would be, not just therenovate.json
config file.Is this a feature you are interested in implementing yourself?
No
The text was updated successfully, but these errors were encountered: