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

feat: disable batch factory deps by default #476

Merged
merged 3 commits into from
Jul 15, 2024

Conversation

nbaztec
Copy link
Collaborator

@nbaztec nbaztec commented Jul 15, 2024

Motivation

Obtaining a viable byte size for batching factory deps is currently inconsistent and causes flakiness.

Solution

Until a more future-proof solution is possible, it's best to disable it by default.

To enable it MAX_FACTORY_DEPENDENCIES_SIZE_BYTES environment variable can be set to a desired value.

MAX_FACTORY_DEPENDENCIES_SIZE_BYTES=80000 forge script ...  // will batch deps upto 80kB

@nbaztec nbaztec requested a review from Karrq July 15, 2024 13:45
/// We batch factory_deps till this upper limit if there are multiple deps.
/// These batches are then deployed individually
pub const MAX_FACTORY_DEPENDENCIES_SIZE_BYTES: usize = 100000; // 100kB
lazy_static::lazy_static! {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use once_cell instead of lazy_static but this works anyways

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It shouldn't matter for this scenario, given that we plan on removing this.

@nbaztec nbaztec merged commit 0fc17fd into dev Jul 15, 2024
11 checks passed
@nbaztec nbaztec deleted the nish-optional-factory-dep-batching branch July 15, 2024 15:38
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