goose icon indicating copy to clipboard operation
goose copied to clipboard

Fix duplicate recipe upon schedule creation

Open amed-xyz opened this issue 1 month ago • 3 comments

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

amed-xyz avatar Oct 31 '25 19:10 amed-xyz

do we still want to get this in? do you have thoughts on my last remark?

DOsinga avatar Dec 04 '25 16:12 DOsinga

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.

amed-xyz avatar Dec 08 '25 22:12 amed-xyz

I'll take it from here thanks @amed-xyz!

zanesq avatar Dec 08 '25 23:12 zanesq