Commit Graph

26 Commits

Author SHA1 Message Date
Nemo
d3723a2c5e [firefox] Fetch first 200 versions (#508)
* [firefox] Fetch first 200 versions

115 ESR does not get picked up otherwise.

Ref: https://github.com/endoflife-date/endoflife.date/issues/8324

* 🤖: coder, firefox

coder:
- Item root['versions']['2.24.4'] ({'name': '2.24.4', 'date': '2025-09-04'}) added to dictionary.

firefox:
- Item root['versions']['115.27.0'] ({'name': '115.27.0', 'date': '2025-08-19'}) added to dictionary.
- Item root['versions']['115.26.0'] ({'name': '115.26.0', 'date': '2025-07-22'}) added to dictionary.
- Item root['versions']['115.25.0'] ({'name': '115.25.0', 'date': '2025-06-24'}) added to dictionary.
- Item root['versions']['115.24.0'] ({'name': '115.24.0', 'date': '2025-05-27'}) added to dictionary.
- Item root['versions']['115.23.1'] ({'name': '115.23.1', 'date': '2025-05-17'}) added to dictionary.

* Increase MAX_VERSIONS_LIMIT from 200 to 250

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-09-04 12:03:27 +05:30
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
f2931fd1e2 [firefox] Increase max versions limit 2025-05-17 10:24:20 +02: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
dc3f4e0653 [firefox][unity] Add support for cumulative updates and use it in a few scripts (#295)
Generic support for cumulative updates has been added to speed up execution time of some scripts that were very long (in comparison with the vast majority of products), usually because they were involving a lot of HTTP requests.

This feature was developed particularily for the firefox.py and unity.py scripts, which was often very long to execute (a minute or moreaccording to GHA summaries). Those scripts has been updated to make use of this new feature.
2024-02-04 18:05:18 +01:00
Marc Wrobel
56cc29b49d Make releasedata.Product usable in 'with' expression (#294)
This way the writing of the JSON file is handled automatically if the update does not fail.
It pave the way to further global improvements, such as a better error handling.
2024-02-04 14:48:05 +01:00
Marc Wrobel
7747e4b24f [firefox] Fix script (#284)
- batch HTTP URL fetching by 20 to reduce the number of unnecessary retries,
- search for c-release-date directly.
2024-01-24 23:38:35 +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
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
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
fe45ca7ece [firefox] Refactor script (#225)
Make the script more readable, mostly by:

- using the Product class,
- a little bit of renaming and documentation.
2023-12-10 20:11:11 +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
0d17306872 Simplify date parsing (#195)
Create common functions parse_date, parse_month_year_date and parse_datetime.

Those functions support trying multiple formats, and come with default formats lists that support most of the date format encountered so far.

Notable change: year-month dates are now set to the end of month (impacted couchbase-server and ibm-aix).
2023-11-26 21:01:35 +01:00
Hugo van Kemenade
1022d8f816 Fix some lint warnings (#189)
Remove unused imports or variable, and apply suggestions from https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/.
2023-11-26 13:25:04 +01:00
Marc Wrobel
ca689dc373 Support parallel URL fetching via endoflife.fetch_urls (#184)
Move the parallel URL fetching from firefox.py to endoflife.py to make available parallel URL fetching for all scripts.

Also a a fix found on https://stackoverflow.com/a/44511691/374236 to avoid ChunkedEncodingError.
2023-11-26 11:34:18 +01:00
Marc Wrobel
deb5d9f1a2 [firefox] Simplify script
- use requests_futures instead of managing concurrency manually,
- drop retrieval of versions < 10.0 to not make the parsing too complex.
2023-11-25 12:05:19 +01:00
Marc Wrobel
600e77e212 Sort versions by date then version for all products (#179) 2023-11-15 22:30:31 +01:00
Marc Wrobel
94e04f3b4f Increase the default timeout value
Recently links to web.archive.org were added for various products. Such links are very long to load. This increases the default timeout value so that such links do not make the update fail.
2023-09-11 23:00:51 +02:00
Nemo
0b1bd8f448 [firefox] Handle 404.
The 115.0.3 release seems to have been halted
https://wiki.mozilla.org/Firefox/Channels/Meetings/2023-07-18#Schedule_Update
so the page is "semi-published". It is linked on the release list page
https://www.mozilla.org/en-US/firefox/releases/
but the page itself gives a 404.

So we ignore any such unpublished releases for now
2023-07-19 15:40:19 +05:30
Marc Wrobel
208ab8e2f8 Apply various minor refactorings
Improve readability and fix a few Python warnings (line too long, exception too broad...) through various minor refactorings.
2023-06-11 12:45:59 +02:00
Marc Wrobel
6ba7828f96 Refactor product releases writing
Create a common function to write resulting JSON files to the releases directory.
It makes this task simpler to read and maintain, while making it modifiable at a central point in the future.
One example of such modification could be the sorting of the versions in a uniform way for all the scripts.
2023-06-11 12:45:59 +02:00
Marc Wrobel
a16d9090d3 Refactor HTTP URL fetching scripts
This creates a common function to fetch HTTP URLs, with enhanced capabilities (retry, use of a known User-Agent).
It makes scripts that need those capabilities simpler, while improving other scripts.

This commit also fixes some scripts that did not log properly (cos.py, eks.py, haproxy.py, palo-alto-networks.py, rhel.py, ros.py, unrealircd.py).
2023-06-11 12:45:59 +02:00
Marc Wrobel
7c047202b3 [firefox] Retry on timeout 2023-01-08 14:36:21 +01:00
Benji Visser
f9597f55d7 [firefox] Add automation (#67)
Signed-off-by: Benji Visser <benji@093b.org>
2023-01-08 12:43:43 +01:00