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: Migrate to humantime config parser #2085

Closed
3 tasks
squadgazzz opened this issue Nov 27, 2023 · 0 comments · Fixed by #2194
Closed
3 tasks

chore: Migrate to humantime config parser #2085

squadgazzz opened this issue Nov 27, 2023 · 0 comments · Fixed by #2194
Assignees

Comments

@squadgazzz
Copy link
Contributor

squadgazzz commented Nov 27, 2023

Background

Currently, units of config params with the Duration type are hard coded and being parsed using custom functions like duration_from_seconds. In order to switch between the units it's required to change the code which is not flexible.

Details

The humantime library allows us to specify durations in a more human-readable format (e.g., 1s, 2m, 3h). Currently, our configurations use plain numbers (interpreted as seconds), which can be less intuitive and error-prone. This migration will be executed in two distinct phases to ensure smooth transition and maintain compatibility with our existing deployment processes, specifically with Pulumi configurations.

  • Phase 1: Supporting Both Formats: The primary goal of the first phase is to update the application to support both the existing plain number format and the new humantime format simultaneously. This is crucial for maintaining system stability and ensuring uninterrupted operations during the migration process.
  • Phase 2: Completing the Migration to humantime: Once all the configurations in the Pulumi repository have been updated to the new humantime format, we will initiate the second phase.

Acceptance criteria

  • All the config params with Duration-intended types use humantime parser.
@squadgazzz squadgazzz self-assigned this Nov 27, 2023
This was referenced Dec 19, 2023
squadgazzz added a commit that referenced this issue Dec 21, 2023
# Description
Fully closes the #2085.
Since DEX solvers are about to migrate to a separate repo, it's a good
time to change the config format. It will be much more difficult later.

# Changes
Use `humantime` to parse `Duration` config params.

## How to test
e2e + staging

## Related Issues

Fixes #2085
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 a pull request may close this issue.

1 participant