Skip to content

Commit 683b37e

Browse files
committed
Merge branch 'release-v5.8.11'
2 parents d789ad0 + 855329c commit 683b37e

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ jobs:
144144
- name: Build & Push Multi-Platform Container
145145
uses: docker/build-push-action@v2
146146
with:
147-
context: ./docker # build context is workspace so we can copy artifacts from ./dist/
147+
context: "{{defaultContext}}" # build context is workspace so we can copy artifacts from ./dist/
148+
file: docker/Dockerfile
148149
builder: ${{ steps.buildx.outputs.name }}
149150
platforms: linux/amd64,linux/arm64
150151
push: true

netfoundry/ctl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ def demo(cli):
10461046
cli.log.info("Demo Guide: https://developer.netfoundry.io/guides/demo/")
10471047

10481048

1049-
def use_organization(cli, prompt: bool = True, spinner: object = None):
1049+
def use_organization(cli, spinner: object = None, prompt: bool = True):
10501050
"""Cache an expiring token for an identity and configure access to the network domain."""
10511051
if not spinner:
10521052
spinner = get_spinner(cli, "working")

netfoundry/utility.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,14 @@ def get_generic_resource(url: str, headers: dict, proxies: dict = dict(), verify
254254

255255
resource_type = get_resource_type_by_url(url)
256256
logging.debug(f"detected resource type {resource_type.name}")
257-
# always embed the host record if getting the base resource (not leaf operations like /session or /rotatekey)
258-
if resource_type.name in HOSTABLE_NET_RESOURCES.keys() and url.endswith(resource_type.name):
257+
# always embed the host record if getting the base resource by ID i.e. /{resource_type}/{uuid}, not leaf operations like /session or /rotatekey
258+
pattern = re.compile(f".*/{resource_type.name}/"+r'[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}\Z', re.I)
259+
if resource_type.name in HOSTABLE_NET_RESOURCES.keys() and re.match(pattern, url):
259260
params['embed'] = "host"
260261
elif resource_type.name in ["process-executions"]:
261262
params['beta'] = str()
263+
else:
264+
logging.debug(f"no handlers specified for url '{url}'")
262265
response = http.get(
263266
url,
264267
headers=headers,
@@ -311,7 +314,7 @@ def find_generic_resources(url: str, headers: dict, embedded: str = None, proxie
311314
params = dict()
312315
# validate and store the resource type
313316
resource_type = get_resource_type_by_url(url)
314-
if resource_type.name in HOSTABLE_NET_RESOURCES.keys():
317+
if HOSTABLE_NET_RESOURCES.get(resource_type.name):
315318
params['embed'] = "host"
316319
elif resource_type.name in ["process-executions"]:
317320
params['beta'] = str()

0 commit comments

Comments
 (0)