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

tembo-stacks: fix parsing storages in tebibytes #839

Merged
merged 1 commit into from
Jun 7, 2024
Merged

Conversation

vrmiguel
Copy link
Contributor

@vrmiguel vrmiguel commented Jun 7, 2024

  • Fixes parsing storage decls that can now be 1Ti, 1.5Ti and 2Ti
  • Removes a couple of heap allocations in the process
  • Removes the regex dependency, which could perhaps save us a bit of build time, uses a simpler naive alternative instead

@vrmiguel vrmiguel marked this pull request as ready for review June 7, 2024 15:15
@vrmiguel vrmiguel merged commit 3851b11 into main Jun 7, 2024
7 checks passed
@vrmiguel vrmiguel deleted the cloud-856 branch June 7, 2024 15:18
Comment on lines +470 to +489
let mut stack = Stack {
name: "parse-storage-inst".into(),
compute_constraints: None,
description: None,
organization: "tembo".into(),
repository: default_repository(),
images: Default::default(),
stack_version: None,
trunk_installs: None,
extensions: None,
postgres_metrics: None,
postgres_config: None,
postgres_config_engine: None,
infrastructure: Some(Infrastructure {
cpu: "1".into(),
memory: "1Gi".into(),
storage: "10Gi".into(),
}),
app_services: None,
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

btw - Stack::default() should also work here

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.

None yet

2 participants