Skip to content
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

Add the log stream from docker if build fails #2207

Merged
merged 2 commits into from Nov 2, 2020
Merged

Add the log stream from docker if build fails #2207

merged 2 commits into from Nov 2, 2020

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Nov 2, 2020

Proposed change

This adds more logs when docker builds fails giving add-on devs a chance to see what's wrong with out building locally on their machine with docker.

In addition to the cryptic:

20-11-02 10:11:11 ERROR (SyncWorker_2) [supervisor.docker.addon] Can't build local/amd64-addon-sync:0.4: The command '/bin/ash -o pipefail -c apk add --no-cache jq==223' returned a non-zero code: 1

With this PR it adds the build log as well:

20-11-02 10:11:11 ERROR (SyncWorker_2) [supervisor.docker.addon] Build log: 
Step 1/12 : ARG BUILD_FROM
Step 2/12 : FROM $BUILD_FROM
 ---> b70ac30ea587
Step 3/12 : ENV LANG C.UTF-8
 ---> Using cache
 ---> 21a3a2cca551
Step 4/12 : RUN apk add --no-cache jq==223
 ---> Running in 661ea6b65db9
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:

  jq-1.6-r1:
    breaks: world[jq=223]
Removing intermediate container 661ea6b65db9

image

I think this change will be very much welcome by add-on developers.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@pvizeli pvizeli merged commit 1f4032f into main Nov 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the dockerbuild branch November 2, 2020 10:44
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants