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(x/ecocredit): register ecocredit v1alpha1 messages #1360

Merged
merged 2 commits into from
Aug 18, 2022

Conversation

ryanchristo
Copy link
Member

@ryanchristo ryanchristo commented Aug 17, 2022

Description

Closes: #1356

This pull request registers ecocredit v1alpha1 messages to allow for historical events to be queried.

The proto break check is failing although this is not a proto breaking change, only the file option was updated. Implementing the messages any further does not seem necessary given we do not register the messages to the msg server. This should qualify for a point release, no API or state machine breaking changes, but let me know if there are any concerns.

Manual Test: https://hackmd.io/USRbzfq1QwSn2oJcXwQ3Xg


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@ryanchristo ryanchristo force-pushed the ryan/1356-ecocredit-codec branch 3 times, most recently from 83bf5a4 to 35b206b Compare August 17, 2022 21:10
@ryanchristo ryanchristo marked this pull request as ready for review August 17, 2022 21:14
Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

LGTM

proto.RegisterType((*Params)(nil), "regen.ecocredit.v1alpha1.Params")
proto.RegisterType((*CreditType)(nil), "regen.ecocredit.v1alpha1.CreditType")
proto.RegisterType((*CreditTypeSeq)(nil), "regen.ecocredit.v1alpha1.CreditTypeSeq")
//proto.RegisterType((*ClassInfo)(nil), "regen.ecocredit.v1alpha1.ClassInfo")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why these lines commented?

Copy link
Member Author

Choose a reason for hiding this comment

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

We register the types here: #1360 (comment)

Copy link
Contributor

@aleem1314 aleem1314 left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +469 to +473
proto.RegisterType((*ClassInfo)(nil), "regen.ecocredit.v1alpha1.ClassInfo")
proto.RegisterType((*BatchInfo)(nil), "regen.ecocredit.v1alpha1.BatchInfo")
proto.RegisterType((*Params)(nil), "regen.ecocredit.v1alpha1.Params")
proto.RegisterType((*CreditType)(nil), "regen.ecocredit.v1alpha1.CreditType")
proto.RegisterType((*CreditTypeSeq)(nil), "regen.ecocredit.v1alpha1.CreditTypeSeq")
Copy link
Member Author

Choose a reason for hiding this comment

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

Answering the above question, the types are registered here.

@ryanchristo ryanchristo changed the base branch from release/v4.0.x to main August 18, 2022 18:10
@ryanchristo ryanchristo requested a review from a team August 18, 2022 18:10
@ryanchristo ryanchristo changed the base branch from main to release/v4.0.x August 18, 2022 18:11
@ryanchristo ryanchristo force-pushed the ryan/1356-ecocredit-codec branch from 191d5c0 to 5ed8dbe Compare August 18, 2022 18:36
@ryanchristo ryanchristo changed the base branch from release/v4.0.x to main August 18, 2022 18:36
@ryanchristo ryanchristo added the backport/v4.0.x backport to release/v4.0.x branch label Aug 18, 2022
@ryanchristo ryanchristo merged commit 05c29d1 into main Aug 18, 2022
@ryanchristo ryanchristo deleted the ryan/1356-ecocredit-codec branch August 18, 2022 19:05
mergify bot pushed a commit that referenced this pull request Aug 18, 2022
* fix(x/ecocredit): register ecocredit v1alpha1 messages

* remove ecocredit v2 replace directive

(cherry picked from commit 05c29d1)

# Conflicts:
#	CHANGELOG.md
#	x/ecocredit/module/module.go
@ryanchristo
Copy link
Member Author

ryanchristo added a commit that referenced this pull request Aug 18, 2022
… (#1364)

* fix(x/ecocredit): register ecocredit v1alpha1 messages (#1360)

* fix(x/ecocredit): register ecocredit v1alpha1 messages

* remove ecocredit v2 replace directive

(cherry picked from commit 05c29d1)

# Conflicts:
#	CHANGELOG.md
#	x/ecocredit/module/module.go

* release branch revisions

Co-authored-by: Ryan Christoffersen <12519942+ryanchristo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v4.0.x backport to release/v4.0.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to query events emitted from ecocredit v1alpha1
3 participants