Skip to content

fix: create the config directory only after checking for DISABLE_UPDATE_CHECK#2773

Merged
JivusAyrus merged 1 commit intomainfrom
suvij/eng-9392-writable-config-directory-required-for-wgc-with
Apr 17, 2026
Merged

fix: create the config directory only after checking for DISABLE_UPDATE_CHECK#2773
JivusAyrus merged 1 commit intomainfrom
suvij/eng-9392-writable-config-directory-required-for-wgc-with

Conversation

@JivusAyrus
Copy link
Copy Markdown
Member

@JivusAyrus JivusAyrus commented Apr 17, 2026

Summary by CodeRabbit

  • Refactor
    • Reorganized configuration directory creation logic in CLI initialization.
    • Optimized update check function with early exit when updates are disabled.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/docs-website.
  • I have read the Contributors Guide.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 17, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7e9c3d91-39ca-4165-a138-066791c763f1

📥 Commits

Reviewing files that changed from the base of the PR and between 07de56d and 86df32c.

📒 Files selected for processing (2)
  • cli/src/commands/index.ts
  • cli/src/utils.ts

Walkthrough

The pull request relocates configuration directory creation logic from the CLI command pre-action hook to the checkForUpdates utility function. The hook now only calls checkForUpdates(), while the utility function ensures the configuration directory exists before performing update checks.

Changes

Cohort / File(s) Summary
Configuration Directory Creation Refactoring
cli/src/commands/index.ts, cli/src/utils.ts
Removed mkdirSync import and directory creation from the command pre-action hook; moved directory creation logic into checkForUpdates function in utils with addition of configDir import from config module.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving config directory creation to occur only after checking the DISABLE_UPDATE_CHECK flag, which is reflected in both file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@wilsonrivera wilsonrivera left a comment

Choose a reason for hiding this comment

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

LGTM

@JivusAyrus JivusAyrus merged commit c7beb72 into main Apr 17, 2026
27 checks passed
@JivusAyrus JivusAyrus deleted the suvij/eng-9392-writable-config-directory-required-for-wgc-with branch April 17, 2026 14:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.50%. Comparing base (07de56d) to head (86df32c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cli/src/utils.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2773       +/-   ##
===========================================
- Coverage   46.15%   35.50%   -10.65%     
===========================================
  Files        1042      129      -913     
  Lines      139207    11789   -127418     
  Branches     8768      467     -8301     
===========================================
- Hits        64249     4186    -60063     
+ Misses      73232     7601    -65631     
+ Partials     1726        2     -1724     
Files with missing lines Coverage Δ
cli/src/commands/index.ts 84.42% <100.00%> (+0.55%) ⬆️
cli/src/utils.ts 25.47% <0.00%> (-0.17%) ⬇️

... and 913 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants