NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
191 stars 41 forks source link

Fix missing confirmation in apt-upgrade in Docker build #711

Closed juhoinkinen closed 1 year ago

juhoinkinen commented 1 year ago

apt-get upgrade was added in Docker build to ensure that system packages are up-to-date in the image in PR #707, but I did not add -y option to it, because it seemed unnecessary as the command worked while testing without it (and in this SO post the -y was concluded to be unnecessary, but the post was about apt-get update!)

However, it seems that when there is some packages to upgrade, then then the -y option is necessary. Without it the build fails:


#5 2.944 Calculating upgrade...
#5 3.091 The following packages will be upgraded:
#5 3.091   libssl1.1 openssl
#5 3.094 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
#5 3.094 Need to get 2413 kB of archives.
#5 3.094 After this operation, 4096 B disk space will be freed.
#5 3.094 Do you want to continue? [Y/n] Abort.
------
ERROR: failed to solve: executor failed running [/bin/bash -c apt-get update && apt-get upgrade &&  if [[ $optional_dependencies =~ "voikko" ]]; then       apt-get install -y --no-install-recommends          libvoikko1          voikko-fi;  fi &&   apt-get install -y --no-install-recommends rsync &&     rm -rf /var/lib/apt/lists/* /usr/include/*]: exit code: 1
Error: buildx failed with: ERROR: failed to solve: executor failed running [/bin/bash -c apt-get update && apt-get upgrade &&   if [[ $optional_dependencies =~ "voikko" ]]; then       apt-get install -y --no-install-recommends          libvoikko1          voikko-fi;  fi &&   apt-get install -y --no-install-recommends rsync &&     rm -rf /var/lib/apt/lists/* /usr/include/*]: exit code: 1
sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +3.85 :tada:

Comparison is base (579701c) 95.81% compared to head (7762fe6) 99.67%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #711 +/- ## ========================================== + Coverage 95.81% 99.67% +3.85% ========================================== Files 89 89 Lines 6380 6380 ========================================== + Hits 6113 6359 +246 + Misses 267 21 -246 ``` [see 10 files with indirect coverage changes](https://app.codecov.io/gh/NatLibFi/Annif/pull/711/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NatLibFi)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.