mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-07-26 14:58:13 +00:00
2974ead76e
Key Achievements: - Downgraded to MinIO 4.0.7 for PowerShell compatibility (eliminated async/await issues) - Fixed file handle leaks in upload operations (using explicit FileStream management) - Implemented clean logging (timestamps without redundant prefixes) - Fixed automatic session variable management (Connect-MinIO stores, cmdlets retrieve) - Removed duplicate certificate parameters (kept only SkipCertificateValidation) - Fixed all 'Folder' alias conflicts across cmdlets - Added correct System.Runtime.CompilerServices.Unsafe.dll version (4.5.3) Working Features: - Connection management (automatic + explicit override) - Bucket operations (list, create, remove) - File upload/download (with proper handle release) - Progress tracking and speed reporting - Clean verbose logging with timestamps Known Issue: - Chunked operations have threading violations (PowerShell cmdlet methods called from background threads) - Regular operations work perfectly, chunked operations need threading architecture fix Test Results: - 3.71GB Windows install.wim file tested - Regular upload/download: Working - File handles: No leaks, immediate deletion possible - Session management: Automatic connection storage/retrieval - Chunked operations: Threading violations need fix
41 lines
1.6 KiB
PowerShell
41 lines
1.6 KiB
PowerShell
# Debug session variable issue
|
|
Import-Module ./Module/PSMinIO/PSMinIO.psd1 -Force
|
|
|
|
Write-Host "=== Session Variable Debug ===" -ForegroundColor Cyan
|
|
|
|
# Test credentials
|
|
$endpoint = "https://api.s3.gracesolution.info"
|
|
$accessKey = "T34Wg85SAwezUa3sk3m4"
|
|
$secretKey = "PxEmnbQoQJTJsDocSEV6mSSscDpJMiJCayPv93xe"
|
|
|
|
Write-Host "1. Before connection - checking variables..." -ForegroundColor Yellow
|
|
Get-Variable -Name "*MinIO*" -Scope Global -ErrorAction SilentlyContinue | ForEach-Object {
|
|
Write-Host "Found: $($_.Name) = $($_.Value)" -ForegroundColor Gray
|
|
}
|
|
|
|
Write-Host "2. Connecting..." -ForegroundColor Yellow
|
|
$connection = Connect-MinIO -Endpoint $endpoint -AccessKey $accessKey -SecretKey $secretKey
|
|
|
|
Write-Host "3. After connection - checking variables..." -ForegroundColor Yellow
|
|
Get-Variable -Name "*MinIO*" -Scope Global -ErrorAction SilentlyContinue | ForEach-Object {
|
|
Write-Host "Found: $($_.Name) = $($_.Value)" -ForegroundColor Gray
|
|
}
|
|
|
|
Write-Host "4. Checking specific variable..." -ForegroundColor Yellow
|
|
try {
|
|
$var = Get-Variable -Name "MinIOConnection" -Scope Global -ErrorAction Stop
|
|
Write-Host "SUCCESS: Variable exists with value: $($var.Value)" -ForegroundColor Green
|
|
} catch {
|
|
Write-Host "FAILED: Variable not found: $($_.Exception.Message)" -ForegroundColor Red
|
|
}
|
|
|
|
Write-Host "5. Testing Get-MinIOBucket with verbose..." -ForegroundColor Yellow
|
|
try {
|
|
$buckets = Get-MinIOBucket -Verbose
|
|
Write-Host "SUCCESS: Found $($buckets.Count) buckets" -ForegroundColor Green
|
|
} catch {
|
|
Write-Host "FAILED: $($_.Exception.Message)" -ForegroundColor Red
|
|
}
|
|
|
|
Write-Host "Debug completed!" -ForegroundColor Cyan
|