Skip to content

Commit

Permalink
Skewer update
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Feb 14, 2024
1 parent 4ddf418 commit 6daf9d0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ across cloud providers, data centers, and edge sites.
* [Prerequisites](#prerequisites)
* [Step 1: Install the Skupper command-line tool](#step-1-install-the-skupper-command-line-tool)
* [Step 2: Set up your namespaces](#step-2-set-up-your-namespaces)
* [Step 3: Deploy the frontent and backend](#step-3-deploy-the-frontent-and-backend)
* [Step 3: Deploy the frontend and backend](#step-3-deploy-the-frontend-and-backend)
* [Step 4: Create your sites](#step-4-create-your-sites)
* [Step 5: Link your sites](#step-5-link-your-sites)
* [Step 6: Expose the backend](#step-6-expose-the-backend)
Expand Down Expand Up @@ -130,7 +130,7 @@ kubectl create namespace east
kubectl config set-context --current --namespace east
~~~

## Step 3: Deploy the frontent and backend
## Step 3: Deploy the frontend and backend

This example runs the frontend and the backend in separate
Kubernetes namespaces, on different clusters.
Expand Down
2 changes: 1 addition & 1 deletion external/skewer/.github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
schedule:
- cron: "0 0 * * 0"
jobs:
main:
test:
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 0 additions & 1 deletion external/skewer/example/python/plano

This file was deleted.

1 change: 0 additions & 1 deletion external/skewer/example/python/skewer

This file was deleted.

4 changes: 4 additions & 0 deletions external/skewer/external/plano/src/plano/_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ def dir_operations():
result = list_dir()
assert result == [], result

print_dir()
print_dir(test_dir)
print_dir(test_dir, "*.not-there")

result = find(test_dir)
assert result == [test_file_1, test_file_2], (result, [test_file_1, test_file_2])

Expand Down
34 changes: 25 additions & 9 deletions external/skewer/external/plano/src/plano/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,18 @@ def print_properties(props, file=None):

## Directory operations

def find(dirs=None, include="*", exclude=()):
def find(dirs=None, include="*", exclude=[]):
if dirs is None:
dirs = "."

if is_string(dirs):
dirs = (dirs,)
dirs = [dirs]

if is_string(include):
include = (include,)
include = [include]

if is_string(exclude):
exclude = (exclude,)
exclude = [exclude]

found = set()

Expand Down Expand Up @@ -313,7 +313,7 @@ def change_dir(dir, quiet=False):

return prev_dir

def list_dir(dir=None, include="*", exclude=()):
def list_dir(dir=None, include="*", exclude=[]):
if dir is None:
dir = get_current_dir()
else:
Expand All @@ -322,10 +322,10 @@ def list_dir(dir=None, include="*", exclude=()):
assert is_dir(dir), dir

if is_string(include):
include = (include,)
include = [include]

if is_string(exclude):
exclude = (exclude,)
exclude = [exclude]

names = _os.listdir(dir)

Expand All @@ -338,6 +338,22 @@ def list_dir(dir=None, include="*", exclude=()):

return sorted(names)

def print_dir(dir=None, include="*", exclude=[]):
if dir is None:
dir = get_current_dir()
else:
dir = expand(dir)

names = list_dir(dir=dir, include=include, exclude=exclude)

print("{}:".format(get_absolute_path(dir)))

if names:
for name in names:
print(f" {name}")
else:
print(" [none]")

# No args constructor gets a temp dir
class working_dir:
def __init__(self, dir=None, quiet=False):
Expand Down Expand Up @@ -575,7 +591,7 @@ def replace(path, replacement, quiet=False):

def remove(paths, quiet=False):
if is_string(paths):
paths = (paths,)
paths = [paths]

for path in paths:
path = expand(path)
Expand Down Expand Up @@ -707,7 +723,7 @@ def unique(iterable):

def skip(iterable, values=(None, "", (), [], {})):
if is_scalar(values):
values = (values,)
values = [values]

items = list()

Expand Down
1 change: 0 additions & 1 deletion external/skewer/python/plano

This file was deleted.

2 changes: 1 addition & 1 deletion external/skewer/python/skewer/standardsteps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ cleaning_up:
"*":
- run: skupper delete
hello_world/deploy_the_frontend_and_backend:
title: Deploy the frontent and backend
title: Deploy the frontend and backend
preamble: |
This example runs the frontend and the backend in separate
Kubernetes namespaces, on different clusters.
Expand Down

0 comments on commit 6daf9d0

Please sign in to comment.