superchain-ops icon indicating copy to clipboard operation
superchain-ops copied to clipboard

Enforce folder numbering

Open maurelian opened this issue 1 year ago • 8 comments

We should add a check in CI to ensure that within a task folder, the numbering of tasks is increasing and does not overlap.

ie. #200 currently introduces a new dir tasks/sep/009-fpac-upgrade which is incorrect since there is already a tasks/sep/009-presigned-pause.

This happens easily due to race conditions between new tasks, so we should automatically check for it.

maurelian avatar May 21 '24 18:05 maurelian

May i work on this issue?

ShubhSensei avatar Jun 20 '24 12:06 ShubhSensei

Hey @ShubhSensei, are you still interested in working on this? If so, here is my thinking for what we should do:

  • Add a new script/utils/check-task-numbering.sh
  • This is a shell script that loops through every tasks/{network} folder. These folders contain a bunch of tasks of the form {number}-{optionalOtherNumber-}{taskName}
  • We call {number}-{optionalOtherNumber-} the task prefix
  • For each folder, ensure that every task prefix is unique
  • Run this new shell script in CI

I think we should only check for uniqueness, and not for any type of ordering or incrementing pattern. This is because:

  1. Uniqueness is simpler
  2. We do not always add tasks in order, i.e. sometimes for a bundle of upcoming tasks we'll add task 018 before task 017 is ready, but we don't want to block task 018 from being merged

@maurelian what do you think of this spec?

mds1 avatar Sep 27 '24 22:09 mds1

Yes @mds1 of course... I'm on it 🫡 BTW, is their any other medium where I can solve my queries otherwise it'll take forever like this.

ShubhSensei avatar Sep 28 '24 23:09 ShubhSensei

Thanks, assigned! And apologies for the slow response here, I had meant to come back to this after #152 was addressed but never did 😅

mds1 avatar Sep 30 '24 14:09 mds1

The spec LGTM yes.

maurelian avatar Sep 30 '24 18:09 maurelian

How do I run this script in CI? @mds1

ShubhSensei avatar Oct 07 '24 10:10 ShubhSensei

How do I run this script in CI?

I left a comment on the PR with this info

mds1 avatar Oct 07 '24 21:10 mds1

@ShubhSensei, thanks for your initial work on this, I gave it another go.

alcueca avatar Feb 28 '25 15:02 alcueca