-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Update cron.py #40003
Update cron.py #40003
Conversation
If the line that we need to insert already exists but the number of BLANKs that separate the fields is different from the new line, a duplicated line will be inserted.
The test
The test
|
modified for PEP 8 style guideline compliance
The test
The test
|
@Loreton Your branch does not contain a shippable.yml file. Please rebase your branch to trigger running of current tests. |
@Loreton Your branch does not contain a shippable.yml file. Please rebase your branch to trigger running of current tests. |
@Loreton Will you be able to still work on this PR? |
I'm sorry but I discarded ansible environment and at this moment I cannot
run any test.
If you need info and tests are not necessary, please ask me and I'll try to
answer.
Regards
Loreto
Il mar 3 set 2019, 13:03 John R Barker <notifications@github.com> ha
scritto:
… @Loreton <https://github.com/Loreton> Will you be able to still work on
this PR?
needs_info
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#40003?email_source=notifications&email_token=ABL47GFEZLCRJL6KKS4QXSTQHZAAPA5CNFSM4E7MPDR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5X2MQI#issuecomment-527410753>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABL47GFP2QFDHDCK4VMNT43QHZAAPANCNFSM4E7MPDRQ>
.
|
@Loreton Thank you for your comment. I think we'd need tests for this, which I understand you don't have time for at the moment, which is OK. Therefore I'll close this PR. A new PR in the future that includes integrations tests would be welcome. |
[Please refer to PR #39954]
If the line that we need to insert already exists but the number of BLANKs that separate the fields is different from the new line, a duplicated line will be inserted.
SUMMARY
Try to find out if a row already exists ignoring the number of BLANKs that separate the individual fields. If the entry already exists, the job name will be inserted.
To do that extra BLANKs inside new_line and old_line are removed before comparing them.
I tested it with a classical entry and with a special_time "@reboot" entry.
ISSUE TYPE
COMPONENT NAME
cron.py
ANSIBLE VERSION
ADDITIONAL INFORMATION