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

Infrastructure command on bastion of Automate HA cluster for node delete #7944

Merged
merged 13 commits into from Jun 13, 2023

Conversation

Sunanda-Boorla
Copy link
Collaborator

@Sunanda-Boorla Sunanda-Boorla commented Jun 5, 2023

🔩 Description: What code changed, and why?

As a user of Automate HA, when I run chef-automate infrastructure and chef-automate infrastructure node-delete command on bastion system of Automate HA cluster, I should see output relevant to Automate HA infrastructure

⛓️ Related Resources

👍 Definition of Done

👟 How to Build and Test the Change

  1. git checkout this branch
  2. rebuild components/automate-cli and upload it to you origin
  3. Install automate-cli on bastion
  4. Add nodes using load test suite.
  5. Run chef-automate infrastructure node-delete <node-id>

✅ Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

📷 Screenshots, if applicable

image

image

https://progresssoftware-my.sharepoint.com/:v:/g/personal/sboorla_progress_com/EdckQQBzYG1JkOtsf6qNp1oBXXJL0dztWa7PyEpcvJamAw?e=gzoFdo

https://progresssoftware-my.sharepoint.com/:v:/g/personal/sboorla_progress_com/EZln7QaOTvZEtQfgbPvGozEBqXmFWxKsXNvtYRc3KKKIVA?e=Pplfba

https://progresssoftware.sharepoint.com/:v:/s/ChefCoreC/ESdkFe-54vFPo-13qc-i1CQBvmUmQQfLdQmypLemy7J2oA?e=YKwNAu

@netlify
Copy link

netlify bot commented Jun 5, 2023

👷 Deploy Preview for chef-automate processing.

Name Link
🔨 Latest commit e2b5b9f
🔍 Latest deploy log https://app.netlify.com/sites/chef-automate/deploys/648811376429ca0007490372

@Sunanda-Boorla Sunanda-Boorla changed the title [WIP] Infrastructure command on bastion [WIP] Infrastructure command on bastion of Automate HA cluster Jun 5, 2023
@Sunanda-Boorla Sunanda-Boorla requested a review from a team as a code owner June 5, 2023 06:15
@github-actions github-actions bot added the documentation Anything related to the Automate docs. label Jun 5, 2023
@sandhi18 sandhi18 force-pushed the CHEF-708-infrastructure-command branch from 2972a32 to 47918b1 Compare June 6, 2023 11:27
@sandhi18 sandhi18 changed the title [WIP] Infrastructure command on bastion of Automate HA cluster Infrastructure command on bastion of Automate HA cluster for node delete Jun 7, 2023
}
for _, tt := range tests {
t.Run(tt.testName, func(t *testing.T) {
if err := runDeleteNodeCmd(tt.cmd, tt.args); (err != nil) != tt.wantErr {
Copy link
Collaborator

Choose a reason for hiding this comment

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

condition is unnecessarily complex and the if condition also doesn't look correct, please simplify the conditions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

}
})
t.Run(tt.testName, func(t *testing.T) {
if err := preInfrastructureCmd(tt.cmd, tt.args); (err != nil) != tt.wantErr {
Copy link
Collaborator

Choose a reason for hiding this comment

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

condition is unnecessarily complex and the condition also doesn't look correct, please simplify the conditions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@github-actions github-actions bot removed the documentation Anything related to the Automate docs. label Jun 13, 2023
Sunanda-Boorla and others added 10 commits June 13, 2023 11:39
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
@Sunanda-Boorla Sunanda-Boorla force-pushed the CHEF-708-infrastructure-command branch from 505684a to 2169b11 Compare June 13, 2023 06:09
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
@sonarqube-for-infrastructure-prod

SonarQube Quality Gate

Quality Gate failed

Failed condition 61.1% 61.1% Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@punitmundra punitmundra merged commit fd8b726 into main Jun 13, 2023
5 of 8 checks passed
@punitmundra punitmundra deleted the CHEF-708-infrastructure-command branch June 13, 2023 09:39
bvtejaswi pushed a commit that referenced this pull request Jun 14, 2023
…ete (#7944)

* Infrastructure command on bastion

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* Infrastructure command on bastion

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* infrastructure command

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* Changes to increase the coverage

Signed-off-by: sandhi <sagarwal@progress.com>

* changes for coverage increase

Signed-off-by: sandhi <sagarwal@progress.com>

* Increasing code coverage

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* Reverting the node-delete change

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* Changes for test case failure

Signed-off-by: sandhi <sagarwal@progress.com>

* Revert doc changes

Signed-off-by: sandhi <sagarwal@progress.com>

* changes for test case failure

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* changes for test case failure

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* changes for test case failure

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

* Formatting

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>

---------

Signed-off-by: Sunanda-Boorla <sboorla@progress.com>
Signed-off-by: sandhi <sagarwal@progress.com>
Co-authored-by: Sunanda-Boorla <sboorla@progress.com>
Co-authored-by: sandhi <sagarwal@progress.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet