Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Introduce ProcessRefreshKind::tasks #1436

Merged
merged 20 commits into from
Jan 31, 2025

Conversation

sigsegved
Copy link
Contributor

No description provided.

@GuillaumeGomez
Copy link
Owner

A lot of extra docs to explain what this thread is about and that it only affects linux is needed too.

@sigsegved
Copy link
Contributor Author

#1432

@GuillaumeGomez
Copy link
Owner

Also: the new setting is still disabled by default.

@sigsegved
Copy link
Contributor Author

sigsegved commented Jan 29, 2025

Also: the new setting is still disabled by default.

No its not. In default we have tasks: true,. If i m not looking at the right thing can you please point me to it.?

@sigsegved
Copy link
Contributor Author

@GuillaumeGomez do you know why this task consistently fails? https://github.com/GuillaumeGomez/sysinfo/pull/1436/checks?check_run_id=36373553137

Doesnt seem to be related to my code change. its failing in rust setup.

@GuillaumeGomez
Copy link
Owner

Also: the new setting is still disabled by default.

No its not. In default we have tasks: true,. If i m not looking at the right thing can you please point me to it.?

Well, don't trust me, trust the code. Try:

let x = ProcessRefreshKind::new();
assert!(x.tasks());
Explanations

It's because you need to implement by hand the Default trait.

Please add a unit test with the code above too please.

@GuillaumeGomez do you know why this task consistently fails? https://github.com/GuillaumeGomez/sysinfo/pull/1436/checks?check_run_id=36373553137

Doesnt seem to be related to my code change. its failing in rust setup.

Yes, it's "normal". Rust's freebsd support is not great and there are often random failures depending on the nightly.

@sigsegved
Copy link
Contributor Author

sigsegved commented Jan 29, 2025

Also: the new setting is still disabled by default.

No its not. In default we have tasks: true,. If i m not looking at the right thing can you please point me to it.?

Well, don't trust me, trust the code. Try:

let x = ProcessRefreshKind::new();
assert!(x.tasks());

Explanations
It's because you need to implement by hand the Default trait.

Please add a unit test with the code above too please.

I see what you mean but ProcessRefreshKind does not have a new() fn. It has everything() and nothing(). nothing() uses the default() which means we do want tasks turned off as with other fields. everything() on the other hand turns on tasks as expected. I will update the tests to validate that using just everything() gets the tasks list.

@GuillaumeGomez do you know why this task consistently fails? https://github.com/GuillaumeGomez/sysinfo/pull/1436/checks?check_run_id=36373553137
Doesnt seem to be related to my code change. its failing in rust setup.

Yes, it's "normal". Rust's freebsd support is not great and there are often random failures depending on the nightly.

Bummer :( This shouldnt block me from merging this PR thought right?

@GuillaumeGomez
Copy link
Owner

I see what you mean but ProcessRefreshKind does not have a new() fn. It has everything() and nothing(). nothing() uses the default() which means we do want tasks turned off as with other fields. everything() on the other hand turns on tasks as expected. I will update the tests to validate that using just everything() gets the tasks list.

I actually wanted to write default(), but yes, you got the idea.

nothing should also get it. It gets the processes list, tasks are processes. So by default I'd still want them to be retrieved.

Bummer :( This shouldnt block me from merging this PR thought right?

Nah, not an issue. MacOS CI also randomly fails on test_environ. Not a blocker, it's a known issue.

@sigsegved
Copy link
Contributor Author

@GuillaumeGomez can i get an approval on this if everything looks good. This is blocking us from going into production in its current state.

@GuillaumeGomez
Copy link
Owner

@GuillaumeGomez can i get an approval on this if everything looks good. This is blocking us from going into production in its current state.

Well, neither you or your company is sponsoring my work so I have to admit it's not really one of my priorities. ^^'

sigsegved and others added 3 commits January 30, 2025 13:22
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@sigsegved
Copy link
Contributor Author

@GuillaumeGomez can i get an approval on this if everything looks good. This is blocking us from going into production in its current state.

Well, neither you or your company is sponsoring my work so I have to admit it's not really one of my priorities. ^^'

Going through your page, looks like my company was a previous sponsor. DM me and i would like to find out how you got sponsored before and see if I can re-engage the same path. Apologies, I'm super new to OS contributions.

@GuillaumeGomez
Copy link
Owner

I think this is the last review round before merging (if I didn't forget anything hopefully).

sigsegved and others added 3 commits January 31, 2025 11:54
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@GuillaumeGomez
Copy link
Owner

Okay, hopefully this time it's the last review round. 😆

sigsegved and others added 2 commits January 31, 2025 14:43
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@GuillaumeGomez
Copy link
Owner

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 520bff3 into GuillaumeGomez:master Jan 31, 2025
66 of 67 checks passed
@GuillaumeGomez GuillaumeGomez changed the title Introduce ProcessRefreshKind::Thread Introduce ProcessRefreshKind::tasks Jan 31, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants