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

Cluster maintenance mode #2297

Merged
merged 7 commits into from
Feb 14, 2024
Merged

Cluster maintenance mode #2297

merged 7 commits into from
Feb 14, 2024

Conversation

CDimonaco
Copy link
Member

@CDimonaco CDimonaco commented Feb 13, 2024

Description

Cluster maintenance mode.

Available for scale up, scale out and ascs/ers

We get the information through the cibadmin command.

image
image

How was this tested?

Automated tests, backend, frontend and e2e

@CDimonaco CDimonaco added enhancement New feature or request javascript Pull requests that update Javascript code elixir Pull requests that update Elixir code env Create an ephimeral environment for the pr branch labels Feb 13, 2024
@CDimonaco CDimonaco self-assigned this Feb 13, 2024
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.

Just a tiny change request but overall LGTM

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.

I tried to submit the change request but it didn't persist 😄

lib/trento/discovery/policies/cluster_policy.ex Outdated Show resolved Hide resolved
Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

Looks good.
Some suggestions from my side.
Anyway, when I say maintenance state in the frontend instead of maintenance mode my brain almost exploded XD
Fix the factory at least, the tests are passing my merge coincidence, because you get false by default with lodash in the code

assets/js/lib/test-utils/factories/clusters.js Outdated Show resolved Hide resolved
assets/js/pages/ClusterDetails/AscsErsClusterDetails.jsx Outdated Show resolved Hide resolved
assets/js/pages/ClusterDetails/HanaClusterDetails.test.jsx Outdated Show resolved Hide resolved
lib/trento/discovery/policies/cluster_policy.ex Outdated Show resolved Hide resolved
test/e2e/cypress/e2e/hana_cluster_details.cy.js Outdated Show resolved Hide resolved
@CDimonaco
Copy link
Member Author

@arbulu89 @dottorblaster

Thx for spotting all the stuff, everything is fixed, re-request review!

Copy link
Contributor

@arbulu89 arbulu89 left a comment

Choose a reason for hiding this comment

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

Thank you @CDimonaco
All good from my side.
I did some tiny comments, but feel free to merge without a new review

@@ -67,6 +67,7 @@ export const hanaClusterDetailsFactory = Factory.define(() => {
stopped_resources: clusterResourceFactory.buildList(2),
system_replication_mode: 'sync',
system_replication_operation_mode: 'logreplay',
maintenance_mode: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, we should include this maintenance_mode entry in the ascsErsClusterDetailsFactory as well

Copy link
Member Author

Choose a reason for hiding this comment

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

done

assets/js/pages/ClusterDetails/HanaClusterDetails.test.jsx Outdated Show resolved Hide resolved
@@ -74,11 +74,11 @@ context('HANA cluster details', () => {
.contains(availableHanaCluster.hanaSecondarySyncState);
});

it(`should have sap hana sr health state ${availableHanaCluster.sapHanaSRHealthState}`, () => {
it(`should have maintenance mode ${availableHanaCluster.maintenanceState}`, () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I still see maintenanceState here 🙈

Copy link
Member Author

Choose a reason for hiding this comment

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

done

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.

🔥

@CDimonaco
Copy link
Member Author

Everything done! Thx for the feedbacks, merging when ci is green

@CDimonaco CDimonaco merged commit 5fe23b9 into main Feb 14, 2024
24 checks passed
@CDimonaco CDimonaco deleted the cluster_maintenance_mode branch February 14, 2024 10:05
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 env Create an ephimeral environment for the pr branch javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

None yet

3 participants