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

fix getProviderFromDomain function, move from integration test #28963

Merged
merged 5 commits into from
Nov 15, 2021
Merged

fix getProviderFromDomain function, move from integration test #28963

merged 5 commits into from
Nov 15, 2021

Conversation

aspacca
Copy link

@aspacca aspacca commented Nov 15, 2021

Bug

What does this PR do?

fix logic to discover provider from endpoint in getProviderFromDomain

Why is it important?

#28234 introduced the possibility to use not AWS S3 bucket as input for filebeat.
A function was added to discover the provider when using custom endpoints
The logic was broken since the test were using the wrong input for the function.
We didn't spot during CR of the PR because the test for the function was added to integration test file, that has a build constraint that skip it from running during PR

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.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@aspacca aspacca requested a review from endorama November 15, 2021 12:43
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2021
@mergify
Copy link
Contributor

mergify bot commented Nov 15, 2021

This pull request does not have a backport label. Could you fix it @aspacca? 🙏
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 Nov 15, 2021
@mergify
Copy link
Contributor

mergify bot commented Nov 15, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b fix-getProviderFromDomain-filebeat-aws-s3-input upstream/fix-getProviderFromDomain-filebeat-aws-s3-input
git merge upstream/master
git push upstream fix-getProviderFromDomain-filebeat-aws-s3-input

@aspacca aspacca added the Team:Platforms Label for the Integrations - Platforms team label Nov 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 15, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Nov 15, 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

  • Duration: 96 min 1 sec

❕ Flaky test report

No test was executed to be analysed.

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

@aspacca aspacca added the backport-v8.0.0 Automated backport with mergify label Nov 15, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Nov 15, 2021
Copy link
Member

@endorama endorama left a comment

Choose a reason for hiding this comment

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

I just added a comment to clarify the intention of the change but LGTM. Is my understanding that integration tests are not run, or I did not understand why they did not catch the bug 🤔

@aspacca
Copy link
Author

aspacca commented Nov 15, 2021

Is my understanding that integration tests are not run

the test was added in the integration test file that has //go:build integration && aws and (as far as I got it) it's run only weekly or similar. so it didn't run in the PR and we didn't catch the bug

@aspacca aspacca merged commit 3ffcee0 into elastic:master Nov 15, 2021
mergify bot pushed a commit that referenced this pull request Nov 15, 2021
* fix getProviderFromDomain function, move from integration test

* changelog

* license

* Update x-pack/filebeat/input/awss3/input.go

Co-authored-by: endorama <[email protected]>

Co-authored-by: endorama <[email protected]>
(cherry picked from commit 3ffcee0)
aspacca pushed a commit that referenced this pull request Nov 17, 2021
…integration test (#28972)

* fix getProviderFromDomain function, move from integration test (#28963)

* fix getProviderFromDomain function, move from integration test

* changelog

* license

* Update x-pack/filebeat/input/awss3/input.go

Co-authored-by: endorama <[email protected]>

Co-authored-by: endorama <[email protected]>
(cherry picked from commit 3ffcee0)

* fix changelog

Co-authored-by: Andrea Spacca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.0.0 Automated backport with mergify Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants