Skip to content

Unable to use --clean-team and --keep-months option together #76

@arjunvc

Description

@arjunvc

testarchiver --dont-require-ssl --clean-team DEV --keep-months 6 --no-keywords --no-keyword-stats --ignore-logs-below INFO --config db_config.json --format robotframework --team DEV --series "12345#$CI_JOB_ID" --metadata Application:ABC grafana_final.xml

`
Parsing: 'grafana_final.xml'
Cleaning archived data by the following parameters:

  • Keeping results archived within 6 months
  • Only cleaning results from team: 'DEV'
    Cleaning test runs from history
    Traceback (most recent call last):
    File "/usr/local/bin/testarchiver", line 8, in
    sys.exit(main())
    File "/usr/local/lib/python3.8/dist-packages/test_archiver/output_parser.py", line 863, in main
    database.run_history_cleaning(connection, config)
    File "/usr/local/lib/python3.8/dist-packages/test_archiver/database.py", line 612, in run_history_cleaning
    connection.delete_history(config.clean_team, config.keep_builds, config.keep_months, config.keep_after,
    File "/usr/local/lib/python3.8/dist-packages/test_archiver/database.py", line 293, in delete_history
    self.delete('test_run', values, where_query='WHERE id IN ({})'.format(ids_query))
    File "/usr/local/lib/python3.8/dist-packages/test_archiver/database.py", line 457, in delete
    self._execute(sql, values)
    File "/usr/local/lib/python3.8/dist-packages/test_archiver/database.py", line 160, in _execute
    cursor.execute(sql, values)
    TypeError: not all arguments converted during string formatting`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions