From 933bb26c9fa675732492eca8334db3f0dcb3d050 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 14 Aug 2023 10:55:32 -0400 Subject: [PATCH 1/3] Trace2FileWriter: add more general exception In #1340, we tried to suppress errors during the modification of a trace2 file. However, those exceptions were too specific to the errors I had discovered during local testing. On the 2.3.1 release, I see the following stack error happening: Unhandled Exception: System.IO.IOException: The process cannot access the file 'C:\Users\dstolee\Downloads\trace.txt' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding) at System.IO.File.AppendAllText(String path, String contents) at GitCredentialManager.Trace2FileWriter.Write(Trace2Message message) ... This very general 'IOException' catch is necessary to avoid this issue. --- src/shared/Core/Trace2FileWriter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shared/Core/Trace2FileWriter.cs b/src/shared/Core/Trace2FileWriter.cs index dbf1b5d6d..16781c005 100644 --- a/src/shared/Core/Trace2FileWriter.cs +++ b/src/shared/Core/Trace2FileWriter.cs @@ -31,5 +31,10 @@ public override void Write(Trace2Message message) // Windows and the file is currently open for writing // by another process (likely Git itself.) } + catch (IOException) + { + // Do nothing, as this likely means that the file is currently + // open by another process (on Windows). + } } } From 8688f5d234f332c56a92819444626a602083ee37 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Tue, 15 Aug 2023 13:27:03 -0700 Subject: [PATCH 2/3] release.yml: set release tag target in draft When creating the initial draft release, also set the target commit to the currently built commit (the merge in to `release` typically) so that we don't accidentally create a release tag against the wrong target. --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e2493733..6fc24ea3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -749,6 +749,7 @@ jobs: ...releaseMetadata, draft: true, tag_name: tagName, + tag_commitish: context.sha, name: `GCM ${version}` }); releaseMetadata.release_id = createdRelease.data.id; From 0e54a3eaf38845233f2fdc632939e5a2b5d29359 Mon Sep 17 00:00:00 2001 From: Matthew John Cheetham Date: Wed, 16 Aug 2023 09:48:35 -0700 Subject: [PATCH 3/3] version: bump to 2.3.2 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ae208425f..5b3c26b59 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3.1.0 +2.3.2.0