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

fix(build): add elasticsearch feature to block serialize #6709

Merged
merged 3 commits into from
Jun 14, 2023

Conversation

oxarbitrage
Copy link
Contributor

Motivation

Close #6695

Solution

Add elasticsearch feature to block serialization.

Review

Reviewer Checklist

  • Will the PR name make sense to users?
    • Does it need extra CHANGELOG info? (new features, breaking changes, large changes)
  • Are the PR labels correct?
  • Does the code do what the ticket and PR says?
    • Does it change concurrent code, unsafe code, or consensus rules?
  • How do you know it works? Does it have tests?

Follow Up Work

@github-actions github-actions bot added the C-feature Category: New features label May 17, 2023
@oxarbitrage oxarbitrage added P-Low ❄️ I-build-fail Zebra fails to build labels May 17, 2023
@oxarbitrage oxarbitrage changed the title add elasticsearch feature to block serialize fix(build): add elasticsearch feature to block serialize May 17, 2023
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #6709 (a809644) into main (6549357) will decrease coverage by 0.03%.
The diff coverage is 37.50%.

❗ Current head a809644 differs from pull request most recent head 29ff651. Consider uploading reports for the commit 29ff651 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6709      +/-   ##
==========================================
- Coverage   77.66%   77.64%   -0.03%     
==========================================
  Files         310      310              
  Lines       41475    41477       +2     
==========================================
- Hits        32211    32204       -7     
- Misses       9264     9273       +9     

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Did you manually test the same command that failed in the ticket?

@oxarbitrage
Copy link
Contributor Author

This is working:

 cargo install zebrad  --locked --git https://github.com/ZcashFoundation/zebra --branch es-serialize-buld-error zebrad

@oxarbitrage oxarbitrage marked this pull request as ready for review May 17, 2023 22:13
@oxarbitrage oxarbitrage requested a review from a team as a code owner May 17, 2023 22:13
@oxarbitrage oxarbitrage requested review from teor2345 and removed request for a team May 17, 2023 22:13
@teor2345
Copy link
Contributor

Are you missing --features="elasticsearch"?

@oxarbitrage
Copy link
Contributor Author

Yea, sorry, i just noticed that. Trying again.

@teor2345
Copy link
Contributor

teor2345 commented May 17, 2023

Are you missing --features="elasticsearch"?

If this was a production feature, we'd add a CI test that specifically tried this compile. But since it's experimental it's ok to break it in some circumstances.

@oxarbitrage oxarbitrage marked this pull request as draft May 17, 2023 22:41
@oxarbitrage
Copy link
Contributor Author

I changed it back to draft as it seems the changes did not worked with the full correct command i wanted to fix:

$ cargo install zebrad --features="elasticsearch" --locked --git https://github.com/ZcashFoundation/zebra --branch es-serialize-buld-error zebrad
...
error[E0277]: the trait bound `zebra_chain::block::Block: Serialize` is not satisfied
   --> zebra-state/src/service/finalized_state.rs:388:23
    |
388 |                 .push(serde_json::json!(block).to_string());
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^
    |                       |
    |                       the trait `Serialize` is not implemented for `zebra_chain::block::Block`
    |                       required by a bound introduced by this call
    |
    = help: the following other types implement trait `Serialize`:
              &'a T
              &'a mut T
              ()
              (T0, T1)
              (T0, T1, T2)
              (T0, T1, T2, T3)
              (T0, T1, T2, T3, T4)
              (T0, T1, T2, T3, T4, T5)
            and 276 others
...

@github-actions github-actions bot added the C-bug Category: This is a bug label Jun 11, 2023
@teor2345 teor2345 removed the C-feature Category: New features label Jun 11, 2023
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

We'll need to chain the feature activations between different crates.

zebra-chain/src/block.rs Show resolved Hide resolved
@github-actions github-actions bot added the C-feature Category: New features label Jun 11, 2023
@oxarbitrage oxarbitrage marked this pull request as ready for review June 11, 2023 22:54
@teor2345 teor2345 added do-not-merge Tells Mergify not to merge this PR and removed C-feature Category: New features labels Jun 12, 2023
teor2345
teor2345 previously approved these changes Jun 12, 2023
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

I'm assuming you did the manual test again?

@github-actions github-actions bot added the C-feature Category: New features label Jun 12, 2023
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

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

Thanks!

I want to approve, but someone needs to manually test that this works first.

@oxarbitrage
Copy link
Contributor Author

I tested this manually and it is working.

@dconnolly dconnolly removed the do-not-merge Tells Mergify not to merge this PR label Jun 14, 2023
mergify bot added a commit that referenced this pull request Jun 14, 2023
@mergify mergify bot merged commit 17bd788 into main Jun 14, 2023
@mergify mergify bot deleted the es-serialize-buld-error branch June 14, 2023 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug C-feature Category: New features I-build-fail Zebra fails to build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure when elasticsearch feature is enabled
3 participants