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

Fix for search nodes api in azure #5355

Merged
merged 11 commits into from
Aug 6, 2021

Conversation

vivekshankar1
Copy link
Collaborator

@vivekshankar1 vivekshankar1 commented Jul 13, 2021

Signed-off-by: Vivek Shankar vshankar@progress.com

🔩 Description: What code changed, and why?

While filtering nodes in Search Nodes API. Name and region was not getting filtered properly.

  • When we searched for a resource by name it used to return everything in the resource group for that particular resource.

  • When we filtered by region it used to return resources in other region as well

The code changes apply a filter just before returning the data from the Search Nodes API. This helps us to get only the desired result. Due to the limitation in azure API where we cannot search for Virtual Machines, we had to introduce this filtering at our end.

⛓️ Related Resources

#5315

👍 Definition of Done

  • Searching for name should return only that node which matches its name
  • Filtering by region should return resources belonging to that region only

👟 How to Build and Test the Change

rebuild components/nodemanager-service

✅ 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)

@netlify
Copy link

netlify bot commented Jul 13, 2021

👷 Deploy Preview for chef-automate processing.

🔨 Explore the source changes: 56b51a0

🔍 Inspect the deploy log: https://app.netlify.com/sites/chef-automate/deploys/60ffc760ef78a500075fcf08

Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
Signed-off-by: Vivek Shankar <vshankar@progress.com>
@vivekshankar1 vivekshankar1 force-pushed the vivek-shankar/fixed_azure_search_nodes_filtering branch from 6b38b15 to 80e3291 Compare July 27, 2021 08:10
Signed-off-by: Vivek Shankar <vshankar@progress.com>
@sonarcloud
Copy link

sonarcloud bot commented Jul 27, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@vivek-yadav vivek-yadav added the Team: S.H.I.E.L.D. This Label is used on S.H.I.E.L.D. Operations (Tasks / Stories) label Aug 5, 2021
@kalroy kalroy merged commit 6d4838b into master Aug 6, 2021
@kalroy kalroy deleted the vivek-shankar/fixed_azure_search_nodes_filtering branch August 6, 2021 05:50
@MadhviAtroliya MadhviAtroliya self-requested a review August 9, 2021 15:42
@vivekshankar1 vivekshankar1 self-assigned this Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team: S.H.I.E.L.D. This Label is used on S.H.I.E.L.D. Operations (Tasks / Stories)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants