You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once #11895 lands, nothing in the frontend still needs to read or write RegistrationPolicyBucket#key (or the deprecated signup-side bucketKey/requestedBucketKey fields) as identity -- everything goes through id instead. This issue is the GraphQL-schema half: deprecate, then remove, the key-based surface that's no longer needed, so #11897 and #11898 can proceed without an external API still depending on it.
Concretely, the following are still live in the schema today:
Types::BucketKeyMappingInputType (app/graphql/types/bucket_key_mapping_input_type.rb): from_key/to_key arguments, both already deprecation_reason-marked in favor of from_bucket_id/to_bucket_id.
Deprecated bucketKey/requestedBucketKey fields on Types::SignupType, Types::SignupRequestType, Types::SignupRankedChoiceType, Types::SignupChangeType.
RegistrationPolicy::BucketDrop#key (app/liquid_drops/registration_policy/bucket_drop.rb) -- confirmed zero real-world usage across ~170 conventions' Page/CmsPartial/CmsLayout/NotificationTemplate/Product content in a full-text search.
Also found along the way, and unrelated to any of this except by proximity: Types::RegistrationPolicyInputType/Types::RegistrationPolicyBucketInputType (with a required: truekey argument) are referenced by no mutation argument and no frontend query at all -- dead code, safe to delete independently of everything else in this plan.
Proposed Change
Remove from_key from BucketKeyMappingInputType -- fully covered by from_bucket_id, since a removed bucket is always a persisted row with a real id already (unlike a bucket being newly created in the same edit, which to_key still needs to cover).
Deprecate, then (after your normal deprecation window) remove: the bucketKey/requestedBucketKey fields on the four Signup-family GraphQL types, the bucket_key/requested_bucket_key mutation arguments on the six mutations listed above, and RegistrationPolicyBucketType#key.
Steps 1-3 are breaking API changes to a schema that (per this repo's model) may have external consumers beyond this codebase's own frontend. Needs whatever deprecation-window/versioning process this project normally applies before removing a deprecated field -- this issue is scoped to include both the deprecation and the eventual removal, but the removal step shouldn't happen until that window has passed.
RegistrationPolicyBucketType#key isn't currently marked deprecation_reason at all, so removing it has a longer runway to plan for than the fields that are already deprecated.
Background
Once #11895 lands, nothing in the frontend still needs to read or write
RegistrationPolicyBucket#key(or the deprecated signup-sidebucketKey/requestedBucketKeyfields) as identity -- everything goes throughidinstead. This issue is the GraphQL-schema half: deprecate, then remove, the key-based surface that's no longer needed, so #11897 and #11898 can proceed without an external API still depending on it.Concretely, the following are still live in the schema today:
Types::BucketKeyMappingInputType(app/graphql/types/bucket_key_mapping_input_type.rb):from_key/to_keyarguments, both alreadydeprecation_reason-marked in favor offrom_bucket_id/to_bucket_id.bucketKey/requestedBucketKeyfields onTypes::SignupType,Types::SignupRequestType,Types::SignupRankedChoiceType,Types::SignupChangeType.bucket_key/requested_bucket_keymutation arguments onMutations::CreateMySignup,Mutations::CreateUserSignup,Mutations::CreateSignupRequest,Mutations::CreateSignupRankedChoice,Mutations::ForceConfirmSignup,Mutations::UpdateSignupBucket.Types::RegistrationPolicyBucketType#key(app/graphql/types/registration_policy_bucket_type.rb) -- the bucket's own read field, not currently marked deprecated at all. Convert remaining registration policy bucket key dependencies (SignupBucketFinder, EventChangeRegistrationPolicyService) to id #11892's research found no Liquid template usage of the equivalentRegistrationPolicy::BucketDrop#keyfield; this issue is about the GraphQL field specifically, which Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895's frontend conversion makes unused by this codebase's own frontend (though it's a public field on a public API -- see Tradeoffs).RegistrationPolicy::BucketDrop#key(app/liquid_drops/registration_policy/bucket_drop.rb) -- confirmed zero real-world usage across ~170 conventions' Page/CmsPartial/CmsLayout/NotificationTemplate/Product content in a full-text search.Also found along the way, and unrelated to any of this except by proximity:
Types::RegistrationPolicyInputType/Types::RegistrationPolicyBucketInputType(with arequired: truekeyargument) are referenced by no mutation argument and no frontend query at all -- dead code, safe to delete independently of everything else in this plan.Proposed Change
from_keyfromBucketKeyMappingInputType-- fully covered byfrom_bucket_id, since a removed bucket is always a persisted row with a real id already (unlike a bucket being newly created in the same edit, whichto_keystill needs to cover).bucketKey/requestedBucketKeyfields on the four Signup-family GraphQL types, thebucket_key/requested_bucket_keymutation arguments on the six mutations listed above, andRegistrationPolicyBucketType#key.RegistrationPolicy::BucketDrop#key's delegate.RegistrationPolicyInputType/RegistrationPolicyBucketInputTypetypes.bin/rails graphql:updateand commit the regenerated schema/generated frontend files, per this repo's CLAUDE.md.Benefits
key-as-identity, so the app-layer and database cleanups (Retire RegistrationPolicyBucket#key as an identity mechanism in the app layer (phase 3 of dropping RegistrationPolicyBucket#key) #11897, Drop the registration_policy_buckets.key column (phase 4 of dropping RegistrationPolicyBucket#key) #11898) don't have to preserve a public API around it.Tradeoffs
RegistrationPolicyBucketType#keyisn't currently markeddeprecation_reasonat all, so removing it has a longer runway to plan for than the fields that are already deprecated.References
registration_policy_buckets.key; see Give the registration policy editor real bucket ids (phase 1 of dropping RegistrationPolicyBucket#key) #11895, Retire RegistrationPolicyBucket#key as an identity mechanism in the app layer (phase 3 of dropping RegistrationPolicyBucket#key) #11897, Drop the registration_policy_buckets.key column (phase 4 of dropping RegistrationPolicyBucket#key) #11898Issue drafted by Claude