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

File datasource not loaded if path starts with ../ #2230

Closed
ItalyPaleAle opened this issue Oct 1, 2024 · 2 comments · Fixed by #2255
Closed

File datasource not loaded if path starts with ../ #2230

ItalyPaleAle opened this issue Oct 1, 2024 · 2 comments · Fixed by #2255
Assignees
Labels

Comments

@ItalyPaleAle
Copy link

I am using gomplate with this configuration:

inputDir: "src"
outputDir: "Ev2ServiceArtifactsRoot"
datasources:
  AzureRegions:
    url: "../../../deployment-config/AzureRegions.yaml"

If I do ls "../../../deployment-config/KustoClusters.yaml", I see the file, indicating the path is correct

I am getting an error that it can't load the "AzureRegions" data source:

16:20:15 ERR  err="renderTemplate: failed to render template src/Ev2Config.json: template: src/Ev2Config.json:19:26: executing \"src/Ev2Config.json\" at <datasource \"AzureRegions\">: error calling datasource: couldn't read datasource 'AzureRegions' (deployment-config/AzureRegions.yaml): open (url: \"/\", name: \"deployment-config/AzureRegions.yaml\"): open Users/alessandro/Code/AAPT-DTMB/src/Infrastructure/Kusto/deployment-config/AzureRegions.yaml: no such file or directory"

Note that /Users/alessandro/Code/AAPT-DTMB/src/Infrastructure/Kusto is the working directory, so it seems that it is not resolving the ../ at the start of the path

@hairyhenderson
Copy link
Owner

hairyhenderson commented Nov 10, 2024

If I do ls "../../../deployment-config/KustoClusters.yaml", I see the file, indicating the path is correct

I'm assuming you meant ls "../../../deployment-config/AzureRegions.yaml"?

I've been able to replicate this in a quick test. I'll see if I can solve this.

@ItalyPaleAle
Copy link
Author

Thank you for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants