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

add listPrefix in awsS3WriteCommitPrefix #31776

Merged
merged 6 commits into from
Jun 2, 2022
Merged

add listPrefix in awsS3WriteCommitPrefix #31776

merged 6 commits into from
Jun 2, 2022

Conversation

aspacca
Copy link

@aspacca aspacca commented May 30, 2022

Bug

What does this PR do?

Fix awsS3WriteCommitPrefix bug when using a single bucket with multiple listPrefix on aws-s3 s3 direct input

Why is it important?

Regarding the Cisco Umbrella integration via the elastic agent, a customer ingesting using the Cisco Managed S3 and have near 40 individual integrations setup for different customers. However they found logs to be missing as though the agent failed to read them, not even partial parsing of a log. I checked the files within an S3 bucket to make sure they were written by Cisco and they were.

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 a team as a code owner May 30, 2022 12:12
@aspacca aspacca requested review from cmacknz and kvch and removed request for a team May 30, 2022 12:12
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label May 30, 2022
@aspacca aspacca added the Team:Cloud-Monitoring Label for the Cloud Monitoring team label May 30, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label May 30, 2022
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 30, 2022

💚 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: 2022-06-02T02:41:26.914+0000

  • Duration: 131 min 55 sec

Test stats 🧪

Test Results
Failed 0
Passed 4246
Skipped 338
Total 4584

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

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

@aspacca aspacca requested a review from P1llus May 31, 2022 01:57
continue
}

var latestStoredTime time.Time
keys[state.ID] = struct{}{}
latestStoredTime, ok := latestStoredTimeByBucket[state.Bucket]
latestStoredTime, ok := latestStoredTimeByBucketAndListPrefix[state.Bucket+state.ListPrefix]
Copy link
Author

@aspacca aspacca May 31, 2022

Choose a reason for hiding this comment

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

this is indeed both a bugfix and a breaking change
from the elastic side the only integrations that does that is the one on cisco managed s3 buckets, that's indeed the bugged integration that will fix
but in the case of users using custom setup with a single bucket and multiple list prefixes it will be a breaking change as in the measure that s3 objects could be ingested again (and probably fails ingestion because of same document ids)

Copy link
Member

@P1llus P1llus left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for such a quick reaction to the issue!

@aspacca aspacca added backport-v8.2.0 Automated backport with mergify backport-7.17 Automated backport to the 7.17 branch with mergify labels May 31, 2022
@aspacca
Copy link
Author

aspacca commented May 31, 2022

/test

@aspacca aspacca merged commit ee38609 into elastic:main Jun 2, 2022
mergify bot pushed a commit that referenced this pull request Jun 2, 2022
* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_benchmark_test.go
mergify bot pushed a commit that referenced this pull request Jun 2, 2022
* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_benchmark_test.go
rdner pushed a commit that referenced this pull request Jun 2, 2022
* add listPrefix in awsS3WriteCommitPrefix (#31776)

* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_benchmark_test.go

* fix backport

* remove duplicates in test

Co-authored-by: Andrea Spacca <andrea.spacca@elastic.co>
aspacca pushed a commit that referenced this pull request Jun 2, 2022
)

* add listPrefix in awsS3WriteCommitPrefix (#31776)

* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)

# Conflicts:
#	x-pack/filebeat/input/awss3/input_benchmark_test.go

* fix backport

* remove duplicates in test

Co-authored-by: Andrea Spacca <andrea.spacca@elastic.co>
@aspacca aspacca added the backport-v8.3.0 Automated backport with mergify label Jun 21, 2022
mergify bot pushed a commit that referenced this pull request Jun 21, 2022
* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)
aspacca pushed a commit that referenced this pull request Jun 23, 2022
* add listPrefix in awsS3WriteCommitPrefix (#31776)

* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test

(cherry picked from commit ee38609)

* Update CHANGELOG.next.asciidoc

* Update CHANGELOG.next.asciidoc

Co-authored-by: Andrea Spacca <andrea.spacca@elastic.co>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
* add listPrefix in awsS3WriteCommitPrefix

* linting and changelog

* linting

* try fixing integration test

* try fixing integration test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.17 Automated backport to the 7.17 branch with mergify backport-v8.2.0 Automated backport with mergify backport-v8.3.0 Automated backport with mergify Team:Cloud-Monitoring Label for the Cloud Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants