-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[aws/s3]: fix s3_input integration test #39648
[aws/s3]: fix s3_input integration test #39648
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
2122959
to
aa33c4c
Compare
e1deba5
to
f0eb390
Compare
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
@pkoutsovasilis Thanks for taking this up... Can you attach the logs of test run locally. |
I can attach them for sure @bhapas but why you need these particular logs attached here and not seeing that this test has run and passed from BK? PS: not only |
Good Question.. I did not find the Cloud Module tests that failed before with |
I am getting mixed signals here, you want a failure or a success?! 😆 Either way, here you can see that |
Found a successful one though. Never mind :-) |
@@ -353,7 +358,7 @@ func TestInputRunS3(t *testing.T) { | |||
assert.EqualValues(t, s3Input.metrics.s3ObjectsRequestedTotal.Get(), 7) | |||
assert.EqualValues(t, s3Input.metrics.s3ObjectsListedTotal.Get(), 8) | |||
assert.EqualValues(t, s3Input.metrics.s3ObjectsProcessedTotal.Get(), 7) | |||
assert.EqualValues(t, s3Input.metrics.s3ObjectsAckedTotal.Get(), 6) | |||
assert.EqualValues(t, s3Input.metrics.s3ObjectsAckedTotal.Get(), 7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did the number of acked objects changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first because it was failing but also this should be 7 to begin with, right???
- "testdata/events-array.json",
- "testdata/invalid.json",
- "testdata/log.json",
- "testdata/log.ndjson",
- "testdata/multiline.json",
- "testdata/multiline.json.gz",
- "testdata/multiline.txt"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
it wasn't tested with
aws
label
Does this mean these tests are only run when the aws
label is set? It looks like 2-3 unrelated errors accumulated here, if these tests aren't being run automatically on things that touch AWS code/libs then we should probably fix that.
@@ -402,7 +407,10 @@ func makeAWSConfig(t *testing.T, region string) aws.Config { | |||
|
|||
func drainSQS(t *testing.T, region string, queueURL string, cfg aws.Config) { | |||
sqs := &awsSQSAPI{ | |||
client: sqs.NewFromConfig(cfg), | |||
client: sqs.NewFromConfig(cfg, func(options *sqs.Options) { | |||
//options.ClientLogMode = aws.LogResponseWithBody |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment so somebody can enable the client log mode and see what the client is responding with when tests are failing with an error like this one. you want it removed?
Correct. This was the behavior for some time on Jenkins already (see https://github.com/elastic/observability-dev/blob/main/docs/dc/beats-ci/README.md#github-labels) and it was migrated over to Buildkite too. We had a discussion with @pierrehilbert and the platform ingest eng prod team about improvements and not having to rely on users to remember to use the right label on such PRs. |
Interesting! So, should we add the
I created the first PR for Azure, but PRs to manage AWS and GCP dependencies with Dependabot are coming. |
Proposed commit message
This PR fixes the following errors captured https://github.com/elastic/ingest-dev/issues/3312
Initially these tests resulted as broken because of this PR #39353 which quoting from the description
split up the pre-existing
s3input
tos3PollerInput
andsqsReaderInput
without reflecting this in thex-pack/filebeat/input/awss3/input_integration_test.go
. However, even when applying the necessary changes in the former, another error surfaces. Specifically this oneI can trace the above only to the update of aws package dependencies which happened in this #39454 and it wasn't tested with
aws
label. To fix this error the image of localstack, spawned during the aws integration tests, had to be updated to3.1.0
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
N/A
How to test this PR locally
Open a PR on beats CI and add the
aws
labelRelated issues
Use cases
N/A
Screenshots
N/A
Logs
N/A