Skip to content

Commit

Permalink
fix(agent): compatibility issue Requests >= 2.32.2
Browse files Browse the repository at this point in the history
A change in Requests 2.32.2 introduces a new requirement in custom
HTTPAdapters to support specific scheme. Without this patch, the
following exception is raised:

  requests.exceptions.InvalidURL: Not supported URL scheme http+unix

fix #350
  • Loading branch information
rezib committed Sep 20, 2024
1 parent 6e9bae7 commit 49b48f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [unreleased]

### Fixed
- agent: fix retrieval of terminated jobs only available in accounting service
with an option to ignore 404 for specific slurmrestd requests.
- agent:
- Fix retrieval of terminated jobs only available in accounting service with
an option to ignore 404 for specific slurmrestd requests.
- Fix compatibility issue with Requests >= 2.32.2 (#350).
- front: Update dependencies to fix CVE-2024-45812 and CVE-2024-45811 (vite).

## [3.2.0] - 2024-09-05
Expand Down
8 changes: 8 additions & 0 deletions slurmweb/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,13 @@ def __init__(self, path):
super().__init__()
self.path = path

# Required by Requests >= 2.32.2. For reference:
# https://github.com/psf/requests/pull/6710
#
# As mentionned by Requests maintainers, this is backwards compatible between
# versions of Requests.
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
return self.get_connection(request.url, proxies)

def get_connection(self, url, proxies=None):
return SlurmrestdUnixConnectionPool(self.path)

0 comments on commit 49b48f6

Please sign in to comment.