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

🎉 release: v4.1.1 #232

Merged
merged 3 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions riocli/apply/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def _find_functors(self, kind):
"project": lambda name, projects: filter(lambda i: i.metadata.name == name, projects),
"package": lambda name, obj_list, version: filter(
lambda x: name == x.name and version == x['packageVersion'], obj_list),
"staticroute": lambda name, obj_list: filter(lambda x: name == '-'.join(x.spec.url.split('-')[:-1]),
obj_list),
"staticroute": lambda name, obj_list: filter(
lambda x: name == x.metadata.name.rsplit('-', 1)[0], obj_list),
"build": self._generate_find_guid_functor(name_field='buildName'),
"deployment": self._generate_find_guid_functor(),
"network": self._generate_find_guid_functor(),
Expand Down
6 changes: 4 additions & 2 deletions riocli/deployment/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import click
from rapyuta_io import Client
from rapyuta_io.clients.catalog_client import Package
from rapyuta_io.clients import ObjDict
from rapyuta_io.clients.static_route import StaticRoute
from rapyuta_io.clients.deployment import DeploymentNotRunningException, DeploymentPhaseConstants
from rapyuta_io.clients.native_network import NativeNetwork
from rapyuta_io.clients.package import ProvisionConfiguration, RestartPolicy, \
Expand Down Expand Up @@ -119,8 +121,8 @@ def create_object(self, client: Client, **kwargs) -> typing.Any:
if 'staticRoutes' in self.spec:
for stroute in self.spec.staticRoutes:
route_guid, route = self.rc.find_depends(stroute.depends)
if route is None and route_guid:
route = client.get_static_route(route_guid)
# TODO: Remove this once we transition to v2
route = StaticRoute(ObjDict({"guid": route_guid}))
provision_config.add_static_route(component_name,
stroute.name, route)

Expand Down
2 changes: 1 addition & 1 deletion riocli/static_route/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def update_object(self, client: Client, obj: typing.Any) -> None:

def delete_object(self, client: Client, obj: typing.Any):
client = new_v2_client()
client.delete_static_route(obj.name)
client.delete_static_route(obj.metadata.name)

@classmethod
def pre_process(cls, client: Client, d: typing.Dict) -> None:
Expand Down
Loading