Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactored archive installer #12771

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

refactored archive installer #12771

wants to merge 3 commits into from

Conversation

macnev2013
Copy link
Contributor

Motivation

The ArchiveDownloadAndExtractInstaller class currently has some limitations that make it difficult to extend and reuse. The main issue is that the _install method is handling multiple responsibilities(setting up directories, downloading archives, extracting files, and handling special cases like single-directory archives).
This monolithic approach makes it hard for subclasses to customize specific parts of the installation process without having to rewrite the entire method.
This PR refactors the class to break down these responsibilities into smaller, focused methods that can be easily overridden or reused by subclasses.

Changes

  • extracted reusable methods from _install method
    • _download_and_extract_archive - downloads and extracts archive
    • _handle_single_directory_extraction - handles logic for extracting all files in a single root directory
  • improves cleanup with proper try/finally block

@macnev2013 macnev2013 requested a review from alexrashed as a code owner June 18, 2025 07:24
@macnev2013 macnev2013 added the semver: patch Non-breaking changes which can be included in patch releases label Jun 18, 2025
Copy link

github-actions bot commented Jun 18, 2025

Test Results - Preflight, Unit

21 630 tests  ±0   19 973 ✅ ±0   6m 22s ⏱️ -3s
     1 suites ±0    1 657 💤 ±0 
     1 files   ±0        0 ❌ ±0 

Results for commit 7683b05. ± Comparison against base commit ea0a194.

♻️ This comment has been updated with latest results.

@macnev2013 macnev2013 marked this pull request as draft June 18, 2025 07:29
Copy link

github-actions bot commented Jun 18, 2025

Test Results (amd64) - Acceptance

7 tests  ±0   5 ✅ ±0   3m 6s ⏱️ -8s
1 suites ±0   2 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 7683b05. ± Comparison against base commit ea0a194.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 18, 2025

Test Results - Alternative Providers

987 tests  ±0   589 ✅ ±0   29m 49s ⏱️ -50s
  4 suites ±0   398 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 7683b05. ± Comparison against base commit ea0a194.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 18, 2025

Test Results (amd64) - Integration, Bootstrap

    5 files  ±0      5 suites  ±0   2h 22m 2s ⏱️ +49s
5 239 tests ±0  4 310 ✅ ±0  929 💤 ±0  0 ❌ ±0 
5 245 runs  ±0  4 310 ✅ ±0  935 💤 ±0  0 ❌ ±0 

Results for commit 7683b05. ± Comparison against base commit ea0a194.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 18, 2025

LocalStack Community integration with Pro

    2 files  ±0      2 suites  ±0   1h 43m 32s ⏱️ + 2m 38s
4 882 tests ±0  4 105 ✅ ±0  777 💤 ±0  0 ❌ ±0 
4 884 runs  ±0  4 105 ✅ ±0  779 💤 ±0  0 ❌ ±0 

Results for commit 7683b05. ± Comparison against base commit ea0a194.

♻️ This comment has been updated with latest results.

@macnev2013 macnev2013 marked this pull request as ready for review June 20, 2025 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant