Bug 54118 - after an error, dry-run raises VaidationError for all subsequent users
after an error, dry-run raises VaidationError for all subsequent users
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v3
Assigned To: Fabian Wilhelm
Johannes Keiser
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-22 15:06 CET by Tobias Wenzel
Modified: 2022-08-04 18:35 CEST (History)
6 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.103
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2021112221000118
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wenzel univentionstaff 2021-11-22 15:06:34 CET
When the import is run with the import config option tolerate_errors > 0  in the dry-run, "empty errors" are raised if any error happens before.


e.g.

Entry #0: ValidationError when adding ImportTeacher(name='demo.teacher1', school=DEMOSCHOOL', dn='uid=demo.teacher1,cn=lehrer,...', old_dn=None) (source_uid:csv-teacher record_uid: ...): {} ValidationError({},)



This happens in add + modify in

ucs-school-import/modules/ucsschool/importer/mass_import/user_import.py

if self.errors:
    raise ValidationError(user.errors.copy())


should be

if user.errors:
    raise ValidationError(user.errors.copy())
Comment 2 Fabian Wilhelm univentionstaff 2022-05-24 09:07:15 CEST
ucs-school-import (18.0.15)
cae123719efb | Bug #54118: fix dry-run raises VaidationError
Comment 3 Tobias Wenzel univentionstaff 2022-07-12 15:28:43 CEST
Changed target milestone to 5.0 v2 errata.
Comment 4 Fabian Wilhelm univentionstaff 2022-07-18 16:21:55 CEST
6b66acadb Bug #54118: add ucs-test-ucsschool changelog
a0d5e3e6f Bug #54118: advisory add version
2b087ba2e Bug #54118: advisory and changelog
124510d9c Bug #54118: fix dry-run raises VaidationError
Comment 6 Felix Botner univentionstaff 2022-07-20 15:58:35 CEST
OK - merged
OK - ucs-school-import.yaml
OK - 18.0.18A~5.0.0.202207191615
OK - jenkins
Comment 7 Jürn Brodersen univentionstaff 2022-08-04 18:35:50 CEST
UCS@school 5.0 v3 has been released.

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

If this error occurs again, please clone this bug.