Skip to content

Azure Storage Driver Should Default to Using the Correct Root Prefix

Context

Originally, the Azure Storage Driver would write to // as the root directory, also appearing in some places as /<no-name>/ within the Azure UI. trimlegacyrootprefix can be set to true to build root paths without an extra leading slash.

Problem

This legacy behavior must be preserved to support older deployments using this driver; however, when moving to Azure from another storage driver, this behavior essentially "hides" all the data until trimlegacyrootprefix: true is set. Defaulting to true however, would have the same effect on legacy deployments of Azure, which would be even more disruptive.

Solutions

The storage driver should default to the correct behavior, using / as the root directory, but it's unclear how to approach this change.

Breaking Change on New GitLab Release

We could schedule the changes to take place during a new major release of GitLab. This gives us the freedom to make breaking changes, and we could then either make trimlegacyrootprefix default to true, or we could rename this into something like legacyrootprefix with legacyrootprefix: true using // as the root directory. Either of these solutions are fairly trivial code changes, but would require a one-time configuration change (or perhaps a migration from // to /) for every Azure user of the registry.

Smart Detection of Legacy Deployments

Instead of requiring users on older deployments to adjust their configurations, we could instead explore the possibility of detecting these deployments and adjusting the behavior of the driver. If we detect the presence of the // directory ahead of the root prefix, we can then use that as the root, while defaulting to / in all other cases. This solution does not require a breaking change; however, it requires more sophisticated code, and it raises the complexity of the driver behavior. Additionally, we'd need to provide a way to force the new behavior to enable users to migrate without deleting the original prefix.

With: !1196 (merged) we're going to make a breaking change, as outlined above.

Breaking change tasks

Affected Topology

This affects Self-Managed users of GitLab.

Affected Tier

All tiers are affected.

  • Free
  • Premium
  • Ultimate

Checklists

Labels

  • This issue is labeled deprecation, and with the relevant ~devops::, ~group::, and ~Category: labels.
  • This issue is labeled breaking change if the removal of the deprecated item will be a breaking change.

Timeline

Please add links to the relevant merge requests.

Mentions

  • Your stage's stable counterparts have been @mentioned on this issue. For example, Customer Support, Customer Success (Technical Account Manager), Product Marketing Manager: @heather.
    • To see who the stable counterparts are for a product team visit product categories
      • If there is no stable counterpart listed for Sales/CS please mention @timtams
      • If there is no stable counterpart listed for Support please mention @gitlab-com/support/managers
      • If there is no stable counterpart listed for Marketing please mention @cfoster3
  • Your GPM @jreporter has been @mentioned so that they are aware of planned deprecations. The goal is to have reviews happen at least two releases before the final removal of the feature or introduction of a breaking change.

Deprecation Milestone

15.8

Planned Removal Milestone

16.0

Edited by SAhmed