Skip to content

Custom Installer option is limited by 100 chars #70

@joe-speedboat

Description

@joe-speedboat

Describe the bug
Installer switches custom are to small (100 chars)
It seems that the field in DB is limited, a manual workaround got tested, but it would be nice to get it fixed in app as well.

thanks chris

To Reproduce
Steps to reproduce the behavior:

  1. Packages > Package XY > Edit
  2. Versions > Version n.n.n > Expand
  3. Installers > x64 > Edit
  4. Custom: insert-param-longer-than-100-chars-will-lead-to-error-123456789012345678901234567890123456789012345678901234567890
  5. Update > Print Error
  • Container log
sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (pymysql.err.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: UPDATE installer_switch SET value=%(value)s WHERE installer_switch.id = %(installer_switch_id)s]
[parameters: {'value': "/S /V /qn IKEY=DIHCRESX9C9DFPOISIJD SKEY=ReH046DeFyBgAbRzVozIN5nzLVEaGlHmILWY poercccccc cccc123@'# asdfasdfasdfs", 'installer_switch_id': 2}]
(Background on this error at: https://sqlalche.me/e/20/9h9h) (Background on this error at: https://sqlalche.me/e/20/7s2a)

Expected behavior
It must save the custom value

Web Container log

sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (pymysql.err.DataError) (1406, "Data too long for column 'value' at row 1")
[SQL: UPDATE installer_switch SET value=%(value)s WHERE installer_switch.id = %(installer_switch_id)s]
[parameters: {'value': "/S /V /qn IKEY=DIHCRESX9C9DFPOISIJD SKEY=ReH046DeFyBgAbRzVozIN5nzLVEaGlHmILWY poercccccc cccc123@'# asdfasdfasdfs", 'installer_switch_id': 2}]
(Background on this error at: https://sqlalche.me/e/20/9h9h) (Background on this error at: https://sqlalche.me/e/20/7s2a)

app details

[root@srv-pk3s03-01 ~]# kubectl get pods -o yaml | grep image: | sort -u
      image: docker.io/library/mysql:8.0
      image: ghcr.io/thilojaeggi/wingetty:stable
      image: mysql:8.0

manual fix

mysql> desc installer_switch;
+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| id           | int          | NO   | PRI | NULL    | auto_increment |
| installer_id | int          | YES  | MUL | NULL    |                |
| parameter    | varchar(20)  | YES  |     | NULL    |                |
| value        | varchar(100) | YES  |     | NULL    |                |
+--------------+--------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)

mysql> ALTER TABLE installer_switch MODIFY COLUMN value VARCHAR(512);
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> desc installer_switch;
+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| id           | int          | NO   | PRI | NULL    | auto_increment |
| installer_id | int          | YES  | MUL | NULL    |                |
| parameter    | varchar(20)  | YES  |     | NULL    |                |
| value        | varchar(512) | YES  |     | NULL    |                |
+--------------+--------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions