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

🧹 Rework azure snapshot connection to use device connection. #4085

Merged
merged 1 commit into from
May 27, 2024

Conversation

preslavgerchev
Copy link
Contributor

Reworks the azure snapshot connection almost entirely.

  • All the flags around skipping setup are now dropped. This connection now only supports selecting a target (disk, snapshot, instance), cloning that and mounting onto the scanner VM.
  • Delete all code that requires running local commands. The needed properties for mounting are determined entirely via the API
  • Embed DeviceConnection into the azure connection. It now only holds the job of identifying the VM its on and making a disk for the target we're scanning.

@preslavgerchev preslavgerchev force-pushed the preslav/update-azure-snapshot branch from 1aa720a to 70294cc Compare May 23, 2024 12:29
Copy link
Contributor

github-actions bot commented May 23, 2024

Test Results

3 000 tests   - 2   2 999 ✅  - 2   1m 29s ⏱️ +6s
  331 suites ±0       1 💤 ±0 
   23 files   ±0       0 ❌ ±0 

Results for commit bfaa625. ± Comparison against base commit 8f5e32b.

This pull request removes 6 and adds 4 tests. Note that renamed tests count towards both.
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestFilterScsiDevices
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestFindDeviceByBlock
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestFindDeviceByBlock/empty_target_as_all_blocks_are_mounted
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestFindDeviceByBlock/find_device_by_block
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestFindDeviceByBlock/no_matches
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestParseLsscsiOutput
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestGetFirstAvailableLun
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestGetFirstAvailableLun/first_available_lun_on_a_scanner_with_no_disks
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestGetFirstAvailableLun/first_available_lun_on_a_scanner_with_some_disks
go.mondoo.com/cnquery/v11/providers/azure/connection/azureinstancesnapshot ‑ TestGetFirstAvailableLun/no_luns_available

♻️ This comment has been updated with latest results.

@preslavgerchev preslavgerchev force-pushed the preslav/update-azure-snapshot branch 4 times, most recently from 9127fe5 to a5bb961 Compare May 23, 2024 12:41
@preslavgerchev preslavgerchev force-pushed the preslav/update-azure-snapshot branch from a5bb961 to 5c67a92 Compare May 27, 2024 09:02
… flags that were used as a temporary workaround.

Signed-off-by: Preslav <[email protected]>
@preslavgerchev preslavgerchev force-pushed the preslav/update-azure-snapshot branch from 5c67a92 to bfaa625 Compare May 27, 2024 09:19
@preslavgerchev preslavgerchev merged commit 9714899 into main May 27, 2024
15 checks passed
@preslavgerchev preslavgerchev deleted the preslav/update-azure-snapshot branch May 27, 2024 09:27
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants