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

Inaccurate exception message in SimpleJobRepository #4025

Closed
wokier opened this issue Nov 4, 2021 · 4 comments
Closed

Inaccurate exception message in SimpleJobRepository #4025

wokier opened this issue Nov 4, 2021 · 4 comments
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: core status: ideal-for-contribution Issues that are ideal for contribution by the community type: enhancement
Milestone

Comments

@wokier
Copy link

wokier commented Nov 4, 2021

The exception is thrown with a message containing jobParameters , which is not what is used in the if to do the check.

"A job instance already exists and is complete for parameters=" + jobParameters

Exists since 3.0.10.RELEASE at least.

@fmbenhassine fmbenhassine added the status: waiting-for-triage Issues that we did not analyse yet label Dec 7, 2021
@fmbenhassine
Copy link
Contributor

fmbenhassine commented Apr 25, 2023

Thank you for raising this. While this is valid from a "coding" point of view, the job parameters passed as a parameter to the createJobExecution method and those retrieved from the job execution should be the same (modulo non-identifying parameters), unless we don't trust the implementation of jobInstanceDao.getJobInstance(jobName, jobParameters); and execution.getJobParameters().getParameters().

So I would consider this as an improvement to make the exception's message more accurate (in case of a bug in the parameters retrieval).

@fmbenhassine fmbenhassine added in: core type: enhancement status: ideal-for-contribution Issues that are ideal for contribution by the community and removed status: waiting-for-triage Issues that we did not analyse yet labels Apr 25, 2023
@morenomjc
Copy link
Contributor

Hi, is this open for contribution? And if just aligning the exception message with the if condition is enough.

@fmbenhassine
Copy link
Contributor

@morenomjc Sure! Thank you for your offer to help.

Every issue without an already open PR or tagged with status: for-internal-team is open for contribution.

So you are welcome to contribute if you want.

@morenomjc
Copy link
Contributor

Hi @fmbenhassine submitted a PR for this.

@fmbenhassine fmbenhassine added this to the 5.1.0-M3 milestone Sep 13, 2023
@fmbenhassine fmbenhassine changed the title Exception message incorrect in arguments check Inaccurate exception message in SimpleJobRepository Sep 13, 2023
@fmbenhassine fmbenhassine added the for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line label Sep 14, 2023
fmbenhassine pushed a commit that referenced this issue Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line in: core status: ideal-for-contribution Issues that are ideal for contribution by the community type: enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants