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

[ci] #3889: prune docker-compose files #3969

Conversation

0x009922
Copy link
Contributor

@0x009922 0x009922 commented Oct 9, 2023

Description

Currently each branch (iroha2-<lts|stable|dev>) has set of docker-compose files not only for itself, but for other branches too. It leads to confusion and goes against how versioning works. Moreover, since 2.0 release will be relatively soon and we are going to get rid of channels at all, there is no sense to keep them in the dev branch.

This PR removes docker-compose files related to other branches/channels, and removes .dev suffix from the configurations related to dev branch.

Linked issue

Closes #3889 (will be completely closed after merging into iroha2-stable)

Benefits

Less confusion, natural branch-based versioning and CI checks

Checklist

  • Add CI check to ensure usage of a proper Dockerhub image according to the branch

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Oct 9, 2023
@Erigara
Copy link
Contributor

Erigara commented Oct 9, 2023

@0x009922 afaik initial reason for having multiple files was to prevent situation when new user is trying to run lts containers when he was on dev branch in git.
Other than that i think that having 3 sets of files was confusing and this change is for good.

@0x009922
Copy link
Contributor Author

0x009922 commented Oct 9, 2023

I guess we should first extend this PR with a new CI which will ensure the sync of the Dockerhub image used in the docker files, and the branch the file is located on.

@0x009922 0x009922 marked this pull request as draft October 9, 2023 08:27
Copy link
Contributor

@6r1d 6r1d left a comment

Choose a reason for hiding this comment

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

We will need to integrate a CI check to validate Docker images. Something like this sketch may work.

The idea is to fail the CI process when we see a Docker configuration that will use the dev image when it's being merged to the https://github.com/hyperledger/iroha/tree/iroha2-stable branch.

(I wonder if we can agree on a container name that'll always replace the dev image so the script will edit the Compose configurations instead of failing.)

@6r1d 6r1d force-pushed the iroha2-dev branch 2 times, most recently from 66fec94 to bf90a7d Compare October 17, 2023 11:50
@0x009922 0x009922 force-pushed the prune-channel-docker-compose branch from 30f35aa to 1cbee22 Compare November 15, 2023 03:46
@0x009922 0x009922 added the blocked this problem can't be fixed yet label Dec 26, 2023
@appetrosyan
Copy link
Contributor

I'll remind you that the impetus for the original shift towards docker compose files for different branches on the same branch was because of community confusion, and problems caused by merging into -main and -lts branches.

If you remove them, please consider adding something instead that fixes those issues.

I'd advise not doing this, because even a simple docker compose generator needs to be ran by the user and those will often not work. Pulling the docker-compose from the tutorial might work, but I'd advise against it, because then the dependency of the tutorial on dev becomes bidirectional.

@0x009922
Copy link
Contributor Author

Closing in favor of #4053.

@appetrosyan, now we have a single set of docker-compose configuration files binded to the branch. The primary intention we have is to reduce any confusion of end users: they come to the repo on whatever branch they want, and they use instructions in the README of that branch, which are usually simply "use docker-compose.yml.

We have also introduced a CI check that ensures that compose files in iroha2-dev branch contain image: hyperledger/iroha2:dev, and iroha2-stable - image: hyperledger/iroha2:stable. Although the Git pipeline became a little more complicated, hopefully compose files will be always up to date.

We are also planning to add CI checks to ensure that docker compose files are not only valid textually, but that they are also actually runnable.

@0x009922 0x009922 closed this Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked this problem can't be fixed yet iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants