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

Only generate @error message getter when defined in the model #1441

Conversation

david-perez
Copy link
Contributor

We are currently generating a useless message getter that returns
None even when the message field is not defined in the model.
Granted, in the client this field is almost always there, because the
AddErrorMessage model transformer is applied unless the user opts out
in their smithy-build.json.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

We are currently generating a useless `message` getter that returns
`None` even when the `message` field is not defined in the model.
Granted, in the client this field is _almost always_ there, because the
`AddErrorMessage` model transformer is applied unless the user opts out
in their `smithy-build.json`.
@david-perez david-perez requested a review from a team as a code owner June 3, 2022 12:48
@david-perez david-perez mentioned this pull request Jun 3, 2022
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec -6.75% 73953.96 79304.2
Total requests -6.76% 6657432 7139775
Total errors NaN% 0 0
Total successes -6.76% 6657432 7139775
Average latency ms -45.69% 0.63 1.16
Minimum latency ms 0.00% 0.02 0.02
Maximum latency ms -28.36% 17.05 23.8
Stdev latency ms -55.45% 0.9 2.02
Transfer Mb -6.76% 692.04 742.18
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@david-perez david-perez enabled auto-merge (squash) June 8, 2022 17:24
@github-actions
Copy link

github-actions bot commented Jun 8, 2022

A new generated diff is ready to view.

A new doc preview is ready to view.

Rust Wrk benchmark report:

Duration: 90 sec, Connections: 32, Threads: 2

Measurement Deviation Current Old
Requests/sec 7.10% 39103.79 36510.3
Total requests 7.10% 3520237 3286767
Total errors NaN% 0 0
Total successes 7.10% 3520237 3286767
Average latency ms -5.62% 0.84 0.89
Minimum latency ms -33.33% 0.02 0.03
Maximum latency ms 10.32% 18.5 16.77
Stdev latency ms 3.85% 0.54 0.52
Transfer Mb 7.10% 365.93 341.66
Connect errors NaN% 0 0
Read errors NaN% 0 0
Write errors NaN% 0 0
Status errors (not 2xx/3xx) NaN% 0 0
Timeout errors NaN% 0 0

@david-perez david-perez merged commit 2d5bf6f into main Jun 8, 2022
@david-perez david-perez deleted the davidpz/only-generate-_@error_-_message_-getter-when-defined-in-the-model branch June 8, 2022 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants