text:
Clarify ownership in API / Avoid needless allocations

Hello ...
with ... edec13c Removed references from struct methods since they want the ownership of objects anyway ... the API has changed to "swallow" host and topic names. Was there a particular reason for doing so? If i understand it correctly, this is consistent with various client input/output structures (e.g. util::ProduceMessage).
However, the fact that the API "swallows" topics as Strings requires clients to clone them on their input side (for repeated calls of the corresponding methods); Further, the fact that "topics" are a String in the output structures, implies repeated allocations even though very often the topic will vary little. This seems needless given that the client maintains an already allocated map of topics internally (which could be reused.)
Are we open to changes that would break the current client API?

I would like nothing more than to not "swallow" things up. I moved from reference to outright ownership for consistency reasons. I have been meaning to find sometime to have another shot at it but unfortunately couldn't.
Will welcome a PR on this

Most of the work is already prepared in the (not yet released) branch-0.2.x. I'm OK with the API in this branch regarding the issue reported here. (I still have some more changes to the API planned but rather for performance reasons regarding fetching messages.) I'm closing this one.

authors: spicavigo xitep

repo: spicavigo/kafka-rust


text:
Stepper & TabControlStepper - In vertical layout Bindings don't work

I modified the code in the Demo project, in StepperControl.xaml like this:
<!-- example for defining the Stepper in XAML -->
     <mde:Stepper x:Name="stepper" IsLinear="{Binding Path=IsLinear}"
                   Layout="{Binding Path=Layout}" HorizontalAlignment="Stretch"
                   VerticalAlignment="Stretch">
        <mde:Step>
          <mde:Step.Header>
            <mde:StepTitleHeaderControl FirstLevelTitle="header" />
          </mde:Step.Header>
          <mde:Step.Content>
            <StackPanel>
              <TextBlock Text="{Binding Path=Test}"/>
              <TextBlock Text="Normal Text without Binding"/>
              <TextBlock Text="{Binding Path=Test}"/>
            </StackPanel>
          </mde:Step.Content>
        </mde:Step>
      </mde:Stepper>

And in StepperBaseViewModel I've added a Test property as follows:
    protected string m_test = "This is a test";

    public string Test
    {
      get { return m_test; }
      set { m_test = value; OnPropertyChanged(nameof(Test)); }
    }

When the layout is set to horizontal, it works as expected. When the layout is set to vertical, it doesn't work anymore, like this:

@StefanoRivolta-Previero The vertical layout uses an ItemsControl for the steps. That's why the DataContext in the vertical layout is set to the item. The horizontal layout uses a single ContentControl only and thus the DataContext will be as you expected.
This binding should work for both layouts:
Text="{Binding Path=DataContext.Test, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type mde:Stepper}}}"

source: gharchive/issue

authors: StefanoRivolta-Previero spiegelp

repo: spiegelp/MaterialDesignExtensions

license: MIT

license_type: permissive

license_source: github-api


text:
Add integration tests

Changes proposal:

Adds integration test for mysql, postgres and client-server golang app.

@JU4N98 Why do you open close this pr twice?

Sorry, my mistake, the commits weren't signed as was required.

Sorry, my mistake, the commits weren't signed as was required.

you can add that to an existing pr, don't need to close.

I didn't know that, I'll take that into account. Thanks!

source: gharchive/pull-request

repo: spiffe/spiffe-helper


text:
Feature: Advanced OpenAI configuration

In this PR I´ve added some OpenAI configuration parameters, updated the .env.example file and did some package updates for NextJs, OpenAI and Prisma.
OpenAI can no be configured via ENV vars. The following variables were added:

VAR name
Default
Description

OPENAI_API_URL
https://api.openai.com/v1
This parameter can be used to define a custom OpenAI endpoint. I´ve tested this with the official OpenAI endpoint and also with a Cloudflare AI Gateway

OPENAI_CATEGORY_EXPENSE_MODEL
gpt-3.5-turbo
This parameter can be used to define a different OpenAI model that will be used for the expense category determination

OPENAI_CATEGORY_RECEIPT_EXTRACT
gpt-4-turbo
This parameter can be used to define a different OpenAI model that will be used for the receipt extract feature

Using the Cloudflare AI Gateway will help decrease the amount of request that will be send to OpenAI and therefor decrease the cost that will be generated. Same expense titles for exampel will be cached by Cloudflare and the can be reused for the next requests.

See #166

See #166

Yeah as I see so far, your PR and your changes aim to add config options for Ollama and not to change anything OpenAI related.

No worries, I was just linking them as they are related and there may be some merge conflicts for the other if/when one is merged.

No worries, I was just linking them as they are related and there may be some merge conflicts for the other if/when one is merged.

Alright, but I think we can skip the use of fetch and just use my change to also support Ollama. As far as I can understand just changing the url and the model will do the trick for Ollama.
Have a look at this documentation of Ollama: https://ollama.com/blog/openai-compatibility
Ollama should be OpenAI SDK compatible🤔

Yes I can confirm, that you can use my changes to use Ollama local models like this example:
OPENAI_API_URL="http://127.0.0.1:11434/v1"
OPENAI_CATEGORY_EXPENSE_MODEL="llama3"
OPENAI_CATEGORY_RECEIPT_EXTRACT_MODEL="llama3"

Updated the PR description to include the Ollama instructions.

authors: ChristopherJohnston sebiweise

repo: spliit-app/spliit


text:
Add support for auth tokens and env vars

Load username, password, auth token, and server IP from environment variables if not set in config.
Also add support for the auth tokens.

Hey I digged into adding this to the api_deploy action but it seems incomplete, and since we have made some major changes to the tool we should revisit this as a proper feature for customers soon. Closing this PR for now since we might re-write the hole thing. I created this issue to track the feature: https://github.com/splunk/contentctl/issues/173

authors: josehelps linuxdaemon

repo: splunk/contentctl


text:
Receiving SSL error

Receiving SSL error when connecting to Splunk instance over port 80.  BigIP Listens on port 80 forwards to splunk instance on 8089.  I am able to connect if I use urllib, urllib2.
Traceback (most recent call last):
File "info.py", line 32, in
service = client.connect(**opts.kwargs)
File "../splunklib/client.py", line 305, in connect
return Service(**kwargs).login()
File "../splunklib/binding.py", line 762, in login
password=self.password)
File "../splunklib/binding.py", line 1091, in post
return self.request(url, message)
File "../splunklib/binding.py", line 1108, in request
response = self.handler(url, message, **kwargs)
File "../splunklib/binding.py", line 1230, in request
connection.request(method, path, body, head)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 995, in request
self._send_request(method, url, body, headers)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1029, in _send_request
self.endheaders(body)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 991, in endheaders
self._send_output(message_body)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in _send_output
self.send(msg)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 806, in send
self.connect()
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1198, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 392, in wrap_socket
ciphers=ciphers)
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 148, in init
self.do_handshake()
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 310, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Hi @httpstergeek,
Thanks for the bug report, we will look into this.

Hi @shakeelmohamed,
I am closing this bug.  After further investigation I believe this error is caused by a misconfigured virtual server.

Thanks @httpstergeek. On a diff note, love your github avatar :-)
On Fri, Apr 24, 2015 at 11:08 AM httpstergeek notifications@github.com
wrote:

Hi @shakeelmohamed https://github.com/shakeelmohamed,
I am closing this bug. After further investigation I believe this error is
caused by a misconfigured virtual server.
—
Reply to this email directly or view it on GitHub
https://github.com/splunk/splunk-sdk-python/issues/98#issuecomment-96017743
.

authors: glennblock httpstergeek shakeelmohamed

repo: splunk/splunk-sdk-python

license_source: bigquery


text:
Use String#gsub with a Hash as the replacement

You missed that gsub can take a Hash as its second argument.
                           user     system      total        real
each_char              1.580000   0.020000   1.600000 (  1.633651)
each_char_v2           1.350000   0.010000   1.360000 (  1.413720)
each_char_reduce       1.770000   0.020000   1.790000 (  1.846817)
each_char_reduce_v2    1.500000   0.020000   1.520000 (  1.549961)
gsub                   1.380000   0.010000   1.390000 (  1.422130)
gsub_v2                1.150000   0.010000   1.160000 (  1.181604)
gsub_v3                0.960000   0.020000   0.980000 (  1.001596)
scan                   2.360000   0.020000   2.380000 (  2.436495)

Today I learned. Wow. Thanks. Cheers. Prost.

authors: geraldb rab


text:
RegexMatchError: error while downloading playlist

Environment

System OS: Windows

Python Version: 3.9.1

Install Source:
pip install spotdl

Version OR Commit hash:
3.3.1

Expected Behaviour
I expected the program to download a playlist
Actual Behaviour
It ran the 'searching for' thing, found all the songs, did nothing (showing 0%|    |ETA: ?, ~min/song), then threw the error
Steps to Reproduce

Create playlist
run "spotdl [playlist] in PS

Traceback

Traceback (most recent call last):
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\ashsk\AppData\Local\Programs\Python\Python39\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\spotdl\__main__.py", line 112, in console_entry_point
    downloader.download_multiple_songs(songObjList)
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 91, in download_multiple_songs
    self._download_asynchronously(songObjList)
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 355, in _download_asynchronously
    self.loop.run_until_complete(asyncio.gather(*tasks))
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\asyncio\base_events.py", line 642, in run_until_complete
    return future.result()
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 350, in _pool_download
    return await self.download_song(song_obj)
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\spotdl\download\downloader.py", line 172, in download_song
    youtubeHandler = YouTube(
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\pytube\__main__.py", line 91, in __init__
    self.prefetch()
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\pytube\__main__.py", line 183, in prefetch
    self.js_url = extract.js_url(self.watch_html)
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\pytube\extract.py", line 143, in js_url
    base_js = get_ytplayer_config(html)["assets"]["js"]
  File "c:\users\ashsk\appdata\local\programs\python\python39\lib\site-packages\pytube\extract.py", line 202, in get_ytplayer_config
    raise RegexMatchError(caller="get_ytplayer_config", pattern="config_patterns")
pytube.exceptions.RegexMatchError: get_ytplayer_config: could not find match for config_patterns

Any other information:
Running in PowerShell

I got this is well
Same reproduction steps as you lol. I was tryna dl my playlist
`Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 1347, in getresponse
response.begin()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 307, in begin
version, status, reason = self._read_status()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.spotify.com', port=443): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Ali Umar\AppData\Local\Programs\Python\Python39\Scripts\spotdl.exe_main.py", line 7, in
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl_main.py", line 110, in console_entry_point
songObjList = get_playlist_tracks(request)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl\search\utils.py", line 82, in get_playlist_tracks
song = SongObj.from_url(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl\search\songObj.py", line 38, in from_url
rawTrackMeta = spotifyClient.track(spotifyURL)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 338, in track
return self._get("tracks/" + trid)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 291, in _get
return self._internal_call("GET", url, payload, kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 240, in _internal_call
response = self._session.request(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.spotify.com', port=443): Read timed out. (read timeout=5)
0%|          |ETA: ?, ~min/song`
Any other information:
Running in PowerShell

I got this is well
Same reproduction steps as you lol. I was tryna dl my playlist
`Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 1347, in getresponse
response.begin()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 307, in begin
version, status, reason = self._read_status()
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\http\client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\util\retry.py", line 531, in increment
raise six.reraise(type(error), error, _stacktrace)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\packages\six.py", line 735, in reraise
raise value
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\urllib3\connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.spotify.com', port=443): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Ali Umar\AppData\Local\Programs\Python\Python39\Scripts\spotdl.exe_main.py", line 7, in
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl_main.py", line 110, in console_entry_point
songObjList = get_playlist_tracks(request)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl\search\utils.py", line 82, in get_playlist_tracks
song = SongObj.from_url(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotdl\search\songObj.py", line 38, in from_url
rawTrackMeta = spotifyClient.track(spotifyURL)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 338, in track
return self._get("tracks/" + trid)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 291, in _get
return self._internal_call("GET", url, payload, kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 240, in _internal_call
response = self._session.request(
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "c:\users\ali umar\appdata\local\programs\python\python39\lib\site-packages\requests\adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.spotify.com', port=443): Read timed out. (read timeout=5)
0%|          |ETA: ?, ~min/song`
Any other information:
Running in PowerShell

Duplicate of #1030.
Try the following:

pip install pip-autoremove
pip-autoremove spotdl
pip cache purge
pip install https://codeload.github.com/spotDL/spotify-downloader/zip/master
pip-autoremove pytube
pip install --no-cache-dir git+https://github.com/pytube/pytube

Duplicate of #1030.
Try the following:

pip install pip-autoremove
pip-autoremove spotdl
pip cache purge
pip install https://codeload.github.com/spotDL/spotify-downloader/zip/master
pip-autoremove pytube
pip install --no-cache-dir git+https://github.com/pytube/pytube

authors: Amekyras ArmyaAli Silverarmor

repo: spotDL/spotify-downloader


text:
Song Names with colons (:) in them crash spotDL

Environment
v3.3.1, from master

Songs affected

https://open.spotify.com/track/5YlT9kW3aw6XIFB87Skv8A?si=D0gUq3DaTKWNRlFB_7nqxw.
Also repro'able:
https://open.spotify.com/track/25FFaRWPiEPg3rrx952EmT?si=pY7Mvc1eRcWidUygXmYvQg,

Traceback

Traceback (most recent call last):
  File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\SILV\AppData\Roaming\Python\Python39\Scripts\spotdl.exe\__main__.py", line 7, in <module>
  File "C:\Users\SILV\AppData\Roaming\Python\Python39\site-packages\spotdl\__main__.py", line 96, in console_entry_point
    downloader.download_single_song(song)
  File "C:\Users\SILV\AppData\Roaming\Python\Python39\site-packages\spotdl\download\downloader.py", line 69, in download_single_song
    self.downloadTracker.load_song_list([songObj])
  File "C:\Users\SILV\AppData\Roaming\Python\Python39\site-packages\spotdl\download\progressHandlers.py", line 177, in load_song_list
    self.backup_to_disk()
  File "C:\Users\SILV\AppData\Roaming\Python\Python39\site-packages\spotdl\download\progressHandlers.py", line 226, in backup_to_disk
    with open(self.saveFile, 'wb') as file_handle:
FileNotFoundError: [Errno 2] No such file or directory: '4:19.spotdlTrackingFile'
  0%|          |ETA: ?, ~min/song

Any other information:

Solved in #1162, d3a7471
Will be pushed to master soon.


text:
Add a feature where user can have a choice to delete some of the songs in the playlist

Requested Feature
sometimes the user might not like all the songs in playlist, so developing a option where he can delete some songs in the playlist so that even the size can also be reduced and the downloading could also be done faster.
Possible implementation

Backend (Server-Side) Implementation
Playlist Structure: Store playlists in a database with songs represented as individual records. Each song entry could have a unique ID and a foreign key linking it to the playlist.
Delete Request: Create an API endpoint to handle delete requests from the client side. When a user selects a song for deletion, the frontend sends a request to this endpoint, specifying the song ID and playlist ID.
Endpoint: POST /playlist/delete
Request body:
Copy code
{
"playlist_id": "12345",
"song_id": "56789"
}
Update Playlist: On receiving the request, the server deletes the song entry from the playlist in the database. If the song file is large, the backend can reduce storage by removing the unused file if it's no longer needed by any other playlists or users.
Frontend (Client-Side) Implementation
User Interface:
Add a "delete" button next to each song in the playlist UI, which when clicked, prompts the user to confirm removal.
Example:
A three-dot menu ("...") next to each song item that includes a "Remove" option.
Real-time Update:
Once a song is deleted, update the playlist in real-time on the frontend using JavaScript (e.g., React, Vue). This can be done by removing the song from the playlist array in the frontend state.
Visual Feedback:
Show a loading spinner or notification to indicate that the song is being removed from the playlist.
Reduced Size:
After the song is deleted, show the updated playlist size (e.g., "15 songs, 1.2 GB" after deletion) to provide feedback on the impact.
Download Management
Backend:
When a user initiates a download, only the remaining songs in the playlist are fetched from the database.
Implement a check that re-calculates the size of the playlist after deletion, so that the download process fetches a smaller data set.
Optimized Downloads:
Use asynchronous downloading techniques (e.g., chunked downloads) to ensure the smaller playlist can be downloaded faster.
Error Handling
Edge Cases:
If the user tries to delete a song that is already being downloaded or is shared in other playlists, notify the user that the song cannot be deleted or handle shared content separately by referencing the song ID in the shared playlist rather than duplicating the song file.
Performance Considerations
Database Performance:
Index the playlist and song IDs for fast lookup and deletion.
Caching:
Consider caching the playlist for quick retrieval after modifications, reducing load on the database.
This approach can enhance user control over their playlists, reduce storage needs, and improve download speed by allowing selective deletion of songs.

The effort and hours required to implement such a feature would not be proportionate to the benefit.
You can simply copy the playlist on spotify and remove undesired songs.
The changes suggested are substantial, implementing large changes to databases and project structure. As a volunteer team we aren't able to dedicate time to this at the moment, sorry.


text:
View controller: Un-rename visible component views API & improve docs

This change changes the name of the API used to retrieve the currently visible body component views back to the name that was used before https://github.com/spotify/HubFramework/pull/84. We don’t need to change the name of the API because the key type was changed.
This change also adds a bit more thorough documentation for the API, explaining what the API user can expect from the index paths used as keys.

@spotify/objc-dev @cerihughes

Current coverage is 92.78% (diff: 100%)

Merging #87 into master will not change coverage

@@             master        #87   diff @@
==========================================
  Files            57         57
  Lines          3951       3951
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           3666       3666
  Misses          285        285
  Partials          0          0

Powered by Codecov. Last update c273587...7fbfefc

🎉

👍

authors: JohnSundell KeenanCassidy cerihughes codecov-io

repo: spotify/HubFramework


text:
Add settings button to sidebar

Settings button on sidebar
Fixes #3027

:heavy_check_mark: Checklist

[x] A changeset describing the change and affected packages. (more info)
[ ] Added or updated documentation
[ ] Tests for new functionality and regression tests for bug fixes
[x] Screenshots attached (for UI changes)

Hi! There seems to be some lint check error - you may want to run prettier (perhaps as a plugin that auto-formats on save).

New screenshot

authors: freben mvarrieur

repo: spotify/backstage


text:
Only get ssh-agent identities once

and only get them if an endpoint is HTTPS.
We were asking the ssh-agent for the list of identities
for every new connection to an endpoint.

Is the Identity instance usable after the AgentProxy has been closed?

Looks like it is usable, so nevermind.

:+1: to the change itself.
I think this class would be a lot more testable though (it has no test today) if instead you passed either the List<Identity> or AgentProxy instance in the constructor, so that the class that is making http requests didn't also have to be concerned with how to get the ssh-agent identities or how to get an AgentProxy etc.

Yea, I haven't had the chance to add a test yet. Good idea about passing in
the list of identities. But it seems like if you don't create a new
instance of an AgentProxy on every connection, the TLS handshake is messed
up somehow. I wasn't able to drill down into why though...
On Fri, Nov 20, 2015 at 1:09 PM, Matt Brown notifications@github.com
wrote:

[image: :+1:] to the change itself.
I think this class would be a lot more testable though (it has no test
today) if instead you passed either the List or AgentProxy
instance in the constructor, so that the class that is making http requests
didn't also have to be concerned with how to get the ssh-agent identities
or how to get an AgentProxy etc.
—
Reply to this email directly or view it on GitHub
https://github.com/spotify/helios/pull/757#issuecomment-158478315.

--
David Xia
Software Engineer
dxia@spotify.com

I'm having trouble thinking of a sane way to make DefaultRequestDispatcher more testable. How could I mock out the URL connection part?...

authors: davidxia mattnworb

repo: spotify/helios


text:
TaskClassAmbigiousException in Luigi when yielding tasks in run()

I have stated this in stack overflow. But as I don't know if this is an issue (for me, it seems like one) I put it here too:
https://stackoverflow.com/questions/65803757/taskclassambigiousexception-in-luigi-when-yielding-tasks-in-run

If you read the question on stackoverflow, I think the initial description of the issue was misleading. Anyway, I think there is an issue, so I'll post another one and close it.

If you read the question on stackoverflow, I think the initial description of the issue was misleading. Anyway, I think there is an issue, so I'll post another one and close it.

repo: spotify/luigi


text:
hadoop --config cannot be set in client.cfg

We use a config option for hadoop command, so I put the following line to client.cfg:
command: /usr/bin/hadoop --config /etc/rutarget
This results in a "no such file" error raised by Popen.
Here is a simple fix I can provide, not sure if this is a right way to go.

looks good to me, send it as a PR?

Yep, added #716.

authors: erikbern kalaidin


text:
client doesn't support sets

It looks like the metric type "Set" isn't supported. I was just reading about it here: https://github.com/etsy/statsd/blob/master/docs/metric_types.md
If this repo is still maintained, I don't mind making a PR to add it, but the last update was quite a while ago.

Hi @Asuza thanks for pointing out the missing metric. You're right, "Set" isn't supported. Willing to submit a PR? I will be very happy to merge it.

@pracucci, the PR is ready to go.

authors: Asuza pracucci

repo: spreaker/nodejs-statsd-client

license: isc


text:
fix #417 when fescar upgrade 0.2.0+ configuration file changed

Describe what this PR does / why we need it
when fescar upgrade 0.2.0+ configuration file changed
Does this pull request fix one issue?
fix #417 when fescar upgrade 0.2.0+ configuration file changed
Describe how you did it
Describe how to verify it
Special notes for reviews

@flystar32


text:
Support for multiple Cloud Foundry Instances

I have a geo-distributed service, and have a need to support multiple Cloud Foundry instances.  The service will need to be aware of the Cloud Foundry instance to which its bound, so we will need to include a CF instance identifier as shown in the service broker API docs.

@scottfrederick
I've started a branch to support this using the "routing" method referenced above.  Is this something you'd be interested in merging?
I've looked at using the X-Api-Info-Location header, which is already supported, but, for my use-case, I need to query the cloud controller as an authenticated user, which mean the foundation admin will need to provide UAA credentials in the configuration.

@spiegela Yes, I'd definitely be interested in seeing a pull request for what you are working on.
The X-Api-Info-Location approach is interesting to me also. I will create a separate issue to capture and propagate that field with broker requests if that won't be part of your PR.

Awesome.  I just need to handle the service instance binding controller, and then it'll be ready for review.

authors: scottfrederick spiegela


text:
spring.config.import does not recognize list as input in 2020.0.2

Describe the bug
Application fails to startup because the "spring.config.import does not recognize list as input" during the "postProcessEnvironment" validation checks.
Issue started after upgrade from 2020.0.1 to 2020.0.2
Sample
Create a simple springboot app using gradle with spring cloud dependency.
build.gradle
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.cloud:spring-cloud-starter-config')
}
dependencyManagement {
    imports {
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:2020.0.2"
    }
}

Application.yml:
spring:
  application:
    name: my-test-app
  config:
    import:
      - optional:configserver:\<dev url>
      - optional:configserver:\<test url>
      - optional:configserver:\<prod url>

Duplicates #1849

authors: harshadloya spencergibb

repo: spring-cloud/spring-cloud-config


text:
Provide connector for s3 blobstore service (riak cs)

Tags are ["riak-cs","s3"]

Could https://github.com/cloudfoundry-community/spring-cloud-s3-service-connector be modified or extended to fit the bill?  I'm not sure what the riak cs credentials look like.

I've made one with auto-provisioning (give a jcloud ContextBuilder), you can find it here:  https://github.com/Orange-OpenSource/cloudfoundry-s3-service-connector .
If you are interested let me know, I could integrate it to spring-cloud-cloudfoundry-connector

authors: ArthurHlt davidehringer ramnivas

repo: spring-cloud/spring-cloud-connectors


text:
Activated task functionality

This commit enables task functionality for Spring Cloud Data Flow on
CloudFoundry.  CloudFoundry 1.7.12+ is required for task support.
Resolves spring-cloud/spring-cloud-dataflow-server-cloudfoundry#43
Depends on spring-cloud/spring-cloud-deployer-cloudfoundry#63

I tried this with spring-cloud/spring-cloud-deployer-cloudfoundry#63 on PWS and I was able to successfully create and launch Tasks. One of the Task variant included multiple batch-jobs in it, too.

tried this on "ivory" and I'm getting:
dataflow:>task launch t3
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: Source emitted more than one item

I tried this on api.a1.cf-app.com, (built deployer skipping tests for now) and was able to launch timestamp task. The dumb question though is, how can I know that all went well?
Updated my cf client to the latest edge, but I don't see any command that could help me seeing task based processes.

Yes, how can you view the logs of the completed tasks to verify that it succeeded?

With the v3 cf-cli plugin installed, as soon as I launch the task, I could tail the logs via: cf v3-logs <APP_NAME>. You'd be able to tail only at the launch event, because the container gets created only then.
I didn't try cf v3-logs <APP_NAME> --recent - this might work.
O'wise, you can verify executions via task execution list command or by directly querying the task_execution table.

Using --recent with v3-logs is not an option, so there seems to be no way of launcing a task and looking at the logs. Having to tail the app logs before launching the task seems to me to be the wrong approach.

This is what I get, starting from a clean slate:
dataflow:>app import http://bit.ly/task-applications-maven
Successfully registered applications: [task.spark-yarn, task.spark-cluster, task.spark-client, task.timestamp]
dataflow:>task create mytask --definition "timestamp --format=\"yyyy\""
Created new task 'mytask'
dataflow:>task launch mytask
Launched task 'mytask'
dataflow:>task list
╔═════════╤═════════════════════════╤═══════════╗
║Task Name│     Task Definition     │Task Status║
╠═════════╪═════════════════════════╪═══════════╣
║mytask   │timestamp --format="yyyy"│complete   ║
╚═════════╧═════════════════════════╧═══════════╝

dataflow:>task execution list
╔═════════╤══╤══════════╤════════╤═════════╗
║Task Name│ID│Start Time│End Time│Exit Code║
╚═════════╧══╧══════════╧════════╧═════════╝

dataflow:>task status --name mytask
Feature Not Available

I don't think the last two oddities are CF specific though.
Running task list does trigger CF API chat, as expected

I get the same message from task status on k8s, the task execution list works though.

@ericbottard: I ran into a similar issue, but then I realized the timestamp task was using h2 database instead of mysql. You can see that in the log when the "autoconfiguration" kicks in.
Make sure, you have something similar configured at the server level.

cf set-env sabby-dataflow-server SPRING_CLOUD_DEPLOYER_CLOUDFOUNDRY_SERVICES redis,rabbit,mysql

After the server restage/restart, I was able to see the records in mysql and then in the task execution list, too.

@sabbyanandan Good catch, even though it doesn't seem to work for me, even after adding my_mysql to the list of services. BTW, should we use a separate list of services to bind for streams and tasks? cc @mminella @markfisher
I could not access the logs of my task. The v3 plugin does not seem to work very well for me (v3-apps fails, had to use v3apps, no dash. Then v3-logs complains the app (that it just listed) does not exist...)

I think we need to document the DB requirement for tasks explicitly. Also, we would have to include Task docs in the reference guide - only streams included now.
Good model to follow is what we have done in the k8s reference guide - we need the same includes.

yes, we need to make a distinction for common services at the stream/task level. For all stream apps, we need to bind to the common service that is used by the binders (rabbit or kafka), and for all task apps we need to bind to the DB that is used as a common service for the task execution state. Individual (non-common) services (such as the DB used by a JDBC-based stream app) should still be bindable via a config option at the level of the individual app.

authors: ericbottard markfisher mminella sabbyanandan trisberg


text:
Loading configuration from mounted files with the same file name only loads the final specified file instead of merging values

Describe the bug
When specifying files to be loaded as configuration via the spring.cloud.kubernetes.config.paths option, it only allows for files with unique filenames to be specified. For example, if the following file paths were supplied:
[
"/foo/bar/application.yaml",
"/foo/baz/application.yaml"
]

only the configuration of the latter file is loaded into the application.
We've observed this in the v1.1.5.RELEASE.
Sample
To reproduce, you can specify two mounted files with the same filename but with different paths under spring.cloud.kubernetes.config.paths. Only the second file specified will be loaded into the application.

@ryanjbaxter @spencergibb ping

Closed via 4f8ee21

authors: bruce-au ryanjbaxter

repo: spring-cloud/spring-cloud-kubernetes


text:
Feign Client failed to resolve @RequstMapping on interface with inheritance

Describe the bug
Rest API Interface with inheritance, the @RequestMapping annotation will be ignored.
Sample
public interface Foo {

}

@RequestMapping(path="/bar")
public interface Bar extends Foo{
  @GetMapping("xxx")
  Object someMethod();
}

if i use Bar as interface to generate a feign client, the uri call to someMethod will lose "/bar"
I checked the code, and quiet confused with the code in org.springframework.cloud.openfeign.support.SpringMvcContract$processAnnotationOnClass that
clz.getInterfaces().length == 0

	@Override
	protected void processAnnotationOnClass(MethodMetadata data, Class<?> clz) {
		if (clz.getInterfaces().length == 0) {
        ...

the call to this method has already handled inheriance:
code in feign.Contract
    protected MethodMetadata parseAndValidateMetadata(Class<?> targetType, Method method) {
      final MethodMetadata data = new MethodMetadata();
      data.targetType(targetType);
      data.method(method);
      data.returnType(Types.resolve(targetType, targetType, method.getGenericReturnType()));
      data.configKey(Feign.configKey(targetType, method));

      if (targetType.getInterfaces().length == 1) {
        processAnnotationOnClass(data, targetType.getInterfaces()[0]);
      }
      processAnnotationOnClass(data, targetType);
     ...

I think the statement if (clz.getInterfaces().length == 0)
org.springframework.cloud.openfeign.support.SpringMvcContract$processAnnotationOnClass may be removed.

Hi @sialais,
Please read gh-564

if i use Bar as interface to generate a feign client, the uri call to someMethod will lose "/bar"

When I read this. I think you will use Bar class as interface to your FeignClient. In Feign path variable is used to define path and There is no way to inherit it. As @OlgaMaciaszek mentioned here, I think you can't use @RequestMapping annotation on inherited interface of FeignClient.

if i use Bar as interface to generate a feign client, the uri call to someMethod will lose "/bar"

When I read this. I think you will use Bar class as interface to your FeignClient. In Feign path variable is used to define path and There is no way to inherit it. As @OlgaMaciaszek mentioned here, I think you can't use @RequestMapping annotation on inherited interface of FeignClient.

Yes, Bar is the interface of FeignClient, and path variable is not inherited from Foo.
Foo can be some interface just to mark, like Serializable, and this inheritance will make @RequestMapping be ignored.

By the way, I think it is resonable to use @RequestMapping annotation on child interface and ignore annotation on parent interface if the annotation both on child and parent. (@RequestMapping can be overrided), as the way url mapping in springMVC.

Yes, as @cbezmen has noted, this is not advisable and not supported. Please see the note at the end of this section.

authors: OlgaMaciaszek cbezmen sialais

repo: spring-cloud/spring-cloud-openfeign


text:
Feign Form JsonFormWriter not working correctly

Hi. During implementation found out that default behaviour does not work correctly
I am trying to send dto and byte array in one request
@PostMapping(path = "/stream", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)     void testStreamUpload(             @RequestPart("dto") TestDto testDto,             @RequestPart("file") FormData file     );
though, it does not add dto correctly until I add custom configuration for Feign client:
class Configuration {         @Bean         public AbstractFormWriter jsonFormWriter() {             return new JsonFormWriter();         }     }
It starts working BUT all remaining form writers are now skipped in MultipartFormContentProcessor because JsonFormWriter becomes the only suitable writer.

My possible solution is to reimplement JsonFormWriter to work only with my testDto.
full example

Hello, @kampaii53 feign-form package is not maintained by us. What we do is just add the writer you instantiate as a bean as the first writer in the hierarchy that is being processed. If you do not want to process all the inputs as JSON, you might need to create your own implementation of JsonFormWriter on top of the one provided by us where you will implement the isApplicable method to make sure only the input that matches your conditions is processed as JSON.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Hi @OlgaMaciaszek! Sorry I confused you, I was talking about [https://github.com/spring-cloud/spring-cloud-openfeign/blob/main/spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/support/JsonFormWriter.java](this JsonFormWriter)
The issue reproduced here is me trying to send form, which contains both file and json. So, by default(without JsonFormWriter), if the file is attached, JSON is not being sent. If I add JsonFormWriter to a list of applicable writers, it overrides a byte[] writer which is an issue I'm trying to describe

@kampaii53 Can you also provide a sample multipart file that can be used to reproduce the issue?

@kampaii53 Can you also provide a sample multipart file that can be used to reproduce the issue?

@OlgaMaciaszek Hi! I have updated example with files.
how-to:

start Application
start ClientApplication
use postman/test-form.postman_collection.json requests(imort via postman, needed files are in the same directory)

crutch solution is described in ApplicationClient.Configuration. You need to comment jsonFormWriter bean and uncomment enhancedFormWriter.
ALSO: multipart+dto is still failing even in crutched solution(file is passed, dto is not)

@kampaii53 I have updated the sample so that the Feign call gets propagated to a server-side controller so it's easier to test. I have run some tests on the updated sample. I don't really use Postman much, so I've instead just run httpie commands with the files you've provided (find in README and update file paths before running). Everything works fine for me just with the standard JsonFormWriter.

retried and checked via tests. seems that was my fault annotating controller method with Param instead of RequestPart.
sorry for taking your time

No problem, @kampaii53. I'm happy the issue was solved.


text:
Misaligned spans exception when used with spring-data-mongodb-reactive and spring-cloud-stream

Versions used
Java: 1.8
Spring Boot: 2.4.0-M3
Spring Cloud: 2020.0.0-M4
Spring Cloud Sleuth: 3.0.0-M4
Description of the error
When Spring Cloud Sleuth is used together with Spring Data MongoDB Reactive and Spring Cloud Stream it throws Misaligned spans exceptions.
This is demonstrated by the GitHub project: git@github.com:magnus-larsson/ml-service-sleuth-issue.git
This project contains three tests:

createProductDirect - creates a document in MongoDB using Spring Data MongoDB Reactive
usingStreamWithoutMongoDb - tests Spring Cloud Stream without using MongoDB
createProductUsingStream - combines usage of Spring Cloud Stream and Spring Data MongoDB Reactive

Test 1 and 2 are ok, while test 3 throws an exception:
Misalignment: scoped span NoopSpan(57d50a0ff0504383/82431158846274f5) !=  current span LazySpan(57d50a0ff0504383/62a7279d555f7b0e)
java.lang.AssertionError: Misalignment: scoped span NoopSpan(57d50a0ff0504383/82431158846274f5) !=  current span LazySpan(57d50a0ff0504383/62a7279d555f7b0e)

Instructions to reproduce the error
git clone git@github.com:magnus-larsson/ml-service-sleuth-issue.git
cd ml-service-sleuth-issue
./gradlew test --info

The build will fail and in the log output you can find:
> Task :test FAILED

se.magnus.microservices.core.product.MLTests > createProductUsingStream() FAILED
    java.lang.AssertionError: Misalignment: scoped span NoopSpan(1f60cb80f1401bd6/f134e48ecd166acd) !=  current span LazySpan(1f60cb80f1401bd6/4f33d06bb34e1043)

To make the failing test run ok, one of the following changes can be made to build.gradle:

Remove spring-cloud-starter-sleuth from the dependencies
Change the Spring Boot version to 2.3.2.RELEASE and Spring Cloud version to Hoxton.SR6

Same problem here with the same description, but with newest versions:
JDK 11
Kotlin 1.4.10
Spring Boot 2.4.0
Spring Cloud 2020.0.0-M5
2020-11-25 13:20:29.872 ERROR [app-name_IS_UNDEFINED,abed631d3ccd39ee,f4002f5859cb9edc] 760757 --- [ntLoopGroup-3-4] a.w.r.e.AbstractErrorWebExceptionHandler : [816f22b]  500 Server Error for HTTP PUT "/v1/encodeTypes/code1"

java.lang.AssertionError: Misalignment: scoped span NoopSpan(c48b4623e96c2345/54c16ad747a5cbc9) !=  current span null
	at brave.propagation.ThreadLocalSpan.remove(ThreadLocalSpan.java:164)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
	|_ checkpoint ⇢ Handler cl.santander.txaudit.presentation.EncodeTypeController#update(String, UpdateEncodeTypeDto) [DispatcherHandler]
	|_ checkpoint ⇢ org.springframework.cloud.sleuth.instrument.web.TraceWebFilter [DefaultWebFilterChain]
	|_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
	|_ checkpoint ⇢ HTTP PUT "/v1/encodeTypes/code1" [ExceptionHandlingWebHandler]
Stack trace:
		at brave.propagation.ThreadLocalSpan.remove(ThreadLocalSpan.java:164)
		at brave.mongodb.TraceMongoCommandListener.commandSucceeded(TraceMongoCommandListener.java:103)
		at com.mongodb.internal.connection.ProtocolHelper.sendCommandSucceededEvent(ProtocolHelper.java:289)
		at com.mongodb.internal.connection.LoggingCommandEventSender.sendSucceededEvent(LoggingCommandEventSender.java:142)

We're also experiencing this problem, it is preventing us from upgrading to spring boot 2.4.0.
We're using:
JDK 14
Kotlin 1.4.21
Spring Boot 2.4.0
Spring Cloud 2020.0.0-M6
Gcp dependencies: 1.2.6.RELEASE
spring-cloud-starter-sleuth from Spring Cloud 2020.0.0-M6
spring-cloud-gcp-starter-trace from Spring Cloud 2020.0.0-M6
spring-boot-starter-data-mongodb-reactive
Caused by: java.lang.AssertionError: Misalignment: scoped span NoopSpan(25a281266543b1d3/cb424d6e4c2b7966) !=  current span null
	at brave.propagation.ThreadLocalSpan.remove(ThreadLocalSpan.java:164)
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoLift] :
	reactor.core.publisher.Mono.from(Mono.java:488)
	org.springframework.data.mongodb.core.ReactiveMongoTemplate.lambda$executeFindOneInternal$89(ReactiveMongoTemplate.java:2762)

Stack trace:
Stack trace:
		at brave.propagation.ThreadLocalSpan.remove(ThreadLocalSpan.java:164)
		at brave.mongodb.TraceMongoCommandListener.commandSucceeded(TraceMongoCommandListener.java:103)
		at com.mongodb.internal.connection.ProtocolHelper.sendCommandSucceededEvent(ProtocolHelper.java:289)
		at com.mongodb.internal.connection.LoggingCommandEventSender.sendSucceededEvent(LoggingCommandEventSender.java:142)
		at com.mongodb.internal.connection.InternalStreamConnection$2$1.onResult(InternalStreamConnection.java:460)
		at com.mongodb.internal.connection.InternalStreamConnection$2$1.onResult(InternalStreamConnection.java:440)
		at com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback$MessageCallback.onResult(InternalStreamConnection.java:745)
		at com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback$MessageCallback.onResult(InternalStreamConnection.java:712)
		at com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:582)
		at com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:579)
		at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:255)
		at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:214)
		at com.mongodb.internal.connection.InternalStreamConnection.readAsync(InternalStreamConnection.java:579)
		at com.mongodb.internal.connection.InternalStreamConnection.access$1100(InternalStreamConnection.java:78)
		at com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback.onResult(InternalStreamConnection.java:702)
		at com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback.onResult(InternalStreamConnection.java:687)
		at com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:582)
		at com.mongodb.internal.connection.InternalStreamConnection$5.completed(InternalStreamConnection.java:579)
		at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:255)
		at com.mongodb.connection.netty.NettyStream.readAsync(NettyStream.java:214)
		at com.mongodb.connection.netty.NettyStream.handleReadResponse(NettyStream.java:285)
		at com.mongodb.connection.netty.NettyStream.access$800(NettyStream.java:69)
		at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:344)
		at com.mongodb.connection.netty.NettyStream$InboundBufferHandler.channelRead0(NettyStream.java:341)
		at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
		at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
		at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
		at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
		at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
		at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
		at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
		at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
		at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
		at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
		at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
		at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
		at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
		at java.base/java.lang.Thread.run(Thread.java:832)

Switching to spring-cloud-sleuth-otel solves the problem.

Of course it does cause it doesn't instrument mongo. You can remain with spring-cloud-starter-sleuth and just set spring.sleuth.mongodb.enabled=false and you'll disable it.

@marcingrzejszczak Hehe ok, I didn't know that. But if so it makes sense :)

@magnus-larsson Thank you for the description the sample project and the tests.
Could you please check what happens on your side if you use the latest spring-boot plugin (2.4.0-RC1) and spring-cloud (2020.0.0-M6)?
To me your test consistently passes after this change, I opened a PR in your repo so that you can see what changes I did on your project: https://github.com/magnus-larsson/ml-service-sleuth-issue/pull/1

@jonatan-ivanov Thanks for looking into this. But I have already tried with 2020.0.0-M6 and I get the same error (in my actual project). I'm using Maven though, with spring-boot-starter-parent version 2.4.0. Could that make a difference?

@johanhaleby I don't think the build system would make any difference (though I have seen "impossible" things happening before). But your project is definitely different, it could be another dependency issue (I'm suspicious). Could you please create a sample project that reproduces the issue that I can try debug and fix? What I have now is the sample project in the description which seems to be ok after upgrading the dependencies.

It seems to work when I run ./gradlew test

If you check our documentation page - https://docs.spring.io/spring-cloud/docs/2020.0.0-M6/reference/html/ - you can see with which version of boot it was built (2.4.0).
BTW @johanhaleby since I have you here in Sleuth, can you check this issue in Rest Assured https://github.com/rest-assured/rest-assured/pull/1341 ? :D

I closed it cause I understand that the problem can't be reproduced? If there's anyone that thinks that's not the case please comment.

@marcingrzejszczak Oh sure! It's good that you ping me. I'm overwhelmed by emails from the rest assured project and it's easy for me to miss things. I'll try to cherry-pick it tomorrow and hopefully also make a new release.
In the future, feel free to email me directly if it's something important that's affecting the spring ecosystem that I need to fix :) That goes for awaitility as well :).

@marcingrzejszczak Oh sure! It's good that you ping me. I'm overwhelmed by emails and notifications from the rest assured project and it's easy for me to miss things. I'll try to cherry-pick it tomorrow and hopefully also make a new release.

cc @snicoll , @wilkinsona  - which version of RestAssured would it be best for Spring to have the fix. Just a reminder - we're talking about this issue in Spring (https://github.com/spring-projects/spring-framework/issues/22788) that resulted in this fix for Rest Assured 4.3 (https://github.com/rest-assured/rest-assured/pull/1341). Currently Spring uses 3.x so maybe a cherry pick to Rest Assured 3.x and 4.2 would be good? WDYT?

I'm not maintaining 3.x anymore though :( Too much work for me, unfortunately.

Would 4.2 be possible? Cause @wilkinsona said Boot could bump to 4.2. There's an issue with bumping to 4.3 due to Groovy AFAIR

Hmm, I don't think it would be much different to support 4.2 or 3.x. It would probably mean that the same amount of extra work for me. But I'll see what I can do. I've never done something like this in the ~10-year history of rest assured :)

authors: johanhaleby jonatan-ivanov magnus-larsson marcingrzejszczak vvalencia-cl

repo: spring-cloud/spring-cloud-sleuth


text:
Wrong autoconfig dependency in TraceAsyncCustomAutoConfiguration

There seems to be a misconfiguration of autoconfiguration in the class org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncCustomAutoConfiguration.
@AutoConfigureAfter(   name = {"org.springframework.cloud.sleuth.instrument.scheduling.TraceSchedulingAutoConfiguration"},   value = {BraveAutoConfiguration.class} )
I think it has to be org.springframework.cloud.sleuth.autoconfig.instrument.scheduling.TraceSchedulingAutoConfiguration rather than org.springframework.cloud.sleuth.instrument.scheduling.TraceSchedulingAutoConfiguration.

Is there any error / exception that you're seeing? Which version of Sleuth are you referring to?

No, there is no exception in the log. I just hit a breakpoint for IllegalStateException (in AutoConfigurationClass.getAnnotationMetadata line 237) while investigating another issue.  So it may affect autoconfiguration sorting.
I use Sleuth in version 3.1.5.

So you're saying that there's no such class? If that's the case are you willing to file a PR to fix this?

There is such a class but in another package (see the initial post). But I don't know, whether it's wanted or just a typo.

authors: bleipold marcingrzejszczak


text:
spark streaming processor support

Similar to Spring XD spark streaming processor example
https://github.com/spring-projects/spring-xd-samples/tree/master/spark-streaming-wordcount-java-processor
Will a similar processor be supported with scs?

Hi, @komushi. We don't have plans to integrate Spark Streaming in the programming model. If the requirement is to perform stateful operations, please have a look at Project Reactor (see example1 & example2) and Kafka Streams (see examples) integration.
Also, we have a few OOTB Task applications to launch Spark Jobs.
Lastly, for questions like this, it'd be great if you can use StackOverflow going forward.

Thanks a lot

authors: komushi sabbyanandan

repo: spring-cloud/spring-cloud-stream


text:
Document dependency functionality

in org.springframework.cloud.zookeeper.discovery.dependency

@marcingrzejszczak

So as not to forget:

spring-cloud-zookeeper.adoc somewhere under the discovery section

@spencergibb  - do we close this one?

Closed via 82028fd8f532e510bec61a1a9fdca2651ae475fa

authors: marcingrzejszczak spencergibb

repo: spring-cloud/spring-cloud-zookeeper


text:
groups as m2m relationship to projects

As a second opinion to avoid having a project's groups as a comma-delimited string value and to render groups dynamically from the database, this PR introduces a project_groups as a new reference table to house all project groups (tags). It relates to the existing project table with a ManyToMany relationship by a relating table project_groups_rel. A Project entity now includes a set of related groups.

I'd vote to avoid the bidirectional relationship between Project to ProjectGroup and in particular cut the ProjectGroup -> Project dependency as I think it'll grow faster than the relationship into the other direction, assuming that a lot of projects will belong to a single group but a project only being part of a very few groups. The ProjectMetadataService. addToGroup(…) would then become a simple groups.forEach(project::add).
The cut dependency can be replace by a List<Project> findByGroup(…) in ProjectMetadataRepository using a declared query. I am pretty sure the currently declared List<Project> findByGroups(ProjectGroup group, Sort sort); is not executed anywhere as it's basically an invalid query (comparing a Set to a ProjectGroup).
As there's a repository for ProjectGroup, the latter is becoming an aggregate which means that they need a separate lifecycle in terms of persistence. That meaning, that persistence operations must not cascade from the project to the group.

Thanks @odrotbohm. I applied the changes, please take a look now and let me know.
Note: I left a couple of endpoints with one query for some interim test purposes during this refresh feature iteration that will be removed once the feature is complete.

authors: Haybu odrotbohm

repo: spring-io/sagan


text:
Scanner fails to fully resolve properties before downloading

Describe the bug
A clear and concise description of what the bug is.
When scanning in my project, I get the following error:
Illegal character in path at index 88: file:/C:/Users/<user>/.m2/repository/org/dcsa/shared-kernel/dcsa-shared-kernel-parent/0.1.0${dcsa.shared-kernel.tag}-SNAPSHOT/dcsa-shared-kernel-parent-0.1.0${dcsa.shared-kernel.tag}-SNAPSHOT.pom Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.
As far as I can gather, this happens because the migrator does not fully resolve properties before downloading.  I was able to work around this problem by manually expanding the properties temporarily:
$ git show
commit d35137be9e8da564685a593b5afc254dc4754604 (HEAD -> next-phase)
Author: Niels Thykier <nit@globeteam.com>
Date:   Tue Jan 3 09:50:51 2023 +0100

    test migrator

diff --git a/pom.xml b/pom.xml
index 38da62f..8b76210 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,8 +29,7 @@
                <dcsa.shared-kernel.version>0.1.0</dcsa.shared-kernel.version>
                <dcsa.shared-kernel.tag/>
                <dcsa.shared-kernel.artifacttype>-SNAPSHOT</dcsa.shared-kernel.artifacttype>
-               <shared-kernel.version>${dcsa.shared-kernel.version}${dcsa.shared-kernel.tag}${dcsa.shared-kernel.artifacttype}
-               </shared-kernel.version>
+               <shared-kernel.version>${dcsa.shared-kernel.version}</shared-kernel.version>
                <!-- End: Define Shared kernel version -->
                <testcontainers.version>1.17.3</testcontainers.version>
                <testcontainers.keycloak.version>2.2.2</testcontainers.keycloak.version>

I then ran into the scanner failing to resolve my dependencies, which maven has no issues with (but does require auth from my .m2/settings.xml to access a github repository).  Not sure what happened there, but I parked the migrator at that point.
To Reproduce
Steps to reproduce the behavior:
Have a project where a dependency uses a property that itself depends on another property (see my git diff above for a more concrete example).
Expected behavior
A clear and concise description of what you expected to happen.
Given maven resolves this property fully before downloading, I expected the migrator to do so as well.
Screenshots
If applicable, add screenshots to help explain your problem.
Stacktrace
If applicable, add the (sanitized) stacktrace here.
The stacktrace is not applicable, the stacktrace is triggered by the partial resolved property creating an invalid URL. But the stacktrace is not the root cause, so I have omitted it.
Desktop (please complete the following information):

OS: Windows
Version: 10
Spring-boot-migrator downloaded from: https://github.com/spring-projects-experimental/spring-boot-migrator/releases/tag/0.13.0

Additional context
Add any other context about the problem here.

Hi @nt-gt
Happy New Year!
Thank you for reporting and providing such a detailed description. 🚀
I will need to set up an example project which will take some time.
I will ping you as soon as I can reproduce the problem.


text:
Provide hsqldb database support (issue 303)

Issue: https://github.com/spring-projects-experimental/spring-graalvm-native/issues/303
Add a new hint HSQLDBHints to import required class and resources.
Add a substitute to hsqlb class FrameworkLogger. This class attempts to retrieve log configuration at runtime but cannot find them since the property java.home is not set (see https://sourceforge.net/p/hsqldb/src/org/
hsqldb/lib/FrameworkLogger.java#l364).
To workaround this issue the method isDefaultJdkConfig is overriden.

@Query-Interface Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@Query-Interface Thank you for signing the Contributor License Agreement!

Thanks a lot I will review and hopefully merge it next week.

Merged via 16a5bed878ba364a431757a577352fb78994ff15 thanks for your contribution.


text:
Why are AnthropicChatOptions's getModel(), getFrequencyPenalty(), and getPresencePenalty() methods not implemented?

In the AnthropicChatOptions class, I noticed that the getModel(), getFrequencyPenalty(), and getPresencePenalty() methods are returning null. Can you clarify why these methods are not fully implemented? Are these options not relevant to the Bedrock implementation, or are there plans to implement them in the future?
Are these features not supported by Bedrock at the moment, or are there plans to implement them internally in the near future?
models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/Anthropic3ChatOptions.java

@cowboysj this is the old bedrock api. We are working on replacing it with the new Bedrock Converse API. But this would be limited to the fields that the Bedrock Converse and the Anthropic API. provide.
The Spring AI direct Anthropic integration, supports everything: https://docs.spring.io/spring-ai/reference/api/chat/anthropic-chat.html
and allows you to access any native anthropic options: https://docs.spring.io/spring-ai/reference/api/chat/anthropic-chat.html#_chat_properties

authors: cowboysj tzolov

repo: spring-projects/spring-ai


text:
/.well-known/openid-configuration endpoint Expected @Transient Authentication

Describe the bug
The problem occurs when accessing /.well-known/openid-configuration after logging in
To Reproduce
Start https://github.com/spring-projects/spring-authorization-server/tree/main/samples/default-authorizationserver
Access http://auth-server:9000/login to log in
Access the http://auth-server:9000/.well-known/openid-configuration endpoint
The console throws an exception and then returns a 302 redirect
java.lang.IllegalStateException: Expected @Transient Authentication
	at org.springframework.util.Assert.state(Assert.java:76) ~[spring-core-5.3.15.jar:5.3.15]
	at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer$1$1.saveContext(OAuth2AuthorizationServerConfigurer.java:284) ~[spring-security-oauth2-authorization-server-0.2.3-SNAPSHOT.jar:0.2.3-SNAPSHOT]
	at org.springframework.security.web.context.HttpSessionSecurityContextRepository.saveContext(HttpSessionSecurityContextRepository.java:139) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer$1.saveContext(OAuth2AuthorizationServerConfigurer.java:322) ~[spring-security-oauth2-authorization-server-0.2.3-SNAPSHOT.jar:0.2.3-SNAPSHOT]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:116) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:336) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:211) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:183) ~[spring-security-web-5.5.4.jar:5.5.4]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267) ~[spring-web-5.3.15.jar:5.3.15]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.15.jar:5.3.15]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117) ~[spring-web-5.3.15.jar:5.3.15]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) ~[tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1732) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.56.jar:9.0.56]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

Expected behavior
return json data
Sample
use this spring sample to reproduce the problem

Thanks for reporting this @wensimin. I've confirmed that this is a bug. We'll get a fix in shortly.

@jgrandja I'm hitting the same bug. Any ETA on this one? Can I probably help fixing this?

@wensimin @thomasbecker I just pushed the fix.

Change looks good! Thanks a lot @jgrandja!

authors: jgrandja thomasbecker wensimin


text:
Proposal: print actual value in containsExactly assertion message

Without this change debugging failing assertions requires changing the test implementation.

This then could also be applied to the contains assertion.

repo: spring-projects/spring-graphql


text:
Reloading properties files

Hello,
Can you support the reload of properties files like i18n etc ?
It seems to not working when i add a message and use it directly in my JSP.

Yes, it does only watch class files right now (and most recently jars of classes too) - but it can theory watch anything/everything for changes.

It would be nice, it is especially a pain since spring loaded doubles the start time of my webapp

yeah, it would be great if properties file could be reloaded!!

authors: aclement callain jama707

repo: spring-projects/spring-loaded


text:
Install maven in Dev Container

The documentation mentions maven but is not included in the dev container

@harsha-s Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@harsha-s Thank you for signing the Contributor License Agreement!

authors: harsha-s pivotal-cla

repo: spring-projects/spring-petclinic


text:
[Sprint 53] [1.2.x] XD-2957 Added Optimizing Serialization

Docs

Both excellent points

LGTM I'll update the doc with the comments upon merge.

Merged

authors: cppwfs dturanski

repo: spring-projects/spring-xd


text:
Make ApiResourceController methods public

ApiResourceController is a public class with no public methods in it. It would be useful to make the 3 actions that it defines public.
In my use case, I need to put certain additional annotations on these methods to make them publicly visible to our routing library. I'd like to either be able to inherit from the class or delegate to the controller instance from my own controller to achieve this, but with the code as is, I have to define my class within the springfox.documentation.swagger.web package.

Would you mind sharing what it is in the controller that you need to make public to your routing library? Seems like your routing library shouldn't have to care about this class.

@dilipkrish I need to add a certain annotation to each of these methods, so that they are detected by the piece of code that registers routes in external configuration, so that they can later be accessed through our level 7 load balancer/router. Routes published by this controller are used by Swagger UI, which is the thing that I want to make accessible in the first place.
Making these public will also simplify cases when people want to remap these endpoints to other URLs. Right now you have to use redirects for this.

authors: dilipkrish psyho

repo: springfox/springfox


text:
Need way to override XForwardPrefixPathAdjuster behavior

My team is currently using version 2.8.0, but attempting to upgrade to use version 2.9.2 in sync with upgrades to the Spring Boot version we are using. We currently have many microservices running behind a Zuul API Gateway implementation.
The microservices are reachable behind their own specific URLs:
http://service1host:8080/service1/restservices/asdf
http://service2host:8080/service2/restservices/defg
Then we have Zuul API Gateway running on its own host:
http://apigatewayhost:8080/api-gateway/...
To reach the microservices behind the Gateway, they call the context path that is given for the microservice they are trying to reach; i.e to reach service1 they would call
http://apigatewayhost:8080/api-gateway/service1/restservices/asdf
To reach service2, they would call
http://apigatewayhost:8080/api-gateway/service2/restservices/defg
In the API Gateway, before we forward the request to the microservice, we attach a "X-Forwarded-Prefix" header of "/api-gateway/". In Springfox 2.8.0, the contextPath of the microservice was appended to this prefix, and everything was working fine - the Swagger basePath would be "/api-gateway/service1" and the Swagger "try it out" would work from the API Gateway - as in, it makes the call correctly to
http://apigatewayhost:8080/api-gateway/service1/restservices/asdf
However, when we upgrade to Springfox 2.9.2, this contextPath is no longer appended to the prefix. So the Swagger basePath always appears as "/api-gateway/". This breaks Swagger's "try it out" from the API Gateway when trying to call these microservices. As in, when trying to call "http://apigatewayhost:8080/api-gateway/service1/restservices/asdf", the context path of the microservice is cut out and it is instead trying to call "http://apigatewayhost:8080/api-gateway/restservices/asdf", which is not valid.
The change appears to be in the XForwardPrefixPathAdjuster class:
https://github.com/springfox/springfox/blob/71553ac5e8142aed1c2e809c852959e177d4fd4f/springfox-swagger-common/src/main/java/springfox/documentation/swagger/common/XForwardPrefixPathAdjuster.java#L47-L51
In 2.8.0, the behavior was to always return "prefix + path" but now it will only return "prefix" if the Spring Boot version supports x-forwarded.
Is there anyway to override this behavior? My initial thought was to simply attach the context path to the X-Forwarded-Prefix header from the API Gateway, but any microservice that is still running with Springfox version 2.8.0 would then have this context path duplicated in the Swagger basePath. I do not have control over the microservices in order to force them to upgrade Springfox versions.  We would like a way to be able to control whether or not to return "prefix + path" no matter which version of Spring Boot we are on.

@skylar-stark Plan to release 3.0.0 in the coming few days. Id be interested in learning how 3.0.0 compares. I'd like to fix this in 3.0.0 and I suspect it may work. Would you mind checking this and reporting back?

@dilipkrish I've tested it with 3.0.0-SNAPSHOT and it appears to be working as I hoped - the context path is getting appended to the X-Forwarded-Prefix and it is working through our API Gateway as intended. Much thanks!

Awesome! Thanks for reporting back @skylar-stark

@dilipkrish This is not working in 3.0.0 when upgrading to it this morning - I am thinking that when I tested using 3.0.0-SNAPSHOT, it was actually an invalid test and I wasn't correctly using the new version (instead using version 2.8.0 still).
After upgrading to 3.0.0, /v2/api-docs does not contain any mappings for my APIs and the swagger-ui page show the message 'No operations defined in spec!'. The /v2/api-docs json does include the app info including name, description, and contact info, so I know that the configuration class is getting picked up correctly.
My SwaggerConfig class looks like:
package com.skylarstark.spring.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

import java.util.Collections;

import static springfox.documentation.builders.PathSelectors.regex;

@Configuration
public class SwaggerConfig {

	@Bean
	public Docket apiDocket(Environment environment) {
		Contact contact = new Contact(
			environment.getProperty("info.app.contact.name"),
			environment.getProperty("info.app.contact.url"),
			environment.getProperty("info.app.contact.email"));

		ApiInfo apiInfo = new ApiInfo(
			environment.getProperty("info.app.name"),
			environment.getProperty("info.app.description"),
			environment.getProperty("info.version"), null, contact, null, null, Collections.emptyList());

		return new Docket(DocumentationType.SWAGGER_2)
			.apiInfo(apiInfo)
			.select()
			.apis(RequestHandlerSelectors.any())
			.paths(regex("/restservices/.*"))
			.build();
	}
}

The only thing I changed in this config class after upgrading to 3.0.0 was the removal of the EnableSwagger2 annotation.
Am I missing something here?

authors: dilipkrish skylar-stark


text:
Ease in and out animation

As far as I have explored, the accordion lacks animation, for opening and closing. Would be nice to have this feature.
Expected behaviour:
https://user-images.githubusercontent.com/56493775/223389122-a6742bb4-64fa-41f5-80d7-32d5d5214fe2.mp4

This is the same problem I have with it. Did you find your way around it?

repo: springload/react-accessible-accordion

license: mit


text:
TypeError: (0 , siwe_parser_1.isEIP55Address) is not a function

When I use SIWE to verify the signature on the server side, an error occurs:
TypeError: (0 , siwe_parser_1.isEIP55Address) is not a function
at SiweMessage.validateMessage (E:\demo-server\node_modules\siwe\dist\client.js:317:47)    at new SiweMessage
const { message, signature } = req.body;     const siweMessage = new SiweMessage(message); //This will throw an exception     try {         await siweMessage.verify({ signature });         res.send(true);     } catch {         res.send(false);     }
"dependencies": {
"express": "^4.18.2",
"ethers": "^5.7.2",
"siwe": "^2.1.4"
}
how can i solve this problem? thx

I updated @spruceid/siwe-parser to solve the problem

repo: spruceid/siwe


text:
SSM tag methods should error with InvalidResourceId if not there

In #1024 changes were made to emulate tagging methods in the ssm subsystem.  Unfortunately they do not behave like AWS does.  When a resource is not available, AWS returns an InvalidResourceId error.  Here is an example I recorded with vcrpy:
  request:
    method: POST
    uri: https://ssm.us-west-2.amazonaws.com/
    body: '{"ResourceType": "Parameter", "ResourceId": "special-not-there-4"}'
  response:
    body:
      string: '{"__type":"InvalidResourceId"}'
    status:
      code: 400
      message: Bad Request

Here is the response from moto, which is incorrect:
(Pdb) pp client.list_tags_for_resource(ResourceType="Parameter", ResourceId="special-not-there-4")
{'ResponseMetadata': {'HTTPHeaders': {'server': 'amazon.com'},
                      'HTTPStatusCode': 200,
                      'RetryAttempts': 0},
 'TagList': []}

Thanks for raising this @jeking3!

repo: spulec/moto


text:
Implement assume_role_with_web_identity

The AssumeRoleWithWebIdentity is a similar endpoint to STS's AssumeRole
where the authentication element is a JWT id_token from a configured OP.
This commit implements the functionality and relies on the same result
generated for the regular AssumeRole.
This implements feature #2312

Coverage increased (+0.02%) to 93.118% when pulling e54f74776b0b69a3fa848dba946951a532b30aa1 on caguado:fix/2312 into 9acdc59aa4ec54e2b995a4793503513e0b0dc055 on spulec:master.

Thank you!

authors: caguado coveralls spulec


text:
Spyder crashing while idling in background.

Problem Description
Spyder crashes while sitting idle in background
(idle in background means the Spyder window is open on the desktop, but not in active use. Occurs whether or not focus is on the window.)
What steps reproduce the problem?

Launch spyder
wait a while (30-60 minutes or so)

No error dialog, nothing. Spyder just disappears.
The crash occurs consistently pretty much every time spyder is run and left idling
Launched from anaconda prompt with --debug-verbose --report-segfault
Here's the last lines up to the crash
2020-11-24 19:02:01,293 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-24 19:03:01,283 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-24 19:04:01,292 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-24 19:05:01,277 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-24 19:06:01,282 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:189)
2020-11-24 19:06:07,870 [ERROR] [asyncio] -> Exception in callback BaseSelectorEventLoop._read_from_self()
handle: <Handle BaseSelectorEventLoop._read_from_self()>
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "C:\ProgramData\Anaconda3\lib\asyncio\selector_events.py", line 119, in _read_from_self
    data = self._ssock.recv(4096)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)

Runtime environment -
Windows 10 Home, 64bit
Spyder 4.1.5
Python 3.7.7
PYQT_VERSION = 329986
PYQT_VERSION_STR = 5.9.2
QOpenGLVersionProfile = <class 'PyQt5.QtGui.QOpenGLVersionProfile'>
QOperatingSystemVersion = <class 'PyQt5.QtCore.QOperatingSystemVersion'>
QT_VERSION = 329990
QT_VERSION_STR = 5.9.6
QVersionNumber = <class 'PyQt5.QtCore.QVersionNumber'>

Spyder 4.1.5 installed yesteday over 4.1.4
PyQt updated to latest yesterday

Hey @Llaves, thanks for reporting. It seems another program (probably your firewall or antivurs) is closing a connection Spyder needs in the background.
So please try to deactivate them and see if that's what's causing the crash.

I run the native WIndows 10 Defender for virus and firewall. I turned both off completely (or as completely as I understand), then launched Spyder from the command prompt. It took several hours, but it eventually crashed:
2020-11-25 12:35:30,485 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-25 12:36:30,484 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
2020-11-25 12:37:30,486 [DEBUG] [spyder.plugins.editor.utils.autosave] -> Autosave triggered
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:368)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:189)
Assertion failed: Connection reset by peer [10054] (C:\ci\zeromq_1599741307349\work\src\signaler.cpp:189)

What can I look at next to help track this down?

I have no idea, sorry. As I said, from your logs it seems another program is closing a connection opened by Spyder, which causes the crash.

The fact that a closed network connection was the cause hinted that I should look at something in the networking stack. The prime suspect was Networx, a program for monitoring network traffic, since it inserts itself at the top of the stack. I shut down Networx and Spyder has been running for over 15 hours, far in excess of the time it took to crash in the past. Not only that, but it survived multiple sleep and hibernate transitions, which in the past also caused a crash with high regularity.
So dear reader, if you find yourself in a similar situation, check for any programs that attach to the network stack, like traffic monitors, firewalls, VPN, and the like.

Glad you were able to figure this one out @Llaves!

repo: spyder-ide/spyder