Skip to content

Tech debt removal: Remove local serving type

Summary

There are still some relics of legacy storage code in the Go code that should be safe to remove:

eg. this switch:

// internal/source/gitlab/factory.go
func (g *Gitlab) fabricateServing(lookup api.LookupPath) (serving.Serving, error) {
	source := lookup.Source
	if err := g.checkDiskAllowed(lookup.ProjectID, source); err != nil {
		return nil, err
	}

	switch source.Type {
	case "file":
		return local.Instance(), nil
	case "zip":
		return zip.Instance(), nil
	}

	return nil, fmt.Errorf("gitlab: unknown serving source type: %q", source.Type)
}

as well as the entire folders:

  • internal/serving/disk/local
  • vfs/local

Reason

The temporary ability to enable legacy storage has been removed in 14.3. AFAIK, It should be safe to remove this now.

Edited by Janis Altherr