Skip to content

fix(git): instrument SimpleGit operations - #39591

Merged
jamietanna merged 2 commits into
mainfrom
chore/git-instrument-impl
Dec 1, 2025
Merged

fix(git): instrument SimpleGit operations#39591
jamietanna merged 2 commits into
mainfrom
chore/git-instrument-impl

Conversation

@jamietanna

Copy link
Copy Markdown
Contributor

Changes

Context

Please select one of the below:

  • This closes an existing Issue: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch from 4227732 to 9667590 Compare November 27, 2025 16:40
@jamietanna

This comment was marked as resolved.

@jamietanna

This comment was marked as resolved.

@secustor secustor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably why you are getting 0ms total time

Comment thread lib/util/git/instrument.ts Outdated
Comment thread lib/util/git/instrument.ts Outdated
Comment thread lib/util/git/instrument.ts Outdated
Comment thread lib/util/git/index.ts Outdated
@jamietanna
jamietanna force-pushed the chore/git-instrument branch 5 times, most recently from 521521c to 893821b Compare November 28, 2025 14:27
@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch from 9667590 to 3d76bf7 Compare November 28, 2025 14:56
@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch from 3d76bf7 to f516a62 Compare November 28, 2025 15:01
@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch 2 times, most recently from 4eba28c to 6e53101 Compare November 28, 2025 16:56
@jamietanna

Copy link
Copy Markdown
Contributor Author

This is probably why you are getting 0ms total time

Moving convo into #39596

@jamietanna
jamietanna requested a review from secustor November 28, 2025 17:41
@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch from 6e53101 to 2aca5e2 Compare November 28, 2025 17:42
Comment thread lib/util/git/index.ts Outdated
Comment thread lib/util/git/index.ts Outdated
Base automatically changed from chore/git-instrument to main December 1, 2025 09:57
Now we have the basis for instrumentation for SimpleGit, we can now
fully integrate it.

This creates a wrapper, `InstrumentedSimpleGit`, which has a simplified
interface for `SimpleGit` to allow us to focus on the important parts of
the interface for what we need, instead of trying to correctly extend /
implement SimpleGit's interface (and slightly complex types).

In each of our methods, we then make sure we instrument it with the
relevant Git subcommand being invoked.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
@jamietanna
jamietanna force-pushed the chore/git-instrument-impl branch from 2aca5e2 to 0918850 Compare December 1, 2025 10:16
@jamietanna
jamietanna marked this pull request as ready for review December 1, 2025 10:16
@jamietanna
jamietanna requested a review from viceice December 1, 2025 10:16
@jamietanna jamietanna changed the title refactor(git): instrument SimpleGit operations fix(git): instrument SimpleGit operations Dec 1, 2025
viceice
viceice previously approved these changes Dec 1, 2025
Currently, SimpleGit's `getRemotes` function being passed a `verbose:
false` is the same as not providing a `verbose`.

This fixes the code coverage failures, as we do not call this.
@jamietanna
jamietanna added this pull request to the merge queue Dec 1, 2025
Merged via the queue into main with commit b44544b Dec 1, 2025
41 checks passed
@jamietanna
jamietanna deleted the chore/git-instrument-impl branch December 1, 2025 10:37
@github-actions

github-actions Bot commented Dec 1, 2025

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 42.27.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants