Skip to content

Commit

Permalink
Merge branch 'master' into users/ismayilov-ismayil/add_delay_when_mes…
Browse files Browse the repository at this point in the history
…sage_null
  • Loading branch information
ismayilov-ismayil authored Oct 9, 2023
2 parents 8182e95 + 82cf476 commit da3a00c
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Agent.Sdk/Knob/AgentKnobs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ public class AgentKnobs
new EnvironmentKnobSource("ALLOW_TFVC_UNSHELVE_ERRORS"),
new BuiltInDefaultKnobSource("false"));

public static readonly Knob EnableFCSItemPathFix = new Knob(
nameof(EnableFCSItemPathFix),
"If true, enable the fix for the path of the item when associating or uploading to the file container server.",
new RuntimeKnobSource("ENABLE_FCS_ITEM_PATH_FIX"),
new EnvironmentKnobSource("ENABLE_FCS_ITEM_PATH_FIX"),
new BuiltInDefaultKnobSource("false"));

// Set DISABLE_JAVA_CAPABILITY_HIGHER_THAN_9 variable with any value
// to disable recognition of Java higher than 9
public static readonly Knob DisableRecognitionOfJDKHigherThen9 = new Knob(
Expand Down
12 changes: 12 additions & 0 deletions src/Agent.Worker/Build/FileContainerServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ private async Task<UploadResult> UploadAsync(IAsyncCommandContext context, int u
try
{
string itemPath = (_containerPath.TrimEnd('/') + "/" + fileToUpload.Remove(0, _sourceParentDirectory.Length + 1)).Replace('\\', '/');
if (AgentKnobs.EnableFCSItemPathFix.GetValue(context).AsBoolean())
{
string fileName = fileToUpload.Replace(_sourceParentDirectory, string.Empty).Replace("\\", string.Empty).Replace("/", string.Empty);
itemPath = (_containerPath.TrimEnd('/') + "/" + fileName).Replace("\\", "/");
}

uploadTimer.Restart();
bool catchExceptionDuringUpload = false;
HttpResponseMessage response = null;
Expand Down Expand Up @@ -417,6 +423,12 @@ private async Task<UploadResult> AssociateAsync(IAsyncCommandContext context, Co
{
uploadTimer.Restart();
string itemPath = (_containerPath.TrimEnd('/') + "/" + file.Path.Remove(0, _sourceParentDirectory.Length + 1)).Replace('\\', '/');
if (AgentKnobs.EnableFCSItemPathFix.GetValue(context).AsBoolean())
{
string fileName = file.Path.Replace(_sourceParentDirectory, string.Empty).Replace("\\", string.Empty).Replace("/", string.Empty);
itemPath = (_containerPath.TrimEnd('/') + "/" + fileName).Replace("\\", "/");
}

bool catchExceptionDuringUpload = false;
HttpResponseMessage response = null;
try
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/de-DE/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "Die Zusammenfassungsdatei kann nicht hochgeladen werden. Der Speicherort der Zusammenfassungsdatei wurde nicht angegeben.",
"CheckoutTaskDisplayNameFormat": "Check-Out {0}@{1} nach {2}",
"CleaningDestinationFolder": "Der Zielordner wird bereinigt: {0}",
"ClientId": "Client(App)-ID",
"ClientSecret": "Geheimer Clientschlüssel",
"ClockSkewStopRetry": "Der Wiederholungsversuch der OAuth-Tokenanforderungsausnahme wurde nach {0} Sekunden beendet.",
"CodeCoverageDataIsNull": "Es wurden keine Abdeckungsdaten gefunden. Weitere Informationen finden Sie in den Buildfehlern/-warnungen.",
"CodeCoveragePublishIsValidOnlyForBuild": "Die Veröffentlichung von Code Coverage funktioniert nur für „build“.",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "Telemetrie",
"TelemetryCommandDataError": "Telemetriedaten „{0}“ können nicht analysiert werden. Fehler: {1}",
"TelemetryCommandFailed": "Fehler beim Veröffentlichen von Telemetriedaten. Fehler: {0}",
"TenantId": "Mandanten-ID",
"TestAgentConnection": "Agentverbindung wird getestet.",
"TestAttachmentNotExists": "Die Anlage wird übersprungen, da sie auf dem Datenträger nicht vorhanden ist: {0}",
"TestResultsRemaining": "Verbleibende Testergebnisse: {0}. Testlauf-ID: {1}",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/es-ES/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "No se puede cargar el archivo de resumen, no se ha especificado la ubicación del archivo de resumen.",
"CheckoutTaskDisplayNameFormat": "Restaurar {0}@{1} a {2}",
"CleaningDestinationFolder": "Limpiando carpeta de destino: {0}",
"ClientId": "Id. de cliente(aplicación)",
"ClientSecret": "Secreto de cliente",
"ClockSkewStopRetry": "Se detuvo el reintento de la excepción de solicitud de token de OAuth después de {0} segundos.",
"CodeCoverageDataIsNull": "No se encontraron datos de cobertura. Compruebe los errores o advertencias de compilación para obtener más detalles.",
"CodeCoveragePublishIsValidOnlyForBuild": "La cobertura de código de publicación solo funciona para 'build'.",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "Telemetría",
"TelemetryCommandDataError": "No se pueden analizar los datos de telemetría {0}. Error: {1}",
"TelemetryCommandFailed": "No se pudieron publicar los datos de telemetría. Error {0}",
"TenantId": "Id. del inquilino",
"TestAgentConnection": "Probando la conexión del agente.",
"TestAttachmentNotExists": "Omitiendo datos adjuntos porque no están disponibles en el disco: {0}",
"TestResultsRemaining": "Resultados restantes de la prueba: {0}. Id. de serie de pruebas: {1}",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/fr-FR/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "Impossible de charger le fichier récapitulatif, l’emplacement du fichier récapitulatif n’est pas spécifié.",
"CheckoutTaskDisplayNameFormat": "Extraire {0}@{1} pour {2}",
"CleaningDestinationFolder": "Nettoyage du dossier de destination : {0}",
"ClientId": "ID de l’application cliente",
"ClientSecret": "Clé secrète client",
"ClockSkewStopRetry": "Nouvelle tentative d’exception de demande de jeton OAuth arrêtée après {0} secondes.",
"CodeCoverageDataIsNull": "Données de couverture introuvables. Pour plus d’informations, consultez les erreurs/avertissements de build.",
"CodeCoveragePublishIsValidOnlyForBuild": "La couverture du code de publication fonctionne uniquement pour « build ».",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "Télémétrie",
"TelemetryCommandDataError": "Impossible d’analyser les données de télémétrie {0}. Erreur : {1}.",
"TelemetryCommandFailed": "Échec de la publication des données de télémétrie. Erreur {0}",
"TenantId": "ID de locataire",
"TestAgentConnection": "Test de la connexion de l’agent.",
"TestAttachmentNotExists": "La pièce jointe est ignorée, car elle n'est pas disponible sur le disque : {0}.",
"TestResultsRemaining": "Résultats des tests restants : {0}. ID de série de tests : {1}.",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/it-IT/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "Non è possibile caricare il file di riepilogo. Il percorso del file di riepilogo non è specificato.",
"CheckoutTaskDisplayNameFormat": "Esegui checkout {0}@{1} in {2}",
"CleaningDestinationFolder": "Pulizia della cartella di destinazione in corso: {0}",
"ClientId": "ID client (app)",
"ClientSecret": "Segreto client",
"ClockSkewStopRetry": "Il nuovo tentativo di eccezione della richiesta di token OAuth è stato interrotto dopo {0} secondi.",
"CodeCoverageDataIsNull": "Non sono stati trovati dati di copertura. Per altri dettagli, controllare gli errori o gli avvisi di compilazione.",
"CodeCoveragePublishIsValidOnlyForBuild": "La pubblicazione code coverage funziona solo per 'build'.",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "Telemetria",
"TelemetryCommandDataError": "Impossibile analizzare i dati di telemetria {0}. Errore: {1}",
"TelemetryCommandFailed": "Non è stato possibile pubblicare i dati di telemetria. Errore {0}",
"TenantId": "ID tenant",
"TestAgentConnection": "Test della connessione dell'agente.",
"TestAttachmentNotExists": "L'allegato verrà ignorato perché non è disponibile sul disco: {0}",
"TestResultsRemaining": "Risultati del test rimanenti: {0}. ID esecuzione dei test:{1}.",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/ja-JP/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "概要ファイルをアップロードできません。概要ファイルの場所が指定されていません。",
"CheckoutTaskDisplayNameFormat": "{2} へのチェックアウト {0}@{1}",
"CleaningDestinationFolder": "宛先フォルダー: {0} をクリーンアップしています",
"ClientId": "Client(App) ID",
"ClientSecret": "クライアント シークレット",
"ClockSkewStopRetry": "{0} 秒後に OAuth トークン要求例外の再試行を停止しました。",
"CodeCoverageDataIsNull": "カバレッジ データが見つかりません。詳細については、ビルド エラー/警告を確認してください。",
"CodeCoveragePublishIsValidOnlyForBuild": "コード カバレッジの公開は 'build' でのみ機能します。",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "テレメトリ",
"TelemetryCommandDataError": "テレメトリ データ {0} を分析できません。エラー: {1}",
"TelemetryCommandFailed": "テレメトリ データを公開できませんでした。エラー {0}",
"TenantId": "テナント ID",
"TestAgentConnection": "エージェント接続をテストしています。",
"TestAttachmentNotExists": "ディスク {0} では使用できないため添付ファイルをスキップしています",
"TestResultsRemaining": "残りのテスト結果: {0}。テストの実行 ID: {1}。",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/ko-KR/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "요약 파일을 업로드할 수 없습니다. 요약 파일 위치가 지정되지 않았습니다.",
"CheckoutTaskDisplayNameFormat": "{0}@{1}에서 {2} 결제",
"CleaningDestinationFolder": "정리 대상 폴더: {0}",
"ClientId": "클라이언트(앱) ID",
"ClientSecret": "클라이언트 암호",
"ClockSkewStopRetry": "{0}초 후에 OAuth 토큰 요청 예외 다시 시도를 중지했습니다.",
"CodeCoverageDataIsNull": "적용 범위 데이터를 찾을 수 없습니다. 자세한 내용은 빌드 오류/경고를 확인하세요.",
"CodeCoveragePublishIsValidOnlyForBuild": "코드 적용 범위 게시는 '빌드'에서만 작동합니다.",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "원격 분석",
"TelemetryCommandDataError": "원격 분석 데이터 {0}을(를) 구문 분석할 수 없습니다. 오류: {1}",
"TelemetryCommandFailed": "원격 분석 데이터를 게시하지 못했습니다. 오류 {0}",
"TenantId": "테넌트 ID",
"TestAgentConnection": "에이전트 연결을 테스트 중입니다.",
"TestAttachmentNotExists": "디스크에서 사용할 수 없으므로 첨부 파일 건너뛰기: {0}",
"TestResultsRemaining": "남은 테스트 결과: {0}. 테스트 실행 ID: {1}",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/ru-RU/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "Не удалось отправить файл сводки, расположение файла сводки не указано.",
"CheckoutTaskDisplayNameFormat": "Извлечение {0}@{1} в {2}",
"CleaningDestinationFolder": "Очистка конечной папки: {0}",
"ClientId": "Идентификатор клиента (приложения)",
"ClientSecret": "Секрет клиента",
"ClockSkewStopRetry": "Повторная попытка исключения запроса токена OAuth прекращена через {0} с.",
"CodeCoverageDataIsNull": "Данные об объеме протестированного кода не найдены. Дополнительные сведения см. в сообщениях об ошибках и предупреждениях сборки.",
"CodeCoveragePublishIsValidOnlyForBuild": "Публикация объема протестированного кода работает только для \"build\".",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "Телеметрия",
"TelemetryCommandDataError": "Не удается проанализировать данные телеметрии {0}. Ошибка: {1}",
"TelemetryCommandFailed": "Не удалось опубликовать данные телеметрии. Ошибка: {0}",
"TenantId": "Идентификатор клиента",
"TestAgentConnection": "Подключение агента тестирования.",
"TestAttachmentNotExists": "Вложение пропущено, так как оно недоступно на диске: {0}",
"TestResultsRemaining": "Оставшиеся результаты теста: {0}. Идентификатор тестового запуска: {1}",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/zh-CN/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "无法上传摘要文件,未指定摘要文件位置。",
"CheckoutTaskDisplayNameFormat": "签出 {0}@{1} 到 {2}",
"CleaningDestinationFolder": "正在清理目标文件夹: {0}",
"ClientId": "客户端 (App) ID",
"ClientSecret": "客户端密码",
"ClockSkewStopRetry": "在 {0} 秒后停止重试 OAuth 令牌请求异常。",
"CodeCoverageDataIsNull": "未找到覆盖率数据。有关更多详细信息,请检查生成错误/警告。",
"CodeCoveragePublishIsValidOnlyForBuild": "发布代码覆盖率仅适用于“build”。",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "遥测",
"TelemetryCommandDataError": "无法分析遥测数据 {0}。错误: {1}",
"TelemetryCommandFailed": "无法发布遥测数据。错误 {0}",
"TenantId": "租户 ID",
"TestAgentConnection": "正在测试代理连接。",
"TestAttachmentNotExists": "正在跳过附件,因为它在磁盘上不可用: {0}",
"TestResultsRemaining": "剩余测试结果: {0}。测试运行 ID: {1}。",
Expand Down
3 changes: 3 additions & 0 deletions src/Misc/layoutbin/zh-TW/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"CannotUploadSummary": "無法上傳摘要檔案,未指定摘要檔案位置。",
"CheckoutTaskDisplayNameFormat": "將 {0}@{1} 簽出至 {2}",
"CleaningDestinationFolder": "正在清除目的地資料夾: {0}",
"ClientId": "用戶端 (應用程式) 識別碼",
"ClientSecret": "用戶端密碼",
"ClockSkewStopRetry": "已在 {0} 秒後停止重試 OAuth 權杖要求例外狀況。",
"CodeCoverageDataIsNull": "找不到涵蓋範圍資料。如需詳細資料,請檢查建置錯誤/警告。",
"CodeCoveragePublishIsValidOnlyForBuild": "僅為 'build' 發佈程式碼涵蓋範圍工作。",
Expand Down Expand Up @@ -635,6 +637,7 @@
"Telemetry": "遙測",
"TelemetryCommandDataError": "無法剖析遙測資料 {0}。錯誤: {1}。",
"TelemetryCommandFailed": "無法發佈遙測資料。錯誤 {0}",
"TenantId": "租用戶識別碼",
"TestAgentConnection": "正在測試代理程式連線。",
"TestAttachmentNotExists": "因為附件無法在磁碟上使用,所以正在略過: {0}",
"TestResultsRemaining": "剩餘的測試結果: {0}。測試回合識別碼: {1}",
Expand Down

0 comments on commit da3a00c

Please sign in to comment.