Transition to Service Discussion

So, few things:

1 & 3 Are somewhat related; plus 1 is supposedly taken already by CDO. Could still keep and support though.
3 is very technical and I'm not sure they will "see" the picture
6 shouldn't be tied to dollar figure like the current projects onboarding. Should also encourage micro-services architectures, self-contained applications as much as possible.

Originally posted by @gcharest in https://github.com/sara-sabr/ITStrategy/pull/36#issuecomment-508658987

@jaysonmc @remyb2canada @arushisharma19
I've merged the document after making the modifications we've discussed (I think it really sets a pretty solid picture).
I just had the comments above for us to discuss.

Agreed. Was making changes while the PR was up but those changes are on my personal laptop :S

* 1 & 3 Are somewhat related; plus 1 is supposedly taken already by CDO. Could still keep and support though.
* 3 is very technical and I'm not sure they will "see" the picture

Not yet confirmed whether it's CDO that does the Information Model or the Information  Architects within IITB.
For 3 being too technical, I'll re-word but we need to keep "API" in there. This should become a business term.

Reviewed #43 with a few comments. Really like the changes @remyb2canada ! :smile:

I think this is closed once we merge #49, @remyb2canada ?

@gcharest yes. Making changes now and pushing soon

So this is closed in #49


ListSaver per backend user

Hi,
First of all, awesome plugin !! very useful. Should be promoted more (talk.octobercms.com / slack).. thank you.
Alright so now, the only thing is that in my application, I have many users and each of them needs to have their own lists...
Could you please fire an event in these functions (in the filterwidgets\ListSaver.php) : getListSaverPreferences() and  onSaveListSaverPreference()

Right now, I can extend the table 'sixgweb_listsaver_preferences' adding a 'created_by_user_id' field.
I also extend the model in my Plugin.php to add 'created_by_user_id'.
I have modified the two functions above in filterwidgets\ListSaver.php - which is not good - this is why it would be good to have an event...
`public function onSaveListSaverPreference()
{
if (!\BackendAuth::userHasAccess('sixgweb.listsaver.manage')) {
return;
}
   ...

    $preference = Preference::create([
        'name' => $name,
        'list' => $list,
        'filter' => $filter,
        'namespace' => $this->getPreferenceNamespace(),
        'group' => $this->getPreferenceGroup(),
        'blueprint_uuid' => $this->controller->vars['activeSource']->uuid ?? null,
        <NEW>                        'created_by_user_id' => \BackendAuth::getUser()->id,                      </NEW>
    ]);

  ..

    return [
        '#' . $scope->getId('group') => $this->listFilterWidget->makePartial('scope', ['scope' => $scope]),
        'closePopover' => true,
    ];
}`

and

`protected function getListSaverPreferences()
{
    return Preference::where('namespace', $this->getPreferenceNamespace())
        ->where('group', $this->getPreferenceGroup())
        ->where(function ($query) {
            if (isset($this->controller->vars['activeSource']->uuid)) {
                $query->where('blueprint_uuid', $this->controller->vars['activeSource']->uuid);
            } else {
                $query->whereNull('blueprint_uuid');
            }
        })
        <NEW>                     ->where('created_by_user_id', \BackendAuth::getUser()->id)              </NEW>
        ->lists('name', 'id');
}`

Glad you find it useful! I've put in a few extra features in version 1.0.9.  Preference model now saves the backend_user_id and has an is_private column, which defaults to 1.  If you don't want list sharing, you can disable it in Settings->ListSaver.  If you enable it, you can control who can create public lists in the role permissions.
I've added a new event, should you want to manipulate the get query.  Of course, you can use Model Events to manipulate the data before creating/saving.

Great, thank you !!


Change Template source directory layout.

Change template source directory layout to reduce character count below the limit when deploying to the experimental instance. Remove dependency on MSBuilder.
Note: this does not change the layout of the Template when it is created. The files deleted from GoogleAspNetCoreMvc/wwwroot/lib are parts of bower packages that are restored when a package restore is run. The files moved in GoogleAspNetWebApi are placed correctly because the TargetFolderName of the vstemplate file is changed to a path to the correct location. The names of the vstemplate files themselves only change the names of folders but don't have any other visible impact.

Do the files get restored in all scenarios? What packages are we talking about here?

The packages are defined in bower.json and are bootstrap, jquery, jquery-validation and jquery-validation-unobtrusive.
A package restore occurs immediately after the template is loaded, and before every build.


Connecting actual components to the code

Getting rid of the fake_sensors module and connecting the real components
in the main greenpithumb.py file.
Also fixes the example wiring config to match the GreenPiThumb reference
schematic.

This change is

Coverage decreased (-0.8%) to 85.426% when pulling 37d4279e07162d396aeeb6463b3e07796a827629 on mtlynch:connect-for-real into d2dd8b8f44b466e2a66762b509ea687a8a07fc31 on JeetShetty:master.


Add timeout parameter to API object

Solves #166
Signed-off-by: Stamatis Katsaounis<EMAIL_ADDRESS>

Thanks you for this. It is long overdue.

Hi @janw I can see that there are conflicts with the current master branch. I will try to resolve them and update this PR. Plus, I will also take into account the comment on #187

Hi @zachmoody if you have a couple of minutes to spare please review this PR and let me know if it is valid or if it misses anything

@zachmoody Hi, if you think this PR is of no benefit, I would like to close it instead of re-resolving conflicts. Please let me know because I am doing housekeeping to my GitHub.
Kind regards,
Stamatis

Hi @skatsaounis, thanks for the PR. There's definitely benefit to it, I'm just slightly hesitant to merge because I keep thinking (in the little time I do get to spend on this project) there's a more comprehensive approach we can take to expose these knobs in requests people need. If you don't mind keeping it open, we might still use it, but certainly don't feel like it's necessary to keep coming back and resolving conflicts. I'll take care of those if we merge.

Thank you for letting me know. There is no problem to leave this PR open, especially now that I am aware of what is happening. By the way, thanks for this extremely useful python client.

I'll toss my 0.05€ in... As I see it based on https://requests.readthedocs.io/en/master/_modules/requests/sessions/, the timeout value is not Session-specific but it needs to be specified separately for each request (which kind of makes sense). Thus, it seems we need to carry the timeout value separately to be used with each request within pynetbox calls, and giving it as an argument to .Api() (and saving it in the instance for further use) seems reasonable. Unless there is a vision that the timeout value should be different in different NetBox API calls of course...

Edit: And now I stumbled into https://hodovi.ch/blog/advanced-usage-python-requests-timeouts-retries-hooks/#setting-default-timeouts that uses adapters with Session to specify a default timeout value. So, if Session override is added (#229), users can also implement timeouts at their will.

:100:  Came across something similar in the FRs for requests. I think it's the way to go, but working through the best way to expose it. Initial feeling is that this may be a bit much to ask users to do in order to set something like timeouts, but maybe I'm wrong.

This was implemented in v5.0. Closing out this PR.


Styling p.question and p.warning (et cetera)

Most pages have

Style these nicely. Now they are all white/default.

there is also an info class on the robberysolutions slide for example

Added some simple styling in assets/site.css. Feel free to reopen if you can do better.


[TFC-52] 트리플 헤더 블링크 이슈

PR 설명

변경 내역

체크리스트

스크린샷 & URL

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary

release-canary


FulfilledPromise not invoking callbacks immediately

The comments for FulfilledPromise indicate that any calls to then() will invoke the callback immediately, but it seems to just add it to queue().
Is the documentation wrong or is this a bug?

This is not a bug. You need to either call wait() on a promise or manually tick the queue.
A queue is used to invoke callbacks to prevent recursion and to guarantee a predictable order for callbacks -- for example, if we invoked callbacks immediately when a promise is fulfilled without queueing them, then we could invoke callbacks out of the order in which they were added to the promise (e.g., callbacks are added on a pending promise, pending promise is fulfilled, callbacks are added, then the queue is ticked to invoke callbacks).
What part of the documentation is wrong?

I guess I misunderstood the use of the word "immediately" in the following comment blocks and documentation sections.  Perhaps different wording would be appropriate.
https://github.com/guzzle/promises/blob/master/src/FulfilledPromise.php#L7
https://github.com/guzzle/promises/blob/master/src/RejectedPromise.php#L7
https://github.com/guzzle/promises/blob/master/src/Promise.php#L42
https://github.com/guzzle/promises/blob/master/README.md#fulfilledpromise

Yeah, the wording there is a bit ambiguous as to what "immediately" means. The intent is that there is no fulfillment required for the promise to resolve the callbacks. Maybe it should be changed to "immediately on the next tick"

so this was actually referenced in a problem I'm trying to solve with https://github.com/aws/aws-sdk-php .
I'm trying to write a routine such that there is a main loop (Loop-A) that runs over a fixed list checking for certain triggers. If a trigger is found, it initiates an asynchronous upload that returns a Guzzle Promise, which I attach a ->then() to. This issue came up because the callbacks I'm attaching via then() aren't firing upon completion of the upload because of the above problem of not resolving until the next "tick' of the event loop.
Is there anything I can run as part of the main loop (loop-a) that will check through all existing promises to see if any are fulfilled and then resolve them? Or possibly a better solution, a way of having the promises being fulfilled without needing an additional tick of the queue of the callbacks are registered to the specific promises?

@Zxurian can you provide a reproducible code example I can see? My first thoughts are that you need to chain your promises if you want your callbacks to be invoked without an extra tick. You can get access to the TaskQueue and invoke run() in your loop as well. See  https://github.com/guzzle/promises/blob/master/src/TaskQueue.php

@mtdowling using the following code example with https://github.com/aws/aws-sdk-php
<?php

$uploading = 0;

$AWS = new Aws\Sdk([
    'version'    => 'latest',
    'region'    => 'us-east-1',
    'credentials'    => [
        'key'        => '***',
        'secret'    => '***',
    ]
]);

$S3 = $AWS->createS3();

echo "beginning first promise\n";
$uploading ++;
$promise1 = $S3->uploadAsync('tantor-books', 'Test/test.xml', fopen('/mnt/olympus/Books/0087_CoalHuman/Download/0087_CoalHuman.xml', 'r'));
$promise1->then(function() use ($uploading) {
    $uploading --;
});

echo "beginning second promise\n";
$uploading ++;
$promise2 = $S3->uploadAsync('tantor-books', 'Test/test.zip', fopen('/mnt/olympus/Books/0087_CoalHuman/Download/0087_CoalHuman.zip', 'r'));
$promise2->then(function() use ($uploading) {
    $uploading --;
});

echo "beginning loop\n";
while ($uploading != 0) {
    echo 'uploading: '.$uploading."\n";
}

TL;DR - The script will never exit as the then() functions never get called.
I'm also having a discussion at https://gitter.im/aws/aws-sdk-php about it and @jeskew says this is by design. and that I'll need to manually tick the queue forward before the uploads will actually start. What I'd like is to start files uploading while the main loop is still going, then wait() on anything that's still transferring at the end before proceeding, and it's sounding like in order to do that, I need to manually tick the Guzzle queue after each call to uploadAsync() in order to start it.

@Zxurian, I found this while working on a similar problem. PHP isn't multi-threaded so while your loop is running nothing else will run. That includes your S3 client code, responsible of fulfilling the promises, and the promise queue. Async operations are simulated by waiting on external events and queueing tasks.
You could add this to your loop:
GuzzleHttp\Promise\queue->run();

But it won't have anything to run because the client code didn't have a chance to fulfill the promises. You should be ticking your S3 client code instead (in case that's possible) or wait on it. When you call the tick or wait operations on the client it simulates multi-threading by chaining all the operations. So you should do this instead of creating your own wait loop, or you should be able to do reproduce the same behavior inside your loop.
I guess it should be done like this:
<?php

$uploading = 0;

$AWS = new Aws\Sdk([
    'version'    => 'latest',
    'region'    => 'us-east-1',
    'credentials'    => [
        'key'        => '***',
        'secret'    => '***',
    ]
]);

$S3 = $AWS->createS3();

echo "beginning first promise\n";
$uploading ++;
$promise1 = $S3->uploadAsync('tantor-books', 'Test/test.xml', fopen('/mnt/olympus/Books/0087_CoalHuman/Download/0087_CoalHuman.xml', 'r'));
$promise1->then(function() use ($uploading) {
    $uploading --;
    echo 'uploading: '.$uploading."\n";
});

echo "beginning second promise\n";
$uploading ++;
$promise2 = $S3->uploadAsync('tantor-books', 'Test/test.zip', fopen('/mnt/olympus/Books/0087_CoalHuman/Download/0087_CoalHuman.zip', 'r'));
$promise2->then(function() use ($uploading) {
    $uploading --;
    echo 'uploading: '.$uploading."\n";
});

echo "beginning loop\n";
// Call here your S3 wait function or unwrap the promises that in turn will do the same.
GuzzleHttp\Promise\unwrap([$promise1, $promise2]);

Please, correct me if I'm wrong.

🎉


Add a switch to set checksummed/non-checksummed mode

So by default the SDK will run in legacyMode that will work with non-checksummed publickeys and hashes.
It will be possible to switch to  newMode which will operate on checksummed values.
README.md should be updated as well as we can add some npm deprecation message about the changes.

This is concerning. That's the second rollback on the checksum feature. Why that change since checksum is by default in 2.11 ?

will address in 2.14

As @KillianH  mentioned - it requires only adding one parameter here and call toHex(false) to prevent any compatibility breaks. Closing as won't do.


ict 4505

Fixes https://github.com/signadot/signadot/issues/4505

@daniel-de-vera @jmsktm i think we can close this one

Yes, let's close this as Daniel's PR has already addressed it.


One-time file upload tokens for CLI tools

[x] Create a record mixin class with record action using oarepo-actions that generates a one-time access token that CLI tools can use to upload files to the specific record. Calling the action should:

[x] produce a long enough, non-guessable token string
[ ] store the token for the record using the  ObjectVersionTag (example) e.g. under the key _oarepo_upload_token
[x] return the access token and record files upload url in response

[x] Create a permission factory for securing file uploads (used here or here), that produces an Invenio Permission that checks for token presence (ObjectVersionTag with key _oarepo_upload_token) on an accessed record and compares it with the token coming in the request. Access should be denied (.can() returns False) when either stored or request tokens are missing or mismatched.

TODO: we should remove token earlier, on its usage when calling create multipart upload

[ ] Create a function that connects to the after_upload_complete and the after_upload_abort signals and removes the token from the ObjectVersion tags

UPDATE: Needs to be redesigned for new Invenio


Test of Rs standards guidelines

Documentation reference (URL): https://github.com/ess-dive-community/essdive-soil-respiration
Submitter: Kayla Mathes
Justification (why is this change necessary?): Cleaning up links, conflicting information and flow of instructions

I suggest the following changes:
Issues with instruction flow and links:

The front page could be slightly simplified. Some of the additional links are redundant with links already in the step-by-step guide and I think this could be slightly confusing. Consider either adding a "Quick Reference" heading if you want active users to be able to reference these links quickly, or just embed them all in the tutorial link.
The "Data Template" link in the instructions does appear to have a way to download the template. Maybe it is my limited knowledge of Github, but it is not clear to me how to use this template.
The "Data format Guide" link in the instruction page is actually the "meta data format guide"
The Meta data template" link in the instruction page is not currently working

Issues/feedback with variables:

The variable "Dry_CO2" is listed as optional in the "data format guide" link and required on the general instruction page. Also, I don't know if this is something you can fix, given the volume and variety of data people work with, but the LICOR-6400 I am working with labels this variable as "CO2s". Maybe include a couple different common variable titles on different machines to help users identify this variable? This could go for other important variables as well.

Consider reordering variable list in the "data format guide" and the "meta data format guide" with required variables first, followed by optional ones. Right now, they are intermixed.

Again, this may be in issue specific to the Licor-6400 and how I have it set up. But, using my data, for each given efflux run, the licor output provides only the end timestamp value. I could infer the beginning from the end of the previous measurement, how ever, it is not intuitive. Is there a specific reason why both timestamp values need to be included? Maybe an optional variable could be measurement length in seconds?

Additional variables to consider including as either required or optional:
-"Run number" or an indicator of how many complete measurement cycles were collected at a given collar.
-Date of last precipitation in the meta-data variable list
-Date of last instrument calibration.

If you are going to separate the types of Issues/contributions, I would consider adding a "general" type to make it easier for people to list multiple types of feedback into one post.

I am looking forward to working on these changes @kaylamathes, but for now want to thank you for all the work you did to compile this list 👍🏻

(Echoing Rob's comments above—thank you @kaylamathes !)

Is there a specific reason why both timestamp values need to be included? Maybe an optional variable could be measurement length in seconds?

Good question. Yes, either one of those two options would in theory work; the crucial point is that we want to know the exact measurement period (start and stop). We ended up going with this solution for consistency with Ameriflux and FLUXNET.

Thank you for the feedback! I have an upcoming deadline on another project so I will return to this at the end of April


DOC-901: Add information on using crdb_region in indexes

Fixes DOC-901:

Indexes can utilize the crdb_region column if two or more rows existing in the same number of distinct regions would violate the uniqueness property of an index

This change is


Fix part 2 for outdated local storage data: fix it up when loading it

This should hopefully prevent future issues like #170. It also adds a customization point where we can do smarter fixes than "change the corresponding field to nothing-selected-yet".

(I'm not merging because I don't have time/attention right now to babysit the deployed site and step in if it fails)

@oremanj  FYI this is ready to go in, since you seem to be responsive right now: I just don't have dev spoons to babysit :)


Can't use one GPU?

If I want to use one or two GPUs in one server? What should I do?

We exploit the fact that by default BN is split into multiple GPUs in which mean/std is independently computed. To run on one GPU, you may implement BN split along the N (batch) dimension to mimic this effect (see NaiveBatchNorm in Detectron2). You also need to change the lr (e.g., linearly) if you change the batchsize to fit memory. To run on 2 GPUs, try --lr 0.0075 --batch-size 64.

implement BN split along the N (batch) dimension to mimic this effect

There is an implementation of split (aka sub-batch) BN for video (3d) models that might be helpful to you:
https://github.com/facebookresearch/SlowFast/blob/master/slowfast/models/batchnorm_helper.py#L37-L46
This can easily be adapted to the the 2d BN case.

@rbgirshick Thanks for the link. I actually needed this and am writing a code myself starting from there. BTW, if you know, It would be great if you could answer this question, which is regarding the code snippet. https://github.com/facebookresearch/SlowFast/issues/357#issue-784645472

@rbgirshick Thanks for the link. I actually needed this and am writing a code myself starting from there. BTW, if you know, It would be great if you could answer this question, which is regarding the code snippet. https://github.com/facebookresearch/SlowFast/issues/357#issue-784645472

@JingLiJJ  maybe you can see https://github.com/leftthomas/MoCo

来信收到，谢谢！

@JingLiJJ maybe you can see https://github.com/leftthomas/MoCo

Hey! I would really want to run it on a single GPU, but I am not sure if I understand how this implementation works for a single GPU, could you please explain?

来信收到，谢谢！


${parameter} shall be substituted anywhere in strings

${parameter} shall be substituted anywhere in strings with it's content's string repesentation.
Reference is TML's substitution.
This includes data structure references with [""] and "."-syntax.
Please discuss with Cuong how to make a elegant solution for "."-syntax
e.g.
{
  "param1" : "key1",
  "param2" : "abc${param1}def",
  "param3${param1} : "abc${param1}def{$param2}"
}

must result ins:
param1 : "key1"
param2 : "abckey1def"
param3key1 : "abckey1defabckey1def"

Hi Holger,
hm... we have here still a mix between generic preprocessing and semantics required for robotframework-testsuitesmanagement.
We need to discuss this before implementation.
Thank you,
Thomas

What shall happen in these cases?
"dict_val" : {"keyA" : "keyA_val", "keyB" : "keyB_val"},
"list_val" : ["A", 1, True],

"param2" : "abc${params.global.dict_val}def",
"param3" : "abc${params.global.list_val}def",

With ${params.global.dict_val} and ${params.global.list_val} I expect to get a string representation of the Python code that generates the dictionary and the list. This might be OK, if appears on the right hand side of the colon.
But this might cause strange parameter names:
"param2_${params.global.dict_val}" : "abc",
"param3_${params.global.list_val}" : "def",

In my opinion we should have a hand on this.
Suggestion:
While resolving the possibly nested $-operator structure, the data types of the affected variables should be checked. In case of a composite data type is detected at any position, a flag has to be set accordingly.
Before the final substitution of a $-operator at the left hand side of the colon (variable name), this flag should be checked.
If the flag tells that a composite data type was involved, we know, that we might get variable names, we do not want to have (or may be invalid; how about blanks inside names?).
Possible reactions:

Abort with error and test result is UNKNOWN.
Accept - but with warning in log file.
Accept - but with shortened name and warning in log file.

Hi Holger,
"Abort with error and test result is UNKNOWN" would be my preference.
A key name assembled from a stringified data-structure makes for me no sense.
Thank you,
Thomas

I still have doubts about code like his:
"param1" : "value",
"param2" : ${params.global.param1}

This is so much unintuitive.
Therefore another try to catch this topic:
I assume to have two jsonp files (with relevant parts of the path starts with a project folder):
project/00/11/fileA.jsonp and project/00/11/22/fileB.jsonp
fileA imports fileB.
How about this kind of content?

project/00/11/fileA.jsonp

{
   "paramA" : "valA",
   "paramB" : "valB",
   "A_1" : {
              "paramA" : "valA1",
              "paramB" : "valB1"
           },
   "A_2" : {
              "paramA" : "valA2",
              "paramB" : "valB2"
           },
   // reference to parameter inside this file:
   "paramC"   : ${paramA},                     // outcome: paramC initialized with "valA"
   "paramD"   : ${A_1.paramA},                 // outcome: paramD initialized with "valA1"
   // overwrite parameter defined in this file
   "paramB" : "valB3",                         // outcome: paramB updated to "valB3"
   "[IMPORT]" : "./22/fileB.jsonp"
}

project/00/11/22/fileB.jsonp

{
   // reference to parameter outside this file:
   "paramE"   : ${00.11.fileA.A_2.paramB},     // outcome: paramE initialized with "valB2"
   // overwrite parameter defined outside this file:
   ${00.11.fileA.A_2.paramB} : "valB4",
   // add new key to parameter defined outside this file:
   ${00.11.fileA.A_2.paramC} : "valC"
}

Assignments happen accordingly to the following rules:

The default parameter scope is the current jsonp file.
Every reference to a parameter defined outside the current file, requires to add the full scope to the parameter name.
The full scope includes the path to this file outside the current file and the file name (path relative to position of projects folder).

Advantages:

It's much easier now to detect, from where (which imported file) a value come from.
Code is easier to understand and easier to maintain.
"params.global" is not necessary any more.
Introduction of a default scope (the current jsonp file) shortens the code.

At end the JsonPreprocessor should return such a resolved data structure:
dParams = {
   "paramA" : "valA",
   "paramB" : "valB3",
   "A_1"    : {
                 "paramA" : "valA1",
                 "paramB" : "valB1"
              },
   "A_2"    : {
                 "paramA" : "valA2",
                 "paramB" : "valB4",
                 "paramC" : "valC"
              },
   "paramC" : "valA",
   "paramD" : "valA1",
   "paramE" : "valB2"
}

In case of the Testsuites Management is involved, it should be under the responsibility of the Testsuites Management, to put the returned dParams into a proper bag, to make the values inside accessible within Robot Framework tests in the following way (like usual):
log    ${paramA}
log    ${A_2.paramC}

With this solution both worlds the Json Preprocessor and the Testsuites Management are clearly separated from each other, only dParams is the interface in between, and there are no syntax conflicts any more between both.
What do you think?

Hello Thomas,
I created the pull request #75 for this improvement.
Thank you,
Son

Hi Son,
the JSON code
{
   "param"    : [1,2,3],
   "${param}" : "value"
}

causes the following error message:
'Could not set variable '[1, 2, 3]' with value 'value'! Reason: cannot assign to literal (<string>, line 1)'
This is not helpful for users. This makes no sense. This is too much technical and does not point out exactly to what is wrong here.
The error message has to tell the user that it is not allowed to use composite data types in ${} substitutions on the left hand side of a colon (inside parameter name or dictionary key name). Because a name derived out of a stringified composite data structure don't makes sense.

Hello Holger,
Thank you for your finding!
For the case:
{
   "param"    : [1,2,3],
   "${param}" : "value"
}

I will handle this error in JsonPreprocessor package to make it more clearer.
For the case:
{
   "param"    : {"A" : 1, "B" : 2},
   "${param}" : "value"
}

Yes, it make no sense to define the parameter name "{'A': 1, 'B': 2}". It happens because we not yet define the naming convention for a parameter name in configuration file. Could you please help us define a naming convention for parameter names in jsonp?
Thank you,
Son

Hi Son,
yes, we should have a naming convention. But this use case should be handled before a naming convention check.
It's quite easy: In case you detect a dollar operator expression inside a parameter name or inside a dictionary key name, you have to check the data type of the affected parameter, that shall be inserted. In case of the data type is not int, not float and not str, you throw an error, that it is not allowed to do the ${} substitution with composite data types.
Checking also a naming convention would be the last step after all allowed substitutions are done.

Hi Holger,
Thank you for the hint! I will implement a datatype checking before doing the substitution.
Thank you,
Son

Hi @namsonx ,
what is the status of this ticket?
Thank you,
Thomas

Things still need to be fixed.
See also
https://github.com/test-fullautomation/python-jsonpreprocessor/issues/111

Deeply related to
https://github.com/test-fullautomation/python-jsonpreprocessor/issues/111
that was shifted to 0.10.0. Therefore this ticket should also be shifted to 0.10.0.
Main topic still open: substitution of composite data types in parameter and key names.

shifted to 0.10.0

Hello Holger, Hello Thomas,
The ticket #111 was fixed on stabi branch. After Holger reviewed and verified ticket #111, we can close this ticket as well.
Thank you,
Son

Hi Son,
still a small side effect ;-)
The code:
"param"    : [1,2,3],
"${param}" : "value"

and also
"param"    : {"A" : 1, "B" : 2},
"${param}" : "value"

causes
 Found expression '' with at least one parameter of ...
with empty ''.
Most probably caused by the fact that the entire expression inside the double quotes
"${param}"
is a dollar operator expression.
In case of it's a composite string, like
"_${param}_"
the error message is complete
Found expression '_${param}_' with at least one ...

Hello Holger,
Thank you very much for the finding!
I have just pushed the tiny change b2d74260aca to fix this small side effect.
The fix now is available on stabi branch.
Thank you,
Son

Retest successful. Issue can be closed.

merged to develop branch


docker volume/system prune can cause persistent volumes to be unintentionally deleted

After playing with the beta of Docker's Kubernetes and speaking with @cpuguy83 it has become apparent that users of the Docker distro of Kubernetes could potentially shoot themselves in the foot with docker volume prune. Similarly, docker system prune --volumes could cause problems. The issue here is the classic 'multi-master problem'. The docker engine doesn't know anything about the volumes doryd has created to back Persistent Volumes.  Because these volumes aren't referenced by any docker container, the docker engine sees them as unused and candidates for reclamation.
This hasn't been an issue to date because most k8s users don't interact with the docker command, they use kubectl or equivalent. In the case of the Docker distro though, the user is likely to be interacting with both. This creates a situation where a user of the docker command could disrupt consumers (Deployments or Pods) of Persistent Volumes.

docker volume prune
docker system prune --volumes

Design
The fix for this issue is to annotate the docker volume using a Docker Volume Option at creation that instructs the Docker Volume Driver not to delete this particular volume when /VolumeDriver.Remove is called.  This new option will be called manager and will contain the name of the 3rd party manager which created this volume.  When /VolumeDriver.Remove is called with input that contains the new attribute manager and the value matches that which was specified in the creation option, only then will the remove actually be triggered.
This allows the docker engine to continue to leverage the /VolumeDriver.Remove endpoint unchanged, while other managers can retain control over the life cycle of volumes safely.
Example

User creates a persistent volume claim, which is then satisfied by Doryd.

The Docker Volume Driver receives the following:

 /VolumeDriver.Create { "Name": "vol1", "Opts": {"manager":"dory"}}

A user runs docker volume prune.

The Docker Volume Driver receives the following:

/VolumeDriver.Remove { "Name": "vol1" }

The Docker Volume Driver must not remove this volume.

A user runs kubectl delete pvc vol1

The Docker Volume Driver receives the following:

 /VolumeDriver.Remove { "Name": "vol1", "manager":"dory"}

The Docker Volume Driver must remove this volume.

@e4jet Wondering if it would be easier to create the volume via the docker API instead?
{
  "Image": "<some pause image>",
  "HostConfig":
    { "Mounts": [
      {
        "Type": "volume",
        "Source": "vol_name",
        "Target": "/whatever",
        "VolumeOptions":{
          "Driver": {
            "Name": "<driver name>",
            "Options": {}
          }
        }
      }
    ]
  }
}

This can also be annotated with kube annotations/labels as well.

Good question @cpuguy83 .  I started there, but ran into two issues:

Project Dory was design to be Container Engine agnostic (which is why it talks to the driver directly).
My understanding is that any Docker Volume will be subject to deletion via 'prune' regardless of how it was created.  Specifically, any volume not associated with a container will be deleted.

@e4jet

Project Dory was design to be Container Engine agnostic (which is why it talks to the driver directly).

That's understandable, but this is also the docker volume plugin API. Is this going to be used outside of the docker context?

My understanding is that any Docker Volume will be subject to deletion via 'prune' regardless of how it was created. Specifically, any volume not associated with a container will be deleted.

That is correct, however creating the volume as specified above there will be a container holding the reference. It also handles the mount.
So essentially mounting the volume means running the container, unmounting is stopping the container.

That's understandable, but this is also the docker volume plugin API.

True, but this proposal doesn't change the "real" docker volume api.  It simply extends it for plugins that want to support Dory.

Is this going to be used outside of the docker context?

Yes, Dory is a core component of HPE's currently a shipping storage integration product for k8s.  Given all the work around the k8s container runtime interface (cri-containerd, cri-o,etc) we want make sure Dory is supported.

So essentially mounting the volume means running the container, unmounting is stopping the container.

Ah, got it.  This is interesting, but would require some re-architecting.  This proposed design doesn't preclude us from moving to this in a later release.


UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v3.16 to before v5.13.6",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2d53139f31626bad6f8983d8e519ddde2cbba921",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d4179cdb769a651f2ae89c325612a69bf6fbdf70"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "2d53139f31626bad6f8983d8e519ddde2cbba921",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "d4179cdb769a651f2ae89c325612a69bf6fbdf70",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "usb: max-3421: Prevent corruption of freed memory\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.13.6 by commit d4179cdb769a651f2ae89c325612a69bf6fbdf70, it was introduced in version v3.16 by commit 2d53139f31626bad6f8983d8e519ddde2cbba921. For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1001171


Schema trait + derive macro

Something like this:
    #[derive(Schema)]
    struct Schema {
        users: Users,
        posts: Posts,
        users_relations: UsersRelations,
    }

    #[derive(Relation)]
    struct UsersRelations {
        #[rizzle(from = "posts.user_id", to = "users.id")]
        posts: sqlite::Many<Posts>
    }

    let schema = Schema::new();
    let options = DatabaseOptions::new("sqlite://:memory:");
    let db = rizzle(options, schema).await?;

the goal is to hold all of your tables in a new struct that you then pass to a rizzle function which does the migrations and gives you the current Database struct instance.

Closed by dc84380


Group by multi string column in cop/batchCop mode will truncate the last char of group by columns

Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create a TiDB cluster with v6.3.0
mysql> create table test(a varchar(12) not null, b varchar(17) not null);
Query OK, 0 rows affected (0.07 sec)

mysql> alter table test set tiflash replica 1;
Query OK, 0 rows affected (0.07 sec)

mysql> insert into test values('203','003004'),('606','003004');
Query OK, 2 rows affected (0.01 sec)
Records: 2  Duplicates: 0  Warnings: 0
mysql> set tidb_allow_mpp=0;
Query OK, 0 rows affected (0.00 sec)
mysql>  select /*+ agg_to_cop() */ a, b from test where b='003004' group by a, b;
+---------+---------+
| a | b |
+---------+---------+
| 20      | 00300   |
| 60      | 00300   |
+---------+---------+
2 rows in set (0.00 sec)

2. What did you expect to see? (Required)
the query result should be
+---------+---------+
| a | b |
+---------+---------+
| 203     | 003004  |
| 606     | 003004  |
+---------+---------+

3. What did you see instead (Required)
the query result is
+---------+---------+
| a | b |
+---------+---------+
| 20      | 00300   |
| 60      | 00300   |
+---------+---------+

4. What is your TiFlash version? (Required)
v6.3.0
5. Root cause
This bug is caused by #5834. In #5834, it introduced a new hash method named HashMethodMultiString, in HashMethodMultiString, for string without collator, it uses
StringRef key(chars[key_index] + last_offset, offsets[key_index][row] - last_offset - 1);

as the key, it is not right, because ColumnString::deserializeAndInsertFromArena actually assumes that the key is including the terminating zero.
This bug seems can't reproduced in master branch, but we still need to double confirm it.

Root cause

HashMethodMultiString is used when all agg keys are type string.
https://github.com/pingcap/tiflash/blob/dfda5682031f607047209da8b1e42fee96bacb91/dbms/src/Common/ColumnsHashing.h#L135-L225
If collation is not used, the expected way to serialized string column should keep tail zero byte.
https://github.com/pingcap/tiflash/blob/dfda5682031f607047209da8b1e42fee96bacb91/dbms/src/Common/ColumnsHashing.h#L207-L212

This bug only affect release-6.3. HashMethodMultiString is no longer used since https://github.com/pingcap/tiflash/pull/6135

close this issue since the bug only exists in v6.3.0 and there is no patch version for v6.3.x


The input: nexthop_type value "IPv4Gateway" does not work.

File: themes/default/content/registry/packages/alicloud/api-docs/vpc/routeentry/_index.md
Alibaba's API doc hasn't updated yet : https://api.alibabacloud.com/document/Vpc/2016-04-28/CreateRouteEntry?spm=api-workbench-intl.Product Home Page.0.0.5c594f450DeOKi
The GUI has IPV4 Gateway available to select.
Terraform registry has it but with small "p" not capital "P" (Didn't test if it works)
https://registry.terraform.io/providers/aliyun/alicloud/latest/docs/resources/route_entry
This affect Pulumi CLI as well.
PS. I'm not an experienced coder, so if I've made mistakes please kindly point out my error.

Forgot to mention that I tried the variations of IPv4Gateway, ipv4gateway, Ipv4Gateway
none works for both vpc.RouteEntry and the CLI import


Add support for logging

Some very rough initial thoughts: It would be nice if users could use the standard log crate to log messages, which are then handled appropriately – for instance, sent to /rosout if that was enabled in the node. Adding a handler that sends logs to /rosout is possible and what log is designed to do, and the enabled/disabled would have to be checked via the target of the log message.

Can w discuss an idea of logging API? Even empty interfaces would unblock work on #167.

@Nizerlak Ok, did you want to present an idea of your own or should I expand on my comment above?

I don't feel to propose an idea other than making something similar to rclcpp. Anyway I think, that making macros (I suppose they will be used like in rclcpp) design would be a good point to start.

The log crate mentioned above already defines logging macros. We'd just have to implement the backend that logs to rosout.

Should rcl be used in implementation? Also log crate doesn't have FATAL severity while rcl does. As far as I can see both rclpy and rclcpp use rcl logging.

Yes, rcl should definitely be used. Good point about the FATAL severity. That probably means log is out. We'll need to think about what we want our API to look like.

Is this still being discussed/desired? I was hoping to contribute to it or get it started. I was thinking of extending log into a Logger class contained within the rclrs crate? Or was the idea to use a framework like log4rs and implement a custom rosout logger

I'm also willing to work on this. I took a bit of a deep dive into logging in rcl and rclcpp so I have a somewhat decent understanding how it works. I think an implementation similar to that of rclcpp would be feasible. Now for the API. I was thinking of making the rclrs logging API look similar to that of rclcpp with macros for each level and each variant (expression, once, skipfirst, throttle, etc). I envision it to look something like this.
rclrs::log::info!(&node.get_logger(), "Hello {}!", "World");
rclrs::log::fatal!(&node.get_logger(), "Some FATAL {}", "message");
rclrs::log::warn_once!(&node.get_logger(), "Some WARNING {}", "message");
rclrs::log::debug_skip_first!(&node.get_logger(), "Some DEBUG {}", "message");

@Chake96 Absolutely, it still makes sense to have logging in rclrs. I'm not sure what exactly you mean by "extending" log, but if you were thinking something similar to "log but with a Fatal level but without the Trace level and a sink that logs to rosout" it sounds like a sensible direction. Frameworks like log4rs would mean a new dependency, of which most features wouldn't be needed, so imo it would be nice to avoid it.
@Cyberunner23 Yeah, we can probably do something similar. You might be able to make the interface slightly nicer by overloading the log macros, like
rclrs::log::info!(&node.get_logger(), "Hello {}!", "World" if my_var == 3);

for the expression variant.

Hi, if anyone end up here looking for a solution to make ros2_rust logs output mimic the rclcpp one, I found a workaround using dependencies :
env_logger = "0.11.3"
log = "0.4.21"
chrono = "0.4.38"

And initializing the logger like :
  env_logger::builder()
        .format(|buf, record| {
            writeln!(
                buf,
                "[{}] [{}] [{}] {}",
                record.level(),
                {
                    let now = Utc::now();
                    format!("{}.{}", now.timestamp(), now.timestamp_subsec_nanos())
                },
                record.module_path().unwrap_or("<unknown>"),
                record.args(),
            )
        })
        .init();

  info!("This is a log that looks like its rclcpp friend (only looks like)");

Do not forget to set env variable : export RUST_LOG=info

I would like to contribute to the ros2_rust logging, and I've created a PR on my fork that provides an initial, limited implementation (there's currently no support for throttling, etc).
My PR is based off the effort from the r2r logging discussion, although I've had to make additional changes to allow the logging library to use the /rosout topic.
Over the next few days I will be extending the macros to implement the missing features, e.g. throttling, skip, etc.
Hopefully the changes/plan are acceptable.  Some caveats to note: I'm very new to rust, ros2 and contributing to open source so I've probably made some missteps in at least one of those areas.

@geoff-imdex Thanks for putting that PR together! Currently, it's targeting the main branch on your forked repo. If you instead redirect the target to ros2-rust/ros2_rust:main, then it will generate a PR in this repo instead, where we can more easily discuss the changes.

@geoff-imdex Thanks for putting that PR together! Currently, it's targeting the main branch on your forked repo. If you instead redirect the target to ros2-rust/ros2_rust:main, then it will generate a PR in this repo instead, where we can more easily discuss the changes.

Thanks for the heads-up - I've created this PR 422.  I looking forward to getting some feedback - hopefully my first rust PR isn't too bad! :-)


[HA] Prefer non-zonal seeds for non-zonal shoots

How to categorize this PR?

/area high-availability
/kind enhancement
What this PR does / why we need it:
This PR enhances the Gardener Scheduler in a way that it prefers non-zonal seed clusters for non-zonal shoot clusters. Earlier, even zonal seed clusters were considered for "normal" shoots which makes it especially problematic if Gardeners introduce the HA feature (#5741) to their landscape with new seeds and then those special zonal seeds will get overloaded by non-zonal shoot clusters.
The scheduler now only picks a zonal seed for a non-zonal shoot as a last resort. Smaller setups benefit from this behavior as they don't need to create extra non-zonal seeds.
 This preserves capacity on seeds which are required to run zonal shoot clusters.

/assign

Replaced by #6105 as discussed https://github.com/gardener/gardener/pull/6102#discussion_r896432168.

Hmm... I am not sure we need such a scoring function and here is why:
Assuming, it will be possible to request soon:

Non-HA shoots -> What we have today
HA shoots -> control plane (ETCD primarily) runs with 3 replicas on different nodes
HA multi-zonal shoots -> control plane (ETCD primarily) runs with 3 replicas on different nodes and in different zones (implies the former)

Assuming, we have no incentive to create 1-zone and 3-zone seeds in parallel in regions with 3 or more zones, this means:

1/2-zone regions will hold only 1-zone seeds (nothing else possible from technical PoV)
3/4/5-zone regions will hold only 3-zone seeds (less fragmentation if we do not try to pack the shoots separately; easier to build as we would otherwise need to spread/balance the 1-zone seeds by their number across the different zones)

That means:

HA multi-zonal shoots must go to 3-zone seeds (nothing else possible to fulfil the contract)
HA shoots will go to the nearest least utilised seed as always (whatever seed it is), because that (nearest) region, if it's a 3/4/5-zone region, will only have 3-zone seeds (no 1-zone seeds) or have only 1-zone seeds, if it's a 1/2-zone region. We would probably never want to schedule an HA shoot to another (farther away) region than the optimal region just because the optimal region is a 3/4/5-zone region that runs only 3-zone seeds.
Non-HA shoots will go to the nearest least utilised seed as always (whatever seed it is)... (same reasoning as above)

Ergo, I don't think we need a scoring function for this - the decision seems rather straight-forward and is more a filtering than a scoring function:

HA multi-zonal shoots can only go to 3-zone seeds
HA shoots and non-HA shoots can go to any seed

Note: Excluding here concepts like "EU Access Only", because that's orthogonal and applies regardless, a.k.a. is another way of filtering. If the set of seeds is empty running through all filtering functions, then the shoot cannot be scheduled. Maybe later, we will implemented ManagedSeedSets and a controller and then it will act as seed-autoscaler and provision a required seed somewhere, but that's for the future.

Note: We have an active interest to place all 3 ETCDs of an HA shoot (not multi-zonal) in one zone to avoid networking costs. This will require some zone pinning, not only for them, but probably for the entire control plane. However, since this costs some effort to build and is generally more fragile than distributing the control plane just like any other HA multi-zonal shoot, we may decide at first to not write this cost optimisation logic. Also, because I have some doubts people will pick that option. I would assume, in most cases it's either non-HA shoot or HA multi-zonal shoot. It's only HA shoots where the end user knowingly places his nodes in a 1/2-zone region (e.g. KSA, Switzerland, ...) and there we would have 1-zone seeds anyway, so no need to optimise anything for 3-zone seeds either, I believe.

We would probably never want to schedule an HA shoot to another (farther away) region than the optimal region just because the optimal region is a 3/4/5-zone region that runs only 3-zone seeds.

Oh, just want to clarify that that would have never happened with the implementation of this PR and I totally agree here. The scoring functions (or whatever name you prefer) only apply after the strategy.
Say, if you at the end have two remaining candidates:

Seed A - Region South - Multi-Zone - 1 Shoot
Seed B - Region South - Singel Zone - 10 Shoots
Then the logic would have picked seed B  for "normal" or single-zone Shoots because of cost and latency reasons.


When search a contract with type of stake,throw an error

PoolData.jsx:23 Error fetching pool addresses for prize pool with address: 0xC5445655BB57C645Cc9204c56b65A1c777543fdd: execution reverted. (maybe wrong Ethereum network or your IP is being rate-limited?)

hey @fuhuimin - I'm not seeing that address, are you sure that's where the pool is deployed? On both rinkeby and mainnet it looks like there is nothing there:
https://etherscan.io/address/0xC5445655BB57C645Cc9204c56b65A1c777543fdd
https://rinkeby.etherscan.io/address/0xC5445655BB57C645Cc9204c56b65A1c777543fdd


Created English to Kannada translator.md

📝 Description
Add a brief description.
💣 Is this a breaking change (Yes/No):

[ ] Yes
[x] No

🚧 How to migrate?
Not needed.
📝 Additional Information
Fixes #3120
@donqu1xotechina please check and consider merging it.

@donqu1xotechina , may I know how and when the pr will be merged?

Hey @mschandana16
We normally review our PRs in one or two days. meanwhile, you can check out our PR review Event on Youtube to learn how to improve your prompt and AI Agents.

Hey @mschandana16 We normally review our PRs in one or two days. meanwhile, you can check out our PR review Event on Youtube to learn how to improve your prompt and AI Agents.

Oh ok, thanks! I'll check that out on Youtube.


[BUG] "Toggle All" button does not toggle

Please make sure you've tried the latest version of Fritter first, as the F-Droid version is sometimes out of date!

Describe the bug
In the New Group dialog, "Toggle All" button does not select every available selection. I have imported more than 2,000 twitter follows which may have created the issue.
To Reproduce
Steps to reproduce the behavior:

Import 2,000+ followers Add/import followers
Go to "Subscriptions" tab
Click on "New"
Click "Toggle All"
Nothing gets selected and it becomes impossible to make any further selection

Screenshots
Device
Dewice: I01WD (ASUS Zenfone 6)
OS: Omnirom 11 (Android R)
App: Fritter 2.15.1 from F-Droid

reproduced with only 1 subscriptions. this does not seem to be a numbers problem.

The fix for this will go out in the next version (v2.16.0)!


sensor: create

Create the basic sensor component to display sensor data.

[ ] create SensorComp.vue component

Up/Down-Arrows for the sensor trend

User story example:

The basic component SensorComp.vue has been created and consists of individual SensorStatus.vue components. These still receive the data statically as a prop. This is then taken over by a store.

Closed with merged PR.


When PEBBLE_PHONE env. var is set, pebble install --emulator basalt still connects to PEBBLE_PHONE ip address

See https://forums.pebble.com/t/since-sdk4-0-i-cant-run-emulator-again-once-it-has-quit/23792/2

$ PEBBLE_PHONE=<IP_ADDRESS>
$ pebble logs --emulator aplite
Connecting to ws://<IP_ADDRESS>:9000/ ... (logging in libpebble2/communication/transports/websocket/init.py constructor)

Two evenings of my life gone :(.

Update: this happens only when export PEBBLE_PHONE="<IP_ADDRESS>" is in my .bash_profile, when I just run PEBBLE_PHONE="<IP_ADDRESS>" in my bash shell, pebble-tool works ok.
Is it possible that pebble-tool spawns a new environment when running the emulator?

This isn't an environment issue; a connection handling refactor inadvertently changed how options are prioritised such that the phone environment variable beats the emulator option.


[DUOS-1758][risk=no] Data Use Agreements - Basic Panel UI

Addresses
https://broadworkbench.atlassian.net/browse/DUOS-1758

Have you read Terra's Contributing Guide lately? If not, do that first.

Label PR with a Jira ticket number and include a link to the ticket
Label PR with a security risk modifier [no, low, medium, high]
PR describes scope of changes
Get a minimum of one thumbs worth of review, preferably two if enough team members are available
Get PO sign-off for all non-trivial UI or workflow changes
Verify all tests go green
Test this change deployed correctly and works on dev environment after deployment

hey @quazi-broad I fixed your feedback + made a styling change, could you give a quick re-review?


[BUG] Unigetui leaks memory during long installs and updates.

Please confirm these before moving forward

[X] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
[X] I have tested that this issue has not been fixed in the latest (beta or stable) release.
[X] I have checked the FAQ section for solutions.
[X] This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version
3.1.3
Windows version, edition, and architecture
Microsoft Windows [Version 10.0.22631.4391]
Describe your issue
Unigetui leaks memory during long installs and updates.
My guess is that all memory is used for live log.
Steps to reproduce the issue
No response
UniGetUI Log
-

Package Managers Logs
-

Relevant information
No response
Screenshots and videos

If the issue is caused by the progress dialog spinning indicator, the issue has already been fixed. Please wait for the next beta release to check if the issue gets resolved by this


force droppable area to accept draggrable object has class .food

Hi,
I am trying to restrict a droppable element to only accept draggable object has class .food and to do that I put 'accept': .food in jqyoui-droppable attribute but this still accepting other class object.

Any help would be great.
Cheers!!

@m-saifuddin You must add the accept configurations in data-jqyoui-options not jqyoui-droppable because it's specific to angular-dragdrop not jqueryUI.


compatibility question of protobuf reflection

The JSON and text format implementations have been ported to use protobuf reflection under the hood instead of relying on Go reflection since v1.4.0. And there are some incompatible cases wthen processing zero values. Such as
type Reply struct {
	IsOk                 bool     `protobuf:"varint,1,opt,name=isOk,proto3" json:"isOk,omitempty"`
	Msg                  []byte   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

var reply types.Reply
err := jsonpb.UnmarshalString(`{"isOk":false, "msg":""}`, &reply)
if err != nil {
    panic(err)
}
fmt.Printf("%#v\n", reply.Msg)

reply.Msg is []byte{} in version before v1.4.0 but nil since v1.4.0. Is it the difference between protobuf reflection and Go reflection?

Hi. Yes, the difference in how nil is handled is due to the difference between protobuf reflection and Go reflection. In particular, protobuf reflection interacts with a protobuf message according to the protobuf data model, which does not preserve presence for []byte in proto3. See https://github.com/golang/protobuf/releases/tag/v1.4.0#v1.4-nil-values for more information.

Hi. Yes, the difference in how nil is handled is due to the difference between protobuf reflection and Go reflection. In particular, protobuf reflection interacts with a protobuf message according to the protobuf data model, which does not preserve presence for []byte in proto3. See https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0#v1.20-nil-values for more information.

thanks


Save States

Stuff to store

All CPU registers
Full contents of PRG RAM
Full contents of CHR RAM (if present)
Full contents of SRAM
All internal state of PPU
All internal state of APU (could maybe skip this, I have a feeling the APU will probably recover itself)
State of mapper (will be different per-mapper)

Format
Thinking about going with JSON, with base64 encoded blobs for the memory dumps.
Or perhaps a binary format like msgpack?

By basing the implementation on Serde we should be able to switch out serialization formats at will.
Implementation plan:

Pull out all the state that needs serializing in each component into it's own struct, which is then embedded in the main object. (e.g. cpu.state, apu.state, etc)
Annotate all of the state objects with serde's Serializable, Deserializable traits.  Since these will be simple objects, we should be able to derive these traits automatically.
Add methods to each object which serialize/deserialize themselves and recursively their children too.

Changing my mind on the implementation plan.  I think I would prefer to keep the serializable state objects totally separate in a separate package, and then just have methods to convert each thing into serializable form.
This will make the save state API easier to track and thus easier to avoid breaking changes to the format.


How to set zyxel PMG3000-D20B  in no_vlan or bridge mode ?

Hi,
Does anyone know how to set pmg3000 in no vlan or bridge mode ?
Currently the sfp works ( onu ploamsg state is 5) but the upload speed is around 3Mbps.
In opt/lantiq/bin/config/ I have the following files: local_bridge.txt  onu_setup_no_vlan.txt  onu_setup_vlan.txt but I didn't find a way to switch between them.
Upon getting the connection the stick configures three vlans 2, 8, 201 and the download speed matches the contracted one,  but the upload speed is way lower.
I have tried to modify fwdopt (mib 84) to other values ( it's set at 0x10 for all vlans ) but no success.
No matter what I do the upload speed is capped at 3-5Mbps.
I have tried this with V1.0 and V2.5. Same results.
Thanks!

What hardware to use? (some sfp cage doesn't support the parity encoding of pmg3000 )

It's plugged in an Edgre-router 4 (ubiquiti).

Hi, Does anyone know how to set pmg3000 in no vlan or bridge mode ?
Currently the sfp works ( onu ploamsg state is 5) but the upload speed is around 3Mbps. In opt/lantiq/bin/config/ I have the following files: local_bridge.txt onu_setup_no_vlan.txt onu_setup_vlan.txt but I didn't find a way to switch between them.
Upon getting the connection the stick configures three vlans 2, 8, 201 and the download speed matches the contracted one, but the upload speed is way lower.
I have tried to modify fwdopt (mib 84) to other values ( it's set at 0x10 for all vlans ) but no success. No matter what I do the upload speed is capped at 3-5Mbps.
I have tried this with V1.0 and V2.5. Same results.
Thanks!

Hello,
Did you success to switch to bridge mode? I'm doing the same..
Also, how can you upload firmware to module? I can't setup TFTP in home network and access it from SFP module..


安卓打包提示WeChatModule.java:7: 错误: 程序包android.support.annotation不存在

Please read and follow the issue templates:

Bug Report or Documentation Issue or Questions and Help?

Which react-native-wechat version are you using?

What platform does your issue occur on? (Android/iOS/Both)

Please provide a clear and concise description of what the bug is as precisely as possible，you can:

post a screenshot to explain in which case you get the issue?
related logs？
show us the code you are using?
others.

Your Environment

software
version

react-native-wechat
^ version

react-native
^ version

node
^ version

npm or yarn
^ version

"react-native-wechat": "^1.9.12"y
"react-native": "0.61.4"
node: v10.16.0
yarn： 1.19.1

try jetifier

解决了吗？

解决了吗？

Same issue

WeChatModule这个包里面的文件
//import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
替换一下就可以打包了

Could be great to PR that...

android run command: npx jetify, fix my issue


Create a benten-weather bolt that gives details about weather

Create a new bolt in BenTen (similar to benten-jira bolt integrates with a weather API like https://openweathermap.org/api.
Create helper methods to get data from the weather API which can be used in other Action Handlers. An example conversation would be How is the weather looking like in the next 2 hours in Bangalore ? and the bot would reply with the weather data for next 2 hours in Bangalore.

Hi! I'd like to take this up if no one is working on it right now. This will be my first time working with a slack bot. Where can i discuss my doubts? I couldn't find any links to gitter/slack channels.

Hi Kartik thanks for reaching out! You can pick this up. Slack is the slack channel to ask questions.
I recommend raising issues on Git when you are blocked or post a question on Stack overflow.

Hi Kartik,
Thanks for reaching out! You can pick this up. Slack
https://app.slack.com/client/TAVQ56C59/CAX0M6B8X is the slack channel to
ask questions.
I recommend raising issues on Git when you are blocked or post a question
on Stack overflow.
Thanks and Regards,
Divakar Ungatla
On Thu, Jul 25, 2019 at 12:57 PM Kartik Kwatra<EMAIL_ADDRESS>wrote:

Hi! I'd like to take this up if no one is working on it right now. This
will be my first time working with a slack bot. Where can i discuss my
doubts? I couldn't find any links to gitter/slack channels.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/intuit/benten/issues/18?email_source=notifications&email_token=ABKMLVLLZN7KYUNJXK7G2IDQBFIV7A5CNFSM4HZ2E5O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2YTDVA#issuecomment-514929108,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABKMLVNGBRDMWWND7J3B6XTQBFIV7ANCNFSM4HZ2E5OQ
.

@DivakarUngatla Thank you. I am unable to join the slack workspace. I think i need an invite for the same.

Hi @DivakarUngatla
Thanks for the response.
I mailed on the email provided on the Intuit Student Hub page but didn't recieve a reply. Even the slack channel seems inactive and no one responded.
I wanted to enquire what are the "rewards" at stake as mentioned on this page: https://intuitstudenthub.com/
What is the judgement criteria?
And can one also land an interview as mentioned in the mail sent by Intuit.
Thanks

taking this for hacktoberfest

Implemented #39


https probe with resolve_first failing due to certificate mismatch

Describe the bug
Using http_probe in HTTPS mode with resolve_first=true option causes certificate mismatch errors because the actual request is done with the resolved ip address without setting TLS server_name to the original host name. This can be mitigated by manually configuring tlsconfig.server_name in http_probe, but this falls short when I have multiple targets with different target hosts.
Cloudprober Version
v0.11.8
To Reproduce
Steps to reproduce the behavior:

Minimal configuration (I replaced target fqdn and ip address with dummy values):probe {
  name: "reproducer"
  type: HTTP
  targets {
    file_targets {
      file_path: "resources.json"
    }
  }
  http_probe {
    protocol: HTTPS
    resolve_first: true
    #tls_config {
    #  server_name: "www.example.org"
    #}
  }
}

resources.json:{
  "resources": [
    {
      "name": "www.example.org",
      "ip": "<IP_ADDRESS>",
      "port": 443,
      "labels": {
        "fqdn": "www.example.org"
      }
    }
  ]
}

Run cloudprober:
W0608 15:04:12.985724       1 http.go:321] [cloudprober.reproducer] Target:www.example.org, URL:https://<IP_ADDRESS>:443, http.doHTTPRequest: Get "https://<IP_ADDRESS>:443": x509: cannot validate certificate for <IP_ADDRESS> because it doesn't contain any IP SANs

Additional context
Explicitly configuring tlsconfig server_name resolves the issue but requires to write a dedicated probe for every target. Unfortunately substitutions do not work here. Being able to use server_name: "@target.label.fqdn@" would have been nice but the value gets passed verbatim.
Setting resolve_first: true is important for my use case because I want to override the target host with the ip address I configured in the targets "ip" field.

Thanks a lot for reporting this issue, @tarrychk. Just to make sure I understand it correctly this issue is not new in v0.11.8, right? It doesn't seem like it should be.

To record my findings so far, solving this is going to be slightly tricky. There are two possible solutions, none very straightforward:

Override transport's DialTLSContext function to copy TLSConfig and override ServerName before starting TLS connection. To be able to do this though, DialTLSContext itself should know the target name, but it gets only the network and addr  in its arguments. There are two ways to solve this -- create per target http.Transport, or keep a probe-wide addr-to-target-name/fqdn map and update it from time to time.

Override transport's DialContext function to call target's resolver function (if resolving first) before establishing the connection. This will change a lot of things, mostly for the better, but we'll have to be very careful. Another problem with this solution is that probe logs won't contain the IP information for request failures.

#159 has one possible solution using per target http.Transport.

I tested #159 and it fixes the issue for me.

Thanks a lot for verifying @tarrychk. I've merged the PR.

Marking this closed. This will go out in the next release: v0.11.9. Next release date is not planned yet, please let me know if you cannot use the "master" tag or the latest binaries, and would like the release to come out sooner.


filewatcher: Add size limit

This is a basic sanity protection to avoid being bombed by bad
configuration or attacks.
This is a breaking change, but it should make future filewatcher changes
less breaking. :)

:haircut:


Connection pooling does not work within Linux

We have just installed the latest SQL 13 drivers and the latest sqlsrv and sqlsrv_pdo PHP extensions. Connection pooling does not seem to be working.

OS: CentOS 7.2
PHP: PHP 7.0.12
SQL Driver: ODBC Driver 13 for SQL Server

Summary of test: We created a test script which will connect to the DB. After the script executes the connection is closed, confirmed by the DB.
odbcinst.ini:
[ODBC]
Pooling = Yes

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.1.0
UsageCount=1
CPTimeout=120

Test script which includes some timing:
$startTime = microtime(true);
function printElapsedTimeSinceLastEvent($event=''){
	global $startTime;
	$elapsed = microtime(true) - $startTime;
	echo $event . round($elapsed*1000) ."\n";
	$startTime = microtime(true);
}

// Connection sqlsrv driver
$pdo = new PDO ("sqlsrv:server=<IP_ADDRESS>;database=aDatabaseName",'coolUser','someAwesomePassword');
printElapsedTimeSinceLastEvent("Connected: ");
$stmt = $pdo->prepare("SELECT TOP 10 * FROM users");
$stmt->execute();
printElapsedTimeSinceLastEvent("Execute: ");
$array = $stmt->fetchAll(PDO::FETCH_ASSOC);
printElapsedTimeSinceLastEvent("Fetch: ");

3 consecutive outputs of script:
Connected: 149
Execute: 109
Fetch: 2

Connected: 149
Execute: 100
Fetch: 2

Connected: 152
Execute: 108
Fetch: 2

Using SQL Studio and running EXEC sp_who2 we can see the connections are closed after each run. Using sqlsrv on Windows does keep connections open as expected and does show up in sp_who2 output.
On Windows where we confirmed connection pooling does exist the connection time is significantly faster as one would expect with connection pooling.

Here is the trace for a simpler connection script
 $pdo = new PDO ("sqlsrv:server=<IP_ADDRESS>;database=someDatabase",'someUser','somePassword');
Please note the SQLDisconnect at the end
[ODBC][9078][1479946562.696384][__handles.c][460]
		Exit:[SQL_SUCCESS]
			Environment = 0x7fe74a5d8f20
[ODBC][9078][1479946562.696669][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a5d8f20
			Attribute = SQL_ATTR_ODBC_VERSION
			Value = 0x3
			StrLen = -6
[ODBC][9078][1479946562.696761][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.696782][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a5d8f20
			Attribute = SQL_ATTR_CONNECTION_POOLING
			Value = (nil)
			StrLen = -5
[ODBC][9078][1479946562.696802][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.696813][__handles.c][460]
		Exit:[SQL_SUCCESS]
			Environment = 0x7fe74a5d96a0
[ODBC][9078][1479946562.696824][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a5d96a0
			Attribute = SQL_ATTR_ODBC_VERSION
			Value = 0x3
			StrLen = -6
[ODBC][9078][1479946562.696832][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.696850][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a5d96a0
			Attribute = SQL_ATTR_CONNECTION_POOLING
			Value = 0x2
			StrLen = -5
[ODBC][9078][1479946562.696858][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.697203][__handles.c][460]
		Exit:[SQL_SUCCESS]
			Environment = 0x7fe74a60da60
[ODBC][9078][1479946562.697219][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a60da60
			Attribute = SQL_ATTR_ODBC_VERSION
			Value = 0x3
			StrLen = -6
[ODBC][9078][1479946562.697228][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.697237][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a60da60
			Attribute = SQL_ATTR_CONNECTION_POOLING
			Value = (nil)
			StrLen = -5
[ODBC][9078][1479946562.697245][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.697254][__handles.c][460]
		Exit:[SQL_SUCCESS]
			Environment = 0x7fe74a60e090
[ODBC][9078][1479946562.697263][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a60e090
			Attribute = SQL_ATTR_ODBC_VERSION
			Value = 0x3
			StrLen = -6
[ODBC][9078][1479946562.697271][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.697280][SQLSetEnvAttr.c][189]
		Entry:
			Environment = 0x7fe74a60e090
			Attribute = SQL_ATTR_CONNECTION_POOLING
			Value = 0x2
			StrLen = -5
[ODBC][9078][1479946562.697288][SQLSetEnvAttr.c][363]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.699369][SQLAllocHandle.c][375]
		Entry:
			Handle Type = 2
			Input Handle = 0x7fe74a5d96a0
[ODBC][9078][1479946562.699393][SQLAllocHandle.c][493]
		Exit:[SQL_SUCCESS]
			Output Handle = 0x7fe74a623c50
[ODBC][9078][1479946562.699520][SQLDriverConnectW.c][290]
		Entry:
			Connection = 0x7fe74a623c50
			Window Hdl = (nil)
			Str In = [Driver={ODBC Driver 13 for SQL Server};Server={<IP_ADDRESS>};UID={someUser};PWD={somePassword};Database={someDatabase};MARS_C...][length = 144]
			Str Out = (nil)
			Str Out Max = 0
			Str Out Ptr = 0x7ffca4495dde
			Completion = 0
		UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'

[ODBC][9078][1479946562.850460][SQLDriverConnectW.c][910]
		Exit:[SQL_SUCCESS_WITH_INFO]
			Connection Out [[NULL]]
		DIAG [01000] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Changed database context to 'someDatabase'.

		DIAG [01000] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Changed language setting to us_english.

[ODBC][9078][1479946562.850613][SQLGetDiagRecW.c][508]
		Entry:
			Connection = 0x7fe74a623c50
			Rec Number = 1
			SQLState = 0x7ffca4495bb0
			Native = 0x7fe744c010a0
			Message Text = 0x7ffca4495790
			Buffer Length = 513
			Text Len Ptr = 0x7ffca4495bbe
[ODBC][9078][1479946562.850646][SQLGetDiagRecW.c][550]
		Exit:[SQL_SUCCESS]
			SQLState = 01000
			Native = 0x7fe744c010a0 -> 5701
			Message Text = [[unixODBC][Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Changed database context to 'someDatabase'.]
[ODBC][9078][1479946562.850702][SQLGetInfo.c][554]
		Entry:
			Connection = 0x7fe74a623c50
			Info Type = SQL_DBMS_VER (18)
			Info Value = 0x7ffca4495c50
			Buffer Length = 256
			StrLen = 0x7ffca4495d54
[ODBC][9078][1479946562.850752][SQLGetInfo.c][617]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.850809][SQLEndTran.c][421]
		Entry:
			Connection = 0x7fe74a623c50
			Completion Type = 1
[ODBC][9078][1479946562.850835][SQLGetInfo.c][554]
		Entry:
			Connection = 0x7fe74a623c50
			Info Type = SQL_CURSOR_COMMIT_BEHAVIOR (23)
			Info Value = 0x7fe74a6250c0
			Buffer Length = 2
			StrLen = 0x7ffca449800e
[ODBC][9078][1479946562.850857][SQLGetInfo.c][617]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.850877][SQLGetInfo.c][554]
		Entry:
			Connection = 0x7fe74a623c50
			Info Type = SQL_CURSOR_ROLLBACK_BEHAVIOR (24)
			Info Value = 0x7fe74a6250c2
			Buffer Length = 2
			StrLen = 0x7ffca449800e
[ODBC][9078][1479946562.850897][SQLGetInfo.c][617]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.850916][SQLEndTran.c][574]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.850934][SQLDisconnect.c][208]
		Entry:
			Connection = 0x7fe74a623c50
[ODBC][9078][1479946562.851017][SQLDisconnect.c][308]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.851055][SQLFreeHandle.c][284]
		Entry:
			Handle Type = 2
			Input Handle = 0x7fe74a623c50
[ODBC][9078][1479946562.851076][SQLFreeHandle.c][333]
		Exit:[SQL_SUCCESS]
[ODBC][9078][1479946562.851586][SQLFreeHandle.c][219]
		Entry:
			Handle Type = 1
			Input Handle = 0x7fe74a60da60

I'm also having this same issue, any word?

@sean256 @champloo11 We are able to repro this issue and are looking into what's going on. Seems like its happening in the ODBC Driver under the hood. We will keep you posted! 👍

@meet-bhagdev thank you! We really thought we were doing something wrong on our end. Getting connection pooling working would be huge for performance.

Is there any ETA on a potential fix for this, or info on mitigation?

@champloo11 We don't have a fix for this yet. A potential mitigation: In your odbcinst.ini can you try mentioning Pooling=Yes (Example below). Run your script again and let us know what happens.
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.1.0
UsageCount=1
Pooling = Yes

@meet-bhagdev It was my script and I have tried that with no luck. I had tried that variant before posting when I was just thrashing for a solution.
I'm not familiar with the inner workings of ODBC at all but the ODBC docs do state Pooling should be under [ODBC]. I still tried it in both places with no luck.
It also states CPTimeout should live under the DSN. Is that an ODBC specific property or is it something that each drive much implement?

@sean256 We are currently working on this and should have an update for you in the next 1-2 months.

@sean256 Just an update: we are working on a fix for this. We will be completing the fix and testing it in the next 1-2 weeks. If the results are as expected we will release it in our next preview release.

@sean256 the 4.1.6 release on github or the <IP_ADDRESS> release on PECL enables connection pooling for unixODBC 2.3.1. The readme and changelog contains a list of limitations or issues you may encounter when you use connection pooling.
By default connection pooling is disabled. To enable, in odbcinst.ini, add Pooling=Yes to the [ODBC] section and a positive CPTimeout value to [ODBC Driver 13 for SQL Server] section. So minimally it should look like:
[ODBC]
Pooling=Yes

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.3.0
UsageCount=1
CPTimeout=120

See http://www.unixodbc.org/doc/conn_pool.html for detailed instructions.
Enabling connection pooling with unixODBC 2.3.4 will not work with pdo_sqlsrv but we have it on our backlog to fix.

@ champloo11 @sean256 have you had a chance to try this?

@meet-bhagdev
I'm having a compile error for the PECL package mentioned by @v-dareck
Here is what I have installed:
msodbcsql.x86_64                                                                        <IP_ADDRESS>-1
unixODBC.x86_64                                                                         2.3.1-11.el7
php.x86_64                                                                              7.1.1-2.el7.remi
php-cli.x86_64                                                                          7.1.1-2.el7.remi
php-common.x86_64                                                                       7.1.1-2.el7.remi
php-devel.x86_64                                                                        7.1.1-2.el7.remi
php-json.x86_64                                                                         7.1.1-2.el7.remi
php-pdo.x86_64                                                                          7.1.1-2.el7.remi
php-pear.noarch                                                                         1:1.10.1-10.el7.remi
php-process.x86_64                                                                      7.1.1-2.el7.remi
php-xml.x86_64                                                                          7.1.1-2.el7.remi

The output for sudo pecl install
downloading pdo_sqlsrv-<IP_ADDRESS>.tgz ...
Starting to download pdo_sqlsrv-<IP_ADDRESS>.tgz (181,014 bytes)
..............................done: 181,014 bytes
34 source files, building
running: phpize
Configuring for:
PHP Api Version:         20160303
Zend Module Api No:      20160303
Zend Extension Api No:   320160303
building in /var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>
running: /var/tmp/pdo_sqlsrv/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes...  BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>/libtool --mode=compile g++ -I/usr/include/php/ext -std=c++11 -I. -I/var/tmp/pdo_sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>/include -I/var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>/main -I/var/tmp/pdo_sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/pdo_sqlsrv/shared/  -DHAVE_CONFIG_H  -std=c++11   -c /var/tmp/pdo_sqlsrv/pdo_dbh.cpp -o pdo_dbh.lo
libtool: compile:  g++ -I/usr/include/php/ext -std=c++11 -I. -I/var/tmp/pdo_sqlsrv -DPHP_ATOM_INC -I/var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>/include -I/var/tmp/pear-build-rootgcvbtA/pdo_sqlsrv-<IP_ADDRESS>/main -I/var/tmp/pdo_sqlsrv -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/var/tmp/pdo_sqlsrv/shared/ -DHAVE_CONFIG_H -std=c++11 -c /var/tmp/pdo_sqlsrv/pdo_dbh.cpp  -fPIC -DPIC -o .libs/pdo_dbh.o
In file included from /var/tmp/pdo_sqlsrv/shared/typedefs_for_linux.h:23:0,
                 from /var/tmp/pdo_sqlsrv/shared/xplat_winnls.h:24,
                 from /var/tmp/pdo_sqlsrv/shared/FormattedPrint.h:24,
                 from /var/tmp/pdo_sqlsrv/shared/core_sqlsrv.h:41,
                 from /var/tmp/pdo_sqlsrv/php_pdo_sqlsrv.h:23,
                 from /var/tmp/pdo_sqlsrv/pdo_dbh.cpp:20:
/var/tmp/pdo_sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
 #include <sql.h>
                 ^
compilation terminated.
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed

@sean256 can you install the unixODBC-devel package?
That should fix the missing sql.h error.

@v-dareck
I got it building with PECL now.
I can not get connection pooling to work. After each run the connection is still disconnected.
Here is my odbcinst.ini
[ODBC]
Pooling=Yes
Trace = yes
TraceFile =/tmp/odbc_trace.log

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.4.0
UsageCount=1
CPTimeout=120

Here is the end of the trace output, please note the same SQLDisconnect. This happens immediately after the php script is executed.
[ODBC][4650][1487116813.657018][SQLEndTran.c][574]
		Exit:[SQL_SUCCESS]
[ODBC][4650][1487116813.657029][SQLDisconnect.c][208]
		Entry:
			Connection = 0x7fbcc129d630
[ODBC][4650][1487116813.657041][SQLDisconnect.c][308]
		Exit:[SQL_SUCCESS]
[ODBC][4650][1487116813.657052][SQLFreeHandle.c][284]
		Entry:
			Handle Type = 2
			Input Handle = 0x7fbcc129d630
[ODBC][4650][1487116813.657074][SQLFreeHandle.c][333]
		Exit:[SQL_SUCCESS]
[ODBC][4650][1487116813.657148][SQLFreeHandle.c][219]
		Entry:
			Handle Type = 1
			Input Handle = 0x7fbcc129ba80

I also verified on the SQL server by using exec sp_who that the connection is killed off.

@sean256 the unixODBC log file will always show SQLDisconnect call. When pooling is enabled unixODBC will put the connection back into a pool during the SQLDisconnect call.
Did you check the events in SQL Profiler?
When pooling is on there should be less login/logout. Also if your PHP process exists all the connections are closed.

@v-dareck That is not how it works on windows using the sqlsrv drivers.
On Windows when using php and apache/iis the connections stay open for the specified amount of time after the request is done. The next request will pull from the pool instead of opening a new one.
I just verified this on our Windows server.
I did find that when executing the script solo via command line on windows the connection does close after excecution. This tells me the connection is tied to Apache when used and not the php process. With that said I cannot get the connections to stay alive on linux even behind Apache.
I am still toying around with it and will provide updates if I discover anything.

This screenshot is the sleeping connection after hitting a test script on Windows via Apache.

@v-dareck good news!
After rebooting the VM pooling does work when behind apache. It's behavior is a little different but it's working!
The pool size seems to be fixed at 6 and the connections don't actually close unless the a connection is requested and the only thing left are connections that are over the CPTimeout.
Do you know how to change the pool size?

@sean256
Some more details about how connection pooling works in unixODBC are detailed in the links below. While they do not refer to the php driver the behavior is the same.  Timed out connections are only closed when another connection is made.
http://www.easysoft.com/products/data_access/odbc_odbc_bridge/performance_white_paper.html#2_3
http://www.easysoft.com/products/data_access/odbc_oracle_driver/performance_tuning_guide.html#connection_pooling
I didn't notice anything about connection pool size in unixODBC docs or browsing through their code. There is a connection limit to SQL Server (https://msdn.microsoft.com/en-us/library/ms187030.aspx). So unless you set that limit to 6 I'm not sure why it is fixed. Could it be an Apache setting?

@v-dareck   Enabling connection pooling with unixODBC 2.3.4 will not work with pdo_sqlsrv but we have it on our backlog to fix.
Have any updation regarding this ?

You're highly recommended to install unixODBC 2.3.7. Also, upgrade to ODBC Driver 17 if you have ODBC Driver 13 only. This will install unixODBC 2.3.7 as a dependency.
If you still have problems, please create a new issue.


Do not show Pay For Order if order is partly paid since partial payment is not supported

Since saleor does not support partial payment (from https://github.com/mirumee/saleor/blob/master/saleor/graphql/payment/mutations.py#L75 and https://github.com/mirumee/saleor/blob/master/saleor/payment/gateways/braintree/forms.py#L31), it's better to do not show Pay For Order in order's detail page if a order is partly paid. Othewise user may pay twice with total amount if a payment is partly paid such as when payment is partly refunded, though it will finally raise a Charged transactions cannot be authorized again error by clean_authorize.
Pull Request Checklist

[x] Privileged views and APIs are guarded by proper permission checks.
[x] All visible strings are translated with proper context.
[x] All data-formatting is locale-aware (dates, numbers, and so on).
[x] Database queries are optimized and the number of queries is constant.
[x] Database migration files are up to date.
[x] The changes are tested.
[x] The code is documented (docstrings, project documentation).
[x] GraphQL schema and type definitions are up to date.

@jxltom Does the issue affect the API / Dashboard 2.0 as well? If yes, we could fix it in this PR but if you don't have time and the issue occurs over there, just open a new issue so we don't forget about it.
We've recently added CHANGELOG.md file, could to you update it (and all your other PRs well)? Thanks!


Add ProxyAddress

I removed Set-FGTFirewallProxyAddress function, because it was not ready yet. I will look in to that when i got the time.

I removed Set-FGTFirewallProxyAddress function, because it was not ready yet. I will look in to that when i got the time.

Sure, no problem ! (it is may be like SetFGTFirewallAddress) if the object is use... (you can not modified all parameter...)
it is on my TODO too ;-) (when after i will write tests...)

Hi Arthur,
Sorry for delay, but i found time to finish test (for Proxy Policy), can you look before i will merge ?

Thanks for all the code changes. I went through all the changes you made and it looks great en very clean. I think its ready to merge.

Ok found a issue... with FortiGate 6.0.. need to enable Explicit Proxy before add proxy explicit policy
i will see for fix this issue too


input starts dirty when hydrated

If I have an atom defined like this
export const nameAtom = atomWithValidate("", {
  validate: (name) => {
    try {
      name.parse(name);
      return name;
    } catch (err: any) {
      throw err.issues;
    }
  },
});

and hydrate it via
useHydrateAtoms([[nameAtom, "hello world"]);

the input will start as dirty, since "hello world" !== "". If an atom is hydrated, what it is hydrated with should be the initial value that is checked against to determine if the input is dirty or not.

Thanks for the report, i'll get back to you once I have time to check the reasoning

You bet! The reason I bring it up is because the current system works great when you start in an empty form, but if you want to start on a form with values already filled out, all the inputs with values with pre-filled data will be dirty, even though you never touched them yourself.

Before you spend any time on this, I have a POC solution working great locally, I need to head out for the day, but can open a starter PR to get the conversation going!

If this idea goes ahead, personally I would propose a slightly different api signature:
export const nameAtom = atomWithValidate("", {
  initialValue: "< this string will be used to compare against >",
  validate: (name) => { ... },
});

This new option could help with this idea of passing an atom as the value.

This should be doable once the react utils exports are done, can be followed here
https://github.com/jotaijs/jotai-form/pull/27

If this idea goes ahead, personally I would propose a slightly different api signature:
export const nameAtom = atomWithValidate("", {
  initialValue: "< this string will be used to compare against >",
  validate: (name) => { ... },
});

This new option could help with this idea of passing an atom as the value.

Sorry missed this,
in both API's it seems like you already have access to the value you wish to compare against, why not just pass it to the atom to begin with?
export const nameAtom = atomWithValidate("originalValue", {
  validate: (name) => { ... },
});

useHydrateAtoms was for SSR cases where the atoms are re-created and the original atom might already have been initialised,  that isn't always the case with forms so it should be fine to just add in the original value as the first param, unless you are using the nameAtom as both a default store and also wish to add in initial value to the form after a data fetch.
For async atom creation, we don't have anything in this library right now which is why the original request makes sense, though the original jotai library doesn't signal a hydration on the atom which makes it hard for this to work with the original for SSR.
@dai-shi how bad of an idea is it if we export the hydrated store for the library to make use of?

how bad of an idea is it if we export the hydrated store for the library to make use of?

Sorry, I don't follow. Can you elaborate please? Is it about jotai-form, or jotai itself?

how bad of an idea is it if we export the hydrated store for the library to make use of?

Sorry, I don't follow. Can you elaborate please? Is it about jotai-form, or jotai itself?

Jotai has a map of hydrated atoms that it uses to avoid double hydration on the same atom during SSR, would it be a problem if we exported a getter for that map?

I see. As you may guess, I would like to avoid exposing it.
At the same time, I'm not confident that useHydrateAtoms cover various cases.
Maybe it's time to reconsider the hydration scenario from scratch.
(Though, I still don't follow the discussion. Can it be described without jotai-form context?)

The discussion is about being able to re-initialize the form atom with a different value over a period of time (which I think is a valid requirement) but, the API's presented by the other developers seem to point in a direction where the value is already known at initialization which doesn't make sense since you could just pass it as the initial value instead

If useHydrateAtoms doesn't work, we generally suggest useEffect.
We've been suggesting so, but we may need to explore a new pattern.
If setAtom in render works without React warning, that might be a (new) solution.

in this case the setAtom would create a Dirty form so yep, we need a different helper.
I was planning to use the store API but then that's react specific as well

We could do something like so to allow the RESET, and also add in a wrapper to avoid the awkwardness of using the constants
https://github.com/jotaijs/jotai-form/pull/31