8000 Fix our dockerfile (once again) by Davidson-Souza · Pull Request #245 · vinteumorg/Floresta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix our dockerfile (once again) #245

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

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

Davidson-Souza
Copy link
Collaborator

This should fix a few problems with the dockerfile. It also adds a CI build for it, so we won't have breaking changes being merged in the future.

I think the nix build would also benefit from having a CI check (not implemented here)

If we try to build florestad outside the git tree, it will fail because
the build script assumes we are inside one. But while building the
Dockerfile and nix flake, we don't get the git files, so the build.rs
breaks in those cases. This commit adds a fallback, where if we can't
get the version using git, we use the one declared in our Cargo.toml.
If we use rust's official image, we may have a problem of incompatible
libc when running on ubuntu latest, so we use the exact same image to
build, but drop the build tools after we get floresta built.
This will make sure that we won't silently break the dockerfile in the future
@jaoleal
Copy link
Contributor
jaoleal commented Oct 1, 2024

I think the nix build would also benefit from having a CI check (not implemented here)

For sure.
Theres a lot Devdebt that would make our life easier. Even the tests in master dont run in my local machine.

@Davidson-Souza
Copy link
Collaborator Author

Even the tests in master dont run in my local machine.

Why not?

@jaoleal
Copy link
Contributor
jaoleal commented Oct 1, 2024
failures:
    tests::test_get_block
    tests::test_get_block_hash
    tests::test_get_block_header
    tests::test_get_blockchaininfo
    tests::test_get_height
    tests::test_get_roots
    tests::test_send_raw_transaction
    tests::test_stop

i didnt debuged but, i did literally

git clone git@github.com:vinteumorg/floresta.git
cd floresta
cargo test

Even if its a missing thing that floresta depends, this cannot happen.

@Davidson-Souza
Copy link
Collaborator Author

You have to cargo build first, it's in the readme

@jaoleal
Copy link
Contributor
jaoleal commented Oct 2, 2024

You have to cargo build first, it's in the readme.

As i said, something that i missed. But i still thinks thats something not ideal to the project.
The capacity of cloning a branch and quickly decides if the branch is broken by itself depends on the master at least being portable enough to avoid building.

I see two good ways to make this work:

  1. Refactor start_florestad() so it creates the dir, or just overwrite it (its for tests anyway).

  2. sort tests by its importance for the node functionality. we already have this but by its architecture unit, docs and int. Sorting by minimal or node(for tests that only regards the florestad's functionality as compared to the bitcoin node).

Anyway, this issue is not place for discuss this. Lets open another one to track this if you liked the idea.

@Davidson-Souza Davidson-Souza merged commit 89f1257 into vinteumorg:master Oct 2, 2024
6 checks passed
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
0