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

runMonitoring take more types addition #2390

Closed
wants to merge 6 commits into from

Conversation

saadkhi
Copy link

@saadkhi saadkhi commented Oct 29, 2024

The issue solved was to make runMonitoring accept different job inputs—specifically, an integer (job ID), a list of integers (job IDs), and a job object—in addition to the original job slice format. This increases flexibility in specifying jobs for monitoring.

fixed #2380

@saadkhi saadkhi had a problem deploying to Integrate Pull Request October 29, 2024 19:07 — with GitHub Actions Failure
@mesmith75
Copy link
Contributor

You seem to have included your virtualenv in the commit - could you remove that?

You also seem to have touched a lot of things that are best left alone. Also I think some issues have occurred with indenting/whitespace etc. Could you try and tidy that up?

The issue only needs some pretty minimal changes so could you try and tidy this up to only include the minimal adjustments necessary?

@saadkhi
Copy link
Author

saadkhi commented Oct 30, 2024

Yes, I will make changes and update soon.

@saadkhi saadkhi had a problem deploying to Integrate Pull Request October 30, 2024 20:18 — with GitHub Actions Failure
@saadkhi saadkhi requested a review from mesmith75 October 30, 2024 20:18
@saadkhi saadkhi temporarily deployed to Integrate Pull Request October 30, 2024 20:29 — with GitHub Actions Inactive
@egede egede linked an issue Nov 4, 2024 that may be closed by this pull request
@egede
Copy link
Member

egede commented Nov 4, 2024

There is something odd going on with the testing here. Not sure what as it seems unrelated to the code changes that you have made.

@alexanderrichards
Copy link
Contributor

@saadkhi I think for the failure of the autopep8 test, when you created the pull request did you click the checkbox to allow upstream developers to make changes to your branch? My best guess at the moment for whats happening here is it's trying to create the autopep8 branch to pull against your branch Enh_int

@egede
Copy link
Member

egede commented Nov 4, 2024

@saadkhi Take a look at the GangaCore Integration tests. There are 3 errors there that relate to the code that you modified. Please take a look first yourself and then ask for help if you can't figure out what is wrong.

Check the full details. Extract below.

FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_b_EnableMonitoring - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'
FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_g_runMonitoring_withJobIDList - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'
FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_h_runMonitoring_withJobObject - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'

@saadkhi
Copy link
Author

saadkhi commented Nov 4, 2024

@saadkhi I think for the failure of the autopep8 test, when you created the pull request did you click the checkbox to allow upstream developers to make changes to your branch? My best guess at the moment for whats happening here is it's trying to create the autopep8 branch to pull against your branch Enh_int

I'm not sure about it, let me check and fix what is going wrong with it.

@saadkhi
Copy link
Author

saadkhi commented Nov 4, 2024

@saadkhi Take a look at the GangaCore Integration tests. There are 3 errors there that relate to the code that you modified. Please take a look first yourself and then ask for help if you can't figure out what is wrong.

Check the full details. Extract below.

FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_b_EnableMonitoring - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'
FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_g_runMonitoring_withJobIDList - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'
FAILED ganga/GangaCore/test/GPI/Monitoring/TestMonitoring.py::TestMonitoring::test_h_runMonitoring_withJobObject - TypeError: AsyncMonitoringService.runMonitoring() got an unexpected keyword argument 'steps'

yes, @egede I'm working on it to figure out why these test cases get failling.

Signed-off-by: saadkhi <[email protected]>
@saadkhi saadkhi deployed to Integrate Pull Request November 4, 2024 18:24 — with GitHub Actions Active
@saadkhi
Copy link
Author

saadkhi commented Nov 4, 2024

@saadkhi I think for the failure of the autopep8 test, when you created the pull request did you click the checkbox to allow upstream developers to make changes to your branch? My best guess at the moment for whats happening here is it's trying to create the autopep8 branch to pull against your branch Enh_int

I’m having trouble understanding what autopep8 is and how it applies to my pull request. Could you please explain it, or if possible, arrange a meeting sometime this week to discuss?

@alexanderrichards
Copy link
Contributor

alexanderrichards commented Nov 5, 2024

I’m having trouble understanding what autopep8 is and how it applies to my pull request. Could you please explain it, or if possible, arrange a meeting sometime this week to discuss?

so PEP8 is the python style guidelines for coding. Autopep8 is a tool that when run over a codebase will convert all files to the PEP8 standard. As part of our CI/CD pipeline we run an action that automatically runs this autopep8 tool over the files that you have modified and creates a new branch/pull request with the changes necessary to meet the PEP8 standard.

Hopefully that is clear. If not, I can have a separate conversation with you or alternatively you could probably join our Monday morning (UK time) meeting.

@saadkhi
Copy link
Author

saadkhi commented Nov 9, 2024

I’m having trouble understanding what autopep8 is and how it applies to my pull request. Could you please explain it, or if possible, arrange a meeting sometime this week to discuss?

so PEP8 is the python style guidelines for coding. Autopep8 is a tool that when run over a codebase will convert all files to the PEP8 standard. As part of our CI/CD pipeline we run an action that automatically runs this autopep8 tool over the files that you have modified and creates a new branch/pull request with the changes necessary to meet the PEP8 standard.

Hopefully that is clear. If not, I can have a separate conversation with you or alternatively you could probably join our Monday morning (UK time) meeting.

Okay, I'll join the meeting and then will solve the autopep8 issue after meeting as soon as possible.

@alexanderrichards
Copy link
Contributor

Okay, I'll join the meeting and then will solve the autopep8 issue after meeting as soon as possible.

👍🏻 The meeting is in 17 mins. Do you have the connection details? If you are on the mattermost channel there is a link at the top

Copy link
Member

@egede egede left a comment

Choose a reason for hiding this comment

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

There is something really fishy here.

It turns out that we have two runMonitoring functions in the codebase. One in MonitoringService.py and one in Local_GangaMC_Service.py.

If I force the runMonitoring method that is edited in this PR to always return False, then the tests are still passing! My conclusion is that the code is never called.

@egede
Copy link
Member

egede commented Nov 12, 2024

So looking in the coverage of the testing I indeed see that the code that you have implemented is never executed. So in fact the entire runMonitoring function in Local_GangaMC_Service.py can be removed.

@egede
Copy link
Member

egede commented Nov 12, 2024

So the real question now is what the new test files are actually testing. At the moment they just look for runMonitoring returning True, but they should be extended to see if the jobs in question are actually monitored (and others not). It could be the argument is just ignored. Sorry @saadkhi but this is turning more complicated that we realised and we probably gave you the wrong advise to begin with.

@saadkhi
Copy link
Author

saadkhi commented Nov 12, 2024

So the real question now is what the new test files are actually testing. At the moment they just look for runMonitoring returning True, but they should be extended to see if the jobs in question are actually monitored (and others not). It could be the argument is just ignored. Sorry @saadkhi but this is turning more complicated that we realised and we probably gave you the wrong advise to begin with.

Hi @egede, thank you for your guidance. Initially, I created the test cases based on the Local_GangaMC_Service implementation in Ganga, but encountered errors during your testing process. After that, I noticed the runMonitoring functionality in the MonitoringService and adjusted the test cases accordingly. One more things, just tell that the issue is from my side thats why code is not merged.

I’ll continue to explore the Ganga project and improve my contributions alongside the team. I appreciate your support and feedback. Thank you again!

@mesmith75
Copy link
Contributor

I think this went a bit off-piste, so closing.

@mesmith75 mesmith75 closed this Dec 9, 2024
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.

Make runMonitoring take more types
4 participants