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

[Heartbeat] Use the proper 'base' data_stream as conf #28455

Merged
merged 5 commits into from
Oct 15, 2021

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Oct 14, 2021

Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

  • 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.

Previously we assumed the first config was the base stream, but lately
fleet is sending things out of order, so we search for it instead.

Fixes elastic#28453
@andrewvc andrewvc requested a review from a team as a code owner October 14, 2021 21:17
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 14, 2021
@andrewvc andrewvc self-assigned this Oct 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 14, 2021

This pull request does not have a backport label. Could you fix it @andrewvc? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 14, 2021
@andrewvc andrewvc added backport-v7.16.0 Automated backport with mergify bug Heartbeat v7.16.0 Team:obs-ds-hosted-services Label for the Observability Hosted Services team and removed backport-skip Skip notification from the automated backport with mergify labels Oct 14, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 14, 2021

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-14T22:43:45.377+0000

  • Duration: 66 min 13 sec

  • Commit: 5f0cc63

Test stats 🧪

Test Results
Failed 0
Passed 3553
Skipped 80
Total 3633

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

LGTM

heartbeat/monitors/factory.go Outdated Show resolved Hide resolved
return nil, fmt.Errorf("could not determine base stream for config: %s", id)
}

err = res.Merge(common.MapStr{"id": optS.Id, "data_stream": optS.DataStream})
Copy link
Member

Choose a reason for hiding this comment

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

what is the use of this assigment here? seems like we are not using it.

remove debug statements below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I should just return the err (which should never happen really)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry, it does return. If you have a return with no args, it returns the variables initialized in the function signature as the return types.

Copy link
Member

Choose a reason for hiding this comment

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

TIL.

@andrewvc andrewvc merged commit 2fcd0c4 into elastic:master Oct 15, 2021
@andrewvc andrewvc deleted the fix-ds-order branch October 15, 2021 00:02
mergify bot pushed a commit that referenced this pull request Oct 15, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

(cherry picked from commit 2fcd0c4)
andrewvc added a commit that referenced this pull request Oct 15, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

(cherry picked from commit 2fcd0c4)

Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes elastic#28453
@andrewvc
Copy link
Contributor Author

andrewvc commented Nov 9, 2021

@Mergifyio backport 7.15

mergify bot pushed a commit that referenced this pull request Nov 9, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

(cherry picked from commit 2fcd0c4)
@mergify
Copy link
Contributor

mergify bot commented Nov 9, 2021

backport 7.15

✅ Backports have been created

andrewvc added a commit that referenced this pull request Nov 15, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

(cherry picked from commit 2fcd0c4)

Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
@andrewvc
Copy link
Contributor Author

@Mergifyio backport 8.0

mergify bot pushed a commit that referenced this pull request Nov 16, 2021
Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes #28453

(cherry picked from commit 2fcd0c4)
@mergify
Copy link
Contributor

mergify bot commented Nov 16, 2021

backport 8.0

✅ Backports have been created

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…elastic#28896)

Previously we assumed the first config was the base stream, but lately fleet is sending things out of order, so we search for it instead.

To test this try using the config in the linked issue below as a heartbeat.yml

Fixes elastic#28453

(cherry picked from commit bdde4c0)

Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify bug Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Heartbeat] Unable to parse datastream type when streams are out of order.
3 participants