Commit Graph

62 Commits

Author SHA1 Message Date
Marc Wrobel
3f65ff9d9e [update-product-data] Allow disabling auto configuration (#482) 2025-08-02 15:01:47 +02:00
Marc Wrobel
e1e93dc841 [motorola-security] Add auto method (#475)
Based on https://gist.github.com/ab/67c6343530c6b8e599f07cedccbcba3d.

Closes #277.
2025-07-27 12:23:20 +02:00
Marc Wrobel
e62676b5c4 [google-kubernetes-engine] Normalize script (#464)
The script used to parse different channel for historical (forgotten) reasons. This is the only script that works that way, and release data is not supposed to be consumed by other clients than endoflife.date. So aligning this script for all the other scripts.

In case other channel data is useful for someone, it would be preferable to create multiple products so that the data is available through our official API.
2025-07-12 10:29:33 +02:00
Marc Wrobel
391d65ad8a Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
2025-07-06 22:42:01 +02:00
Marc Wrobel
c78d1fe2b5 Refactor scripts arguments handling (#456)
- remove the use of environment variables to get directory paths,
- make use of arguments / argparse instead of environment variables in `update.py` and `report.py`,
- automatically guess the data directory in `latest.py` based on the script's location,
- propagate log level to auto scripts,
- move `list_configs_from_argv` from `endoflife` module to `releasedata` module,
- use `list_products` in `latest.py` to load the product's frontmatters.
2025-06-28 19:05:07 +02:00
Marc Wrobel
f404274310 Align custom scripts with generic scripts (#445)
Align custom scripts with generic scripts, making them configurable. This has a few advantages:

- script code is more unified,
- no more hard-coded method names in scripts, which is less error prone and make it easier to rename scripts,
- no more hard coded product names in scripts, which is less error prone and make it easier to rename products,
- less hard-coded URLs and regexes in scripts, which makes auto-configuration more expressive / updatable,

Also added method `endoflife.list_configs_from_argv()` so that it is easier to manipulate scripts arguments.
2025-06-07 17:25:05 +02:00
Marc Wrobel
c2a22dd150 [samsung-security] Generify samsung-mobile method (#439)
- Make section and inclusions/exclusions configurable,
- Remove Galaxy Tabs from samsung-mobile data (following https://github.com/endoflife-date/endoflife.date/pull/7513),
- Initialize Galaxy Tabs dataset (following https://github.com/endoflife-date/endoflife.date/pull/7513).
2025-05-19 19:06:45 +02:00
Marc Wrobel
6091ef55fe [samsung-mobile] Add automation (#437)
Detect new models and aggregate EOL data for Samsung Mobile devices.

This script works cumulatively: when a model is not listed anymore on https://security.samsungmobile.com/workScope.smsb
it retains the date and use it as the model's EOL date.
2025-05-07 23:29:33 +02:00
Marc Wrobel
0ade677365 Do not fail in update.py if a product cannot be loaded (#357)
Such errors prevent the script to run.
2024-07-19 22:58:10 +02:00
Marc Wrobel
d1a4918534 Fix report.py 2024-02-22 21:32:00 +01:00
Marc Wrobel
2d5145444b [apple] Adapt script for single-product usage (#317)
Make the Apple script compatible with the way update.py now works, which is 'product' oriented, meaning the script will be called once for each product.

To minimize the impacts the responses are now cached to avoid rate-limiting by support.apple.com.

Version patterns have also been moved to product's auto configuration to make future changes simpler.
2024-02-21 00:21:07 +01:00
Marc Wrobel
dedc826a95 Add the new release_table method (#300)
Add a new release_table to automate the retrieval of release-level information such as releaseDate, support or eol fields.
2024-02-11 21:46:22 +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
8f459f2bc3 Update to support new auto structure (#298)
See https://github.com/endoflife-date/endoflife.date/pull/4570.
2024-02-07 23:27:57 +01:00
Marc Wrobel
4bd2c3dfb8 Process product in alphabetic order for a given method (#296) 2024-02-04 18:14:48 +01:00
Marc Wrobel
8f6efad2cc Simplify endoflife.list_products usage (#292)
Make endoflife.list_products return product instead of just the product name, to avoid having to reload the product a second time to get more information.
2024-02-03 00:26:23 +01:00
Marc Wrobel
d72008ae9c Update user-agent (#283)
Update user-agent to the latest Firefox ESR.
2024-01-24 22:58:56 +01:00
Marc Wrobel
1221872660 Support exclusions in auto configurations (#282)
Support a new regex_exclude option to describe versions that must be excluded from the list of retrieved versions.

This will be useful for products such as KDE Plasma, for which beta releases are designated by the use of minor or patch version >= 80.
2024-01-20 18:27:57 +01:00
Marc Wrobel
b339c81ead Split endoflife.date and releasedata models in separate files (#276)
This makes the code easier to read.
2024-01-07 20:22:46 +01:00
Marc Wrobel
d01d8ed04b Simplify product listing (#275)
Small refactoring to simplify product listing by reusing ProductFrontmatter.
2024-01-07 16:50:27 +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
f6a8349c46 Centralize GitHub Workflow groups declaration (#272)
It may not be the best place for that (gha.py would have been better), but it's the shorter / faster way to do it for now.

Moreover it now uses logging for writing the group. The logger format has been updated for this to work. This was done to fix issues on GitHub Action logs, where groups were declared after the logs.
2023-12-31 17:00:11 +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
7458563fec Enable flake8-simplify linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-simplify-sim.
2023-12-30 14:29:24 +01:00
Marc Wrobel
801859d78a Enable flake8-return linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-raise-rse.
2023-12-30 14:29:24 +01:00
Marc Wrobel
298ad1a754 Enable flake8-errmsg linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-errmsg-em.
2023-12-30 14:29:24 +01:00
Marc Wrobel
798c298c59 Enable flake8-datetimez linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz.
2023-12-30 14:29:24 +01:00
Marc Wrobel
1bb97fe2b4 Enable flake8-commas linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-commas-com.
2023-12-30 14:29:24 +01:00
Marc Wrobel
b32cb09494 Fix a few Intellij IDEA warnings 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
0e8fe135e4 Enable flake8-bugbear linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-bugbear-b.
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
1add3a71d1 Minor refactoring (#262)
- Move frontmatter-related operation from Product to ProductFrontmatter. This makes more senses, as we are manipulating different files / kind of data.
- Use Product directly to load old versions.
2023-12-26 17:33:45 +01:00
Marc Wrobel
c9aca50729 Drop regexes lib (#258)
This was needed until #227 as the Ruby script did not support multiple regexes.

Now that all regexes has been split / simplified in https://github.com/endoflife-date/endoflife.date/pull/4317 and https://github.com/endoflife-date/endoflife.date/pull/4383 the regexes lib is not needed anymore.
2023-12-26 17:33:05 +01:00
Marc Wrobel
a6eebd1dc1 [aws-lambda] Improve script (#259)
- make the script more resilient to changes in the page by using column names,
- use the product release releaseDate as the date, else the date the version was first found, else the current date (previously the date the version was first found was not used),
- move some code to the Product class.
2023-12-18 00:02:38 +01:00
Marc Wrobel
6453bca256 Remove unused write_releases method
This method is unused now that all scripts are using the Product class.
2023-12-15 14:19:30 +01:00
Marc Wrobel
dfb113d589 [git] Refactor script (#227)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.

Note that this also changed the module used for regexes in endoflife.py. The regex module is now used because the Python re module does not support identically named groups (as used in the mariadb product). The regex module being backwards-compatible with the standard re module, this should not be an issue.
2023-12-10 22:07:35 +01:00
Marc Wrobel
9e0f4a437a [github_releases] Refactor script (#226)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 21:47:49 +01:00
Marc Wrobel
c27c64a754 [eks] Refactor script (#224)
Make the script more readable, mostly by:

- changing slightly the logic,
- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.

Disabled web.archive.org has also been re-enabled because HTTP retry mechanism has been improved and should handle timeouts a lot better.
2023-12-10 19:26:10 +01:00
Marc Wrobel
724dfc4808 [distrowatch] Refactor script (#222)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 18:39:35 +01:00
Marc Wrobel
0836c270ea [cgit] Refactor script (#216)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- introducing the endoflife.AutoConfig class to make it easier to manage such configuration,
- removing the unnecessary use of functions,
- a little bit of renaming.
2023-12-10 16:26:47 +01:00
Marc Wrobel
758b204ada [artifactory] Refactor script (#214)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- a little bit of renaming.
2023-12-10 14:14:03 +01:00
Marc Wrobel
b122ed40fe [apple] Refactor script (#213)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- a little bit of renaming.
2023-12-10 13:44:59 +01:00
Marc Wrobel
6bdb657417 Add endoflife.Product class (#210)
This will be used in future PR to simplify existing script and lay fundation for tracking more than versions.
2023-12-09 23:30:33 +01:00
Marc Wrobel
d80504aea8 Add some basic logging (#209)
Add some basic logging when using common.git or common.http.
2023-12-09 23:19:18 +01:00
Marc Wrobel
7cf62c2355 Refactor HTTP common code (#207)
- move to common/http.py,
- make fetch_url return a Response.
2023-12-02 22:52:12 +01:00
Marc Wrobel
750faaa64f Use a default regex when possible (#205) 2023-12-01 21:36:44 +01:00
Hugo van Kemenade
8870ab5e28 Lint on GitHub Actions (#196)
- Lint with pre-commit on GitHub Actions,
- Add some handy pre-hooks,
- Configure Ruff lint rules (https://github.com/astral-sh/ruff).

---------

Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>
2023-11-26 21:08:12 +01:00
Marc Wrobel
1e65a048b0 Improve retry mechanism (#194) (#194)
When a ChunkedEncodingError occurs, request and response are not set and there is no way to get the URL that causes the error.
With this change all URLs are retried. The max_retries parameter is decreased each time so that we do not get stuck in an infinite loop.

I also considered to also wait before retrying, but for now I don't see any benefit to it.

Relates to #188.
2023-11-26 19:00:32 +01:00