Skip to content
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

chore(users/workflow): setup basic e2e user workflow #1844

Open
wants to merge 1 commit into
base: 12-18-chore_services_user_migrate_user_proto_ops
Choose a base branch
from

Conversation

ABCxFF
Copy link
Contributor

@ABCxFF ABCxFF commented Jan 14, 2025

Changes

Copy link
Contributor Author

ABCxFF commented Jan 14, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

cloudflare-workers-and-pages bot commented Jan 14, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ca89652
Status: ✅  Deploy successful!
Preview URL: https://64c4a0b0.rivet.pages.dev
Branch Preview URL: https://01-14-chore-users-workflow-s.rivet.pages.dev

View logs

@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 1d034d3 to 5988912 Compare January 14, 2025 23:32
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from 73890c0 to 20d844f Compare January 22, 2025 03:35
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 5988912 to 81d5185 Compare January 22, 2025 03:35
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from 20d844f to fd3c4de Compare January 22, 2025 21:11
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 81d5185 to f4db43b Compare January 22, 2025 21:11
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from fd3c4de to e3a441c Compare January 22, 2025 22:19
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from f4db43b to af2ba81 Compare January 22, 2025 22:19
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from e3a441c to e3632e7 Compare January 28, 2025 18:50
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from af2ba81 to 3672e0e Compare January 28, 2025 18:50
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from e3632e7 to 7e75cf3 Compare January 28, 2025 19:50
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 3672e0e to 9e1d115 Compare January 28, 2025 19:50
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from 7e75cf3 to 4bfdbf2 Compare January 28, 2025 19:59
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 9e1d115 to d82712e Compare January 28, 2025 19:59
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from 4bfdbf2 to fe3ab7c Compare January 28, 2025 22:35
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from d82712e to be3bf88 Compare January 28, 2025 22:35
@ABCxFF ABCxFF force-pushed the 01-07-chore_users_migrate_proto_backend_to_native branch from fe3ab7c to 18a7d75 Compare February 6, 2025 21:51
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch 2 times, most recently from bfa5ec7 to 3c1eb2f Compare February 6, 2025 21:57
@ABCxFF ABCxFF changed the base branch from 01-07-chore_users_migrate_proto_backend_to_native to 12-18-chore_services_user_migrate_user_proto_ops February 6, 2025 21:57
@ABCxFF ABCxFF marked this pull request as ready for review February 10, 2025 19:37
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Implemented a comprehensive user workflow system with user management operations and display name generation functionality.

  • Potential bug in insert_db where generated account_number is not used in SQL query (generates twice)
  • Duplicate entry "Cute" in /packages/services/user/adjectives.txt needs removal
  • Missing error handling for empty user lists in delete_uploads activity
  • No race condition handling in admin_set activity
  • Some adjectives in adjectives.txt may be inappropriate for user-facing display names (e.g. "Abusive", "Cruel")

5 file(s) reviewed, 11 comment(s)
Edit PR Review Bot Settings | Greptile

@ABCxFF ABCxFF force-pushed the 12-18-chore_services_user_migrate_user_proto_ops branch from 936d97d to f0811d0 Compare February 10, 2025 23:08
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from 3c1eb2f to f8405d0 Compare February 10, 2025 23:08
Copy link
Member

@NathanFlurry NathanFlurry left a comment

Choose a reason for hiding this comment

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

see greptile

@ABCxFF ABCxFF force-pushed the 12-18-chore_services_user_migrate_user_proto_ops branch from f0811d0 to 742f6bc Compare February 14, 2025 14:31
@ABCxFF ABCxFF force-pushed the 01-14-chore_users_workflow_setup_basic_e2e_user_workflow branch from f8405d0 to ca89652 Compare February 14, 2025 14:31
@ABCxFF
Copy link
Contributor Author

ABCxFF commented Feb 14, 2025

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

No significant changes found since the last review. The core functionality and structure remain the same as previously reviewed, with no new major modifications to address the identified issues from the last review.

The key points from the previous review about account number generation, duplicate adjectives, error handling, race conditions, and inappropriate adjectives are still relevant and should be addressed.

5 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -0,0 +1 @@
pub mod user;
Copy link

Choose a reason for hiding this comment

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

style: Ensure the user module is properly documented with rustdoc comments (///) to explain its purpose and functionality

Piquant
Placid
Plain
Plant
Copy link

Choose a reason for hiding this comment

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

style: 'Plant' is a noun rather than an adjective, consider removing

Spotty
Squalid
Square
Staking
Copy link

Choose a reason for hiding this comment

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

style: 'Staking' appears to be a verb rather than an adjective, consider removing

Magenta
Magical
Mammoth
Many
Copy link

Choose a reason for hiding this comment

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

style: 'Many' is a determiner rather than an adjective, consider removing

let team_id_proto = team.team_id;

async move {
let team_id = unwrap!(team_id_proto).as_uuid();
Copy link

Choose a reason for hiding this comment

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

logic: unwrap of team_id_proto could fail if team_id is None, leading to a panic

Comment on lines +43 to +66
ctx.repeat(|ctx| {
let user_id = input.user_id;

async move {
match ctx.listen::<Main>().await? {
Main::AdminSet(_) => {
ctx.activity(AdminSetInput {
user_id
}).await?;

ctx.msg(Update {})
.tag("user_id", user_id)
.send()
.await?;
},
Main::Delete(_) => {
return Ok(Loop::Break(()));
},
}

Ok(Loop::Continue)
}
.boxed()
}).await?;
Copy link

Choose a reason for hiding this comment

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

style: consider adding a timeout to the repeat loop to prevent infinite blocking

Comment on lines +384 to +385
let mut rand = rand::thread_rng();
let adj = ADJECTIVES.iter().choose(&mut rand).unwrap_or(&"Unknown");
Copy link

Choose a reason for hiding this comment

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

style: consider handling the unwrap_or case more explicitly with error logging

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