MSVC float (conditional) division and multiplication not decompiled correctly

Describe the bug
De-compiling code that uses conditional float division and multiplication will not show these operations.
It also does not recognize the _ftol function and the conversion from float to dword.
Thanks
To Reproduce
Using standard options to decompile some code.
The code was presumably compiled using Visual Studio 6.0
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Attachments
Listing of the function

                             **************************************************************
                             *                          FUNCTION                          *
                             **************************************************************
                             float10 __stdcall FUN_01008f03(PVec3 * vec3, PVec2 * dest)
             float10           ST0:10         <RETURN>
             PVec3 *           Stack[0x4]:4   vec3                                    XREF[1]:     01008f0f(R)
             PVec2 *           Stack[0x8]:4   dest                                    XREF[1]:     01008f53(R)
             undefined4        Stack[-0x8]:4  local_8                                 XREF[2]:     01008f1c(R),
                                                                                01008f3c(R)
             undefined4        Stack[-0xc]:4  local_c                                 XREF[1]:     01008f50(R)
             undefined4        Stack[-0x10]:4 local_10                                XREF[2]:     01008f0b(*),
                                                                                01008f3f(R)
                             FUN_01008f03                                    XREF[1]:     FUN_01015c08:01015c47(c)
        01008f03 8b ff           MOV        EDI,EDI
        01008f05 55              PUSH       EBP
        01008f06 8b ec           MOV        EBP,ESP
        01008f08 83 ec 0c        SUB        ESP,0xc
        01008f0b 8d 45 f4        LEA        EAX=>local_10,[EBP + -0xc]
        01008f0e 50              PUSH       EAX
        01008f0f ff 75 08        PUSH       dword ptr [EBP + vec3]
        01008f12 68 60 81        PUSH       PMat4X3_01028160                                 =
                 02 01
        01008f17 e8 32 fe        CALL       Math_mul_mat4x3_vec3                             undefined Math_mul_mat4x3_vec3(P
                 ff ff
        01008f1c d9 45 fc        FLD        dword ptr [EBP + local_8]
        01008f1f dd 05 f8        FLD        qword ptr [DAT_010016f8]
                 16 00 01
        01008f25 da e9           FUCOMPP
        01008f27 df e0           FNSTSW     AX
        01008f29 f6 c4 44        TEST       AH,0x44
        01008f2c 7a 08           JP         LAB_01008f36
        01008f2e d9 05 18        FLD        dword ptr [DAT_01001718]                         = FEh
                 17 00 01
        01008f34 eb 09           JMP        LAB_01008f3f
                             LAB_01008f36                                    XREF[1]:     01008f2c(j)
        01008f36 d9 05 40        FLD        dword ptr [DAT_01028140]                         = ??
                 81 02 01
        01008f3c d8 75 fc        FDIV       dword ptr [EBP + local_8]
                             LAB_01008f3f                                    XREF[1]:     01008f34(j)
        01008f3f d9 45 f4        FLD        dword ptr [EBP + local_10]
        01008f42 56              PUSH       ESI
        01008f43 d8 c9           FMUL       ST1
        01008f45 d8 05 3c        FADD       dword ptr [DAT_0102813c]                         = ??
                 81 02 01
        01008f4b e8 16 82        CALL       _ftol                                            undefined _ftol()
                 01 00
        01008f50 d9 45 f8        FLD        dword ptr [EBP + local_c]
        01008f53 8b 75 0c        MOV        ESI,dword ptr [EBP + dest]
        01008f56 d8 c9           FMUL       ST1
        01008f58 89 06           MOV        dword ptr [ESI],EAX
        01008f5a d8 05 38        FADD       dword ptr [DAT_01028138]                         = ??
                 81 02 01
        01008f60 e8 01 82        CALL       _ftol                                            undefined _ftol()
                 01 00
        01008f65 dd d8           FSTP       ST0
        01008f67 d9 05 1c        FLD        dword ptr [DAT_0100171c]
                 17 00 01
        01008f6d 89 46 04        MOV        dword ptr [ESI + 0x4],EAX
        01008f70 5e              POP        ESI
        01008f71 c9              LEAVE
        01008f72 c2 08 00        RET        0x8
        01008f75 cc              ??         CCh
        01008f76 cc              ??         CCh
        01008f77 cc              ??         CCh
        01008f78 cc              ??         CCh
        01008f79 cc              ??         CCh

Result of decompilation

float10 FUN_01008f03(PVec3 *vec3,PVec2 *dest)

{
  float fVar1;
  PVec3 local_10;

  Math_mul_mat4x3_vec3(&PMat4X3_01028160,vec3,&local_10);
  fVar1 = (float)_ftol();
  dest->x = fVar1;
  fVar1 = (float)_ftol();
  dest->y = fVar1;
  return (float10)1.00000000;
}

Environment (please complete the following information):

OS: Windows 10
Java Version: 1.8.0_162
Ghidra Version: 9.1

For PVec2 if you merge X and Y by making it a double or making it a union for a double does it change or did you already do that here?

Also, note that this function is using global data DAT_010016f8, DAT_01001718, DAT_01028140 and DAT_0102813c.
These are also not shown in the decompiled code.

I'm not sure if it's specifically conditional floating point instructions that get messed up, but it seems like the decompiler struggles with floating point instruction sequences (e.g. nothing shows up in the decompiled output for several floating point instructions, sometimes very long sequences of floating point instructions).
It seemed like it was reading global data fine in some instances, so it maybe it gives up with subsequent floating point instructions after encountering one it doesn't understand.

FUN_004ab350
     MOV        EAX ,[DAT_00542074 ]

     TEST       EAX ,EAX
     JLE        LAB_004ab372
     FILD       dword ptr [DAT_00542074 ]

     FMUL       qword ptr [DAT_004d27b0 ]

     FSQRT
     FMUL       qword ptr [DAT_004d27b8 ]

     CALL       stdc::__ftol

LAB_004ab372
     MOV        [DAT_0054206c ],EAX

     RET

Decompiles as:
void FUN_004ab350(void)
{
  int iVar1;

  iVar1 = DAT_00542074;
  if (0 < DAT_00542074) {
    iVar1 = __ftol();
  }
  DAT_0054206c = iVar1;
  return;
}

The issue is the fact that before __ftol, no value is returned to memory, as __ftol does that.
I've set the signature of __ftol to "longlong __ftol (double param_1)", with custom storage set as thus:
Return: longlong (EAX, EDX)
param1: double (ST0)
After setting this the decompilation shows:
void FUN_004ab350(void)
{
  int iVar1;
  longlong lVar2;

  iVar1 = DAT_00542074;
  if (0 < DAT_00542074) {
    lVar2 = __ftol(SQRT((double)DAT_00542074 * 0.00001526) * 65536.00000000);
    iVar1 = (int)lVar2;
  }
  DAT_0054206c = iVar1;
  return;
}

Which looks correct to me.

@Jaguar83 thanks for the tip! I'm still having some issues with it, the image below shows my settings:

An example of the instructions Ghidra is getting:
PUSH       EBP
    MOV        ECX,dword ptr [ESP + param_2]
    MOV        EBP,ESP
    SUB        ESP,0x4
    MOV        EAX,dword ptr [EBP + param_1]
    CMP        ECX,EAX
    JG         LAB_00424e33
    XOR        EAX,EAX
    JMP        LAB_00424e54
LAB_00424e33
    MOV        dword ptr [EBP + local_8],ECX
    FILD       dword ptr [EBP + local_8]
    MOV        dword ptr [EBP + local_8],EAX
    FLD        ST0
    FISUB      dword ptr [EBP + local_8]
    FDIVP
    FSUB       qword ptr [DOUBLE_004c8f18]
    FMUL       qword ptr [DOUBLE_004c8f28]
    CALL       _ftol
LAB_00424e54
    MOV        ESP,EBP
    POP        EBP
    RET

And the output I get after from Ghidra is this:
undefined4 uVar1;
longlong lVar2;

if (param_1 < param_2) {
  lVar2 = _ftol((double)CONCAT44(param_1,0x424e54));
  uVar1 = (undefined4)lVar2;
}
else {
  uVar1 = 0;
}
return uVar1;

Which still looks messed up, as the FDIV, FMUL, and FSUB aren't showing up -- the same output from the HexRays decompiler shows the expected operations.

Storage for param_1 needs to be ST0

Thanks! Yea, I realized that and made the change. The new output is much better, the relevant decompiler output now looks like:
lVar2 = _ftol(((double)param_2 / ((double)param_2 - (double)param_1) - 1.00000000) * 5000.00000000);

A screenshot of the settings I used for any people that come across this and want a visual:

As a general note, it would seem that the analyser would need to pick up the signature of __ftol to fix this issue in the long term.
However, as this function uses a non-standard calling convention, I don't think it would fit under standard analysis rules, so a special rule would need to added for this function. Not sure if this is possible, as I haven't had a look at the relevant source code yet.

Last night I was trying to figure out how ghidra knows what the function signatures and calling conventions for the other msvcrt functions -- it looks like a lot of the other msvcrt functions have entries in the gdt files here: https://github.com/NationalSecurityAgency/ghidra/tree/master/Ghidra/Features/Base/data/typeinfo/win32
I noticed that adding a _ftol function definition to the data type manager made it use that function signature for _ftol, though the data type manager doesn't seem to have any custom storage support to handle the special calling convention the _ftol function uses.
There seem to be a few other functions in the list of Internal CRT Globals and Functions microsoft has, with some of the subpages like _CIsin mentioning the special calling convention used. Interfacing with the _ftol2 function also appears in the LLVM mailing list with some talk about how it is called here and here

Thanks! Yea, I realized that and made the change. The new output is much better, the relevant decompiler output now looks like:
lVar2 = _ftol(((double)param_2 / ((double)param_2 - (double)param_1) - 1.00000000) * 5000.00000000);

A screenshot of the settings I used for any people that come across this and want a visual:

you just saved my life...this issue still exists!

Still an issue ran into this recently. Above fix still works thanks @wrharper !

Credit goes to @nightlark


Allow passing settings when creating a BigQuery Client

Currently there is not way to pass options to the BigQuery client.  To set the timeout the user has to call:
BigQueryClient.Create("pid");
client.Service.HttpClient.Timeout = Timespan.fromSeconds(200).

Most of the other clients expose a settings object.  If this is by design we may want to add it to the docs.

I ended up using Timeout.Infinite. Not even sure that is safe but i assume bigquery will always return... ultimately?
thanks @iantalarico

I think actually there's a limit within the BigQuery service. If this is a query, the preferred approach is to call CreateQueryJob and poll for that to complete.

Closing for the moment as I don't plan on any changes, unless more information is provided about what is trying to be achieved.


Broken link

The next steps best practices link is broken.

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

ID: ed330edc-c3ab-d053-faad-4dc5da373b48
Version Independent ID: 625ab8a7-8379-0a1c-c633-fa7bf80f161e
Content: Introduction to Azure Kubernetes Service - Azure Kubernetes Service
Content Source: articles/aks/intro-kubernetes.md
Service: container-service
GitHub Login: @MGoedtel
Microsoft Alias: magoedte

@marlobello
Thanks for your feedback! We will investigate and update as appropriate.

@marlobello
Duplicate of #102601  #102441
We are going to close this thread as Duplicate

Thanks for bringing this to our attention. I created a PR last night and fixed it. The changes should be live.


Fix code_generator, replace semantic.trans with semantic.permute

https://github.com/openai/triton/commit/855ac8f02ed98c9ad5c4f4e270c7ef2062062d95 has replaced semantic.trans with semantic.permute and changed the set of required parameters.
This updates CodeGenerator.visit_Attribute accordingly.

Thanks. I think it's worth adding a unit test .T.

Thank you, I've added a test


Ensure matching priority is in :ets key

Update. Initially the PR was opened against an older tree (also indicated in ebert's message). After I saw that I rebased the branch to see: priorities and _.
Before:
iex(1)> for {_, api, _, _} <- :ets.tab2list(:configuration), do: IO.puts api.inserted_at
2017-05-07 22:59:40.703795Z
2017-05-24 11:51:44.956792Z
2017-05-24 09:28:34.235263Z
2017-05-10 16:48:00.736411Z
2017-05-11 12:32:50.745892Z
2017-05-15 13:59:01.783186Z
2017-05-11 12:09:26.882815Z
2017-05-10 08:39:57.107934Z
2017-05-11 11:53:21.318624Z
2017-05-25 17:08:25.963739Z
2017-05-17 11:49:41.553655Z
2017-05-12 14:10:39.957690Z
2017-05-11 10:12:04.932357Z
2017-05-11 12:09:25.737372Z
2017-05-11 12:30:58.235430Z
2017-05-11 12:08:02.986755Z
2017-05-18 12:36:40.517500Z
2017-05-25 17:08:16.817616Z
2017-05-07 23:23:18.283755Z
[:ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok,
 :ok, :ok, :ok]
iex(2)>

After:
iex(1)> for {_, api, _, _} <- :ets.tab2list(:configuration), do: IO.puts api.inserted_at
2017-05-07 22:59:40.703795Z
2017-05-07 23:23:18.283755Z
2017-05-10 08:39:57.107934Z
2017-05-10 16:48:00.736411Z
2017-05-11 10:12:04.932357Z
2017-05-11 11:53:21.318624Z
2017-05-11 12:30:58.235430Z
2017-05-11 12:09:25.737372Z
2017-05-11 12:32:50.745892Z
2017-05-11 12:09:26.882815Z
2017-05-11 12:08:02.986755Z
2017-05-12 14:10:39.957690Z
2017-05-15 13:59:01.783186Z
2017-05-17 11:49:41.553655Z
2017-05-18 12:36:40.517500Z
2017-05-24 09:28:34.235263Z
2017-05-24 11:51:44.956792Z
2017-05-25 17:08:16.817616Z
2017-05-25 17:08:25.963739Z
[:ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok, :ok,
 :ok, :ok, :ok]
iex(2)>

Ebert has finished reviewing this Pull Request and has found:

8 possible new issues (including those that may have been commented here).

But beware that this branch is 42 commits behind the Nebo15:master branch, and a review of an up to date branch would produce more accurate results.
You can see more details about this review at https://ebertapp.io/github/Nebo15/annon.api/pulls/245.

Changes Unknown when pulling 20c8f7d32115f59d3642a402a9cc7b7f1072e780 on ensure-stuff-is-stored-properly-ordered into ** on master**.

Ebert has finished reviewing this Pull Request and has found:

1 possible new issue (including those that may have been commented here).

You can see more details about this review at https://ebertapp.io/github/Nebo15/annon.api/pulls/245.

Changes Unknown when pulling 9188b70eeb3b31043333910c3c161a67802d2af2 on ensure-stuff-is-stored-properly-ordered into ** on master**.

Changes Unknown when pulling 590dee24787aec045faf2c34076b8a20028f6ed3 on ensure-stuff-is-stored-properly-ordered into ** on master**.


OIDC implementation for Microsoft

Handle the login request

id token the sub inside the token should be stable per client id atleast

Handle the callback

The external OIDC providers can be supported through hub-auth configurations. This issue is not applicable now.


Deprecate make_evaluation_predictions

Instead of using make_evaluation_predictions predictors should know how to evaluate themselves:
make_evaluation_predictions(test_dataset=test_dataset, estimator=predictor)

# vs

predictor.evaluate(test_dataset)

What would be the advantage?
Generally, I think evaluation code should be strictly separate from model (estimator/predictor) code, because they have different functions and should therefore be separated.

Generally, I think evaluation code should be strictly separate from model (estimator/predictor) code

I agree, but I guess the idea is to still keep the code separate by having the evaluate method in the base Predictor class.
@jaheba one observation: the way you put it
predictor.evaluate(test_dataset)

would be a replacement for backtest_metrics rather than make_evaluation_predictions.

I like this proposal because:

One doesn't need additional imports.
The evaluation is unambiguously done on the predictor object, and not on a predictor OR an estimator (in which case training needs to be done). If we want to keep the functionality on estimators, we can add the same method to the base Estimator class which will do the training and call the evaluation method of the resulting predictor.
We could get rid of the backtest_metrics/make_evaluation_predictions by means of optional arguments to select whether to compute only predictions or also evaluation metrics.


analytics.service.ts(19,40): error Parameter 'event' implicitly has an 'any' type. ngx-admin

These are the errors throwing while npm start. Please review and let me know your feedback.

Hi @AtifJaved1, what are the steps you followed? Is this a clean setup or under the sailsjs?

The issue is resolved now. I just added "noImplicitAny": false, in the tsconfig.json. and the issue is resolved. Thanks for following up.


Adding Scroll Progress Bar

@Avdhesh-Varshney
I would like to add a scroll progress bar
Could you please assign it to me

#304


This PR is not needed anymore.


[BACKEND] Pipeliner refactoring

Refactor the pipeliner pass in order to make it more generic. The main change is that the pipeliner is now broken into 2 pieces one calculating a modulo schedule and create async ops based on the IR and an expander that will generate the pipelined IR based on the modulo schedule.
The advantage of separating the two pieces is that it will allow us to create different schedule without having to change the expander and it will allow for more complex schedules.
For now the schedule generated for matmul case matches rougly the schedule picked by the previous pipeliner in order to avoid changes.
This currently doesn't support expanding tensor loads to TMA ops. This also creates a different sequence of insert/extract slice for the alloc. We should probably change shared alloc to use memory semantic.

What does the last sentence mean?

We should probably change shared alloc to use memory semantic.

What does the last sentence mean?

We should probably change shared alloc to use memory semantic.

I started a thread with few people about this but the main idea is to change the sequence:
%10 = triton_gpu.alloc_tensor : tensor<2x128x32xf16, #shared>
 %14 = triton_gpu.insert_slice_async %4, %10, %c0_i32, %13 {axis = 0 : i32, cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<128x32x!tt.ptr<f16, 1>, #blocked1> -> tensor<2x128x32xf16, #shared>
 %25 = triton_gpu.extract_slice %14[%c0_i32, 0, 0] [1, 128, 32] [1, 1, 1] : tensor<2x128x32xf16, #shared> to tensor<128x32xf16, #shared>

so that insert_slice_async doesn't return a new tensor to something like this:
 %10 = triton_gpu.alloc_tensor : !tt.ptr<tensor<2x128x32xf16, #shared>, 3>
 triton_gpu.copy_slice %4, %10, %c0_i32, %13 {axis = 0 : i32, cache = 1 : i32, evict = 1 : i32, isVolatile = false} : tensor<128x32x!tt.ptr<f16, 1>, #blocked1>, !tt.ptr<tensor<2x128x32xf16, #shared>, 3> -> tensor<2x128x32xf16, #shared>
 %25 = triton_gpu.get_slice %10[%c0_i32, 0, 0] [1, 128, 32] [1, 1, 1] : !tt.ptr<tensor<2x128x32xf16, #shared>, 3> to tensor<128x32xf16, #shared>

Thanks for reviewing. I added support for TMA and addressed the comments. Please take another look, if everybody is happy with it, it should be good to go


BS Jquery plugins become available only after document loaded.

Scaenario: Bootstrap 5 loaded as UMD with jquery.
Problem: BS Jquery plugins become available only after document was loaded. This broke migration to BS 5.
Expected behavior: plugin become available as soon as the script was loaded SYNCHRONOUSLY to other jquery plugins (and therefore developer can maintain the plugin load order and dependencies).
Sample. This doesn't work
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>    <script<EMAIL_ADDRESS>    <script>
         $('[data-bs-toggle="tooltip"]').tooltip()
    </script>

When this works normally:
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>    <script<EMAIL_ADDRESS>    <script>
        document.addEventListener("DOMContentLoaded", function (event) {
            (function () {
                $('[data-bs-toggle="tooltip"]').tooltip()
            })();
        });
    </script>

As code investigation shows the bootstrap component intentionally postpone the plugin availability:
From https://github.com/twbs/bootstrap/blob/main/js/src/util/index.js#L214
const defineJQueryPlugin = plugin => {
    onDOMContentLoaded(() => {
        const $ = getjQuery()
        if ($) {
            const name = plugin.NAME
            const JQUERY_NO_CONFLICT = $.fn[name]
            $.fn[name] = plugin.jQueryInterface
            $.fn[name].Constructor = plugin
            $.fn[name].noConflict = () => {
                $.fn[name] = JQUERY_NO_CONFLICT
                return plugin.jQueryInterface
            }
        }
    })
}

The reason is unkonwn
This information is absent in migration doc. I think this should be considered as a bug (compatibility with jquery and previous code: now there is a new headache how to mange plugin load order).
More information:
https://stackoverflow.com/questions/67953465/bootstrap-5-jquery-is-it-possible-to-force-bootstrap-5-to-inject-its-jquery-p/67957165#67957165

It was done intentionally in #32024 :slightly_smiling_face:
There was a reason for the change, see the issue for more information.

I'm unsure how to solve this and not reintroduce the aforementioned issue. If anyone has any ideas please make a PR.

@XhmikosR create jquery bundle and maintain compatability with BS5 for it. actually it is also the best in terms of require correctness.  You see, now your bundle do not require the jquery and when people create application bundle with webpack the webpack can load bootstrap first to jquery (there are no declaration).

Arguably there has been some paradigm shift away from jQuery with v5 IMO. While in v4 (and earlier) Bootstrap heavily depended on jQuery this isn't the case with v5 anymore. The only leftovers are the definitions for those jQuery plugins. Thus I'm not sure if creating a separate jquery bundle is really a good approach or supports this idea.
That's also the reason why we don't require or import jQuery because that would make jQuery a dependency again which shouldn't be the case if someone uses Bootstrap without jQuery (by making use of the API introduced in v5).
I'd like to argue that bundlers are a different topic in general. Some of them require additional steps to properly set things up and they may provide extra functionality that depends on the bundler that is used. In webpack for example you may use the ProvidePlugin to have Webpack take care of importing jQuery automatically even when there are no explicit imports. IMO a bundler environment shouldn't make use of an already bundled version, like the UMD bundle, because of tree shaking but thats a different story.

About possible sollutions.
One you figured out by yourself already and I'm not sure what's wrong with this approach. For example, if you was to load bootstrap in the <head> section, most likely you would have to delay the execution anyway because the DOM isn't parsed yet. Event listeners are executed in the order they have been added, so as long you add the DOMContentLoaded listener after including the Bootstrap bundle, you should be fine.
On a side note, in your example there is no need for the IIFE, so this would be enough.
document.addEventListener("DOMContentLoaded", function (event) {
  $('[data-bs-toggle="tooltip"]').tooltip()
});

In general, I'm not sure about the intention behind this data-bs-no-jquery. I can't imagine this is widely used.  My assumption about this, as a use case, is that someone uses jQuery but got other plugins loaded that would conflict with the naming of those from Bootstrap and calling noConflict on each conflicting one, is tedious or not possible or something. Or someone is really concerned about the resource usage of the JS code.
We could either remove that flag or move it on the html element instead. That wouldn't require us to postpone the checks for that flag, like with on the body. And as such there would be no need to defer our plugin definitions on to the DOMContentLoaded event. But that's some breaking change so no idea if that's feasible.
In theory we also could remove those jQuery plugin stuff completely from our bundle and add some generic snippet to the documentations. Breaking change again but at least provides some value in terms of bundle size. And the user can decide how and when and if to define those jQuery plugins or not.

@alpadev  I still do not understand why  boostrap.Tooltip('#myId') is available immediately when $("").tooltip() not ... Till I could understand this I will be very sceptic about my abilities to understand this decision.
What about working with UMD with webpack I am ok with current situation, my report there is just a suggestion to "add this to the documentation" (those type of errors are very unobvious and you can save many working hours for our collegues).

As far as I can tell, the reason for this is data-bs-no-jquery or to be exact, that we check for this data attribute to exist when registering our components with jQuery as this will prevent us from doing so.
See https://github.com/twbs/bootstrap/blob/9485172017868952047da5f188bc13a92ef0435d/js/src/util/index.js#L194-L202
https://github.com/twbs/bootstrap/blob/9485172017868952047da5f188bc13a92ef0435d/js/src/util/index.js#L214-L216
The PR that added this flag https://github.com/twbs/bootstrap/pull/29191
As with the issue Rohit mentioned, if Bootstrap is loaded in the <head> section, document.body isn't defined and thus hasAttribute will throw an error. This has been worked around by defering the registration of jQuery plugins until the DOM is loaded because in that case we can be sure that document.body exists.

Why somebody who need data-bs-no-jquery can't put bootsrap ahead to the jquery ? Effect will be the same.
P.S. normal behaviour is import js at the end of document.
P.P.S. again jquery UMD bundles would solve this. Sometimes obvious is best.

Could you read the attribute from document.documentElement instead? That’s always available.
The fact that body may not exist is the reason why jQuery switched to attaching elements used for support tests directly to documentElement instead of body in 2.1.0.


Missing sequences in unitig-caller

Hello John,
I've noticed a very strange behaviour of unitig-caller while trying to debug some interesting results I found with pyseer. Below is a picture of significant unitigs that were either mapped using blastn (with low complexity filters off), or counted from the output of unitig-counter, or called with unitig-caller. The latter seems to be missing lots of calls. I have ~ 3100 genomes, and used "--simple" mode - perhaps this was the problem?

Thanks for reporting this, and sorry that I haven't had a chance to look at it until now. This does look suspicious, there's a factor of two which makes me wonder whether the reverse complements are being missed.
Looking at the code history, this was only added in 36690514a81deb247342117e87ec436cc5843209, aka v1.0.1. I see that bioconda only has v1.0.0, which would explain this error. This is my fault for forgetting to update it! I will do that now. If you use the --index and --call mode it should work

Ah, that makes sense, thank you! And thanks for fixing it.
One more thing possibly worth looking at - unitig-counter seems to get few more isolates than blast does. The reason for it is "corner cases" when part of the unitig in question is in the very beginning or end of the contig. Especially makes a difference for longer unitigs with lower allele frequency.


[ALLUXIO-2236] Improve DynamicResourcePool

https://alluxio.atlassian.net/browse/ALLUXIO-2236
Use linked list (similar as LRU cache) to store the resources to reduce lock contention.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11571/
Test PASSed.

Merged build finished. Test PASSed.

@gpang @apc999 Thanks for the review and apologies for the delayed response. I have addressed your comments. PTAL.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11732/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11734/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11738/
Test PASSed.

@gpang I've updated the comments. PTAL. Thank you.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11739/
Test PASSed.

I left one comment on documenting the expected use of release. otherwise this looks good to me

@gpang do you have more comments? Thank you

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11799/
Test PASSed.

@gpang Do you have more comments? thanks.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11927/
Test PASSed.


Implement MVP architecture

Application should use MVP architecture, to make code cleaner and easier to extend.

Checkout my MVP implementation Toast

Implemented in recent commits


Google IO 2016 is broken on Firefox and IE.

Whenever I try to look up the schedule I am forced to use the mobile version instead of the desktop browsers I have access to.

Can you be more specific? What browser, repo steps, etc?

Opening the website https://events.google.com/io2016/ is enough to reproduce the error.
Firefox ESR 31.8.0 and IE 11.0.9600.18282.
Firefox error console:
Content Security Policy: Unbekannte Direktive 'upgrade-insecure-requests' kann nicht verarbeitet werden
mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create data:

Complains about upgrade-insecure-requests not being known.
IE console doesn't show anything useful.

FF 46 (current stable) works fine for me. The console warnings are just warnings and non-fatal.
I see the white page on ie 11 on a vm. The good news all the other pages work fine. The bad news is we're not going to have time to fix this for today :( If you could try another browser for today that would be great. Sorry!
We'll also be removing this page after today and it should start working again in IE11.


Adds fire/air alarms

About the PR
This PR will add fire and air alarms to the game. This is achieved via a shared component, AtmosMonitor, which has a system tied to it that handles the update events from loops for fire and atmospheric devices, as well as sending and receiving packets to devices via the local wiring network which are alarmable, and to other monitors on the same network.
Alarmed devices are made alarmable by another component, AtmosAlarmable, which has an equivalent system which hooks into PacketRecvEvents, and filters out anything that isn't alarmable by the AtmosAlarmable (set via an internal list), and then sends a local targeted event to that entity.
This makes use of the new ApcNetComponent/Connection added recently.
TODO

[x] UI for air alarms
[x] control of vents/scrubbers from air alarm UI
[x] wiring for fire/air alarms
[x] construction graph for fire/air alarms (both construction and deconstruction)

Screenshots

Video
This was taken before UI was implemented, most likely - this showcases the functionality of the alarm itself.
https://user-images.githubusercontent.com/76629141/138612615-7ac4802f-25da-455e-a0b4-9d39e9e56a23.mp4
https://user-images.githubusercontent.com/76629141/138612607-2b8e6518-badb-40c3-8534-c404deab3d22.mp4
UI

Changelog

:cl:

add: NanoTrasen has decided that air quality is important, and have provided its stations with air and fire alarms. No longer will a single gas leak accidentally ruin entire stations.

fixes #1585

blocked by https://github.com/space-wizards/RobustToolbox/pull/2199

Final nit (architectural, not technical):
Frankly, I don't think we should have an "atmos alarm" system. I think alarms should be a principle component of the game. Like how power has HV/MV/APC power networks all under a (mostly-)unified Power system, there should be Security/Engineering/Medical alerts under a unified Alerts system.
Don't take any of these as criticism; you're doing god's work here. (Except for https://github.com/space-wizards/space-station-14/pull/5018#discussion_r768374607. That one's criticism.)

Final nit (architectural, not technical):
Frankly, I don't think we should have an "atmos alarm" system. I think alarms should be a principle component of the game. Like how power has HV/MV/APC power networks all under a (mostly-)unified Power system, there should be Security/Engineering/Medical alerts under a unified Alerts system.
Don't take any of these as criticism; you're doing god's work here. (Except for https://github.com/space-wizards/space-station-14/pull/5018#discussion_r768374607. That one's criticism.)

Agreed, I made a similar comment in ideaguys regarding having things integrate with the alarms computer. Specifically having a mimics page of the device network in series for the power network, something similar could be done to visualise atmos lines, devices and stats.
But that's a job for another time as right now I think atmos and fire alarms are quite important for people plasmabombing the station.

about the above points: i wouldn't mind having a station-wide, unified alerts system either tbh, if this is ever done, it shouldn't be too much of a hassle (hopefully) to use the existing air alarm (as a device)/threshold code in order to integrate it into whatever a global alarm system would be

Without checking code does this integrate with engineering access like the APC does to reduce the chance of people changing the settings?

also, yes - there's also a wire to disable this access as well, in case somebody wants to fuss around with air alarms

Is this ready or does it still need some things done?


term and termset queries don't work on datetime fields over qw api

Describe the bug
TermQuery and TermSetQuery are not parsed properly when using the search api. Term works fine when using the ES compatible api.
Steps to reproduce (if applicable)
Steps to reproduce the behavior:

create an index with a datetime field
run a query such as created_at:[2022-05-01T15:19:33Z TO 2022-05-01T15:19:33Z], it works
run a query such as {"query":{"term":{"created_at":{"value":"2022-05-01T15:19:33Z"}}}} on the ES api, it works
run a query such as created_at:2022-05-01T15:19:33Z, you get an error: Error: { "message": "Internal error: Failed to parse query: created_at:2022-05-01T15:19:33Z.`." }

Expected behavior
the request should succeed.
Configuration:
Please provide:

Output of quickwit --version
The index_config.yaml

version: 0.4

index_id: gh-archive-numericid-light

doc_mapping:
  field_mappings:
    - name: id
      type: u64
      fast: true
    - name: org
      type: json
      tokenizer: default
      type: datetime
      fast: true
      input_formats:
        - rfc3339
      precision: seconds
  timestamp_field: created_at

You need to add quotes to make it work, like:
created_at:"2022-05-01T15:19:33Z"
We need to improve the error message because it's not very helpful here.

We can either rename the issue into "improve error message blablabla" or close this one and open an issue to improve the error message.

I don't think it really matter. I'll rename the issue


add example table of different property types

address https://github.com/OBOAcademy/obook/issues/203#issuecomment-1184931380
@matentzn per our discussion today, I got started on a table with examples of different property types and you will fill in the rest, thank you!

Add CURIEs/URIs and descriptions then should be ready to review


Unable to see some folders while trying to upload

Storage Explorer Version: 1.17.0
Build Number: 20201211.10
Platform/OS: Linux. Ubuntu 18.04
Architecture: x64
Regression From: Don't know. First time.
Bug Description

In a Gen2 storage account. I click Upload -> File and try to select folder workspaces (which is a link to another folder) the file selection dialog closes and selects workspaces as the file to upload.
If I open file explorer (pcmanfm) and drag and drop files from inside this workspaces folder into a folder in storage explorer (some container) it does nothing. If I goto Desktop and do same for some other file, it works, i.e. the file is uploaded to that container.
If I goto / I do not see /disk2 at all in Storage Explorer's file selector.

kash@kash-lubuntu:~$ ls -ld /home/kash/workspaces
lrwxrwxrwx 1 kash kash 17 Jan 24  2019 /home/kash/workspaces -> /disk2/workspaces
kash@kash-lubuntu:~$ ls -la /disk2/
total 32
drwxrwxrwx  5 root root  4096 Jun 12  2020 .
drwxr-xr-x 26 root root  4096 Jan 28 17:08 ..
drwx------  2 root root 16384 Jan 24  2019 lost+found
drwx------  5 kash kash  4096 Jan  6 16:15 .Trash-1000
drwxrwxr-x 33 kash kash  4096 Jan 22 22:13 workspaces
kash@kash-lubuntu:~$ mount | grep disk2
/dev/sdb1 on /disk2 type ext4 (rw,relatime,errors=remount-ro,data=ordered)
kash@kash-lubuntu:~$

OS
kash@kash-lubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.5 LTS
Release:	18.04
Codename:	bionic
kash@kash-lubuntu:~$

Steps to Reproduce

Add a new disk to your machine.
Mount it.
Try to upload files from it.

Note the icons for workspace folder in File Open dialog vs File Manager.

Out of curiosity, if you navigate into that directory in the File Manager, what is the path of the files in that directory? Could you create the folder in Storage Explorer first, enter the directory and then try drag and drop files to Storage Explorer to upload the files?

if you navigate into that directory in the File Manager, what is the path of the files in that directory?

Didn't quite understand that. Path is "that directory", the one I navigate to.

Could you create the folder in Storage Explorer first, enter the directory and then try drag and drop files to Storage Explorer to upload the files?

Not sure what you want me to do? From "File Open" dialog of Storage Explorer, I can not go into workspaces. Because it's not recognized as a folder, if I double click it then it is selected as a file and File Open dialog closes, instead of navigating into workspaces and showing it's sub-folders.

In "File Manager" (not our File Open dialog), if you double click on a folder, it navigates into the folder and show you the files/folders in it, right? What I am asking you to try is to double click on the "workspace" folder to navigate into it in your File Manager and show me what's the path being displayed in the address bar, like this

And since you can see files in the "workspace" directory, you can try dragging them to Storage Explorer to see if they can be uploaded.

That's part of OP.

If I open file explorer (pcmanfm) and drag and drop files from inside this workspaces folder into a folder in storage explorer (some container) it does nothing. If I goto Desktop and do same for some other file, it works, i.e. the file is uploaded to that container.

Gotcha. This is something we haven't seen so far. We'll investigate where things get broken.

I attempted to reproduce this issue on a Ubuntu 18.04 but wasn't able to. What I did was

Connect an external drive to the machine, which shows up at /media/user_name/drive_name
Create a symlink in the user's root directory /home/user_name/directory -> /media/user_name/drive_name
Open it in File Manager and try opening it in the Upload dialog

In both cases, I am able to see the symlink showing up as a directory. I am able to upload that directory using the .tar.gz build but I run into some disk permission issue when using the snap install.
So in your case @kashyap-bhatt-by

Are you using snap install or the .tar.gz? If you are using snap, would you like to try the .tar.gz build?
How did you create the symlink? I created mine using just the -s option.

@JasonYeMSFT

* Connect an external drive to the machine, which shows up at /media/user_name/drive_name

A few differences from OP:

Mine was an Ubuntu VM on an Oracle Virtual Box.
Disk was added by going to VM Settings->Storage->Add hard disk
It appeared under /dev/ (not /media), which is root owned (and not user_name owned like home)

* Are you using snap install or the .tar.gz? If you are using snap, would you like to try the .tar.gz build?

Using snap. Can try tar. Can you provide link to any specific version you want me to try?

* How did you create the symlink? I created mine using just the -s option.

Same. Used ln -s.

To use the tar.gz build, download the 1.18.1 Linux_StorageExplorer-x64.tar.gz, extract it and execute the StorageExplorer executable in the directory. You might need to install some dependencies depending on your OS image.

Closing due to lack of response. If you have tried the tar.gz and still run into problems, please open a new issue instead.


add additional flags to kFlagsToPass in GetSystemIncludes

As mentioned in https://github.com/cquery-project/cquery/issues/641 this passes through additional flags that affect the output of GetSystemIncludes().  It's likely some form of -resource-dir should also be passed, but that's for another day.

LGTM, @bstaletic do you want to take a look?

This looks good.


Rules of fn core

This defines what should go in this repo and what shouldn't. Feedback welcome.
I will be following up with examples of easy ways to add extensions and rebuild the server.

@rdallman @derekschultz @denismakogon @carimura

Moving the implementation code for stats and Prometheus metrics out of "core" sounds good, though of course this will require core to provide the required extension points (e.g. at server start when the Prom client needs to be initialised, or when a task is enqueued,dequeued, run and completed). Let me know if I can help.
Also, we want to give users a simple out-of-the-box experience for starting fn with, say, the stats/metrics extension. How will users specify what extensions they want? By means of parameters to fn start which automatically build a suitable docker image?

What about tracing? Calls to the OpenTracing API should probably remain part of the core, but the OpenTracing client implementation (i.e. Zipkin), and the configuration of the trace collectors (the Http one already being used, and the new custom collector to send spans to Prometheus) should probably be add-ons.

@nigeldeakin spot on, would be great if you could pull the prom stuff out into it's own extension. And check out this PR for and the example linked from there for building extensions: https://github.com/fnproject/fn/pull/425

What about tracing? Calls to the OpenTracing API should probably remain part of the core, but the OpenTracing client implementation (i.e. Zipkin), and the configuration of the trace collectors (the Http one already being used, and the new custom collector to send spans to Prometheus) should probably be add-ons.

+1 I agree we should standardize on the OpenTracing API for metrics logging in our code and then make it easy to plug in different backends to get that data out.
I like this overall, as long as it's really easy to build with plugins (seems that way).


[Fixes #469] added independent enumeration of horizontal and vertical edges

Ready for review.

Please put "Fixes #469" in the description; that way the issue will be automatically closed.

Please put "Fixes #469" in the description; that way the issue will be automatically closed.

Didn't I do that?

Done


WIP: e2e: add resourceMontior to poll resource usage on the nodes

This change adds resourceMontior, which spawns a goroutine per node to poll the
container stats for known, relevant containers, computes the resource usage and
stores the data in a fixed-size buffer. Users can then examine the data in the
buffer to get the overview of resource usage of each individual containers.
This PR depends on #11074

/cc @dchen1107 @vmarmol
The current use pattern of resourceMonitor is to create it per e2e test because it cannot handle changes of the list of nodes. We don't have enough data to detect abnormal cpu/mem usage yet, so I'll leave it to individual tests in the future.
To use this with a long running cluster (e.g. soak test), we can either check resource usage sporadically during the test, or we can create a dedicated test for it.  /cc @saad-ali for suggestions.

Kubelet already proxies cadvisors data and I'm really for writing a library function for making it easier to parse, but I believe that whole aggregation thingy should be done by some other component than Kubelet if needed. I'm not a huge fan of mixing 'production' logic with 'monitoring' one... I'm kind of separation-of-concerns freak:)

cc @vishh @vmarmol

@gmarek, I think you probably have misunderstood what this PR is for. Please read my comments below :)

Kubelet already proxies cadvisors data and I'm really for writing a library function for making it easier to parse

This PR indeed gets the cadvisor data through kubelet. How would you suggest that I do differently?

I believe that whole aggregation thingy should be done by some other component than Kubelet if needed.

This PR does not touch kubelet at all..... The test itself would aggregate the container stats.

I'm not a huge fan of mixing 'production' logic with 'monitoring' one... I'm kind of separation-of-concerns freak:)

This PR doesn't touch production code at all. All the code touched is under e2e:  "/test/e2e`

Assigning to @vmarmol for a initial review on the stats collection/aggregation code.

To use this with a long running cluster (e.g. soak test), we can either check resource usage sporadically during the test, or we can create a dedicated test for it. /cc @saad-ali for suggestions

The soak test repeatedly runs the E2E suite over the course of a week.
An easy way to implement this would be to check resource usage after specific tests  to ensure it is within acceptable bounds (Not sure how much this can fluctuate, hence this might be flaky).
Another approach would be to run some long running process that periodically measures resource usage in parallel with the soak tests, and monitor the usage trend--this requires more thinking to flush out the implementation details.

@yujuhong sorry - you're right of course:) I just saw the cyclic buffer implementation which made me overly touchy;). Sorry for that, it won't happen again:)
Back to the point: my understanding of the problem is that idle cluster consumes more and more resources, I'm not quite sure what kind of resource consumption we expect when something is happening (e.g. test is running). IIUC we wanted to know if in course of the week resource usage grows too high (i.e. we want to check for some leaks, like one found in InfluxDB), and I'm not really sure if monitoring usage during kubelet.e2e test, or any other 'real' test, for that matter, is what we want to do.
I think that above problem can be solved in much simpler way, as we don't need to store anything - it's enough to write an e2e test that queries cAdvisor and checks if results are in acceptable range. I might have misunderstood a problem though, if so please correct me.
What you wrote is waaay more advanced and IMO more fit for Heapster patch than simple e2e test tool;)

@yujuhong sorry - you're right of course:) I just saw the cyclic buffer implementation which made me overly touchy;). Sorry for that, it won't happen again:)

No need to apologize :)
As for the circular buffer, I implemented it because I wanted a fixed-size storage to avoid memory/GC issue when used with long-running tests. If you take a closer look at it, the implementation is actually quite simple because it doesn't allow removing entries (e.g. pop) at all. The size of the buffer would continue growing until it hits the max size, and stops there.
If circular buffer seems like an overkill to people, I could replace it with a simple array+resizing. It wouldn't be much simpler though.

Back to the point: my understanding of the problem is that idle cluster consumes more and more resources, I'm not quite sure what kind of resource consumption we expect when something is happening (e.g. test is running). IIUC we wanted to know if in course of the week resource usage grows too high (i.e. we want to check for some leaks, like one found in InfluxDB), and I'm not really sure if monitoring usage during kubelet.e2e test, or any other 'real' test, for that matter, is what we want to do.

The first step is to log the usages and figure out what the reasonable numbers are. This PR does that and also allows any e2e test to get the resource usage information, if they want.

I think that above problem can be solved in much simpler way, as we don't need to store anything - it's enough to write an e2e test that queries cAdvisor and checks if results are in acceptable range. I might have misunderstood a problem though, if so please correct me.

There are many layers to this problem. If you just want a one-time request that tells you the resource usage for the past N seconds (up to 120s), my first PR #11074 does exactly that (and you can probably reuse the code after it's merged). However, resource usage in the past minute or so may not be representative at all. Your one-time sample point might not even capture the increase of kubelet's cpu usage, depending on what kubelet was doing in that minute. What if you want to know the mean CPU usage of kubelet for the past 10 minutes, or even the 90th percentile of it?

You have to store some data because cadvisor only tells you cumulative cpu seconds used by the container. To calculate the cpu usage at any granularity, you need two data points and subtract them. #11074 bypasses this (i.e., having two send multiple requests) by asking for all stats cadvisor keeps (i.e., ~2 minutes), and compute the difference between first and the last stats points. The downside is that you are limited to 2 minutes and the data set returned is quite large. This PR circumvents the limitation by periodically polling cadvisor for the most recent stats to keep the data set small.
After choosing a cpu usage granularity, you will still need to store the cpu usage points somewhere in order to compute percentiles, etc.
We need to collect data for various known containers on all nodes each time.

Instead of letting the test itself handles all the requirements, I chose to implement them as tools that any e2e test can use :)
I can trim the PRs if you feel like there are parts that we don't need now, but I think the majority of the complexity is there for a reason.

What you wrote is waaay more advanced and IMO more fit for Heapster patch than simple e2e test tool;)

In a way, part of the PR is more similar to what cadvisor is doing internally, but provides the numbers that we actually want. We could potentially patch cadvisor to give us more information, but that's still on the TODO list.

If circular buffer seems like an overkill to people, I could replace it with a simple array+resizing. It wouldn't be much simpler though.

It's not that it's complex. I'm just allergic to custom-made data structures:) I'm not sure if we need to worry as much about memory consumption in tests. My gut feeling is that we don't, and we can store pretty much all data points, even for long running tests. Quick math:
You query cAdvisor every 5 sec. "Long running" for tests mean 6 minutes for ordinary tests, and 30 minutes for scalability tests. Even for the longer one it would mean 360 data points - even assuming that single data point is 1kB it's still << 1MB worth of overhead.

The first step is to log the usages and figure out what the reasonable numbers are. This PR does that and also allows any e2e test to get the resource usage information, if they want.

I think we can do this by looking at Heapster/Graphana for the freshly started, idle cluster. Especially if we move all e2e test out of default namespace, so that all Events would be deleted as well. Any substantial growth should make us worry.

There are many layers to this problem. If you just want a one-time request that tells you the resource usage for the past N seconds (up to 120s), my first PR #11074 does exactly that (and you can probably reuse the code after it's merged). However, resource usage in the past minute or so may not be representative at all. Your one-time sample point might not even capture the increase of kubelet's cpu usage, depending on what kubelet was doing in that minute. What if you want to know the mean CPU usage of kubelet for the past 10 minutes, or even the 90th percentile of it?

Yes, I agree that if we want to get all those data, something similar that you wrote would be needed. But I don't think it's a e2e-test thing - it's a monitoring thing, and should be put there. Otherwise we'll end up with similar-yet-different ways of doing exactly the same thing for e2e tests and for normal clusters, which is probably not desired. IIUC someone was going to add something similar to Heapster (@vishh ?). Also all those things you measure seems like an entry point to some autoscaling work (@piosz ?). I believe that there're a lot of people/systems that need this kind of monitoring, and it would be a shame to write it for e2e tests only.

Your one-time sample point might not even capture the increase of kubelet's cpu usage, depending on what kubelet was doing in that minute.

By 'one-time' I didn't mean single query to cAdvisor (I probably should be more clear), but "single observation over some time to get reasonable approximation of current resource usage". It indeed looks similar to using #11074. Do you have any estimate on when it'll get merged? Post v1, right?

I can trim the PRs if you feel like there are parts that we don't need now, but I think the majority of the complexity is there for a reason.

I'm not arguing for trimming this PR. I'm arguing for extending it and promoting to some more important
component (cAdvisor/Heapster), and checking resource leakage in soak tests with some simple test using #11074 or something similar.

It's not that it's complex. I'm just allergic to custom-made data structures:) I'm not sure if we need to worry as much about memory consumption in tests. My gut feeling is that we don't, and we can store pretty much all data points, even for long running tests. Quick math:
You query cAdvisor every 5 sec. "Long running" for tests mean 6 minutes for ordinary tests, and 30 minutes for scalability tests. Even for the longer one it would mean 360 data points - even assuming that single data point is 1kB it's still << 1MB worth of overhead.

You still need to multiply this number by  #containers and #nodes (>100 node cluster or more?). If we are thinking about a larger cluster, this could end up being a lot.
That said, I agree that my PR was more general than its current use case. I removed the circular buffer implementation completely in the new version :-)

Yes, I agree that if we want to get all those data, something similar that you wrote would be needed. But I don't think it's a e2e-test thing - it's a monitoring thing, and should be put there. Otherwise we'll end up with similar-yet-different ways of doing exactly the same thing for e2e tests and for normal clusters, which is probably not desired. IIUC someone was going to add something similar to Heapster (@vishh ?). Also all those things you measure seems like an entry point to some autoscaling work (@piosz ?). I believe that there're a lot of people/systems that need this kind of monitoring, and it would be a shame to write it for e2e tests only.

Your points are all valid, and I do think cadvisor/heapster can be extended to do similar work if people wanted it to. On the other hand, this PR can still be used in e2e test to get somewhat more accurate resource usage numbers over time. Given that (and the new patch has become simpler without the circular buffer), I don't think we need to block this PR :-)

By 'one-time' I didn't mean single query to cAdvisor (I probably should be more clear), but "single observation over some time to get reasonable approximation of current resource usage". It indeed looks similar to using #11074. Do you have any estimate on when it'll get merged? Post v1, right?

That PR was ready but stalled due to v1,0, and it finally got merged today.
By one-time, I mean that you would be sampling the cpu usage at a very coarse granularity. For example, if the cpu usage fluctuates between 0~0.5, you may get unlucky and always see <0.2 numbers. This approach would be more accurate if you have enough data points, which is probably not going to happen in an e2e test.
In contrast, this PR would give you the "actual" usage in the past interval by subtracting the cumulative cpu consumption. You wouldn't miss anything in between.

I'm not arguing for trimming this PR. I'm arguing for extending it and promoting to some more important
component (cAdvisor/Heapster), and checking resource leakage in soak tests with some simple test using #11074 or something similar.

Other than the accuracy problem stated above, if other e2e tests wants to know the resource usage, they can use this PR to achieve that easily. I'd be happy to help if cadvisor/heapster is to implement such functionality, but that's another topic.  :-)

I don't want to block this PR for any reason, but I also won't have time to review it this week (and I'm not sure @vmarmol will have any). @ixdy can you review this or delegate?

Removed the WIP in the title since this PR is indeed ready for review.

cc @jayunit100

LGTM

@k8s-bot test this [contrib/submit-queue: candidate for merging]

Automatic merge from SubmitQueue


Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined

Version
latest
Note
I am using react-picky package for showing select filter options with typescript you can check the following package.json for versions. Everything working fine when I use create-react-app without typescript. Maybe some libs got conflicted. I have tried with updating react and react-dom even it shows the same error as the image I have attached. It is not an import-export issue. I have tried every method to importing exporting.
Package.json
{
  "name": "user-portal-client",
  "version": "1.0.0",
  "description": "Front-end code for the Coinstash user portal.",
  "scripts": {
    "start": "webpack-dev-server --open",
    "start:headless": "webpack-dev-server --host <IP_ADDRESS> --port 5000 --watch-poll",
    "build": "webpack --config webpack.config.prod.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "devDependencies": {
    "@types/axios": "^0.14.0",
    "@types/classnames": "^2.2.7",
    "@types/history": "^4.7.0",
    "@types/react": "^16.4.18",
    "@types/react-dom": "^16.0.9",
    "@types/react-modal": "^3.8.1",
    "@types/react-places-autocomplete": "^7.2.3",
    "@types/react-router-dom": "^4.3.1",
    "@types/react-share": "^2.1.1",
    "@types/react-sidebar": "^3.0.0",
<EMAIL_ADDRESS>"^1.4.32",
    "@types/styled-components": "4.1.8",
    "@types/url-join": "^4.0.0",
    "awesome-typescript-loader": "^5.2.1",
    "copy-webpack-plugin": "^4.4.2",
    "source-map-loader": "^0.2.4",
    "styled-components": "^4.2.0",
    "ts-node": "^7.0.1",
    "typescript": "^3.5.2",
    "webpack": "^4.20.2",
    "webpack-cli": "^3.1.2",
    "webpack-dev-server": "^3.2.1"
  },
  "dependencies": {
    "@blueprintjs/core": "^3.10.0",
    "@blueprintjs/datetime": "^3.6.0",
    "@blueprintjs/select": "^3.5.0",
    "@types/body-scroll-lock": "^2.6.1",
    "@types/reactour": "^1.13.1",
    "antd": "^3.16.3",
    "apexcharts": "^3.6.8",
    "axios": "^0.19.0",
    "body-scroll-lock": "^2.6.4",
    "classnames": "^2.2.6",
    "decimal.js": "^10.1.1",
    "mobile-detect": "^1.4.3",
    "moment": "^2.22.2",
    "react": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-google-contacts": "0.0.1",
    "react-media": "^1.9.2",
    "react-modal": "^3.8.1",
    "react-picky": "^4.5.2",
    "react-places-autocomplete": "^7.2.0",
    "react-router-dom": "^4.3.1",
    "react-share": "^3.0.0",
    "react-sidebar": "^3.0.2",
    "reactour": "^1.15.0",
    "recordrtc": "^5.5.2",
    "socket.io-client": "^2.2.0",
    "url-join": "^4.0.0"
  }
}

Here's what went wrong:

`
Example
import * as React from "react";
import * as ReactDOM from "react-dom";
import * as Modal from "react-modal";
import Picky from "react-picky";

declare const document: HTMLDocument;
Modal.setAppElement("#root");

const App = () => (
  <div>
    <Picky
      id="picky"
      options={[1, 2, 3, 4, 5]}
      value={[]}
      multiple={true}
      includeSelectAll={true}
      includeFilter={true}
      onChange={values => console.log(values)}
      dropdownHeight={600}
    />
    ;
  </div>
);

ReactDOM.render(<App />, document.getElementById("root"));

declare let module: any;

if (module.hot) {
  module.hot.accept();
}

Can you host a repository on Github reproducing this issue?

I have can only show you errors and package.json and I think its enough :)

Did you check that?

@pardeep889 I don't believe it's an issue with Picky, see this codesandbox:
https://codesandbox.io/s/xenodochial-darkness-4kok4
It works fine until I add react-modal.

and its not working

How is it not working? I'm not getting the error you're reporting.

that is not an error I have mentioned the error above

I am closing this issue and remove this package and using this package @syncfusion/ej2-react-dropdowns because of no response from your side. Anyway thanks

I also get this error and can reproduce it in a code sandbox.
See: https://codesandbox.io/s/hardcore-tereshkova-y60e5
Note that if you change the version of react-picky (in package.json) to 4.1.0 the error goes away - seems to be a bug in 5.x release of react-picky.

Okay, it's TypeScript related. I managed to fix it in my fork by adding Picky.d.ts with a type definition for new inside.
(See: https://stackoverflow.com/questions/48964924/typescript-jsx-element-type-does-not-have-any-construct-or-call-signatures#48965284)
I'll be honest, I don't understand my own fix properly, but I will try to read up on it a bit and do a proper PR in a few days or so :)

@r-moore In v5, Picky is no longer a default export (some weird issue with TSDX it seemed), see: https://github.com/Aidurber/react-picky#migrations

it's very late I have used other library for that :) anyway thanks


Update weather.py to show 16 wind directions

This also resolves the issue with having to tare readings more than once.

This seems to crash my enviro-weather when the wind parts are plugged in. I am trying to work out what the issue is, but the board seems to need to be reflashed, so I can't get to the log file sadly.

I've updated the code to try and improve pull #163 slightly.
I'm not certain why there is the addition of an extra 360 at line 157, and suspect that this could be removed.
I've not yet tested this again with the board connected to the the anemometer.

I've now been running this code for ~1 hour, and it's returning good wind directions. WIll update again in the morning, but it looks good to include.

I now understand why the extra 360 degrees is added

(The addition of 360 degrees is a common technique used in programming to handle negative numbers when calculating directions or angles.
In this case, config.wind_direction_offset could potentially be a negative number. If wind_direction (which is non-negative) is added to a negative offset, the result could be a negative angle, which doesn’t make sense in this context because angles are typically expressed in the range of 0 to 360 degrees.
By adding 360 before adding the offset, we ensure that the intermediate result is always non-negative, even if the offset is negative. The modulus operation (% 360) at the end then brings the final result back into the range of 0 to 360 degrees.
So, the expression (wind_direction + 360 + config.wind_direction_offset) % 360 ensures that the final wind direction is a non-negative number less than 360, regardless of the value of config.wind_direction_offset. This is a standard way to normalize an angle to the range of 0 to 360 degrees.)

My board crashed when the wind sensors were added last night, I'm not sure which part of the code causes this issue, or if it's a physical hardware issue. When there are no sensors connected, it's fine, but when they are it regularly crashes.

@MrDrem As #163 was working ok when I last tested it I wanted to see what improvements you were making and see if I could help get one of these PRs in. I note you caught my copy paste error on the default wind direction config, which I have fixed in my branch and I have also rebased my PR branch against main to make comparisons easier. Comparing yours and my branch I can only see some comments removed which I failed to remove with the associated code (will adjust in my branch as well), am I messing up the compare and there's other changes made I should take a look at? I can then test both branches with mine and see if it's code or board specific.

@sjefferson99 I'd done it slightly differently initially, but looking at your method yours seemed better so I changed it to match that and bring it up to the new codebase. The changes in the end were just the tidying.
I'm fairly sure that my issues are board specific, but as my board was gifted by in-laws, and it works intermittently (no issues for the last ~5 hours, but it will stop soon I suspect), getting hold of Pimorini to try and exchange it is a bit of a hassle that I've not had time to do, and I've had it for so long now that it's going to be out of warranty.

@MrDrem OK, as I've rebased mine on updated main and committed the bits I missed first time (Thanks for catching), my original PR should be the same. I'll copy the code from it to my board and test when I get a minute and see if it still runs...


Buffer overflow

On the screen confirmation secret words, inserting garbage text est.32kb causes crush application and close it.

Fixed in 1.2.4


Add create- commands to OMOP tutorial

We were missing calls to create- tables, vocab and data in our OMOP tutorial.

@cptanalatriste you can preview the docs here:
https://sqlsynthgen--102.org.readthedocs.build/en/102/


Feature request: unify minimap with zoom

R48 has a minimap mode, which is a handy way of working with large maps. It would be nice if it could be unified with the zoom-in function into a single zoom function that zooms both in and out.
The minimap is currently handled differently from zoom. Zoom only zooms in, with arbitrary sizes, while minimap only zooms out, at a pre-set size (but allowing you to zoom it in; the zoomed-in minimap is not same as normal tiles).
I think it makes sense to unify these because:

Zoom-out would be easier to find. Zoom function is more prominent, while Minimap is only available through the keyboard.
It would allow changing the minimap scale. The current minimap scale is too big. If I move the map in the minimap mode, I find it difficult to understand where I’ll und up after closing the minimap, because the scale is too big.

Good news: This is almost ready, just need to try and get the mul/div parameters right...

Note: This may or may not cause some undiagnosed tile rendering issues, particularly of the kind where specific groups of tiles that haven't been checked start rendering completely wrongly. It will be quite obvious if / when these occur, though.

Thanks! Works great in the XP and VX Ace modes.
Unfortunately, in the RM2k[3] mode, the non-animated autotiles are replaced with animated ones:

Whoops. Accidentally forgot the x tileSize calculations for those ATs. I was trying to deal with ETS and prepare for any possible EasyRPG 2x support at once, and that didn't go well.

Status on this? I think I fixed it after that last comment, but need more information.

Assuming fixed given my own testing - reopen if I still screwed up somehow


Bootstrap/Morpheus anomalies

Dropdowns don't show arrow and have text clipped, e.g.

Also, some buttons go blank in their :active state, e.g. the Done button from the student summary modal goes blank upon mousedown.

Confirmed!


Roll engine 66fe7ee5cd92..7f67b9f0dc63 (1 commits)

git@github.com:flutter/engine.git/compare/66fe7ee5cd92...7f67b9f0dc63
git log 66fe7ee5cd92..7f67b9f0dc63 --no-merges --oneline
2019-08-06<EMAIL_ADDRESS>Roll src/third_party/skia 88681ddd1d38..3a543aafd4e6 (1 commits) (flutter/engine#10659)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (jimgraham@google.com), and stop
the roller if necessary.

Auto-roller completed checks. About to merge.


Update Rack for Railsbench and Erubi_rails

This is meant to obsolete #192 and #193, which have Nokogiri-update bugs common to Dependabot. Smoke-testing now.

Smoke test passes, merging.


Cannot configure HTTP proxy in azure-keyvault-secrets

Package Name: azure-keyvault-secrets
Package Version: 1.22.1
Operating System: linux
Python Version: 3.9.7

Describe the bug
According to this documentation it should be possible to configure proxies globally by using the HTTP*_PROXY environment variables.
However, they do not seem to have any effect on azure.keyvault.secrets.SecretClient. Instead the request to KeyVault just hangs.
To Reproduce
Steps to reproduce the behavior:
def get_secret():
    credential = DefaultAzureCredential()
    secret_client = SecretClient(vault_url="...", credential=credential)
    v = secret_client.get_secret("mysecret").value
    print(f"My secret: {v}")

The code snippet does work in an environment without a corporate proxy.
Expected behavior
To be able to configure proxy according to the documentation.

Hi @lundholmx , thanks for the feedback. We'll take a look at this and get back to you asap.

Hi @lundholmx, thank you again for opening an issue! I apologize for the delayed response.
@xiangyan99 proxy support comes from azure-core, and it seems like the base client for SecretClient is using RequestsTransport in a way that should support this scenario. Do you have any ideas as to what could be happening here?

For sync code, we use requests library underneath.
Could you just try
requests.get('http://bing.com')

to see if it works?

@xiangyan99 proxy support comes from azure-core, and it seems like the base client for SecretClient is using RequestsTransport in a way that should support this scenario. Do you have any ideas as to what could be happening here?

We saw that in the source code and also thought the default settings would support proxy (ultimately via requests.Session if we understand it correctly). We also tried setting the transport on SecretClient explicitly without success.

For sync code, we use requests library underneath.
Could you just try
requests.get('http://bing.com')

to see if it works?

That actually works, and other libraries using requests underneath seem to pickup the proxy configuration correctly from environment variables as well.

Hi @lundholmx, thank you for confirming that requests is at least picking up the configuration correctly.

Hi @lundholmx, thank you for confirming that requests is at least picking up the configuration correctly.

I don't think so. Any suggestion that may work or that I can try with?

@lundholmx if you have a Storage account, using something like a ContainerClient to do something simple -- for example, creating a container -- might be a good way to test it out. If you only own a Key Vault, you could also try using other KV clients, like a KeyClient from azure-keyvault-keys or CertificateClient from azure-keyvault-secrets. I would be really surprised to see different behavior from any KV client though, since they all use the same base client logic.
I'll set up a proxy server tomorrow to try to reproduce this in the meantime. I haven't yet found why the proxy configuration wouldn't work, but stepping through a live process will help more than visual inspection.

Hi @lundholmx -- as an update on this, I was able to use a proxy server (specifically, PortSwigger's Burp Proxy) to call SecretClient.get_secret successfully. I'm wondering if this issue could for some reason be related to the specific proxy configuration you're trying to use, even though it would be a bit surprising since you were able to call requests.get('http://bing.com') without a problem.
Would you be able to try your code with another proxy, like the one used by Burp Suite Community Edition?

Additional thoughts @mccoyp @xiangyan99

We should split the problem into identity and KV. Can @lundholmx even get a token?
We should try with the proxies kwarg on both: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core#configurations. Maybe it's just env variables issue, and the kwarg work
Enable DEBUG and check where it is stuck more precisely

@lundholmx as Laurent suggested, let's try separate the issue. Can you try the code:
credential = DefaultAzureCredential()
token = credential.get_token("https://vault.azure.net/.default")
print(token)

?
This will verify if you can get token successfully (if identity library works correctly or not).
Thanks.


Revert "produce new "doctype" config for document types"

Reverts vespa-engine/vespa#21964
Broke several system tests (timeout waiting for searchnodes to become ready).

FYI @arnej27959 @baldersheim


this module is not respecting the table schema for creating the acl tables

I supposed that the following code should create the acl tables in  'test' schema, instead generated in public schema
var Acl       = require('acl');
var Sequelize = require('sequelize');
var AclSeq    = require('acl-sequelize');
var db        = new Sequelize( 'acl', 'postgres', 'postgres', {
schema: 'test',
dialectOptions: {
searchPath: 'test',
prependSearchPath: true
},
host: 'localhost',
port: 5432,
dialect: 'postgres'
});
var abc_acl       = new Acl(new AclSeq(db, { prefix: 'acl_' }));
I dig bit mmore on teh code, an i see that line 30 of lib/dbTasks.js should be passed with db.options.
here is the modified line
db.define(name, schema[table] || defaultSchema, db.options).sync();

I don't have experience with Postgres but from sequelize docs ->
http://docs.sequelizejs.com/en/latest/api/sequelize/#definemodelname-attributes-options-model
The options passed to the define method are any merged with options.defined passed to the constructor so if I undestand what you are trying to do you need to call the constructor like this
    var db = new Sequelize( 'acl', 'postgres', 'postgres', {
        schema: 'test',
        define: {
            schema: 'test'
        },
        dialectOptions: {
            searchPath: 'test',
            prependSearchPath: true
        },
        host: 'localhost',
        port: 5432,
        dialect: 'postgres'
    });

Thanks alot. Thant worked


[Bug][UI Next][V1.0.0-Alpha] There is no floating prompt for the table operation button in the alarm instance management.

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened

What you expected to happen
There is no floating prompt for the table operation button in the alarm instance management.
How to reproduce
Add hover prompt.
Anything else
No response
Version
dev
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I will fix it.


Add explicit LICENSE

This repository doesn’t contain a LICENSE file, nor does the README mention a license. I suggest to add one, to remove any unclarity. (CC0 probably makes the most sense.)

Closed by d594e9b839361b8cf892fde2d4c9b7007e204f5d


Failed execution for Auth.socialWebUISignInAPI with error: AuthError: Make sure that the amplify configuration passed to Auth plugin is valid

Describe the bug
It is not a bug, I think I am doing something wrong.
I followed this steps to Sign in with Apple, but get this error:
Failed execution for Auth.socialWebUISignInAPI with error:
AuthError: Make sure that the amplify configuration passed to Auth plugin is valid

I have checked all the values are correct at least 3 times. What else do I need to check?
One concern, amplify update auth require key id before creating the actual key. how is it possible to get a Key id before creating them?
Steps To Reproduce
Steps to reproduce the behavior:
1. Create an App ID
2. Create a Service ID
3. Create a Key
4. Do this in terminal
% amplify update auth
Please note that certain attributes may not be overwritten if you choose to use defaults settings.

You have configured resources that might depend on this Cognito resource.  Updating this Cognito resource could have unintended side effects.

Using service: Cognito, provided by: awscloudformation
 What do you want to do? Apply default configuration with Social Provider (Feder
ation)
 What domain name prefix do you want to use? iris26e476d4-26e476d4
 Enter your redirect signin URI: iris://
? Do you want to add another redirect signin URI No
 Enter your redirect signout URI: iris://
? Do you want to add another redirect signout URI No
 Select the identity providers you want to configure for your user pool: Sign in
 with Apple

 You've opted to allow users to authenticate via Sign in with Apple. If you have
n't already, you'll need to go to https://developer.apple.com/account/#/welcome
and configure Sign in with Apple.

 Enter your Services ID for your OAuth flow:  com.zasso.iris
 Enter your Team ID for your OAuth flow:  86USSQ2K46
 Enter your Key ID for your OAuth flow:  4A772NX2MB
 Enter your Private Key for your OAuth flow (entire key without line breaks):  -
----BEGIN PRIVATE KEY-----MIG...EN-----END PRIVATE KEY-----
✅ Successfully updated AdminQueriese13453b3 function locally
✅ Successfully updated AdminQueries API locally
✅ Successfully updated auth resource iris1ef6f127 locally

✅ Some next steps:
"amplify push" will build all your local back...

✅ Successfully updated resource update locally

✅ Some next steps:
"amplify push" will build all your local back...

tenna@chuurikitennanoiMac Iris % amplify push
⠧ Fetching updates to backend environment: dev from the cloud.⠋ Building resourc⠋ Building resource api/iris
⚠  WARNING: your GraphQL API currently allows public create, read, update, and delete access to all models via an API Key. To configure PRODUCTION-READY authorization rules, review: https://docs.amplify.aws/cli/graphql/authorization-rules

⠴ Building resource api/iris✅ GraphQL schema compiled successfully.

Edit your schema at /Users/tenna/Desktop/Iris/amplify/backend/api/iris/schema.graphql or place .graphql files in a directory at /Users/tenna/Desktop/Iris/amplify/backend/api/iris/schema
✔ Successfully pulled backend environment dev from the cloud.

    Current Environment: dev

┌──────────┬──────────────────────┬───────────┬───────────────────┐
│ Category │ Resource name        │ Operation │ Provider plugin   │
├──────────┼──────────────────────┼───────────┼───────────────────┤
│ Auth     │ iris1ef6f127         │ Update    │ awscloudformation │
├──────────┼──────────────────────┼───────────┼───────────────────┤
│ Auth     │ userPoolGroups       │ No Change │ awscloudformation │
├──────────┼──────────────────────┼───────────┼───────────────────┤
│ Function │ AdminQueriese13453b3 │ No Change │ awscloudformation │
├──────────┼──────────────────────┼───────────┼───────────────────┤
│ Api      │ AdminQueries         │ No Change │ awscloudformation │
├──────────┼──────────────────────┼───────────┼───────────────────┤
│ Api      │ iris                 │ No Change │ awscloudformation │
└──────────┴──────────────────────┴───────────┴───────────────────┘
✔ Are you sure you want to continue? (Y/n) · yes

Deployment completed.
Deploying root stack Iris [ =================================------- ]
	amplify-iris-dev-bc369         AWS::CloudFormation::Stack     UPDATE_
	apiiris                        AWS::CloudFormation::Stack     UPDATE_
	authiris1ef6f127               AWS::CloudFormation::Stack     UPDATE_
	authuserPoolGroups             AWS::CloudFormation::Stack     UPDATE_
	functionAdminQueriese13453b3   AWS::CloudFormation::Stack     UPDATE_
	apiAdminQueries                AWS::CloudFormation::Stack     UPDATE_
Deployed auth iris1ef6f127 [ ========================================
	HostedUICustomResource         AWS::Lambda::Function          CREATE_
	HostedUIProvidersCustomResour… AWS::Lambda::Function          CREATE_
	HostedUICustomResourcePolicy   AWS::IAM::Policy               CREATE_
	HostedUIProvidersCustomResour… AWS::IAM::Policy               CREATE_
	HostedUICustomResourceLogPoli… AWS::IAM::Policy               CREATE_
	HostedUIProvidersCustomResour… AWS::IAM::Policy               CREATE_
Deployed auth userPoolGroups [ =======================================

Deployment state saved successfully.

GraphQL transformer version: 2
Hosted UI Endpoint: https://iris26e476...
Test Your Hosted UI Endpoint: https://iris26e4...

5. Update a Service ID (Add Domains starting with iris26..., Return URLs starting with https://iris26.../oauth2/idpresponse)

6. Add these to the info.plist file
<key>CFBundleURLTypes</key>
         <array>
             <dict>
                 <key>CFBundleURLSchemes</key>
                 <array>
                     <string>iris</string>
                 </array>
             </dict>
         </array>

7. Launch the app and tap the AppleSignInButton.

SignInWithAppleButton(.signUp)
                { request in
                    request.requestedScopes = [.fullName, .email]
                } onCompletion: { authResults in
                    switch authResults {
                    case .success(let authResults):
                        self.signInWithApple(authResults: authResults)
                    case .failure(let error):
                        print(error.localizedDescription)
                    }
                }
...
func signInWithApple(authResults: ASAuthorization) {
        print("signInWithApple")
        guard let appleIDCredential = authResults.credential as? ASAuthorizationAppleIDCredential else {
            print("Failed to get AppleID credentials")
            return
        }
        guard let identityTokenData = appleIDCredential.identityToken,
              let identityToken = String(data: identityTokenData, encoding: .utf8) else {
            print("Unable to fetch identity token")
            return
        }
        Task {
            if let fullName = appleIDCredential.fullName {
                //self.givenName = fullName.givenName ?? ""
                self.familyName = fullName.familyName ?? ""
            }
            self.email = appleIDCredential.email ?? ""

            var result = try await Amplify.Auth.signInWithWebUI(for: .apple, presentationAnchor: UIWindow())
            if result.isSignedIn {
                isSignedIn = result.isSignedIn
            }
        }
    }

8. Get the error.

Expected behavior
Be able to Sign in with Apple
Amplify Framework Version
2.39.0
Amplify Categories
Auth
Dependency manager
Swift PM
Swift version
latest
CLI version
12.12.6
Xcode version
Xcode 15.4 Build version 15F31d
Relevant log output
<details>
<summary>Log Messages</summary>

signInWithApple
Starting execution for Auth.socialWebUISignInAPI
Check if authstate configured
Auth state configured
Wait for a valid state
Start signIn flow
Sending cancel signIn
Wait for signIn to cancel
Failed execution for Auth.socialWebUISignInAPI with error:
AuthError: Make sure that the amplify configuration passed to Auth plugin is valid

```
Is this a regression?
Yes
Regression additional context
No response
Platforms
iOS
OS Version
iOS 17
Device
iPhone 11 & 15
Specific to simulators
No response
Additional context
No response

Hi @ChurikiTenna,
Can you elaborate what you mean by

One concern, amplify update auth require key id before creating the actual key. how is it possible to get a Key id before creating them?

The key ID is created by Apple during the "Setup Your Auth Provider" step as found here which is the step before you call `amplify update auth``
Thanks for your detailed reproduction steps. Just wanted to clarify something since it wasn't explicitly called out, between steps 4 and 5 in your provided steps, did you provide Apple with the hosted UI endpoint URL that was generated in step 4? It's the last section in the Configure Auth Category section right before the Update Info.plist step.

Hi @vincetran ! Thank you for your response.
The key seems to be created after amplify update auth.

The Setup Your Auth Provider step only include creating a App ID and Service ID.
Am I misunderstanding something?
And yes, I have provided hosted UI endpoint URL.

@harsh62
Can same Service ID and App ID not exist? I get these errors.

When I try to create a Service ID that matches BundleId of the app

When I try to create a App ID that matches the Service ID

When I try to create a brand new App ID and Service ID with the same ID.

Correct me if I am wrong.

@harsh62
Thank you for the guidance.

Simply calling below also did not work either.

Button(action: {
                    self.signInWithApple()
                }) {
                    HStack {
                        Image(systemName: "applelogo")
                        Text("Sign up with Apple")
                    }
                    .foregroundColor(Color.white)
                }

func signInWithApple() {
        Task {
            let result = try await Amplify.Auth.signInWithWebUI(for: .apple, presentationAnchor: UIWindow())
            if result.isSignedIn {
                isSignedIn = result.isSignedIn
            }
        }
    }

amplifyconfiguration.json

{
    "UserAgent": "aws-amplify-cli/2.0",
    "Version": "1.0",
    "api": {
        "plugins": {
            "awsAPIPlugin": {
                "AdminQueries": {
                    "endpointType": "REST",
                    "endpoint": "https://xf3su34szd.execute-api.ap-northeast-1.amazonaws.com/dev",
                    "region": "ap-northeast-1",
                    "authorizationType": "AMAZON_COGNITO_USER_POOLS"
                },
                "iris": {
                    "endpointType": "GraphQL",
                    "endpoint": "https://zkwz3f5dbjdfbmo6utv7pznqc4.appsync-api.ap-northeast-1.amazonaws.com/graphql",
                    "region": "ap-northeast-1",
                    "authorizationType": "API_KEY",
                    "apiKey": "da2-t5u2zvusjzb7ppk3b3gi4uag5m"
                }
            }
        }
    },
    "auth": {
        "plugins": {
            "awsCognitoAuthPlugin": {
                "UserAgent": "aws-amplify/cli",
                "Version": "0.1.0",
                "IdentityManager": {
                    "Default": {}
                },
                "CredentialsProvider": {
                    "CognitoIdentity": {
                        "Default": {
                            "PoolId": "ap-northeast-1:209d97d9-735f-4684-8478-dae397571882",
                            "Region": "ap-northeast-1"
                        }
                    }
                },
                "CognitoUserPool": {
                    "Default": {
                        "PoolId": "ap-northeast-1_Ok5bjbMtU",
                        "AppClientId": "3mu8lgkjpe5a6uv2ncj0p0h0qb",
                        "Region": "ap-northeast-1"
                    }
                },
                "Auth": {
                    "Default": {
                        "OAuth": {
                            "WebDomain": "iris26e476d4-26e476d4-dev.auth.ap-northeast-1.amazoncognito.com",
                            "AppClientId": "3mu8lgkjpe5a6uv2ncj0p0h0qb",
                            "SignInRedirectURI": "iris://",
                            "SignOutRedirectURI": "iris://",
                            "Scopes": [
                                "phone",
                                "email",
                                "openid",
                                "profile",
                                "aws.cognito.signin.user.admin"
                            ]
                        },
                        "authenticationFlowType": "USER_SRP_AUTH",
                        "socialProviders": [
                            "APPLE"
                        ],
                        "usernameAttributes": [
                            "EMAIL"
                        ],
                        "signupAttributes": [
                            "EMAIL"
                        ],
                        "passwordProtectionSettings": {
                            "passwordPolicyMinLength": 8,
                            "passwordPolicyCharacters": []
                        },
                        "mfaConfiguration": "OFF",
                        "mfaTypes": [
                            "SMS"
                        ],
                        "verificationMechanisms": [
                            "EMAIL"
                        ]
                    }
                },
                "AppSync": {
                    "Default": {
                        "ApiUrl": "https://zkwz3f5dbjdfbmo6utv7pznqc4.appsync-api.ap-northeast-1.amazonaws.com/graphql",
                        "Region": "ap-northeast-1",
                        "AuthMode": "API_KEY",
                        "ApiKey": "da2-..<hidden>..ag5m",
                        "ClientDatabasePrefix": "iris_API_KEY"
                    }
                },
                "S3TransferUtility": {
                    "Default": {
                        "Bucket": "irisd63aeb703f8043f894dc4e9618adb29dbc369-dev",
                        "Region": "ap-northeast-1"
                    }
                }
            }
        }
    },
    "storage": {
        "plugins": {
            "awsS3StoragePlugin": {
                "bucket": "irisd63aeb703f8043f894dc4e9618adb29dbc369-dev",
                "region": "ap-northeast-1",
                "defaultAccessLevel": "guest"
            }
        }
    }
}

Checked.

I noticed I was trying implement App Sign in with Get 1 tutorial when I was supposed to use Gen 2...
Couldn't find Gen 2 Apple sign in docs (found only Enable sign-in with web UI), where can I find documents for Gen 2 Apple Sign in?

amplify_outputs.json
{
  "auth": {
    "user_pool_id": "ap-northeast-1_17XFbRJCN",
    "aws_region": "ap-northeast-1",
    "user_pool_client_id": "2f5kgl6aqur1bs5apintd8n0d6",
    "identity_pool_id": "ap-northeast-1:e8991132-5a5d-433c-b243-37c81e87d8a1",
    "mfa_methods": [],
    "standard_required_attributes": [
      "email"
    ],
    "username_attributes": [
      "email"
    ],
    "user_verification_types": [
      "email"
    ],
    "mfa_configuration": "NONE",
    "password_policy": {
      "min_length": 8,
      "require_lowercase": true,
      "require_numbers": true,
      "require_symbols": true,
      "require_uppercase": true
    },
    "oauth": {
      "identity_providers": [
        "SIGN_IN_WITH_APPLE"
      ],
      "redirect_sign_in_uri": [
        "iris://"
      ],
      "redirect_sign_out_uri": [
        "iris://"
      ],
      "response_type": "code",
      "scopes": [
        "phone",
        "email",
        "openid",
        "profile",
        "aws.cognito.signin.user.admin"
      ],
      "domain": "ac9321c9946bbe6e6977.auth.ap-northeast-1.amazoncognito.com"
    },
    "unauthenticated_identities_enabled": true
  },

After I tapped Sign in with Apple button, it shows the modal, I tap the 'Sign in' button, the phone do the face recognition, then it fails with this screen.

@harsh62
How about this (link to the same image): https://private-user-images.githubusercontent.com/52132649/370667731-a8cae95a-7180-429c-8483-8fdd25ed77b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjczMTQyNTUsIm5iZiI6MTcyNzMxMzk1NSwicGF0aCI6Ii81MjEzMjY0OS8zNzA2Njc3MzEtYThjYWU5NWEtNzE4MC00MjljLTg0ODMtOGZkZDI1ZWQ3N2IzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTI2VDAxMjU1NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEwMDk3NDFhNGRlMzgzOTVmMmUyM2RjOTYzNDI0MWVkMjljZDY0ZmY1YjQ1M2Q1YmNiY2U1OTJlZjQzNjY0OTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.r2T9H103WwOyyIQD6-Sk8XZn8dNnFtsCE3B8J536hYU

I tried the Gen 2 steps all over again, but it failed with the same error.
Is there any way that I can use SignInWithAppleButton flow (like Firebase do)??
I don't understand why is it so tedious...

It knows issue of Amplify, it does not allow to Sign in with Apple by passing Auth token directly, like You made in Your code. Apple sigh in works only throw web (signInWithWeb), apple button does not work. A lot of people asked aws teem fix this issue, but they can not do that during years.
Also need to mention, standard session duration is 30 days, and when session expired it is not possible to recognize by Amplify API, it always says that session is valid and used signed in, but when app call some GraphQL api app just throw error something like "User does not have access". I solved it just set up tokes life time to 10 years.

It was the service id.
I set the service id to {my-bundle-id}.sid, then it started working fine!


Distinguish Length function name to Length2D/3D/4D in visual shaders

Fix https://github.com/godotengine/godot/issues/61734

Thanks!


feat (cli): Introduce --server (still un-tested & un-documented)

Relates to #284

#312 wraps this up.


IPMI protocol disabled after run test_bmc_protocol_settings.robot

The IPMI function is important feature for BMC, does any any risk to enable it after run test cases?

@prkatti1 Can u respond to this..

No risk there. You can enable it back if the ipmi feature is required.

Closing this if no further question. Thanks


Android module with DH-3 enabled recompile AndroidJavaCompile when no changes occurred.

Hi, we are having a strange behaviour on the module that enable DH 3 recently.
We are using multi module, let say I have module structure like this:
Core --> Feature --> Appentry
Assume making a changes on module Core, and run the first build (which will recompile Feature and Appentry module).
But when we run a second build after this without any changes, the feature module recompile on this task com.android.build.gradle.tasks.AndroidJavaCompile. This should not be happen because the task still must be up to date because I making no changes on the code.
Checking from build-scan:

The task was not up-to-date because of the following reasons:
--
Input property 'source' file feature/build/generated/source/navigator/generalDebug has been removed.
Input property 'source' file feature/build/generated/source/navigator/generalDebug/com/myapp/android/feature/HensonNavigator.java has been removed.
Input property 'source' file feature/build/generated/source/navigator/generalDebug/com/myapp/android has been removed.

I believe that before running the second build, the file is still on that folder. But don't know why the task need to be recompile with that reasons. And if I run 3rd build, all of the task will be up-to-date. So it seems to be happen only after upper stream module being recompile.
Here are the details of our project:
AGP: 3.3.2
Gradle version: 5.2.1
DH version: 3.1.2
Databinding: Enabled
Proguard: Disabled
Kotlin: Enabled
Do you know something about it ? please let me know if you need additional information.
Any help would be appreciated. Thanks

Hi any update on this issue ?

hi @f2prateek do you know something about it ? it also happen on sync and slowing our build.

@ doniwinata0309, it is hard to see what is happening. Gradle is
complicated and the only way to debug is to reproduce the issue.
If you can provide a sample and clear and short instructions to reproduce
the issue, we can have a look. That's the only possible way to solve this
issue.
S.
On Tue, Aug 6, 2019, 05:54 doniwinata0309<EMAIL_ADDRESS>wrote:

hi @f2prateek https://github.com/f2prateek do you know something about
it ? it also happen on sync and slowing our build.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/f2prateek/dart/issues/238?email_source=notifications&email_token=AAN7PXPTHRZOSY3BIED7XVTQDFX6RA5CNFSM4HAD56M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3VBDFA#issuecomment-518656404,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN7PXKJ4VGNBWVVLGW366LQDFX6RANCNFSM4HAD56MQ
.

Hi @stephanenicolas , I am able to repro this on sample project. I just updated the AGP version, and gradle version. Please find my attachment for the sample project.dart-sample 2.zip
Here are the build scan from first build:
https://scans.gradle.com/s/g77dlqxawwyjk/timeline?task=pwl6utdfccz42
This is clean build, so make sense why all task being compiled.
But running second build without changing anything, some task will need to rerun:
https://scans.gradle.com/s/kdyhu7v63xle2/timeline?task=pwl6utdfccz42
with this reason:
The task was not up-to-date because of the following reasons:
Input property 'source' file module1/build/generated/source/navigator/debug has been removed.
Input property 'source' file module1/build/generated/source/navigator/debug/com has been removed.
Input property 'source' file module1/build/generated/source/navigator/debug/com/f2prateek has been removed.
Let me know if you need additional information, Thanks.