You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "DaanHoogland (via GitHub)" <gi...@apache.org> on 2026/02/14 16:52:04 UTC
[PR] merge attempt 20.3 -> 22.1 [cloudstack]
DaanHoogland opened a new pull request, #12644:
URL: https://github.com/apache/cloudstack/pull/12644
### Description
This PR...
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813929926
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -186,7 +187,7 @@ public void testExecuteWithCifsMountType() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813926124
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Arrays.asList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3913951961
merge forward based on advice here done directly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813930934
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -227,7 +228,7 @@ public void testExecuteWithMountFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813933939
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -407,7 +408,7 @@ public void testExecuteWithAttachVolumeFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3914319058
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2811311026
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -186,7 +187,7 @@ public void testExecuteWithCifsMountType() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -461,7 +462,7 @@ public void testExecuteWithTempDirectoryCreationFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -227,7 +228,7 @@ public void testExecuteWithMountFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
Review Comment:
restoredVolume.setSize(backupVolumeInfo.getSize()); -> restoredVolume.setSize(backedUpVolumeSize);
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
@@ -366,7 +375,12 @@ public Pair<Boolean, String> restoreBackedUpVolume(Backup backup, Backup.VolumeI
final StoragePoolVO pool = primaryDataStoreDao.findByUuid(dataStoreUuid);
final HostVO hostVO = hostDao.findByIp(hostIp);
- LOG.debug("Restoring vm volume {} from backup {} on the NAS Backup Provider", backupVolumeInfo, backup);
+ Backup.VolumeInfo matchingVolume = getBackedUpVolumeInfo(backup.getBackedUpVolumes(), volume.getUuid());
+ if (matchingVolume == null) {
+ throw new CloudRuntimeException(String.format("Unable to find volume %s in the list of backed up volumes for backup %s, cannot proceed with restore", volume.getUuid(), backup));
+ }
+
Review Comment:
```suggestion
Long backedUpVolumeSize = matchingVolume.getSize();
```
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -309,7 +310,7 @@ public void testExecuteWithCorruptBackupFile() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -357,7 +358,7 @@ public void testExecuteWithRsyncFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -263,7 +264,7 @@ public void testExecuteWithBackupFileNotFound() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123", "volume-456"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -407,7 +408,7 @@ public void testExecuteWithAttachVolumeFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -69,7 +70,7 @@ public void testExecuteWithVmExistsNull() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813949998
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -69,7 +70,7 @@ public void testExecuteWithVmExistsNull() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813927358
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
```suggestion
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3908182671
thanks @abh1sar @winterhazel , I will give it another go this afternoon/evening
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813936083
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
```suggestion
));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813923833
##########
plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java:
##########
Review Comment:
```suggestion
restoredVolume.setSize(backedUpVolumeSize);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3911566939
> [INFO] Running com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest
> 00:06:55.822 [main] ERROR com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper - Failed to mount repository {} of type {} to the directory {}
> 00:06:55.829 [main] ERROR com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper - Failed to create the tmp mount directory {} for restore
> java.io.IOException: Failed to create temp directory
@DaanHoogland this is not an error. it is an expected exception.
> [ERROR] Tests run: 11, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.239 s <<< FAILURE! - in com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest
Do you have logs for the 3 Errors? I don't see this in the current failed build logs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2811926474
##########
framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java:
##########
@@ -811,8 +785,8 @@ public void loadPresetVariableValueForVolumeTestRecordIsVolumeAndDoesNotHaveStor
Mockito.doReturn(expected.getId()).when(volumeVoMock).getUuid();
Mockito.doReturn(expected.getName()).when(volumeVoMock).getName();
Mockito.doReturn(expected.getDiskOffering()).when(presetVariableHelperSpy).getPresetVariableValueDiskOffering(Mockito.anyLong());
- Mockito.doReturn(expected.getProvisioningType()).when(volumeVoMock).getProvisioningType();
Mockito.doReturn(expected.getVolumeType()).when(volumeVoMock).getVolumeType();
+ Mockito.doReturn(expected.getProvisioningType()).when(volumeVoMock).getProvisioningType();
Review Comment:
```suggestion
Mockito.doReturn(ProvisioningType.getProvisioningType(expected.getProvisioningType())).when(volumeVoMock).getProvisioningType();
```
##########
framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java:
##########
@@ -218,9 +218,9 @@ private Value getValueForTests() {
value.setProvisioningType(ProvisioningType.THIN);
Review Comment:
```suggestion
value.setProvisioningType(ProvisioningType.THIN.toString());
```
##########
framework/quota/src/main/java/org/apache/cloudstack/quota/activationrule/presetvariables/Value.java:
##########
@@ -20,10 +20,8 @@
import java.util.List;
import java.util.Map;
-import com.cloud.storage.Snapshot;
import com.cloud.storage.Storage.ProvisioningType;
import com.cloud.storage.Volume;
-import com.cloud.vm.snapshot.VMSnapshot;
import org.apache.cloudstack.quota.constant.QuotaTypes;
public class Value extends GenericPresetVariable {
Review Comment:
`provisioningType` and `volumeType` need to be converted to `String`s in this class
##########
framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java:
##########
@@ -760,15 +736,15 @@ public void loadPresetVariableValueForVolumeTestRecordIsVolumeAndHasStorageSetFi
VolumeVO volumeVoMock = Mockito.mock(VolumeVO.class);
Mockito.doReturn(volumeVoMock).when(volumeDaoMock).findByIdIncludingRemoved(Mockito.anyLong());
- Mockito.doReturn(1l).when(volumeVoMock).getPoolId();
+ Mockito.doReturn(1L).when(volumeVoMock).getPoolId();
mockMethodValidateIfObjectIsNull();
Mockito.doReturn(expected.getId()).when(volumeVoMock).getUuid();
Mockito.doReturn(expected.getName()).when(volumeVoMock).getName();
Mockito.doReturn(expected.getDiskOffering()).when(presetVariableHelperSpy).getPresetVariableValueDiskOffering(Mockito.anyLong());
- Mockito.doReturn(expected.getProvisioningType()).when(volumeVoMock).getProvisioningType();
Mockito.doReturn(expected.getVolumeType()).when(volumeVoMock).getVolumeType();
+ Mockito.doReturn(expected.getProvisioningType()).when(volumeVoMock).getProvisioningType();
Review Comment:
```suggestion
Mockito.doReturn(Volume.Type.valueOf(expected.getVolumeType())).when(volumeVoMock).getVolumeType();
Mockito.doReturn(ProvisioningType.getProvisioningType(expected.getProvisioningType())).when(volumeVoMock).getProvisioningType();
```
##########
framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java:
##########
@@ -811,8 +785,8 @@ public void loadPresetVariableValueForVolumeTestRecordIsVolumeAndDoesNotHaveStor
Mockito.doReturn(expected.getId()).when(volumeVoMock).getUuid();
Mockito.doReturn(expected.getName()).when(volumeVoMock).getName();
Mockito.doReturn(expected.getDiskOffering()).when(presetVariableHelperSpy).getPresetVariableValueDiskOffering(Mockito.anyLong());
- Mockito.doReturn(expected.getProvisioningType()).when(volumeVoMock).getProvisioningType();
Mockito.doReturn(expected.getVolumeType()).when(volumeVoMock).getVolumeType();
Review Comment:
```suggestion
Mockito.doReturn(Volume.Type.valueOf(expected.getVolumeType())).when(volumeVoMock).getVolumeType();
```
##########
framework/quota/src/test/java/org/apache/cloudstack/quota/activationrule/presetvariables/PresetVariableHelperTest.java:
##########
@@ -218,9 +218,9 @@ private Value getValueForTests() {
value.setProvisioningType(ProvisioningType.THIN);
value.setStorage(getStorageForTests());
value.setSize(ByteScaleUtils.GiB);
- value.setSnapshotType(Snapshot.Type.HOURLY);
+ value.setSnapshotType(Snapshot.Type.HOURLY.toString());
value.setTag("tag_test");
- value.setVmSnapshotType(VMSnapshot.Type.Disk);
+ value.setVmSnapshotType(VMSnapshot.Type.Disk.toString());
value.setComputingResources(getComputingResourcesForTests());
value.setVolumeType(Volume.Type.DATADISK);
Review Comment:
```suggestion
value.setVolumeType(Volume.Type.DATADISK.toString());
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813930934
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -227,7 +228,7 @@ public void testExecuteWithMountFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813931696
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -263,7 +264,7 @@ public void testExecuteWithBackupFileNotFound() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813933357
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -357,7 +358,7 @@ public void testExecuteWithRsyncFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813932459
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -309,7 +310,7 @@ public void testExecuteWithCorruptBackupFile() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813929926
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -186,7 +187,7 @@ public void testExecuteWithCifsMountType() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813936083
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
```suggestion
));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123", "volume-456"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3902174861
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12644?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.70%. Comparing base ([`7324ef4`](https://app.codecov.io/gh/apache/cloudstack/commit/7324ef45d4611d9362676eeb133efa839bfd1384?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`bb09201`](https://app.codecov.io/gh/apache/cloudstack/commit/bb0920123f26a8e0fa7723394fe8daad0f4064ba?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (7324ef4) and HEAD (bb09201). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (7324ef4) | HEAD (bb09201) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.22 #12644 +/- ##
=============================================
- Coverage 17.62% 3.70% -13.92%
=============================================
Files 5917 448 -5469
Lines 531255 38018 -493237
Branches 64951 7035 -57916
=============================================
- Hits 93639 1409 -92230
+ Misses 427077 36422 -390655
+ Partials 10539 187 -10352
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12644/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/12644/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.70% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/12644/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/12644?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3902168051
@abh1sar @Pearl1594 @winterhazel , I did a merge forward and after hours of fixing still have some unit test problems. In general I feel quite unsure if all your PRs came out of my tinkering ok. Can you have a look please?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2815556972
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
Review Comment:
Add `when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#issuecomment-3910919811
@abh1sar more errors
```
[INFO] Running com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest
00:06:55.822 [main] ERROR com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper - Failed to mount repository {} of type {} to the directory {}
00:06:55.829 [main] ERROR com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper - Failed to create the tmp mount directory {} for restore
java.io.IOException: Failed to create temp directory
at java.nio.file.Files.createTempDirectory(Files.java:1007) ~[?:?]
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper.mountBackupDirectory(LibvirtRestoreBackupCommandWrapper.java:188) ~[classes/:?]
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapper.execute(LibvirtRestoreBackupCommandWrapper.java:83) ~[classes/:?]
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest.testExecuteWithTempDirectoryCreationFailure(LibvirtRestoreBackupCommandWrapperTest.java:472) ~[test-classes/:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) ~[junit-4.13.2.jar:4.13.2]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) ~[junit-4.13.2.jar:4.13.2]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) ~[junit-4.13.2.jar:4.13.2]
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) ~[junit-4.13.2.jar:4.13.2]
at org.mockito.internal.runners.DefaultInternalRunner$1$1.evaluate(DefaultInternalRunner.java:55) ~[mockito-core-5.16.1.jar:?]
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) ~[junit-4.13.2.jar:4.13.2]
at org.junit.runners.ParentRunner.run(ParentRunner.java:413) ~[junit-4.13.2.jar:4.13.2]
at org.mockito.internal.runners.DefaultInternalRunner$1.run(DefaultInternalRunner.java:100) ~[mockito-core-5.16.1.jar:?]
at org.mockito.internal.runners.DefaultInternalRunner.run(DefaultInternalRunner.java:107) ~[mockito-core-5.16.1.jar:?]
at org.mockito.internal.runners.StrictRunner.run(StrictRunner.java:42) ~[mockito-core-5.16.1.jar:?]
at org.mockito.junit.MockitoJUnitRunner.run(MockitoJUnitRunner.java:163) ~[mockito-core-5.16.1.jar:?]
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) ~[surefire-junit4-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) ~[surefire-junit4-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) ~[surefire-junit4-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) ~[surefire-junit4-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) ~[surefire-booter-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) ~[surefire-booter-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) ~[surefire-booter-2.22.2.jar:2.22.2]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) ~[surefire-booter-2.22.2.jar:2.22.2]
[ERROR] Tests run: 11, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.239 s <<< FAILURE! - in com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest
[ERROR] testExecuteWithMultipleVolumes(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest) Time elapsed: 0.002 s <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest.testExecuteWithMultipleVolumes(LibvirtRestoreBackupCommandWrapperTest.java:517)
[ERROR] testExecuteWithVmExistsTrue(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest.testExecuteWithVmExistsTrue(LibvirtRestoreBackupCommandWrapperTest.java:130)
[ERROR] testExecuteWithVmExistsFalse(com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest) Time elapsed: 0.001 s <<< ERROR!
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRestoreBackupCommandWrapperTest.testExecuteWithVmExistsFalse(LibvirtRestoreBackupCommandWrapperTest.java:167)
```
can you give a clue? cc @Pearl1594
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #12644: merge attempt 20.3 -> 22.1
URL: https://github.com/apache/cloudstack/pull/12644
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] merge attempt 20.3 -> 22.1 [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #12644:
URL: https://github.com/apache/cloudstack/pull/12644#discussion_r2813935093
##########
plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java:
##########
@@ -461,7 +462,7 @@ public void testExecuteWithTempDirectoryCreationFailure() throws Exception {
PrimaryDataStoreTO primaryDataStore = Mockito.mock(PrimaryDataStoreTO.class);
when(command.getRestoreVolumePools()).thenReturn(Arrays.asList(primaryDataStore));
lenient().when(command.getRestoreVolumePaths()).thenReturn(Arrays.asList("/var/lib/libvirt/images/volume-123"));
- lenient().when(command.getRestoreVolumeUUID()).thenReturn("volume-123");
+ lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
Review Comment:
```suggestion
lenient().when(command.getBackupVolumesUUIDs()).thenReturn(Collections.singletonList("volume-123"));
when(command.getBackupFiles()).thenReturn(Arrays.asList("volume-123"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org