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

chore: add deprecated flags to force early crash when used #165

Merged
merged 10 commits into from
Oct 7, 2024

Conversation

samlaf
Copy link
Collaborator

@samlaf samlaf commented Oct 3, 2024

Recent flags refactor PR changed a bunch of flags. Added some those deprecated flags back, crashing the program if they are ever used to force users to change to the new flags.

I'm sure I missed a bunch of flags though given that the flags have been dispersed locally in a bunch of different modules. Would be a tough job to make sure to get all the deprecated flags... I propose we leave it at this. @bxue-l2 wdyt?

@bxue-l2
Copy link
Collaborator

bxue-l2 commented Oct 3, 2024

It looks really bad on us if we simply just crash. It is not a common practice, nor not backward compatible.

I think we should treat it more seriously, and It is a hard problem, perhaps we can devise a runbook to change the flags.

For this issue, we will take the hard job. I will create a doc for such scheme

@bxue-l2
Copy link
Collaborator

bxue-l2 commented Oct 4, 2024

Ok, we will resume the task.

@samlaf
Copy link
Collaborator Author

samlaf commented Oct 5, 2024

@bxue-l2 finished adding deprecated warnings for all flags according to your doc.
One ugliness from changing the verification flag to be enabled by default, is that we get this behavior now when turning memstore on.
image
There's a TODO here to fix this.

&cli.BoolFlag{
Name: DeprecatedWaitForFinalizationFlagName,
Usage: "Wait for blob finalization before returning from PutBlob.",
EnvVars: withDeprecatedEnvPrefix(envPrefix, "WAIT_FOR_FINALIZATION"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

WAIT_FOR_FINALIZATION isn't introduced before

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

}

func withDeprecatedEnvPrefix(envPrefix, s string) []string {
return []string{envPrefix + "_" + s}
Copy link
Collaborator

Choose a reason for hiding this comment

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

for many ENV, there is not list of string, can you change

Copy link
Collaborator

Choose a reason for hiding this comment

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

For example, SERVICE_MANAGER_ADDR, list notation is confusing
Screenshot 2024-10-07 at 1 29 44 PM

The MEMstore one is better

Screenshot 2024-10-07 at 1 32 17 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you also change here, https://github.com/Layr-Labs/eigenda-proxy/blob/main/verify/cli.go#L44.

With the latest change, it looks like this
Screenshot 2024-10-07 at 2 09 15 PM
Not sure why it has to be a list

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bxue-l2
Copy link
Collaborator

bxue-l2 commented Oct 7, 2024

Besides those, I tested manually, everything work, nice

@samlaf samlaf merged commit ded08b0 into main Oct 7, 2024
7 checks passed
@samlaf samlaf deleted the backward-compatible-flags branch October 7, 2024 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants