Bug 38424 - Upgrade redocly/cli to the latest release
Summary: Upgrade redocly/cli to the latest release
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 13:44 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2024-12-05 23:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 38424: Upgrade redoclyly/cli version to latest stable (58.43 KB, patch)
2024-11-12 14:04 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 38424: Upgrade redoclyly/cli version to latest stable (2.68 KB, patch)
2024-11-19 13:05 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi (tcohen) 2024-11-12 13:44:21 UTC
While not critical, our used version is dated and we keep getting warnings about it when `reset_all` is run or at `KTD` startup time.

https://github.com/Redocly/redocly-cli/releases
Comment 1 Tomás Cohen Arazi (tcohen) 2024-11-12 14:04:02 UTC
Created attachment 174414 [details] [review]
Bug 38424: Upgrade redoclyly/cli version to latest stable

This patch updates the used version of redocly/cli to the latest stable.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
=> FAIL: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json

    ╔════════════════════════════════════════════════════════╗
    ║                                                        ║
    ║  A new version of Redocly CLI (1.25.11) is available.  ║
    ║  Update now: `npm i -g @redocly/cli@latest`.           ║
    ║  Changelog: https://redocly.com/docs/cli/changelog/    ║
    ║                                                        ║
    ╚════════════════════════════════════════════════════════╝

bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 207ms.
Done in 1.34s.
```

3. Apply this patch
4. Run:
  k$ sudo yarn install --modules-folder /kohadevbox/node_modules
5. Repeat 2:
=> SUCCESS: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 200ms.
Done in 1.29s.
```

6. Restart plack and check the API loads without issues:
  k$ koha-plack --restart kohadev;  tail -f /var/log/koha/kohadev/*.log
7. Run the tests:
  k$ prove -r t/db_dependent/api/
=> SUCCESS: No failures
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2024-11-19 13:01:49 UTC
yarn.lock should be generated by RM.
Comment 3 Jonathan Druart 2024-11-19 13:05:27 UTC
Created attachment 174789 [details] [review]
Bug 38424: Upgrade redoclyly/cli version to latest stable

This patch updates the used version of redocly/cli to the latest stable.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
=> FAIL: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json

    ╔════════════════════════════════════════════════════════╗
    ║                                                        ║
    ║  A new version of Redocly CLI (1.25.11) is available.  ║
    ║  Update now: `npm i -g @redocly/cli@latest`.           ║
    ║  Changelog: https://redocly.com/docs/cli/changelog/    ║
    ║                                                        ║
    ╚════════════════════════════════════════════════════════╝

bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 207ms.
Done in 1.34s.
```

3. Apply this patch
4. Run:
  k$ sudo yarn install --modules-folder /kohadevbox/node_modules
5. Repeat 2:
=> SUCCESS: You get

```
yarn run v1.22.22
$ redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json
bundling api/v1/swagger/swagger.yaml...
📦 Created a bundle for api/v1/swagger/swagger.yaml at api/v1/swagger/swagger_bundle.json 200ms.
Done in 1.29s.
```

6. Restart plack and check the API loads without issues:
  k$ koha-plack --restart kohadev;  tail -f /var/log/koha/kohadev/*.log
7. Run the tests:
  k$ prove -r t/db_dependent/api/
=> SUCCESS: No failures
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2024-11-19 13:05:36 UTC
RM: generate yarn.lock and ask for ktd rebuild when this is pushed.
Comment 5 Katrin Fischer 2024-11-19 16:07:50 UTC
(In reply to Jonathan Druart from comment #4)
> RM: generate yarn.lock and ask for ktd rebuild when this is pushed.

OK, I need a little help here as I didn't find it in documentation:

https://wiki.koha-community.org/wiki/Release_management#Yarn

How do I rebuild the yarn.lock?

* Tried yarn build with no result.
* Tried yarn install, which created a yarn.lock file. 

Is this the correct way?

Please catch me on Mattermost so we can schedule push/ktd rebuild.
Comment 6 Katrin Fischer 2024-11-20 10:36:54 UTC
Pushed for 24.11!

Well done everyone, thank you!