Set sharding key when missing on note markdown cache update

What does this MR do and why?

Markdown cache updates happen without executing model callbacks, so we need to make sure we set the required sharding key if it's missing for a record.

A not null constraint was introduced for the sharding key and already added in .com. So there are a few instances where this is causing errors and why we need this fix https://new-sentry.gitlab.net/organizations/gitlab/issues/?alert_rule_id=52&alert_type=issue&environment=gprd&notification_uuid=667e632b-7227-49a8-9001-0c797ade15bc&project=3&query=is%3Aunresolved+check_82f260979e&referrer=issue-list&statsPeriod=14d

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #444222 (closed)

Edited by Mario Celi

Merge request reports

Loading