fix(dashmate): letsencrypt renewal and dashmate doctor fixes#3018
fix(dashmate): letsencrypt renewal and dashmate doctor fixes#3018
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
📝 WalkthroughWalkthroughAdds Let's Encrypt support across certificate analysis, sample collection, and obtain/renew tasks: provider-specific error mappings, a LetsEncrypt validation path in sample collection, and initialization plus rsa2048 key handling in the obtain/renew task. Changes
Sequence Diagram(s)sequenceDiagram
participant Collector as CollectSamplesTask
participant Validator as validateLetsEncryptCertificate
participant Lego as LegoCertificate
participant Store as ctx.samples.setServiceInfo
Collector->>Validator: validateLetsEncryptCertificate(config, EXPIRATION_LIMIT_DAYS)
Validator-->>Collector: { error, data }
Collector->>Lego: obfuscate string fields in data (using Lego rules)
Collector->>Store: setServiceInfo('gateway','ssl',{ error, data })
sequenceDiagram
participant Task as obtainLetsEncryptCertificateTask
participant FS as Filesystem (dirs)
participant LegoCmd as lego CLI
participant Cert as certificate files
Task->>FS: load config (email, external IP, dirs), validate required fields
Task->>FS: create lego directories if missing
Task->>LegoCmd: run lego with args (include --key-type rsa2048)
LegoCmd-->>Cert: write certificate and key files
Task->>Task: check certificate validity / set flags (certificateValid,isRenewal)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@packages/dashmate/src/doctor/analyse/analyseConfigFactory.js`:
- Around line 131-159: The two description strings for the LETSENCRYPT_ERRORS
entries use double quotes instead of single quotes; update the description
values for LETSENCRYPT_ERRORS.EMAIL_IS_NOT_SET and
LETSENCRYPT_ERRORS.CERTIFICATE_NOT_FOUND to use single-quoted plain strings
(keep all chalk`` template usages unchanged), so the LETSENCRYPT_ERRORS mapping
matches the project's single-quote style and ESLint rules.
In
`@packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js`:
- Around line 79-80: The current merge using Object.assign(ctx, data) in
obtainLetsEncryptCertificateTaskFactory will overwrite pre-set ctx fields (e.g.,
ctx.email, ctx.externalIp, path fields); change the merge logic to only set
fields that are missing on ctx (e.g., for each key in data, if ctx[key] ===
undefined or null then set ctx[key] = data[key]) so existing values are
preserved, or update the comment to reflect that overwrites are intended; target
the Object.assign usage and the ctx/data merge in
obtainLetsEncryptCertificateTaskFactory.
packages/dashmate/src/listr/tasks/ssl/letsencrypt/obtainLetsEncryptCertificateTaskFactory.js
Outdated
Show resolved
Hide resolved
b29ad46 to
8009d72
Compare
The shortlived profile is required for IP address certificates. Previously it was only passed on initial run, not renewal. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Issue being fixed or feature implemented
Fixes several issues discovered during testing of the Let's Encrypt SSL provider (#3000):
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.