Workbench (aka "the tool pool") design proposal

What feature would you like to be added?
Hello,
following up on https://github.com/microsoft/autogen/issues/2666#issuecomment-2518116714, I would like to propose a design for an abstraction on List[Tool]. That abstraction would be a "tool pool" that makes it possible to add, remove and find tools. It would make it easier to make agents that:

have access to virtually limitless set of tools
dynamically handle the actual set of available tools for a task
use various complex (other agents, LLMs, vector distance search...) to select/elect tools

Introducing: the workbench.
class Workbench(ABC):
    @property
    @abstractmethod
    def tools(self) -> List[Tool]: ...

    @abstractmethod
    def get_tools_for_context(self, context: Sequence[LLMMessage]) -> List[Tool]: ...

    @abstractmethod
    def get_tool_names_for_query(self, query: str) -> List[str]: ...

    @abstractmethod
    def get_tool_documentation(self, tool_name: str) -> str: ...

class DynamicWorkbench(ABC):
    @abstractmethod
    def add_tool(
        self, tool: Tool | Callable[..., Any] | Callable[..., Awaitable[Any]], enabled: bool = True
    ) -> None: ...

    @abstractmethod
    def remove_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def remove_all_tools(self) -> None: ...

    @abstractmethod
    def enable_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def disable_tool(self, tool_name: str) -> None: ...

    @abstractmethod
    def tool_is_enabled(self, tool_name: str) -> bool: ...

    @property
    @abstractmethod
    def enabled_tools(self) -> List[Tool]: ...

An example implementation: VectorWorkbench is a workbench that uses vector distance matching on tools description/documentation to find/elect tools.
class VectorWorkbench(Workbench, DynamicWorkbench):
   def get_tools_for_context(self, context: Sequence[LLMMessage]) -> List[Tool]:
        query = "\n".join([msg.content for msg in context if isinstance(msg, TextMessage)]).strip()
        return self._get_tools_for_query(query)

   def _get_tools_for_query(self, query: str) -> List[str]:
        if len(query) == 0:
            return []

        logger.info(f"Query: {query}")

        # Generate the query embedding.
        query_embedding = self._embedding_func(query).data[0]["embedding"]
        query_embedding = np.array(query_embedding).reshape(1, -1)

        # Search for the closest matching tool embeddings.
        k = min(self._top_k, len(self._tools))
        scores, indexes = self._index.search(query_embedding, k=k)  # Retrieve top matches
        results = [
            {"tool": self._tools[i], "score": scores[0][index]}
            for index, i in enumerate(indexes[0])
            if scores[0][index] <= self._score_threshold  # Filter out results below the threshold
            and self.tool_is_enabled(self._tools[i].name)  # Filter out disabled tools
        ]

        return [result["tool"] for result in results]

   def get_tool_names_for_query(self, query: str) -> List[str]:
        """Returns a list of tool names that are relevant to the given query."""
        logger.info(f"getting tool names for query: {query}")
        tools = self._get_tools_for_query(query)
        return [tool.name for tool in tools]

    def get_tool_documentation(self, tool_name: str) -> str:
        """Returns the documentation for the given tool name."""
        logger.info(f"getting documentation for tool: {tool_name}")
        # We assume that all tools have a documentation.
        if tool_name not in self._tool_docs:
            raise ValueError(f"tool {tool_name} does not exist")
        return self._tool_docs[tool_name]

   # the rest is boilerplate...

Then, the following agents can be provided OOB:
class WorkbenchSearchAgent(AssistantAgent):
    """ Searches for tools, but does *not* call them. Good for planning for example."""
    def __init__(
        self,
        name: str,
        model_client: ChatCompletionClient,
        workbench: Workbench,
        handoffs: List[Handoff | str] | None = None,
        description: str = "An agent that provides assistance to find relevant tools.",
        system_message: str | None = "You are a helpful AI assistant to find relevant tools to solve a problem.",
    ):
        super().__init__(
            name=name,
            model_client=model_client,
            handoffs=handoffs,
            description=description,
            system_message=system_message,
            tools=[
                workbench.get_tool_names_for_query,
                workbench.get_tool_documentation,
            ],
        )
        self._workbench = workbench

    @property
    def produced_message_types(self) -> List[type[ChatMessage]]:
        return [TextMessage]

    @property
    def workbench(self) -> Workbench:
        return self._workbench

class WorkbenchAgent(AssistantAgent):
    """Find and actually call tools. Good for the plan execution for example."""
    def __init__(
        self,
        name: str,
        model_client: ChatCompletionClient,
        workbench: Workbench,
        handoffs: List[Handoff | str] | None = None,
        description: str = "An agent that provides assistance to find relevant tools.",
        system_message: str | None = "You are a helpful AI assistant to find relevant tools to solve a problem.",
    ):
        super().__init__(
            name=name,
            description=description,
            model_client=model_client,
            system_message=system_message,
            # The tools are dynamically set based on the message list using
            # embedding search.
            tools=[],
            handoffs=handoffs,
        )

        self._workbench = workbench

    @property
    def workbench(self) -> Workbench:
        return self._workbench

    @property
    def produced_message_types(self) -> List[type[ChatMessage]]:
        return [ToolCallMessage, ToolCallResultMessage]

    async def on_messages_stream(
        self, messages: Sequence[ChatMessage], cancellation_token: CancellationToken
    ) -> AsyncGenerator[AgentMessage | Response, None]:
        self.remove_all_tools()
        tools = self._workbench.get_tools_for_context(messages)
        logger.info(f"selected tools: {[tool.name for tool in tools]}")
        for tool in tools:
            self.add_tool(tool)

        async for msg in super().on_messages_stream(messages, cancellation_token):
            yield msg

        self.remove_all_tools()

Used like this:
workbench_search_agent = WorkbenchSearchAgent(
        name="workbench_search_agent",
        model_client=model_client,
        workbench=openapi_agent.workbench,
        system_message="You are a helpful AI assistant to find tools. When you are done, handoff to planning_agent.",
        handoffs=[
            Handoff(
                target="planning_agent",
                message="Here are the tools your are looking for.",
            ),
        ],
    )

    planning_agent = AssistantAgent(
        name="planning_agent",
        model_client=model_client,
        system_message="You are a planning agent. Your task is to create a step-by-step plan for the given task."
        "In order to plan, you need to know the tools you can use."
        f"You start by asking {workbench_search_agent.name} to find the relevant tools."
        "Finally, you create a step-by-step plan for the given task."
        "When you are done, handoff to coordinator_agent.",
        handoffs=[
            "coordinator_agent",
            Handoff(
                target=workbench_search_agent.name,
                message="Find the tools to use for the given task.",
            ),
        ],
    )

Why is this needed?
1. Challenges in Current Tool Management

Static Tool Sets: Current systems rely on pre-defined, fixed tools, limiting flexibility and adaptability to different tasks.
Dynamic Task Requirements: Tasks often need tools tailored to specific contexts, but static systems can’t dynamically adapt.
Scalability Issues: Managing large pools of tools becomes inefficient without dynamic filtering or selection mechanisms.

2. The Role of the Workbench

Centralized Tool Management: The Workbench provides a unified system to add, remove, enable, and filter tools dynamically.
Context-Aware Tool Selection: Uses techniques like vector search to find tools relevant to the current task or query.
Agent Collaboration: Supports modular agents (e.g., Search Agent for finding tools and Execution Agent for using them) to streamline workflows.

3. Advantages for Autogen

Scalability: Handles large, virtually unlimited toolsets dynamically and efficiently.
Flexibility: Adapts tools in real-time to match task-specific needs.
Extensibility: Compatible with various retrieval methods, enabling advanced filtering mechanisms like LLM embeddings or vector matching.
Better Agent Collaboration: Facilitates seamless interactions between agents using a shared tool resource.

This is an interesting idea. Would you be available to discuss this in our community office hour meeting? Every wednesday 10 AM PST.
See: https://github.com/microsoft/autogen/discussions/4059

@ekzhu sure thing! See you tomorrow.


EDGE-630 Send the voiceCallId to the generageTransferBxml method to h…

…elp with debugging

This looks good but we shouldn't merge until we merge the node-webrtc changes, cut a release, and update package.json


[DPO] TR-DPO gather the target model params as well when syncing

What does this PR do?
fixes #1971

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Monitor usage resulting in repeated printing

Describe the bug
I use captured print statements to build test reports. In using pytest-monitor, I notice that its usage produces the effect of repeating these statements.
To Reproduce
Steps to reproduce the behavior:

Create a simple hello-world pytest function.
Run the test with the -s flag to allow printing to console, observe multiple statements.
Run again but include -p no:monitor, observe single statement.

Expected behavior
The printing of a single statement.
Screenshots

Desktop (please complete the following information):

OS: Pop!_OS 20.04LTS
Python 3.7.8
Pytest 6.0.2
Other plugins:  metadata, html

Hello @csheaff
Thanks for reporting. It is a bit weird to me as I do not play at all with capture fixtures nor the way pytest handles logs and prints.
I might be hard to analyze and debug but I'll try to have a look this week prior to the upcoming release of pytest-monitor.

Ill just add that it is not only printing that is repeated, the test function is executed multiple times. This can cause test-failure, if for example the tests are using in memory storage.
using pytest 6.1, pytest-monitor 1.4.

Hi @tobni
This is critical indeed. AFAIK, pytest-monitor is not showing up such behavior with previous versions of pytest. I did run it with a set of 7000+ tests and the ELA time remains constant. I'll need to get some time to dive deep into this issue.
May I suggest for now to use pytest 5.X series? Or is this something you can't consider for any reason?

Downgrading works for my own testing of parts of a test suite, but is not an option for CI etc, where I was hoping pytest-monitor would grant real insight/value.

I understand. I'll prioritize the investigation.

After some investigations, I think the problem is related to memory_profiler.
The following example illustrates the problem you are experiencing:
import memory_profiler

def foo():
   print('Hello World')

if __name__ == '__main__':
   print(memory_profiler.memory_usage((foo, ()), max_usage=True, retval=True))

This prints the following on my machine:
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
(25.5625, None)

If I remove the memory profiling part from the plugin, the output is as expected. I'll ask for some support to memory_profiler.

Hello @csheaff , @tobni
I might have found a workaround. memory_profiler collects datas from a dedicated process. For fast enough functions, it repeats the process until (in our case) 4 measures have been done.
I have constrained the collect to perform 1 iteration only but I have no clue regarding eventual impacts on the collected measures.
I will need to compare with previous run on some repos. I'll check that this week.


Use generated trait

With #4764 we have simplified the managment of native builder execution. However we're not using a best practice as the operator alter the configuration .spec of builder trait by adding something that will be required at build time. In order to follow best practices, we should instead move the generated configuration into the .status.
Ideally, we should have a .status.traits parameter where we copied the .spec.traits and additionally include any operator generated configuration.

Mind that #5233 reverts this feature development. Please, see the PR details to understand why this feature cannot be really developed and the alternative to check any value which may have been overridden by the operator.


Enhance mobile adaptive user interface

Currently we do this with bootstrapping. Investigate how bootstrapping works, and implement and test a solution starting with index.html, then expanding it to competition.html.

HI @supreme-gg-gg i have one suggestion, we can make this a react project

HI @supreme-gg-gg i have one suggestion, we can make this a react project

Yea I agree that was the original plan, we made this in a rush lol so we just used simple html and css.

I can help in making using react

That will be great, we are not currently working on front end anymore so feel free to experiment and submit a PR

Hey Chiang, I have made implemented the UI in react, i have made a separate react project i was not sure how to implement react project in the existing folder, so i made the separate folder "corpo-lingo-react" and made the UI for index.html and compete.html in react. functionality is yet to implement.

Yes, you can just raise a PR to main and I will have a look at what's there currently

ok sure

Hey @supreme-gg-gg  i have created the PR did you get the time to review it ?
i have created a new folder corpo-lingo-react, cd to that folder and then run the command npm start to run on the browser.

Sorry for the delay, I have looked at it and it is great! If you could go ahead to implement functionality I could do some more testing.

Np !! sure i am working on functionality

@Anikkk just want to check in on the status of this issue, I'm happy to take it over to keep things moving if you're not available right now

Hey @supreme-gg-gg  sry for the delay, currently my mid term exams are coming so not able to contribute, i will implement that but need some time.

No problem that's good, no rush and good luck with midterms

thanks man!!


enable GTK theme support

To solve this issue, I have been invited to enable GTK theme support.
I wen to Cosmic Settings > Desktop > Appearance > Experimental settings and I toggled "apply this theme to Gnome applications" and then I disconnect my session and reconnect but it didn't enable GTK theme support.
The GTK wifi setting app (down on the picture) isn't customized as it should (it should like the cosmic app, on top of the picture)

Apparently, cosmic-settings-daemon is running
:~$ cosmic-settings-daemon --help
Error: NameTaken

Based on https://github.com/pop-os/cosmic-epoch/issues/976 and https://github.com/lilyinstarlight/nixos-cosmic/issues/271, I tried to add this in my specialisation.nix file but it didn't solved it.
  specialisation = {
    cosmic.configuration = {
      environment.systemPackages = with pkgs; [
        adw-gtk3
        networkmanagerapplet
        gnome.networkmanager-openvpn
      ];
      system.nixos.tags = [ "Cosmic" ];
    };
  };

The issue is still here on alpha 3

As I explain in https://github.com/lilyinstarlight/nixos-cosmic/issues/271, I solve my issue with the wifi applet so I removed from my systemPackages networkmanagerapplet and gnome.networkmanager-openvpn so now it looks like
  specialisation = {
    cosmic.configuration = {
      environment.systemPackages = with pkgs; [
        adw-gtk3
      ];
      system.nixos.tags = [ "Cosmic" ];
    };
  };

in Alpha 3, I can reach again Cosmic Settings > Desktop > Appearance > Experimental settings and toggle "apply this theme to Gnome applications" but still GTK3 app don't look very well integrated as shown in below screenshot (I use dark theme with cosmic) :

Should I keep adw-gtk3 or it's useless.
Is there something else I should do improve their integration?

Some other user had the same issue https://github.com/pop-os/cosmic-epoch/issues/996 but it has been solved by turning on GTK theming in Appearance > advance options.
In my case, it still doesn't with Nixos 24.11 and cosmic stable.
If I got to Appearance > Icons and toolkit theming and I toggle "Apply this theme to Gnome applications", it does nothing.

If it helps, It seems to work for some apps but not all.
It works for
https://gitlab.gnome.org/World/obfuscate/
https://gitlab.gnome.org/GNOME/loupe
but not for other gtk apps such as :
https://github.com/maoschanz/drawing
https://github.com/transmission/transmission
https://github.com/gtkhash/gtkhash


golang inherit ENV proxy settings

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/tools/cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge (applicable to 1.x and 2.x branches?

Summary
This PR resolves a bug where the golang HTTP transport code wasn't inheriting the default values which include respecting any http_proxy ENV values.  Thus running srpmpacker behind a proxy'd network would timeout prior to this change.
Does this affect the toolchain?
NO
Test Methodology

Checkout 1.0-stable branch and do a local build as follows.
make clean
make toolchain -j$(nproc) CONFIG_FILE=./imageconfigs/core-legacy.json PACKAGE_IGNORE_LIST="openjdk8"
make image -j$(nproc) CONFIG_FILE=./imageconfigs/core-legacy.json REBUILD_TOOLS=y PACKAGE_IGNORE_LIST="openjdk8"

The failure case is on a network which requires ENV values set for http_proxy, https_proxy and ftp_proxy.  Set those values and try to do a build.  With LOG_LEVEL=trace  we'll see the Download log hang.  Breaking out of that, manually doing a wget of the same url works.  Next make the change in this PR and repeat to show no hang and successful download.

This seems applicable to 2.x as well. Should I open another PR?

This seems applicable to 2.x as well. Should I open another PR?

Sure, please base it on the main branch instead of 2.x


plot_model function in pycaret returns KeyError: 'weight' for xgboost model

I've got an error that relates to this line:
coef = np.array(json.loads(b.get_dump(dump_format='json')[0])['weight'])
when I ran plot_model function in pycaret. If I switch from xgboost to rf, no errors. So it is related to xgboost model specifically.
My xgboost version is 1.1.1.
Below are the codes that generated this error:
import pycaret
from pycaret.datasets import get_data
index = get_data('index')
data_lib = get_data('juice')
from pycaret.classification import *
clf1 = setup(data_lib, target = 'Purchase', session_id=123, log_experiment=True, experiment_name='juice1')
model_xgboost= create_model('rf')
plot_model(model_xgboost)

And the errors are:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-52-79763faabbea> in <module>
      4
      5 # mybooster.save_raw = myfun
----> 6 plot_model(model_xgboost)

~/.local/lib/python3.7/site-packages/pycaret/classification.py in plot_model(estimator, plot, save, verbose, system)
   3813
   3814     #checking for feature plot
-> 3815     if not ( hasattr(estimator, 'coef_') or hasattr(estimator,'feature_importances_') ) and plot == 'feature':
   3816         sys.exit('(Type Error): Feature Importance plot not available for estimators that doesnt support coef_ or feature_importances_ attribute.')
   3817

/opt/conda/lib/python3.7/site-packages/xgboost/sklearn.py in coef_(self)
    714                                  .format(self.booster))
    715         b = self.get_booster()
--> 716         coef = np.array(json.loads(b.get_dump(dump_format='json')[0])['weight'])
    717         # Logic for multiclass classification
    718         n_classes = getattr(self, 'n_classes_', None)

KeyError: 'weight'

Upgrade xgboost version to 1.1.1 actually worked for me. I didn't refresh my notebook kernel after upgrading. Sorry!
pip install --upgrade xgboost


World Importing failed

Hey Multiverse team, Im having problems with importing world Idk if this is a bug or Im just doing something wrong, well I need to import my already made map that my builder made I tested to import it to my test world and it worked! So I tried importing it to my Bedwars server and it says its creating and then after that it will say a error and the server will crash, after it crashes multiverse doesn't work anymore so please help :)

please follow the issue template. Also ensure the world you are trying to import is generated on the same mc version as your server.

I will send you a picture wait :)

I fixed it I just redownloaded Multiverse and restarted the server


Add a message in Activate as Host to Advise Admins to Set Their Legal Name

Related to the MVP proposed here; https://github.com/opencollective/opencollective/issues/3689#issuecomment-905305266 and the discussion at https://opencollective.slack.com/archives/C0RMV6F8C/p1630602431037400.
We need to add a simple message so that admins know to set the legal name when they activate the host.

@Betree : I am not sure if the message sounds good; let me know if you have alternatives. 😉


Install problem

Hi, I bought a xiaomi notebook pro a week ago and I tried to install Mojave on it, but I've come across several issues.
When there is the progress bar on Mojave install, near the end, it's rebooting and a message appear to say there where a fatal error. I tried with different version of clover and with older EFI folder from your repository with the same result every time.
So I try to install High Sierra and it ask to plug a mouse, even with different mouses, it's not recognised and I'm stuck to that.
By the way, I did an hackintosh on the same model in June, it was working perfectly, but with the new one it doesn't work and I don't know why. I know that the only difference is the version of the bios, that is the latest version : XMAKB5R0P0603
Do you have any idea how to resolve my problem?
Thanks in advance

@tcollard Hi, maybe you are using a PM981 SSD for recent models, which I wrote in README.md. PM981 's serial number starts with MZVLB and PM961 starts with MZVLW.

My mi pro is coming soon and just want to know what ssd do you recommend to buy in case that mine come with PM981... (ordered about a month ago)

Ah, yes it's that. I gonna try to patch it, or maybe change for PM961.

@Menchen For NVME SSD, Samsung 960 EVO or 970 EVO perform good for me. A complete SSD list is at here: https://www.tonymacx86.com/buyersguide/building-a-customac-hackintosh-the-ultimate-buyers-guide/#Solid_State_Drives .


Deep link (mobile) deploy fails when

image uri is: https://lh3.googleusercontent.com/JcE2T_AKv7cU5wh3ALfjs8-ngIJfYpHzAj6wRWWOBb1zkuG1o3j92wtelKQXMCTOOIhQjRsb7LRrMeaBbUNnWse5rhc26OHlZA6k0w=s168
perhaps related to url length

#94


Support for multiple collections in the 'collection' query param

When choosing the server use the first collection from a comma-separated list when there are multiple in the collection query param or default collection

Thanks for the PR!


Add support for setting debug mode after the Viewer object has been constructed. #1221

This patch adds a setDebugMode function to the Viewer object. This enables scenarios such as toggling debug mode from a button in the UI.

I'm new to the project so some feedback on the approach I've taken to test the setDebugMode function would be appreciated. Thanks.

Fixes #1221

Thanks for the feedback - I've updated the PR.
I noticed that running the project locally all tests pass if I run 'grunt test' but if I run 'grunt coverage' I get some test failures. Is this a known issue?

Looks beautiful! Thank you :)
And yes, that coverage issue is news to me; thanks for spotting it! I've created a new issue here: https://github.com/openseadragon/openseadragon/issues/1226, along with a possible fix recommendation, if you're up for taking a whack at it.


Created using Colaboratory

Annie Moriondo - CS 697 Assignment #1.

Wow really nice heart rate analysis! Great job!


Users in a banned group cannot use data erasure or pull request form

Title of issue explains it all. I may be wrong, but I feel like international courts will not accept the user as being banned for a reason of being unable to pull their data. And banning a user does not remove their data from the site inherently.

This appears to be overlapping with imperfections in MyBB (e.g. the Change Password/Email,  Contact Us pages, etc. not being available for banned users). It might be possible to fix it indirectly (essentially tricking MyBB to allow certain pages) but we'd also need to display the URLs on the lockout page (same with UCP sections that should be available).

I personally cannot duplicate this...it seems to work as expected for me on a test board with no other plugins installed.

I don't think we should try to allow banned users to use the data erasure or date export. They can use the contact.php page to ask for it and then an administrator can do it from ACP, so we should add an option an ACP to do that. This is my opinion.


start three ak servers simultaniously on a local machine

use nginx as the load balancer.
9980 -> nginx -> 9981,9982,9983
TODO:

do not automigrate on start, else is flaky as several trying to setup in parallel

do you handle the multiple sqlite instances ? I didn't get where
anyhow, docker compose is the way to go here
otherwise people can decide how they want to run ak scaled

do you handle the multiple sqlite instances ? I didn't get where
anyhow, docker compose is the way to go here otherwise people can decide how they want to run ak scaled

agree with @efiShtain and @tebeka regarding docker compose

@itayd
https://github.com/autokitteh/autokitteh/pull/186
have a look at this change
let me know if you think we should merge yours / mine / both / other options
anyhow, I don't think we should provide / promise scaling capabilities until we have the base lines of load testing

replaced by #186


[DAX Expressions] Inactive relationships that are never activated

I get this message on my model but the inactive relations are activated through Calculation Groups, when the end-user selects the Calculation Item
Are these taken into account ?

also related to calculation groups/Items
Data columns must have a source column, on Calculation Group Colums

Adding @m-kovalsky

Thanks for raising this. The scope of the rule regarding inactive relationships has been expanded to include Calculation Items in Version 1.1.1.
As to Calculation Group Columns having source columns - there is no separate class for Calc Group Columns. They are treated as Data Columns within the Tabular Object Model. Therefore, if a Calc Group Column does not have a source column it will be caught by the current rule's existing logic.


Extra Contact Us Link in the Footer

Expected behavior
The contact us link should only be under the support heading.
Actual behavior
The contact us link is under the support heading now but also still under the about us heading. Please remove the one that is under the about us heading.
Steps to reproduce behavior
View the footer at the bottom of the website.

This will be fixed in TST-158

Ready for QA.

8-19 SH - Fixed.


login page empty

网站地址：http://<IP_ADDRESS>/
docker信息

谷歌浏览器提示：
{
  "status": "error",
  "msg": "Redirect URI: http://<IP_ADDRESS>:80/api/v1/callback/casdoor doesn't exist in the allowed Redirect URI list",
  "data": null,
  "data2": null
}

edge浏览器提示
<!doctype html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Casdoor - An Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML and CAS"
    />
    <link
      rel="apple-touch-icon"
      href="https://cdn.casbin.org/img/favicon.png"
    />
    <link
      rel="manifest"
      href="https://cdn.casbin.org/site/casdoor/manifest.json"
    />
    <title>Casdoor</title>

    <link href="/static/css/main.b5f23b34.css" rel="stylesheet" />

    You need to enable JavaScript to run this app.

@zhaoxinhua like it said, you should add http://<IP_ADDRESS>:80/api/v1/callback/casdoor to your Casdoor application's Redirect URIs, a similar docs: https://casdoor.org/docs/integration/C++/Nginx/#configuring-casdoor


Ability to gain potion effects on certain levels

I felt like the dogs lacked something and were still too weak on high levels with simply more HP and more damage.  It would be cool if it was configurable in the files though :)

Sounds like a cool feature!!
I think it would fit very well into the plugin, and together with the other stuff in the TODO-list (like armor, etc.).


Register simple POCO as a service

I would like to register a simple POCO with methods marked by [JsonRpcMethod]. I.e. I would like to have JsonRpcService.buildService as a public (static) method. May be in the 'Handler' class or some other class?
BTW. why the buildService call public method Handler.Register() by reflection?

I think you can get the effect you desire this way. Correct me if I'm wrong..
`[Test ()]
public void TestCanCreateAndRemoveSession()
{
var h = JsonRpc.Handler.GetSessionHandler ("this one");
		h.Register ("workie", new Func<string,string>(x => "workie ... " + x));

		var metadata = new System.Collections.Generic.List<Tuple<string,Type>> {
			Tuple.Create ("sooper", typeof(string)),
			Tuple.Create ("returns", typeof(string))
		}.ToDictionary(x=> x.Item1, x=> x.Item2);
		h.MetaData.AddService("workie", metadata, new System.Collections.Generic.Dictionary<string, object>());

		string request = @"{method:'workie',params:{'sooper':'good'},id:1}";
		string expectedResult = "{\"jsonrpc\":\"2.0\",\"result\":\"workie ... good\",\"id\":1}";
		string expectedResultAfterDestroy = "{\"jsonrpc\":\"2.0\",\"error\":{\"message\":\"Method not found\",\"code\":-32601,\"data\":\"The method does not exist / is not available.\"},\"id\":1}";
		var result =  JsonRpcProcessor.Process("this one", request);
		result.Wait();

		var actual1 = JObject.Parse (result.Result);
		var expected1 = JObject.Parse (expectedResult);
		Assert.AreEqual(expected1, actual1);

		h.Destroy ();

		var result2 =  JsonRpcProcessor.Process("this one", request);
		result2.Wait();

		Assert.AreEqual(JObject.Parse(expectedResultAfterDestroy), JObject.Parse(result2.Result));
	}

`

Yes, this way it's possible. But I think if the JsonRpcService.buildService would be a public static method, then it could be possible to do something like BuildService(myPoco) and that's it.

Please pull latest, and test this out and give me some feedback.
https://github.com/Astn/JSON-RPC.NET/blob/master/Json-Rpc/ServiceBinder.cs
I wrote a simple test here:
https://github.com/Astn/JSON-RPC.NET/blob/master/AustinHarris.JsonRpcTestN/Test.cs # ln 43
 [Test()]         public void TestCanCreateMultipleServicesOfSameTypeInTheirOwnSessions()
Feel free to create a pull request with your enhancements.

@xmedeko do you think you will have a chance to look at this in the next week?

Hi, I've looked already at the solution. It's OK. I have some comments to the ServiceBinder.bindService() - I had no time to meld them into a PR so maybe we may discuss them first:

Why the Handler.Register() is called by the reflection and not handlerSession.Register(methodName, newDel); ?
Public methods should have the first letter a capital, to the method name should be BindService.
I suggest to change the second parameter from serviceFactory to simply object instance, so the method head would be:

public static void BindService<T>(string sessionID, object instance) { ... }
// and also with DefaultSessionId
public static void BindService<T>(object instance) { ... }

I would let the service object creation the the user - e.g. it may be created by a container.

I have pulled all of your recommendations into the latest published artifact. Thanks for the thoughtful insights! They are much appreciated.


Daemonize script issue — python modules not installed

Man this script is the only thing that I need for my bots, its awesome.
But Im having this issue when trying to run this as a systemd service
ene 05 02:01:40 XB-desktop systemd[1]: Started monitoring bot.
ene 05 02:01:40 XB-desktop python3[10678]: Traceback (most recent call last):
ene 05 02:01:40 XB-desktop python3[10678]:   File "/home/xborland/systemd_services_monitoring/bot.py", line 4, in>
ene 05 02:01:40 XB-desktop python3[10678]:     from aiogram import executor
ene 05 02:01:40 XB-desktop python3[10678]: ModuleNotFoundError: No module named 'aiogram'
ene 05 02:01:40 XB-desktop systemd[1]: monitoring.service: Main process exited, code=exited, status=1/FAILURE
ene 05 02:01:40 XB-desktop systemd[1]: monitoring.service: Failed with result 'exit-code'.
ene 05 02:01:40 XB-desktop systemd[1]: monitoring.service: Triggering OnFailure= dependencies.
Would you be so kind to help me ?
Thanks in advance.
Regards !

Hello! Nice of you to become interested in my script, thanks a lot!
It seems that aiogram is not installed in your virtual environment. I have made an installation script that works on my OS, which is rather outdated. I apologize I haven't had enough time to make a more detailed documentation.
I recommend you to install all the needed modules manually and handle all errors that appear in your OS. To do that:
cd ~/systemd_services_monitoring
ls

Check if there is a "venv" directory in a list. If not:
python3 -m venv venv

After the directory appears, run
source venv/bin/activate
pip3 install -r requirements.txt

And then try restarting the service. It seems that the installation script did not run properly on your system, but I do not know what were the errors, so I am sorry if my answer is incomplete. Tell me if you a face any errors, I will be glad to help!

Hello,
Thanks a lot for the quick help man. But Im stuck in this and almost sleeping :/ haha
 Active: activating (auto-restart) (Result: exit-code) since Thu 2023-01-05 03:21:16 CST; 4s ago

The script runs perfectly by itself with no daemon but seems to be easy to daemonize but... is not easy at all.
Have you any idea ?

Yeah and now is very weird due to the service is running aparently without issues but the bot doesnt respons to the /start and If I run it without daemon works fine.
Here you have my .service file.

could you please tell me if you add something like this on the bot.py file ¡?
#!/home/xxx/venv/bin/python3

No, I haven't added this. But I suggest changing /usr/bin/python3 to /home/xborland/systemd_services_monitoring/venv/bin/python3 for you. At least it works fine for me

yeeeeeeeee that line was the critical one for me ! Thanks a lot now its working fine !

And also the bot is responding correctly to all the commands !
Thanks Mr.

Yoohoo, I am happy to see you have managed to do that! You are always welcome, have a nice day!

Thanks for being so kind ! Now your script is helping me a looot !


Create how-to-open-a-pull-request.md in german

Translate to german

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

Hi @Plingooo same as your previous pull-request can you get this PR reviewed

oh, I must have been a little tired. Thanks for the improvements @Squizzi3


ARROW-17977: [CI][C++] Don't use LLVM 14 or later on Debian i386

Because LLVM 14 or later doesn't provide .deb for i386 at apt.llvm.org.

@github-actions crossbow submit test-debian--cpp-

+1


Using S3 creds in storage_options results in side effect of setting env vars

Environment
Delta-rs version: 0.14.0
Binding: Rust
Environment: macOS Ventura 13.4

Bug
What happened:
When passing in S3 creds via storage options to create a delta table, ie AWS_ACCESS_KEY_ID, this has an unintended side-effect of overriding set environment variables.
What you expected to happen:
S3 values to be used from the storage options map without setting any environment variables.
How to reproduce it:
let storage_options_invalid: HashMap<String, String> = HashMap::from([
(
"AWS_DEFAULT_REGION".to_string(),
env::var("AWS_DEFAULT_REGION").unwrap().to_string(),
),
(
"AWS_SECRET_ACCESS_KEY".to_string(),
env::var("AWS_SECRET_ACCESS_KEY").unwrap().to_string(),
),
("AWS_ACCESS_KEY_ID".to_string(), "INVALID123".to_string()),
(
"AWS_SESSION_TOKEN".to_string(),
env::var("AWS_SESSION_TOKEN")
.unwrap_or("".to_string())
.to_string(),
),
]);
println!("{}",env::var("AWS_ACCESS_KEY_ID").unwrap().to_string()); // Prints correct value
let mut table = deltalake::open_table_with_storage_options(
table_filepath.as_str(),
storage_options_invalid,
)
println!("{}",env::var("AWS_ACCESS_KEY_ID").unwrap().to_string()); // Prints "INVALID123"

It happens here and looks like there is a good reason according to comments https://github.com/delta-io/delta-rs/blob/bdf1c4e765ca457e49d4fa53335d42736220f57f/rust/src/storage/s3.rs#L259. It should only effect the current execution context - not the global environment (e.g. on running the again the correct values will be picked up from global env again).
It also looks like there is a bit of a delay before the request actually fails (probably some kind of caching at the provider backend?). I mean running a test with right value of AWS_ACCESS_KEY_ID set in the storage option followed by 2-3runs with i nvalid value still works. Other values (AWS_SECRET_ACCESS_KEY or TOKEN) don't seem to show the same behavior so they maybe invalidating that cache

I am going to close this because I believe we are working much more predictably now by relying on the AWS SDK for credentials which will provide the appropriate passthrough


gyp: update gyp to 0.6.1

Last piece for a new release to deal with shared lib location issues. This is just #2236 with the fix for Windows.
I'm keen to fast track this so we can release if anyone's around to review.
@ryzokuken, @targos, @MylesBorins
also, @ryzokuken do you want to be added to the nodejs/node-gyp team? I notice you're not on the reviewers list I can select from.

re-running tests to see if the macos is flaky, I think it is but want to be sure

landed in ee6a837c
on to release @ https://github.com/nodejs/node-gyp/pull/2239


Add .buffrs/config.toml

Based on upstream version 0.8.1 but with following additions:

Introduction of a configuration file in .buffrs/config.toml (in the current working directory, or any parent)
Config file allows specifying:

List of registry URLs and their names
A default registry

Example:
[registries]
some_org = "https://artifactory.example.com/artifactory/some-org"

[registry]
default = "some_org"

I prefer .config/buffrs/config.toml to avoid the proliferation of dotfiles in a repo (for example in the Rust community, cargo-nextest already does this)

+1 one on what @poliorcetics said.

I don't have a strong opinion, and am happy to change the PR accordingly. However, I don't actually see any tool other than nextest using a .config/* folder for its settings. Can you please point out a few to me?

Did you try running it on your local machine? I get:
➜  ~ ls ~/.config | wc -l
66

Some notable entries are git, Code, helix, libreoffice, mozzila, tmux.
Also, I love XKCD as much as the next guy, but I don't think it applies here. We're not the ones creating a new standard, We're just trying to coalesce around an existing one.

Also, I love XKCD as much as the next guy, but I don't think it applies here. We're not the ones creating a new standard, We're just trying to coalesce around an existing one.

@tomkarw : your requested change has been implemented. Would you please re-review or permanently reject this PR to clarify its status?

I'll reiterate, I much prefer <repo>/.config/buffrs.toml, spamming repos with dotfiles is not my idea of quality


Fixed Time type from ushort to ulong

Already fixed

Thanks for helping anyway!

@fedeantuna FYI, starting with version 3.0.0 the Time field of UioHookEvent is the UNIX timestamp of the event and HookEventArgs now contains the EventTime property.


ArduCAM2SD without ArduCAM shield

Hi, yesterday I got my ArduCAM Mini 2MP OV2640 and now wanted to connect it together with my SD-Card to my Arduino MEGA R3. I just want to take a picture one time per hour so I think I don't really need an ArduCAM shield, right? I wired it up like this:
Camera             Arduino           SD-Card
CS           >        7
MOSI      >        51        <         MOSI
MISO      >        50        <         MISO
SCK        >        52
GND       >        GND    <         GND
VCC        >         5V        <         VCC
SDA        >        20
SCL         >        21
9          <         CS
https://cdn.sparkfun.com/assets/8/f/f/6/5/50e5d529ce395f2f7a000000.png
What am I doing wrong? Please help me

@Achim68
Hi,
Please refer to the below connection:
2640	VCC	GND	SDA	SCL	MISO	MOSI	SCK	CS SD_CS
2560	5V	GND	20	21	MISO	MOSI	SCK	10     9
Regards.

@93450101
Yes of course. If you don't use our shield board, you should use a circuit board which can connect your SD card and the Arduino UNO. You can directly connect the Arducam Mini camera to Arduino UNO board.

@UCTRONICS        WHICH PIN SHOUD I CONNECT SD CARD AND BOARD

@UCTRONICS which pin can i use for sd card and arducam

@93450101
You can refer to this link
http://www.arducam.com/wp-content/uploads/2017/12/ArduinoConnection-.jpg

You can use any unused GPIO for SD card cs pin, the SPI pins are connected to the UNO SPI hardware pins which is also shared with Arducam camera.


Update The Preferences Window

Issue Label: [Enhancment]
Description of bug or feature enhancement:
Update the U.I. and logic behind the preferences window so it is easy to add new preferences and it is easier for the user to change them.
**OS and OS version:All
**Version of Insomnia Application:1.2.0

Done with commit ff173892de657207c7e4534a159cda64913835bc


Custom allocator failures cannot handle safe calls;

When  a custom allocator is used, there is no way to tell if the duktape handle_error flag is set so that an allocation for the error can occur. This makes "safe call" wrappers unable to catch allocation errors (because an error cannot be pushed onto the stack, resulting in the fatal_handler being called.
Is it feasible to expose some properties of the current state of the heap? For example, the internal handling_error flag. In that case, my custom allocator could detect if duktape is trying to allocate memory for an error to push onto the stack.

Hmm, assuming there's space in the value stack (which is the normal situation at any point) Duktape should first try to push an error, fail that with out-of-memory, and fall back to pushing a preallocated DoubleError object on the value stack. The double error doesn't require object allocations because the instance is created beforehand so the only thing this needs is the ability to write a tagged value (duk_tval) to a preallocated value stack entry - which requires no allocations.
Do you have an example which reproduces the case? Using a pooled allocator I either get a "Error: alloc failed" or similar, or a "double error" no matter what I try manually:
DoubleError: error in error handling

However I'm testing with Ecmascript code so maybe duk_safe_call(), duk_pcall() etc behave differently for some reason.

I'm trying to reproduce this outside my environment. In the meanwhile, here's the call stack

Ok, I think the issue here is that the error is handled more or less as intended but the callstack unwind then closes an environment record which tries to allocate memory when it's copying over variables to a closure. Doing that is mandatory even when unwinding due to an error because function instances referencing the variables might have been created before the error occurred.
Not sure what the best fix would be, I'll have to think about this a bit.
One will necessarily need to sacrifice some semantics related to scopes to be able to unwind even when scopes cannot be closed (or the scope objects would have to be allocated on function entry to ensure allocations are not needed on an unwind). This is probably not a major issue for sandboxing, and it's more important to shut down cleanly.
Using another setjmp catchpoint for the unwind would catch the error. But that'd carry some overhead for all calls to handle a relatively rare case (an important case for sandboxing, of course).
It'd also possible to rework the scope handling to use a lower level interface to manage the scope objects, so that throwing would be avoided. For instance, the scope objects could be resized before copying any properties over and if that failed, just skip copying variables. If the resize succeeded, the variables could be copied without a risk of an error. This would also be a bit faster than the pretty simple explicit property handling.

It might also be useful for an allocation error (which only happens when emergency garbage collection has failed) to propagate out as an uncatchable error similar to script timeout errors. It's not really safe to continue, and as described above it may not be possible to respect all required Ecmascript semantics after the error.

Going back to the original question, it'd of course be possible to expose some heap state to the application. But doing so creates a compatibility promise so it'd need to be something which can be guaranteed to exist and be relevant over time.
One possible thing to expose would be to communicate with the user application about the need for emergency GC. For example:

If a memory allocation fails even after a normal GC, indicate this to user code using a callback.
If the memory allocation still fails after an emergency GC, indicate this too using a callback. User code could then request a forced shutdown, and perhaps provide some additional memory to process the shutdown.
Retry the allocation once more after the user callback.

Requesting a forced shutdown could work similarly to how a script timeout propagates, i.e. as an "uncatchable" error which isn't catchable using Ecmascript code but respects Duktape/C protected calls to allow native resources to be released. See #474.
Even with this kind of integration in place, there's not necessarily an easily determined upper bound on how much memory is needed to shutdown cleanly (to respect finalizer guarantees etc).

Wait, you need to allocate memory to unwind?  That seems backwards, although I admit I'm not familiar with all the semantics related to Ecmascript call handling (the whole spec is quite convoluted).

Yes, as things are now, unwinding creates an explicit scope object during unwinding. Unless that object were allocated on entry, memory is needed to unwind. This is not an Ecmascript requirement but a Duktape internal design issue.
Ecmascript does require e.g. execution of "finally" blocks which will definitely need memory. Duktape also executes finalizers, which needs memory. But either of these can fail without impacting the unwind process which is the issue here, because an error during unwind is not inside the same protection as the call itself. Not having enough memory to run finalizers may be a problem by itself, of course, because you don't necessarily get an actual chance to free native resources. Dealing with actual out-of-memory is quite hard if you simultaneously want some guarantees (usually one needs preallocation to get them).

That's all true.  Although I've learned that if you're truly out of memory enough that malloc() starts to fail, you're pretty much dead in the water already; continuing with normal operation is not going to work so you may as well just clean up what you can and pack it in.

Anyway, what I said about I meant in the more general sense; it isn't (necessarily) relevant here because the allocations are sandboxed, they may not "have to" fail.
If I understand the issue correctly, a custom allocator is being used and needs to know whether an important allocation is being requested so the sandbox environment can exempt it from some quota.  In that case a workable solution that would avoid exposing internal heap state would be to allow an additional parameter for the custom allocator which indicated the relative "importance" of the allocation.  Normal heap allocations and anything else related to script execution would be zero, higher values would be for more critical needs (unwinding, errors originating from Duktape, etc.).  Doing this without breaking API compatibility for the purposes of semantic versioning is left as an exercise for the reader. :)

Yet another solution would be to have two callbacks: one to allocate memory during normal bytecode execution (which should always be sandboxed), and another to allocate memory for internal Duktape structures (which might be more useful to allow lenience).  If the app needs both of these to be sandboxed, it will just use the same function for both, else it can provide separate functions.

Yes, it's often viable to have some reserve. But how much? If the amount of memory needed for an unwind cannot be bounded, it's a workable solution for some cases, but not all. In particular, it will be easy to craft code which will exceed that reserve.

That's why I suggested leaving it up to the allocation callback(s) still--the app still gets to decide how much to provide as "reserve".

How would one arrive at a safe value?

Well, the exact amount of reserve space is out of Duktape's scope, I'm just suggesting ways Duktape could communicate the relative "importance" of the request, with the application still ultimately in control of what to do with it.

I know. But what does that solve? If the sandbox is running potentially unknown code, that code can always contrive to exceed whatever reserves are in place. The application implementing the sandbox is then responsible for figuring out a reserve which works - which is in general not possible to know in advance.
Because there are solutions which work in all cases (and at least allow the heap to be terminated safely), I'd much rather do something like that.

At a high level the two basic approaches which have consistent behavior would probably be:

Ensure the current error handling and unwinding path does not rely on allocations succeeding. It's originally designed to do that, but the scope unwinding doesn't respect that policy now. This should be fixable one way or another.

Treat a persistent out-of-memory error (i.e. allocation fails after even emergency GC) as a hard error, so that Duktape wouldn't support resuming execution afterwards. Instead, the guarantee would be that a heap can be freed without encountering fatal errors in the process.

I was mostly going on @jsas original feature request, to expose the heap handling_error flag.  Since that's internal state, this was just a way to achieve the same (or similar) goal in a more general way.
Of course as touched on in your post above, if we can remove the requirement for allocations on unwind entirely, this whole point is moot.  Even so, giving the user the ability to prioritize "infrastructure" allocations (even if the ultimate quota is the same) might not be a bad idea.

Like I said above, I think it's important that allocation errors are handled reliably in all cases, so that we don't just shift the problem from one place to another. But having said that, it might still be useful to know some context to an allocation.
Considering a "this is an infrastructure allocation" flag: in practice that would be quite difficult to implement.
For example, some helper code might be called in response to Duktape internals doing something quite far away from the helper, or as a result of a public API call calling into Duktape internals which eventually calls the helper. There may be a lot of call levels in between; unless that "originating request" is somehow carried all through the call layers, it wouldn't work in practice and you'd have something similar to priority inversion.
It would also be possible to set some heap level "unwinding" flag which would then be carried to all allocations while that is in progress. But it would then also apply to e.g. user finalizers which may do an arbitrary amount of work which probably shouldn't be flagged critical.
So while it'd maybe be useful, it's quite difficult for the "this is an infrastructure allocation" flag to come out right.
Providing a callback or other information about allocations which fail even after garbage collection would be possible and quite straightforward. This might be useful if allocation error leads to a hard exit so that some memory could be added to (mostly) handle the unwindind cleanly (e.g. allow finalizers to run). However, this would still rely on an actual solution to make the unwinding safe even if the memory added wasn't enough for a clean unwind.

Yeah, that's true.  I should really have known better about the helpers, having seen what the bytecode executor looks like firsthand. :)

I'll give the unwind path scope handling a little test once I have 1.4 stuff in a reasonable shape. It should be relatively simple to just preallocate the properties for the scope object on function entry.

#477 provides a testcase which seems to reproduce the issue using the "ajduk" command line tool.

What is ajduk, how is it different from normal duk?

It's the "duk" command line which uses the pooled allocator from AllJoyn.js. When compiled for x86 with pointer compression etc, it quite closely mimics very low memory targets.

Just as a quick test I disabled variable value copying in the scope handling done on callstack unwind: as a result "ajduk" now fails gracefully:

@jsas Here's a branch which disables the scope-related memory allocation on unwind:

https://github.com/svaarala/duktape/tree/hack-outofmemory-envrec-close

It breaks compliance so it's just a test, but it'd be interesting to hear if it fixes your fatal error issue. If so, we'd know the root cause is not something else. Here's a prebuilt dist package if that's useful to you:

http://duktape.org/snapshots/duktape-1.3.99-20151205115457-v1.3.0-363-gaf70f28-hack-outofmemory-envrec-close.tar.xz

That build did the trick ( duk_safe_call returned 1 instead of calling fatal_error handler). Of course, there's no error on the stack to pick up at this point, so would it be possible to have the return value be an error code (like -53)?

@jsas What does your duk_safe_call() call site look like?

The reason I ask is because of this:

If an error occurs, the stack will still have nrets [the fourth parameter] values at "base index"; the first of such values is the error, and the remaining values are undefined. If nrets is zero, the error will not be present on the stack (the return stack top will equal the "base index"), so calling this function with nrets as 0 is not very useful.

@jsas That's good to hear - that branch is not usable as a solution because it just skips full scope handling in unwind, but it does identify the root cause and if this is the only concrete problem it should be relatively easy to fix. I'll need to review the unwind path fully to make sure though.
There should be an error object on top of the stack, but it'd simply be a generic Error in this case - either an "alloc error" or similar, or if there wasn't memory to create an actual error, it would be a "double error". Both are simple Error instances from Ecmascript typing point of view. You can get the equivalent error code using http://duktape.org/api.html#duk_get_error_code, but that would just return DUK_ERR_ERROR.

As things are now, error objects are modeled after Ecmascript errors. They are not very verbose from a programmatic point of view: errors have a name, a message, and a stack trace, which are useful as human readable descriptions but programmatically you can basically rely on the error name and/or the error code. They don't provide a detailed distinction between error sources or error severity right now.
One thing which is not very nice now is that Duktape specific (non-standard) errors are not proper subclasses but direct instances of Error which means you can't really deal with them programmatically.  I'd like to change it roughly as follows:

Reduce the number of specific custom errors; right now the custom errors are: unimplemented, unsupported, internal, alloc, assertion, API, uncaught. It should be enough to have one or two implementation specific errors, which is more in line with the quite sparse Ecmascript error "tradition". Some errors could map to standard Ecmascript errors, e.g. API errors could mostly map to TypeError.
Map the implementation specific errors to actual subtypes so that they have proper programmatic typing, and allow detection e.g. as err instanceof InternalError or duk_is_internal_error(ctx, -1).

It would also be possible to add some additional boolean flags to errors to indicate severity somehow. For example, error objects could have a .fatal boolean flag to indicate that the error is a severe one, such as an allocation error or an actual internal error after which is not necessarily safe to continue. The pre-created DoubleError instance could also have this flag, so checking for .fatal would then identify the error quite intuitively.
Another related improvement would be to change the simple "success vs. error" return code indication of safe calls to provide a three level indication of "success vs. normal error vs. severe error". I'm not sure how good this change would be in practice: would two error levels be enough, would drawing the line between error types be clean, etc. So I'd perhaps favor having that information in the error object itself and provide good accessors for that.
Anyway, from sandboxing point of view, you should treat the error on the value stack carefully so that you don't invoke new memory allocations when dealing with the error. Because the value stack is preallocated the following should be safe at least:

Reading the error code using duk_get_error_code()
Reading the error .name and .message

Coercing the error to a string is not generally safe because it involves a temporary string which needs to be interned. The .stack property is virtual and is generated on-the-fly so reading it is risky if you're potentially out of memory.

The Error won't be on the stack if nrets = 0 for the safe call, which is why I asked what his duk_safe_call() looked like.

@fatcerberus nrets is indeed 0 for that particular call.

Yeah, you'll need to pass nrets == 1 if you want the error on the stack (you can pop the unneeded value off afterwards).


Using the extension 6.2.0 and the eosjs v20.0.0-beta3 I cannot execute the boilerplate

Executing boilerplate example, after successful connect and login, i get an error on the following line:

Error in console (Chrome)

Code location, extension inject.js:

where w is instantiating a proxy object, calling the passed Api object as a function.

Been struggling with this for a while, help greatly appreciated. Beginning to believe that the Chrome extension is not being supported anymore, is this the case?

Extension does not support eosjs2.
You can either move to eosjs1 or use desktop.


Search - Unsubmitted expense can be held without error in Search

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.16-0
Reproducible in staging?: Y
**Reproducible in production?:*Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4804456
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:

Delayed submission is enabled on Workflows
Workspace has an approver (admin)

Go to staging.new.expensify.com
[Employee] Go to workspace chat
[Employee] Create two expenses and do not click Submit button
[Admin] Go to transaction thread of any submitted expense from employee
[Admin] Click on the report header > Hold
[Admin] Enter reason and save it
[Admin] Note that it shows "This request is being modified by another member." and the expense cannot be held
[Admin] Go to Search
[Admin] Select the expense from Step 4 via checkbox
[Admin] Click on the dropdown > Hold
[Admin] Enter reason and save it
[Admin] Note that admin can hold the request from Search and there is no error message

Expected Result:
Admin should be prevented from holding expenses that are not submitted yet in Search
Actual Result:
In Step 7, admin is not allowed to hold unsubmitted expense when holding via transaction thread
In Step 12, admin can hold unsubmitted expense via dropdown button in Search
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/user-attachments/assets/0a07ac6e-19a1-43fa-980c-e423446af209
View all open jobs on GitHub

@trjExpensify  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

We think that this bug might be related to #wave-collect - Release 1

Proposal
Please re-state the problem that we are trying to solve in this issue.
Unsubmitted expense can be held without error in Search
What is the root cause of that problem?
We are missing the validate checks as in here
https://github.com/Expensify/App/blob/8abdcca86923a5a121734f34bbc53f2eeb5a45dd/src/pages/iou/HoldReasonPage.tsx#L60-L74
here in search hold page
https://github.com/Expensify/App/blob/8abdcca86923a5a121734f34bbc53f2eeb5a45dd/src/pages/Search/SearchHoldReasonPage.tsx#L40-L46
What changes do you think we should make in order to solve the problem?

We need to use the validate logic here
https://github.com/Expensify/App/blob/8abdcca86923a5a121734f34bbc53f2eeb5a45dd/src/pages/iou/HoldReasonPage.tsx#L60-L74
in the search hold page
What alternative solutions did you explore? (Optional)

BE

@cdOut is your PR going to take care of this, actually?

@trjExpensify Hm, looking at the video it looks a little sketchy, it might be using different logic there. I can test it on the hold cleanup PR and if it doesn't fix it I can work on this one after.

Okay, sounds good. Let me know!

Any luck with testing that @cdOut?

@trjExpensify I've tested it on my hold cleanup PR and it did not help with this bug. I'll create a separate PR with a fix for this one early next week.

Okay, I'll assign you. :)

@trjExpensify I've raised a PR and moved to review, looks like someone missed a conditional for checking whether the selected requests have been submitted yet by the author.
I've also went and added a revised error message for this case, since the one used for singular requests wasn't fit for this one. So for singular request it's This request is being modified by another member. and for the search feature hold I've went with 'Some of the selected requests are being modified by another member.' which is more descriptive. Let me know if that's okay.

Thanks, Tymo! I actually find these error messages pretty strange for the scenario they were introduced. I see the blame coming from this PR: https://github.com/Expensify/App/pull/37477
If I understand the reportModified one correctly, the case is:

Member submits an expense
Opens the hold modal to enter a reason
during that time the approver approves/pays the report
The submitter tries to hold the expense
We display an error that says: "This request is being modified by another member."

@jamesdeanexpensify I see you approved that copy, but I think it's incorrect, and we should change it to something like: "This expense can't be held because it is approved or paid."
Moving on to this case Tymo is addressing on the search page:

Member creates an expense, puts it on a draft open report
Admin selects the expense (or multiple) on the open report
They see the Hold action button in the bulk select dropdown
Provide a holdReason > confirm
We show an error, a discerning one would be: "You can't hold expenses that haven't been submitted yet."

But, I question why in step 3 we're even showing the Hold action button if the selected expenses can't be held, and then we'd avoid this error case altogether. CC: @JmillsExpensify @luacmartins as I'm sure we aren't showing other action buttons that aren't applicable in search (e.g Delete when an expense selected is approved or paid).

Ah, okay. I was missing some context on how the search flow handles such cases. Thanks for clearing that up. In that case, I do agree with hiding the option from the menu. The code I wrote is also applicable in that scenario.
This is definitely out of scope, but I do wonder if maybe always showing the possible options would be a better solution, and when one of the selected requests would block an option, we could then show a warning indicator next to the option in the menu. We could then also highlight which of the selected requests are causing the warning to appear.

Ah, okay. I was missing some context on how the search flow handles such cases. Thanks for clearing that up. In that case, I do agree with hiding the option from the menu. The code I wrote is also applicable in that scenario.

Awesome, apols if that wasn't clear! 👍

This is definitely out of scope, but I do wonder if maybe always showing the possible options would be a better solution, and when one of the selected requests would block an option, we could then show a warning indicator next to the option in the menu. We could then also highlight which of the selected requests are causing the warning to appear.

Yeah, potentially, you could be right. I think we'll hear soon enough if the current approach is confusing via the support channels as we open the flood gates to NewDot with new sign-ups.

I put up a PR to fix the hold option showing up in the Search page if the report is Open and the user is not the owner of the request.

@luacmartins could you share a link to that PR you've mentioned?

Yea, this is the PR but it's internal only

It was deployed to production ~1h aho

@trjExpensify since we’ve settled on not showing the hold option if selected requests are unsubmitted I also wanted to clear out how we handle one of the cases for it.
What should happen when the user selects a few requests, some of which are submitted and the other are unsubmitted. Right now I also disable the hold option here from being displayed in the search menu. Is that the correct behavior here?

Sorry for the tardy response @cdOut, I've been OoO.

What should happen when the user selects a few requests, some of which are submitted and the other are unsubmitted. Right now I also disable the hold option here from being displayed in the search menu. Is that the correct behavior here?

Yep, that's the correct behaviour. 👍

Great, then the PR is ready and I'm just waiting for the C+ checklist 👍

Assigning @eh2077 for the PR review: https://github.com/Expensify/App/pull/47413

We closed the App PR since the issue was fixed in the backend. However, given that a considerable amount of effort was put into it by @eh2077, I think we should still compensate them for the work.

We can close this issue once payment is processed.

Sounds good! Payment summary as follows:

$250 to @eh2077 for the PR

Offer sent!

Paid!


Autocomplete allowCreate not working

While using allowCreate={true} an error is thrown after pressing 'Enter' .

hey @javivelasco Im having this issue, and the fix doesnt seem to help,
Im using a multiple value autocomplete, when I insert a new value and press enter the chip doesnt get added. Im not seeing any error on the console either.

I figured out it is necessary to add manually entered value to the source.
26 wrz 2016 23:46 "Nicolas"<EMAIL_ADDRESS>napisał(a):

hey @javivelasco https://github.com/javivelasco Im having this issue,
and the fix doesnt seem to help,
Im using a multiple value autocomplete, when I insert a new value and
press enter the chip doesnt get added. Im not seeing any error on the
console either.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/react-toolbox/react-toolbox/issues/755#issuecomment-249707385,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGeHKeNfuA1UkeOf887IQ0cACrVFE28gks5quD0-gaJpZM4Jx_NA
.

but whats the point of the allowCreate then? if you have to add manually new values.

Imho none :) but that's how it works currently
2016-09-27 0:05 GMT+02:00 Nicolas<EMAIL_ADDRESS>
but whats the point of the allowCreate then? if you have to add manually
new values.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/react-toolbox/react-toolbox/issues/755#issuecomment-249711517,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGeHKS4ml4qgoT6KBJFQ53i6YKTBEuEKks5quEGNgaJpZM4Jx_NA
.

Ha! Maybe it was not released yet? If allowCreate it's not useful it should be removed 😕

Perhaps the Autocomplete should actually have a callback for when a new item is created? That way we can easily implement adding the new value to the source, and avoid altering the input source property...


Needless value set in prepare_tick in rollback

In RollbackSynchronizer:

func _prepare_tick(tick: int):
	# Prepare state
	#	Done individually by Rewindables ( usually Rollback Synchronizers )
	#	Restore input and state for tick
	var state: Dictionary = _get_history(_states, tick)
	var input: Dictionary = _get_history(_inputs, tick)

	PropertySnapshot.apply(state, _property_cache)
	PropertySnapshot.apply(input, _property_cache)

	for node in _nodes:
		if _can_simulate(node, tick):
			NetworkRollback.notify_simulated(node)

The above is invoked at the start of each rollback loop. But if a node cannot be simulated for that tick (e.g. NetworkTime.tick is 101 but the latest tick is 98) it still runs PropertySnapshot.apply(), despite already having the latest value. So the application will result in the same/existing result.
For example, we are at NetworkTime.tick 101 and not the input authority. The input is 0,1 at tick 98 (latest_input)
The ticks 99, 100 and 101 are needless, the input is already 0,1, no need to re-apply them.
An example check

func _prepare_tick(tick: int):
	# Prepare state
	#	Done individually by Rewindables ( usually Rollback Synchronizers )
	#	Restore input and state for tick
	var state: Dictionary = _get_history(_states, tick)
	var input: Dictionary = _get_history(_inputs, tick)

        if (tick <= latest_state):
        	PropertySnapshot.apply(state, _property_cache)
        if (tick <= _inputs.keys.max()):
	        PropertySnapshot.apply(input, _property_cache)

	for node in _nodes:
		if _can_simulate(node, tick):
			NetworkRollback.notify_simulated(node)

(btw the above latest_state variable is yet another reason for renaming which is rejected, should be latest_state_tick)
Is there a scenario where a check using the _can_simulate check earlier, causes bugs? I think so, but I cannot think of one right now. If so, this would clear user confusion (see #280), whereby it makes it clear input prediction does not happen, and also boosts performance.

This can't ever happen as the _submit_input rpcs will only ever backfill a tick if it has no data for.
So either this runs because these is new information from the past that has just come in
or
It's already been run and it wouldn't be in range defined in _resim_from


Run auto results in consistent error.

Tried with up to date ARL, but the result is the same. The cause of the problem might lay in the API change on the Deezer side, but I don't know.
Here is the console output:
(base) C:\Users\Qupci>spotify_sync run auto --profile try1
[2023-06-10 23:52:50,380] INFO      SpotifySync      : Loading config from profile: try1
[2023-06-10 23:52:50,381] INFO      SpotifySync      : Script started with auto command
[2023-06-10 23:52:53,791] INFO      SpotifyService   : Fetching liked songs
[2023-06-10 23:53:13,376] INFO      SpotifyService   : Added 18 new liked song(s) from Spotify (cached:2662)
[2023-06-10 23:53:13,377] INFO      SpotifyService   : Fetching playlist songs
Traceback (most recent call last):
  File "D:\SOFTWARE\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "D:\SOFTWARE\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\Scripts\spotify_sync.exe\__main__.py", line 7, in <module>
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\__main__.py", line 48, in auto
    app.auto()
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\cli.py", line 57, in auto
    spotify_svc.sync()
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 37, in sync
    liked, playlists = self._merge_playlist_songs(liked)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 98, in _merge_playlist_songs
    playlist_songs = self._get_all_playlist_songs(playlists)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 72, in _get_all_playlist_songs
    return self.paginator.get_songs_from_playlists(playlists=playlists)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 184, in get_songs_from_playlists
    return self._to_spotify_song(response)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\spotify_.py", line 262, in _to_spotify_song
    s.from_api(api_s)
  File "C:\Users\Qupci\AppData\Roaming\Python\Python39\site-packages\spotify_sync\dataclasses.py", line 107, in from_api
    song["track"]["artists"][0]["name"]
KeyError: 'artists'

same here, something to do with Podcast, remove all Playlists that are Podcast/contains podcasts

Yes, excluding playlists containing podcasts fixed the issue! Thanks.

Thanks for debugging this, didn't foresee podcasts in Spotify when I initially wrote this. Should be a simple fix.


调用history接口分页的时候，有死循环

这里用了一个函数工厂的调用链模式。 但是有两层调用链是在for循环里面的，client生命周期是for循环外部定义的。导致每次循环都会额外追加两层调用链函数。。 请求的分页参数就不对了

After refactoring the code, I failed to conduct further testing. I apologize for the oversight. Could you please fix it with one PR? @tt2lzx

@tt2lzx , Just fix it in the later release, could you please verify it with the latest release?


Performance measurement of Triton ensembles

Duplicate of https://github.com/NVIDIA-Merlin/systems/issues/8


Only send channel search request if it's length is greater than or equal to 3

Bug
Couldn't find a similar issue, sorry if this is a duplicate.
Don't know if this is how it should be, but some resources could be saved by only sending a request to https://lighthouse.odysee.com that are equal or bigger than 3 on the channel search page.
To Reproduce

Go to a channel like https://odysee.com/@GermanLetsPlay:6
Search for Mario, in this case, just Ma
The site is calling https://lighthouse.odysee.com/search?s=Ma&channel_id=68470c7c5d53f24f4a8b6ecd9fad56f201cb21e8&nsfw=false&size=50&from=0, but we know it will fail, since the request search string length is just 2.

Expected behavior
Don't call https://lighthouse.odysee.com, unless the string length is greater than or equal to 3.
Screenshots

System Configuration
Chrome, logged in

The failed requests are fairly light on the lighthouse api, but yeah, no point of sending them if not needed. This also happens on the main search too I believe.


Battery percentage

will another-widget support battery percentage like lawnchair?

I would also loved if we could show a static battery percentage

I can't show the exact percentage of the battery because the widget is not aware of the battery level change...
Other launchers can show it because they're enabled running foreground and they can register a listener to update a single widget every time the level changes.

I can't show the exact percentage of the battery because the widget is not aware of the battery level change...
Other launchers can show it because they're enabled running foreground and they can register a listener to update a single widget every time the level changes.

@tommasoberlose Is it possible to display in increments? Like, if my battery is at 78%, could the widget display say, 80%? Or even 75% or 70%?

@tommasoberlose Is it possible to display in increments? Like, if my battery is at 78%, could the widget display say, 80%? Or even 75% or 70%?

@Nxt3 I'm afraid not. The available events that I can intercept are these:
android.intent.action.BATTERY_LOW fired when the level drops below 15%
android.intent.action.BATTERY_OKAYfired when the level rise above the 15%
You could find more about this here and here.

@Nxt3 I'm afraid not. The available events that I can intercept are these:
android.intent.action.BATTERY_LOW fired when the level drops below 15%
android.intent.action.BATTERY_OKAYfired when the level rise above the 15%
You could find more about this here and here.


what happened to this project ? descoped ?

(just pasting my answer from https://github.com/efroemling/ballistica/issues/466 since it is relevant here)

Hey @efroemling what happened to ballistica-web (Angular) project .
I am interested to know backside story why you switched to simple html/css over Angular framework .is it because to make it light weight or you just out of time to spend time in web .
just curious 🤔.

The Angular project is still around, but I sidelined it for the moment just to avoid delaying 1.7 any more 😬.
Basically right now the ballistica.net website is really brain-dead html on the front-end but its a pretty decent clean Python setup on the back-end. So It works for now, but at some point I'd love to get the Angular thing going (or something equivalent) so we could have a nice modern front-end. That part can be all open-sourced so people can make their own front-end modifications as long as they keep the same communication protocols in place talking to the back-end.
The setup I was working on is still live at https://console.ballistica.net and the source is at https://github.com/efroemling/ballistica-web if anyone wants to play with it. Though It's little more than a slightly modified angular docs page as seen at https://angular.io/docs


docs: more elaborate usage example

The usage example contains some working code to get started.

@diasdavid I force pushed a new commit, please review.


[docs] Email protection causing issues to documentation

Environment
NA.
Reproduction
https://unjs.io/changelogen
Describe the bug
Every section which mentions the changelogen package is hidden under a [email protected] message:

Additional context
No response
Logs
No response

Hi. What browser/version/extension are you using? I don't have this issue with chrome 112 on macos


docs(style): add dark theme styles for mermaid diagrams

Refs: litestar-org/litestar#1687
Refs: litestar-org/litestar#2053
Pull Request Checklist

[ ] New code has 100% test coverage
[ ] (If applicable) The prose documentation has been updated to reflect the changes introduced by this PR
[ ] (If applicable) The reference documentation has been updated to reflect the changes introduced by this PR

Description

Added dark-theme-specific styles for Mermaid diagrams with transparent backgrounds to make embedded text readable.

Close Issue(s)

Fixes litestar-org/litestar#1687

This is my first PR, so any help or suggestions are appreciated.
@all-contributors please add @therealzanfar for doc

https://litestar-org.github.io/litestar-docs-preview/2058/usage/dto/index.html lgtm


cluster: Properly create machine IDs in unit tests

We were using a type conversion to convert from an int to a string. This
resulted in the unicode character corresponding to the given int, not
the string representation of the int.

Current coverage is 58.02% (diff: 100%)

Merging #736 into master will not change coverage

@@             master       #736   diff @@
==========================================
  Files            89         89
  Lines          7018       7018
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           4072       4072
  Misses         2625       2625
  Partials        321        321

Powered by Codecov. Last update 7e91f28...c371d1c


Feature request: strict header validation mode

We've had several production issues caused by a client setting an invalid Envoy header, for example "200.0" as a timeout or an extra space in an x-envoy-retry-on header). Right now Envoy just silently ignores invalid header values. It would help avoid these situations if Envoy had a "strict header validation" option where it either fails every request which has an invalid Envoy header or logs an error.
thoughts on whether this would be straightforward / reasonable to implement? It seems like it would be tricky to implement strict validation for every single header but even having it for just a few headers would be helpful.

@julia-stripe agreed this sounds like a useful thing to add. I don't think it will be too terrible difficult to add, but it will require dealing with the case at all header sites. It might easiest to start with the headers parsed by the router and the headers parsed by the HTTP connection manager. I suppose we could also have config to enable this on a per-header basis.

@mattklein123 I'd like to work on this if it's not already being worked on.
Based on your comment, would the following sound like a reasonable approach?

Introduce a strict_check_headers config field to envoy.router configuration to enumerate headers that would be subject to strict validation. This is opt-in. Example config:

http_filters:
- name: envoy.router
  config:
    strict_check_headers:
    - x-envoy-upstream-rq-timeout-ms
    - x-envoy-upstream-rq-per-try-timeout-ms
    - x-envoy-retry-on

If a request contains a header listed in the config that has an invalid value, Envoy::Router::Filter::decodeHeaders rejects the request, returning HTTP status 400.
When envoy rejects requests this way, set a new response flag IH to indicate the reason was because of an invalid header.
The PR would be scoped to support the handful of headers we've observed in our own production issues (or those that are easily adjacent e.g. x-envoy-max-retries), and we'd validate the strict_check_headers field and emit a config validation error so folks won't erroneously expect some unsupported header to be strict-checked. The initial headers would be:

  x-envoy-upstream-rq-timeout-ms
  x-envoy-upstream-rq-per-try-timeout-ms
  x-envoy-max-retries
  x-envoy-retry-on
  x-envoy-retry-grpc-on

If all of this sounds sane, I can put together a PR for review. Otherwise, would appreciate your feedback about where there may be gaps in my own understanding.

@xyu-stripe yup sounds great to me.


Support Terraform Landscape - coinbase/terraform-landscape

Terraform Landscape is a tool for reformatting the output of terraform plan to be easier to read and understand.
https://github.com/coinbase/terraform-landscape
Before

After

Sample Code:

One-time setup:

terraform-landscape gem is pre-installed and available on your shell path

// Jenkinsfile
<EMAIL_ADDRESS>_

Jenkinsfile.init(this, env)

TerraformLandscapeGemPlugin.init() // Use the terraform-landscape gem to format plans

def validate = new TerraformValidateStage()

// Plans should be formatted with terraform-landscape gem
def deployQA = new TerraformEnvironmentStage('qa')
def deployUat = new TerraformEnvironmentStage('uat')
def deployProd = new TerraformEnvironmentStage('prod')

validate.then(deployQa)
        .then(deployUat)
        .then(deployProd)
        .build()


What's remaining?

Members section #173
Individual community section #125
~Contributors section #141 #98~
Events table section #107 #112 #115 #116

Add if there's more!

I think we should assign every major issue to a maintainer and get it done ASAP. Improvements/enhancements will be done by making good first issues later on.


bridge: fix shutdown of not running bridge

Summary by CodeRabbit

Refactor

Improved synchronization mechanism in service handling for enhanced performance and reliability.
Updated network struct for better control and management of goroutines.
Enhanced synchronization in device management for improved efficiency.
Updated device struct with atomic operations for better synchronization.

Codecov Report
Attention: Patch coverage is 64.70588% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 76.87%.  Consider uploading reports for the commit 7373ae7 to get more accurate results

Files
Patch %
Lines

bridge/device/cloud/manager.go
33.33%
1 Missing and 1 partial :warning:

bridge/device/device.go
33.33%
1 Missing and 1 partial :warning:

bridge/net/network.go
75.00%
1 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
+ Coverage   76.81%   76.87%   +0.05%
==========================================
  Files         115      115
  Lines        6702     6710       +8
==========================================
+ Hits         5148     5158      +10
+ Misses       1015     1012       -3
- Partials      539      540       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Better exception message for legacy formatting in a MiniMessage string

At the moment, the message says:

net.kyori.adventure.text.minimessage.internal.parser.ParsingExceptionImpl: Legacy formatting codes have been detected in a component - this is unsupported behaviour. Please refer to the Adventure documentation (https://docs.adventure.kyori.net) for more information.

Instead, it should be clearer and mention that the formatting codes have been detected in a MiniMessage string instead. Could it even point to the specific part?

Could it even point to the specific part?

it already does
the wording change would be good though


runtime error: slice bounds out of range [:-1]

My database name is db which causes this error.
$ ./ws4sqlite -db db -serve-dir .
ws4sqlite 0.12.3
- Based on SQLite v3.39.4
panic: runtime error: slice bounds out of range [:-1]

goroutine 1 [running]:
main.parseCLI()
        /home/mano/ws4sqlite/src/cli.go:87 +0xdf9
main.main()
        /home/mano/ws4sqlite/src/ws4sqlite.go:67 +0x11b

Also, I'm unsure why your home path is hardcoded in the error message.

My database name is db which causes this error.

Oh my. Thanks. Will look into it as soon as I get a reliable internet connection.

Also, I'm unsure why your home path is hardcoded in the error message.

I need to use -trimpath it seems. Would you care to open another issue?

Also, I'm unsure why your home path is hardcoded in the error message.

I need to use -trimpath it seems. Would you care to open another issue?

Done.

Oh my. Thanks. Will look into it as soon as I get a reliable internet connection.

This looks like to be broken since #4, the code was meant to strip the extension but it doesn't do that, it just strips the last three characters (they used to be fixed to .db). Actually, currently the YAML file name is broken too, when using an extension that is not two letters long. Thanks for pointing out this oversight. Fixing it could be not backwards-compatible for the reasons above, but it was wrong anyway, so this is a moot point.

Should be fixed in the develop branch. Would you be so kind and test it? If you can't compile the branch, and you still want to test it, let me know your arch and I'll compile it and send it to you. Thanks!

Released in v0.12.4


Investigate approximate expOp implementation for AMD GPUs

PTX have two exp operation implementations.
One is high precision: https://github.com/ROCmSoftwarePlatform/triton/blob/841784d1e308ea0aebbde2abc8894994de425d9b/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp#L1032
Second is approximate: https://github.com/ROCmSoftwarePlatform/triton/blob/841784d1e308ea0aebbde2abc8894994de425d9b/lib/Conversion/TritonGPUToLLVM/ElementwiseOpToLLVM.cpp#L1059
Need to:

[x] investigate what code is generated for "approximate" implementation (see description below)
[x] check is same code could be emitted for amd gpu (AMD GPU provides exp2 and multiply instruction)
[ ] compare approximate and high precision code and support approximate code generation if it is better in some way.

The difference between "fast" and "high-precision" variants of exp ptx implementations is indeed is a precision at the cost of performance.
PTX "fast" variant is uses simple equation: e^x = 2^(x*log2(e)) and uses hardware
I did not fully understand precise algorithm fully yet, but as far as I understand, the main idea is to:

Break index in "rough" and "precise" parts, like this result = e^x = 2^(x*log(e)) = 2^rough_part * 2^precise_part
Compute both parts using hardware exp2 instruction and some bitwise float-integer magic
Multiply "rough" and "precise" sub results

Currently AMD code generation uses only precise method of exponent computation. Source code could be found here: https://github.com/RadeonOpenCompute/ROCm-Device-Libs/blob/amd-stg-open/ocml/src/expF_base.h#L10-L33

AMD generated code : exp_hsaco.hsaco.txt

PTX can use both precise and "fast" methods to compute exp.
I suppose, there are no source code of this library available, but according byte code, PTX exponent uses slightly different algorithm with similar main idea.

"fast" PTX output:
exp_approx.ptx.txt
"precise" PTX output:
exp_high_precision.ptx.txt

In order to implement fast version of exp, we need to generate e^x = 2^(x*log2(e)) for AMD target.

Actually, precision of "precise" and "approximate" versions are very close. I'll investigate it a little more later

I've tested full range of float32 numbers and found that maximum relative difference ((test - reference)/reference, where reference is numpy.exp cpu implementation) for "precise" version is 2.838238519053888e-06, for "fast" version it is 3.96045403750329e-06.
This difference occurred near bounds of float32 range, so I consider this change is acceptable.
P.s. This is the script I used for testing:

test_exp_precision.py
#!/usr/bin/python3
import triton
import triton.language as tl
import numpy as np
from numpy.random import RandomState
from typing import Optional, Union
import torch
from triton.runtime.jit import JITFunction, TensorWrapper, reinterpret
import sys
import struct
import math

def to_triton(x: np.ndarray):
    return torch.tensor(x, device='cuda')

def to_numpy(x):
    if isinstance(x, TensorWrapper):
        return x.base.cpu().numpy().astype(getattr(np, torch_dtype_name(x.dtype)))
    elif isinstance(x, torch.Tensor):
        return x.cpu().numpy()
    else:
        raise "Not a triton-compatible tensor: {x}"

def test_exp_precision():
    BLOCK_SIZE = 1024
    SAMPLE_SIZE = 2**26
    RANGE_START = 0
    RANGE_END = 2**32

    @triton.jit
    def kernel_exp(Z, X, SIZE: tl.constexpr, BLOCK_SIZE: tl.constexpr):
        pid = tl.program_id(axis = 0)
        off = pid * BLOCK_SIZE + tl.arange(0, BLOCK_SIZE)
        x = tl.load(X + off)
        z = tl.exp(x)
        tl.store(Z + off, z)

    for sample_start in range(RANGE_START, RANGE_END, SAMPLE_SIZE):
        int_x = np.arange(sample_start, sample_start + SAMPLE_SIZE, dtype=np.uint32)
        float_x = struct.unpack("=" + str(SAMPLE_SIZE) + "f", struct.pack("=" + str(SAMPLE_SIZE) + "I", *int_x))
        ref = np.exp(float_x, dtype="float32")

        x_tri = to_triton(float_x)
        z_tri = to_triton(np.empty_like(float_x))
        grid = lambda meta: (triton.cdiv(SAMPLE_SIZE, meta['BLOCK_SIZE']),)
        kernel_exp[grid](z_tri, x_tri, SIZE=SAMPLE_SIZE, BLOCK_SIZE=BLOCK_SIZE)
        res = to_numpy(z_tri)
        max_diff = 0.0
        abs_diff = abs(res - ref)
        ref_res_nan_mismatch = False
        ref_res_zero_mismatch = False
        ref_res_inf_mismatch = False
        max_diff_id = -1
        for i in range(SAMPLE_SIZE):
            if math.isnan(ref[i]) != math.isnan(res[i]):
                ref_res_nan_mismatch = True
                continue
            if (ref[i] == 0.0) != (res[i] == 0.0):
                ref_res_zero_mismatch = True
                continue
            if math.isinf(ref[i]) != math.isinf(res[i]):
                ref_res_inf_mismatch = True
                continue
            if math.isinf(ref[i]) and math.isinf(res[i]):
                continue
            relative_diff = abs_diff[i] / (abs(ref[i]))
            if relative_diff > max_diff:
                max_diff_id = i + sample_start
            max_diff = max(max_diff, relative_diff)
        print("sample", sample_start)
        print("  maximum relative diff:", max_diff)
        print("  maximum relative diff id", max_diff_id)
        print("  ref_res_nan_mismatch", ref_res_nan_mismatch)
        print("  ref_res_zero_mismatch", ref_res_zero_mismatch)
        print("  ref_res_inf_mismatch", ref_res_inf_mismatch)

test_exp_precision()

it takes some time for this script to finish work.
These are outputs that I got using it:
fast_exp.txt
precise_exp.txt


Send traceback objects rather than lists of strings

Fixes #109
This uses the tblib library to send traceback objects from the worker to the client.  We add two new dependencies, six and tblib, but they're both pretty lightweight.
Now future.result() on an erred future raises an error with a traceback from the worker and future.traceback() returns a proper traceback object, rather than a list of strings.  This object is actually a bit harder to inspect than the list of strings.  I'm not sure how to point the user to the traceback module  for this.

cc @jreback


Adjust log level

The current logs from the proxy seem to spam the log stream. Are there any way to filter so f.ex only warnings from the proxy is logged?
I'm currently using Serilog and this is a sample from the console log:
[14:24:50 INF] Received HTTP/1.1 response 200.
[14:24:50 INF] SPA client is ready.
[14:24:50 INF] Proxying to http://localhost:6363/node_modules/.vite/deps/chunk-N7AMQ326.js?v=4cd2ae21 HTTP/2 RequestVersionOrLower no-streaming
[14:24:50 INF] SPA client is ready.
[14:24:50 INF] SPA client is ready.
[14:24:50 INF] Proxying to http://localhost:6363/node_modules/.vite/deps/@azure_msal-common_dist_error_AuthError.js?v=4cd2ae21 HTTP/2 RequestVersionOrLower no-streaming
[14:24:50 INF] SPA client is ready.
[14:24:50 INF] Proxying to http://localhost:6363/node_modules/.vite/deps/@equinor_eds-core-react.js?v=4cd2ae21 HTTP/2 RequestVersionOrLower no-streaming
[14:24:50 INF] Received HTTP/1.1 response 200.
[14:24:50 INF] SPA client is ready.

This makes it impossible to look for the log messages from our own application...
I tried to override the Serilog configuration with "AspNetCore.SpaYarp": "Warning", but that didn't seem to work.

Nvm, figured it out.
The following overrides seem to work:
"Yarp.ReverseProxy": "Warning",
"AspNetCore.SpaYarp.SpaProxyMiddleware": "Warning"