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

Add ENSA version info to Checks execution #2177

Merged
merged 4 commits into from
Jan 17, 2024
Merged

Add ENSA version info to Checks execution #2177

merged 4 commits into from
Jan 17, 2024

Conversation

jamie-suse
Copy link
Contributor

Description

Adds ENSA version info to Checks execution.

How was this tested?

Added unit tests.

@jamie-suse jamie-suse added enhancement New feature or request elixir Pull requests that update Elixir code labels Jan 15, 2024
@jamie-suse
Copy link
Contributor Author

There is an existing enum Trento.SapSystems.Enums.EnsaVersion, however it does not contain a value for :mixed_versions. Should I create a new enum under Trento.Clusters.Enums.EnsaVersion that reflects this?

@nelsonkopliku
Copy link
Member

nelsonkopliku commented Jan 15, 2024

There is an existing enum Trento.SapSystems.Enums.EnsaVersion, however it does not contain a value for :mixed_versions. Should I create a new enum under Trento.Clusters.Enums.EnsaVersion that reflects this?

ensa version is a specificity of SapSystems, however its mixed_versions nuance is peculiar to a cluster managing sap application instances.
We could indeed have a cluster specific EnsaVersion enum.
I am thinking of what could go wrong, but I don't see blockers.

@jamie-suse jamie-suse force-pushed the ensa_execution branch 2 times, most recently from b6691b0 to 1d6b530 Compare January 15, 2024 18:08
@jamie-suse jamie-suse marked this pull request as ready for review January 15, 2024 18:21
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Just a tiny thing in cluster_execution_env.ex: we need to use the correct EnsaVersion enum.

Besides that, LGTM.

Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Great, thanks!

Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

One little thing then we can merge

Comment on lines 154 to 157
case length(ensa_versions) do
1 -> Enum.at(ensa_versions, 0)
_ -> EnsaVersion.mixed_versions()
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case length(ensa_versions) do
1 -> Enum.at(ensa_versions, 0)
_ -> EnsaVersion.mixed_versions()
end
case ensa_versions do
[ensa_version] -> ensa_version
_ -> EnsaVersion.mixed_versions()
end

You can leverage Elixir's declarative approach even more 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I was trying to figure out how to do essentially this 😆 looks a lot better 👍

Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

LGTM, great job 👍

@jamie-suse jamie-suse merged commit b7c3e8c into main Jan 17, 2024
24 checks passed
@jamie-suse jamie-suse deleted the ensa_execution branch January 17, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants