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

[batch] introduce Support-Logs-Specs-and-Firewall fee #13542

Merged
merged 8 commits into from
Sep 25, 2023

Conversation

danking
Copy link
Contributor

@danking danking commented Sep 1, 2023

Fixes #13526

I verified I got the right number. I didn't import since I think we decided we shouldn't rely on the code base in the migrations.

In [1]: from hailtop.utils.rates import rate_instance_hour_to_fraction_msec, rate_cpu_hour_to_mcpu_msec
   ...: 
   ...: rate_cpu_hour_to_mcpu_msec(0.005) == 0.000000000001388888888888889

@danking
Copy link
Contributor Author

danking commented Sep 1, 2023

@jigold not actually WIP, but I want control over when it merges. Ready for review.

jigold
jigold previously requested changes Sep 1, 2023
@@ -151,6 +153,7 @@ def from_dict(data: dict) -> 'GCPSlimInstanceConfig':
GCPDynamicSizedDiskResource('disk/pd-ssd/1'),
GCPIPFeeResource('service-fee/1'),
GCPServiceFeeResource('ip-fee/1024/1'),
GCPSupportLogsSpecsAndFirewallFees('gcp-support-logs-specs-and-firewall-fees/1'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need this as it's for backwards compatibility. See comment in #13539.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you elaborate on what kind of backwards compatibility? Should we remove this branch entirely?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can. It was for when the instance_config field was not in the database for old entries, so their value is NULL. We knew what the config should be at the time though. The only reason we'd need this code path is if we wanted to compute resources for old instances. I don't know why we would want to do that.

Copy link
Contributor Author

@danking danking Sep 1, 2023

Choose a reason for hiding this comment

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

@danking danking removed the WIP label Sep 25, 2023
@danking danking merged commit 7d69b76 into hail-is:main Sep 25, 2023
8 checks passed
danking pushed a commit that referenced this pull request Feb 1, 2024
Fixes #13784 

Here's the GCP documentation:
https://cloud.google.com/vpc/pricing-announce-external-ips

We were previously billing the same IP-Fee for both spot and regular
instances. I changed it so we're billing for each instance type
accordingly.

Following #13542, I hard coded the new resource rates.
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.

[batch] adjust Hail's cost structure to recover operating expenses
2 participants