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

Add --debug checkbox to BiT GUI for cron jobs #1616

Closed
aryoda opened this issue Jan 23, 2024 · 3 comments · Fixed by #1681
Closed

Add --debug checkbox to BiT GUI for cron jobs #1616

aryoda opened this issue Jan 23, 2024 · 3 comments · Fixed by #1681
Assignees
Labels
Feature requests a new feature HELP-WANTED Used by 24pullrequests.com to suggest issues

Comments

@aryoda
Copy link
Contributor

aryoda commented Jan 23, 2024

Currently to create debug output in case of problems the user must manually edit the crontab file via

Use sudo crontab -e and add --debug to the backintime job entries (move cursor after backintime and insert --debug - this is vi so press i to enter the edit mode, after editting press ESC then :wq to save the changes...

and this change will be overwritten again if the profile is edited in the GUI.

For better usability add a checkbox into the General > Schedule block

[x] Enable logging of debug messages

with a tooltip text

Write debug-level messages into the system log. Warning: Use only to diagnose problems since it creates a lot of output

@aryoda aryoda added the Feature requests a new feature label Jan 23, 2024
@buhtz buhtz added this to the Upcoming release (1.5.0) milestone Feb 1, 2024
@buhtz buhtz added the HELP-WANTED Used by 24pullrequests.com to suggest issues label Feb 16, 2024
@stcksmsh
Copy link
Contributor

stcksmsh commented Apr 8, 2024

I believe to have solved this, I have made a local branch for my changes as is described in CONTRIBUTING.md but I can't push it. I will summarize my changes below:

  • Common:
    1. Added debugSchedule an setDebugSchedule methods to config
    2. Added or self.debugSchedule() to config::cronCmd in the condition for appending '--debug' to the command
  • QT:
    1. Added QCheckBox to SettingsDialog::__init__
    2. Added necessary code to SettingsDialog::updateProfile and SettingsDialog::saveProfile to save anr update the state of config.debugSchedule

How should I proceed further?

@buhtz
Copy link
Member

buhtz commented Apr 8, 2024

I Kosta, great to hear.

It seems we can improve the CONTRIBUTING.md because the clone/fork step is missing in the description. Looking into your repository list at GitHub it seems you have not forked backintime. Do I assuming it correct that you git clone from bit-team/backintime?

Keep your current local copy with your modifications. Don't delete it.

First you have to "fork" bit-team/backintime. On our landing page you do find a "fork" button.
image

After this process is finished you will have your own backintime repo. https://github.com/stcksmsh/backintime
Now you clone your remote repo to your local machine via $ git clone [email protected]:stcksmsh/backintime.git. Don't overwrite your first local repo. Just keep them side by side.
Now you can proceed further with the steps described in the CONTRIBUTING.md. Create your own branch (git checkout --branch fix/1616debug) is important.

Now you decide yourself. You can try using some git magic to merge the modifications from your frist local repo into your new one. Or you just copy and paste the py files from one to another. For the beginning I would suggest to just copy and paste the modified py files.

If all modifications are commited you do git push and follow the instructions of git will give you. Git always give kind of warning when doing the first push on a new branch.

Then go to https://github.com/stcksmsh/backintime and you might see a colored box in the beginning mention the new pushed branch and suggesting to open a PR.

Feel free to ask back.

stcksmsh added a commit to stcksmsh/backintime that referenced this issue Apr 8, 2024
…t and the necessary code to common to make it work.

Fixes  bit-team#1616
@stcksmsh
Copy link
Contributor

stcksmsh commented Apr 8, 2024

Thank you for the help, I have now created a pull request. If there is anything more I should do please let me know. In regards to the CONTRIBUTING.md, I did not create any new tests, since I did not know exactly how to do so, but if needed I would learn (I am going to have to eventually anyway...) and make them.

buhtz added a commit that referenced this issue May 13, 2024
Activate debug output in schedule settings.

Breaking Change: GUI started with --debug does no longer add --debug to the crontab for scheduled profiles by default.

Additionally some refactoring and also pylint tweaks.

Thanks to Kosta Vukicevic (@stcksmsh) for submitting this PR.

Close #1616
---------

Co-authored-by: Christian Buhtz <[email protected]>
Co-authored-by: aryoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature requests a new feature HELP-WANTED Used by 24pullrequests.com to suggest issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants