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

chore: error handling in params construction #934

Merged
merged 5 commits into from
Dec 1, 2023
Merged

Conversation

kaichaosun
Copy link
Contributor

@kaichaosun kaichaosun commented Nov 29, 2023

Description

The change add error handling based on this comment #930 (comment)
This seems a bit tedius to me and brings less value. How do you think?

@status-im-auto
Copy link

status-im-auto commented Nov 29, 2023

Jenkins Builds

Click to see older builds (5)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 0306f5b #1 2023-11-29 10:34:40 ~1 min nix-flake 📄log
✔️ 249d097 #2 2023-11-30 02:24:15 ~1 min nix-flake 📄log
✔️ 259a516 #3 2023-11-30 02:27:35 ~1 min nix-flake 📄log
✔️ ac3e8e3 #4 2023-11-30 02:29:30 ~1 min nix-flake 📄log
✔️ 7a3b601 #5 2023-11-30 06:17:40 ~1 min nix-flake 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7f9f9f2 #6 2023-11-30 06:20:41 ~1 min nix-flake 📄log
✔️ 09b8812 #7 2023-12-01 03:19:50 ~1 min nix-flake 📄log

@kaichaosun kaichaosun marked this pull request as draft November 29, 2023 11:17
@kaichaosun kaichaosun changed the title [DO NOT MERGE] chore: error handling in params construction chore: error handling in params construction Nov 29, 2023
Copy link
Member

@richard-ramos richard-ramos left a comment

Choose a reason for hiding this comment

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

I like the change. It will for sure improve the dev experience, since then a developer will know for sure that they cannot use both options at the same time (before they could but then the nameservers would have been ignored, so this will potentially save them debugging time and for us, having to give support in case such scenario happens)

@kaichaosun kaichaosun marked this pull request as ready for review November 30, 2023 02:23
@kaichaosun
Copy link
Contributor Author

Agree with the dev ex. I added another test for the coverage, please give another look. @chaitanyaprem @richard-ramos

Copy link
Collaborator

@chaitanyaprem chaitanyaprem left a comment

Choose a reason for hiding this comment

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

LGTM

@kaichaosun
Copy link
Contributor Author

kaichaosun commented Nov 30, 2023

codeclimate check is failed with excessive return statement, I loose the check for 6 return statements. I can also refactor the code to reduce the return statement, but have 4 return statement looks pretty strict.

Any clue why test-ci failed? It's happy now. 😂

@chaitanyaprem
Copy link
Collaborator

codeclimate check is failed with excessive return statement, I loose the check for 6 return statements. I can also refactor the code to reduce the return statement, but have 4 return statement looks pretty strict.

Any clue why test-ci failed? It's happy now. 😂

Codeclimate check is not mandatory as it has some weird checks like this return statements which are not possible to enforce all the time.

test-ci failure could be due to a flaky test, have noticed this sometimes before as well.

But, I don't think increasing return statements to 6 helps much, i would suggest if we can make codeclimate ignore this in total. @richard-ramos WDYT?

@richard-ramos
Copy link
Member

Any clue why test-ci failed? It's happy now.

Probably due to the flaky postgresql tests

@richard-ramos
Copy link
Member

But, I don't think increasing return statements to 6 helps much, i would suggest if we can make codeclimate ignore this in total. @richard-ramos WDYT?

We have 3 options here:

  1. Disable it
  2. Mark as wont fix in code climate

I kinda like option 2 because having multiple returns could be a sign of code smell, or a function that needs to be split up.

@chaitanyaprem
Copy link
Collaborator

But, I don't think increasing return statements to 6 helps much, i would suggest if we can make codeclimate ignore this in total. @richard-ramos WDYT?

We have 3 options here:

1. Disable it

2. Mark as wont fix in code climate

I kinda like option 2 because having multiple returns could be a sign of code smell, or a function that needs to be split up.

Let's go with option-2. Even i like it better.

@kaichaosun , please revert the codeclimate check change and then you are good to merge this PR.

@kaichaosun kaichaosun merged commit 16d59f3 into master Dec 1, 2023
10 checks passed
@kaichaosun kaichaosun deleted the more-resolver branch December 1, 2023 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants