-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support yarn offline mirror #1452
Comments
I assume you're talking about your own self-hosted version of Renovate? e.g. for internal enterprise use? I haven't used yarn's offline mirror before so don't have personal familiarity with it, but I don't see anything about it's description that would stop me accepting ideas or PRs for it. Could you describe in more detail about how you expect it to work from a Renovate perspective? |
Sure. I'm using the Renovate GitHub app (not self-hosted). Here's my .yarnrc file:
Let's say I'm upgrading mapbox-gl from 0.43 to 0.44. On my own, I'd do:
Which results in my git stage to look like
Notice the new and deleted .tgz files of mapbox-gl and its dependencies. The diff from Renovate bot, however, looks like this:
If I merge that in, my deployment will fail, because during deployment I use the |
I've also noticed in the docs the |
ok thanks for the detailed description. Just to make sure I'm following, you mean that you are essentially committing all dependencies and sub=dependencies into the repo? There's nothing "wrong" with the idea, but the bad news is: this is not an easy addition right now, for a couple of reasons:
Based on my current plans, I'd think this is as late as a 2H2018 type of thing, as I plan to add sure
No. That's just a way to supply |
Do you know of any articles written about this type of use? I went through pages of search results discussing offline mirror without seeing one that talks about committing to the repository itself. What’s the advantage vs just committing |
@rarkins See the sections You can check in “Offline mirror” into git or mercurial repository and Let’s compare checking in node_modules to checking in “Offline mirror” here: https://yarnpkg.com/blog/2016/11/24/offline-mirror/ Mainly the benefits are fewer files and less noisy diffs. |
@jasonbarry thanks for the pointer - makes sense. I think I found that article but stopped reading too early! |
Hello guys, was there any progress in the last year? This is one of the 2 issues blocking us from adopting Renovate bot in our monorepo at Kiwi.com... :) |
Actually this should be achievable now, although it yet implemented. We support go module vendoring already for example. I’ll take another look soon. |
I would love to help out with this one, where is the module vendoring code? |
@daveparslow that would be awesome if you have the time to dig into it, even if just to move it along a bit. I'll document requirements here regardless as it's good to have. So far, the only manager supporting vendored modules is Go. The logic is quite simple - after running "go mod vendor", we then use git to detect all added, modified and deleted files, and make sure they're returned: renovate/lib/manager/gomod/artifacts.js Lines 166 to 185 in 956445e
Meanwhile, here is where Renovate currently detects/pushes the updated renovate/lib/manager/npm/post-update/index.js Lines 476 to 478 in 956445e
Based on the docs, it looks like the offline mirror configuration is in the A useful first step would be a simple repo to reproduce it, and a confirmation of the config/yarnrc logic necessary. |
Hello, guys. It's been quite some time so I just wanted to ask for some updates. How is it looking? Is it on your roadmap or we should not wait for it? Thank you very much @rarkins. :) |
@nihal9ns let's first create a test repo as per Yarn's description here: https://yarnpkg.com/blog/2016/11/24/offline-mirror/ |
@rarkins The test repo lies here : https://github.com/nihal9ns/yarn-offline-mirror |
@nihal9ns thanks. Can you merge that Configure Renovate PR and run again so we see the two upgrade PRs? This should be our (non-working) baseline and then I'll see to fix them so that we get the full upgrade (including offline module update) |
Hey @rarkins and @nihal9ns, how can I help with this? We're running it on-prem currently and are manually pushing commits up to update the offline mirror today. I'd be interested in helping with this change if you can help set me in the right direction. |
Look for .yarnrc in same directory as yarn.lock. If found, look for yarn-offine-mirror line and check that folder for changes. Closes #1452
Look for .yarnrc in same directory as yarn.lock. If found, look for yarn-offine-mirror line and check that folder for changes. Closes #1452
🎉 This issue has been resolved in version 19.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@turnrye thanks for the offer, but it should be working now. Please confirm! |
@rarkins wow, thanks! We've updated and are now using it. Will let you know. Edit: this is working nicely for us now. Thanks for the great help here. |
This doesn't seem to be working, for me at least. I added an offline mirror after the initial onboarding, which I don't think matters, but I'm not certain. project/.yarnrc:
This is located at the same level as the yarn.lock in the project (project/yarn.lock) My project/renovate.json looks like this:
I'm not getting tar's committed to the repo by renovate. As you can see in the image below, renovate will prune, but it's not adding the updated tar's. The last commit was me manually calling It's a private project on gitlab, but let me know how I can help. |
@kanjieater please don't comment on long-closed issues, especially ones with quite a few people subscribed. Post in https://github.com/renovatebot/config-help first, provide a reproduction repo, and if it's a bug then we will transfer it into this repository as a new issue. |
My project uses yarn's offline mirror feature so that we deploy from local tarballs instead of straight from npm. This means that when packages are added/removed, their tarballs should be included in the commit. Even though I've properly set up my .yarnrc file to support this, the pull requests from Renovate don't include the tarballs.
Is this something that could be supported?
The text was updated successfully, but these errors were encountered: