[bug] Forward slash converted to dash in the repo path #175

Closed
opened 2025-10-31 15:04:03 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @alexlebens on GitHub (Jan 10, 2025).

I attempted to add a stack from my repo and using path "alexlebens/infrastructure", but I receive the following error:

ERROR: failed to read file contents from "/repo-cache/github.com/alexlebens-infrastructure/main/latest/hosts/ps08rp/traefik/compose.yaml

I've tried a few other characters to see if I need to escape the slash, but it appears to work in differently. This is using "alexlebens/infrastructure":

ERROR: failed to read file contents from "/repo-cache/github.com/alexlebens\-infrastructure/main/latest/hosts/ps08rp/traefik/compose.yaml"

The default configuration appears to do the same thing:

ERROR: failed to read file contents from "/repo-cache/github.com/namespace-repo/main/latest/compose.yaml"

I'm using version 1.16.12 and making these edits through the ui.

Here's my toml:

[[stack]]
name = "traefik-ps08rp"
[stack.config]
server = "ps08rp"
poll_for_updates = true
auto_update = true
run_directory = "hosts/ps08rp/traefik"
env_file_path = ".env-input"
additional_env_files = [".env"]
repo = "alexlebens/infrastructure"
environment = """
CF_API_EMAIL = [[CF_API_EMAIL]]
CF_API_KEY = [[CF_API_KEY]]
"""
Originally created by @alexlebens on GitHub (Jan 10, 2025). I attempted to add a stack from my repo and using path "alexlebens/infrastructure", but I receive the following error: > ERROR: failed to read file contents from "/repo-cache/github.com/alexlebens-infrastructure/main/latest/hosts/ps08rp/traefik/compose.yaml I've tried a few other characters to see if I need to escape the slash, but it appears to work in differently. This is using "alexlebens\/infrastructure": > ERROR: failed to read file contents from "/repo-cache/github.com/alexlebens\\-infrastructure/main/latest/hosts/ps08rp/traefik/compose.yaml" The default configuration appears to do the same thing: > ERROR: failed to read file contents from "/repo-cache/github.com/namespace-repo/main/latest/compose.yaml" I'm using version 1.16.12 and making these edits through the ui. Here's my toml: ```` [[stack]] name = "traefik-ps08rp" [stack.config] server = "ps08rp" poll_for_updates = true auto_update = true run_directory = "hosts/ps08rp/traefik" env_file_path = ".env-input" additional_env_files = [".env"] repo = "alexlebens/infrastructure" environment = """ CF_API_EMAIL = [[CF_API_EMAIL]] CF_API_KEY = [[CF_API_KEY]] """ ````
GiteaMirror added the seen 👀 label 2025-10-31 15:04:03 -05:00
Author
Owner

@mbecker20 commented on GitHub (Jan 10, 2025):

This is the repo-cache, which is used by Komodo Core only to get the latest commit hashes, messages, and file contents. See https://github.com/mbecker20/komodo/discussions/252#discussioncomment-11784999

In the Stack config you give, the repo will be cloned on server ps08rp to $PERIPHERY_STACK_DIR/traefik-ps08rp

If this isn't happening, and you aren't sure why but are running Periphery in container, please see https://github.com/mbecker20/komodo/discussions/220

@mbecker20 commented on GitHub (Jan 10, 2025): This is the `repo-cache`, which is used by Komodo Core only to get the latest commit hashes, messages, and file contents. See https://github.com/mbecker20/komodo/discussions/252#discussioncomment-11784999 In the Stack config you give, the repo will be cloned on server `ps08rp` to `$PERIPHERY_STACK_DIR/traefik-ps08rp` If this isn't happening, and you aren't sure why but are running Periphery in container, please see https://github.com/mbecker20/komodo/discussions/220
Author
Owner

@alexlebens commented on GitHub (Jan 10, 2025):

I am running the periphery agent as a systemd process installed as described here.

On my ps08rp server the repo is being cloned, it is located on the /etc/komodo/stacks/traefik-ps08rp directory.

@alexlebens commented on GitHub (Jan 10, 2025): I am running the periphery agent as a systemd process installed as described [here](https://komo.do/docs/connect-servers#install-the-periphery-agent---systemd). On my ps08rp server the repo is being cloned, it is located on the /etc/komodo/stacks/traefik-ps08rp directory.
Author
Owner

@alexlebens commented on GitHub (Jan 11, 2025):

Alright, I think I misunderstood what was going on and it turns out I has .yml extension instead of .yaml so the compose file wasn't getting pick up.

I guess that that slash becoming a dash is expected behavior? Otherwise I'll close this issue.

@alexlebens commented on GitHub (Jan 11, 2025): Alright, I think I misunderstood what was going on and it turns out I has .yml extension instead of .yaml so the compose file wasn't getting pick up. I guess that that slash becoming a dash is expected behavior? Otherwise I'll close this issue.
Author
Owner

@mbecker20 commented on GitHub (Jan 12, 2025):

Got it, yeah I was thinking that because I was dealing with file paths, I wanted to replace all unexpected / in any names relating to the git repo, which ensures the path is unique, and avoiding any edge cases if I couldn't guarantee unique paths. It happens here: e274d6f7c8/client/core/rs/src/entities/mod.rs (L439)

@mbecker20 commented on GitHub (Jan 12, 2025): Got it, yeah I was thinking that because I was dealing with file paths, I wanted to replace all unexpected `/` in any names relating to the git repo, which ensures the path is unique, and avoiding any edge cases if I couldn't guarantee unique paths. It happens here: https://github.com/mbecker20/komodo/blob/e274d6f7c8a3ab6f6ef53d3ea0b547ac57e9801b/client/core/rs/src/entities/mod.rs#L439
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#175