Bug 48478 - rename recordUID to record_uid and sourceUID to source_uid
rename recordUID to record_uid and sourceUID to source_uid
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v1
Assigned To: Daniel Tröder
Ole Schwiegert
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-16 11:34 CET by Daniel Tröder
Modified: 2019-03-12 10:50 CET (History)
3 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?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): API change
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 2019-01-16 11:34:37 CET
To be more consistent with other variable names, the configuration key "scheme:recordUID" should be renamed to "scheme:record_uid".
The method "ImportUser.make_recordUID()" should be renamed to "ImportUser.make_record_uid()".

To be more consistent with other variable names, the configuration key "sourceUID" and its associated command line argument "--sourceUID" should be renamed to "source_uid" and "--source_uid" respectively.
The method "ImportUser.make_sourceUID()" shoudl be renamed to "ImportUser.make_source_uid()".

This is a breaking change!
Comment 1 Daniel Tröder univentionstaff 2019-01-16 16:22:51 CET
Documentation, code and tests have been adapted and an entry added to the changelog.

[4.4] 432819479 Bug #48478: documentation of rename of recordUID to record_uid and sourceUID to source_uid
[4.4] 709a12112 Bug #48478: rename recordUID to record_uid and sourceUID to source_uid
[4.4] bba3489bd Bug #48478: adapt tests to rename of recordUID to record_uid and sourceUID to source_uid
[4.4] 6c2602862 Bug #48478: advisory

ucs-school-import (17.1.0-1)
ucs-test-ucsschool (6.0.0-5)
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2019-01-17 11:01:16 CET
(In reply to Daniel Tröder from comment #0)
> To be more consistent with other variable names, the configuration key
> "scheme:recordUID" should be renamed to "scheme:record_uid".

Yes. I think this change can be easily done by all customers.

> The method "ImportUser.make_recordUID()" should be renamed to
> "ImportUser.make_record_uid()".

→ What about providing both names for some time, to not break all customer code 
  extensions?
→ ImportUser.make_recordUID = ImportUser.make_record_uid

> To be more consistent with other variable names, the configuration key
> "sourceUID" and its associated command line argument "--sourceUID" should be
> renamed to "source_uid" and "--source_uid" respectively.

→ what about accepting the both CLI option for some time, but only document the 
  new one? Also --help should only output the new one.

> The method "ImportUser.make_sourceUID()" shoudl be renamed to
> "ImportUser.make_source_uid()".

Same request here. See above.
Comment 3 Daniel Tröder univentionstaff 2019-01-17 13:41:41 CET
Originally I did that (make_recordUID = make_record_uid), but decided that it's better to break code now (with the change to 4.4), than later.

If we keep backwards compatible options/methods, users won't change their code and will then crash with 4.4 v2, a point release.
IHMO better to have them crash now, as they are aware that they must test everything thoroughly.
Comment 4 Daniel Tröder univentionstaff 2019-01-17 15:48:47 CET
We decided to make a hard break in 4.4 and add a deprecation warning to the 4.3v7 release notes.
Comment 5 Daniel Tröder univentionstaff 2019-01-17 17:44:29 CET
The UCS@school import will support in UCS@school 4.3v7 the use of record_uid and source_uid.

Breaking changes have been added to the changelog for 4.3v7 in doc/changelog/changelog-draft-for-4.3v7.xml.

[4.3] 689944a07 Bug #48478: allow forward compatible use of record_uid and source_uid
[4.3] 2f6a512d9 Bug #48478: advisory

ucs-school-import (16.0.2-67)
Comment 6 Ole Schwiegert univentionstaff 2019-02-04 09:32:31 CET
Advisory & Changelog: OK
Package installs: OK
Notion in Release Notes of 4.3v7: OK
Function alternate names present: OK
Configuration works with alternate name (including conflict handling): OK

To not forget this at a later point and to introduce the new name, the configuration hint of the ucs-school-testuser-import script should be adapted as well.

We also might want to adapt the manual found here https://billy.knut.univention.de/~dtroeder/http-api-doc/test-data.html?highlight=sourceuid
Comment 7 Daniel Tröder univentionstaff 2019-02-11 15:39:28 CET
(In reply to Ole Schwiegert from comment #6)
> Advisory & Changelog: OK
> Package installs: OK
> Notion in Release Notes of 4.3v7: OK
> Function alternate names present: OK
> Configuration works with alternate name (including conflict handling): OK
> 
> To not forget this at a later point and to introduce the new name, the
> configuration hint of the ucs-school-testuser-import script should be
> adapted as well.
>
> We also might want to adapt the manual found here
> https://billy.knut.univention.de/~dtroeder/http-api-doc/test-data.
> html?highlight=sourceuid

This was already done for 4.4 in:
[4.4] 709a12112 Bug #48478: rename recordUID to record_uid and sourceUID to source_uid
I don't think we should change the documentation (including help texts) in 4.3.

I have updated the online version on billy.

I improved the documentation build process to not produce tracebacks for import errors in case the import code is already installed. I didn't rebuild the package for that change:

[4.4 59834bf78] Bug #48478: improve documentation build process
Comment 8 Daniel Tröder univentionstaff 2019-02-11 16:15:36 CET
[4.4 54048a300] Bug #48478: fix doc build
[4.4 c0e168be3] Bug #48478: version bump
Comment 9 Ole Schwiegert univentionstaff 2019-02-18 08:53:57 CET
Works for me
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2019-03-12 10:50:30 CET
UCS@school 4.3 v7 has been released.

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

If this error occurs again, please clone this bug.