Skip to content

Conversation

@hhood-smartling
Copy link
Contributor

- **REUSE_EXISTING**: Returns an existing job if one matches the evaluated name template. If the matching job is
cancelled, deleted or closed, creates a new job with a unique name using the specified `salt` strategy.
closed, creates a new job with a unique name using the specified `salt` strategy.
Copy link
Contributor

@vfisyuk-smartling vfisyuk-smartling Jan 19, 2026

Choose a reason for hiding this comment

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

According to the jobs facade service when mode is REUSE_EXISTING salt is applied when existing job's status is CANCELED, DELETED, or CLOSED, so the current documentation is correct.
https://github.com/Smartling/jobs-facade/blob/master/server/src/main/java/com/smartling/jobs/facade/service/JobsService.java#L113
https://github.com/Smartling/jobs-facade/blob/master/server/src/main/java/com/smartling/jobs/facade/jobs/JobApiV3Adaptor.java#L55

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, it should use salt whenever the job is in the final state.

Copy link
Contributor Author

@hhood-smartling hhood-smartling Jan 20, 2026

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @hhood-smartling,
On your screenshot, I see a canceled job Daily Update 2025-12-16 (Cancelled 2025/12/16 15:01:50) and a new job Daily Update 2025-12-16. When a job is canceled, its name is changed, and a new job is created without salt because there is no job with the same name (Daily Update 2025-12-16).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @vfisyuk-smartling

Yes, based on this behavior, we feel the current API documentation wording could be a bit misleading or confusing for users.

Specifically, this line stood out to us:

“REUSE_EXISTING: Returns an existing job if one matches the evaluated name template. If the matching job is cancelled, deleted or closed, creates a new job with a unique name using the specified salt strategy.

From our understanding, a matching job would always be a closed job. It wouldn’t be a canceled job, since—as you mentioned—when a job is canceled, its name is updated to include a cancellation timestamp.

We also thought users might interpret “matching” to mean a job created with the same date, even if the job name technically includes a suffix and therefore doesn’t exactly match. That’s how we initially read it, which is why the wording raised questions for us.

That said, if you disagree, that’s totally fine—we’re happy to drop it. Thanks so much for taking the time to clarify this for us.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @hhood-smartling,
My understanding is that the matching job is a job that matches the evaluated name template (based on the first sentence in the API documentation). But feel free to update it to be not confusing.
Thank you!

Copy link
Contributor

Choose a reason for hiding this comment

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

Given the provided use-cases - the only job state where the salt would be added is when a job is closed, other states are not applicable.
Updating the wording in documentation totally makes sense.
Thank you @hhood-smartling for testing and bringing this up!

**When salt is applied**:
- With **REUSE_EXISTING**: Salt is appended when an existing job with the evaluated name is in a closed or completed
- With **REUSE_EXISTING**: Salt is appended when an existing job with the evaluated name is in a closed
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the above:

Suggested change
- With **REUSE_EXISTING**: Salt is appended when an existing job with the evaluated name is in a closed
- With **REUSE_EXISTING**: Salt is appended when an existing job with the evaluated name is in a cancelled, deleted or closed

Copy link
Contributor

@maescomua maescomua left a comment

Choose a reason for hiding this comment

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

100% agree - totally makes sense.
Thank you!

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.

5 participants