File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 44
55[ Unreleased ] : https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.21.0...HEAD
66
7+ ### Fixed
8+
9+ - fixed ` chaosaws.s3.controls.upload ` so the url is correctly added
10+
711## [ 0.21.0] [ ] - 2022-07-12
812[ 0.21.0 ] : https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.20.1...0.21.0
913
Original file line number Diff line number Diff line change @@ -58,9 +58,6 @@ def after_experiment_control(
5858 ext = "json"
5959 if as_yaml :
6060 ext = "yaml"
61- state = yaml .safe_dump (state , indent = False , default_flow_style = False )
62- else :
63- state = json .dumps (state , indent = False )
6461
6562 suffix = ""
6663 if suffix_with_timestamp :
@@ -76,8 +73,13 @@ def after_experiment_control(
7673 extra_journal = extra .setdefault ("journal" , {})
7774 extra_journal ["url" ] = url
7875
76+ if as_yaml :
77+ journal = yaml .safe_dump (state , indent = False , default_flow_style = False )
78+ else :
79+ journal = json .dumps (state , indent = False )
80+
7981 with NamedTemporaryFile () as fd :
80- fd .write (state .encode ("utf-8" ))
82+ fd .write (journal .encode ("utf-8" ))
8183 fd .seek (0 )
8284 client .upload_file (fd .name , bucket_name , path )
8385
You can’t perform that action at this time.
0 commit comments