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

feat(rust): change the type of the name and from arguments to Address #8719

Conversation

takaebato
Copy link
Contributor

@takaebato takaebato commented Dec 22, 2024

Current behavior

  • The outlet commands in tcp, influx, and kafka use String type for the name and from arguments.

Proposed changes

Fixes #8710

  • This PR changes the type of the name and from arguments in tcp, influx, and kafka to Address.

I’d appreciate any feedback!

Checks

  • All commits in this Pull Request are signed and Verified by Github.
  • All commits in this Pull Request follow the Ockam commit message convention.
  • There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
  • I have read and accept the Ockam Community Code of Conduct.
  • I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. The easiest way to do this is to edit the CONTRIBUTORS.csv file in the github web UI and create a separate Pull Request, this will mark the commit as verified.

@takaebato takaebato force-pushed the takaebato/change-command-arg-type branch 6 times, most recently from 41a6d47 to 2071b22 Compare December 22, 2024 14:07
@takaebato takaebato force-pushed the takaebato/change-command-arg-type branch from 2071b22 to b67b6ee Compare December 22, 2024 14:10
@takaebato takaebato marked this pull request as ready for review December 22, 2024 14:48
@takaebato takaebato requested a review from a team as a code owner December 22, 2024 14:48
@takaebato takaebato mentioned this pull request Dec 26, 2024
@@ -51,6 +51,11 @@ pub fn extract_address_value(input: &str) -> Result<String, ApiError> {
Ok(addr)
}

pub fn extract_address(input: &str) -> Result<Address, ApiError> {
let value = extract_address_value(input)?;
Copy link
Member

Choose a reason for hiding this comment

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

I think we could remove this function and refactor extract_address_value so that it returns an Address. That would mean touching a bunch of commands. We can leave that out of this PR.

Copy link
Member

@adrianbenavides adrianbenavides left a comment

Choose a reason for hiding this comment

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

Hey @takaebato thanks for submitting this PR, it looks great! For the lint_commits check to pass, you will need to rebase develop to get the updated contributors file.

@adrianbenavides adrianbenavides force-pushed the adrian/args-updates-portal-commands branch from 853cc48 to 528e8ff Compare January 8, 2025 07:18
@adrianbenavides adrianbenavides deleted the branch build-trust:adrian/args-updates-portal-commands January 8, 2025 08:49
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