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

internal/stack: improve semverLessThan error handling #2101

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Sep 12, 2024

This makes errors like this actionable.

Error: booting up the stack failed: creating stack files failed: there were 4 errors: template: docker-compose-stack.yml.tmpl:8:7: executing "docker-compose-stack.yml.tmpl" at <semverLessThan $version "8.0.0">: error calling semverLessThan: Invalid Semantic Version, template: elasticsearch.yml.tmpl:22:6: executing "elasticsearch.yml.tmpl" at <semverLessThan $version "8.0.0">: error calling semverLessThan: Invalid Semantic Version, template: kibana.yml.tmpl:5:52: executing "kibana.yml.tmpl" at <semverLessThan $version "8.15.0-SNAPSHOT">: error calling semverLessThan: Invalid Semantic Version, template: elastic-agent.env.tmpl:8:11: executing "elastic-agent.env.tmpl" at <semverLessThan $version "8.0.0">: error calling semverLessThan: Invalid Semantic Version

ref elastic/integrations#11052

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

@efd6 efd6 requested a review from jsoriano September 13, 2024 05:06
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, I only wonder if we should be a bit more verbose here.

internal/stack/resources.go Show resolved Hide resolved
internal/stack/resources.go Show resolved Hide resolved
@efd6
Copy link
Contributor Author

efd6 commented Sep 17, 2024

@jsoriano Would you mind merging this? I cannot.

@jsoriano jsoriano merged commit e553c5b into elastic:main Sep 18, 2024
3 checks passed
@mrodm
Copy link
Contributor

mrodm commented Sep 18, 2024

@efd6 That error should also be fixed in integrations via this PR elastic/integrations#11126
Could you try again to run the tests there? Now the version should be retrieved correctly.

@efd6
Copy link
Contributor Author

efd6 commented Sep 18, 2024

@mrodm Thanks. Trying now.

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.

4 participants