Commit Graph

12 Commits

Author SHA1 Message Date
Marc Wrobel
0ec53675bf Fix update.py
Omit success check for the revert, as it resulted in failures for files that didn't exist.
2024-02-19 21:33:55 +01:00
Marc Wrobel
9cf243a10e Fix scripts requiring rendering pages with javascript (#310)
Replace request_html by playwright, as request_html, as it is [not maintained anymore](https://pypi.org/project/requests-html/) and scripts using it, such as artifactory.py, started to fail.
2024-02-16 23:13:42 +01:00
Marc Wrobel
b6f14c8d61 Support release-level data (#297)
Support retrieving and updating generic release-level data, such as support and eol dates. The JSON format has been changed accordingly to add a new top-level `releases` key.

The `aws-lambda.py` script has been updated to make use of this new feature.
2024-02-11 16:57:59 +01:00
Marc Wrobel
a0ba2d687e Improve scripts execution orchestration (#299)
Until now products could declare multiple auto-update methods, but they all had to be of the same kind.
For example if you used the git auto-update method, you could not use an additional github_releases or custom auto-update method.
This is an issue as it prevents us to extend the auto-update process, for example by having a product using the 'git' auto-update method to retrieve all the versions, and a custom script to retrieve support and EOL dates.

This improve the scripts execution orchestration to be able to support auto configurations using a mix of methods, meaning:

- multiple kind of methods, such as git and github_release,
- or multiple custom methods.

A side-effect of those changes is that now a failure in a generic script does not cancel the update of subsequent products.

Another side-effect, unwanted this time, is that now custom scripts managing multiple products, such as apple.py, are now executed multiple times instead of once.
2024-02-11 15:28:26 +01:00
Marc Wrobel
0e0e227875 Order scripts by execution duration in GHA summary (#293) 2024-02-04 15:02:08 +01:00
Marc Wrobel
42165ea287 Preserve all version fields (#286)
Up to now extra version fields were ignored: only name and date fields were accepted. This changes that by retaining the full JSON data when reading the file, making it possible in the future to support custom fields.

This also fixes a bug with versions having released on the same date: they was not ordered as expected (reverse order).
2024-01-28 23:46:41 +01:00
Marc Wrobel
74678a75c3 Update release-data JSON file format (#274)
This makes the format open for extension, such as adding release cycle level data (such as EOL dates).

Version data is still accessible by the version's name. While this repeats the version name, it's also much more convenient for users of those data.

A few other things have also been updated in the process:

- verbosity of the diff has been increased in update.py to make workflow summaries more readable,
- dates without timezone are now set to UTC by default (this was already supposed, so no impact expected here).
2024-01-02 11:42:10 +01:00
Marc Wrobel
7a97c87b3b Refactor latest.py and update.py (#270)
- create new gha.py module,
- improve GitHub workflow commands (GITHUB_OUTPUT, GITHUB_STEP_SUMMARY) interactions,
- improve logging,
- split update.py into smaller functions.
2023-12-31 00:45:30 +01:00
Marc Wrobel
47e29992ae Enable flake8-use-pathlib linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth.
2023-12-30 14:29:24 +01:00
Marc Wrobel
f49e3dff15 Enable flake8-annotations linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-annotations-ann.
2023-12-30 14:29:24 +01:00
Marc Wrobel
6002cbdb26 Enable isort linting rules (#267)
See https://docs.astral.sh/ruff/rules/#isort-i.
2023-12-30 14:29:24 +01:00
Marc Wrobel
86860715ab Rewrite update.py to Python (#263)
Reasons were:

- one language make it easier for maintenance,
- workflow simplification,
- not stopping when a script fails anymore (it's better to have a partial update than nothing),
- use `GITHUB_OUTPUT` instead of the deprecated `set-output` command,
- display a workflow summary with statistics about scripts and information about updated products.

The commit message is not as good as it used to be, but it makes the diff process agnostic from the file format (will be needed soon when it will change), and it handles versions updates / removal, which was not supported by the previous script.
2023-12-30 00:07:22 +01:00