buildgrid 0.3.3__py3-none-any.whl → 0.3.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2464,14 +2464,16 @@ class Scheduler:
2464
2464
  action_result.execution_metadata.worker_completed_timestamp.FromDatetime(job.worker_completed_timestamp or now)
2465
2465
  response = ExecuteResponse(result=action_result, cached_result=False, status=status)
2466
2466
 
2467
- job.result = digest_to_string(self.storage.put_message(response))
2467
+ with instance_context(job.instance_name):
2468
+ job.result = digest_to_string(self.storage.put_message(response))
2468
2469
 
2469
2470
  self._update_job_timestamps(session, job, action_result.execution_metadata)
2470
2471
 
2471
2472
  if self.action_cache and result and not job.do_not_cache:
2472
2473
  action_digest = string_to_digest(job.action_digest)
2473
2474
  try:
2474
- self.action_cache.update_action_result(action_digest, action_result)
2475
+ with instance_context(job.instance_name):
2476
+ self.action_cache.update_action_result(action_digest, action_result)
2475
2477
  LOGGER.debug(
2476
2478
  "Stored action result in ActionCache.",
2477
2479
  tags=dict(action_result=action_result, digest=action_digest),
@@ -2662,7 +2664,9 @@ class Scheduler:
2662
2664
  return metadata
2663
2665
 
2664
2666
  def _fetch_execution_stats(
2665
- self, auxiliary_metadata: RepeatedCompositeFieldContainer[ProtoAny]
2667
+ self,
2668
+ auxiliary_metadata: RepeatedCompositeFieldContainer[ProtoAny],
2669
+ instance_name: str,
2666
2670
  ) -> ExecutionStatistics | None:
2667
2671
  """Fetch ExecutionStatistics from Storage
2668
2672
  ProtoAny[Digest] -> ProtoAny[ExecutionStatistics]
@@ -2675,7 +2679,8 @@ class Scheduler:
2675
2679
  try:
2676
2680
  aux_metadata_any.Unpack(aux_metadata_digest)
2677
2681
  # Get the blob from CAS
2678
- execution_stats_any = self.storage.get_message(aux_metadata_digest, ProtoAny)
2682
+ with instance_context(instance_name):
2683
+ execution_stats_any = self.storage.get_message(aux_metadata_digest, ProtoAny)
2679
2684
  # Get the wrapped ExecutionStatistics
2680
2685
  if execution_stats_any and execution_stats_any.Is(ExecutionStatistics.DESCRIPTOR):
2681
2686
  execution_stats = ExecutionStatistics()
@@ -2739,7 +2744,7 @@ class Scheduler:
2739
2744
  if self.metering_client is None or len(execution_metadata.auxiliary_metadata) == 0:
2740
2745
  return
2741
2746
 
2742
- execution_stats = self._fetch_execution_stats(execution_metadata.auxiliary_metadata)
2747
+ execution_stats = self._fetch_execution_stats(execution_metadata.auxiliary_metadata, instance_name)
2743
2748
  if execution_stats is None:
2744
2749
  return
2745
2750
  usage = Usage(
@@ -2809,7 +2814,8 @@ class Scheduler:
2809
2814
  try:
2810
2815
  # BuildGrid doesn't store action_result in CAS, but if we push it as an asset
2811
2816
  # we need it to be accessible
2812
- digest = self.storage.put_message(action_result)
2817
+ with instance_context(instance_name):
2818
+ digest = self.storage.put_message(action_result)
2813
2819
 
2814
2820
  uri = DIGEST_URI_TEMPLATE.format(digest_hash=digest.hash)
2815
2821
  qualifier = {"resource_type": PROTOBUF_MEDIA_TYPE}
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
 
15
15
 
16
- __version__ = "0.3.3"
16
+ __version__ = "0.3.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: buildgrid
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: A remote execution service
5
5
  License: Apache License, Version 2.0
6
6
  Project-URL: Homepage, https://buildgrid.build
@@ -208,7 +208,7 @@ buildgrid/server/servicer.py,sha256=oqU9MaSxxHTDmSxobFTo9YmJctaUCklE2Dj-vfYWKkc,
208
208
  buildgrid/server/settings.py,sha256=I1UK-g4_GwkX0nGC3hdGS3Cc0Rh1HTYDv2aHU2sq_eU,5604
209
209
  buildgrid/server/threading.py,sha256=4QKQYev2KoO2Q-S_OyaoR9qpWyDTVzGMWVe9o2a1yIU,4743
210
210
  buildgrid/server/types.py,sha256=xG3bx64pbWMuEwXLuI0o8c2unt2rU2C4zsmUfmMT12c,1323
211
- buildgrid/server/version.py,sha256=ZFnZSeeeNvUxJJyB2m9gdtWL-3UIBuVI7L2U-mwR2NU,603
211
+ buildgrid/server/version.py,sha256=4k5OkV-7Atvya4h3lD2iv9J9jKDYco6vdVsLmuievhM,603
212
212
  buildgrid/server/actioncache/__init__.py,sha256=g9lb8Sn7NY5KOjkMr9GQoJovCVDEg_Fxz_EhdDbhP1I,579
213
213
  buildgrid/server/actioncache/instance.py,sha256=UCR7ZGkv4fJOXjeIILMAdTSFWcGgBSYlBg8fMaPJpaI,3139
214
214
  buildgrid/server/actioncache/service.py,sha256=WcikJAzFYOYX-tgiOfGGcOnPoubrCd4yP-EhKCHEW0c,2021
@@ -331,7 +331,7 @@ buildgrid/server/scheduler/__init__.py,sha256=arCg8LWFATeX1tj-s0keVYP8p3wwrrUlCV
331
331
  buildgrid/server/scheduler/assigner.py,sha256=wHPAhyiQxYABZJXaUc2g5yFzM78Z0U5nvGV3X9h5pCM,10512
332
332
  buildgrid/server/scheduler/cohorts.py,sha256=L_5YZRiVOwPPGStfqnnQXknO5Ja-SC0vq0xjw4XgP-I,1426
333
333
  buildgrid/server/scheduler/events.py,sha256=cM7Z7Htr2pYKhltJxfg1YRo0q524yZaGm8yXvRehivk,1453
334
- buildgrid/server/scheduler/impl.py,sha256=BT5JIdh7B6-pw1OHxnhJjZgQ1sM3T1UxakXoc6ppBxs,136236
334
+ buildgrid/server/scheduler/impl.py,sha256=BOeR89gJfZ1L9BPzaUoxCUmWqvJGBYauIbphMprrs3U,136516
335
335
  buildgrid/server/scheduler/notifier.py,sha256=22ZsKwyf2oQirAjrwROkvgvr4C_TMUNyhOmtro4uM4I,7121
336
336
  buildgrid/server/scheduler/properties.py,sha256=2GydX8KUy9MFv1_JznIkGfWE_wOS0m_XapSv6Gp4pCM,11260
337
337
  buildgrid/server/sql/__init__.py,sha256=zbeeRP9BEeDzR-Mx2Ip6SUr49J8eeXsuREgljJTrHkk,579
@@ -366,9 +366,9 @@ buildgrid/server/utils/async_lru_cache.py,sha256=iLKeRPoZtZb1wC5AtcyQm8Wt0Bx-KZm
366
366
  buildgrid/server/utils/bots.py,sha256=c8hn7tbCecru-m2wicRmtKU5v5rSZPGlk97Yc6eUHgQ,1729
367
367
  buildgrid/server/utils/cancellation.py,sha256=pNETzKNoXg0AsXOXKCcLWlFl7SVKdkKinlqWl7MesRA,1703
368
368
  buildgrid/server/utils/digests.py,sha256=YNrWeHdbNp7OVTcsInjs30C33z_t9GQ_noMd14bpqPQ,2424
369
- buildgrid-0.3.3.dist-info/licenses/LICENSE,sha256=swa3Vs7GgALaG9p-e05M-WLkhd_U9QknacNkyVZ85xA,11338
370
- buildgrid-0.3.3.dist-info/METADATA,sha256=dshu6eNHOz_JPLV3tM3gGitvI9BaGiWpgTWvv2sqjb0,7086
371
- buildgrid-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
372
- buildgrid-0.3.3.dist-info/entry_points.txt,sha256=uyFAXiR9d6EDfSA5vWT8xskz6xalt4PdTuRruT6Q8rk,49
373
- buildgrid-0.3.3.dist-info/top_level.txt,sha256=T6TYhI_k6NTm2871tIxGCyBIqzlKxylgF9KDLU0Hi7o,10
374
- buildgrid-0.3.3.dist-info/RECORD,,
369
+ buildgrid-0.3.4.dist-info/licenses/LICENSE,sha256=swa3Vs7GgALaG9p-e05M-WLkhd_U9QknacNkyVZ85xA,11338
370
+ buildgrid-0.3.4.dist-info/METADATA,sha256=YkM4cIQyoDCPVLbBqsCh5DdB6shR2WJ1863d2XZUtwQ,7086
371
+ buildgrid-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
372
+ buildgrid-0.3.4.dist-info/entry_points.txt,sha256=uyFAXiR9d6EDfSA5vWT8xskz6xalt4PdTuRruT6Q8rk,49
373
+ buildgrid-0.3.4.dist-info/top_level.txt,sha256=T6TYhI_k6NTm2871tIxGCyBIqzlKxylgF9KDLU0Hi7o,10
374
+ buildgrid-0.3.4.dist-info/RECORD,,