~txiao/charm-logrotated:handle_unset

Last commit made on 2023-04-17
Get this branch:
git clone -b handle_unset https://git.launchpad.net/~txiao/charm-logrotated
Only Tianqi Xiao can upload to this branch. If you are Tianqi Xiao please log in for upload directions.

Branch merges

Branch information

Name:
handle_unset
Repository:
lp:~txiao/charm-logrotated

Recent commits

8746e27... by Tianqi Xiao

Handle "unset" value of update-cron-daily-schedule and fix workload status logic

Previously, validating "unset" value would result in silent error because:
1. the con_mapping in CronHelper.validate_cron_conf() doesn't contain "unset" key
which leads to an attemption of concatenating str with NoneType
2. wrongly checking index 0 of a str instead of list for self.cron_daily_schedule
in CronHelper.install_cronjob()
3. wrong logic for setting status in install and config_changed hook, which means
the workload status always end up as active even when exceptions are raised
4. didn't set workload status to blocked when executing cronjob.

This commit fixes the above mentioned issues and added related unit tests.
Additionally, more logs are added to provide extra information.

8d04a63... by Gabriel Cocenza

Pin libjuju to make it compatible with controllers <3.0

Reviewed-on: https://code.launchpad.net/~gabrielcocenza/charm-logrotated/+git/charm-logrotated/+merge/440354
Reviewed-by: Martin Kalcok <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Ramesh Sattaru <email address hidden>

8397fc5... by Gabriel Cocenza

Pin libjuju to make it compatible with controllers <3.0

8ac7c44... by Kamal Bhaskar

Reschedule cron.daily jobs to non-default/random timings. LP #1998895. Updated cron update logic using regex.

Reviewed-on: https://code.launchpad.net/~llama-charmers/charm-logrotated/+git/charm-logrotated/+merge/435334
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>
Reviewed-by: Tianqi Xiao <email address hidden>

e0aada5... by Sudeep Bhandari

- Dropped Xenial support
- Fixed build issue in bionic

Fixes bug: #2003232

Reviewed-on: https://code.launchpad.net/~sudeephb/charm-logrotated/+git/charm-logrotated/+merge/436116
Reviewed-by: Ramesh Sattaru <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Martin Kalcok <email address hidden>

26a61a1... by Sudeep Bhandari

Drop Xenial support, fix build issue in bionic

cc2ae8d... by Kamal Bhaskar

updated unittests as per suggestions

4f13db4... by Kamal Bhaskar

added unit tests for methods validate_cron_conf and update_cron_daily_schedule

ac97a34... by Kamal Bhaskar

refactored validate_cron_conf to reduce complexity

df57874... by Kamal Bhaskar

added functional tests for feature update-cron-daily-schedule