I have dependabot integrated into a github repo that I control. I've noticed that dependabot is no longer opening PRs for outdated dependencies, such as rubocop and rubocop-rspec.
I have an open ticket in the dependabot-core repo that describes the issue in more detail, including a log from an update attempt. However, the developers seem to have abandoned the ticket.
Could someone help me identify and resolve the issue with dependabot upgrades?
The issue is that rubocop v1.30.0 bumped the minimum required ruby version to 2.6.
The gemspec in the repo specified the required_ruby_version as >= 2.5.0, which dependabot seems to consider to be incompatible with the rubocop requirement. (I think this is overly strict, as rubocop still supports a a TargetRubyVersion of 2.5.)
Nonetheless, bumping the required_ruby_version to >= 2.6.0 has unblocked the dependabot upgrades.
Related
I was browsing rubygems.org for themes in Jekyll and they were causing trouble with the current versions of jekyll.
Like here I was trying out linaro-jekyll-theme. and I got this
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies....
Bundler could not find compatible versions for gem "jekyll":
In Gemfile:
jekyll (~> 4.2.1)
linaro-jekyll-theme was resolved to 1.0, which depends on
jekyll (~> 3.4)
Bundler could not find compatible versions for gem "linaro-jekyll-theme":
In snapshot (Gemfile.lock):
linaro-jekyll-theme (= 1.0)
In Gemfile:
linaro-jekyll-theme
Running bundle update will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
How to change jekyll versions according to the needs. Is there any problem associated with changing versions so many times?
A Jekyll theme (or any gem in general) might depend on a certain version of another gem because
is depends on certain features that were removed or changed in later versions or
the author just pinned the version as a reminder to check compatibility when a new major version is released because major releases might break the gem.
In this example, the author might already have known that their gem works with Jekyll 3.x but not with 4.x anymore or they just wanted to revisit the theme later if it still works with Jekyll 4.x but never did.
Changing versions is not really a problem and because of bundler you can do that easily and as often as you want or need to. But there might be a general issue with downgrading a gem. Newer versions are released mainly for two reasons:
to add new features and
to fix bugs and security vulnerabilities.
When you work with an older version of a gem then you might miss new features that might be okay if you do not need them. But you also might open yourself to security vulnerabilities that have already been fixed in later versions.
My advice is:
Try using the latest version of a gem whenever possible.
If another gem depends on an older version and you, therefore, an update to the latest version, then I would ask myself if it is really worth it to use such an outdated gem. When the gem hasn't been updated to depend on the latest version for a longer period of time then it is likely that it will not be updated anymore which is a risk.
If you still want or need to downgrade then I suggest checking the changelog of the gem what features and bug fixes you will miss. And to check the changelog on a regular basis in the future too.
Useful links in this context: The list of Jekyll versions, as you can see Jekyll 3.4 is about five years old that is a lot of time to build new features, fix bugs and security vulnerabilities. And a lot of time for a theme author to make a theme compatible with newer versions. And the Jekyll Changelog in which you can check what you would be missing when you downgrade to 3.4 instead of using the latest version (currently 4.2.1). And that list is very long.
I am working on a server migration and upgrade, and I don't code in Ruby at all.
Is there an easy way for me to scan / review the gemfile / installed dependencies to check that latest updated / unpatched dependencies?
The code references to a hundred at least dependencies and I am not sure which are no longer the latest stable version.
You can try bundle with the outdated command and using the --strict parameter to make sure it lists only compatible gems:
bundle outdated --strict
But like I said in my comment above, you usually want to know what you are doing if you plan to upgrade any gem. Any changes to the API or functionality of a gem may break part of or the entire codebase. Make sure you have working backups.
This is what I am talking about.
My attempt is to repush the exact same version, 0.1.12.
My previous push is invalid, it broken gem what I push.
I highly want to publish this version, like I already implement the sem-versioning.
the pushing process yield:
Repushing of gem versions is not allowed. Please use a new version and retry
So is it possible? if not what is the main use of yanking a submitted gem?
Nope, you can not re-submit the same version number, this is made on purpose for security reasons, avoiding maintainers to upload the same version without getting noticed by the developers. So you will need to release a new version of your gem
Why should one care about specifying gem version at all if bundler detects Ruby version and manages to get the latest release to match that version. If I'm not a fond of newer version personally, I would disable incrementing with ~> 1.4.4 and in other cases I'd let bundler manage stuff with putting gem name into Gemfile without any argument
The approach you are suggesting - start with the latest version and pin if problems are experienced - works fine for projects that are 1) actively maintained and 2) tolerant of breakage.
Now imagine you have to deliver this project to a customer who then will run it for a year or longer and you won't be there to support it. In this case simply getting the latest release of all dependencies is not necessarily the best strategy. Maybe you would proactively specify major versions of all of your important dependencies instead. Potentially even lock to minor versions which does give more stability at the cost of missing security updates/bug fixes.
The logger gem, which has been at version 1.2.8 for 7.5 years, was yanked from rubygems.org today and replaced with version 1.2.7:
https://rubygems.org/gems/logger/versions/1.2.8
This library was not a gem before 1.2.8. The gemspec was added on 2011-05-11:
https://github.com/nahi/logger/commit/af96ca8fbf9ca1a20812a222c27d5c1ccf5d297e
There has never been an official release of a 1.2.7 version, as told by the release history on GitHub:
https://github.com/nahi/logger/releases
There have been no commits to this repo for more than 6 years. If a 1.2.7 version of the library was built as a gem, it was done so from a different source repo. I see no evidence that the nahi repo has been superseded by any other repo.
Does anyone know what happened? At this point, we're going to set the source for this gem to the 1.2.8 release commit on GitHub until there's some official word on this.
EDIT: My question isn't about whether or not the logger gem still needs to be maintained. If that were the case, why publish a new version yesterday? And why go backwards in version numbering? And why is there no record of these changes in the repo? There are big differences in what was marked (but not released) as 1.2.7 back in 2008 (and remember, 1.2.8 was published as a gem for the first time 3 years after that in 2011) and what was published yesterday as 1.2.7. We rely on a gem that requires this gem. Sure, we'll reevaluate whether or not that requirement is still true, but the circumstances around yanking 1.2.8 and replacing it with something that has no (established or announced) record of change is odd.
I just saw this too as I'm doing a clean deploy to my web host. I've raised an issue on the github repo https://github.com/nahi/logger/issues/3