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

Cap&U Extract logic to determine queue items #19448

Merged
merged 7 commits into from
Nov 5, 2019
Merged

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Oct 30, 2019

Now, only call perf_capture_queue a single time:

  • following the flow is easier
  • tests are easier to write since they don't deal with the external edge case.
  • can move perf_capture_queue from ci_mixin/capture.rb to metrics/capture.rb:
    • reduced the number of methods in VMs and others.
    • centralizes collection logic in a single set of objects
    • allows us to make ems optimizations since we can reduce the number of lookups
    • allows us to make ems specific changes

task_id is used to run a rollup task after the fact to
create a rollup of hosts by ems_cluster.

Currently when running realtime metrics for the first time,
we call queue a second time with historical (for non storages).
But this second time runs without a rollup (by not passing a task_id)

Now, we are only setting the task_id in the queue for realtime
entries.
will extract the logic to derive the items needed
to properly run a collection. This is a different
concern than the callback that will cluster rollup
hosts.
@miq-bot
Copy link
Member

miq-bot commented Oct 30, 2019

Checked commits kbrock/manageiq@6ca884c~...8a6a0ea with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
3 files checked, 2 offenses detected

app/models/metric/capture.rb

app/models/metric/ci_mixin/capture.rb

@agrare agrare self-assigned this Nov 5, 2019
Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@agrare agrare merged commit 37f1c09 into ManageIQ:master Nov 5, 2019
@agrare agrare added this to the Sprint 124 Ending Nov 11, 2019 milestone Nov 5, 2019
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.

3 participants