Skip to content

[User Build V2] GRUB - fecth action: files corrupted during transfer (internal use of scp / local iconv) #647

Description

@FALLAI-Denis

Development environment used

  • Z Open Editor version: 6.7.1
  • Editor Platform
    • Visual Studio Code
    • Red Hat OpenShift Dev Spaces
    • Eclipse Che
  • Editor Platform Version: 1.137.0
  • Operating System: Windows 11
  • Java Version: JRE 21
  • Related to RSE API?
    • RSE API Plugin version:
    • Zowe CLI version:
    • Node.js version:
  • Logs attached: no

Problem Description

Files transferred via GRUB's fetch function are corrupted upon receipt.

This appears to be due to the use of the 'scp' command for the transfer, followed by a local conversion from EBCDIC IBM-037 to UTF-8.
'scp' performs an initial conversion from EBCDIC (IBM-1047?) to ASCII (ISO-8859-1?) that is already inappropriate.
The local conversion is no more appropriate.

Observed behavior

2026-09-13T14:04:04.465Z: CRRZG5622I Task 5 of 5: results
2026-09-13T14:04:04.466Z: CRRZG5643I Running task 'results' with properties: {"localCommand":".zopeneditor/grub_client fetch --verbose --debug --hostname J070188@hostname.acme.com --absolutePath --files \"${dbbLogDir}/${buildFile}/**/*.json ${dbbLogDir}/${buildFile}/**/*.log ${dbbLogDir}/${buildFile}/**/*.html\" --localDir .reports/${buildFile}\n"}
2026-09-13T14:04:04.467Z: CRRZG5656I Running local command: .zopeneditor/grub_client fetch --verbose --debug --hostname J070188@hostname.acme.com --absolutePath --files "${dbbLogDir}/${buildFile}/**/*.json ${dbbLogDir}/${buildFile}/**/*.log ${dbbLogDir}/${buildFile}/**/*.html" --localDir .reports/${buildFile}
2026-09-13T14:04:04.571Z: [DEBUG] Debug mode enabled
2026-09-13T14:04:04.572Z: [DEBUG] Enabling command tracing (set -x)
2026-09-13T14:04:04.572Z: + case "$subcommand" in
2026-09-13T14:04:04.573Z: + cmd_fetch
2026-09-13T14:04:04.573Z: + vecho '=== fetch: Download Files from Remote ==='
2026-09-13T14:04:04.574Z: + '[' True = True ']'
2026-09-13T14:04:04.574Z: + echo '=== fetch: Download Files from Remote ==='
2026-09-13T14:04:04.574Z: + '[' -z '' ']'
2026-09-13T14:04:04.575Z: + '[' -z J070188@hostname.acme.com ']'
2026-09-13T14:04:04.575Z: + '[' -n '' ']'
2026-09-13T14:04:04.576Z: + '[' -z '' ']'
2026-09-13T14:04:04.576Z: + '[' True '!=' True ']'
2026-09-13T14:04:04.576Z: + '[' -z '/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html' ']'
2026-09-13T14:04:04.579Z: === fetch: Download Files from Remote ===
2026-09-13T14:04:04.581Z: + local local_dir=.reports/S9TL1A.cbl
2026-09-13T14:04:04.583Z: + mkdir -p .reports/S9TL1A.cbl
2026-09-13T14:04:04.616Z: + vecho 'Files to download: /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:04.617Z: + '[' True = True ']'
2026-09-13T14:04:04.617Z: + echo 'Files to download: /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:04.618Z: + '[' True = True ']'
2026-09-13T14:04:04.618Z: + vecho 'Source: Absolute paths'
2026-09-13T14:04:04.619Z: + '[' True = True ']'
2026-09-13T14:04:04.620Z: + echo 'Source: Absolute paths'
2026-09-13T14:04:04.621Z: + vecho 'Destination: .reports/S9TL1A.cbl'
2026-09-13T14:04:04.621Z: + '[' True = True ']'
2026-09-13T14:04:04.622Z: + echo 'Destination: .reports/S9TL1A.cbl'
2026-09-13T14:04:04.622Z: + for file in $files
2026-09-13T14:04:04.623Z: + vecho 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json...'
2026-09-13T14:04:04.623Z: + '[' True = True ']'
2026-09-13T14:04:04.624Z: + echo 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json...'
2026-09-13T14:04:04.624Z: + local remote_path
2026-09-13T14:04:04.624Z: + '[' True = True ']'
2026-09-13T14:04:04.625Z: + remote_path='/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json'
2026-09-13T14:04:04.625Z: + '[' -n J070188@hostname.acme.com ']'
2026-09-13T14:04:04.625Z: + scp -r -q 'J070188@hostname.acme.com:/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json' .reports/S9TL1A.cbl/
2026-09-13T14:04:04.627Z: Files to download: /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html
2026-09-13T14:04:04.628Z: Source: Absolute paths
2026-09-13T14:04:04.628Z: Destination: .reports/S9TL1A.cbl
2026-09-13T14:04:04.629Z: Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json...
2026-09-13T14:04:11.648Z: +++ basename '/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json'
2026-09-13T14:04:11.667Z: ++ find .reports/S9TL1A.cbl -name '*.json' -type f
2026-09-13T14:04:11.815Z: + local $'downloaded_files=.reports/S9TL1A.cbl/BuildReport.json\n.reports/S9TL1A.cbl/Inventaire.json'
2026-09-13T14:04:11.815Z: + for downloaded_file in $downloaded_files
2026-09-13T14:04:11.816Z: + '[' -f .reports/S9TL1A.cbl/BuildReport.json ']'
2026-09-13T14:04:11.817Z: + vecho 'Converting .reports/S9TL1A.cbl/BuildReport.json from EBCDIC to UTF-8...'
2026-09-13T14:04:11.818Z: + '[' True = True ']'
2026-09-13T14:04:11.819Z: + echo 'Converting .reports/S9TL1A.cbl/BuildReport.json from EBCDIC to UTF-8...'
2026-09-13T14:04:11.819Z: + command -v iconv
2026-09-13T14:04:11.821Z: Converting .reports/S9TL1A.cbl/BuildReport.json from EBCDIC to UTF-8...
2026-09-13T14:04:11.886Z: + local converted=false
2026-09-13T14:04:11.886Z: + for encoding in "IBM037" "CP037" "EBCDIC-US" "IBM-1047" "IBM1047"
2026-09-13T14:04:11.887Z: + iconv -f IBM037 -t UTF-8 .reports/S9TL1A.cbl/BuildReport.json
2026-09-13T14:04:11.931Z: + mv .reports/S9TL1A.cbl/BuildReport.json.tmp .reports/S9TL1A.cbl/BuildReport.json
2026-09-13T14:04:12.035Z: + vecho $'\342\234\223 Converted .reports/S9TL1A.cbl/BuildReport.json using IBM037'
2026-09-13T14:04:12.036Z: + '[' True = True ']'
2026-09-13T14:04:12.037Z: + echo $'\342\234\223 Converted .reports/S9TL1A.cbl/BuildReport.json using IBM037'
2026-09-13T14:04:12.038Z: + converted=true
2026-09-13T14:04:12.038Z: + break
2026-09-13T14:04:12.039Z: ✓ Converted .reports/S9TL1A.cbl/BuildReport.json using IBM037
2026-09-13T14:04:12.040Z: Converting .reports/S9TL1A.cbl/Inventaire.json from EBCDIC to UTF-8...
2026-09-13T14:04:12.041Z: + '[' true = false ']'
2026-09-13T14:04:12.042Z: + for downloaded_file in $downloaded_files
2026-09-13T14:04:12.043Z: + '[' -f .reports/S9TL1A.cbl/Inventaire.json ']'
2026-09-13T14:04:12.043Z: + vecho 'Converting .reports/S9TL1A.cbl/Inventaire.json from EBCDIC to UTF-8...'
2026-09-13T14:04:12.044Z: + '[' True = True ']'
2026-09-13T14:04:12.044Z: + echo 'Converting .reports/S9TL1A.cbl/Inventaire.json from EBCDIC to UTF-8...'
2026-09-13T14:04:12.044Z: + command -v iconv
2026-09-13T14:04:12.045Z: + local converted=false
2026-09-13T14:04:12.045Z: + for encoding in "IBM037" "CP037" "EBCDIC-US" "IBM-1047" "IBM1047"
2026-09-13T14:04:12.046Z: + iconv -f IBM037 -t UTF-8 .reports/S9TL1A.cbl/Inventaire.json
2026-09-13T14:04:12.073Z: + mv .reports/S9TL1A.cbl/Inventaire.json.tmp .reports/S9TL1A.cbl/Inventaire.json
2026-09-13T14:04:12.108Z: + vecho $'\342\234\223 Converted .reports/S9TL1A.cbl/Inventaire.json using IBM037'
2026-09-13T14:04:12.109Z: + '[' True = True ']'
2026-09-13T14:04:12.109Z: + echo $'\342\234\223 Converted .reports/S9TL1A.cbl/Inventaire.json using IBM037'
2026-09-13T14:04:12.110Z: + converted=true
2026-09-13T14:04:12.110Z: + break
2026-09-13T14:04:12.111Z: + '[' true = false ']'
2026-09-13T14:04:12.112Z: ✓ Converted .reports/S9TL1A.cbl/Inventaire.json using IBM037
2026-09-13T14:04:12.113Z: ✓ Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json
2026-09-13T14:04:12.114Z: Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log...
2026-09-13T14:04:12.120Z: + vecho $'\342\234\223 Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json'
2026-09-13T14:04:12.121Z: + '[' True = True ']'
2026-09-13T14:04:12.122Z: + echo $'\342\234\223 Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.json'
2026-09-13T14:04:12.122Z: + for file in $files
2026-09-13T14:04:12.122Z: + vecho 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log...'
2026-09-13T14:04:12.123Z: + '[' True = True ']'
2026-09-13T14:04:12.124Z: + echo 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log...'
2026-09-13T14:04:12.125Z: + local remote_path
2026-09-13T14:04:12.126Z: + '[' True = True ']'
2026-09-13T14:04:12.126Z: + remote_path='/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log'
2026-09-13T14:04:12.127Z: + '[' -n J070188@hostname.acme.com ']'
2026-09-13T14:04:12.127Z: + scp -r -q 'J070188@hostname.acme.com:/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log' .reports/S9TL1A.cbl/
2026-09-13T14:04:14.373Z: + echo 'Warning: Failed to download /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log'
2026-09-13T14:04:14.374Z: Warning: Failed to download /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.log
2026-09-13T14:04:14.374Z: + continue
2026-09-13T14:04:14.375Z: + for file in $files
2026-09-13T14:04:14.375Z: + vecho 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html...'
2026-09-13T14:04:14.376Z: + '[' True = True ']'
2026-09-13T14:04:14.377Z: + echo 'Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html...'
2026-09-13T14:04:14.378Z: + local remote_path
2026-09-13T14:04:14.379Z: + '[' True = True ']'
2026-09-13T14:04:14.379Z: + remote_path='/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:14.380Z: + '[' -n J070188@hostname.acme.com ']'
2026-09-13T14:04:14.381Z: + scp -r -q 'J070188@hostname.acme.com:/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html' .reports/S9TL1A.cbl/
2026-09-13T14:04:14.382Z: Downloading /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html...
2026-09-13T14:04:18.504Z: +++ basename '/u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:18.522Z: ++ find .reports/S9TL1A.cbl -name '*.html' -type f
2026-09-13T14:04:18.582Z: + local downloaded_files=.reports/S9TL1A.cbl/BuildReport.html
2026-09-13T14:04:18.583Z: + for downloaded_file in $downloaded_files
2026-09-13T14:04:18.583Z: + '[' -f .reports/S9TL1A.cbl/BuildReport.html ']'
2026-09-13T14:04:18.584Z: + vecho 'Converting .reports/S9TL1A.cbl/BuildReport.html from EBCDIC to UTF-8...'
2026-09-13T14:04:18.585Z: + '[' True = True ']'
2026-09-13T14:04:18.586Z: + echo 'Converting .reports/S9TL1A.cbl/BuildReport.html from EBCDIC to UTF-8...'
2026-09-13T14:04:18.587Z: + command -v iconv
2026-09-13T14:04:18.587Z: + local converted=false
2026-09-13T14:04:18.588Z: + for encoding in "IBM037" "CP037" "EBCDIC-US" "IBM-1047" "IBM1047"
2026-09-13T14:04:18.588Z: + iconv -f IBM037 -t UTF-8 .reports/S9TL1A.cbl/BuildReport.html
2026-09-13T14:04:18.589Z: Converting .reports/S9TL1A.cbl/BuildReport.html from EBCDIC to UTF-8...
2026-09-13T14:04:18.623Z: + mv .reports/S9TL1A.cbl/BuildReport.html.tmp .reports/S9TL1A.cbl/BuildReport.html
2026-09-13T14:04:18.661Z: + vecho $'\342\234\223 Converted .reports/S9TL1A.cbl/BuildReport.html using IBM037'
2026-09-13T14:04:18.661Z: + '[' True = True ']'
2026-09-13T14:04:18.662Z: + echo $'\342\234\223 Converted .reports/S9TL1A.cbl/BuildReport.html using IBM037'
2026-09-13T14:04:18.663Z: + converted=true
2026-09-13T14:04:18.664Z: + break
2026-09-13T14:04:18.666Z: + '[' true = false ']'
2026-09-13T14:04:18.667Z: + vecho $'\342\234\223 Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:18.667Z: + '[' True = True ']'
2026-09-13T14:04:18.668Z: + echo $'\342\234\223 Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html'
2026-09-13T14:04:18.668Z: + echo $'\342\234\223 fetch completed successfully'
2026-09-13T14:04:18.669Z: + exit 0
2026-09-13T14:04:18.670Z: ✓ Converted .reports/S9TL1A.cbl/BuildReport.html using IBM037
2026-09-13T14:04:18.670Z: ✓ Downloaded /u/J070188/DBB/LOGS/S9TL1A.cbl/**/*.html
2026-09-13T14:04:18.671Z: ✓ fetch completed successfully
2026-09-13T14:04:18.675Z: CRRZG5624I User Build completed successfully.
Image Image Image

Expected behavior

Image Image Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions