Closed rmarx closed 4 weeks ago
Let's see what we can do with a clean bill of health. It is possible that this is coincidental, not causal. Your attempts to revert my changes would support that position (especially, since those changes are a noop in this environment).
Can you give this a go?
(My commit closed this, which was not my intent.)
By the way, I noticed a few things with your makefile. You shouldn't need to add "Gemfile.lock" to the "clean" target like that (I have a "clean-all" target that should clean up dependencies.
More substantively, your cddl target should name output files. As in cddl: $(addsuffix .cddl,$(drafts))
, plus with a %.cddl: %.md
rule. That way, your CDDL tool runs and validates each only when the draft changes. It looks like you create .cddl
files as a side-effect, which isn't really a great way to operate.
Thanks for the quick turnaround on this Martin; I know you're busy.
Firstly, I made your suggested changes to the Makefile. I agree the setup is a bit ad-hoc, but none of us are Makefile enthusiasts :) but your examples helped getting something going.
However, as expected, your latest changes don't magically fix the problem, sadly :( See a run here.
I tried to dig a bit deeper, to rule out other potential causes. I already checked the versions of the CDDL gem and its dependencies yesterday. They did have some changes around the same time stuff started breaking, but manually reverting the CDDL gem (and dependencies) to older versions didn't help (I also tried this yesterday before creating this issue).
Next, I thought it might be the ruby version. We have another separate action that runs just the CDDL logic which had the Ruby version hard set at 2.6
. I updated that to 3.3.0
(which the template currently uses), but the other action just works with that, so it's not the ruby version...
Finally, I tried manually installing the packages it complains about (ruby-dev ruby-devel
) even though I think it's more a case that bundler can't find the deps, not that they're not installed. This seems somewhat confirmed by the fact that ruby-dev
already seems present at the latest version and the errors continue.
So yeah... at this point I'm struggling to see a path forward. Conceptually, we don't HAVE to run the CDDL in the i-d-template action, since we have the separate cddl_validate action for that. However, we DO want to run it locally as part of the makefile (to catch errors before commit). I can't seem to see an easy way to keep the Gemfile around just locally and tell the i-d-template not to use it in CI (I can disable running the actual cddl check in CI/Makefile, but that doesn't help since the error is at install time).
Any further suggestions for workarounds (or potential fix of course) is appreciated :) Thanks again!
OK, I have a new theory. It has nothing to do with the changes I made (though more work there is probably a good thing).
The problem is that the docker image that is in use does not support the installation of native Ruby gems. That is, gems that need to be compiled with a C compiler at installation time. The image is small and does not include a C compiler. Note that this is not the same docker image as the one that GitHub provides.
What you are seeing is coincidence, not causation. The gem changed to include a new dependency that needs to be compiled, as opposed to being pure ruby. As a result, the installation fails. It might be possible to find an alternative, disable some features, or something. The gem used to work, after all. However, like you, I only have a passing familiarity with Ruby.
Since May 20, cddl dependency "regexp-examples" seems to require "regexp_property_values", which requires a native build. Would this work in the math docker image?
I have pushed a cddl 0.12.4 that pins regexp-examples at the previous revision 1.5.1. Please try again.
Hello both,
Thanks for the support on this! I first tried to confirm @martinthomson's new theory about it just being the native extension by itself by punting to quite old versions of cddl and regexp-examples and that indeed seems to have worked.
I then saw the new cddl
version from @cabo and tried that as well, and that indeed also fixes the problem it seems.
I thought I had checked for this being the problem before even opening this issue by pinning the versions, but I apparently pinned just cddl
(which still pulled in the latest regexp-examples
) or cddl
+ regexp_property_values
(the latter being the native extension, so if Martin is correct, that would indeed still fail...)
Happy that this is fixed and sorry for the wild goose chase @martinthomson... it was indeed an unhappy coincidence of multiple factors.
P.S. now that I have you here @cabo: is the source for the cddl
gem open somewhere? rubygems.org links to https://github.com/cabo/cddl, but that gives a 404...
P.S. now that I have you here @cabo: is the source for the
cddl
gem open somewhere? rubygems.org links to https://github.com/cabo/cddl, but that gives a 404...
The new tool, cddlc
, is on github. The legacy tool cddl
has too much technical debt that I would want people to read it (it is open source, but I'm giving you an extra nut to chew). I'm moving (and refactoring) code from cddl
to cddlc
, but neither generator nor validator are complete yet.
Hello there,
Seems like the changes in https://github.com/martinthomson/i-d-template/commit/e303013d6c68d43cf9a2432b010bf6052123b4e2 (and related commits) to solve https://github.com/martinthomson/i-d-template/issues/428 broke the qlog github actions autobuild (https://github.com/quicwg/qlog, https://github.com/quicwg/qlog/actions/runs/9446234091/job/26018995910#step:6:12) :)
We have a simple custom Gemfile needed to install the
cddl
Gem (https://github.com/quicwg/qlog/blob/main/Gemfile). We made some changes to ourMakefile
to incorporate that (https://github.com/quicwg/qlog/blob/main/Makefile#L26). It's automatically picked up by this project'sdeps.mk
and run as part of the github action as expected (e.g., https://github.com/quicwg/qlog/actions/runs/9446234091/job/26018995910#step:6:12)However, since the changes it seems something is preventing the Ruby bundler from picking up the native dependencies/path/something... Some representative failed builds with logs:
I've tried a bit to work around it by checking out a previous version of the i-d-template lib, but seems no dice (https://github.com/quicwg/qlog/actions/runs/9448120766/job/26021447700#step:6:8).
I don't really use Ruby so I have no idea what's really going wrong (or what I'm doing...), so I was hoping you might have an idea on how to fix this (either here or in qlog) :) thanks!
Example failing log: