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

metricbeat/module/postgresql: Improve healthcheck for Postgres #36182

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

shmsr
Copy link
Member

@shmsr shmsr commented Jul 31, 2023

What does this PR do?

Improve healthcheck for Postgres to reduce the flakiness in integration tests.

Why is it important?

Flaky tests lead to instability of CI and could lead to unnecessary blocking of PRs and unreliable tests. In my opinion, start_period and reason mentioned in peter-evans/docker-compose-healthcheck#16 (comment) is something that could help us as this improves healthcheck.

Also bumped the fallback version for the image to the latest minor of the same major release to avoid any issues. Currently, my latest major is 15 and currently, I've set the fallback version to 13.11 so that it doesn't change the major.

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.
  • I have made my commit title and message explanatory about the purpose and the reason of the change

How to test this PR locally

As the flaky tests are not reproducible, we'll do a soak testing i.e., soak it for some time to see if it really reduced the flakiness of integration tests or not.

Related issues

@shmsr shmsr added the bug label Jul 31, 2023
@shmsr shmsr requested a review from a team as a code owner July 31, 2023 10:50
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 31, 2023
@botelastic
Copy link

botelastic bot commented Jul 31, 2023

This pull request doesn't have a Team:<team> label.

@shmsr shmsr requested a review from gpop63 July 31, 2023 10:50
@mergify mergify bot assigned shmsr Jul 31, 2023
@mergify
Copy link
Contributor

mergify bot commented Jul 31, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @shmsr? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

Keeping this PR in draft for some time to do some testing myself. But it is ready for review.

@shmsr shmsr marked this pull request as draft July 31, 2023 10:52
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 31, 2023

💚 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: 2023-08-01T06:00:23.298+0000

  • Duration: 11 min 35 sec

❕ Flaky test report

No test was executed to be analysed.

🤖 GitHub comments

Expand to view the 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.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

/test metricbeat

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

^^ Will retrigger a few times in order to test if Postgres tests are failing or not.

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

/test metricbeat

1 similar comment
@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

/test metricbeat

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

/test postgres

@shmsr
Copy link
Member Author

shmsr commented Jul 31, 2023

/test

@shmsr shmsr marked this pull request as ready for review August 1, 2023 05:34
@shmsr
Copy link
Member Author

shmsr commented Aug 1, 2023

/test

@shmsr shmsr changed the title metricbeat/module/postresql: Improve healthcheck for Postgres metricbeat/module/postgresql: Improve healthcheck for Postgres Aug 1, 2023
@shmsr shmsr enabled auto-merge (squash) August 1, 2023 05:37
@shmsr
Copy link
Member Author

shmsr commented Aug 1, 2023

/test metricbeat-goIntegTest

Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@shmsr shmsr merged commit 4ae13d9 into elastic:main Aug 1, 2023
@shmsr shmsr deleted the postgres-healthcheck-1150 branch August 1, 2023 09:53
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
3 participants