Skip to content

Commit 4eae13c

Browse files
committed
Merge remote-tracking branch 'remote/ecs-express-gateway-text-only' into v2
2 parents c1faea7 + a7b1079 commit 4eae13c

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

awscli/customizations/ecs/expressgateway/display_strategy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ def execute_monitoring(self, collector, start_time, timeout_minutes):
199199
break
200200

201201
try:
202-
self.stream_display.show_polling_message()
203-
204202
collector.get_current_view("")
205203

206204
# Extract cached result for diff detection

awscli/customizations/ecs/expressgateway/managedresource.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# language governing permissions and limitations under the License.
1313

1414
import sys
15-
from datetime import datetime
15+
from datetime import datetime, timezone
1616

1717
import dateutil.parser
1818

@@ -155,9 +155,9 @@ def get_stream_string(self, timestamp, use_color=True):
155155
lines.append(f" Reason: {self.reason}")
156156

157157
if self.updated_at:
158-
updated_time = datetime.fromtimestamp(self.updated_at).strftime(
159-
"%Y-%m-%d %H:%M:%S"
160-
)
158+
updated_time = datetime.fromtimestamp(
159+
self.updated_at, tz=timezone.utc
160+
).strftime("%Y-%m-%d %H:%M:%SZ")
161161
lines.append(f" Last Updated At: {updated_time}")
162162

163163
if self.additional_info:

awscli/customizations/ecs/expressgateway/stream_display.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"""Stream display implementation for ECS Express Gateway Service monitoring."""
1515

1616
import time
17+
from datetime import datetime, timezone
1718

1819
from awscli.customizations.ecs.expressgateway.managedresourcegroup import (
1920
ManagedResourceGroup,
@@ -108,4 +109,4 @@ def show_error_message(self, error):
108109

109110
def _get_timestamp(self):
110111
"""Get formatted timestamp."""
111-
return time.strftime("%Y-%m-%d %H:%M:%S")
112+
return datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%SZ")

tests/unit/customizations/ecs/expressgateway/test_display_strategy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ def test_execute_with_mock_collector(self, mock_sleep, capsys):
256256
output = capsys.readouterr().out
257257
printed_output = output
258258
assert "Starting monitoring" in printed_output
259-
assert "Polling for updates" in printed_output
260259
assert "stopped by user" in printed_output
261260
assert "complete" in printed_output
262261

0 commit comments

Comments
 (0)