Issue 521 restart policy

This fix double check for both the:

container MaximumRetryCount
service MaxAttempts

properties to be equal to 5.
Thus, fixing the #521 issue. The fix has been succesfully tested.

Thanks!
I'll have a look as soon as possible

I believe you just removed the original basic functionality :)
Test without a swarm node as well.

I believe you just removed the original basic functionality :) Test without a swarm node as well.

You mean the plain check on Docker containers or rather the one on Docker services, without a swarm node?
Could you better detail which test do you expect to be failing?

The plain check on Docker containers, and the test should fail when the 'on-failure' container restart policy is not set to '5'.

Indeed it works.
I mean, starting from the following Dockerfile
FROM alpine:latest
CMD sh -c "ping localhost"

I built a Docker image on it
docker build . -t work-image:latest

and ran a couples tests with --restart=on-failure:4 set to 4:
docker run -d --name=my-work-test --restart=on-failure:4 work-image:latest
./docker-bench-security.sh -c check_5_14

resulting in the warning below, as  expected
[WARN] 5.14 - Ensure that the 'on-failure' container restart policy is set to '5' (Automated)
[WARN]       * MaximumRetryCount is not set to 5: my-work-test

and with --restart=on-failure:5 set to 5, with no [WARN] here.

The only issue is that in both cases (MaximumRetryCount and MaxAttempts) the container/service parameter is not 5 the warning message is alway the same as above. Although this is a minor issue, would you like to diversify them?

So sorry, I've must have misread the code.
Works great with and without swarm mode.

The only issue is that in both cases (MaximumRetryCount and MaxAttempts) the container/service parameter is not 5 the warning message is alway the same as above. Although this is a minor issue, would you like to diversify them?

No need to diversify unless you want to, I believe the message is understandable


Bump fabric, fabric-ca, fabric-lib-go

Update to the latest fabric (v2.5.9), fabric-ca, and fabric-lib-go. These versions all depend on the same version of github.com/IBM/idemix and resolves issues related to breaking changes in github.com/IBM/idemix.

Replaced by https://github.com/hyperledger-labs/fabric-operator/pull/200


chore(deploy.sh): Stop producing v2-beta images for each PR merge

Instead we should produce a canary image. This allows us to cut stable release images while providing an image that tracks HEAD. This image should also be in the deis org.

I think we agree, in that "canary" images are testing images and should go in deisci/. They are not supported nor intended for customers to use. Only released, supported tags go into deis/.
More specifically, there is no quay.io/deis/workflow:v2-beta image to download, so that change will not work.

No canary is the image that represents the current state of the repo. It is a point in time image that allows us to easily check the state of our system before we cut a new release (v2-beta, alpha, or whatever). You would more than likely load up a deis install using all canary images and verify everything works.
So while we could call it a testing image. It is definitely not a CI image. If thats the case then why not tag each CI run and just not worry about canary.

I agree with @jchauncey's POV on this.  The CI process may produce the canary images, and we may, in fact use them for testing, but the canary image of each component is definitely it's own thing (current state) and, in theory (though we may not be there yet), canary image of each component is a release candidate and is merely a tag away from becoming an official semver'ed release.


SGV and Incunabula ARK URLs not working

If I remember correctly, the Incunabula ARK URLs generated by the old SALSAH can’t work with Knora, because the old SALSAH uses project shortcode 0801 for Incunabula, but in Knora, 0801 is BEOL. Is that the problem here?

I don't think so. The ARK resolver says that these URLs are invalid:
Incunabula Narrenschiff (lat.): https://ark.dasch.swiss/ark:/72163/0803-3b7598ebb7b-9.201986
SGV Image SGV_04P_03518.TIF: http://ark.dasch.swiss/ark:/72163/0812-1388a5fb712a4-d.201986

I can’t check now, but I think the timestamp is invalid. The PHP code has a bug causing it to omit leading zeros before the month and day. Try it with this timestamp: 20190806

incunabula: https://ark.dasch.swiss/ark:/72163/0803-3b7598ebb7b-9.20190806
SGV: http://ark.dasch.swiss/ark:/72163/0812-1388a5fb712a4-d.20190806

The project shortcode for SGV is actually 080C in hexadecimal but the ARK URL provides it as a decimal value of 8012, which is correct.

Great, the AllowVersion0: true config setting solved it. Now the two links work.

but the ARK URL provides it as a decimal value of 0812, which is correct.
I didn't know that the PHP ARK URLs used decimal instead of hexadecimal for project shortcodes. Is this really necessary? I think it's going to cause confusion. It would be better if the PHP code used hexadecimal, too.

I don't think that Lukas is going to touch the old Salsah code.  Probably easier to assume that version 0 ARK URLs have the project shortcode as a decimal value and then to transform it, if necessary.

Probably easier to assume that version 0 ARK URLs have the project shortcode as a decimal value and then to transform it, if necessary.

OK, I'll do that.

great, thanks :-)
A gift that doesn't stop giving ;-)

The project shortcode for SGV is actually 080C in hexadecimal but the ARK URL provides it as a decimal value of 0812, which is correct.

Decimal 0812 converted to hexadecimal is 032C, not 080C.
Hexadecimal 080C converted to decimal is 2060, not 0812.
I don't understand what the PHP code is doing. @lrosenth, can you please explain?

If it's converting one byte at a time, then would hex FFFF be converted to decimal as 255255?

Answer: the PHP SALSAH ARK URLs only contain project codes starting with 08.

Here is a SALSAH ARK URL in which the project ID is entirely in hexadecimal:
https://data.dasch.swiss/resources/2126045
It looks like this is inconsistent in the database: some are in decimal, and others are in hexadecimal.

It turns out that they're all in hexadecimal, and it's the DaSCH ARK resolver data that needs to be corrected.

The original issue was fixed by changing the config. For further questions and bugs, please open separate issues.


Level 3 lognum test case error

Summary
I'm able to get the required output if I simply enter
Logger.<String>of("hello').flatMap(g)
but just can't seem to get it to work when I assign it to
Logger<Number> lognum = Logger.<String>of("hello').flatMap(g)
Not very sure what seems to be causing this issue, hope someone can help with this!
Code Snippets
The error that keeps popping up:
jshell> Logger<Integer> lognum = Logger.<String>of("hello").flatMap(g)
|  Error:
|  incompatible types: no instance(s) of type variable(s) U exist so that Logger<? extends U> conforms to Logger<java.lang.Number>
|  Logger<Integer> lognum = Logger.<String>of("hello").flatMap(g);
|                           ^-----------------------------------^

I think the error comes from Logger<?> cannot conform to Logger<java.lang.Integer>. I used Logger<? extends Object> for flatmap when I face similar issue. Hope it helps you.

Oh I think I typed the wrong error in the comment, it's instead
| Error:
| incompatible types: no instance(s) of type variable(s) U exist so that ``Logger<? extends U> conforms to Logger<java.lang.Number>
| Logger<Integer> lognum = Logger.<String>of("hello").flatMap(g);
| ^-----------------------------------^
I used Logger instead of Logger and it caused the above error. @brandonrhan I tried what you suggested but the error is now
| incompatible types: no instance(s) of type variable(s) U exist so that ``Logger<? extends java.lang.Object> conforms to Logger<java.lang.Number>

Oh I think I typed the wrong error in the comment, it's instead
| Error: | incompatible types: no instance(s) of type variable(s) U exist so thatLogger<? extends U> conforms to Logger<java.lang.Number> `| Logger<Integer> lognum = Logger.<String>of("hello").flatMap(g);` `| ^-----------------------------------^` I used Logger instead of Logger and it caused the above error. @brandonrhan I tried what you suggested but the error is now | incompatible types: no instance(s) of type variable(s) U exist so that Logger<? extends java.lang.Object> conforms to Logger<java.lang.Number>
Then change Logger<? extends U> to Logger should works

I managed to change my code such that flatMap returns a Logger instead of a Logger<? extends U>. I think I was not able to change it to Logger without specifying the type, but anyways thanks for the help @brandonrhan !

DId the same as Mr JX, no idea why but works. Any reason for that @thojianxiong ?

i will suggest you just use Logger<? extend Object>, then try to use supplier, then assign the supplier based on the value of get
Logger<? extends U> log = mapper.apply(this.sup.get());
Supplier sup = () -> log.sup.get();


Poe overlay suddenly stopped working for me

🐞 bug report
Describe the bug

 When I launch Poe Overlay it successfully loads and closes but then no overlay pops up in game. It was working yesterday when I first downloaded it but earlier this morning when I woke up it stopped working for some reason. Does anyone know how to solve this? I have the latest version as I downloaded it just yesterday and I'm playing in fullscreen windowed mode. I've tried reinstalling multiple times but the problem persists :/ Thanks all

I'm in the same boat. Since the most recent patch, nothing shows up for me. When there is an incoming trade, the sound is present (meaning overlay is working in the background), however no part of the UI is visible anywhere.


Update nodejs-http-client dep to v2.3.0

Hi @matankb,
Please update this section and please sign our CLA so we can merge this.


SourceMapDevToolPlugin not working

Hi,
I am trying to use the SourceMapDevToolPlugin because I do not want to generate source maps for third party libs (vendor). However it does not work. I am using webpack 1.12.2.
I have removed the devtool: and replaced it with this:
plugins: [
            new webpack.optimize.AggressiveMergingPlugin(),
            new webpack.optimize.DedupePlugin(),
            new webpack.optimize.OccurenceOrderPlugin(),
            new webpack.SourceMapDevToolPlugin({
                filename: '[name].js.map',
                include: ['app.js', 'components.js'],
                exclude: ['vendors.js', 'testVendor.js']
            })
        ];

What am I doing wrong here?
Thanks.

filename: '[name].js.map' -> filename: '[file].map',

      filename: 'sourcemaps/[file].map',
      exclude: ['vendors.js'],
    }),```

how to resolve it? i am getting sourcemaps for vendors.js file


deprecate R.allUniq

See #1622

:cow2:

Are you on board, @CrossEye?

Yes, I meant to respond in the other thread.  :herb:


issue

Analyzer Feedback from IntelliJ
Version information

IDEA AI-191.8<IP_ADDRESS>91312
2.9.0-8.2.beta
AI-191.8<IP_ADDRESS>91312, JRE 1.8.0_202-release-1483-b03x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1366x768

Exception
Dart analysis server, SDK version 2.9.0-8.2.beta, server version 1.27.4, FATAL error:

For additional log information, please append the contents of
file://C:\Users\seaso\AppData\Local\Temp\report.txt.

@snmn Could you provide us with more information, e.g. what is in the mentioned error log?


The tags are missing in the Iproov connection

Describe the issue:
The tags are missing in the Iproov connection, from this unable to filter the connection from tags as well

How to reproduce:

Configure the Iproov connector according to the documentation: https://github.com/wso2-extensions/identity-outbound-auth-iproov/blob/main/docs/config.md
Login to the console
Go to the connections section
Create a IProov connection

Expected behavior:
Tags need to be display.


Bugfix zone migrate

Codecov Report

Merging #643 (e2b36fb) into master (fb77f76) will not change coverage.
The diff coverage is 0.00%.

:exclamation: Current head e2b36fb differs from pull request most recent head fd16cd3. Consider uploading reports for the commit fd16cd3 to get more accurate results

@@           Coverage Diff           @@
##           master     #643   +/-   ##
=======================================
  Coverage   41.87%   41.87%
=======================================
  Files         331      331
  Lines       23821    23821
=======================================
  Hits         9975     9975
  Misses      13846    13846

Flag
Coverage Δ

unittests
41.87% <0.00%> (ø)

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

Impacted Files
Coverage Δ

dbaas/workflow/steps/util/host_provider.py
56.44% <0.00%> (ø)

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 fb77f76...fd16cd3. Read the comment docs.


decoupled response formatting from getBody() call

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Fixed issues

As yii-web emitter silently calls getBody() before fetching headers, headers are fine in that case.
Tried this package with another emitter and found that content-type header wasn't set. Also in some tests it's not obvious why ->getBody()->rewind() is called, and they are OK without this call.

@romkatsu makes sense. We'll discuss that tomorrow.

Decided to solve it another way: https://github.com/yiisoft/data-response/issues/35


add onError callback that rejects the promise of the rendering

Motivation / Description
Changes introduced
Linear ticket (if any)
Additional comments

          1 Error

:no_entry_sign:
Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.

Label
Description

pr:feat
A new feature. Use along with pr:breaking to force a major release.

pr:fix
A bug fix. Use along with pr:force_minor to force a minor release.

pr:other
Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.

pr:RevenueCatUI
Use along any other tag to mark a PR that only contains RevenueCatUI changes

pr:next_release
Preparing a new release

pr:dependencies
Updating a dependency

pr:phc_dependencies
Updating purchases-hybrid-common dependency

  Generated by :no_entry_sign: Danger


Jupyter Notebook: OSError - Cannot load library

Hi! So I've been having this issue where I can't run this set of code on Jupyter Notebook:
"c = bnn.PynqBNN(network=bnn.NETWORK_LFC)
c.load_parameters("fashion-mnist-lfc")
print(c.classes)"
I currently have both the PYNQ Z1 and Z2 in my possession, but I got this error while trying to run that code using the Z1.
I also have the PYNQ Z1 image ver 2.4
The wi-fi I'm connected to doesn't have any proxy either.
I'm not sure what the cause of this error is, but does it have to do with how the commands
"sudo pip3 install git+https://github.com/maltanar/BNN-PYNQ.git",
"sudo pip3 install --upgrade git+https://github.com/maltanar/BNN-PYNQ.git",
"sudo -H pip3 install --upgrade git+https://github.com/maltanar/BNN-PYNQ.git", and
"sudo pip3 install<EMAIL_ADDRESS>all gave me the same error code 128?
Since all of those pip3 install commands failed, I downloaded the .zip file from github.com/maltanar/BNN-PYNQ, extracted it, and used Samba to copy it and store it into the PYNQ directories.

I'm really sorry for this long post, but I've looked into nearly all of the possible errors and solutions out there. Sadly, none of them has worked so far.

The output I should be getting for
"import bnn
root_dir = bnn.bnn.BNN_ROOT_DIR
param_dir = bnn.bnn.BNN_PARAM_DIR
print(root_dir)
print(param_dir)"   in Jupyter Notebook is
/usr/local/lib/python3.6/dist-packages/bnn
/usr/local/lib/python3.6/dist-packages/bnn/params
The command "sudo pip3 install git+https://github.com/maltanar/BNN-PYNQ.git" and "sudo pip3 install git+https://github.com/Xilinx/BNN-PYNQ.git" did not work for me in the beginning.

I think because of those 2 commands failing, the directory "bnn" does not exist in my /usr/local/lib/python3.6/dist-packages. Therefore, I think this issue led up to the OS Error above ^.

When you install this repository, do the other examples work? I mean MNIST and Cifar10.

Hello,
How did you resolve this error?
I am getting the same error.
Any help will be appreciated.
Thank you


/v2/modules?limit=100&page=12's response returns 404 Not Found.

When I request to  https://apiland.deno.dev/v2/modules?limit=100&page=11 it says next page is /v2/modules?limit=100&page=12 but https://apiland.deno.dev/v2/modules?limit=100&page=12 returns 404 Not Found.
How can I get a list of all module names?

Hm, i will investigate.
as a workaround for that, you should use the old API server for now: https://api.deno.land/modules

That workaround works for me. thank you for your reply!

The problem is that datastore returns a batch with moreResults set to NOT_FINISHED; this needs to be handled

https://api.deno.land/modules now seems to return {"message":"Not Found"}.
Sorry to ask again, but what if I want to get a list of all modules?
For reference, we are trying to analyze Deno's module dependencies.


bytes 1.0 support

bytes 1.0 came out back in December. It would be great to have support for it, such that this crate can be used with the latest versions of a number of crates.

See discussion in #107 and #115, with 0.3.8 the stream feature is deprecated and migration options that support all versions of bytes are documented on https://docs.rs/async-compression/0.3.8/async_compression/stream/index.html


ast-grep still overwrites sg command by default

⭐ Suggestion
after installing ast-grep using pipx, cargo or npm, the core linux command sg is overwritten. (I've tried all these package managers).
I can see that there's a warning about this in the installation page. I can also see that there have been numerous issues opened, the one you link to being #56.
your solution so far seems to have been adding the ast-grep alternative alias, although this seems pointless if sg is still changed to point to your binary. renaming core utilities is dangerous & should not be a default behavior.
having a shortened but still descriptive alias like astg, suggested here or even better letting the user choose an alias
while you could maybe make it safer by sniffing the OS during installation & choosing not to overwrite if it's in use, this is again just adding complexity that isn't needed.
In the end, it seems like a choice you've made early on to keep this alias but I hope enough people have complained to make it clear the sane thing to do is simply remove sg as an alias.
💻 Use Cases
As a time poor dev, who just wants to quickly experiment with a neat looking tool, things like this that introduce some risk with no instantly obvious solution increases the barrier to entry.

Hi @m1ntySkye,
Thank you for trying out ast-grep and for submitting this issue.
As a kind suggestion, it may be helpful to tweak your path settings based on how you installed the command. You can move the npm/cargo/pip directory after the system path to avoid conflicts. Moving non-system
The shadow-utils command is lesser known, at least to the author, and it seems this issue has not been reported since the documentation update.
We respect our users and understand that while the impact on Linux commands issue received minimal reports from linux community and existing complaints are idealogical, removing the command name could lead to undesirable user churn on other OS. If we receive enough feedback from Linux users, we will consider deprecating the command. You are more than welcome to recommend ast-grep to your Linux friends and coworkers, and drop more feedback to us. We lack Linux users and your input is invaluable.
As a hobby project, the ast-grep maintainer has limited time to dedicate to this tool. And the project does not have much resource.  Please help us by providing more information in the original issue. https://github.com/ast-grep/ast-grep/issues/56

What device are you installing ast-grep?: Personal device, Server, User's computer as a dependency
How are you using sg the shadow-utils?
How sg the ast-grep command impact you?: Break your workflow/server script? ast-grep is overridden by shadow-utils? Or because it is a bad practice?
__
Thank you for your understanding and support.

Closing in favor of the original issue


[Bug] Issue about custom icons

I'm using the custom icons feature. when I put an icon collection file such as foo.json into the icons folder, It includes an icon bar: {body: 'xxx'}.
After that, When I use some APIs such as /collections?prefix=foo､ /collection?prefix=foo､ /foo.json?icons=bar, etc. They work fine.
But I deleted foo.json, and updated via the /update API. But It seems not updated. I can also receive the same responses via the APIs above. except /collections?prefix=foo, that's because it response is the icon info.
Expection
I hope it will return nothing after deleting the file.

I did some testing, everything works correctly.
Maybe you have cached data in browser or did not wait for update to complete?


MAP(someModel.PROP) will put invalid or null values to the sink

If not every object in the source DAO has a value, MAP will still by default attempt to put all values to the sink, including ones mapped to null or non-objects.

Fixed in c2d3ba92b63e836d778a71ac4d4e68bec1594d60

After discussion, changing back to a separate filter mlang, NOT_NULL. Sinks are allowed to accept nulls, even if DAOs are not expected to.

Removing NOT_NULL, should be more of an IS_OBJECT, but leaving that out of core for now.


Using a custom adapter breaks testing dialogs (broken since v4.8.0, works with 4.6.2)

We have developed a custom bot worker, which acts as a wrapper to get some information easily from within our conversations. For example, getUser(), getIncomingMessageEntity() which are specific to our solution. This bot worker is set by our custom adapter (a modified version of the Web Adapter from botkit) using the botkit_worker property.
We test our dialogs using the BotkitTestClient, of course. In those tests, we use a fake adapter and worker in order to be able to test dialogs that call the botWorker.getUser() method for example.
All was well and good up until botkit v4.6.2. Since v4.8.0, it does not work anymore.
This jest unit test works on botkit v4.6.2, but not on 4.8.0 or 4.9.0:
import {
    Botkit, BotkitConversation, BotkitTestClient, BotWorker,
} from "botkit";
import { BotkitBotFrameworkAdapter } from "botkit/lib/adapter";

class FakeBotWorker extends BotWorker {
    public getUser(): { id: number; name: string } {
        return {
            id: 123,
            name: "Roger",
        };
    }
}

class FakeAdapter extends BotkitBotFrameworkAdapter {
    // Enables overriding the type of the BotWorker
    // (this uses a Botkit features that allows setting a worker type)
    public botkit_worker = FakeBotWorker;
}

function createDialog(controller: Botkit): BotkitConversation {
    const dialog = new BotkitConversation("try_custom_worker", controller);

    dialog.ask("How you like me now?", async (response, convo, bot: FakeBotWorker) => {
        const botUser = bot.getUser();
        return bot.say(`You are: ${botUser.name}`);
    }, "question");

    return dialog;
}

describe("Test something with custom worker", () => {
    let botkit;
    let client;
    let testAdapter;

    afterAll(() => {
        botkit.shutdown();
    });

    it("bot can access user identity through custom bot worker", async () => {
        testAdapter = new FakeAdapter({});
        botkit = new Botkit({
            adapter: testAdapter,
        });
        botkit.addDialog(createDialog(botkit));
        client = new BotkitTestClient("test", botkit, ["try_custom_worker"]);

        // Test the dialog through the client
        let message = await client.sendActivity("");
        expect(message.text).toBe("How you like me now?");
        message = await client.sendActivity("nice!");
        expect(message.text).toBe("You are: Roger");
    });
});

What was the result you received?
When running this test against botkit v4.9.0, I get TypeError: bot.getUser is not a function

What did you expect?
It should work on Botkit latest version as it does in 4.6.2.
Investigation
In v4.6.2, botkit was using the adapter set in the controller instance in the Botkit.spawn() method (this.adapter). With v4.9.0, the testAdapter is in config.context.adapter, so it resolves to the testAdapter one instead.
Context:

Botkit version: 4.8.0 and 4.9.0
Messaging Platform: Unit Tests
Node version: v12.14.0
Os: MacOS

I was able to create a new TestClient by copying the one from Botkit completely and changing the instantiated type to my custom adapter in it. This was, the test works again.
This seems like a good solution, but I don't know if it's the correct way to fix it. I would like @benbrown opinion on that.
Sorry for the code quality here; it's a very rough proof of concept.
/* eslint-disable */
import {
    Botkit, BotkitConversation, BotWorker,
} from "botkit";
import {
    Activity,
    AutoSaveStateMiddleware,
    ConversationState,
    MemoryStorage,
    Middleware,
    TestAdapter,
    TurnContext,
} from "botbuilder-core";
import { Dialog, DialogSet, DialogTurnResult, DialogTurnStatus } from 'botbuilder-dialogs';

class FakeBotWorker extends BotWorker {
    public getUser(): { id: number; name: string } {
        return {
            id: 123,
            name: "Roger",
        };
    }
}

// Copy pasta from botkit testClient.ts, with the type of the adapter changed to mine.
class MyTestClient {
    private readonly _callback: (turnContext: TurnContext) => Promise<void>;

    private readonly _testAdapter: TestAdapter;

    public dialogTurnResult: DialogTurnResult;

    public conversationState: ConversationState;

    // eslint-disable-next-line max-len
    public constructor(channelOrAdapter: string | TestAdapter, bot: Botkit, dialogToTest: string | string[], initialDialogOptions?: any, middlewares?: Middleware[], conversationState?: ConversationState) {
        this.conversationState = conversationState || new ConversationState(new MemoryStorage());

        const dialogState = this.conversationState.createProperty("DialogState");

        let targetDialogs = [];
        if (Array.isArray(dialogToTest)) {
            dialogToTest.forEach((dialogName) => {
                targetDialogs.push(
                    bot.dialogSet.find(dialogName),
                );
                targetDialogs.push(
                    bot.dialogSet.find(`${dialogName}_default_prompt`),
                );
                targetDialogs.push(
                    bot.dialogSet.find(`${dialogName}:botkit-wrapper`),
                );
            });
            dialogToTest = dialogToTest[0];
        } else {
            targetDialogs = [
                bot.dialogSet.find(dialogToTest),
                bot.dialogSet.find(`${dialogToTest}_default_prompt`),
                bot.dialogSet.find(`${dialogToTest}:botkit-wrapper`),
            ];
        }

        this._callback = this.getDefaultCallback(targetDialogs, initialDialogOptions || null, dialogState);

        if (typeof channelOrAdapter === "string") {
            this._testAdapter = new FakeAdapter(this._callback, { channelId: channelOrAdapter }).use(new AutoSaveStateMiddleware(this.conversationState));
        } else {
            this._testAdapter = channelOrAdapter;
        }

        this.addUserMiddlewares(middlewares);
    }

    /**
     * Send an activity into the dialog.
     * @returns a TestFlow that can be used to assert replies etc
     * @param activity an activity potentially with text
     *
     * ```javascript
     * DialogTest.send('hello').assertReply('hello yourself').then(done);
     * ```
     */
    public async sendActivity(activity: Partial<Activity> | string): Promise<any> {
        await this._testAdapter.receiveActivity(activity);
        return this._testAdapter.activityBuffer.shift();
    }

    /**
     * Get the next reply waiting to be delivered (if one exists)
     */
    public getNextReply(): Partial<Activity> {
        return this._testAdapter.activityBuffer.shift();
    }

    private getDefaultCallback(targetDialogs: Dialog[], initialDialogOptions: any, dialogState: any): (turnContext) => Promise<void> {
        return async (turnContext): Promise<void> => {
            const dialogSet = new DialogSet(dialogState);
            targetDialogs.forEach((targetDialog) => dialogSet.add(targetDialog));

            const dialogContext = await dialogSet.createContext(turnContext);
            this.dialogTurnResult = await dialogContext.continueDialog();
            if (this.dialogTurnResult.status === DialogTurnStatus.empty) {
                this.dialogTurnResult = await dialogContext.beginDialog(targetDialogs[0].id, initialDialogOptions);
            }
        };
    }

    private addUserMiddlewares(middlewares: Middleware[]): void {
        if (middlewares != null) {
            middlewares.forEach((middleware) => {
                this._testAdapter.use(middleware);
            });
        }
    }
}

class FakeAdapter extends TestAdapter {
    // Enables overriding the type of the BotWorker
    // (this uses a Botkit features that allows setting a worker type)
    public botkit_worker = FakeBotWorker;
}

function createDialog(controller: Botkit): BotkitConversation {
    const dialog = new BotkitConversation("try_custom_worker", controller);

    dialog.ask("How you like me now?", async (response, convo, bot: FakeBotWorker) => {
        const botUser = bot.getUser();
        return bot.say(`You are: ${botUser.name}`);
    }, "question");

    return dialog;
}

describe("Test something with custom worker", () => {
    let botkit;
    let client;
    let testAdapter;

    afterAll(() => {
        botkit.shutdown();
    });

    it("bot can access user identity through custom bot worker", async () => {
        // eslint-disable-next-line @typescript-eslint/no-empty-function
        //testAdapter = new FakeAdapter(async () => {});
        botkit = new Botkit({
            adapter: testAdapter,
        });
        botkit.addDialog(createDialog(botkit));
        client = new MyTestClient("test", botkit, ["try_custom_worker"]);

        // Test the dialog through the client
        let message = await client.sendActivity("");
        expect(message.text).toBe("How you like me now?");
        message = await client.sendActivity("nice!");
        expect(message.text).toBe("You are: Roger");
    });
});

Still revelant.

@etiennellipse I was able to achieve this with a slightly simpler approach -- derive a subclass of the BotkitTestClient, and override the _testAdapter member with your customized FakeAdapter (now derived from TestAdapter). See below:
class FakeAdapter extends TestAdapter {
  // Enables overriding the type of the BotWorker
  // (this uses a Botkit features that allows setting a worker type)
  botkit_worker = FakeBotWorker;
}

class CustomTestClient extends BotkitTestClient {
  constructor(channelId, bot, dialogToTest) {
    super(channelId, bot, dialogToTest);
    this._testAdapter = new FakeAdapter(this._callback, { channelId: channelId }).use(new AutoSaveStateMiddleware(this.conversationState));
  }
}

Then, use this instead of the BotkitTestClient.

I am including your new test and this example in 4.10!

@benbrown Cool, thanks! I'll give it a try very soon.

A new test based on this is included in 4.10.  @etiennellipse let me know if anything remains to be done, otherwise let's close this! :)

@benbrown The solution you offer works! Thanks.
There are a few quirks to iron out for TypeScript compatibility. Since the _testAdapter and _callback properties are private readonly, they cannot be accessed/changed from outside the BotkitTestClient class itself. My suggestion is to loosen the constraints on those properties, putting them only protected. I will submit a PR immediately for this.

Thanks @etiennellipse! I will include that PR in an upcoming release!


Add info about particle-related errors

There are other error messages too, could you make it more general about all particle errors?

done!

Thanks for your contribution to mastercomfig!


regularisation

add regularisation to avoid large velocity overestimation when smax is large

must introduce a workaround for where the img.std == 0, e.g., in areas blanked out by the rectification.


Fix exception when generating the subtitles for an audio with no speech

When generating the subtitles for an audio with no speech, an exception is thrown because the code assumes that there will be always a segment at index 0 which is not the case.
  File "/lib/python3.11/site-packages/whisper/transcribe.py", line 453, in cli
    writer(result, audio_path, writer_args)
  File "/lib/python3.11/site-packages/whisper/utils.py", line 255, in write_all
    writer(result, file, options)
  File "/lib/python3.11/site-packages/whisper/utils.py", line 85, in __call__
    self.write_result(result, file=f, options=options)
  File "/lib/python3.11/site-packages/whisper/utils.py", line 195, in write_result
    for start, end, text in self.iterate_result(result, options):
  File "/lib/python3.11/site-packages/whisper/utils.py", line 148, in iterate_result
    if "words" in result["segments"][0]:
                  ~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

this change should be approved it fixes crashes on srt and vtt outputs when no speech identified in audio. Tested with last release and python 3.9. Will works with all python versions


feat(container): update ghcr.io/sergelogvinov/postgresql (15.8 → 16.5)

Update Request | Renovate Bot
This PR contains the following updates:

Package
Update
Change

ghcr.io/sergelogvinov/postgresql
major
15.8 -> 16.5

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

⚠ Artifact update problem
Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:
File name: undefined
Post-upgrade command './hack/bump-chart-version.sh '{{{parentDir}}}' '{{{isMajor}}}' '{{{isMinor}}}' '{{{isPatch}}}'' has not been added to the allowed list in allowedPostUpgradeCommands

File name: undefined
Post-upgrade command 'make docs-{{{parentDir}}}' has not been added to the allowed list in allowedPostUpgradeCommands


Initial Attivo Dashboard

Fixes #
Proposed Changes

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: rosenbet sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Electron apps look pixelated at 200% resolution

Environment
Windows build number: 10.0.21343.1000 (Dev Channel)
Your Distribution version: Ubuntu 20.04
Your WSLg version: 0.2.14

Steps to reproduce

Set display to 200% resolution. Repo via Windows VM and macOS Remote Desktop client (Optimize for Retina display).
Install Node.js 15.x in WLS
git clone https://github.com/electron/simple-samples
cd simple-samples/activity-monitor
npm install
npx electron .

WSL logs: @craigloewen-msft
Expected behavior
App renders in high resolution:

Actual behavior
App renders pixelated with different chrome:

Also confirmed in Windows 21364 and WSL distro is Ubuntu Community Preview. My display is 3840*2160 with 250% scaling.
It looks pixelated on almost every application.

I'm in a Surface Pro 6 with Ubuntu 20.04. Testing a bit with this, gedit works perfectly. Emacs, however, look pixelated.
What is it about gedit that makes it work?

@baracunatana gedit uses wayland while Emacs probably uses XWayland. You can try both with:
GDK_BACKEND=x11 gedit
GDK_BACKEND=wayland gedit

Launching Google chrome with --enable-features=UseOzonePlatform --ozone-platform=wayland flag to force it to use Wayland will give a non-pixelated window, but it freezes after trying to resize the window.
Launching VSCode with the same flag would also give a cleaner look, but no windows border is shown, thus there is no way to scale or maximize the window.

@leoleoasd Resizing gpu accelerated windows in wayland should be fixed with latest mesa in latest WSL from the store. What's your output for wsl.exe --status and glxinfo -B ?

C:\Users\Leo>wsl --status
Default Distribution: Distrod
Default Version: 2

Windows Subsystem for Linux was last updated on 2/13/2022
The Windows Subsystem for Linux kernel can be manually updated with 'wsl --update', but automatic updates cannot occur due to your system settings.
To receive automatic kernel updates, please enable the Windows Update setting: 'Receive updates for other Microsoft products when you update Windows'.
For more information please visit https://aka.ms/wsl2kernel.

Kernel version: <IP_ADDRESS>

(base) [leo@Leo-PC Leo]$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Microsoft Corporation (0xffffffff)
    Device: D3D12 (NVIDIA GeForce RTX 3090) (0xffffffff)
    Version: 21.3.5
    Accelerated: yes
    Video memory: 57070MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 3.3
    Max compat profile version: 3.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.0
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 3090)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 21.3.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.3.5
OpenGL shading language version string: 1.40
OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 21.3.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

Changed update settings,
(base) [leo@Leo-PC Leo]$ wsl.exe --update
Checking for updates...
No updates are available.
Kernel version: <IP_ADDRESS>

@leoleoasd Your Mesa is new enough but you are not running latest WSL version from the store.
Also you can try disabling gpu in Chrome with the argument --disable-gpu. If it still freezes your issue could be same as https://github.com/microsoft/wslg/issues/643.

@onomatopellan
C:\Users\Leo>wsl --status
默认分发: Distrod
默认版本: 2
WSL version： <IP_ADDRESS>
kernel version： <IP_ADDRESS>
WSLg version： 1.0.30
Windows version： 10.0.22000.493

Tried open chrome with wayland and --disable-gpu. It still freezes after resizing.

Any progress?

Is there still any interest in fixing this?

In the current preview version of WSL, the option WESTON_RDP_DISABLE_HI_DPI_SCALING=false is no longer working. This makes the issue even worse as one can no longer configure the scaling within each program separately.

any update ??

I have similar issues with PyMol and RStudio. I obviously have installed WSL2. But I also installed Windows Subsystem for Linux Preview and my problem was magically solved!

Waiting for an update......

I have the same problem running IntelliJ IDEA (which is not an Electron app) with WSLg.
I don't have this problem using VcXsrv which I set up following this guide.

New laptop, first time with Windows 11.  I'm on a 16" with a 3k display and usually run it at 150 to 175%.  The Linux GUI apps are pretty difficult to use without scaling but when it's enabled it looks awful.  I've just tried "gik", "git gui", and "hexchat".
I've used all 4 combinations of true and false for the two options below.
[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING=true
;100 to 500
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=175

Happy that the stuff "just works", now it needs to just work better ;-)

any update?

I just find out a workaround. In your Windows setting, use Custom scaling, to a nearby number instead. For example, if you are using "200%" scale, try set the Custom scaling to "199%". Be aware that this setting might make display not perfect for Windows sometimes. Then in your WSL machine, set GDK_DPI_SCALE to a reaonable number, e.g. 2 for the example above. Then, you can enjoy a high-resolution linux app.

I just find out a workaround. In your Windows setting, use Custom scaling, to a nearby number instead. For example, if you are using "200%" scale, try set the Custom scaling to "199%". Be aware that this setting might make display not perfect for Windows sometimes. Then in your WSL machine, set GDK_DPI_SCALE to a reaonable number, e.g. 2 for the example above. Then, you can enjoy a high-resolution linux app.

But the mouse and the title has become very small, I would like to ask the next what is the solution @ytliu74

I just find out a workaround. In your Windows setting, use Custom scaling, to a nearby number instead. For example, if you are using "200%" scale, try set the Custom scaling to "199%". Be aware that this setting might make display not perfect for Windows sometimes. Then in your WSL machine, set GDK_DPI_SCALE to a reaonable number, e.g. 2 for the example above. Then, you can enjoy a high-resolution linux app.

But the mouse and the title has become very small, I would like to ask the next what is the solution @ytliu74

Yeah, the same thing happens for me too. But at least other stuff look clear. I just found out this workaround for me, and have no idea why this works... So for this little imperfection, I just live with it.

Unfortunately neither any options in wslconfig nor custom scaling settings change anything

I'm getting the same issue. I installed Chrome, Edge, Firefox & VLC and all of them look pixelated.
I'm running running Windows 10 with WSL2 on a 32 inch 4k monitor with 200% scaling. Updated wsl using wsl --update
For Chrome I've tested, as @leoleoasd has mentioned, running it with --enable-features=UseOzonePlatform --ozone-platform=wayland fixes the blurring issue, but this feels more like a hack.
Commenting to keep the interest alive in hopes that this would eventually get fixed.


Move autodiscover to external library

Just as a PoC, I decided to see how much of a problem it would be to move the autodiscover package to its own external library.
I had to move the clientsholder and configuration packages as well.  The thinking is that autodiscover needs access to the clients and the configuration but we can also consume those via the autodiscover library.

I wouldn't move the autodiscovery module to an external library at the moment unless we know that there are several projects interested in using it. Otherwise it just adds extra work in order to have this module in sync with the CNF Certification.

Yup agreed.  Just wanted to you to take a look before closing @greyerof.  Thanks!


Fix missing handoff call

Forget to call hand off ¯\_(ツ)_/¯

Codecov Report

Merging #113 into development will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           development     #113   +/-   ##
============================================
  Coverage        70.36%   70.36%
============================================
  Files               33       33
  Lines             1522     1522
============================================
  Hits              1071     1071
  Misses             451      451

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 d034943...6c7a7d8. Read the comment docs.


stl_underlineColor attribute overlaps indicator

Hi, when I don't specify a color for the stl_underlineColor attribute the indicator looks fine:

But when I specify a color for the stl_underlineColor attribute the indicator is overlapped.

A workaround it is increase the value dp for  the attribute stl_indicatorThickness

But, is this the expected behaviour?

Hi, @VictorAlbertos
Please use stl_indicatorInFront="true"
By default, the underline is the front

Thanks!


Derotate

Cleaned up the implementation of HDATA/levelled/derotation queries in the derotate function.

:+1:


Subjects creation needs to be confirmed

Currently subjects creation returns confirmation_status: PENDING
A subject can only be confirmed if the imported subject's organisation also has this organisations subject imported.

f


Support auto_increment in table options

Note that this is still order dependent and will fail
if the options are ordered differently from what the parser
expects.

This looks good to me :+1:
I guess we'll want to capture the value in the future and return it inside the CreateTableStatement (same with other table properties specified). The current parsers throw them away because I had to get things working in a research setting where things such as the collation didn't matter.
BTW: nom's permutation! should help accept properties in any order.


Potential memory leak

Hey folks!
I'm running an episodic version of JBW in Python for some experiments. Basically, we create a Simulator object from api/python/src/jbw/simulator.py, run it for N frames, then delete it and create a new Simulator. When I do this, I see memory increase by ~12MiB for each call to simulator_c.new. I'm wondering if something isn't being free'd properly in simulator_c.delete.
I have two questions:

Have you run into this before? Do you have any idea what could be causing this?
Is there a better way to run this episodic experiment?

Thanks for the report! I'll look into this and see if I can find the memory leak.
I think your current workflow is fine for episodic experiments. JBW was designed specifically for the never-ending/continual setting so we didn't do much testing for episodic use-cases.

That makes sense. This would be difficult to find in the continual setting, as as it's only 12MiB.

I just pushed a commit that fixes one memory leak. It was a subtle bug where we were creating a cyclic reference where C++ would reference the callback functions in the Simulator object, and the callbacks and Simulator object reference each other. So the Simulator object would never be garbage collected, even if there were no references to it from Python.
You might need to force garbage collection after each episode if you want to make sure that memory usage stays constant, otherwise it seems to garbage collect every ~10 episodes in my tests.

Let me know if this change fixes the issue in your setup.

Fantastic- thank you for the quick fix. I will test that out.
On Thu, Apr 7, 2022 at 5:02 PM Abulhair Saparov @.***>
wrote:

Let me know if this change fixes the issue in your setup.
—
Reply to this email directly, view it on GitHub
https://github.com/eaplatanios/jelly-bean-world/issues/12#issuecomment-1092285416,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYN6RMA2QPHH5O6IO3ONZ3VD5SPBANCNFSM5SWYAEIQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

--
Finbarr

Hi, I think with the updated simulator.py and simulator.cpp, the "jbw-v1" environment is not returning correct reward value. Can you please double check this?

Oh weird. Thanks for letting me know. I'll look into it.

@sophistz I found an bug that I had created in fixing the memory leak. 😅 I just pushed some changes that will hopefully fix it.

@asaparov Thanks. The code works now!

Memory leak appears to have been fixed- thanks for the quick patch!


github-status: support custom message and error status

Adding support for the error status, meaning that the test run itself could not be run (while failure means, the test could be run but it failed, so the PR is breaking it).
Also adding support for custom message to be shown in github. Primarily used to describe the error status.

:+1:

:+1:


Provide default value for type 'array'

Provide:

null default for arrays
empty list default for arrays
primitive default for arrays

example:
@Serializable
data class BarArray(
   @AvroDefault(Avro.EMPTY_LIST)
   val defaultEmptyArray: List<String>,
   @AvroDefault(Avro.NULL)
   val nullableDefaultEmptyArray: List<String>?,
   @AvroDefault("1,2")
   val defaultStringArrayWith2Defaults: List<String>,
   @AvroDefault("1,2")
   val defaultIntArrayWith2Defaults: List<Int>,
   @AvroDefault("3.14, 9.89")
   val defaultFloatArrayWith2Defaults: List<Float>
)

Fixes #52

Ha yes, good catch. I pushed a second commit to povide  an alternative annotation that gets rid of the simplistic .split
@Serializable
data class BarArray(
   @AvroDefaultList([])
   val defaultEmptyArray: List<String>,
   @AvroDefault(Avro.NULL)
   val nullableDefaultEmptyArray: List<String>?,
   @AvroDefaultList(["John", "Doe"])
   val defaultStringArrayWith2Defaults: List<String>,
   @AvroDefaultList(["1", "2"])
   val defaultIntArrayWith2Defaults: List<Int>,
   @AvroDefaultList(["3.14", "9.89"])
   val defaultFloatArrayWith2Defaults: List<Float>
)

@AvroDefault(Avro.NULL) still works on lists

Thanks for your contribution! The patch looks really good and seems like a
good fit for default values of arrays. However considering additional cases
such as default values of records, I can't see a way to have a consistent
api if we go with an array specific annotation.
How about using the default string as it is used in an avro schema. This
would be easy to parse for lists and is later extendable for other complex
types such as maps and records. See
https://avro.apache.org/docs/current/spec.html#schema record
For lists this would lead to a annotation like this:
@AvroDefault("""
["a","b"]
""")
What do you think about this?
daicode-jan<EMAIL_ADDRESS>schrieb am Fr., 24. Apr. 2020, 21:52:

Ha yes, good catch. I pushed a second commit to povide an alternative
annotation that gets rid of the simplistic .split
@Serializabledata class BarArray(
@AvroDefaultList([])
val defaultEmptyArray: List,
@AvroDefault(Avro.NULL)
val nullableDefaultEmptyArray: List?,
@AvroDefaultList(["John", "Doe"])
val defaultStringArrayWith2Defaults: List,
@AvroDefaultList(["1", "2"])
val defaultIntArrayWith2Defaults: List,
@AvroDefaultList(["3.14", "9.89"])
val defaultFloatArrayWith2Defaults: List
)

@AvroDefault(Avro.NULL) still works on lists

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sksamuel/avro4k/pull/54#issuecomment-619210282, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AC7XPEOQDZ6E4IDHYRGCGPLROHUYPANCNFSM4MQF7ULA
.

In order to keep using the @AvroDefault(string) I propose treating the defaultValue as json for arrays.
@Serializable
data class BarArray(
   @AvroDefault(Avro.EMPTY)
   val defaultEmptyArray: List<String>,
   @AvroDefault(Avro.NULL)
   val nullableDefaultEmptyArray: List<String>?,
   @AvroDefault("""["John", "Doe"]""")
   val defaultStringArrayWith2Defaults: List<String>,
   @AvroDefault("""["1", "2"]""")
   val defaultIntArrayWith2Defaults: List<Int>,
   @AvroDefault("""["3.14", "9.89"]""")
   val defaultFloatArrayWith2Defaults: List<Float>
)

   private fun transformStringToTypedArray(serialDescriptor: SerialDescriptor, stringArray: String): List<Any> {
      val value = try {
         objectMapper.readTree(stringArray.toByteArray())
      } catch (ioe: IOException) {
         throw IllegalArgumentException("Cannot use set default value $stringArray, invalid array")
      }
      if (!value.isArray) throw IllegalArgumentException("Default value '$stringArray' for type ${serialDescriptor.kind} does not result into an array.")
      val array = objectMapper.treeToValue(value, Any::class.java) as ArrayList<*>
      return array.map { toArrayOfType(serialDescriptor, "$it") }
   }

We could either map that array to the specified type and be able to throw an exception if the user made a mistake in the json or blindly return whatever came out of the jsonNode

Sounds like a good idea. The implementation for maps and records as default values should be easy using the json syntax.
One note though. You should leverage the JSON serialization of kotlinx.serialization instead of jackson. Doing so would automatically reuse all custom serializers (for records). Also it does not add another dependency.

Doing the parsing with kotlinx.serialization requires adding @ImplicitReflectionSerializer to 3 classes.
   private fun transformStringToTypedArray(fieldDescriptor: SerialDescriptor, stringArray: String): List<Any> = try {
      json.toJson(stringArray).jsonArray.map { it.content }
   } catch (ioe: IOException) {
      throw IllegalArgumentException("Cannot use default value $stringArray for type ${fieldDescriptor.kind}, invalid json array")
   }

using Json with default config. Is there something that I am missing?

Doesn't avro come with jackson anyway?
On Sun, 26 Apr 2020 at 14:19, daicode-jan<EMAIL_ADDRESS>wrote:

Doing the parsing with kotlinx.serialization requires adding
@ImplicitReflectionSerializer to 3 classes.
private fun transformStringToTypedArray(fieldDescriptor: SerialDescriptor, stringArray: String): List = try {
json.toJson(stringArray).jsonArray.map { it.content }
} catch (ioe: IOException) {
throw IllegalArgumentException("Cannot use default value $stringArray for type ${fieldDescriptor.kind}, invalid json array")
}
using Json with default config. Is there something that I am missing?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/sksamuel/avro4k/pull/54#issuecomment-619609791, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFVSGS2XBGYEU3GCRWRYQ3ROSCMFANCNFSM4MQF7ULA
.

it does

Might as well just use that then to keep it simple ?
On Sun, 26 Apr 2020 at 14:30, daicode-jan<EMAIL_ADDRESS>wrote:

it does
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sksamuel/avro4k/pull/54#issuecomment-619611827, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFVSGWU6VWHERRTTZ7NBK3ROSDV5ANCNFSM4MQF7ULA
.

But you'll still have to make sure that your data class can correctly be
deserialized using kotlinx.serialization and Jackson if you want to use it
in a default value. I'll look into a way to use kotlinx serialization
without reflection tomorrow.
Stephen Samuel<EMAIL_ADDRESS>schrieb am So., 26. Apr. 2020,
22:02:

Might as well just use that then to keep it simple ?
On Sun, 26 Apr 2020 at 14:30, daicode-jan<EMAIL_ADDRESS>wrote:

it does
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sksamuel/avro4k/pull/54#issuecomment-619611827, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AAFVSGWU6VWHERRTTZ7NBK3ROSDV5ANCNFSM4MQF7ULA
.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sksamuel/avro4k/pull/54#issuecomment-619616894, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AC7XPEPCAW3O4WQ4ECLEMXTROSHNZANCNFSM4MQF7ULA
.

@thake I managed to do it, I was not initially familiar with kotlinx.serialization
Updated PR

That looks good. I just have a few minor modifications. Can you open your pull request for modifications?

Not familiar with github but "Allow edits from maintainers" is checked

I added a few tests for Array and Set types. Also, I removed the constant for an empty list default value as this can easily be represented as String. The Avro.NULL default value only exists because annotations cannot contain null values and there is no other way to express a null value.
Does this work for you?


Added tests

Thanks @wacko ! Could you help update to test on multiple Ruby/Rails versions as well?


Move main package into cmd/api

The main package (so all .go files) in the root folder should be moved into the cmd/api folder instead

Closed by #104


Improve Error Handling when CLI is missing

A colleague recently encountered the following issue.
Error: Exception when calling Start with 0 argument(s): "The system cannot find the file specified"
Stack trace: at CmdDo, C:\Users\<username>\AppData\Local\Temp\tmpDFF3.tmp.psm1: Line 262
at invoke-gh<Process>, C:\Users\<username>\AppData\Local\Temp\tmpDFF3.tmp.psm1: Line 322
at CreateDevEnv, C:\Users\<username>\AppData\Local\Temp\tmpE013.tmp.ps1: Line 1558
at <ScriptBlock>, C:\<app>\.AL-Go\localDevEnv.ps1: Line 128
for <ScriptBlock>, <No file>: Line 1

The issue was that github cli wasn't installed. Is that a recent requirement? He never had a problem before. This is present in the latest preview. If github cli is a new requirement maybe it would be good da add a better error message, to point the user the solution.
for your convenience the lines that cause the issue.
https://github.com/microsoft/AL-Go/blob/7b6ca6ca4c1e3b621f2234b17de17ebdc32da304/Actions/AL-Go-Helper.ps1#L1558
https://github.com/microsoft/navcontainerhelper/blob/ef8b276b6524185c8a1ccbcaf81bcf69bd9be827/Common/Invoke-gh.ps1#L30
To be honest im not sure why the try catch isn't catching the error. Maybe because its started in a new process?

Are you running PS5 or PS7?

Are you running PS5 or PS7?

It's was on my colleages computer. So will ask him tomorrow. But im 99% sure it was von ps5

It seems that I was having a similiar in the BaseApp Contribution Pilot.
I'm using PS5.
I installed Github CLI and now get the following error:
.....
Checking System Requirements

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none)
none selected

Error: To get started with GitHub CLI, please run:  gh auth login
Alternatively, populate the GH_TOKEN environment variable with a GitHub API authentication token.

ExitCode: 4
Commandline: gh repo view --json owner,name
Stacktrace: bei CmdDo, C:\Users\kise\AppData\Local\Temp\tmp869F.tmp.psm1: Zeile 290
bei invoke-gh<Process>, C:\Users\kise\AppData\Local\Temp\tmp869F.tmp.psm1: Zeile 322
bei CreateDevEnv, C:\Users\kise\AppData\Local\Temp\tmp87E8.tmp.ps1: Zeile 1558
bei <ScriptBlock>, C:\Users\kise\source\AL\Microsoft\BusinessCentralApps\App\.AL-Go\localDevEnv.ps1: Zeile 128
bei <ScriptBlock>, <Keine Datei>: Zeile 9

The Error was in ps5


POC: Test live reload with chromedp

This would be a cool proof of concept:
https://github.com/knq/chromedp is a Go API using the Chrome Debugging Protocol (for Chrome, Edge, Safari, etc) .
What would be cool to test out is an alternative to the current very coarse grained live-reload, which in the normal case triggers a full page reload (and, while we only read and process the changed content file, we re-render the whole shennigan).
So with the above, it should be possible to:
On file content or template file change:

Check what URL is active in the browser.
Render only that URL
Write the bytes directly to the browser (stream it if possible)

The above is a bit simplistic but it should work -- and it should be so fast that you hopefully can watch yourself typing ...

This would be so cool! Do you see a future wish/feature like this affecting the many SPA CMSs that seem to be headed toward Hugo as well?
As in, helping with things like live preview of pages similar to the way that Wordpress can automatically render a specific URL to check for contributors rather than relying on the client-side piece render it a user types?

This would be so cool! Do you see a future wish/feature like this affecting the many SPA CMSs that seem to be headed toward Hugo as well?

You overestimate my vision for this. I think it would be cool to test. It may work, and it may lead to other ideas. And maybe not. Let us not think strategic and long term in every little issue we create. And I did not invite to a discussion here.

And I did not invite to a discussion here.

My apologies. I get excited


"Cannot find namespace" errors ONLY in watch mode

TypeScript Version:  2.8.0-dev.20180228

Search Terms:

cannot find namespace
watch errors

Repro

git clone https://github.com/flatpickr/flatpickr.git
yarn add typescript@next --dev
yarn test:typecheck
Then compare with yarn test:typecheck --watch

Expected behavior:
If tsc does not find any errors, neither should tsc watch.
Actual behavior:
tsc --watch finds cryptic errors that are not present when running tsc.
Playground Link:
Not applicable.

Figured it out after spending a few more hours.
Setting target + module to esnext and removing the lib option from tsconfig fixed the errors.

I am unable to get these errors locally.. i see no errors with or without --watch

@mhegazy that's because I just fixed the errors with a type assertion.
export default fp.l10ns as FlatpickrFn["l10ns"];
Would you be able to shed a light on why a type assertion be necessary here?

i see it now. thanks. it is a bug. the cast should not be needed.

Looks like the error comes through declaration emit: And same error is reported when executing
node c:\TypeScript\built\local\tsc.js -p ./  --declaration and coming from doing typeToString...


fix #307

fix #307
convertBytesToHumanReadableForm handles zeroes, processFileOnServer handles redirects from http to https.

handling zero problem is fixed.
However, when trying to upload a file using URL
in case of http it gives the following error:
java.net.SocketException: Socket closed
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:170)

and in case of https:
java.io.IOException: No such file or directory
	at java.io.UnixFileSystem.createFileExclusively(Native Method)
	at java.io.File.createNewFile(File.java:1012)
	at edu.sdsc.grid.io.local.LocalFile.createNewFile(LocalFile.java:486)

@amirkamran interesting finds
No such file or directory was caused by insufficient rights on some dirs in assetstore. Updated the grant_rights make target to prevent similar issues in the future.
Socket closed was happening probably because the getResponse stream was closed before it was copied. It's bit strange this was not happening all the time...
Could you test it once more?


Feat: Add additional parameter to WatsonxAiChatOptions

Some custom models may include extra parameters, so the idea is to define all the common parameters but add and additional attribute that will store all these custom configuration parameters. This will also help with its maintaniablitiy as if new parameters are added we can still use it while the options are not updated.

Add "additional" attribute to WatsonxAiChatOptions

Rebased, squashed and merged at ae6a019ad17fe157346f6dafbdbf9d2713c764eb


change default value of contentLanguage to all

#3561

You'd want to empty the array, not fill the array because that's going to require users to disable each and every language before being able to selectively filter the languages they want.

i agree, but why not to make all languages selected by default if the user is signed in ? @mary-ext


Chapter 9 book != Chp_09.ipynb

It looks like Chapter 10 book == Chp_09.ipynb, Chapter 11 book == Chp_10.ipynb and ...
maybe more are misaligned but I was just looking now for the MCMC stuff from Chapter 9.
However, Chapter 9 book != Chp_08.ipynb code 8.1...looks like then its actually matching the book chapter 8.

I do not see this problem. Maybe you are reading from a draft version of the first or second edition?


Added SanityHack

Added SanityHack - Adds detection for blocks broken and placed below a Y level specified in config

Merged.


Fill missing dates by interpolating data

📚 Documentation preview 📚: https://anemoi-datasets--81.org.readthedocs.build/en/81/

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.76%. Comparing base (904e102) to head (8da287f).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #81   +/-   ##
========================================
  Coverage    87.76%   87.76%
========================================
  Files           10       10
  Lines          793      793
========================================
  Hits           696      696
  Misses          97       97

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


listObjectsV2Query not url decoding object keys

I'm using a s3 compatible storage, not AWS S3 and when I try to list the objects of the bucket I get url encoded keys but those are not getting decoded by the method.
for example, this is what I am getting:
bWltaXItdGVzdA%3D%3D/R2F0ZWtlZXBlckFsZXJ0cw%3D%3D
Expected behavior
minio should return keys url decoded
the previous string should look like this:
bWltaXItdGVzdA==/R2F0ZWtlZXBlckFsZXJ0cw==
Code:
By my understanding in api-list.go the function listObjectsV2Query https://github.com/minio/minio-go/blob/d6fbd4980ec84fb532ad7b46ee097e007392780b/api-list.go#L171
makes a request by specifying encoding-type to be "url" so it's requesting the response's content to be url encoded, but when
listBucketResult gets defined the EncodingType does not get changed and is an empty string.
This causes decodeS3Name (https://github.com/minio/minio-go/blob/d6fbd4980ec84fb532ad7b46ee097e007392780b/api-list.go#L996 ) to not inescape the keys.
Waiting for some feedback on the issue, happy to give a go to fix it.

I'm using a s3 compatible storage, not AWS S3 and when I try to list the objects of the bucket I get url encoded keys but those are not getting decoded by the method. for example, this is what I am getting: .

Who is the S3 compatible vendor? Looks like their implementation is buggy.

@harshavardhana HCP S3. Had a better look and agree with your conclusion


first stab at #724

not sure where this would go, feel free to move around. it's a bit hard to get a feel for the spec's structure with no available toc/outline view.

I recommend making the wording more like a guideline, less like a very loose suggestion. For example, rather than "Service providers may want to make an OpenAPI description discoverable", consider "Service providers wishing make an OpenAPI description discoverable may ...."  You can also be more concise by dropping the sentence "In such a scenario, it can help if there is a predictable way in which API description and documentation is made discoverbale from the API itself. " which is not necessary. Change "the following recommendations are made:" and "It is recommended that links" to just "Provide a link to the Open API Specification with the service-desc link relation", and so on.

The proposal should specify the JSON Home "hints"/"formats" should contains the supported media type,format, and versions (such as application/openapi+json;version=2.0 vs application/openapi+yaml;version=2.0 as described in #110 )

On 2016-07-12 17:59, David Biesack wrote:

The proposal should specify the JSON Home "hints"/"formats" should
contains the supported media type,format, and versions (such as
application/openapi+json;version=2.0 vs
application/openapi+yaml;version=2.0 as described in #110
https://github.com/OAI/OpenAPI-Specification/issues/110 )

i am not sure that this needs to be recommended. media type hints are
optional and if people feel like using them, that's ok. if they don't
feel like using them, that's ok, too. why would you move away from that
optional model and tell them that they should use hints?

On 2016-07-12 17:56, David Biesack wrote:

I recommend making the wording more like a guideline, less like a very
loose suggestion. For example, rather than "Service providers may want
to make an OpenAPI description discoverable", consider "Service
providers wishing make an OpenAPI description discoverable may ...." You
can also be more concise by dropping the sentence "In such a scenario,
it can help if there is a predictable way in which API description and
documentation is made discoverbale from the API itself. " which is not
necessary. Change "the following recommendations are made:" and "It is
recommended that links" to just "Provide a link to the Open API
Specification with the service-desc link relation", and so on.

thanks for the feedback. i did a bit of rewriting at
https://github.com/OAI/OpenAPI-Specification/pull/734/commits/0932f82b35b1196ca3d1cbf2e2f5c13c39d3d6a6
and hope that this addresses your issues.

If we are recommending service-desc then I think it makes sense to recommend a consistent and complete representation of the link so that people have some guidance to follow . I did use the word "should". I'd rather not leave people guessing on what media type to use (and perhaps guessing wrong) or making them search somewhere to find out, or simply omit the type because the guidance does not mention it.
The rewrite looks much improved, thanks. Minor tweak: change "are using [the "service-desc" link relation type]" to "may use [the "service-desc" link relation type]"

thanks for the feedback!
On 2016-07-14 15:16, David Biesack wrote:

If we are recommending service-desc then I think it makes sense to
recommend a consistent and complete representation of the link so that
people have some guidance to follow . I did use the word "should". I'd
rather not leave people guessing on what media type to use (and perhaps
guessing wrong) or making them search somewhere to find out, or simply
omit the type because the guidance does not mention it.

personally, i think it would be fine to omit the type, unless you have a
specific reason to add such a hint to the link. i am curious if others
have any opinion about mentioning/recommending/requiring a type hint.

The rewrite looks much improved, thanks. Minor tweak: change "are using
[the "service-desc" link relation type]" to "may use [the "service-desc"
link relation type]"

https://github.com/OAI/OpenAPI-Specification/pull/734/commits/542f10d3b3566e8486aef2d83bb715bae009b188
fixes this and uses the stronger "should" language you're suggesting above.

anything else that's required here? thanks for the feedback so far!

anything i can help to move this forward? it has been in the pipeline for a while. thanks!

anything i can help to move this forward? it has been in the pipeline for a while. thanks!

@dret - thanks for the submission. we're got a lot to cover and didn't get around to it this time, but it's on the queue for our next discussion.

@webron Would you please give this a look and comment on what should happen next?

This is more of @darrelmiller's domain. If I understand it properly, I don't think it'll go into 3.0.0.. It won't make it into RC1 for sure.


LEGO: Pull request from lego/hb_946_20170804213538800 to master

LEGO: Pull request from lego/hb_946_20170804213538800 to master with localized lcls

@csigs,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

LGTM


Documentation explainability

Blocked by #557
This is a pull request to improve upon the documentation for usage of explainability module in models with binary random variables.

This is a draft PR and wasn't ready for review. Thanks for the comments though. The final intended changes are only pertaining to the corrections needed in explainable_categorical.ipynb


feat: themes

Closes #7
Adds support for global themes beyond light/dark modes, keeping the original theme as the default.
Philosophy:
Why not just use tailwind dark:
As of now tailwind doesn't support dynamic themes beyond light/dark mode. State-based styling adds much more flexibility and customization options.
### Why even use tailwind then with all this css?
The CSS is condensed as much as possible, with the theme-specific dynamic styles being separated from tailwind concerns into style attributes.
### Why are you passing the ThemeConfig into the redux state machine and not the UITheme?
ThemeConfig is a simpler, serializable interface that can be passed to a UITheme on state changes. The existence of UITheme serves to make the items handled by the state alterable in the future (e.g. font style, size, etc.)
Theme values overview:
--primary : Primary color for highlighting text, elements, etc.
--secondary: Secondary highlight for visual contrast
--text: main text color
--padding: color for element padding/darker elements such as cards & buttons
--workspace-padding: lighter color than padding to account for extra layers in workspace
--background: main background color
Remaining issues:

[x] Reduce code duplication between tailwind config file and uiThemes.ts
[x] Add selected indicator for theme menu
[x] Theme selection should persist after program exit
[x] Adjust styles of homepage
[x] Adjust styles of workspace
[x] Adjust styles of Modals
[x] Should Settings have its own path or should it just be a modal?
[x] Add more themes

Theme:'Default(dark)'

Theme: 'FlyByWire(dark)'

Theme: Atom-one-dark

Theme: Monokai

Encountering an error when attempting to open a project.

After removing any changes made to the Workspace component, the error persists, but I can't tell exactly what's causing it. Likely due to one of my modifications to the config slice.
https://github.com/synapticsim/ace-v3/blob/7bf3d7c9f8e1dcfed94ccad23ee3bda3ff20064d/src/pages/Workspace.tsx#L25
The "addNestedSub" object:

It seems to work for me? Unless you have some uncommitted code.

@MikeRomaa Seems to work again after restarting the dev server twice. Currently no uncommited

Getting an error and can't start up ACE without any theme in the local storage.  || 'amethyst-dark' is not a valid JSON to parse, so it errors out.

@MikeRomaa so for the first option, it will expand the color pallette quite a bit so it will take time time to refactor since not only will all the class names need to change, and their invocations, but I will have to experiment with ranges of each theme color up between ranges (e.g. 100-300)
This option will be limited in the fact that each theme MUST have the same amount of color variants for each field, or the error handling will get much more complex (e.g. you can’t have FlyByWire go up to bg-theme-200 and amethyst go up to bg-theme-300)
tw-colors seems to be more or less the same implementation here since everything is prefixed with theme, and you’d have to add additional wording to distinguish the background, text, padding, etc.


[dx12] catch device lost during fence wait

Fixes a panic on device lost in DX12
PR checklist:

[ ] make succeeds (on *nix)
[ ] make reftests succeeds
[ ] tested examples with the following backends:

bors r+

bors r+


Bootstrap script throws error when passing "drop-create" option

This error happens only during the first time it downloads the MySQL driver jar and loads it in the classpath.
hortonworks-registry-0.7.0 $ sh bootstrap/bootstrap-storage.sh drop-create
Using Configuration file: bootstrap/../conf/registry.yaml
Downloading mysql jar from url: https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.40.zip
Downloading mysql jar without using proxy.
Downloading file mysql-connector-java-5.1.40.zip into /var/folders/tt/7fd821cd1l9dsgwf75lrrn5m0000gp/T/
Copying mysql libraries into lib dir...
Unzipping downloaded mysql driver and copying
Copying file to libs /Users/builds/registry/hortonworks-registry-0.7.0/bootstrap/lib/../../libs/mysql-connector-java-5.1.40-bin.jar
mysqlJarFile bootstrap/lib/mysql-connector-java-5.1.40-bin.jar
[main] INFO org.flywaydb.core.internal.util.VersionPrinter - Flyway Community Edition 5.1.4 by Boxfuse
Tue Oct 01 17:56:14 IST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
[main] INFO org.flywaydb.core.internal.database.DatabaseFactory - Database: jdbc:mysql://localhost/schema_registry (MySQL 5.7)
[main] INFO org.flywaydb.core.internal.command.DbClean - Successfully cleaned schema `schema_registry` (execution time 00:00.076s)
"drop" option successful
Using Configuration file: bootstrap/../conf/registry.yaml
Exception in thread "main" org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: com.mysql.cj.jdbc.Driver => Check whether the jar file is present
	at org.flywaydb.core.internal.util.jdbc.DriverDataSource.<init>(DriverDataSource.java:142)
	at org.flywaydb.core.api.configuration.ClassicConfiguration.setDataSource(ClassicConfiguration.java:1147)
	at org.flywaydb.core.Flyway.setDataSource(Flyway.java:712)
	at com.hortonworks.registries.storage.tool.sql.SchemaFlywayFactory.get(SchemaFlywayFactory.java:49)
	at com.hortonworks.registries.storage.tool.sql.TablesInitializer.main(TablesInitializer.java:203)
Caused by: org.flywaydb.core.api.FlywayException: Unable to instantiate class com.mysql.cj.jdbc.Driver : com.mysql.cj.jdbc.Driver
	at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:61)
	at org.flywaydb.core.internal.util.jdbc.DriverDataSource.<init>(DriverDataSource.java:132)
	... 4 more
Caused by: java.lang.ClassNotFoundException: com.mysql.cj.jdbc.Driver
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.flywaydb.core.internal.util.ClassUtils.instantiate(ClassUtils.java:59)
	... 5 more

#597


Hi there

Hey @bot-hubaaa,
I'm on vacation until I finish writing this on vacation auto-response app :-)
This comment was automatically generated by Hubaaa's GitHub Vacation Responder app.

Hey @bot-hubaaa,
I'm in Cabarete
This comment was automatically generated by Hubaaa's GitHub Vacation Responder app.


Updates README with step to start mongodb

mongodb is necessary to run the app

Sorry, please ignore, wrong repo :s


Error: module 'openai' has no attribute 'ChatCompletion'

openai   0.27.8
Python 3.10.11
The version should be correct, but I get an error.
Traceback (most recent call last):
File "C:\works\azure-search-openai-demo\app\backend\app.py", line 123, in chat
r = impl.run(request.json["history"], request.json.get("overrides") or {})
File "C:\works\azure-search-openai-demo\app\backend\approaches\chatreadretrieveread.py", line 68, in run
chat_completion = openai.ChatCompletion.create(
AttributeError: module 'openai' has no attribute 'ChatCompletion'
Is the following part of app.py correct in the following way?
Used by the OpenAI SDK
openai.api_type = "azure"
openai.api_base = f"https://{AZURE_OPENAI_SERVICE}.openai.azure.com"
openai.api_version = "2023-05-15"
Comment these two lines out if using keys, set your API key in the OPENAI_API_KEY environment variable instead
openai.api_type = "azure_ad"
openai_token = azure_credential.get_token("https://cognitiveservices.azure.com/.default")
"C:\Users\AppData\Local\Programs\Python\Python310\Lib\site-packages\openai_init_.py"
The installed openai has chatcompletion.
from openai.api_resources import (
Audio,
ChatCompletion,
Completion,
Customer,
Deployment,
Edit,
Embedding,
Engine,
ErrorObject,
File,
FineTune,
Image,
Model,
Moderation,
)

Is it possible you overwrote the openai module with your own variable named openai? You could debug by printing out the value of openai or its contents, like
print(openai)
print(dir(openai))
And also check to make sure you have no local filenames or variables called openai.

Closing since I don't believe there's an issue with our code.


raftstore: run pre_persist when yield

Signed-off-by: CalvinNeo<EMAIL_ADDRESS>
What is changed and how it works?

Issue Number: ref #12849
What's Changed:
In #12849, we introduced a observer pre_persist which is called before every write_to_db which suggests whether should we actually do a persistence or not.
However, we find this observer do not cover when a delegate yields when it is run in another priority. So we need to add this hook here.
This will not be related to any known or unknown bugs since proxy is currently not rely on such logic for now.

run pre_persist when a delegate yields

Related changes

PR to update pingcap/docs/pingcap/docs-cn:
Need to cherry-pick to the release branch

Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Side effects

Performance regression

Consumes more CPU
Consumes more MEM

Breaking backward compatibility

Release note
None

/cc @BusyJay @breezewish @tonyxuqqi

/run-all-tests

/run-all-tests

/cc @5kbpers


lxc GLX blit vs. flip

Distribution: Ubuntu
Distribution version: 16.04.6
Nvidia P5000 and K5000
Nvidia driver: 418.67
cuda version: 10.1
lxc info:

config:
  core.https_address: '[::]:8443'
  core.trust_password: true
api_extensions:
- storage_zfs_remove_snapshots
- container_host_shutdown_timeout
- container_stop_priority
- container_syscall_filtering
- auth_pki
- container_last_used_at
- etag
- patch
- usb_devices
- https_allowed_credentials
- image_compression_algorithm
- directory_manipulation
- container_cpu_time
- storage_zfs_use_refquota
- storage_lvm_mount_options
- network
- profile_usedby
- container_push
- container_exec_recording
- certificate_update
- container_exec_signal_handling
- gpu_devices
- container_image_properties
- migration_progress
- id_map
- network_firewall_filtering
- network_routes
- storage
- file_delete
- file_append
- network_dhcp_expiry
- storage_lvm_vg_rename
- storage_lvm_thinpool_rename
- network_vlan
- image_create_aliases
- container_stateless_copy
- container_only_migration
- storage_zfs_clone_copy
- unix_device_rename
- storage_lvm_use_thinpool
- storage_rsync_bwlimit
- network_vxlan_interface
- storage_btrfs_mount_options
- entity_description
- image_force_refresh
- storage_lvm_lv_resizing
- id_map_base
- file_symlinks
- container_push_target
- network_vlan_physical
- storage_images_delete
- container_edit_metadata
- container_snapshot_stateful_migration
- storage_driver_ceph
- storage_ceph_user_name
- resource_limits
- storage_volatile_initial_source
- storage_ceph_force_osd_reuse
- storage_block_filesystem_btrfs
- resources
- kernel_limits
- storage_api_volume_rename
- macaroon_authentication
- network_sriov
- console
- restrict_devlxd
- migration_pre_copy
- infiniband
- maas_network
- devlxd_events
- proxy
- network_dhcp_gateway
- file_get_symlink
- network_leases
- unix_device_hotplug
- storage_api_local_volume_handling
- operation_description
- clustering
- event_lifecycle
- storage_api_remote_volume_handling
- nvidia_runtime
- container_mount_propagation
- container_backup
- devlxd_images
- container_local_cross_pool_handling
- proxy_unix
- proxy_udp
- clustering_join
- proxy_tcp_udp_multi_port_handling
- network_state
- proxy_unix_dac_properties
- container_protection_delete
- unix_priv_drop
- pprof_http
- proxy_haproxy_protocol
- network_hwaddr
- proxy_nat
- network_nat_order
- container_full
- candid_authentication
- backup_compression
- candid_config
- nvidia_runtime_config
- storage_api_volume_snapshots
- storage_unmapped
- projects
- candid_config_key
- network_vxlan_ttl
- container_incremental_copy
- usb_optional_vendorid
- snapshot_scheduling
- container_copy_project
- clustering_server_address
- clustering_image_replication
- container_protection_shift
- snapshot_expiry
- container_backup_override_pool
- snapshot_expiry_creation
- network_leases_location
- resources_cpu_socket
- resources_gpu
- resources_numa
- kernel_features
- id_map_current
- event_location
- storage_api_remote_volume_snapshots
- network_nat_address
- container_nic_routes
- rbac
- cluster_internal_copy
- seccomp_notify
- lxc_features
- container_nic_ipvlan
- network_vlan_sriov
- storage_cephfs
- container_nic_ipfilter
- resources_v2
- container_exec_user_group_cwd
- container_syscall_intercept
api_status: stable
api_version: "1.0"
auth: trusted
public: false
auth_methods:
- tls
environment:
  addresses:
  - <IP_ADDRESS>:8443
  - <IP_ADDRESS>:8443
  - <IP_ADDRESS>:8443
  - <IP_ADDRESS>:8443
  - <IP_ADDRESS>:8443
  architectures:
  - x86_64
  - i686
  driver: lxc
  driver_version: 3.1.0 (devel)
  kernel: Linux
  kernel_architecture: x86_64
  kernel_features:
    netnsid_getifaddrs: "false"
    seccomp_listener: "false"
    shiftfs: "false"
    uevent_injection: "false"
    unpriv_fscaps: "true"
  kernel_version: 4.15.0-15-generic
  lxc_features:
    mount_injection_file: "true"
    network_gateway_device_route: "true"
    network_ipvlan: "true"
    network_l2proxy: "true"
    network_phys_macvlan_mtu: "true"
    seccomp_notify: "true"
  project: default
  server: lxd
  server_clustered: false
  server_name: test-rig
  server_pid: 21863
  server_version: "3.15"
  storage: zfs
  storage_version: 0.7.5-1ubuntu13

profile
config:
  environment.DISPLAY: :0
  nvidia.driver.capabilities: compute, display, graphics, utility, video
  nvidia.runtime: "true"
description: Default LXD profile
devices:
  X0:
    path: /tmp/.X11-unix/X0
    source: /tmp/.X11-unix/X0
    type: disk
  Xauthority:
    path: /root/.Xauthority
    source: /home/oblong/.Xauthority
    type: disk
  eth0:
    name: eth0
    nictype: macvlan
    parent: enp0s25
    type: nic
  gpu:
    type: gpu
  root:
    path: /
    pool: default
    type: disk
name: default

Issue description
Let me first say, thanks for all of the hard work!
I'm revisiting an issue from several years ago because I really want this to work! https://github.com/lxc/lxd/issues/3826
^^^ That issue being poor framerate with GLX apps in lxc containers.
I'm getting similar framerates as I did two years ago, but I discovered that on the host the nvidia driver always shows FLIP and in lxc containers (Ubuntu 16.04 and 18.04) it shows BLIT regardless of what nvidia-settings shows (Attribute 'AllowFlipping' (test-rig:0.0): 1). I'm guessing that was the performance issue then and still is now. Any ideas? Any help is greatly appreciated.
Steps to reproduce

using nvidia-settings under OpenGL Settings, tick Enable Graphics API Visual Indicator
Use the lxc profile above
start an Ubuntu 18.04 container
apt install glmark2
run glmark (glmark2 --fullscreen)
notice the visual indicator shows BLIT - VSYNC OFF
Note: the VI shows BLIT regardless of the GLX app I'm running (glxgears, glmark2, in-house GLX apps)

Information to attach
container log:
lxc info --show-log test1804
Name: test1804
Location: none
Remote: unix://
Architecture: x86_64
Created: 2019/07/18 14:54 UTC
Status: Running
Type: persistent
Profiles: default
Pid: 9388
Ips:
  eth0: inet    <IP_ADDRESS>
  eth0: inet6   fe80::216:3eff:fe53:8224
  lo:   inet    <IP_ADDRESS>
  lo:   inet6   ::1
Resources:
  Processes: 25
  Disk usage:
    root: 147.16MB
  CPU usage:
    CPU usage (in seconds): 10
  Memory usage:
    Memory (current): 76.13MB
    Memory (peak): 124.46MB
  Network usage:
    eth0:
      Bytes received: 325.03kB
      Bytes sent: 2.13kB
      Packets received: 2798
      Packets sent: 22
    lo:
      Bytes received: 332B
      Bytes sent: 332B
      Packets received: 4
      Packets sent: 4

Log:

lxc test1804<PHONE_NUMBER>1841.826 ERROR    start - start.c:proc_pidfd_open:1644 - Function not implemented - Failed to send signal through pidfd

lxc monitor shows nothing.

Hmm, so LXD doesn't interact with the graphics driver in any way. All it does is pass /dev/drm/ and /dev/nvidia* to the container.
I'd recommend maybe opening an issue with https://github.com/NVIDIA/libnvidia-container as that's what's used to pass the various GL libraries. Maybe your issue is caused by a missing library or something similar.

I'll open an issue there. Thanks Stephane!

Perfect, thanks!


Fixing Icon imports

Provide the exact quote of the error or issue
Modify the part that imports icons from @yamada-ui/lucide as needed for this review.
https://github.com/yamada-ui/yamada-components/pull/267#discussion_r1660048318
Does the feature already exist? Please link to it.
No response
Are you willing to participate in fixing this issue and create a pull request with the fix?
None

I will try to correct the examples of the navbar.

@illionillion I think we should create separate issues for each category. What do you think?

@illionillion I think we should create separate issues for each category. What do you think?

@taroj1205
I think that would be better.

@illionillion I think we should create separate issues for each category. What do you think?

@taroj1205
I think that would be better.

@illionillion Let's create these issues!


datenum() not accounting for DST properly

Creating this issue as recommended in #832.
Here is a jsfiddle to witness the problem: https://jsfiddle.net/gtt2srcu/
I have some problems with the datenum function, not behaving correctly when the v is not in the same timezone offset as the current time (ex. current time has DST offset and v does not have DST offset). After playing around with the code, I believe the offsetting needs to be dependent on the v value instead of current time, like this:
var basedate = new Date(1899, 11, 30, 0, 0, 0);
var basetimestamp = basedate.getTime();
var baseoffset = basedate.getTimezoneOffset();
function datenum(v/*:Date*/, date1904/*:?boolean*/)/*:number*/ {
	var epoch = v.getTime();
	if(date1904) epoch -= 1462*24*60*60*1000;
	// Account for offset differences between the basedate and v...
	var adj = (v.getTimezoneOffset() - baseoffset) * 60000;
	return (epoch - basetimestamp - adj) / (24 * 60 * 60 * 1000);
}

This is because if basedate and v have a different offset, we need to compensate this effect by applying the difference on the numerical value provided to excel. The offset of the current time does not seem relevant.
It's possible that the numdate function suffers from the same problem, but I haven't digged through it.

It's actually apparent from reading raw files.  Remove the .zip extension from the linked files:
dates.xlsb.zip
dates.xlsx.zip
$ node -pe "require('xlsx').readFile('dates.xlsx', {cellDates:true}).Sheets.Sheet1.A2"
{ t: 'd', v: 2017-02-01T04:00:00.000Z, w: '2017-02-01 00:00:00' }
$ node -pe "require('xlsx').readFile('dates.xlsb', {cellDates:true}).Sheets.Sheet1.A2"
{ t: 'd', v: 2017-02-01T05:00:00.000Z, w: '2017-02-01 00:00:00' }

@ebmike Looking back at the other issue, I don't think the concern was properly explained.  There's a fundamental complexity -- transitioning between Excel's concept of local time and JS concept of universal time -- that has to be confronted somewhere.  This isn't an issue when dealing with a single timezone, but you have situations where clients in Los Angeles are downloading data from servers in New York.  There are three logical paths forward:

Placing the complexity in the raw JS object is arguably the best, since it's neatly tucked away from most use cases, but it complicates code working directly with the worksheet objects.  (This is my personal preference)

Placing the complexity in utility interfaces like aoa_to_sheet (more knobs to control what types of Dates you are passing)

Forget Excel's behavior and just treat dates as UTC throughout.  This would push timezone awareness to client code and possibly break expectations for what people will see in Excel, but arguably make for the simplest user code.

Thoughts?

I just want to underline that my main use case for now is writing to workbooks (a data export feature). The data I'm working with is provided by the application as a javascript Date instance, that is essentially a timestamp.
As expected, there are cases where sheetjs cannot infer my intentions when converting the Date objects. The library needs to convert the value to a local time, but it has many choices:

Use the local time of the current machine (default behavior). The Date object is aware of timezone offsets and daylight saving time rules, so we are able to find the numerical value representing a specific timestamp in this timezone. If the recipient of the Excel file is in the same timezone as the machine that generates the file, there shouldn't be any surprises.
Use UTC. The Date can be offset to utc (by reversing the timezone + DST offsets). This approach would always produce the same output on any machine, but the recipient of the Excel file needs to know dates are in UTC.
Use some arbitrary timezone. Using a timezone database like Moment timezone, the Date object could be translated to a local time in another timezone. This would allow us to generate a file for a remote user (Los Angeles vs. New York case). I don't expect sheetjs to do this kind of conversion out-of-the-box.

I believe this library has made a sensible choice of defaulting to the first approach by default (ex. when using utilities like aoa_to_sheet()). When either the second or third approach is needed, the developer needs to work directly with the cell object and calculate the numerical value in the appropriate timezone.
Just to recap, my issue here is that I think I found a flaw in the current default behavior (first approach), where the DST offset is not taken into account properly.

@SheetJSDev Maybe add a third date "type" which is just an iso-date string. Not everyone needs a "time" on their dates. In fact, for our code, every datetime we encounter is broken into 2 excel columns (for date and time).
To respond to the server timezone vs client timezone comment above.... yes, thats the problem we were encountering that become much harder after the change noted in #832. I did not bring it up in the issue because I didn't think it was relevant at the time, and the issues noted in #832 would be obvious enough.

I believe I'm also being impacted by this.
I'm using XLSX.utils.table_to_book on an HTML table with dates expressed in plain text in cells as MM/DD/YYYY strings. When saving the file to XLS, the date string value is converted to a number which can be formatted in Excel as a date (but that formatting is not there initially). As an example, 10/27/2016 in my HTML table is converted to 43034.95833 when the expected value should be 43035.
After assigning the Short Date format in Excel on 4304.95833, Excel reports 10/26/2017  11:00:00 PM
When saving the table to XLSX, the columns including dates automatically have the Short Date formatting applied. And the date value in Excel is the same as above: 10/26/2017  11:00:00 PM
In all cases, the date is technically off by one hour, but only needing MM/DD/YYYY, the net effect is that all dates are off by a full day.

@SheetJSDev Maybe add a third date "type" which is just an iso-date string. Not everyone needs a "time" on their dates. In fact, for our code, every datetime we encounter is broken into 2 excel columns (for date and time).
To respond to the server timezone vs client timezone comment above.... yes, thats the problem we were encountering that become much harder after the change noted in #832. I did not bring it up in the issue because I didn't think it was relevant at the time, and the issues noted in #832 would be obvious enough.

@SheetJSDev This is actually an interesting question. Didn't find a topic about this; is this discussed somewhere? Actually a iso-date string type sounds really useful to me. I went back and used strings instead of dates, because the value of the cell would still always contain the time.

Having same problem as @pmalouin - I download some time series data from server, present it to user displaying dates in local time, and provide the option for the user to "download" the data as xlsx format. In the resulting xlsx dates are shifted by the difference between the current time zone offset and the time zone offset of the date itself.
@pmalouin's solution worked for me.

@SheetJSDev  I am also impacted by this. I cannot read my dates.
"2019-1-31" in excel becomes "2019-1-30 23:00:00" when I read it from node.
I think this library is interpreting the "local" date as CET (GMT-1h) but it is now CEST(GMT-2).
I agree with previous statements that this is a very complex issue: dates are simply broken.
And it is all coming from Excel. The internal type they use is simply incomplete.
My thought is that the current approach, even if it managed to work out properly the actual "local" timezone including DST issues it might not fit all users.
It is not unthinkable that someone might want to open the excel in the timezone in which it was produced. Think, for example, consolidation of billing events in a global company. It does not matter where you open the excel, the important thing is were it was created.
I think it should be possible to pass a parsing parameter with the timezone to use for dates in the spreadsheet. If not provided, the local timezone should be used.
This is more or less what we have here, but would also allow to manually fix some edge cases, including specific timezone bugs.
Buy the way, I believe the EU is considering now ditching the whole summer time:
https://www.npr.org/2019/03/27/707179979/european-parliament-moves-toward-ending-daylight-saving-time?t=1557761224443
So, this kind of issue is going to be difficult to maintain.

Any news with this issue? i think #1333 should be merged

v0.16.0 changed date handling. Please re-test against a version at or above v0.16.0 and report back if issues persist