Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Sep 20, 2022

This is an automatic backport of pull request #4185 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

)

## Description

With the latest [moto release](getmoto/moto#5249), adding a record which exceeds the max size constraint is not supported. Since this test validates unsupported behavior it was removed.

New [Boto Validation Error](https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/21184/workflows/33375cfd-6f3f-446e-aae7-2e800994e9df/jobs/1440546):
```
def test_kinesis_put_records_base64_exceeds_max_size(self):
        client = self.session.create_client("kinesis", region_name="us-east-1")

        stream_name = "test"
        client.create_stream(StreamName=stream_name, ShardCount=1)
        stream = client.describe_stream(StreamName=stream_name)["StreamDescription"]
        shard_id = stream["Shards"][0]["ShardId"]

        partition_key = "1234"
        sample_string = json.dumps({"Hello": "x" * (1 << 20)})
        sample_string_bytes = sample_string.encode("ascii")
        base64_bytes = base64.b64encode(sample_string_bytes)
        data_str = base64_bytes.decode("ascii")
        data = [
            {"Data": data_str, "PartitionKey": partition_key},
            {"Data": data_str, "PartitionKey": partition_key},
        ]

        Pin(service=self.TEST_SERVICE, tracer=self.tracer).onto(client)
>       client.put_records(StreamName=stream_name, Records=data)

tests/contrib/botocore/test.py:1676:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
        if http.status_code >= 300:
            error_code = parsed_response.get("Error", {}).get("Code")
            error_class = self.exceptions.from_code(error_code)
>           raise error_class(parsed_response, operation_name)
E           botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the PutRecords operation: 1 validation error detected: Value at 'records.1.member.data' failed to satisfy constraint: Member must have length less than or equal to 1048576

.riot/venv_py3615_moto[all]/lib/python3.6/site-packages/botocore/client.py:911: ValidationException
```

## Checklist
- [ ] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [ ] Add additional sections for `feat` and `fix` pull requests.
- [ ] Ensure tests are passing for affected code.
- [ ] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

## Motivation

## Design

## Testing strategy

## Relevant issue(s)

## Testing strategy

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 4f8ec5a)
@mergify mergify bot requested a review from a team as a code owner September 20, 2022 18:40
@Yun-Kim Yun-Kim added the changelog/no-changelog A changelog entry is not required for this PR. label Sep 20, 2022
@Kyle-Verhoog Kyle-Verhoog merged commit d7864be into 0.61 Sep 20, 2022
@Kyle-Verhoog Kyle-Verhoog deleted the mergify/bp/0.61/pr-4185 branch September 20, 2022 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants