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

chore(docker): improve image generation and testing #390

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

jansegre
Copy link
Member

@jansegre jansegre commented Mar 30, 2022

A trial run is running here: https://github.com/jansegre/hathor-core/runs/5760065789?check_suite_focus=true

This PR has three separate improvements:

  • add a subcommand quick_test that will exit with success (exit_code==0) when a transaction is added to the database, or exit with failure (exit_code!=0) in any other case (including timing out if it take too long)
  • add a step on the CI to test the built image before pushing the image to the repositories, this makes sure that an image which for any reason does not pass the quick_test check will not be uploaded
  • use debian-slim instead of alpine as the base python image, this is mostly because in alpine rocksdb is not "stable", so we're subject to a lot more of instability, for example, the latest build of rocksdb depends on a version of stdlibc++ that is not on the main repository of the release we use (alpine 3.15) but instead has to be installed from the edge version, this time the update is safe, but it may be that an update in the future causes dependency installation problems much harder to solve, just switching to debian-slim seems much easier maintain, besides that's what the pypy image is based off anyway, so that would also be a little easier to maintain.

@jansegre jansegre requested a review from msbrogli as a code owner March 30, 2022 19:30
@jansegre jansegre self-assigned this Mar 30, 2022
@jansegre jansegre force-pushed the chore/improve-docker-image branch from ebdabf4 to 5eff11d Compare March 30, 2022 19:46
@jansegre jansegre requested a review from luislhl March 30, 2022 19:47
@codecov
Copy link

codecov bot commented Mar 30, 2022

Codecov Report

Merging #390 (5eff11d) into dev (2820060) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev     #390      +/-   ##
==========================================
- Coverage   82.85%   82.84%   -0.02%     
==========================================
  Files         171      171              
  Lines       15542    15542              
  Branches     2457     2457              
==========================================
- Hits        12878    12876       -2     
- Misses       2220     2221       +1     
- Partials      444      445       +1     
Impacted Files Coverage Δ
hathor/p2p/node_sync.py 84.02% <0.00%> (-0.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2820060...5eff11d. Read the comment docs.

@jansegre jansegre requested a review from pedroferreira1 March 31, 2022 19:09
@jansegre jansegre merged commit ff416ec into dev Mar 31, 2022
@jansegre jansegre deleted the chore/improve-docker-image branch March 31, 2022 19:15
@jansegre jansegre mentioned this pull request May 2, 2022
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.

3 participants