Commit Graph

351 Commits

Author SHA1 Message Date
Marc Wrobel
08745537f1 [graalvm] Refactor script (#229)
Make the script more readable, mostly by:

- using the Product classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 22:13:59 +01:00
Marc Wrobel
5cbffda1da [gke] Refactor script (#228)
Make the script more readable, mostly by:

- using the Product classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 22:07:51 +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
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
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
d36e4b9c46 [docker_hub] Refactor script (#223)
Make the script more readable, mostly by:

- using the Product and AutoConfig classes,
- a little bit of renaming and documentation.
2023-12-10 19:09:34 +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
cb4d988c45 [debian] Refactor script (#221)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- a little bit of renaming and documentation.
2023-12-10 18:06:26 +01:00
Marc Wrobel
6cac26c41f [couchbase-server] Refactor script (#220)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- a little bit of renaming and documentation.
2023-12-10 17:06:28 +01:00
Marc Wrobel
c20b65124d [cos] Refactor script (#219)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 16:54:44 +01:00
Marc Wrobel
2c076ff5f1 [confluence] Refactor script (#218)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- a little bit of renaming and documentation.
2023-12-10 16:45:41 +01:00
Marc Wrobel
328ddc3823 [coldfusion] Refactor script (#217)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing some unnecessary use of functions,
- a little bit of renaming and documentation.
2023-12-10 16:45:14 +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
aa7975d7f1 [aws-lambda] Refactor script (#215)
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 16:09:15 +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
7d462ffe90 [apache-http-server] Refactor script (#212)
Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- renaming a few variables,
- declaring a constant for regexes.
2023-12-10 13:19:17 +01:00
Marc Wrobel
06c462c3cc [amazon-neptune] Refactor script (#211)
Make the script more readable, partly by making use of the new endoflife.Product class.
2023-12-10 09:42:19 +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
d1191aefb4 Improve date support (#208)
This will be useful in future PRs:

- add a few more supported formats,
- cleanup string so that we don't have to deal with some special characters in formats.
2023-12-09 23:28:24 +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
a0c35e4b5d [visualstudio] Add automation (#199)
Automation is only for the latest 3 majors version (2022, 2019 and 2017) as there is no release history published for 2015 and below.
This is not a big deal because there was no version for those release in a very long time.
2023-12-02 09:36:16 +01:00
Marc Wrobel
750faaa64f Use a default regex when possible (#205) 2023-12-01 21:36:44 +01:00
Marc Wrobel
861a5a6d02 [coldfusion] Fix script (#198)
Initial release dates can't be scraped as they are not documented in release notes, they must be set manually.
2023-12-01 20:37:11 +01:00
Nemo
d7b0de3e17 [coldfusion] Add automation (#172)
Co-authored-by: Marc Wrobel <marc.wrobel@gmail.com>
2023-11-26 21:38:23 +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
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
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
Marc Wrobel
37683f9677 [splunk] Make HTTP requests in parallel (#193)
It cuts the script execution time roughly by three during my tests.
2023-11-26 15:54:45 +01:00
Marc Wrobel
90658a356d Try to fix fetch_urls when ChunkedEncodingError occurs (#188) 2023-11-26 15:31:12 +01:00
Marc Wrobel
9ef4494775 [couchbase] Make HTTP requests in parallel (#191)
It cuts the script execution time roughly by two during my tests.
2023-11-26 15:23:20 +01:00
Marc Wrobel
981eef5b62 [haproxy] Make HTTP requests in parallel (#192)
It cuts the script execution time roughly by three during my tests.
2023-11-26 15:22:56 +01:00
Marc Wrobel
1e8a84ec77 [apple] Add back web.archive.org links (#190)
The issue was with couchbase, for which the webarchive.org link is now dead.
2023-11-26 14:18:33 +01:00
Marc Wrobel
79f7e13dd9 [cos] Make HTTP requests in parallel (#187)
Its cuts the script execution time roughly by two during my tests.
2023-11-26 14:00:42 +01:00
Marc Wrobel
7907243967 [apple] Make HTTP requests in parallel (#185)
Use the new endoflife.fetch_urls to fetch URLs. This is a bit more efficient, especially when network is slow.

Also update the way rows without a proper date format are excluded by checking the format first. I don't know why, but this fixed a bit the script, as now the 6.2.1 is properly retrieved and parsed.
2023-11-26 13:59:22 +01:00
Marc Wrobel
7b90c02f62 Try to fix fetch_urls when ChunkedEncodingError occurs (#188) 2023-11-26 13:58:27 +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
f59390815c Try to fix fetch_urls when ChunkedEncodingError occurs (#188)
Intermittent ChunkedEncodingErrors occurs while fetching URLs. This change try to fix it by retrying.
According to https://stackoverflow.com/a/44511691/374236, most servers transmit all data, but that's not what was observed.

For future reference the traceback was:

```
  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/home/runner/work/release-data/release-data/src/firefox.py", line 36, in <module>
      for response in endoflife.fetch_urls(urls):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/runner/work/release-data/release-data/src/common/endoflife.py", line 55, in fetch_urls
      return [future.result() for future in as_completed(futures)]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/runner/work/release-data/release-data/src/common/endoflife.py", line 55, in <listcomp>
      return [future.result() for future in as_completed(futures)]
              ^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/concurrent/futures/_base.py", line 449, in result
      return self.__get_result()
             ^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
      raise self._exception
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/concurrent/futures/thread.py", line 58, in run
      result = self.fn(*self.args, **self.kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
      resp = self.send(prep, **send_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/requests/sessions.py", line 747, in send
      r.content
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/requests/models.py", line 899, in content
      self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/site-packages/requests/models.py", line 818, in generate
      raise ChunkedEncodingError(e)
  requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))
```
2023-11-26 13:23:17 +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
f0324372d9 Use request instead of urllib for HTTP requests
It's simpler to use, and provides better retry capabilities.
2023-11-25 00:08:47 +01:00
Marc Wrobel
6023ccc257 [aws-lambda] Fix script
Returning a default date far in the future makes the latest.py script fail.
2023-11-24 22:26:32 +01:00
Marc Wrobel
2e83befe93 [aws-lambda] Add automation (#166)
The purpose of this new script is to be alerted of new runtimes, while not making updates to the original product file (because release dates cannot be fetched from AWS documentation).
2023-11-23 22:02:51 +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
85953a9e97 [rockylinux] Fix date parsing 2023-11-15 22:02:26 +01:00
Marc Wrobel
701c2899d5 [git] Migrate git method from Ruby to Python (#178)
The main reason for doing this is to have some common code between scripts, so that it is easier to change the JSON schema globally and normalize a few things (such as release order).

The Ruby code was kept as is so we can quickly roll back if necessary.
2023-11-12 20:33:29 +01:00
Marc Wrobel
34f238320a [couchbase] Inject 6.6.0 release date
Disabling https://web.archive.org/web/20230519160357/https://docs.couchbase.com/server/ triggered an unwanted update on 6.6 release date: https://github.com/endoflife-date/endoflife.date/pull/4055/files.
2023-11-08 22:38:47 +01:00
Marc Wrobel
6f375c47ba Disable web.archive.org links
They cause too much timeout lately, and the main purpose of those script is to get new releases anyway.
2023-11-08 00:01:50 +01:00