Skip to content

Conversation

@Sn0w3y
Copy link
Contributor

@Sn0w3y Sn0w3y commented Oct 20, 2025

πŸ“Œ Summary

This PR fixes a sporadic build failure during multi-arch Docker builds (linux/amd64, linux/arm64) caused by a race condition when writing to /etc/apk/repositories using echo. The error message was:

/bin/sh: can't create /etc/apk/repositories: Interrupted system call

βœ… Solution

Replaced the fragile echo approach with a more robust sequence that ensures directories and files exist and uses printf instead:

Before

RUN wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk && \
    echo 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories

After

RUN mkdir -p /etc/apk/keys && \
    wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk && \
    touch /etc/apk/repositories && \
    printf '%s\n' 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories

πŸ“¦ Result

  • Fixed build failure on multi-architecture builds
  • Improved reliability and reproducibility of Docker image builds

As seen in:

https://github.com/OpenEMS/openems/actions/runs/18647900625/job/53164486257

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3368      +/-   ##
=============================================
+ Coverage      59.80%   59.82%   +0.02%     
  Complexity       112      112              
=============================================
  Files           2787     2787              
  Lines         121037   121037              
  Branches        9061     9061              
=============================================
+ Hits           72378    72396      +18     
+ Misses         45947    45934      -13     
+ Partials        2712     2707       -5     
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@da-Kai da-Kai requested a review from sfeilmeier October 22, 2025 17:08
Copy link
Contributor

@da-Kai da-Kai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should then add this to the edge Dockerfile aswell.

@Sn0w3y
Copy link
Contributor Author

Sn0w3y commented Oct 23, 2025

@da-Kai done ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants