Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move try block from test_upgrade_path to install_sonic_image #14441

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illia-kotvitskyi
Copy link
Contributor

@illia-kotvitskyi illia-kotvitskyi commented Sep 5, 2024

ignore the migration error in both downgrade and upgrade scenario

Change-Id: Ie0c4c1ba50caf6f10db669c034fb852da983a5b9

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Ignore the migration error in both downgrade and upgrade scenario

How did you do it?

Moved try/except block from the test itself to a new method install_sonic_image

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@illia-kotvitskyi
Copy link
Contributor Author

@roy-sror could you please review and approve this PR?

@mssonicbld
Copy link
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/upgrade_path/test_upgrade_path.py:3:1: F401 're' imported but unused
tests/upgrade_path/test_upgrade_path.py:20:1: F401 'tests.common.errors.RunAnsibleModuleFail' imported but unused

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@illia-kotvitskyi illia-kotvitskyi force-pushed the move_migrate_sonic_packages_try_block branch from 07d1bfe to c5cfe77 Compare September 6, 2024 08:44
@illia-kotvitskyi
Copy link
Contributor Author

@nhe-NV @roy-sror could you please review this?

@illia-kotvitskyi illia-kotvitskyi force-pushed the move_migrate_sonic_packages_try_block branch from c5cfe77 to e81255c Compare January 2, 2025 10:18
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@illia-kotvitskyi illia-kotvitskyi changed the base branch from 202311 to master January 2, 2025 10:20
@illia-kotvitskyi illia-kotvitskyi changed the base branch from master to 202311 January 2, 2025 10:24
@illia-kotvitskyi illia-kotvitskyi marked this pull request as draft January 2, 2025 10:33
@yxieca yxieca requested a review from vaibhavhd January 2, 2025 18:47
ignore the migration error in both downgrade and upgrade scenario

Change-Id: Id5fc5999f603f9d9b1187f0761ad8d6704cac1a7
@illia-kotvitskyi illia-kotvitskyi force-pushed the move_migrate_sonic_packages_try_block branch from e81255c to 0ba31f0 Compare January 3, 2025 18:53
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Pull request contains merge conflicts.

@illia-kotvitskyi illia-kotvitskyi changed the base branch from 202311 to master January 3, 2025 18:53
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.

4 participants