louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
60.16k stars 5.38k forks source link

Bug in Tag Removal for Uptime-Kuma Version 2.0.0-beta.0 #5296

Closed homelab-alpha closed 2 weeks ago

homelab-alpha commented 3 weeks ago

📑 I have found these related issues/pull requests

I have checked, but couldn’t find anything similar.

🛡️ Security Policy

Description

There is a bug in version 2.0.0-beta.0.

When trying to remove an existing tag from a monitor, the tag appears to be removed initially, but reappears after saving.

uptime_kuma_tags

👟 Reproduction steps

Here is the docker-compose.yml file:

---
networks:
  uptime-kuma-beta_net:
    attachable: false
    internal: false
    external: false
    name: uptime-kuma-beta
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.20.3.0/24
          ip_range: 172.20.3.0/24
          gateway: 172.20.3.1
    driver_opts:
      com.docker.network.bridge.default_bridge: "false"
      com.docker.network.bridge.enable_icc: "true"
      com.docker.network.bridge.enable_ip_masquerade: "true"
      com.docker.network.bridge.host_binding_ipv4: "0.0.0.0"
      com.docker.network.bridge.name: "uptime-kuma"
      com.docker.network.driver.mtu: "1500"
    labels:
      com.uptime-kuma-beta.network.description: "is an isolated bridge network."

services:
  uptime-kuma-beta_db:
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "1M"
        max-file: "2"
    stop_grace_period: 1m
    container_name: uptime-kuma-beta_db
    image: mariadb:latest
    pull_policy: if_not_present
    volumes:
      - /docker/uptime-kuma-beta/db:/var/lib/mysql
    environment:
      PUID: "1000"
      PGID: "1000"
      TZ: Europe/Amsterdam
      MYSQL_ROOT_PASSWORD: "ThisIsADemoRootPassword"
      MYSQL_DATABASE: "uptime_kuma_db"
      MYSQL_USER: "uptime-kuma"
      MYSQL_PASSWORD: "ThisIsADemoPassword"
    command:
      [
        "--transaction-isolation=READ-COMMITTED",
        "--log-bin=binlog",
        "--binlog-format=ROW",
      ]
    hostname: uptime-kuma-beta_db
    networks:
      uptime-kuma-beta_net:
        ipv4_address: 172.20.3.2
    security_opt:
      - no-new-privileges:true
    labels:
      com.uptime-kuma-beta.db.description: "is an MySQL database."
    healthcheck:
      disable: true

  uptime-kuma-beta_app:
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "1M"
        max-file: "2"
    stop_grace_period: 1m
    container_name: uptime-kuma-beta
    image: louislam/uptime-kuma:2.0.0-beta.0
    pull_policy: if_not_present
    depends_on:
      uptime-kuma-beta_db:
        condition: service_started
    links:
      - uptime-kuma-beta_db
    volumes:
      - /docker/uptime-kuma-beta/app:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /usr/local/share/ca-certificates:/app/data/docker-tls
    environment:
      PUID: "1000"
      PGID: "1000"
      TZ: Europe/Amsterdam
      # NODE_EXTRA_CA_CERTS: /app/data/docker-tls/demo.cert # This is a demo certificate.
      MYSQL_HOST: "uptime-kuma-beta_db"
      MYSQL_PORT: 3306
      MYSQL_NAME: "uptime_kuma_db"
      MYSQL_USER: "uptime-kuma"
      MYSQL_PASSWORD: "ThisIsADemoPassword"
    domainname: status.local
    hostname: status
    networks:
      uptime-kuma-beta_net:
        ipv4_address: 172.20.3.3
    ports:
      - "3001:3001/tcp" # HTTP
      - "3001:3001/udp" # HTTP
    security_opt:
      - no-new-privileges:true
    labels:
      com.docker.compose.project: "uptime-kuma-beta"
      com.uptime-kuma-beta.description:
        "is an self-hosted monitoring tool that allows you to monitor uptime,
        status, and notifications for various services and domains."
    healthcheck:
      disable: true

👀 Expected behavior

The tag should be removed after saving.

😓 Actual Behavior

The tag is not removed and has to be manually deleted from the database.

🐻 Uptime-Kuma Version

Version: 2.0.0-beta.0

💻 Operating System and Arch

Ubuntu Server 24.04.1 LTS (GNU/Linux 6.8.0-48-generic x86_64)

🌐 Browser

Brave version 1.71.121 (Chromium: 130.0.6723.91) (Official Build) (64-bit)

🖥️ Deployment Environment

📝 Relevant log output

There is no relevant log output.