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

feat(flags): add has_flags to RpcProjectFlags #83207

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

michellewzhang
Copy link
Member

@michellewzhang michellewzhang commented Jan 9, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 9, 2025
@michellewzhang michellewzhang marked this pull request as ready for review January 10, 2025 00:04
@michellewzhang michellewzhang requested review from a team, cmanallen and JoshFerge January 10, 2025 00:05
Copy link

codecov bot commented Jan 10, 2025

❌ 3 Tests Failed:

Tests completed Failed Passed Skipped
23455 3 23452 272
View the top 3 failed tests by shortest run time
tests.sentry.hybridcloud.test_organization::test_get_aggregate_project_flags[MONOLITH]
Stack Traces | 2.48s run time
#x1B[1m#x1B[.../sentry/hybridcloud/test_organization.py#x1B[0m:371: in test_get_aggregate_project_flags
    flags = organization_service.get_aggregate_project_flags(organization_id=org.id)
#x1B[1m#x1B[.../services/organization/impl.py#x1B[0m:377: in get_aggregate_project_flags
    return RpcProjectFlags(**flag_dict)
#x1B[1m#x1B[31mpydantic/main.py#x1B[0m:347: in pydantic.main.BaseModel.__init__
    ???
#x1B[1m#x1B[31mE   pydantic.error_wrappers.ValidationError: 1 validation error for RpcProjectFlags#x1B[0m
#x1B[1m#x1B[31mE   has_flags#x1B[0m
#x1B[1m#x1B[31mE     field required (type=value_error.missing)#x1B[0m
tests.sentry.hybridcloud.test_organization::test_get_aggregate_project_flags[REGION]
Stack Traces | 2.64s run time
#x1B[1m#x1B[.../sentry/hybridcloud/test_organization.py#x1B[0m:371: in test_get_aggregate_project_flags
    flags = organization_service.get_aggregate_project_flags(organization_id=org.id)
#x1B[1m#x1B[.../services/organization/impl.py#x1B[0m:377: in get_aggregate_project_flags
    return RpcProjectFlags(**flag_dict)
#x1B[1m#x1B[31mpydantic/main.py#x1B[0m:347: in pydantic.main.BaseModel.__init__
    ???
#x1B[1m#x1B[31mE   pydantic.error_wrappers.ValidationError: 1 validation error for RpcProjectFlags#x1B[0m
#x1B[1m#x1B[31mE   has_flags#x1B[0m
#x1B[1m#x1B[31mE     field required (type=value_error.missing)#x1B[0m
tests.sentry.hybridcloud.test_organization::test_get_aggregate_project_flags[CONTROL]
Stack Traces | 2.75s run time
#x1B[1m#x1B[.../sentry/hybridcloud/test_organization.py#x1B[0m:371: in test_get_aggregate_project_flags
    flags = organization_service.get_aggregate_project_flags(organization_id=org.id)
#x1B[1m#x1B[.../hybridcloud/rpc/service.py#x1B[0m:354: in remote_method
    return dispatch_remote_call(
#x1B[1m#x1B[.../hybridcloud/rpc/service.py#x1B[0m:476: in dispatch_remote_call
    return remote_silo_call.dispatch(use_test_client)
#x1B[1m#x1B[.../hybridcloud/rpc/service.py#x1B[0m:511: in dispatch
    serial_response = self._send_to_remote_silo(use_test_client)
#x1B[1m#x1B[.../hybridcloud/rpc/service.py#x1B[0m:582: in _send_to_remote_silo
    self._raise_from_response_status_error(response)
#x1B[1m#x1B[.../hybridcloud/rpc/service.py#x1B[0m:605: in _raise_from_response_status_error
    raise self._remote_exception(
#x1B[1m#x1B[31mE   sentry.hybridcloud.rpc.service.RpcRemoteException: organization.get_aggregate_project_flags: Error invoking rpc at '.../rpc/organization/get_aggregate_project_flags/': check error logs for more details#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link
Member

@cmanallen cmanallen left a comment

Choose a reason for hiding this comment

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

You knew to preserve the ordering! Nice job.

We still need to update the flags bitfield on the project model.

class flags(TypedClassBitField):

Before we merge any thing let's talk about performance implications of this change on the ingestion pipeline.

@JoshFerge
Copy link
Member

You knew to preserve the ordering! Nice job.

We still need to update the flags bitfield on the project model.

class flags(TypedClassBitField):

Before we merge any thing let's talk about performance implications of this change on the ingestion pipeline.

FYI we are doing it in post_process, out of critical path, so perf implications should be minimal.

@michellewzhang
Copy link
Member Author

You knew to preserve the ordering! Nice job.

We still need to update the flags bitfield on the project model.

class flags(TypedClassBitField):

Before we merge any thing let's talk about performance implications of this change on the ingestion pipeline.

the project model update was merged yesterday here: #83198

Copy link
Member

@cmanallen cmanallen left a comment

Choose a reason for hiding this comment

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

@JoshFerge Thank you for that insight!

@michellewzhang michellewzhang merged commit 107638b into master Jan 10, 2025
50 checks passed
@michellewzhang michellewzhang deleted the mz/add-flag-rpc branch January 10, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants