[flutter_tools] Fix breakage when main is tagged with @doNotStore

When a test main is tagged with @doNotStore, and the return_of_do_not_store lint is enabled, #76200 will be a breaking change.

What is doNotStore?

I just found out today as well... Apparently there's a lint where doing the following will be an error.
import 'package:meta/meta.dart'

@doNotStore
String thing() {
  return 'abc'
}

void main() {
  final a = thing(); // LINT
}

Not really sure why the tests are failing on CI but passing locally though, will investigate a bit further

TIL!

the problem here is that you can't await a Function that returns void either. TBH, this seems like a hole in doNotStore. You'd need excessive is checks for all of the different kinds of main functions, so that you can strategically await. I don't see a better way through this besides an ignore

Yeah, agreed about how doNotStore should probably handle returning void. Then again users could still cast the void value to something else so I'm also not sure how that should be handled best.
I don't understand why the test was passing for me locally just now, rerunning it again causes it to fail now 😅 . Re: avoiding breaking users who do annotate main with @doNotStore, what about wrapping the whole thing in a Future? Then we can await it unconditionally.
I'm not sure how to add a test for this though, as there doesn't appear to be a way to turn on the lint. Whatever I do causes the doNotStore test case that fails in Google3 to pass even without this PR.

Seems reasonable, though I would think that would trigger the lint too - at any rate - as long as the existing tests are passing it should be OK

I think the lint is only triggered if the annotated expression is propagated by a function through the returned value. Since we await it here instead of returning it in _testMain, it's fine. (Also tested this internally with the failing case)


YouPiP makes YouTube crash when trying to play a video.

On iOS 12.5.5, when opening YouTube v17.08.2 or any downgraded version, YouPiP crashes the whole app completely when selecting a video.

https://streamable.com/sipde3

Crash log? @mip82324

https://mega.nz/file/S6hFVQCS#1Iu6CdiX7x9-W6eyFceAMe8Ln4TwudC7xDjdJZI_894

@mip82324 And no more crashing if YouPiP is disabled or uninstalled?

Yeah I disable it with iCleaner Pro.

The crash log you provided doesn't point any direct causes at YouPiP and I can't seem to reproduce on my iPhone 5s iOS 12.5.5 with that exact YouTube version. 😐

Well.. to be honest, it may just be my phone but I'll link a little video understanding, I don't know if this might help but here's a video with YouPiP enabled - https://streamable.com/w9uy7d - and without YouPiP enabled - https://streamable.com/3g2my9
Hope this helps a bit!

@mip82324 Try this version (Unzip first the install the deb using Filza)
com.ps.youpip_1.6.7_iphoneos-arm.deb.zip

Works perfectly!! but it doesn't continue after I dismiss it, it disappears when you exit the app.

@mip82324 You may want to try installing ForceInPicture or seeing if tapping PiP button on the video overlay works.


[Mesa] Update to 22.1.7

@Neumann-A , Is this PR being worked on?

@Neumann-A , When I tested the features by command "./vcpkg install mesa[*]:x64-windows", I got the error:
FAILED: bin/LLVM-C.dll lib/LLVM-C.lib
cmd.exe /C "cd . && F:\Feature-test\mesa\vcpkg\downloads\tools\cmake-3.24.0-windows\cmake-3.24.0-windows-i386\bin\cmake.exe -E vs_link_dll --intdir=tools\llvm-shlib\CMakeFiles\LLVM-C.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x64\link.exe  @CMakeFiles\LLVM-C.rsp  /out:bin\LLVM-C.dll /implib:lib\LLVM-C.lib /pdb:bin\LLVM-C.pdb /dll /version:0.0 /machine:x64 /nologo    /debug /INCREMENTAL  /DEF:"F:/Feature-test/mesa/vcpkg/buildtrees/llvm/x64-windows-dbg/tools/llvm-shlib/LLVM-C.def"  && cd ."
LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x64\link.exe @CMakeFiles\LLVM-C.rsp /out:bin\LLVM-C.dll /implib:lib\LLVM-C.lib /pdb:bin\LLVM-C.pdb /dll /version:0.0 /machine:x64 /nologo /debug /INCREMENTAL /DEF:F:/Feature-test/mesa/vcpkg/buildtrees/llvm/x64-windows-dbg/tools/llvm-shlib/LLVM-C.def /MANIFEST /MANIFESTFILE:tools\llvm-shlib\CMakeFiles\LLVM-C.dir/intermediate.manifest tools\llvm-shlib\CMakeFiles\LLVM-C.dir/manifest.res" failed (exit code 0) with the following output:
   Creating library lib\LLVM-C.lib and object lib\LLVM-C.exp

LINK : fatal error LNK1000: Internal error during LIB::Search
Access violation
ninja: build stopped: subcommand failed.

Please take a look.

Why should this PR care about your issue building LLVM? I was able to build llvm succesfully and CI is also able to build it. Furthermore, this PR is not touching llvm.

Why should this PR care about your issue building LLVM? I was able to build llvm succesfully and CI is also able to build it. Furthermore, this PR is not touching llvm.

I noticed that the feature of this pr has llvm, and your changes also involve the llvm feature. I can test all the features under the x86-windows triplet normally locally, but this problem occurs under X64-Windows, and the x86-windows and X64-windows have built llvm，I clone your repository locally and then check to your branch to test
PS F:\Feature-test\mesa\vcpkg> ./vcpkg install mesa[*]:x64-windows
Computing installation plan...
The following packages will be built and installed:
  * llvm[clang,compiler-rt,core,default-options,default-targets,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,libclc,lld,target-spirv,target-x86,tools]:x64-windows -> 14.0.4
    mesa[core,default-features,egl,gles1,gles2,llvm,offscreen,opengl]:x64-windows -> 22.1.7
  * zstd[core]:x64-windows -> 1.5.2#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Restored 0 package(s) from C:\Users\test\AppData\Local\vcpkg\archives in 309.6 us. Use --debug to see more details.
Installing 1/3 llvm:x64-windows...
Building llvm[clang,compiler-rt,core,default-options,default-targets,disable-assertions,disable-clang-static-analyzer,enable-bindings,enable-rtti,enable-terminfo,enable-threads,enable-zlib,libclc,lld,target-spirv,target-x86,tools]:x64-windows...
-- Note: llvm only supports static library linkage. Building static library.
-- Using cached llvm-llvm-project-llvmorg-14.0.4.tar.gz.
-- Cleaning sources at F:/Feature-test/mesa/vcpkg/buildtrees/llvm/src/org-14.0.4-df58f01928.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source F:/Feature-test/mesa/vcpkg/downloads/llvm-llvm-project-llvmorg-14.0.4.tar.gz
-- Applying patch 0002-fix-install-paths.patch
-- Applying patch 0004-fix-dr-1734.patch
-- Applying patch 0005-fix-tools-path.patch
-- Applying patch 0007-fix-compiler-rt-install-path.patch
-- Applying patch 0009-fix-tools-install-path.patch
-- Applying patch 0010-fix-libffi.patch
-- Applying patch 0011-fix-install-bolt.patch
-- Using source at F:/Feature-test/mesa/vcpkg/buildtrees/llvm/src/org-14.0.4-df58f01928.clean
-- Found external ninja('1.10.2').
-- Getting CMake variables for x64-windows
-- Configuring x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:129 (message):
    Command failed: F:/Feature-test/mesa/vcpkg/downloads/tools/cmake-3.24.0-windows/cmake-3.24.0-windows-i386/bin/cmake.exe --build . --config Debug --target install -- -v -j9
    Working Directory: F:/Feature-test/mesa/vcpkg/buildtrees/llvm/x64-windows-dbg
    See logs for more information:
      F:\Feature-test\mesa\vcpkg\buildtrees\llvm\install-x64-windows-dbg-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/llvm/portfile.cmake:254 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)

error: building llvm:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+llvm
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[llvm]+Build+error
Include '[llvm] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-09-01-dfb82802c8cc562ce3b665a904a65b22314de724
    vcpkg-scripts version: 5418afc3b 2022-09-05 (3 days ago)

You can also use the prefilled template from F:\Feature-test\mesa\vcpkg\installed\vcpkg\issue_body.md.

Still it is an LLVM build issue and llvm was not touched by me. I just corrected the llvm dependency in mesa to be correct.
Issues with llvm could be: not enough disk space or ram

All features are tested successfully in the folllowing triplet:

x86-windows
x64-windows


adds npm to  correct make task

What
adds dist
Describe what you have changed and why.
Added dist output directory to the assets build step
How to review
Describe the steps required to test the changes.
running a develop build in concourse
Who can review
anyone
Describe who worked on the changes, so that other people can review.
myself

Could you please explain how changing the order of the dependency resolution in the Makefile adds a dist output directory to the assets build step?

Hey @gilesburdett it runs a make public-build make task, which calls npm run build:prod. I needed to change the order as I was calling this command too early.


CRA unit tests are polluted with warnings for PropTypes and CreateClass

After installing redux-form and converting a widely used component, I'm suddenly seeing lots of deprecation warnings for React.PropTypes and React.CreateClass (a pair for each parent component my reduxForm component is used by). It's not terrible as tests still pass, but it adds noise to the test results.
To reproduce:

Install create-react-app v1.4.0
Run create-react-app rf-warn-test.
CD into ./rf-warn-test then npm install -S react-redux redux redux-form
Run npm test and leave open.

Notice that the test will pass and no warnings or errors

Modify App.js to use redux-form:

import React, { Component } from 'react';
import {reduxForm} from 'redux-form';

import logo from './logo.svg';
import './App.css';

class App extends Component {
  render() {
    return (

Welcome to React

          To get started, edit src/App.js and save to reload.

    );
  }
}

export default reduxForm({
  form: 'AppForm'
})(App);

Now, notice that the unit test shows 2 warnings:
console.warn node_modules/react/lib/lowPriorityWarning.js:40
    Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in  React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs

console.warn node_modules/react/lib/lowPriorityWarning.js:40
    Warning: Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement. For more info see https://fb.me/react-create-class

There are other issues (like store is not created or connected, etc), but in my production app, those things are working. The point is these 2 warnings get duplicated for every component that depends on a component connected with ReduxForm.
Environment and Dependencies:

OSX v10.11.6
react: 15.6.1
react-dom: 15.6.1
react-redux: 5.0.6
redux: 3.7.2
redux-form: 7.0.4
react-scripts: 1.0.13

Other information
I know that in PR #2800 the issue was resolved, but it seems to be showing up only in the unit tests now and is just a little noisy. I assume that before #2800 was merged into 6.6.3, this was showing up in the browser console and npm run, just like it did in my own app before I migrated to prop-types.
I did a search for "PropTypes" in this repo and didn't find any "React.PropTypes" so I'm not sure where these warnings are coming from. I also checked the 2 dependencies that download with redux-form: hoist-non-react-statics had nothing but propTypes:true. es6-error didn't show anything at all (as I would have guessed).

Duplicate of #3385

Published fix in v7.1.0.


Expose Get Executions State and Response

This expands the contract to allow users get the value of state and
response. Useful for saving the state to a DB or dumping the response
for debugging.

Awesome :+1:


Git: Support random branch name generation

We could offer to automatically generate a branch name when creating a new branch.
We could plug this feature in both the Create Branch and Checkout commands:

This seems like a nice collection of adjectives and names: https://www.npmjs.com/package/docker-names

Also allow to configure a prefix, ie joao/.


ZHAThermostat - display temperature of external sensor

I am using a Ubisys H1 thermostat. In the latest firmware (1.5 / 1.5.1) they added the ability to bind external sensor to the thermostat. I bound a SONOFF sensor and this works great. But in Home I still see the temperature of the H1 internal sensor. It looks like they don't disable it and don't expose the temperature of the external sensor. So it would be nice to link the sensor to the thermostat in homebridge-deconz, too. Could you add this?

(this could be one item because the Thermostat uses the temperature of the sensor)

they added the ability to bind external sensor to the thermostat.

That's a standard Zigbee feature, but not exposed by the deCONZ REST API.  Homebridge deCONZ has no way of knowing whether such binding exists.

So it would be nice to link the sensor to the thermostat in homebridge-deconz, too. Could you add this?

No.  I won't be combining multiple devices into a single accessory.  And even if I would consider that, Homebridge deCONZ wouldn't know when to do this, as it has no knowledge of the Zigbee bindings.

It looks like they don't disable it and don't expose the temperature of the external sensor.

Maybe there's a setting on the H1 to report the temperature of the external sensor instead of the internal sensor?  Otherwise: How does deCONZ expose the H1?  If the temperature of the external sensor is exposed through some other REST API attribute, it might use it en lieu of the internal state/temperature.  I cannot expose both on a single accessory, as that would break Eve history for the thermostat.

I think even deCONZ does not know there is a binding (I never found a way to view all bindings of a device)?
The H1 DDF was done for firmware version 1.4.0 and the binding feature was added in 1.5.0. It is exposed like this:
{
  "config": {
    "battery": 100,
    "group": "20006",
    "heatsetpoint": 1700,
    "mode": "heat",
    "offset": 0,
    "on": true,
    "reachable": true,
    "schedule": {
      "W127": [
        {
          "heatsetpoint": 1400,
          "localtime": "T00:00"
        },
        {
          "heatsetpoint": 1700,
          "localtime": "T07:00"
        },
        {
          "heatsetpoint": 2000,
          "localtime": "T16:00"
        },
        {
          "heatsetpoint": 1400,
          "localtime": "T20:30"
        }
      ]
    },
    "schedule_on": true,
    "unoccupiedheatsetpoint": 1600
  },
  "etag": "992b61a30a01a2137e2928aec4823b05",
  "lastannounced": null,
  "lastseen": "2024-01-04T06:17Z",
  "manufacturername": "ubisys",
  "modelid": "H1",
  "name": "Thermostat DG Erik",
  "state": {
    "lastupdated": "2024-01-04T06:17:49.094",
    "on": false,
    "temperature": 2200,
    "utc": "2024-01-04T06:17:43Z",
    "valve": 0
  },
  "swversion": "1.5.1",
  "type": "ZHAThermostat",
  "uniqueid": "00:1f:ee:00:00:00:98:af-01-0201"
}

The real temperature from the external SONOFF sensor is
  "name": "Sensor DG Erik",
  "state": {
    "lastupdated": "2024-01-04T06:18:53.965",
    "temperature": 1786
  },

I already looked at the clusters listed in the deCONZ UI but I can't find anything releated to the external sensor. Its only the display of the device that shows it. I don't know if there are clusters that deCONZ does not show?
Is there a best practice how other manufacturer expose the external temperature? Maybe I could Ubisys ask to implement it like it.

I already contacted Ubisys and they sent me their in-draft technical reference.

This is the temperature I am looking for:

So I guess the correct way is to expose this as config/externalsensortemp? And homebridge-deconz could use this as current temperature instead of state/temperature?

The question was to ask if that could be done manually. Something like linking 2 sensors together via resource-item (in homebridge-hue times). Because you're already merging multiple sensor endpoints to one accessory (temperature and humidity for example).

Those are resources for the same device.  You’re asking to combine (resources for) multiple devices into one accessory.

So I guess the correct way is to expose this as config/externalsensortemp? And homebridge-deconz could use this as current temperature instead of state/temperature?

Yes. I think it should probably be a state attribute, though.  The resource item might already exist and be used for some other TRVs.  https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/generic/items/config_externalsensortemp_item.json

I can't really get it to work. I tried
        {
          "name": "config/externalsensortemp",
          "refresh.interval": 3660,
          "parse": {
            "at": "0x0013",
            "cl": "0x0201",
            "ep": 1,
            "eval": "Item.val = Attr.val;",
            "fn": "zcl:attr"
          },
          "default": 0
        },

but it always stays at
{
  "config": {
    "battery": 90,
    "externalsensortemp": 0,

this DDF stuff is a little bit confusing...

I think you need to add the manufacturer code.

You're right (again)
Now I have
{
  "config": {
    "battery": 100,
    "externalsensortemp": 1804,
    "group": "20006",
    "heatsetpoint": 1400,
    "mode": "heat",
    "offset": 0,
    "on": true,
    "reachable": true,
    "schedule": {
      "W127": [
        {
          "heatsetpoint": 1400,
          "localtime": "T00:00"
        },
        {
          "heatsetpoint": 1700,
          "localtime": "T07:00"
        },
        {
          "heatsetpoint": 2000,
          "localtime": "T16:00"
        },
        {
          "heatsetpoint": 1400,
          "localtime": "T20:30"
        }
      ]
    },
    "schedule_on": true,
    "unoccupiedheatsetpoint": 1600
  },
  "etag": "8e666c8d585b82ea807a8f5fe711daae",
  "lastannounced": null,
  "lastseen": "2024-01-05T05:51Z",
  "manufacturername": "ubisys",
  "modelid": "H1",
  "name": "Thermostat DG Erik",
  "state": {
    "lastupdated": "2024-01-03T11:45:26.565",
    "on": false,
    "temperature": 2200,
    "utc": null,
    "valve": 58
  },
  "swversion": "1.5.1",
  "type": "ZHAThermostat",
  "uniqueid": "00:1f:ee:00:00:00:98:af-01-0201"
}

Before:

After:

Works!

In v1.0.10.


Send a subset of a byte array as a method

Expected behavior
When using the binary redis interface, I'd like to be able to use a method like
public void set(final byte[] key, final byte[] value, final int offset, final int length);

This would send the data starting at value[offset] and up to value[offset+length]. I could avoid some copies and allocations of byte[] in my code if I could do this.
Actual behavior
A method like this does not exist

@hydrogen18 is there any other SDK that supports this?. I haven't seen this before.

In reference to Redis and Java? I have no idea.
Java does not support slicing of an array (basically just a view of the existing data) like Go, Python, Ruby, etc.
For example, the builtin java.io.Writer object supports a similar method
http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html#write(char[], int, int)
The common use case is having a null-terminated byte sequence in memory, but not wanting to write the null byte.

In reference to Redis and Java? I have no idea.

got it. I guess we would have to rethink BinaryJedis as a whole to support this. Is there a Class where this can be wrapped?.

Yes, it would be preferred if all commands (not just set) had an overload that allowed for something like this. hset, lpush, linsert, etc.
The most generic way to support this in java would be to allow java.io.InputStream as an argument to commands. An input stream is just a stream of bytes.
https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html
For my example I would use make a ByteArrayInputStream that wraps the byte[] I already have.

ByteBuffer could wrap it, but I'm not sure we allow duplications for whole methods to support ByteBuffer as well.
Three options here:

support ByteBuffer as well and have numerous methods
change byte[] to ByteBuffer and completely break backward compatibility
just leave it as it is

and I'm sorry but I prefer 3 unless there're many cases which directly support ByteBuffer as parameter.

I agree with @HeartSaVioR to leave it as it is unless there's too much demand or someone puts a lot of effort in migrating the current BinaryJedis to ByteBuffer or InputStream.

If you'd accept a pull request to add this, I should be able to work on it.

Agree with @marcosnils and @HeartSaVioR. Jedis has already a whole bunch of overloads that create a lot of method signatures. ByteBuffer isn't trivial. Most bugs arise from non-flipped buffers (Calling ByteBuffer.flip() after the content was read from the buffer). ByteBuffer are consumed by a calling method which changes their offset and that adds another set of complexity.
Not being required to create a new array and not duplicating data is, in general, a good approach but it's something more advanced. Jedis is covering the common 80% of use cases and it's doing a pretty good job in that area.
My advice is to afford the necessary GC or use proper utilities to externalize byte array shifting when you want to stick to Jedis. If this does not work out for you, you should take a look on other Java clients (https://redis.io/clients#java) as they provide more sophisticated means to work with binary data.
On a personal note, I'd keep Jedis as-is because ByteBuffer is not worth the trouble. It makes things just more complicated.

I never actually suggested using ByteBuffer, so I'm not really sure I understand your suggestion.

@hydrogen18
You suggested adding overloaded methods which is just not acceptable. That's why I talked  alternative thing. Go figure, count how many methods BinayJedis has as is.

Jedis has always prioritized a clean and sane API. I'd love to see how other project SDK's (memcached / mongodb / whatever) deal with this problem to better understand how to help our users.
@hydrogen18 do you know of any examples?

Popping into the discussion here: the proposed change is actually Java standard behavior on handling byte[]. E.g https://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html#read(byte[], int, int): read(b) is a shortcut to read(b, 0, b.length).
I agree that implementing full InputStream or OutputStream support would overcomplexify the API, but that one change would not (basically just adding those two offset and length parameters to the original methods, and add the x(b, 0, b.length) for backward compatibility and ease).

, but that one change would not (basically just adding those two offset and length parameters to the original methods, and add the x(b, 0, b.length) for backward compatibility and ease).

Yes, but we'd have to rewrite all the methods.
@matthieu-labas do you know of another client that does this? (any db / memcached / whatever)

@marcosnils from what I quickly read from the code, the refactoring hassle lies in the varargs used in Protocol.sendCommand(RedisOutputStream os, ProtocolCommand command, byte[] ... args), which would indeed require heavy rework (probably adding an extra layer of abstraction: Serializable instead of byte[]?) so I get your point. Signatures like sendCommand(RedisOutputStream os, ProtocolCommand command, byte[] val) are way easier to refactor into sendCommand(RedisOutputStream os, ProtocolCommand command, byte[] val, int off, int len).
As for other SDKs, I thought the JDK itself was quite a good example ;). Most network code I've worked with do that, but I don't know about the "competition".


[Bug]: LLMCompiler fails with Tool{tool_name} not found value error

Bug Description
Tool names cannot be found when agent.chat is called even though the plan is created.
Version
0.10.34
Steps to Reproduce

Use any tool (using duckduckgo search as an example)
tools = DuckDuckGoSearchToolSpec().to_tool_list()

Create LLM model and agent

llm = Ollama(model="phi3", request_timeout=30.0, temperature=0.9)
callback_manager = llm.callback_manager
agent_worker = LLMCompilerAgentWorker.from_tools(
    tools, llm=llm, verbose=True, memory=chat_memory, callback_manager=callback_manager
)
agent = AgentRunner(agent_worker, callback_manager=callback_manager)

Relevant Logs/Tracbacks
File "/Users/user/Library/Python/3.9/lib/python/site-packages/llama_index/agent/llm_compiler/utils.py", line 85, in instantiate_new_step
    tool = _find_tool(tool_name, tools)
  File "/Users/user/Library/Python/3.9/lib/python/site-packages/llama_index/agent/llm_compiler/utils.py", line 55, in _find_tool
    raise ValueError(f"Tool {tool_name} not found.")
ValueError: Tool search not found.

The LLM is predicting a tool name that doesn't exist is my guess? I'm not sure what your tool names/descriptions look like, but try to make them unique and descriptive

For the example I provided the tool names are ['duckduckgo_instant_search', 'duckduckgo_full_search'] (can be found using [tool.metadata.name for tool in tools]). Strangely though the error is ValueError: Tool search not found.. I came up with a small hotfix where I check equality of the name and also whether the tool_name is in the names of the tools in the _find_tools function. Ok if I send up a PR?

I'm using the version with the PR above merged (0.10.48.post1), and the same error still exists.
I set the tools following the official cookbook,
def multiply(a: int, b: int) -> int:
    """Multiple two integers and returns the result integer"""
    return a * b

multiply_tool = FunctionTool.from_defaults(fn=multiply)

def add(a: int, b: int) -> int:
    """Add two integers and returns the result integer"""
    return a + b

add_tool = FunctionTool.from_defaults(fn=add)

tools = [multiply_tool, add_tool]

But my agent stilled tried to "search" something,
> Plan: 1. search(3)
2. multiply(121, $1)
3. add($2, 42)
4. join()<END_OF_PLAN>
assistant: Plan accepted. Processing...

After executing the plan, the result is: 363

Your plan has been executed and the answer is 363.

And it failed unsurprisingly with same error ValueError: Tool search not found.

@HejiaZ2023 you need to update the agent integration probably? Assuming you are using an openai agent
pip install -U llama-index-agent-openai

There's even unit test for this

Hi @logan-markewich I think both OP and I are using local LLM inference, not openai (OP mentioning Ollama, I'm using vllm)
(And I did check my llama-index-agent-openai version is latest, 0.2.7)
My best guess would be the PR fixed an agent-shared get_function_by_name, but llm_compiler agent is using its own _find_tool in llama_index/agent/llm_compiler/utils.py? (which is where it raised an Exception for both OP and me)


Akord-JS: delete vault 404

const { transactionId } = await akord.vault.delete(vId); results in

Data @ https://api.akord.com/vaults/b2ab90b1-62f0-4713-8a10-2c2bb1bcce82 >  {"msg":"Missing authorization header.","success":false}
Additional info: vault is showing up in v2.akord and vId is confirmed.

Closing this after discussing with @phuybregts - feature works correctly


docs: Augment the Accounts section of the Staking docs

SUMMARY
Document the new staking account address format introduced in #2940 and add some general description of the staking accounts.
ISSUE TYPE

Docs

We should also explicitly document the special addresses reserved for the common pool and the per-block fee accumulator.


Two tests. One to anchor to known good results, the other protection against overflow.

Unit tests FTW.

excellent, thanks!


feat: Personal Finance Advice Bot

What does this PR do?
A demo for financial adviser with copilotkit
(https://github.com/TRIPLE-ADE/copilotkit-financial-adviser/blob/main/public/Screenshot.png)

Related PRs and Issues

(Direct link to related PR or issue, if relevant)

Checklist

[ ] I have read the Contribution Guide
[ ] If the PR changes or adds functionality, I have updated the relevant documentation

@NathanTarbert please help check this out

@TRIPLE-ADE, very nice UI!


Implement user specified visit slicing to allow multiple clients consuming the visit result

It would be nice if user can specify number of slices (e.g 25) when performing a large visitation operation in order to use parallel clients where each client will visit a subset of the total corpus size. The first call specifies the number of slices/partitions/fragments. e.g a request to partition the corpus into 25 roughly equal slices:
GET /document/v1/namespace/doc-type/?slices=25&selection=ss
Subsequent parallel calls (by continuation id) must then specify the slice id
GET /document/v1/namespace/doc-type/?continuation=xxx&slice-id=0
GET /document/v1/namespace/doc-type/?continuation=xxx&slice-id=1
GET /document/v1/namespace/doc-type/?continuation=xxx&slice-id=24
This would allow for higher throughput by allowing multiple clients to consume the streams.

Since visitor sessions explicitly iterate over the linear super bucket space in a deterministic fashion, the most straight forward way of doing this is likely to skip super buckets that are not part of the session's assigned slice. With pseudo-random document distribution all super buckets are expected to be effectively equal in size, so this distributes session data to read "perfectly" (in theory).
Due to the way continuation tokens work internally today (effectively a set of cursors into the bucket space with some meta data related to high level bucket distribution), it's easier if we require specifying the slice count and slice id per request instead of having an up-front request. I.e. a request would look like this:
GET /document/v1/namespace/doc-type/?continuation=xxx&slices=25&slice-id=0

This also incidentally means clients can run entirely in parallel without any prior synchronization.
Assuming there are no concurrent distribution bit changes (only triggered by certain topology changes and may be hardcoded through config), sliced visit sessions shall be guaranteed to cover disjoint ranges of the data space.

can't we just support something in the selection language that selects a part of the bucket space, like superbucketID MOD X ?  This is similar to what I do to dump 10% where I naively do docID MOD 10 - this scans all buckets and is inefficient, though

That is definitely possible, but it has some caveats:

Parallelism inherently becomes part of the selection (the domain specific query) rather than being orthogonal to it. That means you cannot parallelize any arbitrary full corpus selection expression without altering the structure of the expression itself.
It further exposes, and thereby effectively makes an API requirement of, how we use buckets as the distribution mechanism for documents. This makes it harder if we want to transition to other approaches (tablets with a natural key ordering etc) in the future.
It removes any abstractions of how multi-client slicing is implemented, which ties into the previous point.

https://blog.vespa.ai/sliced-visiting/


Aimbot is laggy

i'm pretty sure it's only me but i don't know why the aimbot is freezing when i try to lock ppl.
here is a clip to show the issue :
https://streamable.com/yleybv

Set your smooth to 1 bruh

Set your smooth to 1 bruh

did u even watch the video ?
i know how to use an aimbot and it s freezing every ms for me no matter what smooth u have


Strange behavior: \w* and backreferences

uses RegExpr;
begin
  WriteLn( ReplaceRegExpr('(\w*)','name.ext','$1.new', True) );
  ReadLn;
end.

Return: name.new.new.ext.new.new. Bug or incorrect use?
On Russian: некоторые подробности проблемы отсюда и ниже.

https://github.com/masterandrey/TRegExpr/commit/1e2cd9e007c8b2f7593d847999c6ccb8ff3c58bc
Strange but expected behaviour or replace function.
It repeats r.e. search till the end of the string.

Find 'name', replace with name.ext
Start searching from '.' and finds zero chars as correct result of \w*, so add '.ext'
Start after '.' and finds 'ext' and replace it with 'ext.new'
And final search at the end of the string also success with empty string so add '.new'

Replace '*' with '+' and it would not get empty string as correct one - I think i any case you are ont interested in empty file names.

I think in any case you are not interested in empty file names.

Yes, of course :) It's a artificial situation, but I thought: maybe it's inaccuracy and it can be problem in some real cases? And reported. (I'm not an expert of regular expressions, I use them little-by-little.)
Thank you!


Allow PrometheusClient to init with a predefined set of common dimensions.

Feature Request
When reporting Prometheus metrics, it's sometimes useful to always append a certain set of dimensions to every published metric (e.g. nodeId, appName, etc.).
Motivation Behind Feature
We don't control metrics creation in dependencies and can't set dimensions to their metrics. This would mean we won't be able to distinguish such metrics published from different apps or nodes.
Feature Description
PrometheusClient may accept a set of common dimensions it'll append to every published metric.
class PrometheusClient {
  let dimensions: [(String, String)]

  <...>
}

I can see it might clash with current Labels signature and may require a "merge" method on the MetricLabels protocol:
public protocol MetricLabels: Encodable, Hashable {
    /// Create empty labels
    init()

    func append(dimensions: [(String, String)])
}

Alternatives or Workarounds
Currently I'm trying to use a custom conformance to MetricsFactory
class DimensionalPrometheusMetrics: MetricsFactory {
    let prometheus: PrometheusClient
    let commonDimensions: [(String, String)]

    <...>
}

Which is not ideal because it will only work when I publish metrics via swift-metrics api. If need custom buckets/quantiles I'll have to set dimensions manually.

@avolokhov Thanks for opening this issue! I think this is a great feature to add.
However, with regards to "identifying metrics", the prometheus backend will automatically add job and instance labels to ALL metrics. Job being the job_name and instance being the host:port of the instance the metric was scraped from. I would suggest using these when possible, instead of adding them manually.
For other use-cases, I will look into adding base labels to PrometheusClient 👍

1.0 shipped, so moving to 1.0.1


Library or hardware pixels limit?

Hi guys, I got seven panels P10 32x16 1/4 chained totaling 224x16 working seamlessly! My goal is 12 panels to have 384x16, but I'm having issues trying with 8 panels. When I try 256x16 the panels turn black, but when I try 255x16 the panels work but the pixels get disorganized. It looks like the limit is 4095 pixels (4096-1). I'm using esp-wroom-32. Here's the code:
#define PxMATRIX_MAX_WIDTH 256
#define PxMATRIX_MAX_HEIGHT 16
#include <PxMatrix.h>
#define P_LAT 22
#define P_A 19
#define P_B 23
#define P_C 18
#define P_D 5
#define P_E 15
#define P_OE 2
// Pins for LED MATRIX
PxMATRIX display(256,16,P_LAT,P_OE,P_A,P_B,P_C,P_D);
void setup() {
Serial.begin(9600);
// Define your display layout here, e.g. 1/8 step
display.begin(4);
display.setPanelsWidth(8);
display.setScanPattern(ZAGGIZ); // ZAGGIZ, ZIGZAG, LINE, WZAGZIG, VZAG
display.setMuxPattern(STRAIGHT); // STRAIGHT,
display.flushDisplay();
display.setTextColor(display.color565(255, 0, 0));
display.setTextSize(2);
display.setCursor(0,0);
display.print("8 chained panels test");
}
void loop() {
display.display(1);
}

Don’t know about limits but am quite interested in them.
For the pixels disorganization I don’t know, but when you initialize your display (PxMATRIX display(256,16,P_LAT,P_OE,P_A,P_B,P_C,P_D)), you are specifying a width of 256. And in the PxMatrix the width and height are defined with 8-bit integers (all constructors are defined like this: PxMATRIX(uint8_t width, uint8_t height,uint8_t LATCH, uint8_t OE, uint8_t A,uint8_t B, …)), so when you go over 255 it will loop over to 0 and will mess up your config.
I don’t see why it wouldn’t work with a 16-bit integer, you could try and update the code to try it, then maybe make a pull request as it could be interesting to more people and I guess going from 8 to 16 bits wouldn’t bring downsides as ESPs have 32-bit cores.

Good point ... pushed this change to the latest master. Let me know if it does the trick ..

For reference: commit 7843e57bd78f7e66c346d4c94838ed1634d14342

Can you post a picture of that monster panel if it works ... that would be rather interesting :)


New UI for deploying SQL project to a new Azure server

Adding a new experience to publish a sqlproj to a new Azure server. The experience is only added for vscode mssql extension and not for ADS.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

25 of 172 (14.53%)  changed or added relevant lines in 8 files are covered.
130 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-0.09%) to 42.291%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

extensions/sql-database-projects/src/common/utils.ts
0
1
0.0%

extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts
0
4
0.0%

extensions/sql-database-projects/src/controllers/projectController.ts
1
15
6.67%

extensions/sql-database-projects/src/models/deploy/deployService.ts
2
17
11.76%

extensions/sql-database-projects/src/models/deploy/azureSqlClient.ts
5
59
8.47%

extensions/sql-database-projects/src/dialogs/deployDatabaseQuickpick.ts
4
63
6.35%

Files with Coverage Reduction
New Missed Lines
%

extensions/sql-database-projects/src/dialogs/deployDatabaseQuickpick.ts
1
5.31%

extensions/sql-database-projects/src/dialogs/publishDatabaseQuickpick.ts
1
5.41%

extensions/sql-database-projects/src/models/deploy/deployService.ts
1
68.16%

extensions/notebook/src/jupyter/jupyterKernel.ts
3
72.55%

src/sql/workbench/services/notebook/browser/models/clientSession.ts
12
61.19%

src/sql/workbench/api/browser/mainThreadNotebook.ts
15
42.49%

src/sql/workbench/api/common/notebooks/vscodeExecuteProvider.ts
19
1.87%

src/sql/workbench/api/common/extHostNotebook.ts
36
36.28%

src/sql/workbench/services/notebook/browser/sql/sqlSessionManager.ts
42
27.68%

Totals

Change from base Build<PHONE_NUMBER>:
-0.09%

Covered Lines:
27519

Relevant Lines:
60820

💛  - Coveralls

Haven't gone through this all - but at first glance I'm seeing a lot of Azure resource stuff here, including creating an Azure server. We shouldn't be having common function like that in here - it should live in a place that's usable by other features as well.
We have azurecore in ADS for that - so the work here then should be more about getting what you need implemented in VS Code in a similar way (or finding an existing extension that does this, such as the VS Code Azure extension) and then using one of those to do any operations against Azure resources.

I agree having a shared place would be useful for other extensions. vacode-mssql extension might be the right place for this. I tried using Azure core which didn't work because of the way we authenticate to Azure using mssql-vscode extension.

Haven't gone through this all - but at first glance I'm seeing a lot of Azure resource stuff here, including creating an Azure server. We shouldn't be having common function like that in here - it should live in a place that's usable by other features as well.
We have azurecore in ADS for that - so the work here then should be more about getting what you need implemented in VS Code in a similar way (or finding an existing extension that does this, such as the VS Code Azure extension) and then using one of those to do any operations against Azure resources.

@Charles-Gagnon  and @kisantia I moved the Azure API to mssql extension in this PR: https://github.com/microsoft/vscode-mssql/pull/17321 please review that PR first and after it's approved, I'll update this PR so it calls the APIs using mssql extension


[stdlib] Replace various uses of BlahSlice with Slice to reduce warnings

Now that Slice is conditionally conforming to protocols based on its base, various uses of specific slices can be replaced, suppressing deprecation warnings.
Note, the validation tests generated by validation-test/stdlib/Slice/Inputs/Template.swift.gyb are still using the old slice types. That needs a bit more work to fix.

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - bbdfc9b5fde26aa9c55fc04aee8cdc171def413d

gah there are tests inside validation-test/StlibUnittest/ too what are they doing in there

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - 4e08298983acca5b400bab938ec88e922074784a

@phausler @parkera note there are a couple of Foundation changes in here. There are type aliases for the old names so should only have impact of warning users if they were explicitly typing them (which is unlikely?)

I'll make the matching changes in corelibs once this one lands safely.

the Foundation changes look good to me.

@swift-ci please test macOS platform

Build failed
Swift Test OS X Platform
Git Sha - bbdfc9b5fde26aa9c55fc04aee8cdc171def413d

@swift-ci please test macOS platform


warp ctc error

I am unable to install warpctc...please help me out..
dheeraj@dheeraj:~/warp-ctc/build$ cmake ../
-- cuda found TRUE
-- Found Torch7 in /home/dheeraj/torch/install
-- Torch found /home/dheeraj/torch/install/share/cmake/torch
-- Building shared library with GPU support
-- Building Torch Bindings with GPU support
-- Configuring done
-- Generating done

-- Build files have been written to: /home/dheeraj/warp-ctc/build
dheeraj@dheeraj:~/warp-ctc/build$ make
[ 10%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o
/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined
/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined
2 errors detected in the compilation of "/tmp/tmpxft_000021c9_00000000-16_reduce.compute_52.cpp1.ii".
CMake Error at warpctc_generated_reduce.cu.o.cmake:266 (message):
Error generating file
/home/dheeraj/warp-ctc/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_reduce.cu.o
CMakeFiles/warpctc.dir/build.make:336: recipe for target 'CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o' failed
make[2]: *** [CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/warpctc.dir/all' failed
make[1]: *** [CMakeFiles/warpctc.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

did you find the solution


Feedback from Salva Umar

Love the unique idea and the execution of your team's dash app. It looks great. The short description at the beginning of the dashboard is excellent and helps provide relevant context for the users. Adding adjustment for inflation is a great touch.
Some points for consideration:
Stylistic - Filters/Slicers Pane: Perhaps it would be nice to have a different color or some form of highlighting behind the filters pane to separate them from the charts in the dashboard.
 Maybe try using some form of text wrapping to prevent that.
Information display choice - Hourly Wage between the X to Y years: It would be interesting to see how the average Big Mac price relates by countries too. Maybe overlaying both on the same chart could be considered.
Information display - Map: Love that the tooltip shows the dollar price as well as the Big Macs per hour. Instead of showing only the global "Big Macs per hour", it would be nice to see the minimum wage there too.
Calculation/Information display choice - Big Mac price vs. hourly wage chart: Show the percentage difference between minimum wage and Big Mac price in the chart, as the percentage difference can provide a clear indicator of whether Big Mac prices are becoming more or less affordable relative to minimum wage to introduce some metrics for the economists , maybe.
Overall had fun reviewing your guy's dashboard!

[ ] UI Enhancement - Filters/Slicers Pane:
- Task: Update the styling of the filters/slicers pane by adding a distinct background color or some form of highlighting to visually separate it from the dashboard charts.
- Objective: Improve visual separation and enhance user focus on different sections of the dashboard.

[ ] UI Fix - Chart Text Display:

Task: Implement text wrapping for the chart titles, especially for "buying power over time in X country" to prevent the text from being cut off.
Objective: Ensure all chart titles are fully visible and readable, enhancing user understanding and interaction.

[ ] Feature Addition - Hourly Wage and Big Mac Price Chart:

Task: Modify the "Hourly Wage between X to Y years" chart to include a comparison of average Big Mac prices by countries, potentially overlaying this data on the same chart.
Objective: Provide a richer data comparison to users, allowing for better insights into global economic conditions.

[ ] Enhancement - Map Tooltip Information:

Task: Update the map tooltips to show both the dollar price and the number of Big Macs per hour alongside the minimum wage information.
Objective: Provide a more comprehensive economic snapshot at the country level, enhancing the informational value of the map tooltips.

[ ] New Metric Implementation - Big Mac Affordability:

Task: Add a new metric to the "Big Mac price vs. hourly wage" chart showing the percentage difference between minimum wage and Big Mac price.
Objective: Offer an immediate visual indicator of affordability trends, providing valuable insights for economic analysis.

[ ] UI Fix - Chart Text Display:

Task: Implement text wrapping for the chart titles, especially for "buying power over time in X country" to prevent the text from being cut off.
Objective: Ensure all chart titles are fully visible and readable, enhancing user understanding and interaction.

[ ] Feature Addition - Hourly Wage and Big Mac Price Chart:

Task: Modify the "Hourly Wage between X to Y years" chart to include a comparison of average Big Mac prices by countries, potentially overlaying this data on the same chart.
Objective: Provide a richer data comparison to users, allowing for better insights into global economic conditions.

[ ] Enhancement - Map Tooltip Information:

Task: Update the map tooltips to show both the dollar price and the number of Big Macs per hour alongside the minimum wage information.
Objective: Provide a more comprehensive economic snapshot at the country level, enhancing the informational value of the map tooltips.

[ ] New Metric Implementation - Big Mac Affordability:

Task: Add a new metric to the "Big Mac price vs. hourly wage" chart showing the percentage difference between minimum wage and Big Mac price.
Objective: Offer an immediate visual indicator of affordability trends, providing valuable insights for economic analysis.


addFakeSpaces can easily trigger out-of-memory and cause Chrome to crash

Configuration:

Chrome 84.0.4147.105
Windows 10 1909
PDF.js version: latest, reproduces in demo website with version 2.6.160
Is a browser extension: no

Steps to reproduce the problem:

Load attached document.pdf in https://mozilla.github.io/pdf.js/web/viewer.html
document.pdf

Expected:
Pdf should be displayed
Actual:

Chrome tab crashes with "Aw snap" error

Minimal reproduction: setCharSpacingInsane.pdf
Chrome crashes because the page runs out of memory.
Firefox does not crash but tries to use lots of memory (Gigabytes of memory, high CPU usage, lots of time spent on garbage collection, eventually an "out of memory" error in getTextContent in the console).
Here is the profiler data: https://profiler.firefox.com/public/zsq9tz8bssr3wdky41djv0caafkv2kxntns91r0/flame-graph/?globalTrackOrder=0-1-2-3-4&localTrackOrderByPid=143552-0~143652-0~&thread=3&v=5
According to the profile from Firefox (and the call stack of Chrome's crash), something attempts to repeatedly grow an array.
I also see that lots of time is spent in addFakeSpaces :
https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L1999-L2011
I attached a debugger and saw that width =<PHONE_NUMBER>.949 and fakeSpaceMin = 6.831, i.e. fakeSpaces = 314373247 = 300M+. This is a LOT, and easily explains the crash.
This large value for width originates from textContentItem.lastAdvanceWidth (as a very large negative value) @ https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L2121
from width @ https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L1989
from charSpacing @ https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L1976
from textState.charSpacing @ https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L1963
from OPS.setCharSpacing https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L2189-L2190
When I decompress the PDF file with qpdf --stream-data=uncompress --object-streams=disable document.pdf uncompressed.pdf, and open the PDF in a binary editor, I see that it does indeed contain multiple setCharSpacing (= Tc) commands with excessive values (e.g. -2147483647) (plus instructions to to trigger the addFakeSpaces code path):
/R2 8 Tf -2147483647 Tc -3.146 Tw
53.006 0 Td

To reproduce, the above instructions are repeated twice. The first run initializes textContentItem, which causes the second moveText command to pass the condition and enter the addFakeSpaces function with excessively high values:
https://github.com/mozilla/pdf.js/blob/403816040ef64ae17758439948771c2920f96ac4/src/core/evaluator.js#L2107-L2123

@timvandermeij
I am not sure "corrupted pdf" is a correct label here as adobe acrobat reference implementation and chrome built in pdf viewer display this file without any problem. We have lots of clients that upload such files every day. It is hard to blame pdf file as other viewers work.

fakeSpaces = 314373247 = 300M+. This is a LOT, and easily explains the crash.

I've seen similar figures on my end. This is longer than the supported string size by Spidermonkey of ~268M:

The resulting string can also not be larger than the maximum string size, which can differ in JavaScript engines. In Firefox (SpiderMonkey) the maximum string size is 2^28 -1 (0xFFFFFFF).

Yet somehow NOT limiting the length inside addFakeSpaces blows the process heap to ~13GB. Capping to maxString/2 (see below) the process maxes at ~4.4GB during render.
Since I did some testing with String.p.repeat, I had to limit the length to (0xFFFFFFF/2): it is ~5s faster* (and non-blocking to JS caller) than the incremental push version. Using .repeat should in theory greatly reduce GC pressure, however I lack tools to confirm.
*Faster as in the CPU load by the process drops to zero 5s earlier (27s vs ~33s).
Another for this case worrisome discovery is that after render's finished & Full GC/minimise is triggered, pdf.js worker still has 2GB occupied for some Array objects (memory-report.txt), on top of DOM ("only" 770MB) and misc. Is this (worker cache/buffer) really needed for single page/idle documents?

Testing done on:
Firefox 80b3 x64
Ryzen 1700 (OS-governed clock up to 3.8 GHz steady state)
Modified pdf.js version from gh-pages branch:
      var fakeSpaces = Math.round(Math.min(width / textContentItem.spaceWidth, 0xFFFFFFF/2));
      while (fakeSpaces-- > 0) {
        strBuf.push(" ");
      }
    }

vs
      var fakeSpaces = Math.round(Math.min(width / textContentItem.spaceWidth, 0xFFFFFFF/2));
      strBuf.push(" ".repeat(fakeSpaces));
    }

@igorbednar Until shown otherwise, this seems to be the right classification for PDF files with excessive setCharSpacing commands. I'm not saying we shouldn't do anything about this on our end, but just because people upload such files doesn't mean it's correct. Other PDF viewers have to do the same as PDF.js, which is implementing workarounds for cases that the PDF specification often disallows but that do happen in practice due to bad PDF generators. So yes, even if other viewers work the PDF file can certainly be to blame. If we got a dollar for every spec-violating PDF file/generator we have seen, we might have been rich by now...

Testing this PDF with below pdfJS version still seems to crash.  The PDF initially loads and looks good, but then crashes a couple seconds later.
const pdfjsVersion = '2.7.90';
const pdfjsBuild = '6728c8fa6';


Split command

Hello!
Please help for how to do, split -l 10000 key.txt
go run generate.go > key.txt
Thanks

how to save xlsx reply

please update to ethereum key generator quick reply


meshConfig. defaultConfig.serviceCluster istio-proxy startup parameter --service-cluster is missing

Bug Description
Configure serviceCluster in IstioOperator，the startup parameter --serviceCluster is missing after istio-proxy injection
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  name: example-istiocontrolplane
  namespace: istio-system
spec:
  meshConfig:
    defaultConfig:
      serviceCluster: "true"
  profile: demo

the current configuration
    - name: PROXY_CONFIG
      value: |
        {"serviceCluster":"true"}

i hope the
    Args:
      proxy
      sidecar
      --domain
      $(POD_NAMESPACE).svc.cluster.local
      --serviceCluster
      sleep.$(POD_NAMESPACE)
      --proxyLogLevel=warning
      --proxyComponentLogLevel=misc:error
      --trust-domain=cluster.local

I'm not sure what caused the problem，i just want to be able to configure x-enlist-downstream-service-cluster
Version
[root@testhost http]# ~/istio-1.11.1/bin/istioctl version
client version: 1.11.1
control plane version: 1.11.1
data plane version: 1.11.1 (10 proxies)

Additional Information
No response
Affected product area

[ ] Docs
[ ] Installation
[X] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
[ ] Upgrade
[ ] Multi Cluster
[ ] Virtual Machine
[ ] Control Plane Revisions

Is this the right place to submit this?

[X] This is not a security vulnerability
[X] This is not a question about how to use Istio

Hi @xichengliudui, I understand that you want to make serviceCluster  as a parameter of sidecar, but not PROXY_CONFIG environment variable of mesh config.  Is that your requirement?

do you know how to do that?

/help

@xichengliudui In fact, I suggest that you can add your custom environment variable via istioctl --set meshConfig.defaultConfig.proxyMetadata,  you can define your environment variable in proxyMetadata, and it's a map[string]string{}. I think you can refer to struct MeshConfig in Istio/api for more detail.

ok, thank you. I'll give it a try


add appveyor for 0.6

Coverage remained the same at 82.5% when pulling b8e7f9afa19d64afba5725044ef415fa618a4e99 on tk/av06 into ef1bf1faec0b3b4b402fe185e6f32cca3d414f7d on master.

Coverage remained the same at 82.5% when pulling b8e7f9afa19d64afba5725044ef415fa618a4e99 on tk/av06 into ef1bf1faec0b3b4b402fe185e6f32cca3d414f7d on master.


Incompatibility xcov with Xcode 16 Due to Deprecated xcresulttool command

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description

I encountered an issue when running xcov after upgrading to Xcode 16. The command fails with the following error message:

Error: This command is deprecated and will be removed in a future release, --legacy flag is required to use it.
Usage: xcresulttool get object [--legacy] --path  [--id ] [--version ] [--format ]
See 'xcresulttool get object --help' for more information.

The issue appears to be related to xcresulttool, which now requires the --legacy flag. Without this flag, exporting coverage reports from the .xcresult archive fails.

Command executed
        xcov(
          workspace: options[:workspace],
          scheme: options[:scheme],
          configuration: options[:configuration],
          output_directory: options[:output_directory]
        )

[12:38:56]: Called from Fastfile at line 884
[12:38:56]: ```
[12:38:56]:     882:	      # report coverage
[12:38:56]:     883:	      if options[:code_coverage] == true
[12:38:56]:  => 884:	        xcov(
[12:38:56]:     885:	          workspace: options[:workspace],
[12:38:56]:     886:	          scheme: options[:scheme],
[12:38:56]: ```
[12:38:56]: Failed to export xccovreport from xcresult'

Can we update xcov to include the --legacy flag in commands where necessary or find another approach to ensure compatibility with Xcode 16's new behavior?

Maybe we need this https://github.com/fastlane-community/xcresult/pull/6 to be released?


Unable to run parallel backtest with neural network models

🐛 Bug Report
There is an error trying to use TimeSeriesCrossValidation.backtest with n_jobs > 1 when we use CUDA.
Expected behavior
Running parallel backtest.
How To Reproduce
Code
Example dataset was taken from datasets for example notebooks.
import pandas as pd
from etna.models.nn import DeepARModel
from etna.datasets.tsdataset import TSDataset
from etna.model_selection import TimeSeriesCrossValidation
from etna.metrics import SMAPE
from etna.transforms import PytorchForecastingTransform

classic_df = pd.read_csv("data/example_dataset.csv")
df = TSDataset.to_dataset(classic_df)
ts = TSDataset(df, freq="D")

HORIZON = 7

transform_deepar = PytorchForecastingTransform(
    max_encoder_length=HORIZON,
    max_prediction_length=HORIZON,
    time_varying_known_reals=["time_idx"],
    time_varying_unknown_reals=["target"],
    target_normalizer=None,
)

model = DeepARModel(max_epochs=3, learning_rate=[0.1], gpus=[0], batch_size=64)
tscv_deepar = TimeSeriesCrossValidation(
    model=model, horizon=HORIZON, metrics=[SMAPE()], n_folds=3, n_jobs=2
)

tscv_deepar.backtest(ts, transforms=[transform_deepar])

Environment
Standard colab environment with installed etna-ts using pip.
Additional context
No response
Checklist

[X] Bug appears at the latest library version
[X] Bug description added
[X] Steps to reproduce added
[X] Expected behavior added

how can we fix it?

We add joblib parameters customization via additional parameter joblib_params in #253  for pipeline.backtest
tscv_deepar.backtest(ts, n_jobs=2, metrics=[SMAPE()], n_folds=2, joblib_params=dict(verbose=11, backend="loky", mmap_mode="c"))

Now by default we use multiprocessing backend for joblib because of global nature of our tslogger.
You can use loky or multiprocessing with multiprocessing.get_start_method() == 'spawn' but results of folds runs are not be logged -- only total results of backtest will be logged (It may be important for experiments tracked by wandb)
To sum up:
So in case of working with cuda, you can use parallelization of backtest with  loky specification or multiprocessing with multiprocessing.set_start_method('spawn') specification.
For now we can close the issue.
You can open it if additional recommendation are needed or you have new proposal.


Improve theme configuration load inside ThemeScript component

1. Why is this change necessary?
This changes fix use case which child theme script doesn't not load correctly
2. What does this change do, exactly?
Use AbstractConfigLoader component to load configuration
3. Describe each step to reproduce the issue or behaviour.
Create a custom theme
create a child theme of custom theme created above
create sales channel with child theme associated.
Now in the storefront scripts js doesn't load correctly (es. menu doesn't open or dropdowns don't work properly)
With styles/css there aren't issues

Hey @raffaelecarelle,
Your change seems to break 404 error page templates. You can test this manually by navigating to Settings -> Basic information and then setting a layout for 404 pages and then try to access any non existing route in the storefront.
You can also test this with our automated test in the e2e test suite. It is the test edit-information.cy.js which is failing.
I could reproduce this on my local machine.

Hey @raffaelecarelle,
Your change seems to break 404 error page templates. You can test this manually by navigating to Settings -> Basic information and then setting a layout for 404 pages and then try to access any non existing route in the storefront.
You can also test this with our automated test in the e2e test suite. It is the test edit-information.cy.js which is failing.
I could reproduce this on my local machine.

@Phil23  You were right. I fixed it and now e2e test passing

@raffaelecarelle Thank you for your contribution. The changes are merged now. 👍


Subscription.listLocations should be renamed to listRegions

and return List<Region>.

Not quite. Regions and Locations are not just different names for the same thing in Azure - they represent different concepts. Unfortunately the REST API and the portal conflate the two, often using the word "location" to refer to what is really a "region", but the documentation is very clear about the distinction between a region and a location. As can be inferred from this article, the location represents a relatively specific location of a data center (the article lists the state or city name; the API includes its geographic coordinates), whereas the region is an area in the world that that location is intended to primarily serve, referred to in a more general way, e.g. USWest.
The SDK's fluent API as designed is intentionally making that distinction: that's why the enum representing the list of "regions" is called Region, and APIs accepting that enum are called withRegion().  This is the correct naming for what this does.
There is also an API call in the Azure REST surface called listLocations() -- its naming is also arguably correct, or at least useful, in the sense that it returns something different -- its individual results include the geographical coordinates of the data centers (latitude() and longitude()) accessible to a given subscription, so it is a list of locations, not so much regions, even though the list count is equal to the number of regions, not locations. A given location also contains the name of the region the data center at that location serves, so it is easy to look up the region from a location and vice versa.
Now, with this in mind, the issue as originally logged is worded incorrectly, but what it is motivated by is a valid need: the need to more easily convert from "location" to "region" back and forth.
So in beta5, new APIs have been added to address that need:

Subscription.getLocationByRegion(Region)
Location.asRegion()

Also, for greater ease of accessing the subscription associated with the instantiated Azure client, or listing other subscription IDs from it, the following are now exposed on the Azure object:

Azure.getCurrentSubscription()
Azure.subscriptions()

shipped as described above in beta5


scard_pcsc_init fails when user home directory is a network-based folder

User Information

Version: <IP_ADDRESS>-1
OS: Kali Rolling

Error Message
xrdp-chansrv[####]: [ERROR] scard_pcsc_init: trans_listen failed for port /home/example/username/.pcsc11/pcscd.comm
xrdp-chansrv[####]: [ERROR] scard_pcsc_check_wait_objs: g_lis trans_check_wait_objs error
. . . <Previous entry is duplicated 20-30 times> . . .

Additional Information
Network is isolated and does not use Smart Cards for authentication, therefore no immediate impact is noted at this time. However, with 10-20 users connecting or re-connecting throughout the day, the logs are being saturated with these error messages.
User home directories are mounted via libpam_mount from a CIFS share on user login to "sync" files between hosts. Unix socket files do not appear to be supported on CIFS/SMB volumes.
Other applications use environment variables to determine where to create per-process or cache files, i.e. XDG_CACHE_HOME, which work around this issue. XRDP appears to rely on the HOME environment variable instead.
https://github.com/neutrinolabs/xrdp/blob/9b846b7b7e6b0b59b0b0d9f048acd9e04c65a082/sesman/chansrv/smartcard_pcsc.c#L1856-L1858
Suggestion/Request
I understand that this is likely an edge case and will be incredibly low priority given the minimal amount of impact. That said, a long-term solution may be to use a new environment variable and default to the user's HOME if NULL. For example:
home = g_getenv("XRDP_PCSC_IPC_DIR");
if (home == 0)
{
  home = g_getenv("HOME");
}
disp = g_display_num;
g_snprintf(g_pcsclite_ipc_dir, 255, "%s/.pcsc%d", home, disp);

Link to g_getenv for your convenience.
This would allow a system administrator to place export XRDP_PCSC_IPC_DIR=/tmp/.xrdp_$UID/ in the /etc/xrdp/startwm.sh file to specify the environment variable per-user for each initialized RDP session.

Hi @kamakazikamikaze
Thanks for raising this, and in particular for your detailed report and analysis. The pcsc code is in need of a lot of work at the moment, but there's a certainly a chance to improve this here.
The idea of the code is that it looks like the library provided by the  PCSC project. That way, applications which use PCSC-lite can use an xrdp smartcard instead. At least that's the idea!
Looking at the PCSC-lite code, the socket is called (by default) "$HOME/pcscd.com" unless PCSCLITE_CSOCK_NAME is defined (code is here). So personally, I think a better approach would be to mirror the code in PCSC itself and use PCSCLITE_CSOCK_NAME as the name of the socket.
This is a somewhat bigger change, but it's pretty easy to test and get in.
How does that sound to you?

That would work perfectly! The change would operate just the same.

One a closer examination, this is slightly more awkward than I realised.
Given the PCSC code is slightly moribund and only works with patches applied, I think a simpler solution to the problem in hand is simply to not try to use the PCSC wait object if it wasn't created properly in the first place. This will still produce the first error, but not the repeated other errors.
I considered adding configuration items to the config files, but until the PCSC code is working a lot better, I don't want to paint myself into a corner by doing that.
@kamakazikamikaze - I've realised a workaround to the above for now is to disable smartcard redirection on the client side. At least that's how the code looks. Give it a go and let me know.

@kamakazikamikaze - I've realised a workaround to the above for now is to disable smartcard redirection on the client side. At least that's how the code looks. Give it a go and let me know.

I had to look into client settings on Windows and finally found it. Disabling the forwarding of a Smart Card reader from the client does indeed mitigate the issue.
It seems a network-wide solution for now will be to push a change to default client settings via GPO or some others means (for Linux clients) which is completely doable.
Thank you for looking into this! I look forward to seeing your changes in the next release.

Thanks for feeding back - it will be useful to someone, somewhere.


Merge pull request #1 from apache/trunk

同步源地址数据
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

同步官方代码


Guess go main module version based on binary contents

Today the go main module version cannot be determined in all cases. We have a few heuristics in place to try and guess what the main module version is (by looking at ldflags and build setting info), however, there are still cases that are missed:
# as it is today...
❯ syft -q registry.k8s.io/ingress-nginx/controller:v1.6.4 | grep k8s.io/ingress-nginx
k8s.io/ingress-nginx                              (devel)                               go-module

This PR adds an additional heuristic to look at the binary contents and use a simple semver regex pattern matcher like we do with the binary cataloger to find matching version strings:
# with the code change...
❯ go run ./cmd/syft -q registry.k8s.io/ingress-nginx/controller:v1.6.4 | grep k8s.io/ingress-nginx
k8s.io/ingress-nginx                              (devel)                               go-module
k8s.io/ingress-nginx                              v1.6.4                                go-module

You'll note that it seems like it only "kind of" worked -- now we have two k8s.io/ingress-nginx packages, one that is correct and another that still shows devel. In this particular case, this is the best we can do. Let's look at what was found in detail:
# with the code change...
❯ go run ./cmd/syft -q registry.k8s.io/ingress-nginx/controller:v1.6.4 -o json | jq '.artifacts[] | select(.name == "k8s.io/ingress-nginx") | {name: .name, version: .version, locations: .locations}'

{
  "name": "k8s.io/ingress-nginx",
  "version": "(devel)",
  "locations": [
    {
      "path": "/dbg",
      "layerID": "sha256:fcc6781a7edaf8fa9971199d0c361dd3a0bebd6d76805a2d3cd41ff5b477a380",
      "accessPath": "/dbg",
      "annotations": {
        "evidence": "primary"
      }
    }
  ]
}
{
  "name": "k8s.io/ingress-nginx",
  "version": "(devel)",
  "locations": [
    {
      "path": "/wait-shutdown",
      "layerID": "sha256:ac97db116c0d5573f76be38bfa782acf196ec1ed83ba753546479a4732f8e5cc",
      "accessPath": "/wait-shutdown",
      "annotations": {
        "evidence": "primary"
      }
    }
  ]
}
{
  "name": "k8s.io/ingress-nginx",
  "version": "v1.6.4",
  "locations": [
    {
      "path": "/nginx-ingress-controller",
      "layerID": "sha256:56b71709a8bf999f9a65d21e58cad1be7a521c0718981b98a0032b38eb9c5338",
      "accessPath": "/nginx-ingress-controller",
      "annotations": {
        "evidence": "primary"
      }
    }
  ]
}

There are three different binaries that have the same k8s.io/ingress-nginx package: /nginx-ingress-controller, /wait-shutdown, /dbg.
It seems that only the main /nginx-ingress-controller binary has any indication of a version baked into the binary:
❯ strings nginx-ingress-controller | grep '1\.6\.4'
v1.6.4
❯ strings dbg | grep '1\.6\.4'
❯ strings wait-shutdown | grep '1\.6\.4'

In the future we might be able to correlate claimed package h1 information across all main packages discovered to try and get a better answer for all packages, but that is out of scope for this particular enhancement (and may be questionable to do , thus requires some discussion first).

Question for reviewers: since this has the potential to raise up an incorrect version on a package, should this at least have a configuration option that a user can opt out of this heuristic?

I've added configuration options for all version guessing heuristics since they can all really have downsides. They all default to enabled.


Submitting New Version For Review Always Fails

Submitting New Version For Review Always Fails
Similer issue: https://github.com/shr3jn/fastlane-plugin-huawei_appgallery_connect/issues/30#issuecomment-990740313

I've just checked this issue and it seems like the Step is completely fine.
The issue comes from the Huawei App Gallery: Publish API flakiness ⚠
I would say try again because the API sometimes retrieves errors like that randomly. There's no much to do on the Step.
And thanks for mentioning the issue raised on the Fastlane plugin (not official plugin). Their implementation is wrong, because they simply have a delay to wait until the last call to verify if the app file is completely submitted.
What Huawei HQ recommended (applied in this verified Bitrise Step) was to call an endpoint periodically to check whether the submission result is ready (return code 0) or it needs to wait another 20" cycle to check this  submission result  again.


fix(VtkView): Do not set view container on update

view.setContainer() unbinds the vtkjs mouseup listener, causing "sticky"
widget interaction.
Fixes #114

@jourdain do we even need to watch the "view" prop? I think we don't anymore (regular usage without it seems fine), but I haven't checked code yet.
If not, I'll remove the watch code altogether.

Haven't seen it get called, but who knows if it will be called. I'll remove it for now since I think I tested it enough manually.

:tada: This PR is included in version 2.2.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Switch to Docker strategy

Let's get rid of the s2i strategy and go directly to Docker. This way we can install the snappy-devel package.
I'm not sure if we need all the packages listed there, though. I've taken the list from s2i python3.6 image.
@AparnaKarve, can you please take a look at this PR?
Also, there's an associated change switching the template to the Docker strategy as well: https://github.com/ManageIQ/aiops-deploy/issues/4

Seems like OpenShift doesn't have enough memory to compile our requirements this way. Investigating the config map. We may be forced to switch to uploading a complete image instead of building it in OpenShift...

so for now I advise to use a local build strategy with a push to OpenShift image registry afterwards

Ok, will give that a try.


Error loading resources

Hello, When I open TQVaultAE and I happen to have any other steam game installed I get an error that aborts TQVaultAE the error following: "Could not find a part of the path '(Drive letter)\Program files x86\Steam\SteamApps\libraryfolders.vdf' This may be caused by a bad language or game path setting." any help resolving this error would be greatly appreciated?

Same issue here (it try to load a file, the same mentioned above, bur from another steam game directory)

Try turning off AutoDetectGamePath. See "Q. I have this game as a stand-alone (i.e. not through Steam or GOG). How can I make TQVaultAE work?" under the F.A.Q.

Seems to have been resolved ? Maybe close it ?


Ensures playspace transform is created in editor

Overview
Creates a playspace transform and parents main camera under playspace transform in editor.
Changes

Fixes: #4334

@Railboy do you know the history for why this got removed in the first place and why that's not valid?

@wiwei This behavior changed when the static MixedRealityPlayspace class was introduced. At that point Playspace creation was removed from MixedRealityToolkit.EnsureMixedRealityRequirements, since it was no longer the MixedRealityToolkit instance's job to actually create the transform. But we should have kept a call to the transform getter in the instance.

/azp run mrtk_pr


Add Github actions for Python related extensions

For https://github.com/microsoft/vscode-python/issues/21110

I'm not sure I follow why we need all this extra stuff, is this not something we can accomplish with the commands syntax that the core VS Code repo uses?
https://github.com/microsoft/vscode/blob/main/.github/commands.json

It feels a bit strange that a lot of this code just duplicates existing functionality we have though, you could avoid having to maintain a new set of code by adopting the same patterns that VS Code core does.

I don't expect existing actions to be changing too much, hence I do not think it will be worth it. Python extension can own all these actions so as to not interfere, and for any new actions or modifications we can make the transition.


Similarty with wrong type

As above, Similarity field in struct FaceMatches has wrong type int, should be float64 instead

Go ahead and fix it


feat: support v-bind shorthand

resolves #3830
TODOs:

[ ] Inlay Hint
[x] Type Checking
[x] Goto Definition

Too many merge conflicts, I'll open a new PR


High cost of experience to points can lead to exp duping

I have noticed a bug that when a player upgrades a generator to a high enaught level using experience (around 8 000 points or more [all bought in thousands] to spend and then used on sth)  the experiance gets added instaed of spent leeding to a player getting so much experiance that the upgrade menu gets confused and does not allow you to turn experiance to points but when the player deposits the experiance and lowers it down enaught the experiace can be turned to points again but the duping phenomenom persists.
Would it be possible to figure out a workaround to this issue. The easiest solution i think would be to create a hard cap of max points of experiance that can be turned to points so that the experiance cost would not go to a negatives which I assume is happening. I like to push the things to the extreme so i would not like that to be a sollution. But I understand that the issue is probably complex and there arent lots of solutions to choose from.

I limited the amount of xp scaling that happens to 500, so now each point should only be able to cost 510 levels, so adding 1000 levels won't overflow anymore.
Version 2.1.8 should be on curse soon

Thank you I will give it a try


easy cast

Allows circuit component with a class initializer to take another circuit component as only argument and cast it to its type.
For example:
cc = Some >> Circuit  # say this returns a CircuitComponent
channel = Channel(cc)   # fails if wires are incompatible

falling too far back behind, not really needed. Closing.


Add defaultColDef as an input for ag-ng2 component

This was a recent addition to Ag-Grid but it was not added to the Angular 2 component.

thanks for the PR

sean - can we put some code in to check that all the properties exist on the ng2 component???


dataTaskDidReceiveDataBlock never called

I'm trying to get the download progress of a files, and the data received progressively. So, in order to get this result, I set the different blocks, but one of them is not getting called. This is the code used:
    NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
    AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];

    NSURL *URL = [NSURL URLWithString:url];
    NSURLRequest *request = [NSURLRequest requestWithURL:URL];

    NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) {
        NSURL *documentsDirectoryURL = [NSURL fileURLWithPath:NSTemporaryDirectory()];
        return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]];
    } completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) {
        if (error) {
            failure(error);
        } else {
            success([NSData dataWithContentsOfURL:filePath]);
        }
        [[NSFileManager defaultManager] removeItemAtURL:filePath error:nil];
    }];

    [manager setDownloadTaskDidWriteDataBlock:^(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite) {
        CGFloat percentProgress = (CGFloat) totalBytesWritten / totalBytesExpectedToWrite;
        progress(percentProgress);
    }];

   [manager setDataTaskDidReceiveDataBlock:^(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data) {
            progressData(data);
    }];

The downloadTaskDidWriteDataBlock is called, and I'm getting the right progress, but the dataTaskDidReceiveDataBlock is never called. Isn't the right one to get progressively the data downloaded?

Never mind, I was using a NSURLSessionDownloadTask instead of NSURLSessionTask, that's why my block wasn't called...


Chart Install error message is hidden by bottom bar

Setup

Rancher version:
Rancher UI Extensions: 2.7.5
Browser type & version:

Describe the bug

If there's an error when install a chart the error message is hidden behind the wizard's bottom bar

To Reproduce

Nav to the helm chart install page for any chart
In the url change the repo-type param to junk and hit enter
Navigate to the final wizard step and hit install

Result

error banner hidden behind bottom bar

Expected Result

error banner above bottom bar

Screenshots

See https://github.com/rancher/dashboard/issues/9917


fix(weaver): usage of weak PRNG issue

The Logic Behind the Problem
When RNG (Random Number Generator) values are not received through a hardware TRNG, seed values apply a certain pattern. (It takes a seed value such as a mathematical formula or time.) In response to this situation, there are various secure random classes to increase security.
Solution
Changes have been made to get random values using safe randomness instead of mathematical randomness. This increases the complexity of the pattern, making it difficult to discover even if data is listened to for long periods of time.
The changes that have been made;

In the "certificate_utils.go" file, the random value was taken from the math class (mrand "math/rand") and used. By taking this random value from the secure random class, we obtain a more reliable random value. I added HmacGenerate and generateSecureRandomKey functions for readability and ease of use. If you want to generate a key again, the generateSecureRandomKey function, which uses secure random, can be used.

In "HashFunctions.kt", kotlin.random.Random class has been replaced with the more reliable java.security.SecureRandom class.

The reason for the change in "eciesCrypto.js" is that the length of aes-128-ctr is not considered reliable by various standards. For this reason, I preferred the more reliable 256 length.

Fixes #2765
Pull Request Requirements

[☑] Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.

[☑] Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.

[  ] Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

[☑] Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
[ ] Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

Hello,
The current problem and locations are well defined.(#2765) I'm a C++ developer myself. But I wanted to try myself to solve this problem. Since I am not an expert in Go, I made changes using various sources. However, I do not have time to create and execute the project as a whole. I examined the files one by one, taking into account their compilation status.
If there is an easy way I can test it or if we can create the environment in a short time, I can make additional arrangements. Please check the current status when you are available.
I'm just getting into the Open Source world. I can do my best as long as I have the opportunity.
See you later.

@KaganCanSit One of the changes made in this PR was incorrect, causing the code to fail. The unit test for that module would have caught the error but was disabled.
Can you please work on a fix ASAP? I've added appropriate comments against the offending change.
@petermetz @sandeepnRES FYI.

@KaganCanSit

The reason for the change in "eciesCrypto.js" is that the length of aes-128-ctr is not considered reliable by various standards

Can you point to a source for this? I need to understand the implications. Per my understanding, 128 bits for AES is still highly secure. (But my knowledge could be outdated.)

I checked with a cryptography expert and he informed me that 128-bit AES is secure enough for classical computers but is quantum-unsafe. To be quantum-safe, we do need to upgrade to 256 bits.

Hello @VRamakrishna,
First of all, I would like to help you and learn something new as soon as possible. Since this is my first contribution to this project, I may have missed some parts.
I would like to start by explaining as best I remember why I changed the AES-128 length to AES-256. When I examined the content of the opened issue (https://github.com/hyperledger/cacti/issues/2765), I saw that mostly the random seed values were not from reliable sources. Basically, the first two parts mentioned were like this. However, the "crypto" class was used in the "weaver/sdks/fabric/interoperation-node-sdk/src/eciesCrypto.js" file and was specified as weak. When I examined various sources, I thought that the AES-128-CTR key was mentioned as the part that needed to be replaced. This was the first idea that led me to increasing the key length.
I took a look at various contents. Basically, in many sources, the length of 128 is considered sufficient, as you said. Including in banking. (https://www.pcisecuritystandards.org/glossary/strong-cryptography/)
In other cases, there is information that it was increased as a precaution against Quantom computers and military content. They think it would be better to use 256 to preserve data over time.(https://crypto.stackexchange.com/questions/76738/has-aes-128-been-complete-broken/76746#76746,
https://web.archive.org/web/20160306104007/http://research.microsoft.com/en-us/projects/cryptanaliz/aesbc.pdf) It is important how long the data will remain useful. Essentially, the situation is that the key takes longer to break. Here it may be better to determine how long the key will serve and its security level. Of course, I might have misunderstood the error at first glance.
Since I'm a C++ developer, I was a little hesitant about this pr. For testing I relied on the build states and tests on the path @petermetz outlined for me.

@KaganCanSit Thank you very much for the detailed explanation and the context! Welcome on-board to our list of contributors!
If you ever have any more questions about contributing, we have daily pair programming call [1] that runs at 10 AM Pacific Time on most weekdays on our discord channel.
To answer your specific question as well and also give some tips, here's what I just did to figure out how to test the changes you made to certificate_utils.go

I did a full text search in VSCode to go build which gave me a long list of hits
I found the first file that was a match to my search that also had the right path [2] as in, the go build runs in the directory where you changed the code.
From then on, I saw that the .github/workflows/test_weaver-go.yaml contains what I need in terms of reproducing the test cases as they are executed on the CI
So what I did then is checked out your PR's branch in git and then ran these commands (basically just replaying what the github action in the .yml does)
cd weaver/core/network/fabric-interop-cc/contracts/interop
go build -v ./...
go test -v ./...
The output of the test indicated that all the tests passed.
Based on all the above, I think this is looking good.

[1] https://wiki.hyperledger.org/display/cactus/Daily+Pair+Programming+Calls [2]

It's been a busy week, but I can use my weekend to try to improve. I would be very happy if you leave various instructions and little tips. Please share your knowledge with me.
Have a nice day.

@KaganCanSit One of the changes made in this PR was incorrect, causing the code to fail. The unit test for that module would have caught the error but was disabled.
Can you please work on a fix ASAP? I've added appropriate comments against the offending change.
@petermetz @sandeepnRES FYI.

@VRamakrishna Sorry, this is totally my fault! I still haven't re-enabled requiring the tests because the optimizations on the CI that would bring down the resource usage to acceptable levels are still pending. I'll work on tightening back up the CI because this is definitely a wake-up call in that sense.

@KaganCanSit Thanks for your explanation. Really appreciate your enterprise in finding potential vulnerabilities in the code base and trying to fix them. My comments were not meant as criticism of your effort and initiative but rather the completion of the task. The main problem was that the relevant test was disabled. If that wasn't the case, you'd have been alerted to the fact that more changes were needed in the code after your 128-->256 bit modification.
The right steps to test the module you touched are as follows:

cd weaver/common/protos-js
'make build` (Note: this builds data structures the SDK library depends on)
cd weaver/sdks/fabric/interoperation-node-sdk
'make build-local`
'npm run test' (Note: All tests should pass. Code coverage results can be ignored for now.)

The above steps are coded in the GitHub Action unit_test_weaver_node_sdk_local (see https://github.com/hyperledger/cacti/blob/main/.github/workflows/test_weaver-node-pkgs.yaml#L25).
I think the change to AES-256-CTR does need to be done (based on long-term security concerns), but you can take your time with it. For now, to avoid inconsistencies, I'm going to submit a PR reverting just that change (the rest of your changes in this PR looked good to me.)

@KaganCanSit One of the changes made in this PR was incorrect, causing the code to fail. The unit test for that module would have caught the error but was disabled.
Can you please work on a fix ASAP? I've added appropriate comments against the offending change.
@petermetz @sandeepnRES FYI.

@VRamakrishna Sorry, this is totally my fault! I still haven't re-enabled requiring the tests because the optimizations on the CI that would bring down the resource usage to acceptable levels are still pending. I'll work on tightening back up the CI because this is definitely a wake-up call in that sense.

@petermetz Don't worry about it. I understood the rationale for disabling many of the tests earlier, but perhaps it's time to re-enable the mandatory unit tests now so problems like these don't slip through the cracks.

@KaganCanSit @petermetz I opened a PR which should fix this issue by making the key length configurable: https://github.com/hyperledger/cacti/pull/2953.

VRamakrishna

@VRamakrishna thank you for sharing your knowledge with me. I know you don't criticize me and you guide me. As an engineer candidate at the beginning of my journey, I think I will learn a lot from the open source world that will broaden my horizons. I respect your knowledge and effort. I will try to research and make a correction for my mistake here as soon as possible.


Opening ncml files similarly to loadeR in R

Description
We currently developed a library that streamlines access and processing of CORDEX-CORE models (among other things).
We would like to make this data available to the Python community as well.
In R, the loadR package allows you to easily read and open ncml files. Below is an example that you can reproduce if you install loadeR.
library(loadeR)
url_ncml = "https://data.meteo.unican.es/thredds/dodsC/fao/interp025/aggregations/CORDEX/output/AFR-22/GERICS/MOHC-HadGEM2-ES/historical/r1i1p1/REMO2015/v1/day/CORDEX_output_AFR-22_GERICS_MOHC-HadGEM2-ES_historical_r1i1p1_REMO2015_v1_day.ncml"

data = loadGridData(dataset = url_ncml, var = "pr", season = 1:12, years = 1980, lonLim = c(0,5), latLim = c(0,5))

Is there anything equivalent to this in Python? I understand xncml would open ncml files but only if the netCDF files are locally available unless I got this wrong.
Any suggestions are greatly appreciated!

Sorry I missed this.
If the ncml is hosted on a THREDDS server, you'll be able to open it using xarray directly, no need for xncml.
import xarray as xr
ds = xr.open_dataset(url_ncml)


Moving from gitlab to github

Hi @roualdes
Need to make still one minor change to StanSample.jl but I'm wondering if below function can be much simpler:
function sim(smb::BridgeStan.StanModel, x=LinRange(0.1, 0.9, 100))
        q = zeros(length(x))
        ld = zeros(length(x))
        g = zeros(length(x))
        for (i, p) in enumerate(x)
            q[i] = @. log(x[]i / (1 - x[i]))        # unconstrained scale
            lp, grad = BridgeStan.log_density_gradient(smb, [q[i]], jacobian = 0)
            ld[i] = lp[1]
            g[i] = grad[1]
        end
        return DataFrame(x=x, q=q, log_density=ld, gradient=g)
    end

It feels like I'm doing something wrong in the call to log_density_gradient.
I was hoping for (and tried variations on) something like:
function sim(smb::BridgeStan.StanModel, x=LinRange(0.1, 0.9, 100))
    q = @. log(x / (1 - x))        # unconstrained scale
    lp, grad = BridgeStan.log_density_gradient(smb, q, jacobian = 0) # or a broadcasted version
    return DataFrame(x=x, q=q, log_density=ld, gradient=g)
end

So you're trying to evaluate the log density and gradient of a batch of values x?
For now, BridgeStan users are in charge of their own batch evaluations.  And it will necessarily be fiddly like this.
However, the current strategy won't extend to more complicated Stan programs.  It only works here, because ld and g both return vectors of length 1.  But for a Stan program where q has length greater than 1, then g will have length greater than 1, but ld will remain with length equal to 1, so the returned data frame will be malformed.
Maybe if I understood the context in which you imagine the function smb being used, I could offer more tips.

Yes, this sim function is only used in an example, not part of StanSample.jl. In case g has a length > 1 I would probably opt for a DataFrame with a nested column.
I used this sim function simply to plot ld and g as a function of x.
But I see your point and certainly can live with it! Thanks for your help.

I think you could use log_density_gradient!() (doc) inside the for loop as
ld[i] = BridgeStan.log_density_gradient!(smb, q[i:i], g[i:i], jacobian = 0)

which cleans up the loop some.
Would you mind closing this issue if the situation is adequate?

Thank you, that looks way better!


Charinfo command

This PR adds a !charinfo command, based on the corresponding https://github.com/python-discord/bot command.

Let's do it.


API endpoint allowing to create a resource with capital letters in the resource ID

Looks like API endpoint POST/{{EnvUrl}}/resourceregistry/api/v1/resource allowing to create a resource with capital letters in the resource ID

### Tasks
- [ ] https://github.com/Altinn/altinn-studio/issues/12165
- [x] Do not allow creation of resources with uppercase letters

Fikset i https://github.com/Altinn/altinn-resource-registry/pull/390


use 2018-style module layout

The original is intentional. We want all related code to be contained in prompts directory instead of dividing it into two separate places. This is how a lot of people use rust too.