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

[awss3][automation] Fix skipping aws tests in automation #36054

Merged
merged 10 commits into from
Jul 17, 2023

Conversation

bhapas
Copy link
Contributor

@bhapas bhapas commented Jul 12, 2023

What does this PR do?

This PR fixes the Integration test CI job to run the awss3 input_integration_test on AWS resources which were getting skipped all the time.

Current Behaviour

[2023-07-13T21:20:45.448Z] === Skipped
[2023-07-13T21:20:45.448Z] 
[2023-07-13T21:20:45.448Z] === SKIP: x-pack/filebeat/input/awss3 TestInputRunSQS (0.00s)
[2023-07-13T21:20:45.448Z]     input_integration_test.go:151: Run 'terraform apply' in _meta/terraform to setup S3 and SQS for the test.
[2023-07-13T21:20:45.448Z] 
[2023-07-13T21:20:45.448Z] === SKIP: x-pack/filebeat/input/awss3 TestInputRunS3 (0.00s)
[2023-07-13T21:20:45.448Z]     input_integration_test.go:202: Run 'terraform apply' in _meta/terraform to setup S3 and SQS for the test.
[2023-07-13T21:20:45.448Z] 
[2023-07-13T21:20:45.448Z] === SKIP: x-pack/filebeat/input/awss3 TestGetRegionForBucketARN (0.00s)
[2023-07-13T21:20:45.448Z]     input_integration_test.go:325: Run 'terraform apply' in _meta/terraform to setup S3 and SQS for the test.
[2023-07-13T21:20:45.448Z] 
[2023-07-13T21:20:45.448Z] === SKIP: x-pack/filebeat/input/awss3 TestPaginatorListPrefix (0.00s)
[2023-07-13T21:20:45.448Z]     input_integration_test.go:343: Run 'terraform apply' in _meta/terraform to setup S3 and SQS for the test.
[2023-07-13T21:20:45.448Z] 
[2023-07-13T21:20:45.448Z] === SKIP: x-pack/filebeat/input/awss3 TestInputRunSNS (0.00s)
[2023-07-13T21:20:45.448Z]     input_integration_test.go:391: Run 'terraform apply' in _meta/terraform to setup S3 and SQS for the test.

PR Fix

[2023-07-15T07:12:41.318Z] **ok**  	github.com/elastic/beats/v7/x-pack/filebeat/input/awss3	161.899s	coverage: 79.7% of statements

Full Log here - https://beats-ci.elastic.co/job/Beats/job/beats/job/PR-36054/27/consoleText

Additional issues found

While fixing the skipped tests issue, it has been observed that the input metrics added to the test were failing for both SQS and SNS tests and the test code has been commented out here

This is outside the scope of the PR and shall be looked at in separate issue - #36077

Why is it important?

The awss3 input integration tests were never run and a false positive result is being returned on CI

-->

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

Related issues

@bhapas bhapas self-assigned this Jul 12, 2023
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 12, 2023
@bhapas bhapas added bugfix and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 12, 2023
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 12, 2023
@bhapas bhapas added Team:Security-External Integrations 8.10-candidate backport-v8.9.0 Automated backport with mergify and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 12, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 12, 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-07-17T08:12:30.991+0000

  • Duration: 145 min 28 sec

Test stats 🧪

Test Results
Failed 0
Passed 30570
Skipped 2208
Total 32778

💚 Flaky test report

Tests succeeded.

🤖 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!)

@bhapas
Copy link
Contributor Author

bhapas commented Jul 12, 2023

/test

@bhapas bhapas force-pushed the fix-aws-terraform-tests branch 2 times, most recently from cdb8d98 to 01482e1 Compare July 12, 2023 20:50
@bhapas bhapas force-pushed the fix-aws-terraform-tests branch 2 times, most recently from 7152585 to b0f7b9a Compare July 13, 2023 06:02
@bhapas bhapas force-pushed the fix-aws-terraform-tests branch 6 times, most recently from 7f4d57a to b134c64 Compare July 13, 2023 14:11
@bhapas bhapas force-pushed the fix-aws-terraform-tests branch 2 times, most recently from 91bbf14 to 18f5916 Compare July 14, 2023 12:16
@bhapas bhapas marked this pull request as ready for review July 17, 2023 11:13
@bhapas bhapas requested review from a team as code owners July 17, 2023 11:13
@bhapas bhapas requested review from belimawr and faec July 17, 2023 11:13
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@pierrehilbert pierrehilbert added the Team:Elastic-Agent Label for the Agent team label Jul 17, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@pierrehilbert pierrehilbert requested a review from rdner July 17, 2023 12:10
@botelastic botelastic bot added the Team:Automation Label for the Observability productivity team label Jul 17, 2023
@bhapas bhapas added Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team Team:Cloud-Monitoring Label for the Cloud Monitoring team ci and removed Team:Security-External Integrations Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team labels Jul 17, 2023
@bhapas bhapas merged commit af2d773 into elastic:main Jul 17, 2023
mergify bot pushed a commit that referenced this pull request Jul 17, 2023
* Unstash terraform config into correct directory

* Fix Jenkinsfile

* fix failing test

* Mention issue for commented code

(cherry picked from commit af2d773)
bhapas added a commit that referenced this pull request Jul 18, 2023
…6085)

* Unstash terraform config into correct directory

* Fix Jenkinsfile

* fix failing test

* Mention issue for commented code

(cherry picked from commit af2d773)

Co-authored-by: Bharat Pasupula <123897612+bhapas@users.noreply.github.com>
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
* Unstash terraform config into correct directory

* Fix Jenkinsfile

* fix failing test

* Mention issue for commented code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.9.0 Automated backport with mergify bugfix ci Team:Automation Label for the Observability productivity team Team:Cloud-Monitoring Label for the Cloud Monitoring team Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants