-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
The perf.groovy
script is not escaping the PR title properly when it contains double-quotes
#10654
Comments
@tannergooding This seems a parsing/escaping problem of the batch command line interface, not the |
@jorive, potentially. Looks like the jobs are doing: if "%GIT_BRANCH:~0,7%" == "origin/" (set "GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%") else (set "GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%")
set "BENCHVIEWNAME=coreclr private %BenchviewCommitName%"
set "BENCHVIEWNAME=%BENCHVIEWNAME:"=""%"
py "%WORKSPACE%\Microsoft.BenchView.JSONFormat\tools\submission-metadata.py" --name "%BENCHVIEWNAME%" --user-email "dotnet-bot@microsoft.com"
py "%WORKSPACE%\Microsoft.BenchView.JSONFormat\tools\build.py" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type private The second |
the @if not defined _echo echo off
setlocal
rem Case 1: Double quotes
if exist ".\submission-metadata.json" del /f /q ".\submission-metadata.json"
set "GV_TITLE=coreclr private Fixing encodeXmmRegAsIval to ensure the result meets the "fits in imm8" check"
set "GV_TITLE=%GV_TITLE:"=""%"
py.exe submission-metadata.py --name "%GV_TITLE%" --user-email "dotnet-bot@microsoft.com" || exit /b 1
echo/ Case 1
type submission-metadata.json
rem Case 2: Angle brackets
if exist ".\submission-metadata.json" del /f /q ".\submission-metadata.json"
set "GV_TITLE=coreclr private Fixing encodeXmmRegAsIval to ensure the result meets the <fits in imm8> check"
rem set "GV_TITLE=%GV_TITLE:"=""%"
rem set "GV_TITLE=%GV_TITLE:<=^<%"
rem set "GV_TITLE=%GV_TITLE:>=^>%"
py.exe submission-metadata.py --name "%GV_TITLE%" --user-email "dotnet-bot@microsoft.com" || exit /b 1
echo/ Case 2
type submission-metadata.json
endlocal& exit /b 0
|
submission-metadata.py
script breaks if your PR title contains double-quotesperf.groovy
script is not escaping the PR title properly when it contains double-quotes
This generated command seems wrong: In addition, the run should have stopped/failed at this point. |
@tannergooding You are right, the generated command in ci2 looks fine, but the executed command displayed in the log is different. rem In ci2
set "BENCHVIEWNAME=coreclr private %BenchviewCommitName%"
set "BENCHVIEWNAME=%BENCHVIEWNAME:"=""%"
py "%WORKSPACE%\Microsoft.BenchView.JSONFormat\tools\submission-metadata.py" --name "%BENCHVIEWNAME%" --user-email "dotnet-bot@microsoft.com" rem In Log
set "BENCHVIEWNAME=coreclr private Fixing encodeXmmRegAsIval to ensure the result meets the \"fits in imm8\" check"
set "BENCHVIEWNAME=coreclr private Fixing encodeXmmRegAsIval to ensure the result meets the \""fits in imm8\"" check"
py "D:\j\w\perf_perflab_---988491d2\Microsoft.BenchView.JSONFormat\tools\submission-metadata.py" --name "coreclr private Fixing encodeXmmRegAsIval to ensure the result meets the \""fits in imm8\"" check" --user-email "dotnet-bot@microsoft.com" Maybe the environment variable |
|
This issue was causing failures in dotnet/coreclr#18849
For example: https://ci2.dot.net/job/dotnet_coreclr/job/perf/job/master/job/perf_perflab_Windows_NT_x64_min_opt_ryujit_smoketest_prtest/2556/
The text was updated successfully, but these errors were encountered: