-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
feat: Add option to change log levels of username already exists message #9962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: alpha
Are you sure you want to change the base?
feat: Add option to change log levels of username already exists message #9962
Conversation
|
🚀 Thanks for opening this pull request! |
📝 WalkthroughWalkthroughAdds a new log-level option Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-11-08T13:46:04.940ZApplied to files:
🪛 Biome (2.1.2)src/Options/index.js[error] 792-792: Expected a statement but instead found '?'. Expected a statement here. (parse) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
🔇 Additional comments (5)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.40.0)spec/ParseUser.spec.jsThanks 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 |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #9962 +/- ##
==========================================
+ Coverage 92.56% 92.58% +0.01%
==========================================
Files 191 191
Lines 15544 15549 +5
Branches 177 177
==========================================
+ Hits 14389 14396 +7
+ Misses 1143 1141 -2
Partials 12 12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think we can also the default level for this to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LogEvents is still all over the code
|
I see where you got this from. May have been a typo. logLevels: {
env: 'PARSE_SERVER_LOG_LEVELS',
help: '(Optional) Overrides the log levels used internally by Parse Server to log events.',
action: parsers.objectParser,
type: 'LogLevels',
default: {},
},Let's add there, unless you can think of a reason not to? They are grouped by prefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
types/Options/index.d.ts (1)
1-126: PR title suggestion in Angular conventionTo align with the repo’s preferred Angular-style convention, consider updating the PR title to something like:
feat(logging): configurable log level for username-taken signupsThis keeps the existing intent but adds a clear scope (
logging) and a concise, action-oriented description.Based on learnings, this helps generate a clearer changelog entry.
src/Options/index.js (1)
792-795: Clarify intended default and naming forlogLevels.usernameAlreadyExistsThe new option is wired and documented as:
- Comment +
:DEFAULT:say default is'error'.- Type:
usernameAlreadyExists: ?string;.From the linked issue, there was discussion about:
- Changing the default behavior to something less noisy (e.g.
info), and- A potential name like
signupUsernameTakento align withParse.Error.USERNAME_TAKEN.Can you double-check that:
The intended default log level for this event (for fresh installs and existing deployments) is indeed
'error', and that this matches:
- The default in
src/Options/Definitions.jsforLogLevels.usernameAlreadyExists, and- The fallback used in the middleware when no explicit value is configured.
The final option name
usernameAlreadyExistsis the agreed one vs.signupUsernameTaken, and if not, rename it consistently across:
types/Options/index.d.tssrc/Options/index.jssrc/Options/Definitions.js- Any runtime usage (e.g.
req.config.logLevels.usernameAlreadyExistsin middleware, tests).Aligning these keeps behavior, documentation, and configuration introspection in sync.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
spec/ParseUser.spec.js(1 hunks)src/Options/Definitions.js(1 hunks)src/Options/docs.js(1 hunks)src/Options/index.js(1 hunks)src/middlewares.js(2 hunks)types/Options/index.d.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- src/middlewares.js
- src/Options/docs.js
- spec/ParseUser.spec.js
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-08T13:46:04.940Z
Learning: When reviewing Parse Server PRs that add new features, always check whether the feature is documented in the README.md file, though for new Parse Server options this is optional rather than required.
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-17T15:02:48.786Z
Learning: For Parse Server PRs, always suggest an Angular commit convention PR title that would make a meaningful changelog entry for developers. Update the PR title suggestion on every commit. The format should be: type(scope): description. Common types include feat, fix, perf, refactor, docs, test, chore. The scope should identify the subsystem (e.g., graphql, rest, push, security). The description should be action-oriented and clearly convey the change's impact to developers.
📚 Learning: 2025-11-08T13:46:04.940Z
Learnt from: mtrezza
Repo: parse-community/parse-server PR: 0
File: :0-0
Timestamp: 2025-11-08T13:46:04.940Z
Learning: For new Parse Server options, verify that the option is documented in src/Options/index.js and that npm run definitions has been executed to reflect changes in src/Options/docs.js and src/Options/Definitions.js. README.md documentation is a bonus but not required for new options.
Applied to files:
src/Options/Definitions.jssrc/Options/index.js
🪛 Biome (2.1.2)
src/Options/index.js
[error] 792-792: Expected a statement but instead found '?'.
Expected a statement here.
(parse)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
- GitHub Check: PostgreSQL 15, PostGIS 3.3
- GitHub Check: PostgreSQL 16, PostGIS 3.5
- GitHub Check: PostgreSQL 18, PostGIS 3.6
- GitHub Check: Node 20
- GitHub Check: MongoDB 7, ReplicaSet
- GitHub Check: PostgreSQL 15, PostGIS 3.4
- GitHub Check: PostgreSQL 17, PostGIS 3.5
- GitHub Check: MongoDB 8, ReplicaSet
- GitHub Check: Node 22
- GitHub Check: Redis Cache
- GitHub Check: MongoDB 6, ReplicaSet
- GitHub Check: PostgreSQL 15, PostGIS 3.5
- GitHub Check: Node 18
- GitHub Check: Docker Build
- GitHub Check: Benchmarks
🔇 Additional comments (2)
types/Options/index.d.ts (1)
294-301: LogLevels typings forusernameAlreadyExistslook consistent
usernameAlreadyExists?: string;matches the pattern of existingLogLevelsproperties and aligns with the new runtime option name; no typing issues here.src/Options/Definitions.js (1)
1479-1515: Definitions entry forusernameAlreadyExistsis consistentThe new
module.exports.LogLevels.usernameAlreadyExistsentry (env name, help text, anddefault: 'error') is consistent with the documentation insrc/Options/index.jsand with the existing LogLevels structure.Once you confirm the intended default level and naming in
src/Options/index.js, this definition will already be aligned.


Pull Request
Issue
Fixes: #9329
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.