Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session Data Not Removed After Purging Checkbox Packages #1521

Open
mauriciocoder opened this issue Oct 1, 2024 · 2 comments
Open

Session Data Not Removed After Purging Checkbox Packages #1521

mauriciocoder opened this issue Oct 1, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@mauriciocoder
Copy link
Contributor

Enhancement Proposal

Description:

I encountered an issue with the Checkbox application where session data persisted even after purging the Checkbox Snap packages. After executing the following command to purge the packages:

sudo snap remove --purge checkbox checkbox22

I noticed that the session data in the directory /var/tmp/checkbox-ng was not removed. This led to complications when attempting to launch the Checkbox CLI, as the status of previously executed jobs remained in an "unsupported" state.

When I tried to run the Checkbox CLI with the command:

$ checkbox.checkbox-cli

I received the following output:

$PROVIDERPATH is defined, so following provider sources are ignored ['/home/mauricio/.local/share/plainbox-providers-1', '/var/tmp/checkbox-providers-develop'] 
WARNING:plainbox.secure.providers.v1:Skipped file: /snap/checkbox22/current/providers/checkbox-provider-base/units/stress/suspend_cycles_reboot.md
Failed to disable unit: Unit file plainbox-autostart.service does not exist.
rm: cannot remove '/etc/systemd/system/plainbox-autostart.service': No such file or directory
Failed to disable unit: Unit file plainbox-autostart.service does not exist.
rm: cannot remove '/etc/systemd/system/plainbox-autostart.service': No such file or directory
Traceback (most recent call last):
  File "/snap/checkbox22/current/bin/checkbox-cli", line 8, in <module>
    sys.exit(main())
  File "/snap/checkbox22/current/lib/python3.10/site-packages/checkbox_ng/launcher/checkbox_cli.py", line 166, in main
    return subcmd.invoked(ctx)
  File "/snap/checkbox22/current/lib/python3.10/site-packages/checkbox_ng/launcher/subcommands.py", line 257, in invoked
    if not self._auto_resume_session(self.resume_candidates):
  File "/snap/checkbox22/current/lib/python3.10/site-packages/checkbox_ng/launcher/subcommands.py", line 425, in _auto_resume_session
    self._resume_session(last_session.id, None)
  File "/snap/checkbox22/current/lib/python3.10/site-packages/checkbox_ng/launcher/subcommands.py", line 597, in _resume_session
    raise ValueError(
ValueError: Unsupported outcome for resume not-supported

Despite purging and reinstalling the packages, the problem persisted. Upon investigating the source code, I discovered that Plainbox retains session data in /var/tmp/checkbox-ng. I manually removed the session data from this directory, and after doing so, the Checkbox CLI functioned as expected.

Expected Behavior:

  • When a user purges the Checkbox packages, all associated session data should be removed automatically, preventing issues when reinstalling and launching the CLI.

Steps to Reproduce:

  1. Install the Checkbox Snap package.
  2. Execute a few jobs within Checkbox.
  3. Purge the Checkbox package using sudo snap remove --purge checkbox checkbox22.
  4. Reinstall Checkbox.
  5. Attempt to launch the Checkbox CLI with checkbox.checkbox-cli.

Additional Information:

Thank you for looking into this issue!

@mauriciocoder mauriciocoder added the enhancement New feature or request label Oct 1, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1599.

This message was autogenerated

@mauriciocoder
Copy link
Contributor Author

It would be helpful to have a solution for the "unsupported" job status when launching checkbox-cli. Perhaps invalidating the previous session and starting a new one could resolve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant