Skip to content

No validation of LocationConfig fields #399

@wilke

Description

@wilke

Summary

Location configurations loaded from Locations.yaml are not validated. Missing required fields (URLs, credentials, buckets) are not detected until runtime failures occur.

Location

shock-server/conf/conf.go:268-291

Current State

// Line 269, 282: Comments indicate planned validation
// TOBEADDED --> https://github.com/santhosh-tekuri/jsonschema/issues/5
  • JSON schema validation was planned but not implemented
  • No field requirement checking for different location types
  • All LocationConfig fields are optional in the struct

Impact

  • Invalid configurations fail at runtime during download/upload attempts
  • No clear error messages about missing required fields
  • S3 without Bucket, Azure without Container, etc. will fail silently

Expected Behavior

At server startup, validate that:

  • S3 locations have: URL, Bucket, AuthKey, SecretKey, Region
  • Azure locations have: Account, Container, AuthKey, SecretKey
  • GCS locations have: Bucket, SecretKey
  • Required fields are present for each location type

Priority

Medium - configuration usability issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions