Giter VIP home page Giter VIP logo

Comments (8)

alfonder avatar alfonder commented on August 27, 2024

Why all old versions (1.xx) have been removed from DockerHub? The new versions are buggy and no chance left to roll back.

from rss-to-telegram-bot.

BoKKeR avatar BoKKeR commented on August 27, 2024

I will push the old version to dockerhub later today. Can you post info about your setup so I can look into this issue?

from rss-to-telegram-bot.

alfonder avatar alfonder commented on August 27, 2024

Yes, sure.
It was a docker container, running the old (python) version of the bot.
Docker-compose script used to run:

telerss:
  container_name: telerss
  environment:
    - DELAY=${TRSS_DELAY_S}
    - TOKEN=${TRSS_TOKEN}
    - CHATID=${TRSS_CHATID}
  volumes:
    - ${DATA_DIR}/telerss/config:/app/config
  restart: unless-stopped
  image: bokker/rss.to.telegram

When the new (2.x) docker image was released, Watchtower updated the image and restarted the container. After that all the bot functionality became broken. Below is the container log:

INFO: Old database exists:config/rss.db, backing it up as backup_python_rss.db
Error: near line 2: UNIQUE constraint failed: rss_copy.name
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "rss_bot_database.db" at "file:./../config/rss_bot_database.db"
Migration init marked as applied.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "rss_bot_database.db" at "file:./../config/rss_bot_database.db"

Already in sync, no schema change or pending migration was found.

✔ Generated Prisma Client (3.11.0 | library) to ./node_modules/@prisma/client in
 146ms


┌─────────────────────────────────────────────────────────┐
│  Update available 3.11.0 -> 3.12.0                      │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "rss_bot_database.db" at "file:./../config/rss_bot_database.db"

1 migration found in prisma/migrations


No pending migrations to apply.
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [NestFactory] Starting Nest application...
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] TelegrafModule dependencies initialized +151ms
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +4ms
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] CustomLoggerModule dependencies initialized +3ms
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +2ms
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] ScheduleModule dependencies initialized +6ms
[Nest] 447  - 04/10/2022, 5:45:37 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
[Nest] 447  - 04/10/2022, 5:45:38 PM     LOG [InstanceLoader] TelegrafCoreModule dependencies initialized +237ms
[Nest] 447  - 04/10/2022, 5:45:38 PM     LOG [InstanceLoader] TelegramModule dependencies initialized +2ms
[Nest] 447  - 04/10/2022, 5:45:38 PM     LOG [InstanceLoader] RssModule dependencies initialized +1ms
[Nest] 447  - 04/10/2022, 5:45:38 PM     LOG [InstanceLoader] AppModule dependencies initialized +2ms
[Nest] 447  - 04/10/2022, 5:45:38 PM     LOG [NestApplication] Nest application successfully started +99ms

from rss-to-telegram-bot.

BoKKeR avatar BoKKeR commented on August 27, 2024

I pushed the legacy image:docker pull bokker/rss.to.telegram:1.0.0

The migration failed because you have entries with the same name or link
The new database requires all entries to have unique name and url.

You can find your old database in /app/config/backup_python_rss.db

It might benefit you to stay on the old version as the new bot only dumps the links, I have not looked into adding other metadata

from rss-to-telegram-bot.

alfonder avatar alfonder commented on August 27, 2024

The migration failed because you have entries with the same name or link The new database requires all entries to have unique name and url.

I had only 1 subscription in that DB. Therefore double entries were possible only if the bot didn't really delete entry on un-subscribe.

Also the main question still remains: why /help command doesn't work (even if DB is empty).

from rss-to-telegram-bot.

BoKKeR avatar BoKKeR commented on August 27, 2024

Can you try to remove your database and restart the container? As you had a failed migration the database is probably not setup

from rss-to-telegram-bot.

alfonder avatar alfonder commented on August 27, 2024

@BoKKeR I've removed old DB and re-created the container. Creating new empty DB was successful. Nevertheless on /help command the bot answers:

ERROR: Error: 400: Bad Request: can't parse entities: Can't find end of the entity starting at byte offset 543

The migration failed because you have entries with the same name or link
The new database requires all entries to have unique name and url.

I found the reason. The old 1.x bot did not update the DB entry when a new article arrives. Instead it did adding a new entry. Therefore the same rss link appeared in multiple entries.

from rss-to-telegram-bot.

BoKKeR avatar BoKKeR commented on August 27, 2024

I think this is solved on the develop branch but since there are many changes like multichat support, and its highly experimental I advise to wait until I merge to master

there is also a hosted instance you can try out

from rss-to-telegram-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.