Currently when a plugin errors, it gets autodisabled. This is however completely silent and easy to miss. The result can be degraded data quality or a hole in data in case of export plugins – something to be fixed ASAP.

A PagerDuty integration could come in useful here, allowing an alert to be sent in case of a plugin getting disabled. PagerDuty is tailored for this kind of thing, so this would potentially be better than e.g. an email – that could be easily missed in a sea of emails.

This problem was brought up by a current user of our Snowflake Export Plugin.
posthog/models/plugin.py
"""If remote plugin, download the archive and get up-to-date validated_data from there."""
    if url.startswith("file:"):
        plugin_path = url[5:]
        json_path = os.path.join(plugin_path, "plugin.json")
        json = load_json_file(json_path)
        if not json:
            raise ValidationError(f"Could not load plugin.json from: {json_path}")
        validated_data["plugin_type"] = "local"
        validated_data["url"] = url
        validated_data["tag"] = None
        validated_data["archive"] = None
        validated_data["name"] = json.get("name", json_path.split("/")[-2])
        validated_data["description"] = json.get("description", "")
        validated_data["config_schema"] = json.get("config", [])
        validated_data["public_jobs"] = json.get("publicJobs", {})
        posthog_version = json.get("posthogVersion", None)
        validated_data["is_stateless"] = json.get("stateless", False)
    else:
        parsed_url = parse_url(url, get_latest_if_none=True)
        if parsed_url:
            validated_data["url"] = parsed_url["root_url"]
            validated_data["tag"] = parsed_url.get("tag", None)
            validated_data["archive"] = download_plugin_archive(validated_data["url"], validated_data["tag"])