allowFontScaling

💬 Question
UI Kitten and Eva version

Package
Version

@eva-design/eva
"^2.2.0"

@ui-kitten/components
"^5.3.1"

I need to do not allowFontScaling across the entire app so i was wondering if there's a way to set allowFontScaling to false using the custom-mapping. I'm asking because i've already used thounds of times the Text component and it will be a pain to create a custom component at this point.

For anyone who is facing the same problem i fixed by creating something like this:
import { Text as RNText } from 'react-native';
import { Text, Input } from '@ui-kitten/components';
interface RNTextWithDefaultProps extends RNText {
defaultProps?: { allowFontScaling?: boolean };
}
interface TextWithDefaultProps extends Text {
defaultProps?: { allowFontScaling?: boolean };
}
interface InputTextWithDefaultProps extends Input {
defaultProps?: { allowFontScaling?: boolean };
}
export const changeComponentsDefaultProps = () => {
(RNText as unknown as RNTextWithDefaultProps).defaultProps =
(RNText as unknown as RNTextWithDefaultProps).defaultProps || {};
(RNText as unknown as RNTextWithDefaultProps).defaultProps!.allowFontScaling = false;
(Text as unknown as TextWithDefaultProps).defaultProps =
(Text as unknown as TextWithDefaultProps).defaultProps || {};
(Text as unknown as TextWithDefaultProps).defaultProps!.allowFontScaling = false;
(Input as unknown as InputTextWithDefaultProps).defaultProps =
(Input as unknown as InputTextWithDefaultProps).defaultProps || {};
(Input as unknown as InputTextWithDefaultProps).defaultProps!.allowFontScaling = false;
};
Basically i have created a function where i'm changing the default props of the React Native Text (because i'm using it, otherwise you can just avoid it), and the Text and the Input of UI Kitten.
Here i'm on a typescript project that's why i'm in need of interfaces.
Just call the function as soon the app starts.


An error occurred while running on Android

I downloaded final.zip and words.txt, put them into Assets folder, and compiled the project into APK to run on Android system. When I open the app and click the button, it will report an error and flash back.
The error message is as followed :
26715-27453/com.mobvoi.wenet E/libc++abi: terminating with uncaught exception of type c10::Error: Expected at most 5 argument(s) for operator 'forward_encoder_chunk', but received 7 argument(s). Declaration: forward_encoder_chunk(torch.wenet.transformer.asr_model.___torch_mangle_21.ASRModel self, Tensor xs, Tensor? subsampling_cache=None, Tensor[]? elayers_output_cache=None, Tensor[]? conformer_cnn_cache=None) -> ((Tensor, Tensor, Tensor[], Tensor[]))
Exception raised from checkAndNormalizeInputs at ../aten/src/ATen/core/function_schema_inl.h:245 (most recent call first):
(no backtrace available)
26715-27453/com.mobvoi.wenet A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 27453 (om.mobvoi.wenet), pid 26715 (om.mobvoi.wenet)

@pengzhendong

@TalentJack We have updated the model. So, please download it again.

Thanks for your reply. I tried the new model, but the error still exists.
The error log is as follows:
11964-12009/com.mobvoi.wenet A/libc: /buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type c10::Error: Expected at most 5 argument(s) for operator 'forward_encoder_chunk', but received 7 argument(s). Declaration: forward_encoder_chunk(torch.wenet.transformer.asr_model.___torch_mangle_21.ASRModel self, Tensor xs, Tensor? subsampling_cache=None, Tensor[]? elayers_output_cache=None, Tensor[]? conformer_cnn_cache=None) -> ((Tensor, Tensor, Tensor[], Tensor[]))
Exception raised from checkAndNormalizeInputs at ../aten/src/ATen/core/function_schema_inl.h:245 (most recent call first):
(no backtrace available)" failed
11964-12009/com.mobvoi.wenet A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 12009 (om.mobvoi.wenet), pid 11964 (om.mobvoi.wenet)

@TalentJack Is the model named 20210221_unified_transformer_device.tar.gz?

Yes, I'm sure I downloaded the new model named 20210221_unified_transformer_device.tar.gz

@TalentJack Please delete the .cxx folder and the build folder, then try it again.

I've tried. but the problem is the same.

哥们，能加个微信聊聊吗：wx275331498

感谢震东大哥加微信耐心帮忙解决问题，还远程帮忙调试，最终发现问题出在虚拟机上，用手机运行就没问题了。
希望wenet越来越好，星数早日超越espnet！
Thank @pengzhendong  for his patience to help solve the problem and help debugging remotely. Finally, we found that the problem was on the virtual machine, and we can run it successfully with the mobile phone.
Hope WENET gets better and better, and surpass ESPNET in star count!


Filter after replace view

When we called replaceview to go outside of the app and after when come back all the filter which were applied are gone
Is there a way to preserve the same filters at same position after replaceView.
I tried passing filter array list to replaceView method and applied the same filters in replaceGlInterface method but didn't work

When you replace glInterface with replaceView all filters are released but tecnically you can create a new filter and set it after use replaceView method.
rtmpCamera1.replaceView(context);
rtmpCamera1.getGlInterface().setFilter(filter);

I think the best way is create a list with all filter and add that filter with a new instance getting old parameters, for example:
private List<BaseFilterRender> list = new ArrayList<>();

  public void sample() {
    rtmpCamera1.replaceView(this);
    for (BaseFilterRender filter : list) {
      BaseFilterRender newFilter;
      if (filter instanceof GifObjectFilterRender) {
        newFilter = new GifObjectFilterRender();
        ((GifObjectFilterRender) newFilter).setPosition(
            ((GifObjectFilterRender) filter).getPosition().x,
            ((GifObjectFilterRender) filter).getPosition().y);
        ((GifObjectFilterRender) newFilter).setScale(
            ((GifObjectFilterRender) filter).getScale().x,
            ((GifObjectFilterRender) filter).getScale().y);
        //Maybe you need create other list with sources associated to some filters
        ((GifObjectFilterRender) newFilter).setGif(input);
      } else {
        newFilter = new NoFilterRender();
      }
      rtmpCamera1.getGlInterface().setFilter(newFilter);
    }
  }

I know that this isn't clear. I will add a method to all filter to do it automatically


Optimize per_route config pre-processing for filters.

Description:
This is referring to the new per_route_config added in https://github.com/envoyproxy/data-plane-api/pull/605#discussion_r179527576
Specifically to optimize the pre-processing of per-route config.  Here is the proposal
like to clarify how per_route_config_sha can be used.
A filter needs to preprocess the per_route_config.
obj = pre_process(pre_route_config);
Such pre-processing can be slow, it should NOT be performed for each request. One way to optimize it is to save the preprocessed "obj" in some global config. When a request comes, the filter just needs to detect if per_route_config has been changed. Without "sha" map, the filter needs to serialize the proto and sha it to detect the config change. If per-route config is big, these two steps can be slow too.
Another option is to add a new function in FilterFactory
void setRouteConfig(string unique_route_id, Struct config) PURE;
This function will be called when RDS receives new route tables, This will give filter chance to preprocess per_route config and save the pre-processed obj into its global map (not pre-request).
as global_map[ route_id ] = obj;
During request, obj can be retrieved as
obj = global_map[ filter_callback->route()->unique_route_id() ];
This is better than first approach, the pre-process is done in the config thread, not at worker thread.
Agreed that, such optimization can be done in the later phase.

@mattklein123 we can close this..


TypeError: P is undefined when using https://cdnjs.cloudflare.com/ajax/libs/lory.js/2.5.1/lory.min.js

by using this code.
document.addEventListener('DOMContentLoaded', function () {
var variableWidth = document.querySelector('.slider');
lory(variableWidth, {
    rewind: true,
    slidesToScroll: 1,
    slideSpeed: 600
});

});
Whats wrong?

check this out: https://codepen.io/anon/pen/wXRJre?editors=0010
seems to work for me, please close if it works for you now as well.
cheers Max

works for me thx
great job meandmax


Delay transforming priority_order into ndarray

Issue: https://github.com/capitalone/DataProfiler/issues/722
In the changed code, we had a mypy error because numpy ndarrays are not compatible with random.Random.shuffle() (expected argument type is MutableSequence[Any])
We fix this by first instantiating priority_order as a list, then shuffling it, then creating an ndarray from it afterwards.

update branch

Will update this branch after PR https://github.com/capitalone/DataProfiler/pull/968 is no longer open

@junholee6a update and resolve conflict on requirements.txt for this PR

Conflict was fixed and up to date


How to prevent creating multiple releases when using a build matrix?

I have a matrix which results in 3 builds. Is there a way to ensure only the first one will draft a new release?

There does not appear to be. And yes, it's quite annoying to clean up afterwards.
In my case I'm not using a matrix, I'm instead using one job per OS - this is because each OS requires a fair amount of unique operations.  I'd still like it to somehow detect that there was a pre-existing release or draft for that tag and name and skip.
However I'm torn between two ways this could be done:

That the behavior be changed to skip the creation if it finds a match for both the given release name AND that exactly one of the release(s) thus found has the same tag.  When skipping it should still determine and set the upload_url and any related outputs, thus allowing any downstream steps to proceed normally.
That an option be added, such as allow_duplicates, which if true would behave as it currently does otherwise it would proceed as in the above.  I'd rather the default state of this new option be false, but I'd understand if the maintainers would rather it be set true to keep the default behavior unchanged.

Split "Create Release" job and "Build" job, and use upload-artifact and download-artifact to transfer URL.
  release:
    name: Create Github Release
    if: contains(github.ref, 'tags/v')
    needs: [test]
    runs-on: ubuntu-latest
    steps:
    - name: Create Release
      id: create_release
      uses<EMAIL_ADDRESS>      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        draft: false
        prerelease: false
    - name: Output Release URL File
      run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
    - name: Save Release URL File for publish
      uses: actions/upload-artifact@v1
      with:
        name: release_url
        path: release_url.txt

  publish:
    if: contains(github.ref, 'tags/v')
    needs: [test, release]
    runs-on: ubuntu-latest
    strategy:
      matrix:
        version: [foo, bar, baz]
    steps:
    - uses: actions/checkout@v1
    - name: Load Release URL File from release job
      uses: actions/download-artifact@v1
      with:
        name: release_url
    - name: Build
      run: BUILD_COMMAND --version ${{ matrix.version }} --output ./${{ matrix.version }}
        zip -r ${{ matrix.version }} ./${{ matrix.version }}
    - name: Get Release File Name & Upload URL
      id: get_release_info
      run: |
        echo ::set-output name=file_name::${REPOSITORY_NAME##*/}-${TAG_REF_NAME##*/v} # RepositoryName-v1.0.0
        value=`cat release_url/release_url.txt`
        echo ::set-output name=upload_url::$value
      env:
        TAG_REF_NAME: ${{ github.ref }}
        REPOSITORY_NAME: ${{ github.repository }}
    - name: Upload Release Asset
      id: upload-release-asset
      uses<EMAIL_ADDRESS>      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.get_release_info.outputs.upload_url }}
        asset_path: ./${{ matrix.rid }}.zip
        asset_name: ${{ steps.get_release_info.outputs.file_name }}-${{ matrix.rid }}.zip
        asset_content_type: application/zip

I prefer to have the release created only if at least one of the builds succeeded.  In fact I'd prefer that it only happened if all builds succeeded.  But that's my preferred workflow and there might be a way to do it using a split build process like that, but these are workarounds that add additional time and load - but at least there are workarounds.  Thank you @nogic1008 for the inspiration.

I have an alternative solution, that runs in a single (defined) job, which has worked well for me. The idea is to use an extra matrix variable on the build you want to upload the release, and use conditionals for any steps that should only get run for an upload.
Code
jobs:
  build:
    name: python ${{ matrix.python }} and ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python: [3.6, 3.7]
        os: [ubuntu-latest, macOS-latest, windows-latest]
        include: # define single matrix case that performs upload
          - os: ubuntu-latest
            python: 3.7
            upload: true
...
    steps:
...
      - name: build distribution tarball
        if: matrix.upload
        run: echo 42
      - name: create github release
        id: create_release
        if: matrix.upload && github.event_name == 'pull_request' && github.base_ref == 'master'
        uses: actions/create-release@master # @v1 has no body arg
...

References

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-including-configurations-in-a-matrix-build
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions

Another alternative, if you don't have a preference for which matrix build triggers upload, is to skip the matrix include thing and use step conditionals like if: strategy.job-index == 0; although I haven't tested this myself.
https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#contexts

I recently switched to https://github.com/softprops/action-gh-release due to this problem

One potential approach would be to create:

all.yml
linux.yml
macos.yml
window.yml

Then put the create release only in the all.yml
name: All platforms

on:
  push:
    tags:
      - 'v*'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Create release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}

The only problem is that each platform needs the create_release upload url for it's own release:
linux.yml
    - name: Upload release
      id: upload-release-asset
      uses: actions/upload-release-asset@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: **${{ steps.create_release.outputs.upload_url }}**
        asset_path: ./build/VST3/artifact/plugin-linux.zip
        asset_name: plugin-linux.zip
        asset_content_type: application/zip

Another approach is mentioned in this blog post:
https://dev.to/eugenebabichenko/automated-multi-platform-releases-with-github-actions-1abg
I got it to work for building a single release containing multiple binaries:
name: Release

on:
  push:
    tags:
      - "v*"

jobs:
  create_release:
    name: Create release
    runs-on: ubuntu-latest
    outputs:
      upload_url: ${{ steps.create_release.outputs.upload_url }}
    steps:
      - name: Create release
        id: create_release
        uses: actions/create-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          tag_name: ${{ github.ref }}
          release_name: Release ${{ github.ref }}

  build_release:
    name: Build release
    needs: create_release
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        include:
          - os: ubuntu-latest
            zip_name: plugin-linux
            generator: Unix Makefiles
          - os: macos-latest
            zip_name: plugin-mac
            generator: Xcode
          - os: windows-latest
            zip_name: plugin-win
            generator: Visual Studio 16 2019
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install Linux dependencies
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get install cmake gcc "libstdc++6" libx11-xcb-dev libxcb-util-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig1-dev libcairo2-dev libgtkmm-3.0-dev libsqlite3-dev libxcb-keysyms1-dev

      - name: Install macOS dependencies
        if: matrix.os == 'macOS-latest'
        run: brew install cmake

      - name: Install Windows dependencies
        if: matrix.os == 'windows-latest'
        run: |
          choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'

      - name: Setup
        shell: bash
        run: |
          git submodule update --init --recursive
          cp -R -v ./vst2sdk/public.sdk/source/vst2.x ./vst3sdk/public.sdk/source

      - name: Build
        shell: bash
        run: |
          cmake \
            -G "${{ matrix.generator }}" \
            -DCMAKE_BUILD_TYPE=Release \
            -DSMTG_ADD_VST3_PLUGINS_SAMPLES=ON \
            -DSMTG_ADD_VST3_HOSTING_SAMPLES=OFF \
            -DSMTG_ADD_VSTGUI=ON \
            -DSMTG_MYPLUGINS_SRC_PATH=./src \
            -S ./vst3sdk \
            -B ./build
          cmake --build ./build --config Release

      - name: Compress
        shell: bash
        run: |
          cd ./build/VST3/Release
          mkdir ../artifact
          zip -r ../artifact/${{ matrix.zip_name }}.zip *

      - name: Upload
        uses: actions/upload-release-asset@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          upload_url: ${{ needs.create_release.outputs.upload_url }}
          asset_path: ./build/VST3/artifact/${{ matrix.zip_name }}.zip
          asset_name: ${{ matrix.zip_name }}.zip
          asset_content_type: application/zip

@extrawurst can you show how that Action solves this problem? I wasn't able to figure it out based on their readme. They don't seem to provide an example of use with a build matrix. I am hoping it might be possible to run three OS builds and then create a release only if all three went through and only after they all did. Is this possible with that Action?

@TomasHubelbauer no that problem still persists if one of your builds fails the resulting artefact simply is missing


How to distinguish between structural changes to array made in parent element vs property changes to an item of array made in child element observer?

Apologies in advance if this is not a bug. I believe it is possible this is a bug, but more likely a functionality gap from 1.x to 2.0, and even more likely a knowledge gap on my part, but i have not been able to get a response on any of the other Polymer2 forums, slack channels, stackoverflow, etc.
The summary of the issue with code sample can be seen here:
https://stackoverflow.com/questions/42565640/how-to-distinguish-between-structural-changes-to-array-made-in-parent-element-vs
The code sample itself is here:
https://plnkr.co/edit/iTZqM4GwpASEqQgtRGEk
Steps to repro:
Run the code sample, open the dev console, view the output.
Expected result:
4 observed changes
Actual result:
6 observed changes
Browsers affected:
Chrome at least, probably others
Polymer versions:
2.0, the console output matches the expected result in 1.x
Please let me know if I can clarify the issue further.  I really like the direction Polymer is taking and want to use 2.0, but until I can resolve the behaviour in this fairly simple scenario, I'm at a standstill
thanks

This is expected based on the current implementation of dom-repeat in 2.x. I recognize that the behavior is unexpected and we'll take a look at addressing it.
The 2.x version of dom-repeat has a simpler design than 1.x where this issue did not exist. In the 2.x version, we currently do not act on "splice" information and instead simply update rendered items. Thus, the unshift causes the existing first row to get the newly added item, the 2nd row gets the old first item, and a new 3rd row is added with the previous 2nd row (changes 4, 5, and 6).

Great thank you for confirming the current expected behaviour.  Pending it being addressed, is there any workaround available that can achieve the underlying goal, which is to act on an object mutation but not on the array mutation?
Ultimately i just want to be able to handle something basic like editing todo list items inside a list, and also rearranging the list, and I have no problem using some temporary code, or even a hack, to do it if I know the functionality will be addressed eventually

Roughly speaking, is this issue something that will be addressed by the time 2.0 is released, or after that point?  By "addressed" I mean either at the polymer level, or a workaround that can be used short term at the application level.  I'm trying to figure out whether Polymer 2.0 will be usable for my projects in the next couple weeks, or if its more like a few months.  Thanks, and my bug filing notwithstanding, I really do think the project is on top of things, and once a few issues like this one are addressed, it will mesh very nicely with how I think about app design.

Ok I have a workaround of sorts that does the trick for now, Polymer crew can comment on whether this is kosher or not.  Basically, I replace an observer such as "observeDescriptionChanged(todo.description)" with "observePropertyChanged(todo.*)".  Then in the observer itself, I test if the change path is "todo".  If it is, this is an indication that the observed change is the result of a mutation of the array containing the todo object, or the initial set of the todo object, or another legitimate change (referentially speaking) of the todo object, but is not a change or set of a property of an existing todo object.  This gets me to where I can act on mutations of the todo object that should result in a persistence action, and ignore mutations of the todo list itself, at least from within the element that encapsulates a single todo entry. I assume this incurs some extra cost if there are a lot of properties that I don't actually need to observe, but I can live with that for now.

@santanubasu We have an implementation of a (long requested) restamp mode for <dom-repeat> in https://github.com/Polymer/polymer/pull/4363, which puts dom-repeat in a mode that strictly ties template instances to items (by item identity, or optionally a path to a unique key in the item), and will never reuse instances with a different item.  It would be great if you could try that out and provide feedback on whether that addressed your issue or not.


Disk Loader: Scope filtering

Adds scope filtering to the disk manifest loader.
Though this doesn't have any security benefits, it does mean manifests
are filtered much sooner in the runtime when running in self-hosted mode
and prevents logging/errors downstream in modules like the hot reloading
reconciler.
Branched from https://github.com/dapr/dapr/pull/7579

Please resolve conflicts

@yaron2 done :+1:


Http request is ignoring timeout if it can connect to the server

It seems in the event the xmlhttprequest connects to the server, it is timing out after 10 seconds, instead of honoring the timeout property passed in. It throws a java.net.SocketTimeoutException as shown in the picture.
http://i.imgur.com/L2xYsCV.png

I presume you are talking about Android here. The connection timeout is supported. Could you provide a snippet where the problem occurs?

Yes, android.
                xhr.open('GET', someSlowUrl);
                xhr.timeout = 100*1000;
                xhr.ontimeout = (e) => {
                    console.log("Timeout");
                };
                xhr.send();
                ```

The issue is the connection is established but taking too long, as opposed to it not being able to initiate the request. If I change it to ```someUnfoundUrl``` it times out for the appropriate amount of time.

In my naive searching I believe it is related to setting ```httpRequest.setSoTimeout``` as well as ```httpRequest.setConnectionTimeout```, but I could be wrong.

You are right in your observation... the xhr.timeout affects the connection timeout not the read or write timeout. The default for the read and write timeout is 10 sec each.

Is this a feature that would be possible to expose?
It seems when I execute this via the web the xhr.timeout variable reflects both values, as the connection does not timeout in the same way.

@dested Yes i agree. The spec for the timeout states that it does not affect one or the other but the entire duration. In our underlying implementation we can specify the three timeouts but they do not (yet) effect each other. We should look into to distribute the timeout time evenly between all three timeouts.

Btw... the fetch() standard does not have a timeout at all and requires the user to use custom promises to simulate the behavior.

Did this make it into 1.9?

@dested No change on that front. iOS and Android both offer more fine grained control on the timeouts than what the XHR offers. We are currently evaluating if it makes more sense to offer these properties on the XHR on top of the original spec.

I'd like to put this back on the radar if possible. The arbitrary ten second timeout is a sincere issue. If nothing else it would be nice to see it increased to something more reasonable like 30-60 seconds. My fear is http requests that take eleven seconds due for one reason or another are coming back as failed, and forcing my users to think they were not executed, thus causing them to be executed multiple times.
Are there any current thoughts on implementation?

@dested Can you use fetch as Moritz suggested?

Very interesting, I did not realize these capabilities in fetch. I have retooled to use that in my application and I am now able to manage my state much saner. Feel free to close this ticket,  but I do think the ten second timeout in XmlHttpRequest should be noted somewhere.

@dested It's still a valid issue and should be left open as someone might be working with a third party library which needs the support and/or can't convert to fetch.

The timeout is currently mapped only to the connection timeout. Mapping it to the read timeout as well would extend the timeout.
We could consider setting the native timeouts to infinity and calling the native abort() method after the configured timeout from JS.


[system] Export required types

Exports system types used in Material UI. Without these, the Typescript compiler throws errors in built .d.ts files.
Fixes #33321

I think a TS test would require setting up a separate project, installing our packages, and running tsc on it. This could affect our build times a lot. Instead, I opted for detecting invalid import declarations in built d.ts files.

Nice fix!


Unexpected word and occurrence highlighting despite disabled settings

When I place the cursor on random lines within the editor, VS Code highlights arbitrary words under the cursor and their occurrences throughout the file. This behavior persists even though I have disabled editor.occurrencesHighlight and editor.selectionHighlight in my settings.
This issue occurs when all extensions are disabled.

VS Code Version: 1.87.0 (Universal)
OS Version: macOS Monterey 12.7

https://github.com/microsoft/vscode/assets/48856190/c88dea26-8df2-43f0-91b5-a73d6afc702b
Steps to Reproduce:

Open any file.
Place the cursor on any line in the editor.
Watch the unexpected highlighting of the word and its occurrences.

Note: The issue doesn't manifest immediately and consistently but varies in how often it occurs. It may require multiple tries of moving the cursor to different lines before noticing the unexpected highlighting.

Probably fixed by #206559 in upcoming recovery release.


AmazonApiGatewayManagementApiClient InvalidSignatureException

Hello everyone
I'm having a problem with AmazonApiGatewayManagementApiClient. When I run PostToConnectionAsync I get InvalidSignatureException - The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method.
I'm using version <IP_ADDRESS>.
MyCode is this:
namespace eProNFe.CloudServices.AwsCloudServices
{
    public class AwsWebSocketService : IWebSocketService
    {
        private string webSocketEndpoint;
        private string awsAccessKeyId;
        private string awsSecretAccessKey;

        private static readonly JsonSerializerSettings JsonSettings = new JsonSerializerSettings
        {
            ContractResolver = new CamelCasePropertyNamesContractResolver()
        };
        private static AmazonApiGatewayManagementApiClient _webSocketApiClient;

        public AwsWebSocketService()
        {
            var config = IocContainer.GetInstance<IAppConfiguration>();
            this.webSocketEndpoint = config["websocket:url"];
            this.awsAccessKeyId = config["websocket:awsKey"];
            this.awsSecretAccessKey = config["websocket:awsSecret"];
        }

        private AmazonApiGatewayManagementApiClient WebSocketApiClient
        {
            get
            {
                if (_webSocketApiClient != null)
                {
                    return _webSocketApiClient;
                }

                var apiConfig = new AmazonApiGatewayManagementApiConfig { ServiceURL = webSocketEndpoint };
                return _webSocketApiClient = new AmazonApiGatewayManagementApiClient(awsAccessKeyId, awsSecretAccessKey, apiConfig);
            }
        }

        private async Task PostToConnection(string connectionId, string action, object payload)
        {
            var json = JsonConvert.SerializeObject(new WebSocketMessageModel(action, payload), JsonSettings);

            try
            {
                await WebSocketApiClient.PostToConnectionAsync(new PostToConnectionRequest
                {
                    ConnectionId = connectionId,
                    Data = new MemoryStream(Encoding.UTF8.GetBytes(json))
                });
            }
            catch (Exception ex)
            {
                throw new Exception("Não foi possível notificar as conexoes da comanda", ex);
            }
        }
        public async Task SendMessage(string[] connectionIds, string action, object payload)
        {
            foreach (var connectionId in connectionIds)
                await PostToConnection(connectionId, action, payload);
        }
    }
}

thanks

A common reason this happens is the casing passed in for the URL set on ServiceURL doesn't match the same casing as you would see in the console. Can you double check that.

Hello @normj
I reviewed my Connection URL with final "@connections" and is ok.
In my iam, i created user with this policy "AmazonAPIGatewayInvokeFullAccess".
the bug persist.
Thanks.

Hello @normj thanks for your attention.
I removed "/@connections" from url and this works.
thanks

For me in .net 3.1 code works fine, but after changing  it to .net 6, throws "InvalidSignatureException".


Visio diagram doesn't match

The Visio diagram that you download is similar to but doesn't match the diagram in the picture.  The Visio diagram you download is more complex.  Please have the graphic and Visio diagram match.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 65f26361-0def-4ae9-e28a-8a8d4f97b87f
Version Independent ID: ef55eb02-6543-88ad-4f89-5a553848bc67
Content: Extend Active Directory Domain Services (AD DS) to Azure - Azure Reference Architectures
Content Source: docs/reference-architectures/identity/adds-extend-domain.md
Service: architecture-center
GitHub Login: @telmosampaio
Microsoft Alias: pnp

Hi @JazzyWagdaddy Thank you for your feedback! We have assigned this issue to the author to review further and take the right course of action.

@JazzyWagdaddy The Visio download has all 4 identity-related reference architectures. The one for "Extend AD DS to Azure" is on the tab named "AD DS"


Combo Orders Quantity Summary

Expected Behavior

If we place a combo order where each leg has quantity 10 and we call
self.ComboMarketOrder(self.legs, 2)

then each leg should fill with a quantity of 20.
Actual Behavior

If we place a combo order where each leg has quantity 10 and we call
self.ComboMarketOrder(self.legs, 2)

then each leg fills (as seen in the Order Summary table) with a quantity of 10.
Potential Solution

N/A
Reproducing the Problem

https://www.quantconnect.com/terminal/processCache?request=embedded_backtest_c8d8e1c21797577a5dfd2b734cee0491.html
System Information

QC Cloud
Checklist

[x] I have completely filled out this template
[x] I have confirmed that this issue exists on the current master branch
[x] I have confirmed that this is not a duplicate issue by searching issues

[x] I have provided detailed steps to reproduce the issue

The issue is about the summary order table not reflecting the new order group information


Back port foundation tests

The test suite for swift's overlay fails to run when being tested pre-macOS10.15/iOS13. This is caused because of a pair of behavioral fixes that were applied expecting the underlying types to adhere to the expected characteristics. That makes testing in those scenarios invalid and report failure. This allows the tests to be adequately run on previous releases.

@swift-ci please smoke test

Build failed
Swift Test Linux Platform
Git Sha - 4315f40d40bc2b4a37f1a56967672d75838eb10a

This change did not apply to Linux, the failure must be existing.

Merging – the Linux failures seem unrelated.


[LLM] make text-generation example woq default weight dtype to "nf4"

Type of Change

improve example woq args pass to config.
change the woqconfig default weight dtype use "nf4", because "nf4" is more general.

Description
detail description
JIRA ticket: xxx
Expected Behavior & Potential Risk
the expected behavior that triggered by this PR
How has this PR been tested?
how to reproduce the test (including hardware information)
Dependency Change?
any library dependency introduced or removed

does it mean "load_in_4bit = true" => weight_dtype=nf4?

does it mean "load_in_4bit = true" => weight_dtype=nf4?
yes, please see this line.
https://github.com/intel/intel-extension-for-transformers/blob/main/intel_extension_for_transformers/transformers/modeling/modeling_auto.py#L134


Add integration test

Including:

Integration test
Compatibility test
CI

PTAL, thanks!
/cc @baurine @breeswish

/cc @YiniXu9506

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@26502cc). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             master   #1083   +/-   ##
========================================
  Coverage          ?   7.05%
========================================
  Files             ?      32
  Lines             ?    1943
  Branches          ?       0
========================================
  Hits              ?     137
  Misses            ?    1795
  Partials          ?      11

Flag
Coverage Δ

integrationtests
7.05% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26502cc...5d43c2d. Read the comment docs.


ci: add codespell support (config, workflow to detect/not fix) and make it fix few typos

More about codespell: https://github.com/codespell-project/codespell .
I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.
CI workflow has 'permissions' set only to 'read' so also should be safe.

I hope you picked up the typo fixes at least. Cheers


Small typo in docs

Hey @shanson7 -- good catch thanks for the PR. Let us know if you see anything else that needs update or if you have any feedback after giving Pyroscope a try!


[system] Augmenting createTheme typing throws an error

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
Following: https://mui.com/customization/palette/#adding-new-colors
importing createTheme from @mui/material/styles and augmenting as described in the above link from documentation causes an Module '"@mui/material/styles"' has no exported member 'createTheme'.
Expected behavior 🤔
The module should be augmented with the new properties added to extend the PaletteOptions.

Steps to reproduce 🕹
https://codesandbox.io/s/late-tree-91u63n?file=/src/App.tsx
Steps:

Install material ui according to https://mui.com/getting-started/installation/
Follow https://mui.com/customization/palette/#adding-new-colors to call createTheme with same arguments
Follow https://mui.com/customization/palette/#adding-new-colors to augment PaletteOptions

See that the same steps on the documentation produce error in new sandbox.
Context 🔦
I want to be able to add a new color to the palette so I can use the theme as my central place to get the application's color.
Your environment 🌎

`npx @mui/envinfo`
  System:
    OS: macOS 12.1
  Binaries:
    Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
    Yarn: Not Found
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.0/bin/npm
  Browsers:
    Chrome: 99.0.4844.51
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.2
  npmPackages:
    @emotion/react: ^11.8.2 => 11.8.2
    @emotion/styled: ^11.8.1 => 11.8.1
    @mui/base:  5.0.0-alpha.72
    @mui/icons-material: ^5.5.1 => 5.5.1
    @mui/material: ^5.5.1 => 5.5.1
    @mui/private-theming:  5.4.4
    @mui/styled-engine:  5.4.4
    @mui/system:  5.5.1
    @mui/types:  7.1.3
    @mui/utils:  5.4.4
    @mui/x-data-grid: ^5.6.1 => 5.6.1
    @types/react: ^17.0.39 => 17.0.39
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript: ^4.5.5 => 4.5.5

Hi.
I can confirm that it works. Check out https://codesandbox.io/s/gifted-architecture-q17f6g?file=/src/Demo.tsx

🤦 sorry about that, appreciate the example. Was going mad and thought it was something MUI-related when it occurred on a fresh repo on code sandbox.
Just found out it was cause I didn't import the module in the definition index.d.ts file and forgot Typescript needs the import to augment the module.
I updated my original example with a comment that fixed it for anyone else having the same issue and wanting their declare augmentation inside the @types folder and not next to the themeing.
Thanks

Your codesandbox saved me much pain


Add documentation for the Twitter storage adapter

:rocket:

@gunthercox doc is added https://github.com/gunthercox/ChatterBot/pull/248


All tests segfault on arm64 & clang-10

All bazel tests SEGFAULT after otherwise completing all test cases successfully when compiled with clang-10 on arm64. This appears to be a clang-10 bug affecting Envoy tests via code in gperftools heap checker. See related bug reports:

gperftools issue: https://github.com/gperftools/gperftools/issues/1241
clang Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=48798

Since Envoy binary only crashes if run with HEAPCHECK defined (e.g., HEAPCHECK=normal), and then only when the process exits, I'm not repeating stack traces here (see the linked bug reports above).
While a compiler bug like this may seem concerning, the code pattern under which the SEGFAULT happens seems to be fairly specialized (low-level syscall inline assembly in a C++ class member function).

IIRC this is a known issue? @lizan?

IIRC this is a known issue? @lizan?

@mattklein123 Upstream fix proposed: https://github.com/gperftools/gperftools/pull/1244.

@mattklein123 Upstream fix proposed: https://github.com/gperftools/gperftools/pull/1244.

Yeah this is known when I enabled arm64 but I haven't dig it deeply. Thanks for looking into @jrajahalme

Yeah this is known when I enabled arm64 but I haven't dig it deeply. Thanks for looking into @jrajahalme

gperftools fix has been applied: https://github.com/gperftools/gperftools/commit/c5747615da78f7c2d91112f2a6b6b4da4f18540a.


SSD1306 drawImage

I've been working on (image) compression and the drawImage function for the @emeb SSD1306 was a necessary side product.
As the display operates in vertical mode with us looking at it horizontally, still every pixel needs to be set.
I managed a tiny speed increase by eliminating the call to drawPixel but the main benefit of the function is to use black or white as transparency and the ability to draw ontop of the buffer contents using bitmath, think sprites!
Of course the SSD1306_LOG_IMAGE can be stripped away.

It looks good on my end! What do you think @emeb ?

Looks good to me!


🐛 Do not reload configs or files unnecessarily

When consuming file warnings there was a bug that sometimes made them disappear. You see the log message that the warning occurred, but the store no longer has any record of the warning when processing is complete.
This was caused by getRawFrontmatterFromFile always re-loading files, even if they were already loaded, which in the process clears all previous warnings. Simply not re-loading the file if it is already loaded prevents this bug.

The scope of this PR has expanded to address the repeated config loading (and validation error messages) from #644

Tested out, works well!


Support DSR mode for LoadBalancerIPs with AntreaProxy

Describe what you are trying to solve

See https://github.com/antrea-io/antrea/issues/4956 for the original issue.
In DSR (Direct server return) mode, the load balancer routes packets to the backends (without changing src/dst IPs in it typically). The backends process the requests and answer directly to the clients, without passing through the load-balancer.
Pros:

lower latency
total output bandwidth is the sum of each backend bandwidth
preserved client IP

Use case: in-cluster LoadBalancers, e.g. Metallb, Antrea ServiceExternalIP
Describe the solution you have in mind

The diagram shows how the traffic flows in DSR mode:

The tricky part is how to persist loadbalancing result of the first packet of a connection on ingress Node, considering the following caveats:

Connections will be marked as ”invalid” in conntrack on ingress Nodes
OVS doesn’t provide “ct_mark” and “ct_label” for invalid connections

Potential Solution

Leverage Learn action: however, @antoninbas pointed out that there is a latency a learned flow is installed with, which may cause different selection result. Need to check whether it could cause real problems.
Change the OVS behavior to get "ct_mark" and "ct_label" for invalid connections. Need to understand whether it's by design or a bug.
Use deterministic algorithm to select backend to ensure the same backend will be selected.

Example Flows with learn actions:
svc_ip=<IP_ADDRESS>
svc_port=80
pod_ip=0xaf40102
node_ip=0xac120003

ovs-ofctl add-group br-int "group_id=100,type=select,bucket=bucket_id:0,weight:100,actions=load:0xaf40102->NXM_NX_REG3[],load:0x50->NXM_NX_REG4[0..15],resubmit(,ServiceLB)"
ovs-ofctl add-flow br-int "cookie=0x1, table=ServiceLB,priority=205,tcp,reg4=0x10000/0x70000,nw_dst=<IP_ADDRESS>,tp_dst=80 actions=load:0x3->NXM_NX_REG4[16..18],load:0x1->NXM_NX_REG0[9],load:0x5->NXM_NX_REG7[],group:100" # removed reg4[21], ToExternalAddressRegMark
ovs-ofctl add-flow br-int "cookie=0x1, table=ServiceLB, priority=195,tcp,reg4=0x30000/0x70000,nw_dst=<IP_ADDRESS>,tp_dst=80 actions=learn(table=SessionAffinity,idle_timeout=60,fin_idle_timeout=10,priority=200,delete_learned,cookie=0x1,eth_type=0x800,nw_proto=6,NXM_OF_TCP_SRC[],NXM_OF_TCP_DST[],NXM_OF_IP_DST[],NXM_OF_IP_SRC[],load:NXM_NX_REG3[]->NXM_NX_REG3[],load:NXM_NX_REG4[0..15]->NXM_NX_REG4[0..15],load:0x2->NXM_NX_REG4[16..18],load:0x1->NXM_NX_REG0[9]),load:0x2->NXM_NX_REG4[16..18],resubmit(,EndpointDNAT)"
ovs-ofctl add-flow br-int "cookie=0x1, table=EndpointDNAT, priority=220,tcp,reg3=0xaf40102,reg4=0x20050/0x7ffff actions=ct(commit,table=AntreaPolicyEgressRule,zone=65520,exec(load:0x1->NXM_NX_CT_MARK[4],move:NXM_NX_REG0[0..3]->NXM_NX_CT_MARK[0..3]))"
ovs-ofctl add-flow br-int "cookie=0x1, table=L3Forwarding, priority=210,ip,reg3=0xaf40102 actions=mod_dl_src:96:de:80:00:db:cf,mod_dl_dst:aa:bb:cc:dd:ee:ff,load:0xac120003->NXM_NX_TUN_IPV4_DST[],load:0x1->NXM_NX_REG0[4..7],resubmit(,L3DecTTL)"
ovs-ofctl add-flow br-int "cookie=0x1, table=ConntrackState, priority=220,ct_state=+inv+trk,ip actions=resubmit(,PreRoutingClassifier)"

Describe how your solution impacts user flows

User can set the LoadBalancer mode to DSR in antrea-agent config. Then LoadBalancerIPs of Services will work in DSR mode.
Test plan

[ ] Performance evaluation: latency, throughput
[ ] Test with popular in-cluster LoadBalancers

@antoninbas I tried to reproduce the latency of learned flow but it seemed working fine even the first packet and the second packet had a very small interval:
13:34:30.967023 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [S], seq<PHONE_NUMBER>, win 64240, options [mss 1460,sackOK,TS val<PHONE_NUMBER> ecr 0,nop,wscale 7], length 0
13:34:30.969892 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [.], ack<PHONE_NUMBER>, win 502, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 0
13:34:30.969911 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [P.], seq<PHONE_NUMBER>:1131758264, ack<PHONE_NUMBER>, win 502, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 75: HTTP: GET / HTTP/1.1
13:34:30.971142 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [.], ack<PHONE_NUMBER>, win 501, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 0
13:34:30.971352 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [.], ack<PHONE_NUMBER>, win 501, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 0
13:34:30.971898 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [F.], seq<PHONE_NUMBER>, ack<PHONE_NUMBER>, win 501, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 0
13:34:30.972140 IP <IP_ADDRESS>.36214 > <IP_ADDRESS>.80: Flags [.], ack<PHONE_NUMBER>, win 501, options [nop,nop,TS val<PHONE_NUMBER> ecr<PHONE_NUMBER>], length 0

And the packet counter confirmed the subsequent packets always hit the learned flow:
cookie=0x1, duration=1.703s, table=SessionAffinity, n_packets=6, n_bytes=471, idle_timeout=10, priority=200,tcp,nw_src=<IP_ADDRESS>,nw_dst=<IP_ADDRESS>,tp_src=36214,tp_dst=80 actions=fin_timeout(idle_timeout=10),load:0xaf40004->NXM_NX_REG3[],load:0x50->NXM_NX_REG4[0..15],load:0x2->NXM_NX_REG4[16..18],load:0x1->NXM_NX_REG0[9]

10,000 connections succeeded 100% when there are two different backends on different nodes even I changed the max-revalidator back to 500.
So I suspect the original issue has been fixed in OVS 2.17.6. Do you have a way to reproduce the original issue?

@tnqn My best guess is that the issue doesn't happen for packets belonging to the same connection?
My guess is that the microflow cache is updated for that specific connection by the datapath itself, so there is no issue for subsequent packets.
However, in the case of the SessionAffinity implementation, we are dealing with different connections (source port can be different). In that case, new connections do not hit the learned flow until the revalidator updates the datapath.
One way to confirm this would be to update your learned flow so that it doesn't match on the source port, then trigger several back-to-back connections.

I also found something more interesting: if I change the selection method from dp_hash to hash, the subsequent packets of a connection will always get the same bucket as the first packet even if the learned flow is per src IP

I am not sure I understand this comment, unless you are talking about multiple connections, with different source ports.
I believe there is a significant different between how hash and dp_hash work. hash has the advantage of letting you choose which fields are used to compute the hash. That means that we could omit the source port from the hash for SessionAffinity (doesn't seem to be the default though).
This is from an old patch for dp_hash implementation^1:

The current default OpenFlow select group implementation sends every new L4 flow
to the slow path for the balancing decision and installs a 5-tuple "miniflow"
in the datapath to forward subsequent packets of the connection accordingly.
Clearly this has major scalability issues with many parallel L4 flows and high
connection setup rates.

The dp_hash selection method for the OpenFlow select group was added to OVS
as an alternative. It avoids the scalability issues for the price of an
additional recirculation in the datapath.

And the OVS manual entry for hash specifies:

Use a hash computed over the fields  specified  with  the fields  option,  see below.  If no hash fields are specified, hash defaults to a symmetric hash over the combination  of  MAC  addresses,  VLAN  tags, Ether type, IP addresses and  L4  port  numbers.   hash  uses  the  selection_method_param as the hash basis.

Note  that  the hashed fields become exact matched by the datapath flows.  For example, if the TCP source  port  is hashed,  the  created  datapath flows will match the specific TCP source port value present  in  the  packet  received.   Since  each TCP connection generally has a different source port value, a separate datapath  flow  will be  need  to  be  inserted  for  each TCP connection thus hashed to a select group bucket.

Also from the OVS manual, we have this for dp_hash:

This  double-matching  incurs  a small additional latency cost for each packet, but this latency is orders of  magnitude  less  than the latency of creating new datapath flows for new TCP connections.

Which seems to be a reference to one drawback of using hash.
My takeaways from all this are as follows:

when using hash, we can choose to exclude the source port from the hash, eliminating the time window during which new connections using a different source port are sent to a different backend. However, by default, the hash should include the source port so we should still observe the same issue.
hash seems to have scalability issues historically, which I am not sure we can ignore for our use case?
hash may also incur higher latency during connection establishment?
a lower revalidator delay may still be useful in case of Service endpoint update during the learning window: if we haven't observed issues so far (CPU usage), I think we can keep it as it is. A Service endpoint update means that traffic may be rebalanced.

With regards to the scalability issues of hash, they may not be relevant to us for the following reasons:

we plan on omitting fields from the hash, hence reducing the number of datapath flows
since we are using learning anyway, we are ok with increasing the number of datapath flows in the first place

The scalability impact is the same for hash and learning IMO. You observed it for learning in your experiment.
So only the increased latency may be of concern?

I also found something more interesting: if I change the selection method from dp_hash to hash, the subsequent packets of a connection will always get the same bucket as the first packet even if the learned flow is per src IP

I am not sure I understand this comment, unless you are talking about multiple connections, with different source ports.

I meant:

When using dp_hash and learn flow is based on src IP, the 2nd connection could be discrupted by the learned flow of the 1st connection, because the 1st connection may select bucket A while the 2nd connection may select bucket B. Before the learned flow of the 1st connection is realized in kernel, the first few packets of the 2nd connection will use bucket B; after the learned flow is realized, the subsequent packets of the 2nd connection will use bucket A.
When using hash and learn flow is based on src IP, the 2nd connection won't be distrupted. My understanding is that the hash method forces the packet to be sent to OVS userspace, thus will enforce the learned flow without any delay.

I think the scalabity issue and the higher latency refer to the fact that the hash method forces the packet to be processed by OVS userspace and generate a new datapath flow for every new connection. It's true for most cases but probably not true when learn is one of the actions, because the learn action has determined the packet will be sent to OVS userspace anyway. This is the results I got with different flows with ab -n 10000:

Test
Requests per second
Time per request
Kernel flow number

1. hash, no learn action
1116.74
0.895
17537

2. hash, learn action based on source IP + port
1169.29
0.855
16151

3. hash, learn action based on source IP + masked (6bits) source port
1671.39
0.598
142

4. hash, learn action based on source IP
1723.53
0.580
14

5. dp_hash, no learn action
1630.54
0.613
30

6. dp_hash, learn action based on source IP + source port
1067.87
0.936
17347

7. dp_hash, learn action based on source IP + masked (6bits) source port
-
-
-

8. dp_hash, learn action based on source IP
-
-
-

1 and 5 don't work as they cannot guarantee consistent selection for a connection, but it validates that dp_hash is indeed more efficient when there is no learn action
2 and 6 can work but their performance are not the best and generate one userspace flow and one or two datapath flows for each connection, which are exactly the drawbacks of hash method, however, encountered by dp_hash too when learn action is there
3's performance is close to the best and generates reasonable flows (can be controlled via the bits of source port we include in the flows)
4 has the best performance and generates least datapath flows, however, can cause uneven load balacing as one client IP can only access one backend
7 and 8 don't get valid results due to the delay of learned flows distrupting connections.
We can see that "dp_hash, learn action based on source port" actually has similar performance as "hash, learn action based on source port" as the first packet of every connection is upcalled in both cases. "dp_hash, no learn action"

It seems to me that 3 is the most appropriate approach which has nearly best performance, generats reasonable flows, loads balance evenly relatively.

That's good data. I agree that Option 3 looks like a good approach.

My understanding is that the hash method forces the packet to be sent to OVS userspace, thus will enforce the learned flow without any delay.

It feels to me that there are 2 flows being installed, one caused by the usage of hash and one because of the learn action. Is that correct? Given that you use 6 bits of the source port, one would expect 2^6 = 64 flows, but we instead have 128 + X flows (unless there is some recirculation?). If this is accurate, it feels like the learn action flow would still be subject to revalidator processing?

There are indeed 2 flows being installed for each connection, but caused by two different ct_states:
For the first packet of a connection, it's "+new-inv+trk", it will be upcalled due to the usage of hash and the generated datapath flow will have the ct_states like below:
recirc_id(0x4a3c),in_port(2),ct_state(+new-inv+trk),ct_mark(0/0x10),eth(),eth_type(0x0800),ipv4(src=<IP_ADDRESS>,dst=<IP_ADDRESS>,proto=6,frag=no),tcp(src=32/0x3f,dst=80), packets:0, bytes:0, used:never, actions:ct(commit,zone=65520,mark=0x12/0x1f),recirc(0x4a4b)

For the second packet of a connection, it's "-new+inv+trk", it won't match the above flow and will be upcalled due to the usage of hash and the generated datapath flow will be like:
recirc_id(0x4a3c),in_port(2),ct_state(+inv+trk),eth(),eth_type(0x0800),ipv4(src=<IP_ADDRESS>,dst=<IP_ADDRESS>,proto=6,frag=no),tcp(src=32/0x3f,dst=80), packets:3, bytes:198, used:1.153s, flags:F., actions:ct(commit,zone=65520,mark=0x12/0x1f),recirc(0x4a4b)

And because the second packet is upcalled, the learned flow of the first packet will apply to it, so it's not subject to revalidator processing, and it triggers installing the learned flow to datapath immediately.
For the other subsequent packets of the connection, they will match the second datapath flow and won't be upcalled.
For all packets of some other connections that have the same masked source ports, their first packets will match the first datapath flow and their subsequent packets will match the second datapath flow when they are not expired, or will be upcalled and match the learned flow.
In theory, we can change some flows to avoid the datapath flows being generated with ct_states, then even the second packet of the first connection won't be upcalled and generate another datapath flow.

Thanks @tnqn, things are much clearer now.
Based on your explanation, if we replace dp_hash with hash for the SessionAffinity implementation, I am fine with reverting the max-revalidator configuration to its default.
However, I assume we should stick with dp_hash for the default Service case?
One more question: in your table, for the hash, do you always use src IP + masked port? I am surprised we have so many flows in the first case, "hash, no learn action" (17537).

Based on your explanation, if we replace dp_hash with hash for the SessionAffinity implementation, I am fine with reverting the max-revalidator configuration to its default.
However, I assume we should stick with dp_hash for the default Service case?

Yes, dp_hash is more efficient when there is no learn action. I will evaluate the performance impact when making the change.

One more question: in your table, for the hash, do you always use src IP + masked port? I am surprised we have so many flows in the first case, "hash, no learn action" (17537).

All the tests in the table were executed without using masked port in hash parameters. "hash, no learn action" had many datapath flows because the whole source port is used in hash; "hash, learn action based on source IP + masked (6bits) source port" and "hash, learn action based on source IP" had few datapath flows because most subsequent connections hit the learned flows or their datapath cache.

All the tests in the table were executed without using masked port in hash parameters.

That explains the large number of flows. I am surprised the latency is not a bit higher for 1 given that each new connection needs to be upcalled (btw, what's the unit for Time per request, it ms?).
For our DSR use case (test 3 in the table), do you think it makes any difference to mask the source port in the hash? Maybe in the case where 2 connections (with the same masked source ports) are established almost "simultaneously", with the first packet of the second connection arriving before the upcall for the first packet of the first connection completes?

That explains the large number of flows. I am surprised the latency is not a bit higher for 1 given that each new connection needs to be upcalled (btw, what's the unit for Time per request, it ms?).

The unit test is ms. The latency when each new connection needs to be upcalled (Case 1, 2, 6) is indeed higher than the others (Case 3, 4, 5).

For our DSR use case (test 3 in the table), do you think it makes any difference to mask the source port in the hash? Maybe in the case where 2 connections (with the same masked source ports) are established almost "simultaneously", with the first packet of the second connection arriving before the upcall for the first packet of the first connection completes? That would be a total edge case though.

There is no obvious performance difference according to tests. I thought there could be issues if 2 connections with the same masked source port are established simultaneously when we don't mask the source port with hash, because 1 connection may map to bucket A and generate a leaned flow with the masked source port, then another connection may map to bucket B and generate a learned flow with the same masked source port but different action, overriding the first one. However, the issue didn't happen. I'm not sure if it's OVS having some synchronization mechanism to avoid the problem, but I agree it's perhaps better to have the same masked source port in hash, for the following reasons:

The selection will be consistent regardless which flow a packet matches, the learned flow generated by preceding connections, or the hash flow.
There will be less datapath flows because the datapath flow that matches "+new" will match masked source port, instead of the whole source port.
There will be a bit less upcalls because the first packet of the second connection with the same masked source port will hit the datapath flow, instead of being upcalled, hitting the learned flow, generating another datapath flow (which the 3rd connection could benefit from).

There is no obvious performance difference according to tests. I thought there could be issues if 2 connections with the same masked source port are established simultaneously when we don't mask the source port with hash, because 1 connection may map to bucket A and generate a leaned flow with the masked source port, then another connection may map to bucket B and generate a learned flow with the same masked source port but different action, overriding the first one.

That's also what I thought could happen

However, the issue didn't happen.

You mean, when running ab in concurrent mode?
Let's mask the source port in hash too then if there is no obvious downside.

However, the issue didn't happen.

You mean, when running ab in concurrent mode?

Yes, I tried ab -c with 10 and 100.

Let's mask the source port in hash too then if there is no obvious downside.

Sure.


Upload Notify to F-Droid

Wanted to upload Notify to F-Droid

@aritra-tech I would love to work on this issue,would you please assign me this issue ?

Hey, Can I take this up?

Sure @githubashutoshsoni

Hey @githubashutoshsoni any update?


How can I save nodeos running log in local use option -l?

I can not find enough info to config nodeos to save running log in local file not only in stdout.

There is no built in ability to log to a file -- this functionality is disabled and broken (#2377). You will just have to redirect the output via your shell (/nodeos &> log.txt), or use journalctl if nodeos is launched by systemd. Going to go ahead and close this one as file logging being broken is already captured in #2377


Possibility of rendering only the first n strokes of a character?

Hi,
This library looks great and thanks for writing and sharing it !
I am aiming at generating some practice sheets that display stroke order on the left side.
While looking at the documentation, I could not find a straightforward way to render a fixed image of the character with only one stroke first, then with the first 2 strokes, then the first 3 strokes …
Is that something that could be done easily with this library? And if so, is it also possible to have the last stroke displayed as a different colour ?
Thanks and regards,
Fabien

Hi Fabien,
Are you looking for something like in this demo:
https://wenlincdl.com/demos/fanning? Hanzi Writer doesn't have an easy way
to do that currently, but it shouldn't be hard to do using Hanzi Writer
data directly (in this repo: https://github.com/chanind/hanzi-writer-data).
I'll see if I can put together some documentation on how to use this data
to make SVGs like that without going through Hanzi Writer.
Best,
David
On Fri, Apr 6, 2018 at 9:37 AM, hcoohb<EMAIL_ADDRESS>wrote:

Hi,
This library looks great and thanks for writing and sharing it !
I am aiming at generating some practice sheets that display stroke order
on the left side.
While looking at the documentation, I could not find a straightforward way
to render a fixed image of the character with only one stroke first, then
with the first 2 strokes, then the first 3 strokes …
Is that something that could be done easily with this library? And if so,
is it also possible to have the last stroke displayed as a different colour
?
Thanks and regards,
Fabien
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/chanind/hanzi-writer/issues/76, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMQFRHOLmWivS0LsSOFYUv722xBWrJ9ks5tlsbwgaJpZM4TJZIo
.

v0.11.0 added 2 static methods HanziWriter.loadCharacterData(character) and HanziWriter.getScalingTransform(width, height) which should make it easier to do what you're talking about here. The docs on this are here: https://chanind.github.io/hanzi-writer/docs.html#raw-character-svg. There's also an example there of how to use these methods to do stroke fanning.
Closing this issue for now. If this isn't what you were looking to do we can reopen this issue again.

That is perfect !!!
Exactly what I needed
Thank you so much for implementing those features!

I love to functionality! Thanks for the code sample.

😀Glad it worked out!

Also, after a quick 5 mins online search, I noticed some solid html+svg to pdf js libs. It thus open the way to export pdf in order to print smart writing pad for paper-based studies. I collected some ideas there but it deserves a dedicated project I think.

That's a really cool idea! I hadn't thought about generating paper worksheets, but I don't see why it wouldn't be possible to autogenerate worksheets like that using this SVG data.


SWA AAD Auth: 500: Internal Server Error

Hello,
Since this morning all static web apps i host have become unusable and returning a 500 error message. This appears to be consistent will all apps using the EntraID built-in authentication:

The 500 error seems to be occuring at the .auth/ endpoint:

There have been no changes to these apps but they are all consistently showing the same symptoms.
Auth Config:
"auth": {
    "rolesSource": "/api/auth/getRoles",
    "identityProviders": {
      "azureActiveDirectory": {
        "userDetailsClaim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
        "registration": {
          "openIdIssuer": "https://login.microsoftonline.com/<TenantId>",
          "clientIdSettingName": "<ClientIdSettingName>",
          "clientSecretSettingName": "<ClientSecretSettingName>"
        }
      }
    }
  },

We're seeing the same on multiple apps. Tried redeploying our bicep, our content, changing the auth flow between v1 and v2 to no avail.

Yep, looks like Microsoft has made a change somewhere which has broken the custom azureActiveDirectory authentication provider.
Currently have a case open with them but it's proving difficult to get someone to acknowledge the problem.

Jep, same here @deanlongstaff
I've also created an X account just to message @AzureSupport and to get their attention to this issue. I'm glad it's 'just' an internal tool that's broken (even though it's a critical tool for one of our teams), it's like pulling teeth 🤯

Just wondering why we seem to be the only ones @deanlongstaff and @obosdalen ... do you store the appkey+appid for the app registration in keyvault or have you stored those directly in environment variables?

@Huppie The clientID is plain text but the secret if pulled from key vault. Have tried all combinations of getting this to work though, inclusing plain text, and it consistently does not work. Perhaps most users are using traditional auth methods like msal-node instead of the SWA easy auth offering.
From my ticket with Microsoft it seems they have acknowledged that this is an outage on their end and they are conducting a RCA.

I'm glad they at least acknowledged the issue to you. https://status.azure.com still says everything's fine 🤷♂

Same here, opened a ticket yesterday and they acknowledged the issue. Was told they are currently investigating. Been over 24 hours now since last update (even though I requested an update several hours ago).

FWIW, we're experiencing the exact same issue.
When I check our app's "Diagnose and solve problems", I also see the same message @warlof gets: "Unable to fetch Static App Config. Please try again later"

Thanks @deanlongstaff. I can confirm that our site is working again now.

@warlof Me too, a little intermittent at the moment. I think they are still working on fixing it properly.

Everything seems back to normal here too, only ~3.5 days of downtime, no biggie... 😬
No official response from Microsoft on our side though. My last update (after @deanlongstaff already posted he got an update that it was fixed) says they're still waiting for an update 🙈


api: change /v1/subscribe default behavior

This changes the /v1/subscribe default behavior to match the CLI's
subscribe command. It takes only a single plan, no effective date, and
updates the current phase in a scheudule with the new features in the
provided plan. There remains a path to allow clients to do more advanced
things like specify multi-phase schedules and update-in-place or
attached to the current phase in interesting ways use the Current field
on tier.Phase.

This seems to work!


confusion about transaction timestamp

getTransaction returns a timestamp in the response
However

It is different than the timestamp of the Checkpoint it belongs to. We observe it has a ~30s diff.
It is also non-deterministic from different validators. Assuming you have 2 people running some kind of SUI explorer, they will show different timestamps for the exact same transaction. We verified this by comparing the timestamps from one validator we ran and the public sui testnet endpoint

This could be confusing to anyone who is consuming transactions.
If this is by design, it might be better to explicitly point out that readers should rely on checkpoint timestamp for any given transaction?

@gegaowp I believe that we've changed this so that it now returns the checkpoint timestamp, correct?


run: ./gradlew test

runs-on: ubuntu-latest

steps:
- name: Checkout code uses: actions/checkout@v2

- name: Set up JDK 11 uses: actions/setup-java@v2 with: distribution: 'adopt' java-version: '11'

- name: Cache Gradle packages uses: actions/cache@v2 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-gradle

- name: Build with Gradle
  run: ./gradlew build

- name: Run unit tests
  run: ./gradlew test

Please provide more context if you have a real scenario.


Prepare the 3.3.2 release

Codecov Report

:exclamation: No coverage uploaded for pull request base (3.3@187c7c9). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             3.3    #2013   +/-   ##
======================================
  Coverage       ?   64.52%
======================================
  Files          ?      125
  Lines          ?    14726
  Branches       ?        0
======================================
  Hits           ?     9502
  Misses         ?     5224
  Partials       ?        0

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Corresponding opam PR https://github.com/ocaml/opam-repository/pull/21868


Finish tutorial for Mass Mint

Is your feature request related to a problem? Please describe.
there is a branch https://github.com/kodadot/nft-gallery/compare/main...614-mass-mint
And there is a tutorial for users

Describe the solution you'd like
I want the tutorial to be finished
How does the mass mint works?
Ping me on Discord

we have this


tweak sort

cc @zxch3n

Summary by CodeRabbit

Refactor

Enhanced and optimized sorting algorithms to improve performance and maintain code readability.

@zxch3n I need to apologize for the inappropriate changes, there are parts of this that need to continue to be changed.

np :)


Broken on Debian 12 / Flatpak version doesn't see Applications inside distrobox

Install method (Flatpak/Binary/Other)
Binary and pacscript from source (rustup)
Distrobox Version
<IP_ADDRESS>-1
Your Host OS
Debian 12 Bookworm
Describe your Issue
Hi dev,
The binary cannot be executed on Debian 12 (glib >= 2.38 and gtk4 >= 4.10)
https://packages.debian.org/fr/source/bookworm/glibc
https://packages.debian.org/source/bookworm/gtk4
Build from source also fail for gtk4 version requested, too high for Debian.
Tested flatpak version : Doesn't see installed applications insides the boxes to export. (box creation works) [EDIT: Seems ok with distrobox-git)

Hello
The binary is built on Fedora 39, so I guess Debian is too far behind.
Flatpak of BoxBuddy + Distrobox from Git is probably the best way to support Debian.

Hello
The binary is built on Fedora 39, so I guess Debian is too far behind.
Flatpak of BoxBuddy + Distrobox from Git is probably the best way to support Debian.

Hi.
In fact, I'm not able to provide boxbuddy from source/binary for Debian 12 on pacstall.
I have provided distrobox-git and latest stable. It's working with flatpak version.
I regret to be blocked to share boxbuddy via pacstall. It's a good app.


[Bug]: ERR_FR_MAX_BODY_LENGTH_EXCEEDED on batch insert of 1000 docs

What happened?

In the typescript client, I'm trying to do a batch insert of 1000 embeddings. I get a ERR_FR_MAX_BODY_LENGTH_EXCEEDED exception
The header Content-Length is 19669240, which doesn't feel that large. Especially since this is local?
Versions
Chroma 0.3.22.dev17
Node 19, latest docker and macos versions
Relevant log output
The max body error doesn't show up in uvicorn logs

This also crashes the client, since response is undefined and you're trying to access response.data

This is axios issue but removing axios now.
https://github.com/chroma-core/chroma/pull/348

Thanks @gustawdaniel !


manila default share type: enable snapshot extra spec

The manila backends which are mainly targeted by deployment and testing with ci-framework (cephfs, cephfs/NFS, netapp) do all support snapshots.
Testing snapshots can always be disabled through tempest configuration. So always define the extra spec for snapshot support in the default share type.
As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running
[x] Appropriate documentation exists and/or is up-to-date:

[x] README in the role
[x] Content of the docs/source is reflecting the changes

/lgtm thank you, Luigi!


PWA-201: Hide the coupon field when the cart doesn't support coupons

implemented consideration of the coupons flag of the getCart response
when coupons are not supported, the user now gets a message instead of the field
adjusted the alignment of the TaxDisclaimer component to left

Pull Request Test Coverage Report for Build 1078

3 of 4 (75.0%) changed or added relevant lines in 3 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.9%) to 41.741%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pages/Cart/components/CouponField/connector.js
0
1
0.0%

Files with Coverage Reduction
New Missed Lines
%

pages/Cart/components/CouponField/connector.js
1
0.0%

Totals

Change from base Build 1076:
0.9%

Covered Lines:
1876

Relevant Lines:
4269

💛  - Coveralls


Update ng lib to 1.6.1

Task/Issue URL: https://app.asana.com/0/488551667048375/1204810793215818/f
Description
Update ng library to 1.6.1 that provides a fix for this
Steps to test this PR

[ ] install from this branch
[ ] enable AppTP
[ ] verify AppTP blocks trackers
[ ] enable NP (check asana if you need help)
[ ] verity AppTP blocks trackers
[ ] disable AppTP
[ ] smoke test NP

Current dependencies on/for this PR:

develop

PR #3251   👈

This comment was auto-generated by Graphite.


Added quaternion in C#

[THIS PULL IS NOT FULLY READY YET]
I noticed that there is implementation of quaternions in F# : here
Kjbartel said that we need C# implementation of it thus I started to implement.
Just give me one or two days to make it fully work.
Things to do :
Actual Code :

[ ] Rotations
[ ] More robust division (possible overflow)
[ ] Create more robust norm (possible overflow)
[ ] Create quaternion from angle
[ ] Create quaternion from matrix

--
Testing

[ ] DotProduct
[ ] Inversion
[ ] Equality, operator ==
[ ] ToString()
[ ] Norm
[ ] Conjugation
[ ] operator* for floats
[ ] operator/

If you have any more ideas what to add just post it - I will handle it.
If you want to contribute :  here is my git repo

Kjbartel said that we need C# implementation of it thus I started to implement.

Just because said something doesn't make it true. :) I may very well have been mistaken in my understanding of the purpose of the MathNet.Numerics.FSharp assembly.
If it is supposed to be only for use in F# then I think that everything should be included in the normal MathNet.Numerics assembly. But, if the MathNet.Numerics.FSharp assembly is simply supposed to be additional functionality and utilities, not part of the core Numerics functionality, for general use from all .Net languages (which just happen to be implemented in F#) then there may be no need for this to be implemented in the core MathNet.Numerics assembly.
This comment from @cdrnet makes me think it is the latter:

We already have some functionality available only in the FSharp package that may also be useful for non-F# .net developers, mostly the BigRational type. So it is acceptable in my point of view to do the same with Quaternion.

But I do agree that the current separation between the two packages is unfortunate. A separation into two NuGet packages just because it uses a different language internally doesn't make any sense to users. One problem with a single package approach could be the dependency on FSharp.Core though, which could cause some problems.

So rather than implementing this in C# I think it would be better to look at removing the confusion of the purpose of the MathNet.Numerics.FSharp assembly / package. The easiest would perhaps be simple renaming it to something like MathNet.Numerics.Extras. But I think there are things in the assembly which are specifically targeted at F#. So it may be better to even create an additional assembly for the non-F# utilities.
Indeed the whole Numerics project could be broken up into smaller assemblies and packages focused on specific areas / fields. That may also allow for some areas to be re-implemented in F# without needing to re-implement the whole library. Whether it's worth the effort or not though isn't for me to say. The only real benefits are being able to have smaller assemblies (which may be desirable for mobile and embedded use) and for separate versioning and release of assemblies, allowing functionality to be released faster.
The opposite direction would be looking at ways to create a single NuGet package and / or assembly. The two assemblies could easily be packaged together or could be merged into a single assembly with ILmerge. But, as @cdrnet said there may be issues with an FSharp.Core dependency neither of these options may be desirable, at least at the moment.
Bottom line: Not sure if this is needed or not.

I just liked your idea to do that :( And since I like to create C# programs I did it with pleasure.
Okay, if you don't know if it is necessary I'll wais for what @cdrnet say about this idea. Should I start a discussion on codeplex?

@MaLiN2223 would you also be interested in contributing this to Math.NET Spatial instead? Spatial is also part of Math.NET and sits on top of Numerics. It provides types and functionality related to spatial problems (geometry, ..) and already has a Quaternion type, although one that is implemented quite badly (it precomputes certain properties which doesn't make much sense, its norm implementation is wrong, its API quite weird, etc.), and already knows concepts like Euler-angles. It would be great if we'd get some help to bring Spatial finally into a releasable state.

Of course I would!
Thank you. I am closing this pull request right now and start to decoding Spatial :)


Add Background

Add a background to all relevant sections to enhance the visual appeal and improve the user experience.

@michellelorenz can you test it please if every scene has the correct background


Provide a 'duk_get_**_or' API?

What do you think of replacing the duk_get_** API calls with one which allows the user to provide a default value which will be returned in the case that the stack index is invalid or it is an unexpected value type. Then, simply change the current duk_get_** API to macros which will in turn call new API with the default argument assigned to them in the current API.
For example, the duk_get_number implementation could be changed to:
DUK_EXTERNAL duk_double_t duk_get_number_or(duk_context *ctx, duk_idx_t index, duk_double_t defvalue ) {
	duk_double_union ret;
	duk_tval *tv;

	DUK_ASSERT_CTX_VALID(ctx);

	ret.d = defvalue;  /* Only line changed */
	tv = duk_get_tval(ctx, index);
	if (tv && DUK_TVAL_IS_NUMBER(tv)) {
		ret.d = DUK_TVAL_GET_NUMBER(tv);
	}

	/*
	 *  Number should already be in NaN-normalized form, but let's
	 *  normalize anyway.
	 */

	DUK_DBLUNION_NORMALIZE_NAN_CHECK(&ret);
	return ret.d;
}

Then the current duk_get_number could be changed to:
#define duk_get_number(cx, index) duk_get_number_or((cx), (index), DUK_DOUBLE_NAN)

I'm suggesting this because to often I have to check the value type at an index first before obtaining it for optional/default arguments in my native bindings. This would simplify that and avoid branching.
Example:
// Instead of this:
static duk_ret_t play( duk_context* cx )
{
    // JS Signature play( offset:number /*= 0.0*/, loops:number /*=2*/ ):void

    float offset = 0.0f;
    int   loops  = 2;

    if( duk_is_number( cx, 0 ) )
    	offset = (float)duk_get_number( cx, 0 );

    if( duk_is_number( cx, 1 ) )
    	loops = (int)duk_get_int( cx, 1 );

    return 0;
}

// Instead of this:
static duk_ret_t play( duk_context* cx )
{
    // JS Signature play( offset:number /*= 0.0*/, loops:number /*=2*/ ):void

    float offset = (float)duk_get_number_or( cx, 0, 0.0 );
    int   loops  = (int)duk_get_int_or( cx, 1, 2 );

    return 0;
}

duk_get_***_or is not necessarily the name I'm suggesting — that's another conversation— I'm rather focusing on the purpose :)
Thoughts?

This would definitely be useful, and it's actually been discussed (and even prototyped) a while back. I think the form/naming used then was:
int port = duk_opt_int(ctx, 2, 8080);

I recall vaguely that the prototype wasn't merged because there were some type checking / semantics issues to be worked out (for example what to do if an "int" is required by the value is a non-integer number).
This would be a nice candidate for 2.1.0.

Excellent!
Interesting caveat re: semantic issues. What where your thoughts one overcoming the issue you cited? Should there be 2 different calls in such a case? A strict one or a lenient one, or what else is proposed?

Excellent, thanks for filling me in. I'll assist with wherever I can.

Looking through the API calls for get/require, it's mostly the integer related that are a bit unclear.
That's already the case for the integer calls though. For example, duk_require_int() actually means "require number, coerce number to integer for return value but don't coerce it on the value stack". It's in essence duk_require_number_return_as_int(). It's hard to convey that accurately in the naming. Even so, I think the current semantics may be a bit surprising just by looking at the function name.
But if those semantics are not changed, duk_opt_(u)int() should simply be consistent with whatever is already in place.

Coercion, as it is with get/require, seems like the sensible way to go. In the odd case that a user requires a stricter lookup, I think it's justified in that case for them write up a check for a fractional, etc. himself.

As a concrete example, calling Ecmascript code:
server.listen('<IP_ADDRESS>', 8080.5);  // mysterious fraction ;)

C code:
const char *host = duk_opt_string(ctx, 0, "localhost");
int port = (int) duk_opt_int(ctx, 1, 80);

With the argument 8080.5 the discussed behavior would result in port being 8080. This seems like a better default than 80 to me, although one could also argue the argument is invalid and should be rejected altogether and the default be used instead. Throwing an error would be surprising behavior for a "get with default" API call because duk_get_xxx() also don't throw.
If this seems reasonable I should be able to complete #1264 pretty quickly.

Yes, I completely agree with your last comment.
I did mentioned earlier if a 2 API call solution should be implemented (strict/lenient), but I thought about in which case someone, who is already specifically calling the duk_require/get/opt_int API, would not want it to be coerced if it happens to be a non-integral number. Which seems completely unreasonable, in which case one would explicitly use the duk_get_number API instead and do what they will with it themselves.
Coercion is in line with what is already in place, and also familiar to float to integral casts in C, which drop the fraction. So I agree that this is the way to go.

Alright, I'll work up #1264 tonight and it would be great if you could give it a test drive in your application :)

Ok I'll keep an eye out!
I just noticed you released v2.0.0 which seems to have a nice performance boost across the board. So this is great timing for me to upgrade, and switch to the #1264 branch :)
I'm diffing the debugger.rst so I can upgrade the vscode debugger soon as well.

Yep, Duktape 2.0 is noticeably more performant than previous versions and has a bunch of nice new goodies too. :)

@harold-b Going through old issues, there was actually a previous proposal to use duk_get_string_default() to provide an explicit default. Maybe that would be a good enough name if we can't come up with a better one-word alternative?

This has been implemented in Duktape 2.1 with duk_get_xxx_default() and with a bit different semantics with duk_opt_xxx().

Thanks for the hard work, Sami.


Wfh/rag benchmark

[X] Add methods for popular indexing methods (regular, parent-document, HyDE) with configurable transforms
[X] Add method to easily swap out LLM, embeddings
[X] Add caching for index
[X] add assistant and agent examples
[ ] Merge with Eugene's PR
[ ] Fix up evaluator to faithfulness work against assistant architecture

@hinthornw I'm comandeering to help resolve merge conflicts


Adding methods

Current coverage is 38.90%

Merging #12 into master will increase coverage by +1.20% as of ec8d25c

@@            master     #12   diff @@
======================================
  Files          207     207
  Stmts        11121   11121
  Branches      1950    1950
  Methods          0       0
======================================
+ Hit           4193    4327   +134
- Partial        542     585    +43
+ Missed        6386    6209   -177

Review entire Coverage Diff as of ec8d25c

Powered by Codecov. Updated on successful CI builds.

@saaja-sfdc please review and merge.


FF: Import Modal File Validation Happy Path

On successful selection and parsing of a JSON file, the UI will send a request to validate the file to the backend. On successful 200 ok of that validation, the file-uploader component will disappear and be replaced by a table that contains values in the following states:
COMPATIBLE: Greyed out carat, name of segment, COMPATIBLE status.
WARNING or INCOMPLETE will have an enabled carat and an expandable row to see detailed information.
TBD: The implementation of https://github.com/CarnegieLearningWeb/UpGrade/issues/1713 will give us the data type of the response.

If all of the files are incompatible, the primary "Import" button should be disabled.
If at least one file is 'warning' or 'compatible', the Import button should be enable.
On click of 'Import', we should see the import button disabled to prevent double-click, and we should see a load spinner.

Latest design (allow uploading only one file):

@danoswaltCL @bcb37 Is this fine? I can start with the api development.

yes please, can you put those details in the validation endpoint story as well and take needs refined off? It's all yours.
fileContent just means a valid feature flag JSON string, right?
https://github.com/orgs/CarnegieLearningWeb/projects/1/views/12?pane=issue&itemId=69574460

Yes right. fileContent means a valid feature flag JSON string. Ohh sorry searched for validation and could find only this ticket. Will add it there. Thanks for the link to the ticket.

all good, we need those details for this story too anyway

@ppratikcr7  The API is good as it is, with no message needed from the backend


[kwokctl] Generate a certificate instead of a fixed one

@wzshiming just wanted to clarify if the cert files need to be part of the PR if we can generate them?
Originally posted by @yibozhuang in https://github.com/kubernetes-sigs/kwok/pull/5#discussion_r942717440

repeated with #16
/close


Repository link is broken

Hello. Stumbled upon your crate while browsing lib.rs and noticed that the link back to the repository was broken.
Looks like there's an extra https:// here:
https://github.com/oscrim/bevy_shape_draw/blob/42d6253aa7e1912130f68d60310e9dcd2f240090/Cargo.toml#L11

Oh I completely missed that, thank you very much! Ill fix it right away


German translation for man_made=embankment

Currently the German translation for embankment is "Fahrdamm", a type of elevated street. But the use of the tag is more like a "Böschung" (one sided descend).
My suggestion is to use "Böschung" as German translation.

Translations are managed using Transifex. See CONTRIBUTING.md#translating


deprecate implicit default for trailing optional arguments

This deprecates the implicit default for trailing optional (Option<...>) arguments.
Motivation
Loosely summarized from #2935,

The current behavior is unexpected from both Rust and Python.
Rust does not have a concept of default values for arguments, so it's surprising that pyo3 just adds one without explicit request
Python does have default values for argument, but they have to be set explicitly.def fun_1(a, b):
    ...
def fun_2(a=None, b=None):
    ...

fun_1() # <- This is errors instead of using `None` as default
fun_2() # <- This is fine

This makes porting Python functions to Rust more surprising that it needs to be, especially if an Option<...> argument is not in trailing position.
Expecting functions without #[pyo3(signature=(...)] to have a trivial signature (without defaults or other modifiers) is more intuitive. To even know about the current behavior, users have to carefully read the docs.
Migration
This PR adds a deprecation warning to Option<...> arguments on functions that do not currently have a
#[pyo3(signature=(...)] attribute and a big warning in the guide. This should push users to explicitly spell out their desired behavior during the migration period. After that we should probably make this a hard error for one release cycle, before we allow Option<...> arguments without #[pyo3(signature=(...)] again, (but without special handling).
Xref: #2935, #3735

~Stacked on top of #4033, so I leave this as a draft for now.~

This gets a big 👍 from me! I do occasionally find the trailing optional arguments a convenient default, but just as often I've had to deliberately disable them. Having the special case also increases cognitive overhead of working out the Python signature.
Anyone got strong feelings that we shouldn't be doing this?

I don't really have a clue why #![allow(deprecated)] makes this trigger as dead_code. Should I just add #[allow(dead_code)] to the generated const? Or is there a better way?

Think it might be unrelated to the #![allow] and just the compiler finding the const isn't ending up in the binary.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=88c10b1e7f4ae498da94f3eae712178d
So I guess just add #[allow(dead_code)]? It is still having the effect of producing an awesome message 🚀

Good idea!


can't update from Atom or APM

Description
Hello, Atom is telling me the there is a new update 0.29.7, I have 0.29.1 and when I try to update from Atom or from APM (sudo apm update atom-beutify) I'm getting the next error
><EMAIL_ADDRESS>postinstall /private/tmp/apm-install-dir-11646-65147-2cvxdh/node_modules/atom-beautify/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall

><EMAIL_ADDRESS>install /private/tmp/apm-install-dir-11646-65147-2cvxdh/node_modules/atom-beautify/node_modules/remark/node_modules/chokidar/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

><EMAIL_ADDRESS>postinstall /private/tmp/apm-install-dir-11646-65147-2cvxdh/node_modules/atom-beautify
> node script/build-options.js

npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">= 4.2.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">= 0.12.x"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained. Upgrade to<EMAIL_ADDRESS>shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

node.js:844
    var cwd = process.cwd();
                      ^
Error: EACCES, permission denied
    at Function.startup.resolveArgv0 (node.js:844:23)
    at startup (node.js:58:13)
    at node.js:935:3
npm WARN optional dep failed, continuing<EMAIL_ADDRESS>npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12.0","iojs":">=1.0.0"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
npm WARN engine<EMAIL_ADDRESS>wanted: {"node":">=0.12"} (current: {"node":"0.10.40","npm":"2.13.3"})
shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
sh: node-pre-gyp: command not found
npm WARN optional dep failed, continuing<EMAIL_ADDRESS>shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied

node.js:844
    var cwd = process.cwd();
                      ^
Error: EACCES, permission denied
    at Function.startup.resolveArgv0 (node.js:844:23)
    at startup (node.js:58:13)
    at node.js:935:3
npm ERR! Darwin 15.0.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/CanKer/.atom/.apm/.apmrc" "--userconfig" "/Users/CanKer/.atom/.apmrc" "install" "/private/tmp/d-11646-65147-ai69lc/package.tgz" "--target=0.36.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR<EMAIL_ADDRESS>postinstall: `node script/build-options.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script 'node script/build-options.js'.
npm ERR! This is most likely a problem with the atom-beautify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node script/build-options.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls atom-beautify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /private/tmp/apm-install-dir-11646-65147-2cvxdh/npm-debug.log

Checklist

[x] I have tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
[x] I have reloaded (or restarted) Atom to ensure it is not a caching issue
[x] Searched for existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
so I know this is not a duplicate issue
[x] Generated debugging information and added link for debug.md Gist to this issue

sudo apm update atom-beautify

Why are you using sudo? I never have to use sudo for apm install or apm update.

maybe because I can't ``àpm installorapm updatewithoutsudo```, maybe some folder permissions...   does it that matters or have something to do with my problem?

Well the error is Error: EACCES, permission denied and I thought that apm installs within the user's personal directories so sudo should not be required, and if it is, then maybe indicates some problems / incorrectly setup file/folder permissions, that are now causing the Error: EACCES, permission denied error. Whenever I had to use sudo with npm install it always indicated an incorrect installation of node.js and npm and that permissions needed to be fixed.
I recommend you first speak with the apm team to confirm: https://github.com/atom/apm/issues
Currently installation is confirmed to work on both Mac (with Travis CI) and Windows (with AppVeyor) with a fresh and correctly setup installation, following the guidelines for Atom packages set by the Atom team: https://github.com/atom/ci
I encourage you to speak with the Atom team directly regarding apm and ensure you are properly set up.

I also see another error:
sh: node-pre-gyp: command not found

and in the logs:

<EMAIL_ADDRESS>install /private/tmp/apm-install-dir-11646-65147-2cvxdh/node_modules/atom-beautify/node_modules/remark/node_modules/chokidar/node_modules/fsevents
node-pre-gyp install --fallback-to-build

So fsevents package ( https://github.com/strongloop/fsevents ) may also be related because it uses node-pre-gyp.
A quick search found https://github.com/mapbox/node-sqlite3/issues/474#issuecomment-120057820
Which reports:

This will happen if you run as root.


Add quotes around perl scripts

Otherwise, it seems nmake doesn't invoke perl properly.
See also the discussion here: https://github.com/eclipse-openj9/openj9/pull/14900#issuecomment-1095904613.

Signed CLA sent via email.

This being my first contribution to the project, I'm not sure what the normal response time should be for pull requests. Could someone please help me understand when I should expect this to be reviewed? Thanks.

Response times vary massively depending on what the change is and who is available to review something at any one time.
In this case I'm hoping @levitte will take a look.

This pull request is ready to merge

Merged to master and 3.0 branches. Thank you for your contribution.


Avoid cycles in VpiListener & in ElaboratorListener

Avoid cycles in VpiListener & in ElaboratorListener

A ref_obj shouldn't point to another ref_obj as its actual_group.
listenDesign_ clears the visited container between iterating allXXX and topXXX. That removes the top level design as well (which was added by listenDesign) causing infinite loops.
This is found in cases where "$root" is used and the corresponding ref_obj::actual_group points to a design.

@hs-apotell please resolve conflicts

Merged with #3736