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

Cherry-pick #20397 to 7.x: Disable logging when pulling on python integration tests #20445

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Aug 5, 2020

Cherry-pick of PR #20397 to 7.x branch. Original message:

Docker compose library is quite verbose, and it prints many messages
when logging is enabled. On integration tests we make a pull before
trying to build the images in case the image is already pre-built. If
this pull doesn't work, the image is built, so we ignore errors on this
pull. But, even when ignoring errors, these errors are logged, and when
investigating problems with tests this may lead to think that the
problem is with the unavailability of some image. Disable logging on the
compose logger while this previous pull is being done.

What does this PR do?

Disables logging on errors happening when trying to pull images on
integration tests.

Note: Docker compose logging is still too verbose, but this is a collateral effect
of the test runner. This will improve after #16883.

Why is it important?

Errors when pulling images on integration tests are ignored, because
the image can still be built, but they are still logged, what is misleading.

See for example this thread: #19739 (comment)

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.

Logs

Before, if an image is not available, but it can be built, and the test fails for other reason, this is logged, what is confusing.

compose.service: ERROR: 404 Client Error: Not Found ("manifest for docker.elastic.co/integrations-ci/beats-redis:5.0.5-2 not found: manifest unknown: manifest unknown")

After this change no errors are logged by the pull if the test fails, logs regarding the later build are still logged:

compose.service: WARNING: Image for service redis was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.

Docker compose library is quite verbose, and it prints many messages
when logging is enabled. On integration tests we make a pull before
trying to build the images in case the image is already pre-built. If
this pull doesn't work, the image is built, so we ignore errors on this
pull. But, even when ignoring errors, these errors are logged, and when
investigating problems with tests this may lead to think that the
problem is with the unavailability of some image. Disable logging on the
compose logger while this previous pull is being done.

(cherry picked from commit 6d8acd0)
@jsoriano jsoriano added [zube]: In Review backport Team:Integrations Label for the Integrations team labels Aug 5, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Aug 5, 2020
Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

LGTM.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 5, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [jsoriano commented: jenkins run the tests please]

  • Start Time: 2020-08-05T14:24:31.339+0000

  • Duration: 79 min 43 sec

Test stats 🧪

Test Results
Failed 0
Passed 14427
Skipped 1321
Total 15748

Steps errors

Expand to view the steps failures

  • Name: Install Go 1.14.4
    • Description: .ci/scripts/install-go.sh

    • Duration: 1 min 8 sec

    • Start Time: 2020-08-05T14:51:36.303+0000

    • log

@jsoriano
Copy link
Member Author

jsoriano commented Aug 5, 2020

jenkins run the tests please

@jsoriano
Copy link
Member Author

jsoriano commented Aug 6, 2020

Failure in CI was in a go test, it shouldn't be related, merging this.

@jsoriano jsoriano merged commit e4d22bc into elastic:7.x Aug 6, 2020
@jsoriano jsoriano deleted the backport_20397_7.x branch August 6, 2020 09:58
@zube zube bot removed the [zube]: Done label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants