Skip to content

[18.0][FIX] Adapt queue_job_profiler to job aquisition refactor#941

Open
TDu wants to merge 2 commits into
OCA:18.0from
camptocamp:18-queue-job-profiler-adapt-to-refactor-job-aquisition
Open

[18.0][FIX] Adapt queue_job_profiler to job aquisition refactor#941
TDu wants to merge 2 commits into
OCA:18.0from
camptocamp:18-queue-job-profiler-adapt-to-refactor-job-aquisition

Conversation

@TDu
Copy link
Copy Markdown
Member

@TDu TDu commented Jun 4, 2026

That module was develop before this change

The new module tests were not affected by the change when merging.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @simahawk,
some modules you are maintaining are being modified, check this out!

@OCA-git-bot OCA-git-bot added series:18.0 mod:queue_job_profiler Module queue_job_profiler labels Jun 4, 2026
Copy link
Copy Markdown
Member

@amh-mw amh-mw left a comment

Choose a reason for hiding this comment

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

Code review only, LGTM. Bonus points still available for a unit test that would have noticed the method signature change.

@simahawk
Copy link
Copy Markdown
Contributor

simahawk commented Jun 4, 2026

@TDu can you try to add the test?
As you are there, can you pls rewrite the commit msg to something like

[FIX] queue_job_profiler: controller hook

Broken by job acquisition refactoring #941

?

Broken by job acquisition refactoring OCA#941
@TDu TDu force-pushed the 18-queue-job-profiler-adapt-to-refactor-job-aquisition branch from 8fc1700 to c5e8590 Compare June 5, 2026 09:28
@TDu TDu force-pushed the 18-queue-job-profiler-adapt-to-refactor-job-aquisition branch from c5e8590 to ffa8ca2 Compare June 5, 2026 09:30
@TDu
Copy link
Copy Markdown
Member Author

TDu commented Jun 5, 2026

About adding a test that would have cached the change and make the module fail. I agree it would have been good to have one, but I am not sure of the pertinence of adding it afterwards.
For such test to make sense it would need to call the _run_job function and render the test suite more complex.

But I have updated the tests to use the RunJobController class and not an instance of it.
And remove the commit mock, because it is not needed IMO

if not config["test_enable"]:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:queue_job_profiler Module queue_job_profiler series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants