Skip to content

Conversation

@juliajforesti
Copy link
Contributor

@juliajforesti juliajforesti commented Sep 15, 2025

ARCH-1801

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Deprecations
    • The setAdminStatus method is deprecated. Calls now log a deprecation notice.
    • Migrate to /v1/roles.addUserToRole or /v1/roles.removeUserFromRole for role management.
  • Chores
    • Added deprecation warning on use of the legacy setAdminStatus method to guide migration.

@changeset-bot
Copy link

changeset-bot bot commented Sep 15, 2025

⚠️ No Changeset found

Latest commit: dd0f3bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Sep 15, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 15, 2025

Walkthrough

A deprecation warning was added to the server method setAdminStatus by importing and invoking a deprecation logger at method start. No public API or control flow changes beyond the added log. The method still performs its original behavior.

Changes

Cohort / File(s) Summary of Changes
Deprecation logging in server method
apps/meteor/app/lib/server/methods/setAdminStatus.ts
Imported deprecation logger and invoked it at method start to log that setAdminStatus is deprecated in 8.0.0 with guidance to use /v1/roles.addUserToRole or /v1/roles.removeUserFromRole. No interface or behavior changes otherwise.

Sequence Diagram(s)

sequenceDiagram
    participant C as Caller
    participant M as setAdminStatus (server)
    participant D as deprecationLogger

    C->>M: setAdminStatus(args)
    Note over M: Method invoked
    M->>D: method('setAdminStatus', '8.0.0', 'Use /v1/roles.addUserToRole or /v1/roles.removeUserFromRole')
    D-->>M: logged
    M-->>C: proceed with existing logic and respond
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

I thump a note on the server log,
“Old paths ahead? Time to jog.”
A carrot-shaped sign, clear and bright,
“Use roles APIs—turn left, not right!”
With whiskers twitching, I cheer the run,
Deprecation done—onward, bun! 🥕

Pre-merge checks and finishing touches

✅ 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 "chore: add setAdminStatus deprecation logger" is concise, a single sentence, and accurately summarizes the primary change in the diff (adding a deprecation logger for setAdminStatus), making it clear to reviewers what the PR's main intent is. It avoids extraneous detail and uses appropriate conventional commit style. A teammate scanning history can understand the primary change from the title alone.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/setAdminStatus-deprecation-warning

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5ee569 and dd0f3bc.

📒 Files selected for processing (1)
  • apps/meteor/app/lib/server/methods/setAdminStatus.ts (2 hunks)
⏰ 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). (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: Builds matrix rust bindings against alpine
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/app/lib/server/methods/setAdminStatus.ts (2)

10-10: Import of deprecation logger — verified
methodDeprecationLogger is exported from apps/meteor/app/lib/server/lib/deprecationWarningLogger.ts and exposes a .method(...) API; usages found across the repo.


21-22: Keep '/v1/…' — do not add '/api'; the second arg is the removal version. The repo consistently uses '/v1/…' for REST replacements (not '/api/v1'), so leave the message as-is. The second parameter is the planned removal version used in the log message and semver checks.

Likely an incorrect or invalid review comment.


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

@codecov
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.52%. Comparing base (c5ee569) to head (dd0f3bc).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #36944      +/-   ##
===========================================
- Coverage    66.54%   66.52%   -0.02%     
===========================================
  Files         3344     3344              
  Lines       114629   114629              
  Branches     21094    21091       -3     
===========================================
- Hits         76281    76262      -19     
- Misses       35658    35673      +15     
- Partials      2690     2694       +4     
Flag Coverage Δ
e2e 57.68% <ø> (-0.01%) ⬇️
unit 71.21% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

@juliajforesti juliajforesti marked this pull request as ready for review September 15, 2025 20:16
@juliajforesti juliajforesti added this to the 7.11.0 milestone Sep 15, 2025
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Sep 15, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 15, 2025
@ggazzo ggazzo merged commit 4775ad1 into develop Sep 15, 2025
53 checks passed
@ggazzo ggazzo deleted the chore/setAdminStatus-deprecation-warning branch September 15, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants