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

First change to validate #4527

Closed
wants to merge 7 commits into from

Conversation

postmeback
Copy link

Issue Addressed

Fixes #4499

Proposed Changes

Remove the implementation of null_logger, else implement test_logger.

null_logger can be found common/task_executor/src/test_utils.rs

test_logger can be found common/logging/src

Additional Info

I have done only one change as of now. Please review and let me know, whether I am on a right path. Then, I will do changes in other places.

@ackintosh
Copy link
Member

Could you please change the target branch from stable to unstable?

@postmeback postmeback changed the base branch from stable to unstable July 24, 2023 13:04
@postmeback
Copy link
Author

Target branch changed from stable to unstable.

Can you review my changes, and let me know whether I am on the right path or not?

@paulhauner
Copy link
Member

Can you review my changes, and let me know whether I am on the right path or not?

Yep you're on the right path, feel free to proceed!

@paulhauner paulhauner added the work-in-progress PR is a work-in-progress label Jul 26, 2023
@postmeback
Copy link
Author

Changes done, Requesting for review.

Open for suggestions.

@postmeback
Copy link
Author

Requesting for review

@paulhauner
Copy link
Member

Heyo, I tried to fix the merge conflicts but I ran afoul of the formatter sorry. Could you please do git pull && cargo fmt and the commit+push the result?

@postmeback
Copy link
Author

Heyo, I tried to fix the merge conflicts but I ran afoul of the formatter sorry. Could you please do git pull && cargo fmt and the commit+push the result?

Sure, let me try.

@postmeback
Copy link
Author

image

I did git pull and cargo fmt.

Two files got changed in my branch. Shall I commit the cargo.lock ?

@paulhauner
Copy link
Member

Two files got changed in my branch. Shall I commit the cargo.lock ?

I'm not sure, but let's give it a go. Try committing both files and we can see what happens :)

@postmeback
Copy link
Author

Okay.

@postmeback
Copy link
Author

Done.

@paulhauner
Copy link
Member

Sorry @postmeback, it looks like committing the Cargo.lock wasn't the right thing to do. To fix it, I'd run:

git checkout unstable Cargo.lock
cargo check
git add Cargo.lock
git commit -m "Refresh Cargo.lock"
git push

@postmeback
Copy link
Author

So, now it is ok to go forward ?

@postmeback
Copy link
Author

The work-in-progress tab can be removed.

@paulhauner
Copy link
Member

paulhauner commented Aug 7, 2023

I pushed a fix to the Cargo.lock myself, so that's resolved now. However I can see that tests are failing and there are also instances of null_logger still remaining:

grep -rnw '.' -e 'null_logger' --exclude-dir 'target'
./common/task_executor/src/test_utils.rs:29:        let log = null_logger().unwrap();
./common/task_executor/src/test_utils.rs:70:pub fn null_logger() -> Result<Logger, String> {
./common/logging/src/lib.rs:236:            .expect("Should build null_logger")
./beacon_node/network/src/network_beacon_processor/mod.rs:14:use environment::null_logger;
./beacon_node/network/src/network_beacon_processor/mod.rs:553:        let log = null_logger().unwrap();

@paulhauner
Copy link
Member

paulhauner commented Aug 7, 2023

My advice would be to delete the null_logger() definition in ./common/task_executor/src/test_utils.rs:70: and then go about making sure that you can get both of these commands to run without error:

  1. make lint
  2. make udeps

That should be a surefire way of ensuring there are no more uses of null_logger and it would be a good start to producing something that will pass CI ☺️

@postmeback
Copy link
Author

Okay, will sure try. Thanks for the suggestion. ☺️

@dapplion dapplion added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed work-in-progress PR is a work-in-progress labels Jan 19, 2024
@dapplion
Copy link
Collaborator

Pinging author @postmeback

@dapplion
Copy link
Collaborator

dapplion commented Jun 27, 2024

Closing for inactivity. Thank you @postmeback for the contribution! Please feel free to pick other good first issues if you want to contribute again

@dapplion dapplion closed this Jun 27, 2024
@postmeback
Copy link
Author

Sorry was busy IRL. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-author The reviewer has suggested changes and awaits thier implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prefer test_logger over null_logger
4 participants