Skip to content

[Mellanox][202012] Enhance Python3 support for platform API (back-porting #7410)#7910

Merged
jleveque merged 1 commit intosonic-net:202012from
stephenxs:cherr-pick-python3
Jun 18, 2021
Merged

[Mellanox][202012] Enhance Python3 support for platform API (back-porting #7410)#7910
jleveque merged 1 commit intosonic-net:202012from
stephenxs:cherr-pick-python3

Conversation

@stephenxs
Copy link
Collaborator

  • Why I did it
    This is to back-port Azure 7410 to 202012 branch.
    Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

  • How I did it
    Start all platform daemons from python3

  1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
  2. Adjust SDK API calls accordingly
  • How to verify it
    Manually test and run regression platform test

Signed-off-by: Stephen Sun stephens@nvidia.com

Why I did it

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

- Why I did it
Enhance the Python3 support for platform API. Originally, some platform APIs call SDK API which didn't support Python 3. Now the Python 3 APIs have been supported in SDK 4.4.3XXX, Python3 is completely supported by platform API

- How I did it
Start all platform daemons from python3
1. Remove #/usr/bin/env python at the beginning of each platform API file as the platform API won't be started as daemons but be imported from other daemons.
2. Adjust SDK API calls accordingly

- How to verify it
Manually test and run regression platform test

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

Looks like ci issue. @qiluo-msft can you help on this? thanks

2021-06-18T00:55:04.4616635Z ##[section]Starting: Clean Workspace
2021-06-18T00:55:04.4824272Z ==============================================================================
2021-06-18T00:55:04.4824824Z Task         : Command line
2021-06-18T00:55:04.4825228Z Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-06-18T00:55:04.4825478Z Version      : 2.182.0
2021-06-18T00:55:04.4825811Z Author       : Microsoft Corporation
2021-06-18T00:55:04.4826210Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-06-18T00:55:04.4826508Z ==============================================================================
2021-06-18T00:55:04.6541703Z Generating script.
2021-06-18T00:55:04.6549574Z ========================== Starting Command Output ===========================
2021-06-18T00:55:04.6568326Z [command]/usr/bin/bash --noprofile --norc /agent/_work/_temp/c5a60545-e987-42eb-bce0-0cddc5a32b96.sh
2021-06-18T00:55:04.6697053Z sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2021-06-18T00:55:04.6763126Z sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2021-06-18T00:55:04.7073009Z sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2021-06-18T00:55:04.7177002Z sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2021-06-18T00:55:04.7267960Z sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
2021-06-18T00:55:04.7345524Z ##[error]Bash exited with code '1'.
2021-06-18T00:55:04.7394630Z ##[section]Finishing: Clean Workspace

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jleveque jleveque merged commit 346b916 into sonic-net:202012 Jun 18, 2021
@stephenxs stephenxs deleted the cherr-pick-python3 branch June 18, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants