Commit 2fb1246 1 parent f9eedee commit 2fb1246 Copy full SHA for 2fb1246
File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 4
4
5
5
[ Unreleased ] : https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.21.0...HEAD
6
6
7
+ ### Fixed
8
+
9
+ - fixed ` chaosaws.s3.controls.upload ` so the url is correctly added
10
+
7
11
## [ 0.21.0] [ ] - 2022-07-12
8
12
[ 0.21.0 ] : https://github.com/chaostoolkit-incubator/chaostoolkit-aws/compare/0.20.1...0.21.0
9
13
Original file line number Diff line number Diff line change @@ -58,9 +58,6 @@ def after_experiment_control(
58
58
ext = "json"
59
59
if as_yaml :
60
60
ext = "yaml"
61
- state = yaml .safe_dump (state , indent = False , default_flow_style = False )
62
- else :
63
- state = json .dumps (state , indent = False )
64
61
65
62
suffix = ""
66
63
if suffix_with_timestamp :
@@ -76,8 +73,13 @@ def after_experiment_control(
76
73
extra_journal = extra .setdefault ("journal" , {})
77
74
extra_journal ["url" ] = url
78
75
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
+
79
81
with NamedTemporaryFile () as fd :
80
- fd .write (state .encode ("utf-8" ))
82
+ fd .write (journal .encode ("utf-8" ))
81
83
fd .seek (0 )
82
84
client .upload_file (fd .name , bucket_name , path )
83
85
You can’t perform that action at this time.
0 commit comments