Error reported inside union are wrong

Using the following code:
import { ZodError, z } from "zod";

async function superRefineFunction(val: any, ctx: any) {
    if (val !== 'Z') {
        ctx.addIssue({
            code: z.ZodIssueCode.custom,
            message: "This value is not in db",
        });
    }
}

const schema = z.union([
    z.string().regex(/^P=\d{4}$/),
    z.string().regex(/^A=\d{4}$/).pipe(z.string().superRefine(superRefineFunction)),
]);

async function run(data: unknown) {
    try {
        const result = await schema.parseAsync(data);
        console.log(`${result}: ok`);
    } catch (e) {
        console.log(`${data}: ${(e as ZodError).issues.map((i)=>i.message).join(',')}`)
    }
}

run('A=2222').then(() => {});

The error reported is not the one reported in the superRefineFunction. But, if I invert the order of the elements in the array of the argument passed to z.union, then I receive the right error.
const schema = z.union([
    z.string().regex(/^A=\d{4}$/).pipe(z.string().superRefine(superRefineFunction)),
    z.string().regex(/^P=\d{4}$/),
]);

Conclusion: Using union, It seems only the first error encountered is reported. Would it be better to report all the errors encountered?

I have simplified the example to make it easier to diagnose. This does seem to be a bug.
const regex = z.string().regex( /foo/ )
const regexWithRefinement = z.string().regex( /bar/ ).refine( () => false, 'Custom message' )

const union1 = z.union( [ regex, regexWithRefinement ] )
const union2 = z.union( [ regexWithRefinement, regex ] )

const result1 = union1.safeParse( 'bar' )
!result1.success && console.log( result1.error.issues )
// [
//     {
//         validation: "regex",
//         code: "invalid_string",
//         message: "Invalid",
//         path: []
//     }
// ]

const result2 = union2.safeParse( 'bar' )
!result2.success && console.log( result2.error.issues )
// [
//     {
//         code: "custom",
//         message: "Custom message",
//         path: []
//     }
// ]

The root cause for this behaviour are these lines of code:
https://github.com/colinhacks/zod/blob/02699107616f672d79d3d71557456ec55597a4fa/src/types.ts#L2853-L2855
The problem is - I just can't figure out why we're checking the dirty state at this point and decide to return only the issues related to the dirty check.
When I remove these lines, I'm getting the expected behaviour but one of the tests breaks:
https://github.com/shaharke/zod/blob/0e8902736c6d838dd186afb8434fd262c60d629b/src/__tests__/unions.test.ts#L35
Based on this test I assume the intention was to give precedence to custom errors, but since the "dirty" flag is also set by built in validations (regex, min, max etc), it breaks error reporting for unions using those validations.


Improving UI of the website

I want to improve the UI of the website. Please assign me this issue. Thank you!

Please assign me this issue @srivastavaritik

Please assign me this issue @srivastavaritik

Please assign me this issue @srivastavaritik


Update numpy dependency

Recently numpy 2.0.0 was released, and it's not really working with the rest of the package. So either the requirements.txt can be updated (to pin the dependency to 1.26.4) or some chores need to be done to make it work with numpy 2.0.0

fixed in #162


require inside js is not working?

I clone https://github.com/segmentio/metalsmith.git
cd to examples/static-site
and update all npm packages (metalsmith to 1.0.1)
Run
./node_modules/metalsmith/bin/metalsmith
// Metalsmith · successfully built to /Users/eric/workspace/metalsmith/examples/static-site/build

Add metalsmith.js file
var metalsmith = require('metalsmith');
metalsmith(__dirname)
.use(function(files, metalsmith, done){
    console.log(files);
    done();
})
.build();

Run
node metalsmith.js

Nothing print out

Closing since it was added to docs.


Make Target/Application class for collecting targets

Make a Target/Application class for collecting targets. In addition, add parameters for running, plotting etc. For a particular application, it is either subclassed, or an instance of Target with appropriate attributes are set. Prototype example:
class Target:
    def  __init__(self):
           _application # Application name
           _data # For summary stats, as pandas.DataFrame
           _odo # odo function for collecting stats
           _template # jinja2 template?
           run # whether or not to run this application
           _plots
           _targets # Set on init if run via a make_targets function

    def plot():
          raise NotImplemented # Or just run all _plots
    def make_targets():
          raise NotImplemented # typically the targets.make_targets function
    @property
    def targets():
          return _targets # [] if run=False
    def __repr__():
         return {key: targets} # could be several keys

The main use case is to in a rule do:
input: **target

In addition add a plot class:
class Plot:
    _plot_fn # plotting function
    _template # jinja2 template
    __repr__ # return template or notebook or figure or ...
    _mode: # notebook, static, ...

Maybe add decorator to Target so that one can register a plot:
@target.register(key)
Plot()

More or less followed above setup, with some minor changes. The class is called IOTarget, to mimic snakemake.io.IOFile, and there is a separate class for the application called Application.


Docs aren't working correctly.

Visiting this page: https://fluxml.ai/FastAI.jl/dev/documents/README.md and clicking on one of the links from the Example code snippet isn't opening the tab but the URL is getting changed.

Should be fixed after rebuilding the docs, I just triggered the workflow 👍

Fixed now


[stdlib] rename validatingUTF8 to validatingCString properly

I was previously unable to do this rename "properly", in that it resulted in a build warning.
Thanks to @DougGregor's fix in commit d19f082665489d0a49ef3d201907bf7f68b3dae2, that warning is now gone.

@swift-ci please smoke test

@swift-ci please test

@swift-ci please test

@swift-ci please test


AWS S3 file access token incorrectly encoded at List image column

Winter CMS Build
1.2
PHP Version
8.1
Database engine
SQLite
Plugins installed
No response
Issue description
My project is configured to store file on s3. And I set a image type column in backend list, but it cannot display correctly.

Steps to replicate
At this line, I figure out the access token (query string) which is after filename has been url-encoded as below:
example.jpg%3FX-Amz-Content-Sha256%3DUNSIGNED-PAYLOAD%26X-Amz-Algorithm%3DAWS4-HMAC-SHA256%26X-Amz-Credential%3Dxxxxxxxxxx%2F20221222%2Fap-northeast-1%2Fs3%2Faws4_request%26X-Amz-Date%3D20221222T093208Z%26X-Amz-SignedHeaders%3Dhost%26X-Amz-Expires%3D3600%26X-Amz-Signature%3Dxxxxxxxxxx

It should be:
example.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx/20221222/ap-northeast-1/s3/aws4_request&X-Amz-Date=20221222T093208Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=xxxxxxxxxx

I understand a filename without url-encode is unsafe, however it should be optimized for AWS s3 file access. Perhaps to split out query string before encode it.
Workaround
No response

What does your filesystem disk configuration look like along with the configuration for your CMS file folders?

Did you checked the source code I mentioned ?
I don't think there has any relevant to my config. Anything besides this list column is correct.
Here is my plugin code:
<?php namespace My\Plugin\Models;

class Comment extends Model
{

    public $attachOne = [
        'image' => [
            'System\Models\File',
            'public' => false,
            'disk' => 's3',
        ],
    ];
}

// Tested, all got correct URL!
url($comment->image->path);
url($comment->image->getThumb(400, 400));

Furthermore, I also tested upload files to media manager. Everything is OK.
And here is how my config looks like:
<?php
// config/cms.php
return [
    'storage' => [
        'uploads' => [
            'disk' => 's3',
            'folder' => 'dev/uploads',
            'path' => 'https://my-bucket.s3.amazonaws.com/dev/uploads',
            'temporaryUrlTTL' => 3600,
        ],
        'media' => [
            'disk' => 's3',
            'folder' => 'dev/media',
            'path' => 'https://my-bucket.s3.amazonaws.com/dev/media',
        ],
        'resized' => [
            'disk' => 's3',
            'folder' => 'dev/resized',
            'path' => 'https://my-bucket.s3.amazonaws.com/dev/resized',
        ],
    ],
];

<?php
// config/filesystems.php
return [
    'default' => 's3',
    'disks' => [
        's3' => [
            'bucket' => 'my-bucket',
            'driver' => 's3',
            'endpoint' => null,
            'key' => 'AKI..................2A',
            'region' => 'ap-northeast-1',
            'secret' => 'Fxt49.............8TE',
            'stream_uploads' => false,
            'url' => 'https://my-bucket.s3.amazonaws.com/',
            'use_path_style_endpoint' => false,
        ],
    ],
];

Workaround
Currently I will solve this problem by adding custom list column to replace the image resize function.

class Plugin extends PluginBase
{
    public function registerListColumnTypes()
    {
        return [
            'thumbnail' => function ($value, $column, $record) {
                $image = null;
                $config = $column->config;

                // Get config options with defaults
                $width = isset($config['width']) ? $config['width'] : 50;
                $height = isset($config['height']) ? $config['height'] : 50;
                $options = isset($config['options']) ? $config['options'] : [];
                $fallback = isset($config['default']) ? $config['default'] : null;

                // Handle attachMany relationships
                if (isset($record->attachMany[$column->columnName])) {
                    $image = $value->first();

                    // Handle attachOne relationships
                } elseif (isset($record->attachOne[$column->columnName])) {
                    $image = $value;

                    // Handle absolute URLs
                } elseif (str_contains($value, '://')) {
                    $image = $value;

                    // Handle embedded data URLs
                } elseif (starts_with($value, 'data:image')) {
                    $image = $value;

                    // Assume all other values to be from the media library
                } elseif (!empty($value)) {
                    $image = MediaLibrary::url($value);
                }

                if (!$image && $fallback) {
                    $image = $fallback;
                }

                if ($image) {
                    // $imageUrl = ImageResizer::filterGetUrl($image, $width, $height, $options);
                    // 🔥 KEY POINT: replace to this:
                    $imageUrl = $value->getThumb($width, $height, $options);
                    return "<img src='$imageUrl' width='$width' height='$height' />";
                }
            },
        ];
    }
}

columns:
    # ...
    image:
        label: image
        type: thumbnail
        options:
            mode: crop

@lackneets can you try replacing the problem lines in ImageResizer.php with the following:
// Ensure that a properly encoded URL is returned
$url = \Winter\Storm\Router\UrlGenerator::buildUrl($url);

@lackneets are you able to test my proposed fix? If it works I can merge it. Otherwise it'll have to wait until I or someone else can reproduce the original issue and test the fix.


Experience Page Responsiveness Bug in Mobile Screens

Hi, could you please explain a little bit more on what aspects of the experience page responsiveness you to improve? Thanks a lot.
Also, I would live to work on this issue as a part of OSD 2021! :)

Basically the work experience and open source card sizes and positions

Hey, I have been actually trying on my end, but the open source and experience cards seem to be aligned in the middle itself and therefore, the position looks untethered here. The screenshots are from Galaxy mobile device emulations and I also tried Pixel 2 like in your sc but I don't get zoomed in cards actually, there is ample margin in the right side. Could you kindly suggest me some media query breakpoints in which I could reproduce this? Thanks.

enter values like 471 and 731 in the resolution box or select the pixel2 device

Okay okay thanks.
On Sun, 18 Jul 2021, 01:18 Anush Bhatia, @.***> wrote:

enter values like 471 and 731 in the resolution box or select the pixel2
device
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/smaranjitghose/awesome-portfolio-websites/issues/961#issuecomment-881950914,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP4BD7ZJRG6EVJBNBZAK63DTYHM7BANCNFSM5AOOLJHQ
.

Sorry, but I am still unable to see it. @smaranjitghose @anushbhatia However, I will reduce the card sizes anyway and make the pr. Will that be okay?

Try pixel 2 411* 731 100% i can see this

@anushbhatia please check my above screenshots, I tried the resolution and device that you mentioned only.
I am not seeing that.

I think then this must be resolved look for other pages if you find something you can raise an issue.


DeviceGroup class should remove method .add_child_device(), which is confusing and also leads to incorrect behaviors

Method .add_child_device() should be removed from DeviceGroup, as DeviceGroup uses .add_child_asset() to associate a device with the group. Using DeviceGroup.add_child_device() for this purpose is very confusing and the results seems also incorrect as stated in below issue 1.
Issue 1.

when use DeviceGroup.add_child_device(), the added device is not shown in the group from the tenant. However, deleting the group and its assets will also delete the device. This is very confusing.

Issue 2.

After execute DeviceGroup.add_child_asset(), the attributes of the DeviceGroup .child_assets are still empty, which seems not right.

I agree  - this is very confusing. A device group is not a device as such, hence it can't have child "devices" and the method can't be used in sensible manner. However, devices as well as device groups are created through the Inventory API which does not prevent you from doing these things.
As described here, the Python API aims to be close to the REST API which no magic happening in the background. In short: as the REST API allows this, so does the Python API.
But I do get the point - I'll take this and will think of a nice way to make this clearer to the users.


Implement adjoint autodiff for mesolve

I suggest reviewing commit by commit.
I am not happy about everything, but the main idea is here. In particular, I'm not sure about commit c04e4b289d23d7e3ad56c715730f441ff7c7f500 and the QSolver organization (with the flag inside ODEIntAdjoint.backward). I'm down for suggestions.
Also I have not tested it, so a few bugs here and there might remain. But I've got a similar implementation for my own project that works. I will write a test function at some point.

EDIT: I have refactored the code in a better way. I'm now much more happy with the implementation. Instead of the backward pass going back into odeint_main, it now has a dedicated backward ode integrator. It helps a lot readability, but also avoids overloading the various odeint functions.
When calling odeint(..., gradient_alg='adjoint',...), the following calls are sequentially made:

Forward pass: odeint --> _odeint_adjoint --> ODEIntAdjoint.forward --> _odeint_inplace --> _odeint_main --> _fixed_odeint/_adaptive_odeint --> qsolver.forward
Backward pass: odeint --> _odeint_adjoint --> ODEIntAdjoint.backward --> _odeint_augmented_main --> _fixed_odeint_augmented/_adaptive_odeint_augmented --> qsolver.backward_augmented

For reviewing, it might now be better to look at all commits at once, and to start from odeint.py before reading mesolve.py.

I will review this along #41 tomorrow @gautierronan.


support nfs on aws

LGTM.

I am confused by this new variables (CREATE_EFS_STORAGE_CLASS and CREATE_NFS_STORAGE_CLASS). Looking at the logic, you can do the same with the existing variables.
Ex.
https://github.com/sassoftware/viya4-deployment/blob/156b77a444cdc4bcf3f3f2d4aa77e5ae0b78a90d/roles/baseline/tasks/main.yml#L12
change to
- V4_CFG_EFS_FSID is defined
- V4_CFG_EFS_REGION is defined

it's just a suggestion, to communicate what is needed here. It's your project.
I'll send another commit


Add a missing test in logger.go

A test for the related lines was currently missing.

Coverage remained the same at 90.545% when pulling cc87d99fe5307261399a8a37ca923ea14a9f9add on magikstm:Add-Test-In-Logging-1 into cd718ade49acce53135107c302de94f75895c91f on tarent:master.

This PR is replaced by #76. I pushed by error the wrong version of the file I wanted to push.


Unicode support

We decided when implementing python3 that unicode support wasn't worth it, but I think it's time now. I'm putting this issue here to track progress on unicode support specifically for message contents in consumers and producers across both python 2 and 3. Supporting unicode for other things like topic names is less important, but there are a lot of cases where users want to send unicode in messages.

It seems our hands are somewhat tied here: if we would accept and encode unicode payloads, afaict there's no field in the kafka message to convey what encoding was used? So on the one hand I also feel that it's terribly clunky that users currently have to encode to a bytes object before producing, and have to decode what they get from consume(), but on the other hand this just expresses the fact that the kafka protocol is ignorant about encodings.
As for topic and group names: it would be quite doable to start accepting a py3 str for those - all we need to check is that all the characters are in the allowed subset (it's a very small set) and we could throw a custom error if not.

You're right about that - there's no way to get information about the message encoding if pykafka is consuming from a producer that's not pykafka. In that case I think there's not much to do. However, in the case where both sides are pykafka, what we can do is have the producer put some field in the message payload indicating the encoding and have the consumer check for that field and decode if necessary. The trick would be to figure out a way to indicate the encoding that would likely never be included in random messages in the wild. Maybe a pattern of 0x000x01's followed by the encoding string.
I actually like the py3 str idea for topic and group names. It's just more convenient for py3 users, and there isn't really a downside if we raise a custom exception for disallowed characters.

The idea of padding a message payload gives me bad feelings. It reduces interoperability between different consumers in kafka cluster and strikes me as magical. Another approach is to give hooks for users to register SerDe's. This is the approach samza takes and it gives maximum flexibility without touching the bytes in kafka.
Basically you could register a de/serializer for you producer/consumer.
def my_custom_serializer(msg):
    """"Transforms all msg fields into raw bytes"""
    msg.value = json.dumps(msg.value).encode()

def my_custom_deserializer(msg):
    """"Transforms msg fields into python objects"""
    msg.value = json.loads(msg.value.decode())

topic.get_producer(deserializer=my_custom_serializer)
topic.get_consumer(serializer=my_custom_deserializer)

I like the py3 string idea for topics and group names. Right now the byte casting in zookeeper creates some fud that could be cleanup.
Here is screen shot from a zookeeper cluster:

Now you could separate the value and key serde. something like
also you could use a lambda for simple stuff
p = topic.get_producer(value_serializer=lambda v: v.encode(), key_serializer=lambda k: k.encode())
p.produce('unicode fun!', 'also unicode key')

Here is the link to the samza docs:
https://samza.apache.org/learn/documentation/0.7.0/container/serialization.html

+1 about not padding messages.  It also gives me bad feelings. :)
On Wed, Jan 20, 2016 at 7:06 PM, John Dennison<EMAIL_ADDRESS>wrote:

The idea of padding a message payload gives me bad feelings. It reduces
interoperability between different consumers in kafka cluster and strikes
me as magical. Another approach is to give hooks for users to register
SerDe's. This is the approach samza takes and it gives maximum flexibility
without touching the bytes in kafka.
Basically you could register a de/serializer for you producer/consumer.
def my_custom_serializer(msg):
""""Transforms all msg fields into raw bytes"""
msg.value = json.dumps(msg.value).encode()
def my_custom_deserializer(msg):
""""Transforms msg fields into python objects"""
msg.value = json.loads(msg.value.decode())
topic.get_producer(deserializer=my_custom_serializer)
topic.get_consumer(serializer=my_custom_deserializer)
I like the py3 string idea for topics and group names. Right now the byte
casting in zookeeper creates some fud that could be cleanup.
Here is screen shot from a zookeeper cluster:
[image: image]
https://cloud.githubusercontent.com/assets/800669/12467391/1b908738-bf98-11e5-8c08-4e0706b1da5d.png
—
Reply to this email directly or view it on GitHub
https://github.com/Parsely/pykafka/issues/405#issuecomment-173408183.

Regarding SerDes: what's also neat is that they would allow (optionally) integrating with  http://docs.confluent.io/2.0.0/schema-registry/docs/intro.html

I just started using pyKafka and ran into the topic encoding "surprise". Some thoughts:
For topic and group names it shouldn't be a problem: all acceptable characters are in the ASCII range so converting between str and bytes is easy.
For sending messages it's also not that hard: we could default to using UTF-8 encoding to convert to bytes when a str is sent (on Py3, on Py2 we can do the same for unicode). That would probably work for most users, and users that want control can send bytes. Sending str is then just a convenience.
The receiving side is harder: we could try to decode UTF-8, but then some messages might accidentally be valid UTF-8 and the user won't be able to rely on what they are getting. Wanting to receive bytes and then suddenly getting a str because the bytes happen to be valid UTF-8...
And I think we should keep the API symmetrical. If we can't automatically determine the right thing to do on the receiving side we shouldn't do 'magic' stuff on the sending side. Otherwise users will be surprised when they send strings but receive bytes.
And then we end up at jofusa's suggestion :-)

Thanks for the comment @steffann. This is a prime candidate for a community contribution, especially from anyone on this thread who is interested in starting a PR for this work.

I'll do some work on this in the next couple of days and propose some code

It's taking longer than I expected due to some other projects I am working on. Just want to let everyone know I'm still working on this!

Thanks for the update!
On Sun, Jul 24, 2016 at 8:22 AM, Sander Steffann<EMAIL_ADDRESS>wrote:

It's taking longer than I expected due to some other projects I am working
on. Just want to let everyone know I'm still working on this!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/Parsely/pykafka/issues/405#issuecomment-234783053,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAsKn64gNi4sM6w3lkL3UtAYKpaw1svCks5qY4MggaJpZM4G6wEF
.

--
Emmett Butler | Software Engineer
http://www.parsely.com/?utm_source=Signature&utm_medium=emmett&utm_campaign=Signature

@emmett9001 and @steffann -
Did anything ever come of this? I just started using pykafka to read from a jdbc source (SQL Server) and am having all sorts of crazy decoding issues.

I'm not sure what @steffann's status is on this project, but this is not a high priority for us at @parsely. For the time being, I can recommend converting all data to a known bytestring encoding before giving it to pykafka.


Changing favicon

How do I change the big 'A' favicon to a custom one? Another issue was raised about this but she/he closed it without updating. Thanks in advance!

Nevermind, I'm just stupid: https://sourcethemes.com/academic/docs/customization/#website-icon


HL-820 | Batch Talpa / P2P inspector's and checker fields

Description :sparkles:
Add three new fields to mark a batch to Talpa. Rename files to make room for the next ticket.
Intentionally left a TODO text after the form submission because the work will continue on a separate ticket HL-854.

Codecov Report

Merging #2133 (c57e6dd) into develop (25d8875) will decrease coverage by 18.80%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##           develop    #2133       +/-   ##
============================================
- Coverage    33.04%   14.25%   -18.80%
============================================
  Files          773      156      -617
  Lines        15055     4280    -10775
  Branches      3199     1077     -2122
============================================
- Hits          4975      610     -4365
+ Misses        9587     3521     -6066
+ Partials       493      149      -344

Impacted Files
Coverage Δ

...c/components/batchProcessing/BatchActionsDraft.tsx
0.00% <0.00%> (ø)

...ponents/batchProcessing/BatchActionsInspection.tsx
0.00% <0.00%> (ø)

...omponents/batchProcessing/BatchApplicationList.tsx
0.00% <0.00%> (ø)

...onents/batchProcessing/useBatchActionsInspected.ts
0.00% <0.00%> (ø)

...end/benefit/handler/src/hooks/useBatchInspected.ts
0.00% <0.00%> (ø)

... and 712 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

EMPLOYER branch is deployed to platta: https://kesaseteli-pr2133.dev.hel.ninja :rocket::rocket::rocket:

HANDLER branch is deployed to platta: https://handler-pr2133.dev.hel.ninja :rocket::rocket::rocket:

API branch is deployed to platta: https://kesaseteli-pr2133.api.dev.hel.ninja/healthz :rocket::rocket::rocket:

YOUTH branch is deployed to platta: https://youth-pr2133.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://handler-pr2133.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://kesaseteli-pr2133.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://youth-pr2133.dev.hel.ninja :laughing::tada::tada::tada:

EMPLOYER branch is deployed to platta: https://kesaseteli-pr2133.dev.hel.ninja :rocket::rocket::rocket:

HANDLER branch is deployed to platta: https://handler-pr2133.dev.hel.ninja :rocket::rocket::rocket:

YOUTH branch is deployed to platta: https://youth-pr2133.dev.hel.ninja :rocket::rocket::rocket:

TestCafe result is success for https://handler-pr2133.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://kesaseteli-pr2133.dev.hel.ninja :laughing::tada::tada::tada:

TestCafe result is success for https://youth-pr2133.dev.hel.ninja :laughing::tada::tada::tada:


Add missing variables to settings.

When I tried to restore the backup that was created it was not getting the right one.

Can you add a test for confirm that's work ?
Or add an issue for it ?

I don't think this is a cause of errors in the current master branch.
Only occurrences are here:
https://github.com/django-dbbackup/django-dbbackup/blob/master/dbbackup/dbcommands.py#L51
https://github.com/django-dbbackup/django-dbbackup/blob/master/dbbackup/dbcommands.py#L82
https://github.com/django-dbbackup/django-dbbackup/blob/master/dbbackup/dbcommands.py#L166
All of them use getattr... but the fix is nice, you should just remove getattr in the above mentioned, otherwise it's sort of repeating the same pattern two different places.

The reason for doing this was because I was testing the creation of backup and doing a restore after that.
I have a MySQL database and the backup created had a 'mysql' extension. When I tried to restore it it could not find the backup. So I started looking for an error and figured out that the code was only looking for a 'backup' extension.
To keep the pattern of the code i added the 3 lines. I admit it is not the most elegant but it is reading the constants from the same file as BACKUP_DIRECTORY.

To be clear: there were no error when I was running the backup or restore.
The problem was that it was not picking up the right extension.

@balavec are you running from the master branch or a release?

@benjaoming I was running from a release. Thanks for reminding me.

I honestly don't think this issue is valid on current master, @balavec could you try that instead?

I think you are right. I will cancel the pull request.

Alright, cool, but thanks for caring :)


Getting Black UI

When I select a particular company, (1) I get this black screen. (2) The question is not turning to green color as mentioned.

Leetcode recently did changes to the ui darkmode, so i had to disable white background and made it dark, so darkmode users can see it perfectly. I know lot of users use it in light mode so i'm gonna fix it as soon i can and let you know.

Premium problems not turning green where? In the company box or in the problem list at https://leetcode.com/problemset/all/?premium=true&page=1 . Did you refresh the page? Can you provide with more info with this one? It's still working for me. Check my tutorial, it could help https://www.youtube.com/watch?v=5oZMsPbBljo

@Laksmi1940

@Laksmi1940
✅Fixed the problem 1. https://github.com/31b4/Leetcode-Premium-Bypass/releases/tag/1.0.4
Let me know if its good now, and please provide with more information about the second issue.

I appreciate your effort. Its working now. Thank you so much. I think this current versions(1.0.4) working fine.

@Laksmi1940 stay tuned, we are about to fix companies tag button on problems and editorial


Can't create new account login

Can't create a new/current login because after pressing 'create login' it opens and closes gw2 launcher and nothing happens after that.
Running v3.0.5

I haven't tried or needed to create a new login on 3.0.5. Having said that, 3.0.5 has an issue with updating existing accounts whenever there's a new GW2 patch. Solution for that is to download the older Launchbuddy Version 2.4.2 and use it to update your gw2.dat files. Then once updated, you can go back to using the latest version. Not sure if the same solution would work for creating new logins, worth a try.


Revert "Replace NSCoding with NSSecureCoding"

Reverts firebase/firebase-ios-sdk#7831
Looks like this is the one breaks the Encoding/Decoding as the GULSecureCoding doesn't offer overwriting the class. Considering the code change is significant, it's less risk to revert this change and fix the secure coding on top of the original implementation.

The unit test didn't capture this. So we change Messaging from read/write to IIDTokenInfo to MessagingTokenInfo. We need a test like IID call deleteToken and then Messaging try to read the token.


plugins/otter: add autoActivate

Resolves https://github.com/nix-community/nixvim/issues/2111

@mergifyio queue


Strange example #96 - Changing miaViz documentation example

Did you edit the file in man/ directory directly?
The documentation uses roxygen2 and these texts should be changed in the corresponding R/ file headers. The man/ contents are automatically generated with devtools::document()

Ah ok - yes I did (sorry never worked with this before), I'll make that change now and edit the yplot


Documentation improvement #335

This PR implements the docstring issues addressed in #335.

I checked all other occurrences of surface_tilt and think the docstring only needs to be changed in the PVSystem class.
I will also add the default values to the docstrings in the next days.

I added the default values in modelchain.py. I looked how default values are added in other libraries such as numpy, pandas, etc. but there doesn't seem to be one common way. I chose the numpy way but can change it if you like. When we agree on how we want the default values to appear in the docstring, I can also add them to the other modules.

I could also change the orientation_strategy default (#290) if you like. Should this be done in a new PR?

I don't have any preference on the style. Maybe others can chime in if they care. There are a couple of pvlib functions that already have defaults, and I think they're in the pandas style.
#290 should be done in a separate PR.

I added all default values in pandas style. Just let me know if there is anything you don't agree with.

Thanks, @birgits, this is great. Can you add a note and your name to the 0.4.6 whatsnew file?

The failing tests are not related to this PR, so I will go ahead and merge.


(Flutter) Open Devtools does not work (error code 127)

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version:

Version: 1.57.1 (Universal)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:32.912Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 20.4.0

OS Version:  Mac 11.3.1(20E241)

Steps to Reproduce:

Open VS Code
Second image error message (about code 127) is shown
If I use 'shift + command + p' -> Select OpenDevtools -> First image error occurs

How can I use the devtools?
I can't find the solution for this.
Please help me....

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.
Happy Coding!


Front-end required for this project

This project is yet under construction.
I will be adding a front-end web page which will demonstrate this project using Flask for real-time application .
This is very important part of our machine learning model.
⭐star this repository for getting updates and further changes made in this project.

Issue  solved via #2  pull request.
Merged #2 pull request.


Add pagination data to useImperativeHandle to be accessed externally

Need: To access pagination info externally
tableEventsRef.current.pagination

I, hmmm, I don't think this is the correct design decision? Back then I agreed to use useImperativeHandle despite the fact that it was an anti-pattern, because I thought it was only to "execute order from outside".
But, if we add states into it, I think it can get pretty messy later. I propose this: useDatatableWrapper is now import-able from react-bs-datatable. We can then do this:
function SortStateComponent() {
  const { sortState, onSortByPropChange } = useDatatableWrapper();

  return (

      Sort state

{JSON.stringify(sortState)}

      <button onClick={() => onSortByPropChange("name")}>
        External sort by name
      </button>
      <button onClick={() => onSortByPropChange("username")}>
        External sort by username
      </button>

  );
}

// render the table...
<DatatableWrapper
  body={TABLE_BODY}
  headers={STORY_HEADERS}
  paginationOptionsProps={{
    initialState: {
      rowsPerPage: 10,
      options: [5, 10, 15, 20]
    }
  }}
>
  <SortStateComponent />
</DatatableWrapper>

Sample demo: https://codesandbox.io/s/react-bs-datatable-3-1-1-alpha-1-h1g890?file=/src/App.js
Please let me know what do you think about this. I think this is a fairly more simpler approach and more superior than the refs approach that I chose before, because we can now access all of the table's states and functions.

@imballinst You are right, this is much better, and more useful.

@ahmetunal alright, cool! I will release 3.1.1 today with the useDatatableWrapper function exported and will get post a comment here once it is published. Thanks for the confirmation!

@ahmetunal I just published it, but instead of 3.1.1, it's 3.2.0, considering it technically is a new "feature", in a way. Sample sandbox: https://codesandbox.io/s/red-snow-himjbq.
Let me know if you have any feedback regarding this. Thanks! I am closing this PR for now.

@imballinst, thank you.


errors while loading  library

I add the project key "1ReeQ6WO8kKNxoaA_O0XEQ589cIrRvEBA9qcWpNqdOP17i47u6N9M5Xh"
to library, select version.
But library  fail to load.  with many errors like
null [1787]
.....
__webpadk_required
This can't be use on GAS web editor?
Any ideas?

It is related issue #4 .


pull request for e2e test at 12/03/2016 07:45:03

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Run local

Test name
Status

init-deploy
passed

big-data
failed

recreate
passed

scaling
passed

scaling-proxysql
passed

restore-to-encrypted-cluster
failed

upgrade
passed

demand-backup
failed

upgrade-consistency
passed

security-context
failed

limits
passed

monitoring
passed

monitoring-2-0
passed

affinity
passed

one-pod
failed

scheduled-backup
failed

auto-tuning
failed

demand-backup-encrypted-with-tls
failed

proxysql-sidecar-res-limits
passed

users
failed

PR doesn't work, please fix and open again


camera zooming in

just when i hit the first note the camera zooms in and the arrows plus the healthbar is half visible.
before:

after:

probably a bug with the mod you're playing. report the bug to mod creators first and if they say it's a KE bug then reopen the issue and include their reply


chore: RC latest changes.

Do we want to continue with 1.5 or begin with 1.6? I mean if this is still multitenancy related...

@obdulia-losantos Still MT related. I wouldn't merge the extractor changes as that's major, but the producer changes are required to launch the MT prod instance on CCloud. I think you're right that this might well be the last release on 1.5.


How to properly handle iframe "swaps" (FrameDetached, Reason "swap")?

Environment

Component
Version

Node.js
v18.12.0

Client (Chrome/Chromium/...)
124.0.6367.79

OS running Node.js
Windows 11

OS running the client
Windows 11

chrome-remote-interface
v0.33.0

Is the client running in a container? NO
Description
I am trying to read all frames via Page.getFrameTree(). It works at the start. The frames are all visible. But after a short moment a FrameDetached, Reason: swap-event is fired.
Now the question is, how to “handle” this correctly?
http://<IP_ADDRESS>:9222/json/list shows the correct IFrames. However, Page.getFrameTree() does not - although I would expect it to.
Unfortunately, this topic has not (yet) been dealt with here. Puppeteer seems to have found a way to do this, but I couldn't find the right place in the code base. Probably because Puppeteer pays attention to Target.targetCreated at the same time?
It also feels as if the IFrame is a “separate process”. If I connect directly via CDP({ target: webSocketDebuggerUrl }) (while webSocketDebuggerUrl is the url to the IFrame; parentId is the page which contains that IFrame), then it works.
Example

const CDP = require('chrome-remote-interface');

async function main() {
    // I don't have an example (yet).
}

main().catch((error) => {
  console.error(error);
});

Well, the protocol is the same, so whatever works in Puppeteer, should work here too. The protocol however is complex, mostly experimental, and I have nothing to do with that. Whenever I face similar issues I just read the terrible documentation available and I proceed by trials and errors.
Having said that, it's not clear to me what your problem is... You can register for events and react the way you want. You can CDP.List targets and connect to them. However if you plan to interact with multiple targets, I think it's better to connect to the browser target, certain things are not available via regular targets IIRC.


Agent seen to delete broker queues on restart

I've seen this issue a couple of times whilst test 0.26.x and master.   I had two queues defined myqueue1 and myqueue3 with a plan that required no sharding.  Admin pod was bounced. On start-up, agent deleted the two queues (confirmed by looking at the Artemis console), then a few moments later recreated them.
You can see from the log below that the Agent knew the addresses were assigned to broker-r26pbiyo1b-j5dv-0, but yet it still went on to the delete the queues.
Oslo:enmasse keith$ oc logs admin.r26pbiyo1b-59684b97d7-g8td2 -c agent -f
2019-08-08T00:06:03.134Z agent INFO  GET /apis/user.openshift.io => 200
2019-08-08T00:06:03.169Z agent INFO  GET
/oapi/v1/namespaces/enmasse-infra/routes/messaging-r26pbiyo1b => 403
2019-08-08T00:06:03.169Z agent INFO  could not retrieve messaging route hostname
2019-08-08T00:06:03.205Z agent INFO  GET
/api/v1/namespaces/enmasse-infra/configmaps?labelSelector=type%3Daddress-config%2CinfraUuid%3Dr26pbiyo1b
=> 200
2019-08-08T00:06:03.221Z agent INFO  GET
/api/v1/watch/namespaces/enmasse-infra/configmaps?labelSelector=type%3Daddress-config%2CinfraUuid%3Dr26pbiyo1b
=> 200
2019-08-08T00:06:03.308Z agent INFO  KWDEBUG addresses updated:
[{"metadata":{"name":"enmasse-infra.standard.myqueue1","namespace":"enmasse-infra","selfLink":"/api/v1/namespaces/enmasse-infra/configmaps/enmasse-infra.standard.myqueue1","uid":"8f882e78-b96b-11e9-bed7-6aa675706f0a","resourceVersion":"4511728","creationTimestamp":"2019-08-07T23:32:03Z","labels":{"addressType":"queue","infraType":"any","infraUuid":"r26pbiyo1b","type":"address-config"},"annotations":{"addressSpace":"standard","enmasse.io/applied-plan":"standard-small-queue"}},"data":{"config.json":"{\"kind\":\"Address\",\"apiVersion\":\"enmasse.io/v1beta1\",\"kind\":\"Address\",\"metadata\":{\"annotations\":{\"enmasse.io/applied-plan\":\"standard-small-queue\"},\"creationTimestamp\":\"2019-08-07T23:32:03Z\",\"labels\":{\"addressType\":\"queue\"},\"name\":\"standard.myqueue1\",\"namespace\":\"enmasse-infra\",\"selfLink\":\"/apis/enmasse.io/v1beta1/namespaces/enmasse-infra/addressspaces/standard\",\"uid\":\"8f882e78-b96b-11e9-bed7-6aa675706f0a\"},\"spec\":{\"address\":\"myqueue1\",\"type\":\"queue\",\"plan\":\"standard-small-queue\"},\"status\":{\"phase\":\"Active\",\"messages\":[],\"brokerStatuses\":[{\"clusterId\":\"broker-r26pbiyo1b-j5dv\",\"containerId\":\"broker-r26pbiyo1b-j5dv-0\",\"state\":\"Active\"}],\"planStatus\":{\"name\":\"standard-small-queue\",\"partitions\":1,\"resources\":{\"broker\":0.01,\"router\":0.001}},\"isReady\":true}}"}},{"metadata":{"name":"enmasse-infra.standard.myqueue3","namespace":"enmasse-infra","selfLink":"/api/v1/namespaces/enmasse-infra/configmaps/enmasse-infra.standard.myqueue3","uid":"61064e84-b96f-11e9-bed7-6aa675706f0a","resourceVersion":"4518371","creationTimestamp":"2019-08-07T23:59:23Z","labels":{"addressType":"queue","infraType":"any","infraUuid":"r26pbiyo1b","type":"address-config"},"annotations":{"addressSpace":"standard","enmasse.io/applied-plan":"standard-small-queue"}},"data":{"config.json":"{\"kind\":\"Address\",\"apiVersion\":\"enmasse.io/v1beta1\",\"kind\":\"Address\",\"metadata\":{\"annotations\":{\"enmasse.io/applied-plan\":\"standard-small-queue\"},\"creationTimestamp\":\"2019-08-07T23:59:23Z\",\"labels\":{\"addressType\":\"queue\"},\"name\":\"standard.myqueue3\",\"namespace\":\"enmasse-infra\",\"selfLink\":\"/apis/enmasse.io/v1beta1/namespaces/enmasse-infra/addressspaces/standard\",\"uid\":\"61064e84-b96f-11e9-bed7-6aa675706f0a\"},\"spec\":{\"address\":\"myqueue3\",\"type\":\"queue\",\"plan\":\"standard-small-queue\"},\"status\":{\"phase\":\"Active\",\"messages\":[],\"brokerStatuses\":[{\"clusterId\":\"broker-r26pbiyo1b-j5dv\",\"containerId\":\"broker-r26pbiyo1b-j5dv-0\",\"state\":\"Active\"}],\"planStatus\":{\"name\":\"standard-small-queue\",\"partitions\":1,\"resources\":{\"broker\":0.01,\"router\":0.001}},\"isReady\":true}}"}}]
2019-08-08T00:06:03.310Z agent INFO  KWDEBUG changes:
{"added":[{"address":"myqueue1","type":"queue","plan":"standard-small-queue","status":{"phase":"Active","messages":[],"brokerStatuses":[{"clusterId":"broker-r26pbiyo1b-j5dv","containerId":"broker-r26pbiyo1b-j5dv-0","state":"Active"}],"planStatus":{"name":"standard-small-queue","partitions":1,"resources":{"broker":0.01,"router":0.001}},"isReady":true},"name":"standard.myqueue1","allocated_to":[{"clusterId":"broker-r26pbiyo1b-j5dv","containerId":"broker-r26pbiyo1b-j5dv-0","state":"Active"}]},{"address":"myqueue3","type":"queue","plan":"standard-small-queue","status":{"phase":"Active","messages":[],"brokerStatuses":[{"clusterId":"broker-r26pbiyo1b-j5dv","containerId":"broker-r26pbiyo1b-j5dv-0","state":"Active"}],"planStatus":{"name":"standard-small-queue","partitions":1,"resources":{"broker":0.01,"router":0.001}},"isReady":true},"name":"standard.myqueue3","allocated_to":[{"clusterId":"broker-r26pbiyo1b-j5dv","containerId":"broker-r26pbiyo1b-j5dv-0","state":"Active"}]}],"removed":[],"modified":[],"description":"initial
[\"myqueue1\",\"myqueue3\"]"}
2019-08-08T00:06:03.310Z agent INFO  addresses_defined: initial
["myqueue1","myqueue3"]
2019-08-08T00:06:03.311Z agent INFO  addresses_ready: initial
["myqueue1","myqueue3"]
2019-08-08T00:06:03.462Z agent INFO  GET
https://openshift.default.svc/.well-known/oauth-authorization-server
=> 200
2019-08-08T00:06:03.481Z agent INFO  Console listening on port 8080
2019-08-08T00:06:03.491Z agent INFO  Connecting to MESSAGING service
with host: messaging-r26pbiyo1b, port: 55671, container:
admin.r26pbiyo1b-59684b97d7-g8td2, id: agent-1
2019-08-08T00:06:03.511Z agent INFO  Router agent listening on 55671
2019-08-08T00:06:03.544Z agent INFO  [stats:qdrouterd-r26pbiyo1b-0] router ready
2019-08-08T00:06:03.589Z agent INFO  routers:
amqp:/_topo/0/qdrouterd-r26pbiyo1b-0/$management
2019-08-08T00:06:03.589Z agent INFO  GET
/api/v1/namespaces/enmasse-infra/pods?labelSelector=role%3Dbroker%2CinfraUuid%3Dr26pbiyo1b
=> 200
2019-08-08T00:06:03.594Z agent INFO  GET
/api/v1/watch/namespaces/enmasse-infra/pods?labelSelector=role%3Dbroker%2CinfraUuid%3Dr26pbiyo1b
=> 200
2019-08-08T00:06:03.718Z agent INFO  added pod
{"name":"broker-r26pbiyo1b-j5dv-0","host":"<IP_ADDRESS>","phase":"Running","annotations":{"address":"","addressSpace":"standard","cluster_id":"broker-r26pbiyo1b-j5dv","openshift.io/scc":"restricted","prometheus.io/path":"/metrics","prometheus.io/port":"8080","prometheus.io/scrape":"true"},"ready":"True","ports":{"broker":{"amqp":5673,"jolokia":8161,"artemismetrics":8080}}}
2019-08-08T00:06:04.425Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
connection opened
2019-08-08T00:06:04.474Z agent INFO  [broker-r26pbiyo1b-j5dv-0] ready
to send requests, reply to address:
activemq.management.tmpreply.64b9b2bf-8222-9b46-b472-f576833018bc
2019-08-08T00:06:33.508Z agent INFO  Heap statistics :
{"total_heap_size":18636800,"total_heap_size_executable":2621440,"total_physical_size":15947728,"total_available_size":1509592496,"used_heap_size":13542312,"heap_size_limit":1526909922,"malloced_memory":16384,"peak_malloced_memory":1583328,"does_zap_garbage":0}
2019-08-08T00:06:34.855Z agent INFO  [broker-r26pbiyo1b-j5dv-0] broker
controller ready
2019-08-08T00:06:34.855Z agent INFO  broker broker-r26pbiyo1b-j5dv-0 connected
2019-08-08T00:06:34.926Z agent INFO  [broker-r26pbiyo1b-j5dv-0] ready
to send requests, reply to address:
activemq.management.tmpreply.c47f507e-3527-e841-981d-c0b4c6bee19c
2019-08-08T00:06:34.949Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleting queue "myqueue1"...
2019-08-08T00:06:34.950Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleting queue "myqueue3"...
2019-08-08T00:06:34.951Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleting queue "activemq.management.tmpreply.ceaec6f0-1fef-b54a-933f-86d05299e209"...
2019-08-08T00:06:34.952Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleting queue "activemq.management.tmpreply.0a8ec7d4-6429-8642-93f8-77a918ebae71"...
2019-08-08T00:06:35.048Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleted queue "myqueue1"
2019-08-08T00:06:35.049Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleted queue "myqueue3"
2019-08-08T00:06:35.049Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleted queue "activemq.management.tmpreply.ceaec6f0-1fef-b54a-933f-86d05299e209"
2019-08-08T00:06:35.049Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
Deleted queue "activemq.management.tmpreply.0a8ec7d4-6429-8642-93f8-77a918ebae71"
2019-08-08T00:06:35.062Z agent INFO  [broker-r26pbiyo1b-j5dv-0]
addresses are synchronized

#3098

I believe I understand this issue.  It is a race between between the delivery of the address_readyevent and the completion of the server_promise future in agent.js.  If the address_ready event fires before the serverPromise completes, then the problem occurs - the router agents and broker controllers remove the addresses because they believe there are current 0 addresses defined.
I have an idea for a fix...  overide AddressSource#on so that it calls the original emitter.on implementation and, if this.addresses != undefined, additionally iterate emitter.listeners(eventName) and call the listeners that are already attached to the event.

I think the issue is that the introduction of the server_promise future in agents.js means that the ragent can miss the first address update (as it is only bound to the event source once server_promise completes). This in turn means that when brokers and routers connect, the addresses have not been seen by ragent, hence it assumes there are no addresses.
I think the simplest fix might be to simply move the initialisation of the address event source to after server_promise completes. That reverts to the same ordering as before the introduction of the server_promise into the sequence. E.g. something like this (completely untested):
diff --git a/agent/bin/agent.js b/agent/bin/agent.js
index 23a320d63..b063f4911 100644
--- a/agent/bin/agent.js
+++ b/agent/bin/agent.js
@@ -47,6 +47,7 @@ function start(env) {
             }

             server_promise.then(() => {
+                address_source.start();
                 if (env.ADDRESS_SPACE_TYPE === 'brokered') {
                     bind_event(address_source, 'addresses_defined', console_server.metrics);
                     console_server.listen_health(env);
diff --git a/agent/lib/internal_address_source.js b/agent/lib/internal_address_source.js
index 02e447c39..6f93b4cf0 100644
--- a/agent/lib/internal_address_source.js
+++ b/agent/lib/internal_address_source.js
@@ -142,13 +142,16 @@ function AddressSource(config) {
     if (config.INFRA_UUID) {
         selector += ",infraUuid=" + config.INFRA_UUID;
     }
-    var options = myutils.merge({selector: selector}, this.config);
     events.EventEmitter.call(this);
+}
+
+AddressSource.prototype.start = function () {
+    var options = myutils.merge({selector: selector}, this.config);
     this.watcher = kubernetes.watch('configmaps', options);
     this.watcher.on('updated', this.updated.bind(this));
     this.readiness = {};
     this.last = {};
-}
+};

 util.inherits(AddressSource, events.EventEmitter);

It would also probably be worth adding a flag to lib/ragent.js to track the first setting of addresses, and not to do any syncing until that has been set. E.g. (again untested):
diff --git a/agent/lib/ragent.js b/agent/lib/ragent.js
index a5a63d3f9..f7702d568 100644
--- a/agent/lib/ragent.js
+++ b/agent/lib/ragent.js
@@ -63,6 +63,7 @@ function Ragent() {
     this.configure_handlers();
     this.status = new events.EventEmitter();
     this.disable_connectivity = false;
+    this.addresses_initialised = false;
 }

 Ragent.prototype.subscribe = function (context) {
@@ -156,6 +157,7 @@ function is_valid_address_definition(def) {
 }

 Ragent.prototype.sync_addresses = function (updated) {
+    this.addresses_initialised = true;
     this.addresses = updated.filter(is_valid_address_definition);
     log.debug('addresses updated: %j', this.addresses);
     this.addresses_updated();
@@ -342,7 +344,9 @@ Ragent.prototype.configure_handlers = function () {
                 router.retrieve_listeners();
                 router.retrieve_connectors();
                 router.on('synchronized', self.on_synchronized.bind(self));
-                router.sync_addresses(self.addresses);
+                if (self.addresses_initialised) {
+                    router.sync_addresses(self.addresses);
+                }
                 router.on('listeners_updated', self.connected_routers_updated.bind(self));//advertise only once have listeners
                 router.on('connectors_updated', self.check_router_connectors.bind(self));
                 router.on('provisioned', self.check_router_connectors.bind(self));
@@ -351,7 +355,9 @@ Ragent.prototype.configure_handlers = function () {
             var broker = broker_controller.create_controller(context.connection, self.event_sink);
             self.connected_brokers[broker.id] = broker;
             log.info('broker %s connected', broker.id);
-            self.sync_broker(broker);
+            if (self.addresses_initialised) {
+                self.sync_broker(broker);
+            }
             broker.on('synchronized', self.on_synchronized.bind(self));
             context.connection.on('disconnected', self.on_broker_disconnect.bind(self));
             context.connection.on('connection_close', self.on_broker_disconnect.bind(self))

Fixed


Bug - Header isnt fixed

Description
The header must be fixed and not move if the body scrolls.
Also, the body should by default be the max height of the page and not overflow.
Screenshots

Additional information
No response

Hey!
Can I work on this issue?

@chad11111
are we good to close this?

@hdm23061993 yes


Pack structs in C bindings

This creates a separate issue out of the latter part of this comment and the one that follows.
When bindings are generated from the C headers in cryptoki-sys, they do so using whatever structure alignment and packing is assumed for the target platform unless packing is made explicit in the headers for bindgen to read. Currently, packing is only specified for Windows and left implied everywhere else.
You can confirm that forcing a 1-byte alignment for structs on other platforms that it  does indeed produce bindings that differ in terms of size and field offsets, and is not the implicit default.
Meanwhile, the PKCS#11 standard (both 2.x and 3.x, Section 2.1) are very clear that

Cryptoki structures are packed to occupy as little space as is possible.  Cryptoki structures SHALL be packed with 1-byte alignment.

This would seem to imply that packing be explicit for all target bindings. But when this is done, several problems arise:

Rust assumes a >1-byte minimum alignment for struct members, which makes referencing anything beyond the 0th item undefined behavior. Each such instance of this (hundreds in the auto-generated tests) produces a valid, unsuppressible compiler warning. This is a known issue for bindgen that doesn't appear to be nearing a solution any time soon.
Tests written for this crate using SoftHSM seg fault. Whether this is at the rust level (dereferencing unaligned addresses) or at the C level (mismatch with struct packing internal to SoftHSM) is unclear. The latter doesn't seem like it should be the case, but the fact that tests are currently passing would seem to be an endorsement of implicit, non-compact alignment.

So, something is incorrect here, but what exactly that is needs to be investigated. Even if it turns out the way the bindings are currently generated is correct, that fact should still be documented conspicuously to avoid further misconception.

Well, this is frustrating.
Long story short: Seg faults I was seeing working on #66 are indeed a packing issue. It just took me a while to get around to confirming it.
I now have a clear picture of why following the spec to use 1-byte structure packing results in seg faults: libsofthsm2 doesn't follow it!
When C_GetFunctionList is called, the returned list struct is the 2-byte library version followed by all the function pointers. With default packing (on presumably all 64-bit Linux) this pads the version out to the width of another pointer. This is contrary to the spec and requires an explicit override. However, libsofthsm2 is using default packing everywhere except Windows, returning this (wrong!) platform-default padding. So if a client sets up their structs correctly, as soon as they try to call into a function from the list, they get a value that's part of the correct address and part an adjacent one, seg faulting on deref.
According to this issue, it seems to have become such a deeply ingrained assumption (originating in pk11-kit) it's now a de facto standard they refuse to fix. :roll_eyes:
So I guess there's a bit of a philosophical question to be answered here: follow the standard or the mob?

Changing the packing for a struct is just a matter of adding an attribute to it at build time, right? Could we add a feature to control that, so that users are free to choose whichever suits them?

That's right. However, I don't think there's a way to test the bindings since there's currently only one way to simulate the device. It would require matching compilation(s) of libsofthsm2. There's a preprocessor hook for that, but the current CI setup uses the image default instead of doing the compilation itself.

Copying this here from the original PR:
It seems that structure packing should be limited to Windows.  This is a known inaccuracy of the spec, and there is a proposal to change this in v3.2.  This was accepted without objection according to these meeting minutes.
Even in older versions of the spec, it seems nobody was actually packing structures on Unix.  So following the spec literally will cause ABI incompatibility with every existing PKCS#11 implementation.

According to this issue, it seems to have become such a deeply ingrained assumption (originating in pk11-kit) it's now a de facto standard they refuse to fix. roll_eyes

AFAIK, it goes back much further than that.  See this thread between TC members for some background.


add central compiled regex pool

add central compiled regex pool
refresh testdata
add additional strings meaning: domain does not exist
update readme

testing done all looks ok


Billing overview updates

Supports dynamic prices for plans. Displays current balance. Adds a “Discounts” section with credit and coupon items if the account has them.
Final nail for https://github.com/aptible/billing.aptible.com/issues/71
It feels like this could be clearer. We've discussed calculating coupons and usage line items for a final total. For now this gets all the information to the user.
@sandersonet

Merging to review on staging with the billing api updates

This fixes https://github.com/aptible/dashboard.aptible.com/issues/502


[YANG] Rework if-features

It's OK to make a node dependant on a feature and do not define the feature in the schema. However, currently that's not possible since lookup goes all the way up trying to find the feature until it finds nothing breaking the execution of the program on error.
In this PR I made possible for lookup to return nil if the looked up property is OK to fail. Other changes are adding features to the global features array as they are read.

I thought features had to be defined; see https://tools.ietf.org/html/rfc6020#section-7.18.2.  Could be we are not correctly resolving features, of course!

@wingo You're right, features had to be defined. Somehow I ended up messing up things a bit, but I think features are not working correctly. Take this example:
test.lua
module(..., package.seeall)

local yang = require("lib.yang.yang")

local test_schema = [[module test-schema {
   namespace "urn:ietf:params:xml:ns:yang:test-schema";
   prefix "test";

   feature f1 {
      description "f1";
   }

   container test {
      list interface {
         leaf name {
            type string;
         }
         leaf status {
            if-feature f1;
            type string;
         }
      }
   }
}]]

function selftest (args)
   local schema = yang.load_schema(test_schema)
   assert(schema.body.test.body.interface.body.status)
   print("selftest: ok")
end

$ sudo ./snabb snsh -t test
core/main.lua:26: assertion failed!
stack traceback:
        core/main.lua:149: in function <core/main.lua:147>

status is not defined although the f1 feature is present. I think the problem is that when a feature is found is never added to the features array https://github.com/Igalia/snabb/blob/lwaftr/src/lib/yang/schema.lua#L770

Closing this PR as there's no bug. Features need to be enabled before loading an schema (see #830).


Will it be possible to report evaluation results on the COCO dataset in the near future?

Hi, thanks for your question. This is indeed on our to-do list. However, it might take some time due to our limited resources.


[Chore] Add automation scripts

What needs to be done
Adding some github-action based workflows could be done to integrate projects and actions more easily.
Such as:

workflow action to move an issue into a project column.
manual workflow to add commonly used labels.l when repo is setup.

Using: https://github.com/marketplace/actions/add-to-github-projects-beta


Revert "Revert "Open loop sync/async multithreaded testing""

Reverts grpc/grpc#1980

Green and running well with lots of repeated tests and antagonists.


Wrong link, remove "-(optional)"

Wrong link, remove "-(optional)" in:
http://localhost:3000/yearn-devdocs/developers/v2/DEPLOYMENT#Sharer-contract-(optional)

fixed by #77


fix(typeahead-select): add form wrapper, udpate css

closes #2130

.pf-c-form-control height property throws off vertical alignment of typeahead text. Setting to auto allows for input to scale correctly.
added form.pf-c-select__toggle-form to match PF-React implementation

remove pf-c-select__toggle.pf-m-typeahead padding-top as this adjusts height of select
add margin-top to .pf-c-chip-group to retain proper spacing

@mcoker @christiemolloy updated

Nice work! I noticed it breaks a bit when the chip group wraps, but I think that's more of an edge case and not sure we could fix that without a different approach to how the children are included in the toggle.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Step assertion failing on exception in postInstall()

From #273:
14:47:10.761 [main] - DEBUG - c.d.tools.ide.log.IdeSlf4jLogger - Step 'Install graalvm' ended successfully.
14:47:10.761 [main] - DEBUG - c.d.tools.ide.log.IdeSlf4jLogger - Set variable 'GRAALVM_HOME=/home/runner/work/IDEasy/IDEasy/cli/target/test-projects/graalvm/project/software/extra/graalvm' in null
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.023 s <<< FAILURE! -- in com.devonfw.tools.ide.tool.graalvm.GraalVmTest
[ERROR] com.devonfw.tools.ide.tool.graalvm.GraalVmTest.testGraalVmInstallInDirectoryExtra -- Time elapsed: 0.015 s <<< FAILURE!
java.lang.AssertionError: Step Install graalvm already ended with true and cannot be ended again with false
	at com.devonfw.tools.ide.step.StepImpl.end(StepImpl.java:137)
	at com.devonfw.tools.ide.step.StepImpl.error(StepImpl.java:123)
	at com.devonfw.tools.ide.step.Step.error(Step.java:142)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.doInstall(LocalToolCommandlet.java:96)

The error is caused here:
https://github.com/devonfw/IDEasy/blob/bd09ce4b82e387cc323a2cb996eada7c0dd86e6a/cli/src/main/java/com/devonfw/tools/ide/tool/LocalToolCommandlet.java#L87-L96
As we can see the step is marked successful but after that we call postInstall() that may fail with an exception.
In that case we end up in the catch block and call step.error but the step was already ended with success raising the assertion error.

This is a little tricky one:

An easy fix would be to move postInstall() before the if block with the success. However, this will include the postInstall into the installation step itself.
This bug pattern that I made is likely to be repeated in the future. So we should question if we forbid to set a step to error after it has already marked successfull (but never vice-versa).

Please note that the error caused by the Step itself (see details and logs from issue description) was triggered inside a catch block and therefore "eating" the actual exception that has been catched and was about to be reported but that failed with the AssertionError so this is a rather bad bug.


Automatic error report

Closing because this empty. Please remember to paste the contents of your clipboard here on Github for next time.

If you can describe in detail the circumstances in which the error occurred, and post the information listed in relevant subsection of the Spyder Troubleshooting Guide as a comment to this issue, then please re-open.


refactor: reduce memory usage

Re-architect how the waPC policies are handled. This is required to reduce the amount of memory used by Policy Server.
I'm sorry this is a pretty big PR, but there was no way to split it into smaller units :(

I've rebased against the latest changes on the main branch


Shift-Up and Shift-Down not working

I'm on a mac, and selecting with shift-up and shift-down doesn't end up selecting anything.

This is working fine for me. Which version are you using?

$ micro -version
Version: Unknown
Commit hash: Unknown
Compiled on Unknown

I went ahead and checked the repo on disk, though, and it's 966dac97f84b36351db20cc2fd40a6f2c34f6a5f

Oh I see, you are using Terminal.app. I was using iTerm2 which works. I'll look into it but Terminal.app is a bit weird with the arrow key bindings.
Btw, if you want to compile micro with version information you can use make install in the root directory of the project.

Ah, that's correct. I had iTerm2 installed too, so I'll just use it, but it may be worth checking out anyway.

I'm afraid it's not possible on Terminal.app so I'm going to close this issue.


feat(app): add support for new assignment type format

:tada: This PR is included in version 1.8.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fixed issue where protractor doesn't run when the its path contains a space

encased gprotractor.getProtractorDir() within quotes

Hi
I think in this case the best approach is using the "cwd" option of the spawn function.
So, PROTRACTOR_COMMAND will be:
PROTRACTOR_COMMAND = 'protractor' + WIN_COMMAND_EXTENSION

And the function runProtractor:
return childProcess.spawn(PROTRACTOR_COMMAND, args, {
            'stdio': 'inherit',
            'env': process.env,
            'cwd': gprotractor.getProtractorDir()
        });

Can you check if theses changes work ? If so, can you update your pull-request ?
Otherwise, I can directly apply these changes.
Regards
Julien Roche

@rochejul thanks for the updated. But i had to move to gulp-protractor, since my requirement was to use it to test a hybrid app and it seems to provide with wats required.
All best for gulp-angular-protractor!!!


Attempting to open a TCP port in use not being blocked

Windows Version: Microsoft Windows [Version 10.0.16299.192]
While running within the Ubuntu shell, I startup a simple node app like the following:
const http = require('http');

const hostname = '<IP_ADDRESS>';
const port = 3000;

const server = http.createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World\n');
});

server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});

Within a second Ubuntu shell I attempt to startup the same app.  The expected behavior within the second app is that the console output should throw an error similar to this:
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE <IP_ADDRESS>:3000
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

What actually happens is the second bash shell runs the app without any error.  This is completely inconsistent with how I would expect.
Curiously enough, if I run the app within the Ubuntu shell, and then attempt to run the same app within a regular Windows command shell, then I do get the error as I expect.
I only observed this behavior with testing node apps, but I do wonder if it isn't just limited to node or if other programs using TCP exhibit a similar behavior.

Confirmed and yeah that's weird. bind(2) should have failed with ADDRINUSE. Nah it isn't a node thing. Weird mostly because it hasn't been reported before AFAICT. Ref #384 (message) just because it is behaving a little like SO_REUSEPORT all the time. Or I'm missing something obvious.

@jbalsip - good catch!
It's the SO_REUSEADDR that is causing problems here. If you look at a strace, nodejs calls the SO_REUSEADDR socket option when the socket is created. Now the thing is that that socket option behaves differently on Windows and on Linux. Maybe, the Windows version of node is smart enough to not call this socket option. We have talked to the Windows networking team that supports these options previously to see if we can reconcile the differences, but, given the legacy of these options, that has had been a difficult conversation. We will continue to explore alternatives.
You should not see this behavior with other TCP applications if this socket option doesn't come into play.

We have talked to the Windows networking team that supports these options previously to see if we can reconcile the differences, but, given the legacy of these options, that has had been a difficult conversation.

Looks like Cygwin suffers from the same problem, for the same reasons.
This can be done in a backward compatible way that does not disturb Win32, but you already know that. I feel your pain 😢.

I am sorry to awaken the thread, however I have the same exact issue.
I understand what @sunilmut is saying about SO_REUSEADDR - I assumed this when combing through the net.Socket documentation and http://man7.org/linux/man-pages/man7/socket.7.html
However, why can I not see this port in use anywhere? Could someone clarify why I am not able to see this port in use via netstat on WSL or Windows? This part is doing my head in tonight.

I ran into this issue using boost::asio::ip::tcp::acceptor and boost::asio::socket_base::reuse_address  set to true (which sets SO_REUSEADDR). So it's not just related to node. Also makes writing "portable" code fun...
Start an acceptor on <IP_ADDRESS> and a port and it works fine.
Start another acceptor on the same host and port and the requests will still go to the previously started ones.
If you don't set SO_REUSEADDR it will fail with address already in use.

So it's not just related to node. Also makes writing "portable" code fun...

Indeed. Concrete solution proposed would be to have win32 setsockopt(fd, SOL_SOCKET, SO_COMPAT, &(int){1}, sizeof(int)). Which WSL and Cygwin and win32 libuv (nodejs) would in turn use. Under the conservative assumption that there exists Windows code out in the wild that depends on the Winsock bug.

I've run into the same issue with SO_REUSEADDR, although admittedly in a toy project which can be worked around locally...
https://github.com/Grauniad/WSL_SO_REUSEADDR

Is this something that's known to be fixed in 1809? I'm now getting the desired 'address in use' error on one machine running 1809, and am still seeing the listen incorrectly succeed on another machine running 1803.

@Conduitry my Surface Pro is running 1809 and is still affected, so that's a negative I would say.  But it is running the insider's build so I don't know if that makes a difference or not.  The official 1809 has yet to hit my desktop.

Green 'Open' indicator at the top. The issue is not resolved.

Any update on this, I want to turn off this 'feature' :)

I installed the latest Windows Insider build and the good news is this appears to be fixed in WSL 2.

I installed the latest Windows Insider build and the good news is this appears to be fixed in WSL 2.

WSL2 is totally different than WSL. By the design it's no wonder it's "fixed" in WSL2. But this doesn't fix it in WSL, and many people still need to use WSL, because of the problems that come with WSL2 by design, e.g. the missing IPv6 support.


SyntaxError: Cannot use import statement outside a module

use sdk-nodejs-zincsearch/exmaples/index/exists/main.js
`/* Copyright 2022 Zinc Labs Inc. and Contributors
*

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

var ZincSearchSDK = require('../../../src/index');
let defaultClient = ZincSearchSDK.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'admin';
basicAuth.password = 'Complexpass#123';
let apiInstance = new ZincSearchSDK.Index();
let index = "index_example"; // String | Index
apiInstance.exists(index, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + JSON.stringify(data));
}
});`
errinfo:
sdk-nodejs-zincsearch/src/index.js:15
import ApiClient from './ApiClient';
^^^^^^
SyntaxError: Cannot use import statement outside a module
==================

We published sdk in npmjs, you should use that: https://www.npmjs.com/search?q=zincsearch

Using this' https://www.npmjs.com/package/zincsearch-sdk' The expression+zincsearch-sdk demo reported an error.
code：
// import ZincSearchSDK from 'zincsearch-sdk'
// const { ZincSearchSDK } = require('zincsearch-sdk')
const ZincSearchSDK = require('zincsearch-sdk')

function test1() {

}

test1()

package.json
{
  "name": "zincsearch-demo",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "cookie-parser": "~1.4.4",
    "debug": "~2.6.9",
    "express": "~4.16.1",
    "http-errors": "~1.6.3",
    "morgan": "~1.9.1",
    "mysql2": "^3.2.3",
    "pug": "2.0.0-beta11",
    "sequelize": "^6.31.0",
    "undici": "^5.22.0",
    "zincsearch-sdk": "^0.3.3"
  }
}

Still not fixed?

I think it should be "type": "module" in the package.json, and once this is done, I think it would also require changing the import statements to include ".js" file extensions. That should take care of the module issue. I will try to test it tonight.

I was able to build the current project with rollup as an ES bundle. Would you like me to send a PR ?


Beautify on save and .jsbeautifyrc

Hello,
I guess I'm not the only one that:

needs beautification, but not always
forgets to run it manually.

So I wrote this into .jsbeautifyrc in my project root:
{
    "python": {
        "beautify_on_save": true
    }
}

But it does not work.

I haven't tested yet if beautify_on_save works within the .jsbeautifyrc yet. I think the currently supported way is to change it in the Package settings for Atom-Beautify. I will be adding support for this later, however. But for now, use the Atom-Beautify package settings.

Perfect, thanks! :)


Forecast should include gap in the data

Currently, we connect the cone of confidence with the last day of the current month. However, it's preferred to show the gap when data is missing.
https://issues.redhat.com/browse/COST-1468

Codecov Report

Merging #2021 (6397783) into master (f2fdff9) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

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

@@            Coverage Diff             @@
##           master    #2021      +/-   ##
==========================================
- Coverage   70.79%   70.78%   -0.01%
==========================================
  Files         390      390
  Lines        7118     7119       +1
  Branches     1530     1531       +1
==========================================
  Hits         5039     5039
- Misses       2053     2054       +1
  Partials       26       26

Impacted Files
Coverage Δ

.../views/overview/components/dashboardWidgetBase.tsx
37.91% <0.00%> (-0.16%)
:arrow_down:

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 f2fdff9...47acf9e. Read the comment docs.


[Feature]Support function isnotnull

What type of PR is this:

[ ] BugFix
[x] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes:

Fixes #22702
Problem Summary(Required):

Test
select * from test.t_leo;
+------+------+-------+
| id   | name | money |
+------+------+-------+
|    1 | a    |  NULL |
+------+------+-------+
select isnotnull(money) from test.t_leo;
+-------------------+
| money IS NOT NULL |
+-------------------+
|                 0 |
+-------------------+
select isnotnull(id) from test.t_leo;
+----------------+
| id IS NOT NULL |
+----------------+
|              1 |
+----------------+
Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto backported to target branch

[ ] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

[FE PR Coverage Check]
:heart_eyes: pass : 3 / 3 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/sql/parser/AstBuilder.java
3
3
100.00%
[]

hi could you please add a document?

hi could you please add a document?
@wangsimo0 done

[FE PR Coverage Check]
:heart_eyes: pass : 2 / 2 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/sql/parser/AstBuilder.java
2
2
100.00%
[]