Git-secret: build issue on alpine-latest: tasks 'Create git-secret apk package' and 'Create git-secret apk location'

Created on 12 Jul 2018  路  8Comments  路  Source: sobolevn/git-secret

builds are failing only on alpine-latest because of error(s) with
run-tests.yml

For exact error messages, please see the 'alpine-latest' jobs here:
https://travis-ci.org/sobolevn/git-secret/builds/403141496
or below

blocker

Most helpful comment

This looks to be "apline-latest" changes that make building the apk package fail. I am coming to believe that building packages on the very latest distros for every PR is not a good idea. We can expect that installing packages is stable (you can build on a stable major release distro and expect the package to install on the latest version) but that building packages on the very latest can and will randomly break with something that is nothing do with the logic in a PR. This harms contributions by making it "hard work" to get a PR with new logic merged (when that logic is correct).

edit I suggest that we configure things such that we do a build that does everything on release (and uploads a package built on the latest versions to force us to fix them) and configure the tests that run on a PR not to run on "latest".

All 8 comments

Error message:

TASK [Create git-secret apk package] *************

fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["bash", "-lc", "cd /tmp/git-secret && make build-apk"], "delta": "0:00:00.826604", "end": "2018-07-12 14:30:15.027166", "msg": "non-zero return code", "rc": 2, "start": "2018-07-12 14:30:14.200562", "stderr": "/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require': cannot load such file -- etc (LoadError)\n\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'n\tfrom /usr/lib/ruby/gems/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports'\n\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/lib/fpm/package/puppet.rb:5:inrequire'\n\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'n\tfrom /usr/lib/ruby/gems/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:in require_with_backports'\n\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/lib/fpm.rb:13:inrequire'\n\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'n\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/bin/fpm:4:in <top (required)>'\n\tfrom /usr/bin/fpm:23:inload'n\tfrom /usr/bin/fpm:23:in <main>'\nmake: *** [Makefile:100: build-apk] Error 1", "stderr_lines": ["/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire': cannot load such file -- etc (LoadError)", "\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'", "\tfrom /usr/lib/ruby/gems/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'", "\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/lib/fpm/package/puppet.rb:5:in <top (required)>'", "\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'", "\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'", "\tfrom /usr/lib/ruby/gems/2.5.0/gems/backports-3.11.3/lib/backports/std_lib.rb:9:inrequire_with_backports'", "\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/lib/fpm.rb:13:in <top (required)>'", "\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:inrequire'", "\tfrom /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in require'", "\tfrom /usr/lib/ruby/gems/2.5.0/gems/fpm-1.10.2/bin/fpm:4:infpm:23:in load'", "\tfrom /usr/bin/fpm:23:in

'", "make: * [Makefile:100 : build-apk] Error 1"], "stdout": "", "stdout_lines": []}
...ignoring

TASK [Find git-secret apk file] ****************
ok: [localhost]

TASK [Set git-secret apk location] ***************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No first item, sequence was empty.nnThe error appears to have been in '/tmp/kitchen/tasks/run-tests.yml': line 53, column 3, but maynbe elsewhere in the file depending on the exact syntax problem.nnThe offending line appears to be:nnn- name: Set git-secret {{ os_pkg_type }} locationn ^ herenWe could be wrong, but this one looks like it might be an issue withnmissing quotes. Always quote template expression brackets when theynstart a value. For instance:nn with_items:n - {{ foo }}nnShould be written as:nn with_items:n - \"{{ foo }}\"n"}

to retry, use: --limit @/tmp/kitchen/default.retry

@sobolevn @simbo1905 any ideas?

This looks to be "apline-latest" changes that make building the apk package fail. I am coming to believe that building packages on the very latest distros for every PR is not a good idea. We can expect that installing packages is stable (you can build on a stable major release distro and expect the package to install on the latest version) but that building packages on the very latest can and will randomly break with something that is nothing do with the logic in a PR. This harms contributions by making it "hard work" to get a PR with new logic merged (when that logic is correct).

edit I suggest that we configure things such that we do a build that does everything on release (and uploads a package built on the latest versions to force us to fix them) and configure the tests that run on a PR not to run on "latest".

@simbo1905 absolutely agree.

I have added #235 about relaxing PR builds.

Team, if you happy to agree an approach for #235 I will take a look at implementing it to unblock Josh鈥檚 latest. Then I will take a look for the actual fix for Alpine which I have no experience with.

Building locally on alpine it looks to me that gnupg no longer compiles on latest alpine. Trying to get alpine to test locally I hit a few issues due to my unfamiliarity with the distro. I have just found their formula at https://git.alpinelinux.org/cgit/aports/tree/main/gnupg/APKBUILD?h=master so I might now be able to figure this out when I get some more time to look into this in the next couple of days.

I have created PR #246 for the fix.

Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alumarcu picture alumarcu  路  3Comments

joshrabinowitz picture joshrabinowitz  路  7Comments

tonyskapunk picture tonyskapunk  路  5Comments

learsix picture learsix  路  6Comments

joshrabinowitz picture joshrabinowitz  路  4Comments