Page MenuHomePhabricator

Your template file contains unknown keys
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Logged into my tool on Toolforge
  • Ran toolforge webservice python3.13 shell

What happens?:
A warning was showns:

Your template file (/data/project/huji/service.template) contains unknown keys:
- distribution
- version
- web

Other information (browser name/version, screenshots, etc.):

/data/project/huji/service.template
# This file is used by Toolforge infrastructure.
# Please do not edit manually at this time.
# Mon Oct 12 18:05:00 2020
backend: kubernetes
distribution: debian
version: 4
web: php7.3

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

That service.template looks like a point in time copy of a service.manifest. Those two files are related, but they use different schemas.

https://wikitech.wikimedia.org/wiki/Help:Toolforge/Web#Webservice_templates

A webservice template file is a YAML document. It can contain these settings:

  • type: the type of webservice to start (equivalent to TYPE)
  • cpu: the CPU reservation to ask for on Kubernetes (equivalent to --cpu=...)
  • mem: the memory reservation to ask for on Kubernetes (equivalent to --mem=...)
  • replicas: the number of Pod replicas to use (equivalent to --replicas=...)
  • health-check-path: a path on your tool that can be used for automatic health checks (e.g. /healthz; equivalent to --health-check-path=...)
  • mount: Set which shared storage (NFS) directories to mount to this pod (equivalent to --mount=...)
  • buildservice-image: Set image to use for buildservice type. (equivalent to --buildservice-image=...)
  • backend: the backend to use (equivalent to --backend=...); since 2024, kubernetes is the only supported value
  • extra_args: extra arguments to pass to the backend, if supported by that web service type

A service.template matching the intent of the service.manifest format file given would be:

$HOME/service.template
type: php7.3
backend: kubernetes

A service.template matching the intent of the service.manifest format file given would be:

$HOME/service.template
type: php7.3
backend: kubernetes

So should I edit the file to look like this? The file itself suggests I should not?

So should I edit the file to look like this? The file itself suggests I should not?

Yes you should edit your $HOME/service.template file so that it is actually a service template. The current file is a copy someone made of a $HOME/service.manifest file and contains incompatible data. The edit warning is part of a normal $HOME/service.manifest file.