Skip to content

initial carbon intensity annotation not always using latest carbon delay's intensity #40

@davemasselink

Description

@davemasselink

There's a subtle bug in the carbon savings calculations. Because we note the initial carbon intensity when we first see a pod... we indicate this annotation even if never carbon delayed. So the annotation write should be delayed until actually carbon delayed. Further, it is possible to, for instance:

  1. carbon delay with intensity at say 300
  2. intensity drops below threshold of 200
  3. CG releases BUT resource contention of some sort further delayed the pod until grid conditions worsen again
  4. intensity goes up and now we delay at 250
  5. later on, when calculating savings... the 250 "baseline" is the more accurate to use since it was the latest carbon delay prior to actual execution

essentially, we want to set the initial intensity annotation on each "rising edge" of the carbon delay state

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions