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 azure retrieve resource by ids #21711

Merged
merged 37 commits into from
Oct 13, 2020
Merged

Fix for azure retrieve resource by ids #21711

merged 37 commits into from
Oct 13, 2020

Conversation

narph
Copy link
Contributor

@narph narph commented Oct 12, 2020

What does this PR do?

Adds a more stable solution for retrieving resources by id

Why is it important?

Adds a more stable solution for retrieving resources by id

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

narph added 30 commits July 23, 2020 11:01
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 12, 2020
@narph narph self-assigned this Oct 12, 2020
@narph narph marked this pull request as ready for review October 12, 2020 12:23
@narph narph added the Team:Platforms Label for the Integrations - Platforms team label Oct 12, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 12, 2020
@narph narph added [zube]: In Review needs_backport PR is waiting to be backported to other branches. labels Oct 12, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 12, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21711 updated]

  • Start Time: 2020-10-12T12:25:12.785+0000

  • Duration: 59 min 11 sec

Test stats 🧪

Test Results
Failed 0
Passed 622
Skipped 48
Total 670

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, would it be possible to add a test case that would reproduce the original problem?

if len(id) > 0 {
var filterList []string
// listing resourceID conditions does not seem to work with the API but querying by name or resource types will work
// listing multiple resourceId conditions does not seem to work with the API, extracting the name and resource type does not work as the position of the `resourceType` can move if a parent resource is involved, filtering by resource name and resource group (if extracted) is also not possible as
Copy link
Member

Choose a reason for hiding this comment

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

Nit. Split this line 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

LGTM, would it be possible to add a test case that would reproduce the original problem?

We will need integration tests in this case, this behavior is based on API supportability, I am hoping to have those in the near future.

@narph narph merged commit 056f0e0 into elastic:master Oct 13, 2020
@narph narph deleted the az-res branch October 13, 2020 14:01
v1v added a commit to v1v/beats that referenced this pull request Oct 14, 2020
…dependencies-goals

* upstream/master: (46 commits)
  Use badger code from upstream repository (elastic#21705)
  Disable writes sync in persistent cache (elastic#21754)
  Make API address and Shard ID required in Cloud Foundry settings (elastic#21759)
  [CI] Support skip-ci label (elastic#21377)
  Increase recommended memory when deploying in Cloud foundry (elastic#21755)
  typofix for dns timeout configuration option (elastic#21069)
  chore: create CI artifacts for DEV usage (elastic#21645)
  [Ingest Manager] Atomic installed forgotten changelog elastic#21780
  [Ingest Manager] Agent atomic installer (elastic#21745)
  Add missing configuration annotations (elastic#21736)
  [Filebeat] Add check for context.DeadlineExceeded error (elastic#21732)
  Remove kafka partition ISR from Metricbeat docs (elastic#21709)
  Skip flaky test with oauth2 config in httpjson input (elastic#21749)
  Fix for azure retrieve resource by ids (elastic#21711)
  Update obs app links (elastic#21682)
  fix: update fleet test suite name (elastic#21738)
  Remove dot from file.extension value in Auditbeat FIM (elastic#21644)
  Fix leaks with metadata processors (elastic#16349)
  Add istiod metricset (elastic#21519)
  [Ingest Manager] Change Sync/Close call order (elastic#21735)
  ...
v1v added a commit to v1v/beats that referenced this pull request Oct 14, 2020
…ne-2.0-arm

* upstream/master: (93 commits)
  Fix non-windows fields on system/filesystem (elastic#21758)
  disable TestReceiveEventsAndMetadata/TestSocketCleanup/TestReceiveNewEventsConcurrently in Windows (elastic#21750)
  Use badger code from upstream repository (elastic#21705)
  Disable writes sync in persistent cache (elastic#21754)
  Make API address and Shard ID required in Cloud Foundry settings (elastic#21759)
  [CI] Support skip-ci label (elastic#21377)
  Increase recommended memory when deploying in Cloud foundry (elastic#21755)
  typofix for dns timeout configuration option (elastic#21069)
  chore: create CI artifacts for DEV usage (elastic#21645)
  [Ingest Manager] Atomic installed forgotten changelog elastic#21780
  [Ingest Manager] Agent atomic installer (elastic#21745)
  Add missing configuration annotations (elastic#21736)
  [Filebeat] Add check for context.DeadlineExceeded error (elastic#21732)
  Remove kafka partition ISR from Metricbeat docs (elastic#21709)
  Skip flaky test with oauth2 config in httpjson input (elastic#21749)
  Fix for azure retrieve resource by ids (elastic#21711)
  Update obs app links (elastic#21682)
  fix: update fleet test suite name (elastic#21738)
  Remove dot from file.extension value in Auditbeat FIM (elastic#21644)
  Fix leaks with metadata processors (elastic#16349)
  ...
narph added a commit to narph/beats that referenced this pull request Oct 20, 2020
* mofidy doc

* start work

* work

* changelog

* fix test

(cherry picked from commit 056f0e0)
narph added a commit to narph/beats that referenced this pull request Oct 20, 2020
* mofidy doc

* start work

* work

* changelog

* fix test

(cherry picked from commit 056f0e0)
narph added a commit that referenced this pull request Oct 20, 2020
…2002)

* Fix for azure retrieve resource by ids (#21711)

* mofidy doc

* start work

* work

* changelog

* fix test

(cherry picked from commit 056f0e0)

* fix changelog
narph added a commit that referenced this pull request Oct 20, 2020
…22003)

* Fix for azure retrieve resource by ids (#21711)

* mofidy doc

* start work

* work

* changelog

* fix test

(cherry picked from commit 056f0e0)

* fix changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_backport PR is waiting to be backported to other branches. Team:Platforms Label for the Integrations - Platforms team [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metricbeat azure module - filter by resource ID returns none in some cases
3 participants