-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3028 from aws/release-v1.62.0
Release 1.62.0 (to main)
- Loading branch information
Showing
286 changed files
with
4,510 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Transform test error JSON file formatter (without prettier). | ||
It makes error json easier to review by breaking down "errorMessage" | ||
into list of strings (delimiter: ". "). | ||
""" | ||
import os | ||
import sys | ||
|
||
from typing_extensions import Final | ||
|
||
my_path = os.path.dirname(os.path.abspath(__file__)) | ||
sys.path.insert(0, my_path + "/..") | ||
|
||
import json | ||
from typing import Type | ||
|
||
from bin._file_formatter import FileFormatter | ||
|
||
|
||
class TransformTestErrorJSONFormatter(FileFormatter): | ||
_ERROR_MESSAGE_KEY: Final[str] = "errorMessage" | ||
_BREAKDOWN_ERROR_MESSAGE_KEY: Final[str] = "_autoGeneratedBreakdownErrorMessage" | ||
_DELIMITER: Final[str] = ". " | ||
|
||
@staticmethod | ||
def description() -> str: | ||
return "Transform test error JSON file formatter" | ||
|
||
def format_str(self, input_str: str) -> str: | ||
""" | ||
It makes error json easier to review by breaking down "errorMessage" | ||
into list of strings (delimiter: ". "). | ||
""" | ||
obj = json.loads(input_str) | ||
error_message = obj.get(self._ERROR_MESSAGE_KEY) | ||
if isinstance(error_message, str): | ||
tokens = error_message.split(self._DELIMITER) | ||
obj[self._BREAKDOWN_ERROR_MESSAGE_KEY] = [ | ||
token if index == len(tokens) - 1 else token + self._DELIMITER for index, token in enumerate(tokens) | ||
] | ||
return json.dumps(obj, indent=2, sort_keys=True) + "\n" | ||
|
||
@staticmethod | ||
def decode_exception() -> Type[Exception]: | ||
return json.JSONDecodeError | ||
|
||
@staticmethod | ||
def file_extension() -> str: | ||
return ".json" | ||
|
||
|
||
if __name__ == "__main__": | ||
TransformTestErrorJSONFormatter.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.61.0" | ||
__version__ = "1.62.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.