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(node_manager): lowercase owner for discord #2188

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

mazzi
Copy link
Contributor

@mazzi mazzi commented Oct 3, 2024

Description

We use owner in lowercase to be able to compute scores accordingly on Discord.

Related https://github.com/maidsafe/dags-service/pull/7
Related #2180

@@ -78,6 +78,11 @@ pub async fn add_node(
check_port_availability(port_option, &node_registry.nodes)?;
}

let owner = match &options.owner {
Some(owner) => Some(owner.to_lowercase()),
Copy link
Member

Choose a reason for hiding this comment

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

shall we raise a warning here in case an UpperCase input detected ?

at least a warning log ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea.

@jacderida
Copy link
Contributor

Hey mazzi,

The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it.

@mazzi
Copy link
Contributor Author

mazzi commented Oct 3, 2024

Hey mazzi,

The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it.

I've modified an existing test. I didn't wanted to copy past the one that I've modified.
Did you see it? It's alright?
Thanks!

@jacderida
Copy link
Contributor

Hey mazzi,
The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it.

I've modified an existing test. I didn't wanted to copy past the one that I've modified. Did you see it? It's alright? Thanks!

Right, thanks. However, wouldn't it need an assertion that the assigned value is in lowercase?

@mazzi
Copy link
Contributor Author

mazzi commented Oct 3, 2024

Hey mazzi,
The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it.

I've modified an existing test. I didn't wanted to copy past the one that I've modified. Did you see it? It's alright? Thanks!

Right, thanks. However, wouldn't it need an assertion that the assigned value is in lowercase?

The assertion was already there. I just modified the input. Please check the whole test.

@jacderida
Copy link
Contributor

Hey mazzi,
The node manager has a test suite. It would be nice if we could add a test case for this. The tests can be a bit unwieldy though because they use a lot of mocking and stuff, so if it's too much hassle, don't worry about it.

I've modified an existing test. I didn't wanted to copy past the one that I've modified. Did you see it? It's alright? Thanks!

Right, thanks. However, wouldn't it need an assertion that the assigned value is in lowercase?

The assertion was already there. I just modified the input. Please check the whole test.

Ah ok cool, sorry. Approved.

@mazzi mazzi merged commit e8cc275 into maidsafe:rc-2024.10.2 Oct 3, 2024
38 checks passed
@mazzi mazzi deleted the fix_lowercase_owner branch October 3, 2024 14: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.

3 participants