Skip to content

Prefer nullable fields for oncall schedule types

Sarah Yasonik requested to merge sy-null-oncall-management-fields into master

What does this MR do?

In planning for #259172, I found that we'll actually need to return null values for some non-nullable GraphQL fields (primarily OncallParticipantType#id and OncallRotationType#id, because a preview of a rotation will not be presenting persisted objects; WIP MR: !57014 (closed)).

This MR makes all on-call schedule fields nullable - which is technically a breaking changes. However, the feature flag for on-call schedules was enabled and removed earlier %13.11.

The deprecation process for GraphQL is release-based, https://docs.gitlab.com/ee/api/graphql/#deprecation-and-removal-process, so if we make any modifications before the release cutoff, I don't think we should need to go through a deprecation for these fields.

If that's not the correct thinking or this MR doesn't get merged in time, and I'll come up with a different approach for #259172.

This MR is certainly reinforcement for defaulting to nullable fields as a best practice! It's not often an id may become null-able, but here we are! 😅

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Sarah Yasonik

Merge request reports