- Simplify overriding the User-Agent by replacing the generic (unused) `headers` parameter by a new `user_agent` parameters.
- Take into account the User-Agent even in `fetch_javascript_url` : Playwright user agent is `Playwright/1.12.0` by default anyway.
- Make it possible to override the User-Agent with the `release_table` method.
- Update splunk to use Firefox's User-Agent.
This follows #470.
Properly identifying endoflife.date bot is more fair for website administrators, and give them the ability to more easily authorize the bot if they want to.
---------
Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>
Automatically remove empty releases or releases which are released in the future, regardless of the product.
Also refactored a bit releasedata.py to use better names and clarify types.
Copy releases, without their properties, from product data (frontmatter) to release data.
This script is not intended to be declared in the frontmatter: it is for internal use only.
It executes before all other scripts, and helps the following scripts to work with releases.
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.
Replace `click_selector` by `wait_for,` which is a selector that we must wait for before considering the page loaded.
Also added `select_wait_for`, which returns the waited for element. Oddly this may be needed in some case (such as `artifactory.py`) where the `page.content()` does not contain the waited for element.
- 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.
Allow stale responses in case of error in order to reduce the number of temporary errors.
Note that the cache will be reset on the first build of every week in any cases, see .github/workflows/update.yml.
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.
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.
Add a new method to fetch tags with their related commit date using GitHub GraphQL API.
For large repositories, such as https://github.com/gregkh/linux, it may be more performant than the git auto method.
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.
- add an 'ignore_empty_releases' to exclude empty releases (which are future releases for Debian),
- improve logging,
- add the 'YYYY-mm' month_year date format.
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.
Release data were not loaded in the `ProductData#__enter__` method. Data would be lost for auto configuration declaring an auto method updating releases followed by an auto method updating versions.
Also raise an error when product data are completely empty after the update, preventing the product data to be updated at all. This does not catch all types of errors (what if the second script silently fails completely ?), but that's a start.
- Add strict typing to the fields. This makes the script fail if some column does not have the expected type (for example because of a change in the HTML page).
- Support regex and templating for all fields (not only the releaseCycle). This make it possible to extract only the necessary information without having to do some sort of 'magic' cleanup (replacements in dates have been reverted).
- Do not inject 'releaseCycle' anymore in the JSON (there is already the name).