Bug 46572 - 4.3/school-import: checks are not executed in dry-run
4.3/school-import: checks are not executed in dry-run
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.3
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v3
Assigned To: Daniel Tröder
Jürn Brodersen
:
Depends on: 46571
Blocks: 46924
  Show dependency treegraph
 
Reported: 2018-03-09 14:06 CET by Daniel Tröder
Modified: 2018-06-04 15:27 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2018-03-09 14:06:42 CET
+++ This bug was initially created as a clone of Bug #46571 +++

Because of Bug #46317, the method ImportUser.run_checks() is not executed in a dry-run anymore.

Add explicit run_checks() calls to UserImport in the dry-run branches.
Comment 1 Daniel Tröder univentionstaff 2018-03-23 14:41:11 CET
The checks are run after pre_{create,modify,move}() and before and modification to the underlying UDM object.

A test was added to verify that: 231_import-users_checks_in_dry-run

[4.3] 9365d813 Bug #46572: do checks in dry-run, run them after pre-hooks and before changes to the underlying UDM object
[4.3] 95a7f2ff Bug #46572: handle TypeError
[4.3] 9dc0f443 Bug #46572: changelog
[4.3] 12f3f497 Bug #46572: add test to verify checks are executed in dry-run
[4.3] bad89ceb Bug #46572: trigger early check for move(), not late for modfiy()
[4.3] a50d1153 Bug #46572: cleanup: test lib learned to handle birthday property itself
[4.3] 146b2799 Bug #46572: changelog

ucs-school-import (16.0.1-10)
ucs-test-ucsschool (5.0.2-28)

bad89ceb should have been labeled for Bug #46462.
Comment 2 Daniel Tröder univentionstaff 2018-03-27 16:41:17 CEST
[4.3] 1b87519a Bug #46572: do not run checks from within hook
[4.3] b70a1cfc Bug #46572: changelog
[4.3] cc88c8d0 Bug #46572: handle different names
[4.3] 81f41767 Bug #46572: changelog
[4.3] 8ea6bc25 Bug #46572: advisory

ucs-school-import (16.0.1-12)
ucs-test-ucsschool (5.0.2-31)
Comment 3 Jürn Brodersen univentionstaff 2018-04-03 17:15:35 CEST
Reopen:
Same as bug 46571 comment 5
Comment 4 Daniel Tröder univentionstaff 2018-04-04 13:20:01 CEST
Fixed test revealed the missing update of the uniqueness storage.

[4.3] 73a29f79 Bug #46572: change DN in uniqueness store also in dry-run
[4.3] 988ae428 Bug #46572: modify classes in school change
[4.3] 89446acb Bug #46572: use real OU in move() test
[4.3] 8cedf175 Bug #46572: changelog
[4.3] 54332a95 Bug #46572: advisory update

ucs-school-import (16.0.1-14)
ucs-test-ucsschool (5.0.2-35)
Comment 5 Jürn Brodersen univentionstaff 2018-04-06 13:53:41 CEST
Looks good now :)
Test runs successfully -> OK
YAML -> OK

-> Verified
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2018-05-02 17:59:04 CEST
UCS@school 4.3 v3 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v3-de.html

If this error occurs again, please clone this bug.