Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/VersionCalPRComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
ls
- name: Install azdev
if: ${{ env.no_changed_mod == 'false' }}
run: |
run: |
python -m pip install --upgrade pip
set -ev
python -m venv env
Expand All @@ -118,6 +118,17 @@ jobs:
azdev --version
cd ../
azdev setup -c azure-cli -r azure-cli-extensions --debug
# `azdev setup` installs azure-cli's pinned requirements which
# downgrade transitive dependencies that azdev itself relies on,
# leaving the environment in an inconsistent state:
# - azure-cli-diff-tool 0.1.1 requires requests~=2.32.3,
# but azure-cli's requirements pin requests==2.33.0
# - tox 4.53.0 requires packaging>=26,
# but azure-cli's requirements pin packaging==25.0
# Realign these so the subsequent metadata generation steps run
# against a consistent dependency set.
pip install --upgrade "requests~=2.32.3" "packaging>=26"
pip check || true
az --version
pip list -v
- name: Gen Base and Diff Metadata
Expand Down
5 changes: 5 additions & 0 deletions src/serial-console/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Release History
===============
1.0.0b4
++++++
* Fixed garbled console output where binary websocket frames were printed as a Python bytes repr (``b'...\\r\\n\\x1b[...]'``) instead of decoded text. Decode bytes to str in ``on_message`` so ANSI escapes and CR/LF are interpreted by the user's terminal.
* Bumped ``websocket-client`` dependency from ``==1.3.1`` to ``~=1.8.0`` to align with the version required by ``azure-cli`` and avoid a ``pkg_resources.ContextualVersionConflict`` at install time.

1.0.0b3
++++++
* Fixed an issue where admin commands were not being sent when the VM was using a custom boot diagnostics storage account.
Expand Down
5 changes: 5 additions & 0 deletions src/serial-console/azext_serialconsole/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,11 @@ def on_open(_):
GV.websocket_instance.send(self.access_token)

def on_message(_, message):
# Binary websocket frames arrive as bytes from websocket-client >= 1.0.
# Decode to str so that ANSI escapes and CR/LF are interpreted by the
# user's terminal instead of being printed as a bytes repr (b'...').
if isinstance(message, (bytes, bytearray)):
message = bytes(message).decode("utf-8", errors="replace")
if GV.first_message:
GV.websocket_instance.send(self.access_token)
GV.first_message = False
Expand Down
4 changes: 2 additions & 2 deletions src/serial-console/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# TODO: Confirm this is the right version number you want and it matches your
# HISTORY.rst entry.
VERSION = '1.0.0b3'
VERSION = '1.0.0b4'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand All @@ -33,7 +33,7 @@
]

# TODO: Add any additional SDK dependencies here
DEPENDENCIES = ["websocket-client==1.3.1"]
DEPENDENCIES = ["websocket-client~=1.8.0"]

with open('README.md', 'r', encoding='utf-8') as f:
README = f.read()
Expand Down
Loading