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

build(drive-abci): debug docker image with grovedb visualizer and tokio console #2012

Merged
merged 53 commits into from
Sep 3, 2024

Conversation

lklimek
Copy link
Contributor

@lklimek lklimek commented Jul 26, 2024

Issue being fixed or feature implemented

When building drive-abci image, we don't want to include tools like grovedb visualizer or tokio console.
However, for some use cases, we need these features.

We need to build additional debug package that will accompany normal release and contain forementioned features.

What was done?

  1. Refactored docker image tag detection algorithm. Right now, only full releases will generate tags like MAJOR, MAJOR.MINOR, latest, etc.
  2. Added manual workflow checkbox "Only build Drive image"
  3. Fixed bug that could lead to use of wrong build of app retrieved from cache.
  4. Added drive-abci debug image build that will have docker tag suffixed with -debug, for example for 1.2.3-dev.1, we build dashpay/drive-abci:1.2.3-dev.1 and dashpay/drive-abci:1.2.3-dev.1-debug.
  5. By default, tokio_unstable, tokio console and grovedbg are enabled. For release builds (release cargo profile), this is changed on Dockerfile level - drive-abci builds with --no-default-features, and we use separate config file that has tokio_unstable disabled.
  6. Normal images are built in release cargo profile (as previously), -debug one in dev cargo profile.
  7. In drive-abci main.rs, added info log containing version info and list of enabled features, for easier debugging.

How Has This Been Tested?

Manual workflow run

https://github.com/dashpay/platform/actions/runs/10508658962

Prerelease v1.1.0-pr.2012.6

https://github.com/dashpay/platform/actions/runs/10508221419

Test of generated drive-abci image

Debug

docker run --rm -ti dashpay/drive:1.1.0-pr.2012.6-debug status
 2024-08-22T13:02:08.132339Z  INFO drive_abci: drive-abci server initializing, version: "1.1.0-dev.1", features: "console,grovedbg,mocks", rust: "1.76"

Release

docker run --rm -ti dashpay/drive:1.1.0-pr.2012.6 status
2024-08-22T13:03:19.811619Z  INFO drive_abci: drive-abci server initializing, version: "1.1.0-dev.1", features: "mocks", rust: "1.76"

Not tested

  • full release

Breaking Changes

We no longer tag images with tags like 1-dev, latest-dev, etc.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@QuantumExplorer
Copy link
Member

do not merge for now

@lklimek lklimek changed the base branch from v1.0-dev to v1.1-dev August 15, 2024 10:46
@lklimek lklimek marked this pull request as draft August 22, 2024 12:02
@lklimek lklimek requested a review from shumkov August 22, 2024 13:00
@lklimek lklimek marked this pull request as ready for review August 22, 2024 13:00
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

I don't see where we add f

.cargo/config-release.toml Show resolved Hide resolved
@lklimek
Copy link
Contributor Author

lklimek commented Aug 22, 2024

I don't see where we add f

If you mean "where we add features", it's in Dockerfile lines 202-209, https://github.com/dashpay/platform/pull/2012/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R202-R209

@lklimek lklimek requested a review from shumkov August 22, 2024 15:07
@lklimek lklimek added this to the v1.2.0 milestone Aug 23, 2024
@lklimek lklimek changed the base branch from v1.1-dev to v1.2-dev August 23, 2024 08:34
shumkov
shumkov previously approved these changes Aug 23, 2024
@lklimek lklimek changed the base branch from v1.2-dev to v1.3-dev September 3, 2024 06:15
@lklimek lklimek dismissed shumkov’s stale review September 3, 2024 06:15

The base branch was changed.

@lklimek lklimek modified the milestones: v1.2.0, v1.3.0 Sep 3, 2024
@lklimek lklimek merged commit 0294c90 into v1.3-dev Sep 3, 2024
23 checks passed
@lklimek lklimek deleted the build/1.0.0-rc2-debug branch September 3, 2024 07:44
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