MCPcopy Index your code
hub / github.com/feast-dev/feast / update

Method update

sdk/python/feast/diff/infra_diff.py:39–66  ·  view source on GitHub ↗

Apply the infrastructure changes specified in this object.

(self, progress_ctx: Optional["ApplyProgressContext"] = None)

Source from the content-addressed store, hash-verified

37 self.infra_object_diffs = []
38
39 def update(self, progress_ctx: Optional["ApplyProgressContext"] = None):
40 """Apply the infrastructure changes specified in this object."""
41
42 for infra_object_diff in self.infra_object_diffs:
43 if infra_object_diff.transition_type in [
44 TransitionType.DELETE,
45 TransitionType.UPDATE,
46 ]:
47 infra_object = InfraObject.from_proto(
48 infra_object_diff.current_infra_object
49 )
50 if progress_ctx:
51 progress_ctx.update_phase_progress(
52 f"Tearing down {infra_object_diff.name}"
53 )
54 infra_object.teardown()
55 elif infra_object_diff.transition_type in [
56 TransitionType.CREATE,
57 TransitionType.UPDATE,
58 ]:
59 infra_object = InfraObject.from_proto(
60 infra_object_diff.new_infra_object
61 )
62 if progress_ctx:
63 progress_ctx.update_phase_progress(
64 f"Creating/updating {infra_object_diff.name}"
65 )
66 infra_object.update()
67
68 def to_string(self):
69 from colorama import Fore, Style

Callers 15

cleanup_dynamo_ciFunction · 0.45
_apply_diffsMethod · 0.45
_materialize_odfvMethod · 0.45
get_needed_request_dataFunction · 0.45
tags_list_to_dictFunction · 0.45
_to_proto_implMethod · 0.45
__init__Method · 0.45
get_sessionMethod · 0.45
generateMethod · 0.45
create_feature_viewMethod · 0.45

Calls 3

update_phase_progressMethod · 0.80
from_protoMethod · 0.45
teardownMethod · 0.45

Tested by

no test coverage detected