botocore/botocore/data/ssm-incidents/2018-05-10 /waiters-2.json = Formatted Differently than other waiters-2.json Files
colinbjohnson opened this issue · comments
Describe the bug
The problem is that the botocore/botocore/data/ssm-incidents/2018-05-10 /waiters-2.json
file is formatted differently than all other waiters-2.json
json files.
Expected Behavior
I expect all .json
files in a given repository to be formatted similarly.
Current Behavior
The particular json file is not formatted in the same manner as other .json
files.
Reproduction Steps
- View the file here: https://github.com/boto/botocore/blob/develop/botocore/data/ec2/2015-03-01/waiters-2.json
- View the file here: https://github.com/boto/botocore/blob/develop/botocore/data/ssm-incidents/2018-05-10/waiters-2.json
Possible Solution
I will provide a PR.
Additional Information/Context
I don't know if there is a linting tool for json files but it would be nice if all of these files conformed to a similar standard.
SDK version used
1.34.85
Environment details (OS name and version, etc.)
macOS, 14.2.1 (23C71)
Hi @colinbjohnson thanks for reaching out. The latest EC2 waiter models are in this file. Can you specify the differences you're seeing? Looking at these two files, they seem to follow the same basic structure (apart from the order of keys, and the ssm-incidents
file containing a description
):
![image](https://private-user-images.githubusercontent.com/87778557/324124272-fb8e6d36-f380-418e-a442-f8a84f9cf44a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMDk1MTIsIm5iZiI6MTcyNTIwOTIxMiwicGF0aCI6Ii84Nzc3ODU1Ny8zMjQxMjQyNzItZmI4ZTZkMzYtZjM4MC00MThlLWE0NDItZjhhODRmOWNmNDRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDE2NDY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4ZTg3MWViMDA4NTA1YjkxODg4NDcyY2U2NmYxNGEwYzBjMzFkODVhOTg4YjIyZjA1ZTQ0ODY5N2RhYzhmODQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bFOkm1JEegMv-s4VdERDV4ml9lrqBZjU-aCbCQShFWQ)
Have you observed any inconsistencies in functionality between the waiters, or can you provide more context on your use case?
Waiters are also now maintained by service teams, so if any bugs or feature requests involving waiters would likely need to get forwarded to the corresponding service team. But minor formatting changes may not get prioritized unless there is some use case in which you are blocked.
Two things to look at (which a linter might catch <- I just don't know if there are linters available that can catch these things):
- The acceptor configuration in most waiters files utilize list items that end on one line and start on the next line:
Typical acceptor block:
},
{
as opposed to a single-line format used in botocore/botocore/data/ssm-incidents/2018-05-10 /waiters-2.json
:
}, {
- The number of spaces after a "key" in most waiters files is typically 0 spaces whereas in
botocore/botocore/data/ssm-incidents/2018-05-10 /waiters-2.json
it is 1 space.
Typical waiters file:
"operation": "GetReplicaSet"
Versus botocore/botocore/data/ssm-incidents/2018-05-10 /waiters-2.json
:
"operation" : "GetReplicaSet"
I completely understand how this wouldn't be a priority but I'd also be open to submitting a (separate) PR that includes JSON linting. My own hope would be that something (admittedly small) like JSON linting would help establish the importance of consistency across a codebase and across AWS teams.
Thanks for following up and expanding on the issue. I brought this up with the team for discussion and the takeaway was that this would need to be addressed by the service team. The reason is because waiter models are shared across SDKs, and any changes we would make to the models would be overridden by changes made by the service teams.
That being said, I think we should strive for consistency among these models. If you have a support plan then I recommend reaching out through AWS Support requesting that the SSM team update the format of their waiter model. Alternatively, you can create an issue in our cross-SDK repository and someone can reach out on your behalf.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.