Skip to content

Ignore files which is not Sloth CRD #831

Description

@makavity

Hello, faced the problem with validation.

lint:sloth:
  stage: lint
  image: <REDACTED>/devops/sloth-cli:v${SLOTH_VERSION}
  script:
    - sloth validate --input ${CI_PROJECT_DIR}/observability/slo --fs-exclude _gen

Output:

$ sloth validate --input ${CI_PROJECT_DIR}/observability/slo --fs-exclude _gen
2026/07/23 17:04:30 INFO: metrics: disable exposing PSI metrics because of failed init: open /sys/fs/cgroup/kubepods-burstable-podabf5c04c_d6d7_4de5_affb_ccb36e7e0df3.slice:cri-containerd:828c035692d6657ca4239dcc3ea7394b4ed68b943304e9cc2fa2cd89cd188a1b/cpu.pressure: no such file or directory
INFO[0000] SLO period windows loaded                     svc=alert.WindowsRepo version=v0.16.0 window=30d windows=2
INFO[0000] Plugins loaded                                k8s-transform-plugins=0 sli-plugins=0 slo-plugins=12 version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/edu/ru_portal_product_types_errors.yaml version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/edu/ru_portal_product_types_latency.yaml version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/one/ru_portal_user_homework_list_errors.yaml version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/one/ru_portal_user_homework_list_latency.yaml version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/site/ru_portal_catalog_cards_errors.yaml version=v0.16.0 window=30d
ERRO[0000] invalid SLO: invalid spec, could not load with any of the supported spec types  file=/builds/<REDACTED>/tools/monitoring/observability/slo/teams/site/ru_portal_catalog_cards_latency.yaml version=v0.16.0 window=30d
error: "validate" command failed: validation failed

That files are not sloth-compatible, it is pyrra files, we are testing many tools to find best for us.

I suppose, the best way for that - is to ignore files, which are not compatible with sloth. Maybe, ignore kind other than PrometheusServiceLevel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions