Fix duplicate recipe upon schedule creation
Summary
Current behavior: Once a recipe is scheduled, a duplicate version of the existing recipe is created in the Recipe view. This is due temp files are created in GOOSE_WORKING_DIR during schedule creation but never cleaned up.
Expected behavior: Scheduling an existing recipe should not create a duplicate entry in the Recipe view.
Type of Change
- [ ] Feature
- [x] Bug fix
- [ ] Refactor / Code quality
- [ ] Performance improvement
- [ ] Documentation
- [ ] Tests
- [ ] Security fix
- [ ] Build / Release
- [ ] Other (specify below)
Testing
Success Path:
- Create a schedule from a recipe
- Submit successfully
- Check
GOOSE_WORKING_DIR- temp file should be deleted
Cancel Path:
- Create a schedule from a recipe
- Click Cancel before submitting
- Check
GOOSE_WORKING_DIR- temp file should be deleted
Related Issues
Relates to https://github.com/block/goose/issues/5383
do we still want to get this in? do you have thoughts on my last remark?
wouldn't be easier not to create the temporary file in the goose working dir (whatever that is?) despite the final handlers etc, this still seems a bit brittle.
Yes, maybe? These changes still fix the underlying bug which has been around for a long while, they can be merged as-is or pivoted to your approach, however I don't have bandwidth for the latter.
I'll take it from here thanks @amed-xyz!