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

Use full filename and path to check for operatorFile and paramsFile #1344

Merged
merged 3 commits into from
Feb 21, 2020

Conversation

ANeumann82
Copy link
Member

Signed-off-by: Andreas Neumann aneumann@mesosphere.com

What this PR does / why we need it:
Fixes #1343

…nstead of using only suffix

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
expectedError error
}{
{"operator.yaml", validOperator, true, false, false, nil},
{"params.yaml", validParams, false, true, false, nil},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a test case {"/foo/bar/operator.yaml", validOperator, true, false, false, nil}, is failing on this branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See latest commit: I think the parser should only handle package-relative paths, not absolute file system paths. I've added code that normalises the paths passed into the parser.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also added a comment to parsePackageFile

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Copy link
Contributor

@zen-dog zen-dog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@ANeumann82 ANeumann82 merged commit bbb21cd into master Feb 21, 2020
@ANeumann82 ANeumann82 deleted the an/use-equal-for-filetype-check branch February 21, 2020 07:30
runyontr pushed a commit that referenced this pull request Mar 11, 2020
…1344)

* Use full filename and path to check for operatorFile and paramsFile instead of using only suffix
* Use only relative paths in package parser

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KUDO treats template ending in 'operator.yaml' wrong
2 participants