Bug 24397 - populate_db.pl is out of sync and must be removed
Summary: populate_db.pl is out of sync and must be removed
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 10337
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-10 13:16 UTC by Jonathan Druart
Modified: 2021-06-14 21:29 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03


Attachments
Bug 24397: Remove out of sync script populate_db.pl (6.36 KB, patch)
2020-01-10 13:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24397: Remove out of sync script populate_db.pl (6.41 KB, patch)
2020-01-11 09:01 UTC, David Nind
Details | Diff | Splinter Review
Bug 24397: Remove out of sync script populate_db.pl (6.50 KB, patch)
2020-01-22 12:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2020-01-10 13:16:50 UTC
populate_db.pl from koha-misc4dev must be used instead.
This script existed before the creation of koha-misc4dev, it does no longer make sense to have it in Koha.
Comment 1 Jonathan Druart 2020-01-10 13:17:48 UTC
Created attachment 97199 [details] [review]
Bug 24397: Remove out of sync script populate_db.pl

populate_db.pl from koha-misc4dev must be used instead.
This script existed before the creation of koha-misc4dev, it does no
longer make sense to have it in Koha.
Comment 2 David Nind 2020-01-11 09:01:17 UTC
Created attachment 97238 [details] [review]
Bug 24397: Remove out of sync script populate_db.pl

populate_db.pl from koha-misc4dev must be used instead.
This script existed before the creation of koha-misc4dev, it does no
longer make sense to have it in Koha.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2020-01-17 09:19:36 UTC
Removing it is easy and I understand the argument. But we could discuss if the statement "koha-misc4dev must be used instead" has full consensus.

How do we make sure that it is in sync and that it meets our coding guidelines etc? It is easier to grep one git repo than two?

The reason for putting it outside Koha probably relates to the tedious process of getting things signed off and pushed in Koha mainstream. Somehow we do not manage as community to get that more smoothly. But I still think we should address that and not just move code somewhere else.

As an alternative approach, should we copy this script (or even more) at release time into the codebase? Formulate some procedure to sync them?

Any opinions?
@Katrin: could you include this in the weekly QA mail?
Comment 4 Katrin Fischer 2020-01-19 23:16:26 UTC
> Any opinions?
> @Katrin: could you include this in the weekly QA mail?

Will do.
Comment 5 Jonathan Druart 2020-01-21 10:11:03 UTC
(In reply to Marcel de Rooy from comment #3)
> Removing it is easy and I understand the argument. But we could discuss if
> the statement "koha-misc4dev must be used instead" has full consensus.

Maybe a bit of history was needed. I submitted koha:populate_db.pl to have an handy script, but then realized that our process (SO+QA+push) was too slow to get things pushed quickly. So I created misc4dev and copied the script there, along with a lot of other stuffs for Koha devs.
The things is that koha-misc4dev is now used by the sandbox and jenkins (koha-testing-docker), and so we need a super fast reactivity when something is broken there, and we now it's broken as the CI is failing in that case.
I am the one who usually fix it

https://gitlab.com/koha-community/koha-misc4dev/commits/master

Most of the time the change is minor and trivial.

> How do we make sure that it is in sync and that it meets our coding
> guidelines etc? It is easier to grep one git repo than two?

Those scripts cannot be part of Koha, as I said previously we need a fast push and cannot wait for review. I ask for review when I am adding new enhancements (and in that cases it usually takes several weeks).

> The reason for putting it outside Koha probably relates to the tedious
> process of getting things signed off and pushed in Koha mainstream. Somehow
> we do not manage as community to get that more smoothly. But I still think
> we should address that and not just move code somewhere else.

How? :)

> As an alternative approach, should we copy this script (or even more) at
> release time into the codebase? Formulate some procedure to sync them?

Nope, the script will be broken during the release cycle, and so the script will become obsolete.
Comment 6 Katrin Fischer 2020-01-21 10:17:24 UTC
As this is intended for developers and dev scripts tend to be able to do 'dangeorus things' I am fully ok with keeping them separate from the scripts in the release.
Comment 7 Martin Renvoize 2020-01-21 15:33:55 UTC
It really is a Dev only script so I feel it indeed belongs in its own place.

Happy for it to be removed from Koha's core repo.

I think the Dev tools do get enough exposure living in misc4dev
Comment 8 Marcel de Rooy 2020-01-22 12:40:42 UTC
Created attachment 97705 [details] [review]
Bug 24397: Remove out of sync script populate_db.pl

populate_db.pl from koha-misc4dev must be used instead.
This script existed before the creation of koha-misc4dev, it does no
longer make sense to have it in Koha.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Martin Renvoize 2020-01-23 09:10:58 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 10 Joy Nelson 2020-02-06 23:04:27 UTC
Pushed to 19.11.x for 19.11.03