Skip to content

feat: always set CI=true for subprocesses - #45427

Merged
jamietanna merged 4 commits into
feat/default-ci-2-extract-fnfrom
feat/default-ci-3-ci-true
Aug 24, 2026
Merged

feat: always set CI=true for subprocesses#45427
jamietanna merged 4 commits into
feat/default-ci-2-extract-fnfrom
feat/default-ci-3-ci-true

Conversation

@jamietanna

Copy link
Copy Markdown
Contributor

Changes

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • 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):

Use of AI in replying to PR comments

Who answers review comments:

  • @jamietanna will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • Nobody has explicitly committed to replying.

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:


Stack created with GitHub Stacks CLIGive Feedback 💬

@github-actions
github-actions Bot requested a review from viceice August 24, 2026 13:53
@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch from f2679fa to 190bbc7 Compare August 24, 2026 14:01
@jamietanna
jamietanna force-pushed the feat/default-ci-2-extract-fn branch from 62030b2 to 5e71831 Compare August 24, 2026 14:01

@viceice viceice 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.

lint error

@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch from 190bbc7 to 7259f8d Compare August 24, 2026 14:13
@jamietanna
jamietanna requested a review from viceice August 24, 2026 14:13
viceice
viceice previously approved these changes Aug 24, 2026
@jamietanna

Copy link
Copy Markdown
Contributor Author

Fixing

@jamietanna
jamietanna requested a review from viceice August 24, 2026 14:25
@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch 2 times, most recently from b588c5e to d78fbee Compare August 24, 2026 14:53
@jamietanna

Copy link
Copy Markdown
Contributor Author

While looking at #45428 it's highlighted that we were previously not always passing CI=true (the new hardcoded env var) to binarySource=docker child containers. Adding now

@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch from d78fbee to ecb73f7 Compare August 24, 2026 15:57
@jamietanna
jamietanna removed the request for review from viceice August 24, 2026 15:58
@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch from ecb73f7 to 51ea95b Compare August 24, 2026 16:00
@jamietanna
jamietanna requested a review from viceice August 24, 2026 16:05
viceice
viceice previously approved these changes Aug 24, 2026
jamietanna and others added 4 commits August 24, 2026 17:21
As noted in #43761, we had recently set `CI=true` for the Renovate and
Containerbase orgs on Mend-hosted apps due to a pnpm v11 requirement:

    ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY  Aborted removal of
      modules directory due to no TTY

    If you are running pnpm in CI, set the CI environment variable to
      "true", or set "confirmModulesPurge" to "false".

Similarly in #43606, it was noted that we should do this for `mise lock`
to mark the workspace as "trusted".

Although we went with a different situation, there will be cases where
this is useful for tools being executed, for instance when we invoke `yarn`.

We also make sure to keep our documentation up-to-date as we add to the
specific overrides.

With help from Claude Sonnet and Opus to:

- perform some of the mechanical updates as part of this change
- ensure that the Docker sidecar always has `hardcodedProcessEnv` passed
  into it
- catch a needed change to `exposeAllEnv` handling

Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
As part of follow-up changes, it was noticed that our mocking of
`getChildProcessEnv` means we're not seeing the actual environment
variables in our tests.

To make sure that future tests can check that `CI` is added as expected
by default, we can remove the mocking.

Co-Authored-By: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
As noted in #43761, we had recently set `CI=true` for the Renovate and
Containerbase orgs on Mend-hosted apps due to a pnpm v11 requirement:

    ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY  Aborted removal of
      modules directory due to no TTY

    If you are running pnpm in CI, set the CI environment variable to
      "true", or set "confirmModulesPurge" to "false".

Similarly in #43606, it was noted that we should do this for `mise lock`
to mark the workspace as "trusted".

Although we went with a different situation, there will be cases where
this is useful for tools being executed, for instance when we invoke `yarn`.

We also make sure to keep our documentation up-to-date as we add to the
specific overrides.
@jamietanna
jamietanna force-pushed the feat/default-ci-2-extract-fn branch from 5e71831 to 8770bff Compare August 24, 2026 16:28
@jamietanna
jamietanna force-pushed the feat/default-ci-3-ci-true branch from 51ea95b to 5b17499 Compare August 24, 2026 16:28
@jamietanna
jamietanna merged commit f50bee3 into feat/default-ci-2-extract-fn Aug 24, 2026
50 of 73 checks passed
@jamietanna
jamietanna deleted the feat/default-ci-3-ci-true branch August 24, 2026 16:36
@jamietanna
jamietanna restored the feat/default-ci-3-ci-true branch August 24, 2026 16:37
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 44.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants