Hi folks, I created a kubernetes-job Block using ...
# prefect-ui
a
Hi folks, I created a kubernetes-job Block using the prefect-provided kubernetes-job block type some months ago (I think with prefect 2.2.0) and now wanted to edit this Block in the UI to include the magnificent finished_job_ttl setting. However, my existing Block looks somewhat odd. If you have a look at the attached image, you can see that below the "Customizations (Optional)" field, there is another unnamed field just called (optional). If I create a new k8s-job using the prefect-provided kubernetes-job block type, below the "Customizations (Optional)" field, there is the finished_job_ttl setting. Is there a way to somehow "fix" my existing block? Or should I recreate it from scratch? Is this worth a Bug-Reportin github?
c
Blocks always use the block schema they were created with. So one you’ve created a block there isn’t a way to “update” it. If you want to use the latest version you’ll need to create a new block. I believe if you delete your existing block you can create another one with the same name.
a
Ah I see, thanks. Final question: If I use a a block for infrastructure (like kubernetes-job) - then execute ``prefect deployment build`` using this block - does the deployment somehow have a link to this block? Meaning, if I change something in the block after creation of a deployment, is this reflected in next flow run of this deployment?
c
That's a good question and I'm not sure. I would ask this as a new question so someone else who knows for sure can give you an answer