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

Revert "Handle Jobs with ttl_seconds_after_finished = 0 correctly" #2650

Merged

Conversation

justinmchase
Copy link
Contributor

@justinmchase justinmchase commented Dec 16, 2024

Reverts #2596

Per issue #2649, please revert this breaking change which regresses a critical feature.

@justinmchase justinmchase requested a review from a team as a code owner December 16, 2024 19:12
Copy link

hashicorp-cla-app bot commented Dec 16, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

Hi @justinmchase,

Thank you for reverting this change and properly reporting the related issue. Indeed, it looks like a breaking change and we need to find a better way to cover both scenarios without introducing a breaking change in the minor release.

I have left a small comment. Once it is addressed we can merge this change and cut a patch release.

@justinmchase
Copy link
Contributor Author

I updated the release notes files as requested and merged upstream main.

Copy link
Contributor

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

Thanks, @justinmchase!

@arybolovlev arybolovlev merged commit 7246275 into hashicorp:main Dec 20, 2024
22 of 25 checks passed
@justinmchase justinmchase deleted the revert-2596-fix-job-ttl-zero-handling branch December 20, 2024 15:56
JaylonmcShan03 pushed a commit that referenced this pull request Jan 9, 2025
@dmpakhar
Copy link

dmpakhar commented Feb 5, 2025

This change broke functionality, when job should be created once and then deleted.
In my scenario k8s job should be launched only once. Now this job recreates every apply and there are no ability not to skip creation of this job in the second run or small changes that would not require execution of the job.

@justinmchase
Copy link
Contributor Author

@dmpakhar Is it possible to add a separate field to get the behavior you want without regressing the behavior that is currently expected when ttl seconds after finish is 0?

If it helps, I will tell you that our Job is running a migration pod, the migration pod does run on every deployment but internally it is keeping track of the state of migration steps and applying them only once. This is a pretty standard way of handling run-once behavior rather than trying to manage it with terraform and kubernetes.

@dmpakhar
Copy link

@justinmchase
Hi,
I think this can be managed as an extra flag. From my perspective this behaviour should be defined via extra var. this will make logic clear for everyone.

Now we went in same issue, when same parameter changes behaviour.

I think execute_once/recreate_after_finished = true/false variable may be a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants