Standalone FV3

for resolutions of c180 and c360 the standalone FV3 core runs just fine.  At c720 and larger grids there is a unusual FMS error that is preventing things from running with the following error traceback that is basically failing on a check to see if this grid file exists 'INPUT/grid_spec.nc',  (which it does):
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
StandAlone_FV3_Dy<PHONE_NUMBER>79CC1D  Unknown               Unknown  Unknown
libc-2.22.so       00007FFFF57CCFE0  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>811217  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>79FB51  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>EA45FF  fms_io_mod_mp_get        7781  fms_io.F90
StandAlone_FV3_Dy<PHONE_NUMBER>EB40ED  fms_io_mod_mp_fil        8043  fms_io.F90
StandAlone_FV3_Dy<PHONE_NUMBER>6A69C9  fv_grid_tools_mod         208  fv_grid_tools.F90
StandAlone_FV3_Dy<PHONE_NUMBER>6BB14C  fv_grid_tools_mod         675  fv_grid_tools.F90
StandAlone_FV3_Dy<PHONE_NUMBER>846325  fv_control_mod_mp         459  fv_control.F90
StandAlone_FV3_Dy<PHONE_NUMBER>436252  fv_statemod_mp_fv         574  FV_StateMod.F90
StandAlone_FV3_Dy<PHONE_NUMBER>4ACFC4  fvdycorecubed_gri        2307  DynCore_GridCompMod.F90
StandAlone_FV3_Dy<PHONE_NUMBER>09E13B  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>0A1E63  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>3A3375  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>09FADD  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>09F68E  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>09F3C5  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>112FF4  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>CACECB  mapl_genericmod_m        4038  MAPL_Generic.F90
StandAlone_FV3_Dy<PHONE_NUMBER>CFD4B6  mapl_capgridcompm         477  MAPL_CapGridComp.F90
The tricky part is that even if I try to create the grid during the run, it still will not run, failing to create the grid:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
StandAlone_FV3_Dy<PHONE_NUMBER>79CC1D  Unknown               Unknown  Unknown
libc-2.22.so       00007FFFF57CCFE0  Unknown               Unknown  Unknown
StandAlone_FV3_Dy<PHONE_NUMBER>66BD87  fv_grid_utils_mod        1342  fv_grid_utils.F90
StandAlone_FV3_Dy<PHONE_NUMBER>66BB0B  fv_grid_utils_mod        1274  fv_grid_utils.F90
StandAlone_FV3_Dy<PHONE_NUMBER>6B64F0  fv_grid_tools_mod         678  fv_grid_tools.F90
StandAlone_FV3_Dy<PHONE_NUMBER>846325  fv_control_mod_mp         459  fv_control.F90
StandAlone_FV3_Dy<PHONE_NUMBER>436252  fv_statemod_mp_fv         574  FV_StateMod.F90
StandAlone_FV3_Dy<PHONE_NUMBER>4ACFC4  fvdycorecubed_gri        2307  DynCore_GridCompMod.F90

Can you provide details, number of cores you are running. Does this only affect the standalone? Have you seen this with the full GEOSagcm? Is the consistently reproducible?

Also, where is your standalone fv3 script. I might be useful if this were captured and maintained in the repository so that anyone of us can just run the standalone easily.

The run.j script is here
/discover/nobackup/projects/gmao/osse2/FV3_BW
At c720 this consistently happens at any core count. I have no issues with the full model.
 I might be useful if this were captured and maintained in the repository so that anyone of us can just run the standalone easily.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_GEOS-2DESM_GEOSgcm_issues_38-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAJ3CE653ONBC47PEZV2WZO3QFRFZFA5CNFSM4INZ26V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4XQOSA-23issuecomment-2D523175752&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=7qGAJ87ug_mV7A_t4nn9nhwDxKbYL8_ixj2GaxHYM3c&s=inLyNbM0hHjT0Zi9VaAstLEj5pfgngeZajR8uhQ9Qag&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AJ3CE66AROTDIQRVUQ6KR3LQFRFZFANCNFSM4INZ26VQ&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=7qGAJ87ug_mV7A_t4nn9nhwDxKbYL8_ixj2GaxHYM3c&s=PNoJY-9ffi-qXhI5jGgWzrJA3b-BpWEF3V-AyfO3NlM&e=.

What is the tag you are noticing this with? Is this the CVS/GNU build or the git/cmake build? Is this on scu11 or scu12. I built Jason-UNSTABLE on SLES12 as it looked like your run script was using Jason-UNSTABLE built on SLES12. I ran c720 at 8x48 on SLES12 without issue.

From the CVS/GNU build, Jason-UNSTABLE.  Where is your executable?
-- Bill Putman
William M Putman
Global Modeling and Assimilation Office
NASA Goddard Space Flight Center
Cell:<PHONE_NUMBER>
Desk:<PHONE_NUMBER>
From: Ben Auer<EMAIL_ADDRESS>Reply-To: GEOS-ESM/GEOSgcm<EMAIL_ADDRESS>Date: Friday, August 23, 2019 at 12:10 PM
To: GEOS-ESM/GEOSgcm<EMAIL_ADDRESS>Cc: William Putman<EMAIL_ADDRESS>Assign<EMAIL_ADDRESS>Subject: [EXTERNAL] Re: [GEOS-ESM/GEOSgcm] Standalone FV3 (#38)
What is the tag you are noticing this with? Is this the CVS/GNU build or the git/cmake build? Is this on scu11 or scu12. I built Jason-UNSTABLE on SLES12 as it looked like your run script was using Jason-UNSTABLE built on SLES12. I ran c720 at 8x48 on SLES12 without issue.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_GEOS-2DESM_GEOSgcm_issues_38-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAJ3CE66B32SKDHCMGR2HNU3QGADQHA5CNFSM4INZ26V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5AUVFY-23issuecomment-2D524372631&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=Wlr8T-1hQ1GkhQz6j82Jz3hckqoYuxBCw4IeJE34LUU&s=FuBw4pctUwLijHdcCsaSmi3HYL8CYyQ1tzRGBvecSAU&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AJ3CE6ZNPTOAGCDEDQCKO7TQGADQHANCNFSM4INZ26VQ&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=Wlr8T-1hQ1GkhQz6j82Jz3hckqoYuxBCw4IeJE34LUU&s=qH4KB0_631J2mXqdNeDWheWsJW4yEWI8meN0jvWcjBE&e=.

/gpfsm/dswdev/bmauer/models/Jason-UNSTABLE/GEOSagcm/Linux/bin, build for SLES12

I get the same error with your build:
/discover/nobackup/projects/gmao/osse2/FV3_BW/scratch_c720_L26_T1_8x48_40ppn_Jason-UNSTABLE-R4_NH.log
-- Bill Putman
William M Putman
Global Modeling and Assimilation Office
NASA Goddard Space Flight Center
Cell:<PHONE_NUMBER>
Desk:<PHONE_NUMBER>
From: Ben Auer<EMAIL_ADDRESS>Reply-To: GEOS-ESM/GEOSgcm<EMAIL_ADDRESS>Date: Friday, August 23, 2019 at 12:50 PM
To: GEOS-ESM/GEOSgcm<EMAIL_ADDRESS>Cc: William Putman<EMAIL_ADDRESS>Assign<EMAIL_ADDRESS>Subject: [EXTERNAL] Re: [GEOS-ESM/GEOSgcm] Standalone FV3 (#38)
/gpfsm/dswdev/bmauer/models/Jason-UNSTABLE/GEOSagcm/Linux/bin, build for SLES12
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_GEOS-2DESM_GEOSgcm_issues_38-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAJ3CE65XYAG3CY5SIGHDDUTQGAIJZA5CNFSM4INZ26V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5AX2ZY-23issuecomment-2D524385639&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=AWjW97B5VR_8KDtuKJiGBIoo_sJodJDzYj_GDHIGQlQ&s=WarIELJBapjCK1hK7cXsI5tMvl13Qalz37-MzoN_dnI&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AJ3CE64K3LDBYJNMWELZL43QGAIJZANCNFSM4INZ26VQ&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=z8dOdDWhHEg9eMypAGBSzN9nm21DGJm0jA6XVVJVjjw&m=AWjW97B5VR_8KDtuKJiGBIoo_sJodJDzYj_GDHIGQlQ&s=J8MKLcCcMM-cSHP4Y8ps8gftZdvhNgOd9iB40Axyu3M&e=.

@wmputman Was this resolved?


Reboot loop, Win8.1 target

This was intended as a validation test for release 1.3. See #30 .
The first round of 204 updates applies fine.
The second round, 14 updates, installs 'with errors'.
The third round, 1 update, fails to install (2:51:20), and an erroneous log entry (2:51:21) says updates were installed.
The failed upgrade is: Upgrade to Windows 10 Pro, version 1511, 10586.
Script runs again without reboot. 1 update found and installed. Calls for reboot (2:51:34) 40
Script reboots system ~147 times over the next ~2 hours.
Script then finds two updates  and halts after finding the system in a pending reboot state.
I suspect the issue is that the Win10 upgrade is now marked 'recommended' and so gets past the -SkipOptional flag. Cannot verify from the log that I have, though.
Here's the log:
PS C:\Users\bryanda\Documents\GitHub\PSWU> get-winevent -ComputerName t81 -logname pswu | sort recordid |ft recordid, timecreated, ID, Providername, message -AutoSize

RecordId TimeCreated          Id ProviderName       Message
-------- -----------          -- ------------       -------
       1 3/12/2016 9:00:31 AM  2 Install-AllUpdates Starting locally with params: -Computername t81 -SkipOptional -Verbose  ...
       2 3/12/2016 9:03:19 AM 52 Get-UpdateList     211 update(s) found in 44 seconds.
       3 3/12/2016 9:03:21 AM  6 Install-AllUpdates 204 update(s) will be installed. ...
       4 3/12/2016 9:03:23 AM 27 Install-Update     204 eligible updates found. ...
       5 3/12/2016 9:51:36 AM 29 Install-Update     Downloaded successfully; beginning install of 204 updates
       6 3/12/2016 1:49:21 PM 31 Install-Update     Installed updates successfully.
       7 3/12/2016 1:49:22 PM 33 Install-Update     Updates installed; please reboot soon.
       8 3/12/2016 1:49:22 PM  7 Install-AllUpdates Returning to start.
       9 3/12/2016 1:49:22 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      10 3/12/2016 1:49:22 PM  4 Install-AllUpdates Restart needed. Creating startup task and rebooting.
      11 3/12/2016 1:49:27 PM 61 New-PSTask         Task PSWU Install-AllUpdates (AtBoot) was created on T81
      12 3/12/2016 1:49:27 PM  4 Install-AllUpdates Restart commence NOW
      13 3/12/2016 2:06:16 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      14 3/12/2016 2:09:45 PM 52 Get-UpdateList     14 update(s) found in 28 seconds.
      15 3/12/2016 2:09:46 PM  6 Install-AllUpdates 14 update(s) will be installed. ...
      16 3/12/2016 2:09:46 PM 27 Install-Update     14 eligible updates found. ...
      17 3/12/2016 2:11:59 PM 29 Install-Update     Downloaded successfully; beginning install of 14 updates
      18 3/12/2016 2:20:43 PM 31 Install-Update     Installed updates with errors.
      19 3/12/2016 2:20:43 PM 33 Install-Update     Updates installed; please reboot soon.
      20 3/12/2016 2:20:44 PM  7 Install-AllUpdates Returning to start.
      21 3/12/2016 2:20:44 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      22 3/12/2016 2:20:44 PM  4 Install-AllUpdates Restart needed. Creating startup task and rebooting.
      23 3/12/2016 2:20:46 PM 61 New-PSTask         Task PSWU Install-AllUpdates (AtBoot) was created on T81
      24 3/12/2016 2:20:46 PM  4 Install-AllUpdates Restart commence NOW
      25 3/12/2016 2:22:49 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      26 3/12/2016 2:26:19 PM 52 Get-UpdateList     1 update(s) found in 27 seconds.
      27 3/12/2016 2:26:20 PM  6 Install-AllUpdates 1 update(s) will be installed. ...
      28 3/12/2016 2:26:21 PM 27 Install-Update     1 eligible updates found. ...
      29 3/12/2016 2:39:05 PM 29 Install-Update     Downloaded successfully; beginning install of 1 updates
      30 3/12/2016 2:51:20 PM 30 Install-Update     Installer error -2145124318, resultcode 4See https://support.microsoft.com/en-u...
      31 3/12/2016 2:51:21 PM 31 Install-Update     Installer error -2145124318, resultcode 4See https://support.microsoft.com/en-u...
      32 3/12/2016 2:51:21 PM 34 Install-Update     Updates installed; reboot NOT needed.
      33 3/12/2016 2:51:21 PM  7 Install-AllUpdates Returning to start.
      34 3/12/2016 2:51:21 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      35 3/12/2016 2:51:32 PM 52 Get-UpdateList     1 update(s) found in 10 seconds.
      36 3/12/2016 2:51:32 PM  6 Install-AllUpdates 1 update(s) will be installed. ...
      37 3/12/2016 2:51:32 PM 27 Install-Update     1 eligible updates found. ...
      38 3/12/2016 2:51:33 PM 29 Install-Update     Downloaded successfully; beginning install of 1 updates
      39 3/12/2016 2:51:34 PM 31 Install-Update     Installed updates successfully.
      40 3/12/2016 2:51:34 PM 33 Install-Update     Updates installed; please reboot soon.
      41 3/12/2016 2:51:36 PM  7 Install-AllUpdates Returning to start.
      42 3/12/2016 2:51:36 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      43 3/12/2016 2:51:36 PM  4 Install-AllUpdates Restart needed. Creating startup task and rebooting.
      44 3/12/2016 2:51:37 PM 61 New-PSTask         Task PSWU Install-AllUpdates (AtBoot) was created on T81
      45 3/12/2016 2:51:37 PM  4 Install-AllUpdates Restart commence NOW
      46 3/12/2016 2:52:49 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      47 3/12/2016 2:52:49 PM  4 Install-AllUpdates Restart needed. Creating startup task and rebooting.
      48 3/12/2016 2:52:50 PM 61 New-PSTask         Task PSWU Install-AllUpdates (AtBoot) was created on T81
      49 3/12/2016 2:52:50 PM  4 Install-AllUpdates Restart commence NOW
      50 3/12/2016 2:53:43 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
      51 3/12/2016 2:53:43 PM  4 Install-AllUpdates Restart needed. Creating startup task and rebooting.
      52 3/12/2016 2:53:43 PM 61 New-PSTask         Task PSWU Install-AllUpdates (AtBoot) was created on T81
      53 3/12/2016 2:53:44 PM  4 Install-AllUpdates Restart commence NOW

    ---- the restart loop continues for another ~145 iterations ----

     634 3/12/2016 5:06:21 PM  2 Install-AllUpdates Starting locally with params: -Computername t81  ...
     635 3/12/2016 5:06:46 PM 52 Get-UpdateList     2 update(s) found in 23 seconds.
     636 3/12/2016 5:06:47 PM  6 Install-AllUpdates 2 update(s) will be installed. ...
     637 3/12/2016 5:06:47 PM 20 Install-Update     t81 pending reboot status is: .True. - please reboot before applying further up...

So there are several fixable issues here, in priority order:

Win10 Upgrade being installed when the intention was to skip it.
Reboot loops should be detected and stopped.
The erroneous 'updates installed' message at recordid 32
Improper decimal to hex conversion at recordid 30, 31
Better logging all around.


(ci-skip): Add code of conduct

This is the code of conduct we also use in our other open source repos.

Is there a particular reason that this isn't in the root of the project, as it is in Larq?


Unable to install with Svelte 4

Hi, after migrating to Svelte 4 following the guide at https://svelte.dev/docs/v4-migration-guide, I can't install this package. I tried to debug the problem but I don't have any clue yet except the obvious that it's something related to Svelte dropping commonjs support.

Error [ERR_REQUIRE_ESM]: require() of ES Module ../node_modules/svelte/src/runtime/ssr.js from .../node_modules/svimg/dist/index.js not supported.
Instead change the require of ssr.js in .../node_modules/svimg/dist/index.js to a dynamic import() which is available in all CommonJS modules.
at Object. (../node_modules/svimg/dist/index.js:15:14)
at async Promise.all (index 0)
at async load_config (file:///.../node_modules/@sveltejs/kit/src/core/

How can we use your pr as part of our application meanwhile it get's merged?

Exactly, so what to do in that case?

Hi! Thank you for working on this! Seems to be a super helpful component! I'm trying to add it to my project but I get a similar error when I try to run a dev server or a build. (My project is built on default Sveltekit and my understanding is, it doesnt need an external rollup).

error when starting dev server:
Error [ERR_REQUIRE_ESM]: require() of ES Module ..\node_modules\svelte\src\runtime\ssr.js from ..\node_modules\svimg\dist\index.js not supported.
Instead change the require of ssr.js in ..\node_modules\svimg\dist\index.js to a dynamic import() which is available in all CommonJS modules.
at Object. (..\node_modules\svimg\dist\index.js:15:14)

The line in question seems to be-

var svelte = require('svelte');

Any help would be appreciated.

See https://github.com/xiphux/svimg/issues/47#issuecomment-1802132920 which should be released soon.

Oh thank you!


Pink textures help!

Describe the bug
pink and flashing graphics
I followed what you said here and the docs.
https://github.com/Dustyroom/flat-kit-doc/issues/22
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
https://gyazo.com/4b1ea27a8dc812852460a72c8e0c34f5
https://gyazo.com/635ee0a460a9077cc5203b4084937f54
Unity details:

Flat Kit version: newest
Unity version: 2021.1.1
Graphics Pipeline: URP
URP version (if applicable): newest
Development OS: windows

Build platform:

Platform: [e.g. iOS] windows
Test device: [e.g. iPhone6] windows

Not new to unity had my game published on steam for a while with URP working fine. once I added flatkit it blew up do you know whats going on? Do i have to change the shaders manually!?!

Hi! Thanks for the details.
First of all, you do not need to change shaders. This is most likely some version mismatch.
Some questions to help us debug:

Are you using the [Flat Kit] Example Forward Renderer? Can you please share a screenshot of the Renderer Asset you're using?
Do the samples included with Flat Kit render OK?

Issue resolved it was on my end. I had a shader error from missing shaders from another asset.
I do have one question and I really appreciate your help.
how do I exclude something from being outlined? Its outlining my sky

As you may know, Flat Kit has two methods of outlines: the shader based using the Stylized Surface shader (per material) and scene based (per renderer feature).
While the former can be used independently for each material, the latter needs to be applied as the image effect for the whole world space — it is how Unity works: the image effects are global.
There are ways to overcome this moment. For example, you can stack the cameras. Each one of the cameras has a separate forward renderer selected. Each of these forward renderers has its own Outline image effect, of course, with different settings. When stacked, these cameras result in multiple Outline image effects placed on top of each other. If you need one camera not to render the outlines at all, you can set outline width to 0 or bypass the Outline Renderer Feature, for example. It can be more taxing on the to the performance. Also, there are some limitations due the way URP operates.
Also, if you set any material to transparent, the Outline Image Effect can bypass transparency and not render the outline for that material. This won't affect the look but using the right Render Event parameter (please, look into this chapter), you can bypass the global outline on the scene on some materials.
Regarding the outlines skybox, you may, again, look into the Render Event parameter of the outline — here. In this case, please, try setting it to the 'Before Rendering Transparents' mode, or any other that suits your project. Please, don't forget to press Play to see the effect.

Thank you!!!


Add load serialization per backend to needed backends

There are backends which does not fully support parallel loading yet. This PR is to serialize their loading before they fully support parallel loading.

Before the change, hang on model loading and segmentation fault on model unloading was observed by running the L0_infer cpu-only repeatedly with this script:
#!/bin/bash

export TRITON_SERVER_CPU_ONLY=1
export BACKENDS="onnx python graphdef savedmodel libtorch"

for (( i=1; i<=1024; i++ )); do
        set +e
        rm -rf *log models *txt
        bash -x test.sh
        if [ $? -ne 0 ]; then
                echo -e "\n***\n*** Failed\n***"
                exit 1
        fi
        set -e
done

After this change, the issues are no longer observable.

Why this is done within core? Core shouldn't care if individual backend work well with parallel model loading. The backend developer must be aware of the parallel nature and serialize it properly if the backend must do so in sequence.

This is a patch to get everything going first. I agree we should find the root cause of the issue within each of the affected backend for a permanent fix. This is a ticket to remove this patch after the backends are fixed: DLIS-4415.

Closed due to https://github.com/triton-inference-server/core/pull/146


Redirecting to details page after create/edit

Now that Flask-Admin has details view, how could we utilize it to redirect the user to the details view after record has been created/edited?
Current behavior:

Create new record, use [Save] button and user is redirected to 'Edit' page
Edit record, use [Save] button, user is redirected to list view
Edit record, use [Save and Continue], user is redirected back to Edit page

Unfortunately I haven't found a simple way to override these redirects.

I think this would require changing https://github.com/flask-admin/flask-admin/blob/master/flask_admin/model/base.py#L1670 (and the same line in edit_view) to something like:
else:
    # save button
    return self.get_save_return_url(model)

And adding a method to ModelView:
def get_save_return_url(self, model=None):
    '''
        Returns url used in the redirect after the user uses the save button. Override this
        method to return the user to the details_view instead.
    "'
    return get_redirect_target() or self.get_url('.index_view')


JMXFetch metrics that is not specified in include and cause data truncation

Output of the info page (if this is a bug)
Getting the status from the agent.

===============
Agent (v7.23.0)
===============

  Status date: 2020-10-14 20:43:29.831820 UTC
  Agent start: 2020-10-14 19:59:50.623297 UTC
  Pid: 401
  Go Version: go1.14.7
  Python Version: 3.8.5
  Build arch: amd64
  Agent flavor: agent
  Check Runners: 8
  Log Level: info

  Paths
  =====
    Config File: /etc/datadog-agent/datadog.yaml
    conf.d: /etc/datadog-agent/conf.d
    checks.d: /etc/datadog-agent/checks.d

  Clocks
  ======
    NTP offset: -587µs
    System UTC time: 2020-10-14 20:43:29.831820 UTC

  Host Info
  =========
    bootTime: 2020-09-21 18:48:38.000000 UTC
    kernelArch: x86_64
    kernelVersion: 4.15.0-1092-azure
    os: linux
    platform: debian
    platformFamily: debian
    platformVersion: bullseye/sid
    procs: 405
    uptime: 553h11m41s
    virtualizationRole: host
    virtualizationSystem: kvm

  Hostnames
  =========
    host_aliases: [29e07677-d545-4047-a524-9d86a13a6a04 aks-default-34807489-vmss000006-dw-presto-prod]
    hostname: aks-default-34807489-vmss000006
    socket-fqdn: datadog-agent-x74jl
    socket-hostname: datadog-agent-x74jl
    host tags:
      kube_cluster_name:dw-presto-prod
      cluster_name:dw-presto-prod
      kube_node_role:agent
    hostname provider: container
    unused hostname providers:
      aws: not retrieving hostname from AWS: the host is not an ECS instance and other providers already retrieve non-default hostnames
      configuration/environment: hostname is empty
      gce: unable to retrieve hostname from GCE: status code 404 trying to GET http://<IP_ADDRESS>/computeMetadata/v1/instance/hostname

  Metadata
  ========
    cloud_provider: Azure
    hostname_source: container

=========
Collector
=========

  Running Checks
  ==============

    cpu
    ---
      Instance ID: cpu [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/cpu.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 7, Total: 1,205
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-10-14 20:43:20.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:20.000000 UTC

    disk (3.0.0)
    ------------
      Instance ID: disk:e5dffb8bef24336f [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/disk.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 214, Total: 37,022
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 189ms
      Last Execution Date : 2020-10-14 20:43:27.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:27.000000 UTC

    docker
    ------
      Instance ID: docker [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/docker.d/conf.yaml.default
      Total Runs: 172
      Metric Samples: Last Run: 114, Total: 19,608
      Events: Last Run: 0, Total: 1
      Service Checks: Last Run: 1, Total: 172
      Average Execution Time : 171ms
      Last Execution Date : 2020-10-14 20:43:19.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:19.000000 UTC

    file_handle
    -----------
      Instance ID: file_handle [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/file_handle.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 5, Total: 865
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-10-14 20:43:26.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:26.000000 UTC

    io
    --
      Instance ID: io [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/io.d/conf.yaml.default
      Total Runs: 172
      Metric Samples: Last Run: 104, Total: 17,816
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-10-14 20:43:18.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:18.000000 UTC

    kubelet (5.0.0)
    ---------------
      Instance ID: kubelet:d884b5186b651429 [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/kubelet.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 305, Total: 53,052
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 4, Total: 692
      Average Execution Time : 514ms
      Last Execution Date : 2020-10-14 20:43:25.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:25.000000 UTC

    kubernetes_apiserver
    --------------------
      Instance ID: kubernetes_apiserver [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/kubernetes_apiserver.d/conf.yaml.default
      Total Runs: 172
      Metric Samples: Last Run: 0, Total: 0
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 3ms
      Last Execution Date : 2020-10-14 20:43:17.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:17.000000 UTC

    load
    ----
      Instance ID: load [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/load.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 6, Total: 1,038
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-10-14 20:43:24.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:24.000000 UTC

    memory
    ------
      Instance ID: memory [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/memory.d/conf.yaml.default
      Total Runs: 172
      Metric Samples: Last Run: 18, Total: 3,096
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 9ms
      Last Execution Date : 2020-10-14 20:43:16.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:16.000000 UTC

    network (1.18.1)
    ----------------
      Instance ID: network:5c571333f400457d [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/network.d/conf.yaml.default
      Total Runs: 173
      Metric Samples: Last Run: 61, Total: 10,553
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 11ms
      Last Execution Date : 2020-10-14 20:43:23.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:23.000000 UTC

    ntp
    ---
      Instance ID: ntp:d884b5186b651429 [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/ntp.d/conf.yaml.default
      Total Runs: 3
      Metric Samples: Last Run: 1, Total: 3
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 1, Total: 3
      Average Execution Time : 86ms
      Last Execution Date : 2020-10-14 20:30:20.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:30:20.000000 UTC

    uptime
    ------
      Instance ID: uptime [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/uptime.d/conf.yaml.default
      Total Runs: 172
      Metric Samples: Last Run: 1, Total: 172
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-10-14 20:43:15.000000 UTC
      Last Successful Execution Date : 2020-10-14 20:43:15.000000 UTC

========
JMXFetch
========

  Initialized checks
  ==================
    presto
      instance_name : presto-<IP_ADDRESS>-7199
      message : <no value>
      metric_count : 52
      service_check_count : 0
      status : OK
      instance_name : presto-<IP_ADDRESS>-7199
      message : Number of returned metrics is too high for instance: presto-<IP_ADDRESS>-7199. Please read http://docs.datadoghq.com/integrations/java/ or get in touch with Datadog Support for more details. Truncating to 350 metrics.
      metric_count : 350
      service_check_count : 0
      status : WARNING
      instance_name : presto-<IP_ADDRESS>-7199
      message : Number of returned metrics is too high for instance: presto-<IP_ADDRESS>-7199. Please read http://docs.datadoghq.com/integrations/java/ or get in touch with Datadog Support for more details. Truncating to 350 metrics.
      metric_count : 350
      service_check_count : 0
      status : WARNING
      instance_name : presto-<IP_ADDRESS>-7199
      message : <no value>
      metric_count : 32
      service_check_count : 0
      status : OK
  Failed checks
  =============
    no checks

=========
Forwarder
=========

  Transactions
  ============
    CheckRunsV1: 173
    Connections: 0
    Containers: 0
    Deployments: 0
    Dropped: 0
    DroppedOnInput: 0
    Events: 0
    HostMetadata: 0
    IntakeV1: 20
    Metadata: 0
    Nodes: 0
    Pods: 0
    Processes: 0
    RTContainers: 0
    RTProcesses: 0
    ReplicaSets: 0
    Requeued: 0
    Retried: 0
    RetryQueueSize: 0
    Series: 0
    ServiceChecks: 0
    Services: 0
    SketchSeries: 0
    Success: 366
    TimeseriesV1: 173

  API Keys status
  ===============
    API key ending with 33c42: API Key valid

==========
Endpoints
==========
  https://app.datadoghq.com - API Key ending with:
      - 33c42

==========
Logs Agent
==========

  Logs Agent is not running

=========
APM Agent
=========
  Status: Running
  Pid: 400
  Uptime: 2620 seconds
  Mem alloc: 42,676,200 bytes
  Hostname: aks-default-34807489-vmss000006
  Receiver: <IP_ADDRESS>:8126
  Endpoints:
    https://trace.agent.datadoghq.com

  Receiver (previous minute)
  ==========================
    No traces received in the previous minute.
    Default priority sampling rate: 100.0%

  Writer (previous minute)
  ========================
    Traces: 0 payloads, 0 traces, 0 events, 0 bytes
    Stats: 0 payloads, 0 stats buckets, 0 bytes

=========
Aggregator
=========
  Checks Metric Sample: 148,232
  Dogstatsd Metric Sample: 64,070
  Event: 2
  Events Flushed: 2
  Number Of Flushes: 173
  Series Flushed: 137,837
  Service Check: 3,445
  Service Checks Flushed: 3,609

=========
DogStatsD
=========
  Event Packets: 0
  Event Parse Errors: 0
  Metric Packets: 64,069
  Metric Parse Errors: 0
  Service Check Packets: 677
  Service Check Parse Errors: 0
  Udp Bytes: 23,458,976
  Udp Packet Reading Errors: 0
  Udp Packets: 23,777
  Uds Bytes: 0
  Uds Origin Detection Errors: 0
  Uds Packet Reading Errors: 0
  Uds Packets: 0

=====================
Datadog Cluster Agent
=====================

  - Datadog Cluster Agent endpoint detected: https://<IP_ADDRESS>:5005
  Successfully connected to the Datadog Cluster Agent.
  - Running: 1.8.0+commit.934d5c5

Describe what happened:
We set up datadog agent for presto in AKS. Under /conf.d/presto.d/ we have the following config:

conf.yaml to capture default metrics
presto-metrics.yaml to capture user defined metrics that is under 350 limit
presto-qm-metrics.yaml to capture jmx query manager data that is not already in default metrics

    presto-qm-metrics: |-
      ad_identifiers:
        - presto-coordinator
        - presto-worker
      init_config:
        is_jmx: true
        collect_default_metrics: false
      instances:
        - host: "%%host%%"
          port: "7199"
          conf:
              - include:
                bean: presto.execution:name=QueryManager
                attribute:
                    ConsumedCpuTimeSecs.OneMinute.Count:
                      metric_type: gauge
                      alias: presto.execution.consumed_cpu_time_per_minute
...

presto-hydro-metrics.yaml to capture jmx data for hydro

    presto-hydro-metrics: |-
      ad_identifiers:
        - presto-coordinator
        - presto-worker
      init_config:
        is_jmx: true
        collect_default_metrics: false
      instances:
        - host: "%%host%%"
          port: "7199"
          conf:
              - include:
                bean: presto.plugin.hive:type=FileFormatDataSourceStats,name=hive_hydro
                attribute:
                  ReadBytes.AllTime.Avg:
                    metric_type: gauge
                    alias: presto.hive.readbytes_all_time_avg
...

Describe what you expected:
I expect to see:

✅ 50~100 default metrics from conf.yaml
✅ 30~100 user defined metrics from presto-metrics.yaml
❌ <100 metrics from presto-qm-metrics.yaml, instead we see more than 350 matched:

2020-10-14 20:14:06 UTC | CORE | INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-10-14 20:14:06 UTC | JMX | INFO  | Instance | Found 350 matching attributes

❌ <100 metrics from presto-hydro-metrics.yaml, instead we see more than 350 matched, and error when sending the data:

2020-10-14 20:14:08 UTC | CORE | INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-10-14 20:14:08 UTC | JMX | ERROR | App | Number of returned metrics is too high for instance: presto-<IP_ADDRESS>-7199. Please read http://docs.datadoghq.com/integrations/java/ or get in touch with Datadog Support for more details. Truncating to 350 metrics.

We also expect that agent jmx collect only print metrics that we defined. Instead, we are seeing a lot of metrics under io.prestosql.plugin.jdbc:
2020-10-14 20:14:08 UTC | CORE | INFO | (pkg/jmxfetch/jmxfetch.go:304 in func1) | 2020-10-14 20:14:08 UTC | JMX | INFO  | ConsoleReporter | jmx.io.prestosql.plugin.jdbc.begin_create_table.time.all_time.count[instance:presto-<IP_ADDRESS>-7199,jmx_domain:io.prestosql.plugin.jdbc,type:JdbcClient,name:teletype,role:worker,kube_container_name:presto-worker,image_tag:341-c5477f,kube_namespace:default,kube_deployment:presto-worker,environment:azure-prod,short_image:presto-worker,pod_phase:running,app-role:presto-worker,docker_image:ghdwprod.azurecr.io/presto-worker:341-c5477f,image_name:ghdwprod.azurecr.io/presto-worker] -<PHONE_NUMBER> = 0.0

Steps to reproduce the issue:
See our setup above, and let us know if you need more information.
Additional environment details (Operating System, Cloud provider, etc):
Cloud Provider: Azure
Docker image: 7-jmx
In AKS config, /etc/log.properties we enable verbose logging for presto:
io.prestosql=DEBUG
However, datadog agent does not configured to capture logs.
We have investigate and putting the bean/ config that cause >350 metrics in a separated config, to limit the impact to other metrics we collect. However, within the same bean, we would like to only capture the metrics specified. Currently, dues to truncation, the metrics we specified are not being captured. Metrics we do not specified, io.prestosql.plugin.jdbc, are captures instead.
We have try using exclude to remove the metrics match io.prestosql.plugin.jdbc, but it's not working.

This is caused by whitespaces in the configuration file. See above, we have the wrong number of whitespace in this section:
- include:
   bean: presto.plugin.hive:type=FileFormatDataSourceStats,name=hive_hydro`

they should be:
- include:
     bean: presto.plugin.hive:type=FileFormatDataSourceStats,name=hive_hydro`


Automated release draft details

Codecov Report

Merging #39 (f512690) into master (5ea2425) will decrease coverage by 0.18%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   94.19%   94.01%   -0.19%
==========================================
  Files          49       49
  Lines        1965     1904      -61
==========================================
- Hits         1851     1790      -61
  Misses        114      114

Impacted Files
Coverage Δ

trnsystor/canvas.py
85.71% <0.00%> (-1.13%)
:arrow_down:

trnsystor/component.py
91.15% <0.00%> (-0.66%)
:arrow_down:

trnsystor/collections/variable.py
84.78% <0.00%> (-0.64%)
:arrow_down:

trnsystor/collections/equation.py
90.62% <0.00%> (-0.56%)
:arrow_down:

trnsystor/collections/input.py
83.87% <0.00%> (-0.51%)
:arrow_down:

trnsystor/linkstyle.py
89.55% <0.00%> (-0.45%)
:arrow_down:

trnsystor/specialcard.py
93.33% <0.00%> (-0.42%)
:arrow_down:

trnsystor/collections/parameter.py
91.66% <0.00%> (-0.34%)
:arrow_down:

trnsystor/collections/specialcards.py
94.44% <0.00%> (-0.30%)
:arrow_down:

trnsystor/typevariable.py
92.90% <0.00%> (-0.25%)
:arrow_down:

... and 13 more

Continue to review full report at Codecov.

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


Integrate Docker Machine into Rancher

Allow users to create new hosts via the Rancher API instead of having to run docker run rancher-agent... on an existing host.
UI
In the UI, the user should be able to access an "Add Host" widget that allows them to create new hosts on certain supported cloud providers.
API
To support this in the UI, we'll add a new resource called dockerMachine in the the API. This resource will be a special kind of physicalHost with additional properties to support all the driver configuration options available in docker-machine.
Architecture
Will require a new event listener that listens for and reacts to dockerMachine life cycle events. Here is what it will do at each step in the life cycle:

On create, exec out to the docker-machine binary to create the host. Once the create completes successfully, access the machine's config.json and push it into the rancher resource.
On activate, utilize the docker-machine to  obtain connection information to the docker daemon for the host and execute the equivalent of docker run rancher-agent... on the host.
On delete, exec out to the docker-machine binary to delete the host.

This agent will run next to the rancher-server. So, one cluster per rancher-server cluster, not one per account or user.
Open questions

How do we handle the loss of the machine agent? Docker-machine maintains state on disk, so if we lose the agent, we'll lose the state that allows us to access and CRUD the hosts.
How do we deal with security concerns? Docker-machine stores cloud credentials in the config.json so that it can later operate on a host. What kind of security concerns/risks does this introduce and how do we mitigate?

How does the DB schema look like for this since you are assuming a single machine-agent per rancher-server?

Already added into Rancher


Make it more clear what the user needs to pass in for azd template show

Today, it's not really clear what a user needs to pass into azd template show (e.g. URL).
We should also revisit making this more valuable to the user (e.g. Update the template descriptions to reflect the local application stack).

Investigate on azd template commands to see if we need to hide some of them.

I am going to close this for now based on above changes


refactored

Refactored following our new standards.
All containrs were successfully built and run except for the ones containing a GUI
Someone who knows the packages should add the tests.

Hi Saulo, I just want to clarify some points before merging;

In my opinion, the # File Author / Maintainer tag should be the last thing on the Dockerfile, If more than one author changes the file, there will be several names on that tag, and this can make the file more polluted. Also, it breaks the logical reasoning of the recipe, since it is not a functional tag.

The containers that relies on GUIs still have problems to run, but fortunately, some of the collaborators here are the ones responsible for those software development, so maybe they can help us dealing with those problems.

The Rstudio image was cloned from the Rocker repository, they also use their own base image, so if we change that for our image, the containers breaks, I tested before.

Hi Saulo, I just want to clarify some points before merging;
In my opinion, the # File Author / Maintainer tag should be the last thing on the Dockerfile, If more > than one author changes the file, there will be several names on that tag, and this can make the > file more polluted. Also, it breaks the logical reasoning of the recipe, since it is not a functional tag.
It's a matter of preference. I don't have a really strong feeling about it but I think that the author's name is part of the header of documents in general. But I can change it. not problem.
And, indeed, it comes after the FROM tag which is a functional tag.
I will try to change it tonight and pull again.

The containers that relies on GUIs still have problems to run, but fortunately, some of the collaborators here are the ones responsible for those software development, so maybe they can help us dealing with those problems.
Ok. To reiterate, they are compiling, I'm just not able to connect to the X11 session

The Rstudio image was cloned from the Rocker repository, they also use their own base image, so if we change that for our image, the containers breaks, I tested before.
I Didn't change the base image for the Rstudio. It is crashing when calling a boost library when compiling one of the R packages.

@Leprevost . ive moved the maintainer statement to the end

thanks, There are conflicts for the merging, I have to review them manually before merging.

@Leprevost  @ypriverol
should we merge?


Path issues on win32 system

There are some issues around the win32 vs posix path delimiters:
$ npm run build:lsg && concurrently "npm run build:lsg -- -w" "patternplate start"

><EMAIL_ADDRESS>build:lsg **\pkg
> tsc --project src/lsg --outDir build/lsg/patterns

[0]
[0] ><EMAIL_ADDRESS>build:lsg **\pkg
[0] > tsc --project src/lsg --outDir build/lsg/patterns "-w"
[0]
[1] Module not found: Error: Can't resolve './buildlsgpatternuttondemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatternuttondemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatterns  ab-navigationdemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatterns  ab-navigationdemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatternscolorsdemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatternscolorsdemo.js' in '**\pkg'
[1] Module not found: Error: Can't resolve './buildlsgpatternscopydemo.js' in '**\pkg'
[...]

First reported by @TheReincarnator

Issues around components are resolved, remaining:

no docs are found
check build
check create

Docs are fixed via 011580277d7dd6c09fa304df4fa4dca93d63f43a

Issues should be solved in version 2.1.5 and up.


Scope annotations + Bindings

We don't allow to bind implementations which contain "scope annotations".
For instance, the following is forbidden:
interface A {
    ...
}

@Singleton
class B implements A {
    ...
}

class XModule extends Module {
    public ModuleWithNamedBindings() {
        bind(A.class).to(B.class);
    }
}

However, it seems a valid use case...
Should we allow it?
However, not all cases are valid (that's why it is not allowed right now)...

The problem with this example is where the XModule is gonna be used..
Outside of the root scope, it doesn't make any sense.
To verify this, we would have to get the factory (or use reflection) to determine if the targets of bindings are annotated with a scope annotation that matches the scope supported annotations. It would also imply  that the scope annotation knows about its scope annotations before installing modules, which is quite a constraint and prevents dynamic scope annotation bindings to scopes.
I think I would prefer to consider this as a limitation of TP. The price to pay would actually be high to check this, even in a configuration.
An easy workaround is to instantiate the scoped instances in the module:
class XModule extends Module {
    public ModuleWithNamedBindings() {
        bind(A.class).toInstance(new B());
    }
}

Yes, it will only make sense if the  Scope annotation is attached to one of the parent scopes.
As you said, the verification would be really expensive.
So a work around would be to define a provider for B:
class XModule extends Module {
    public ModuleWithNamedBindings() {
        bind(A.class).toProvider(BProvider.class);
    }
}

class BProvider  implements Provider<B> {
  B b;

  @Inject
  public BProvider(B b) {
    this.b = b;
  }

  @Override
  public B get() {
    return b;
  }
}

closing

@dlemures
@stephanenicolas
Hi. There are any changes with this issue?
I am trying this code.
@javax.inject.Scope
@Retention(RUNTIME)
@interface MyScope {}

interface IFoo {
	String getHash();
}

@MyScope
class Foo implements IFoo {
	@Inject
	Foo() {}

	public String getHash() {
		return Integer.toString(hashCode());
	}
}

void test() {
	Scope scope = Toothpick.openScopes("root", "scope");
	scope.installModules(new Module() {{
		bind(IFoo.class).to(Foo.class);
	}});
	scope.bindScopeAnnotation(MyScope.class);

	IFoo foo1 = scope.getInstance(IFoo.class);
	IFoo foo2 = scope.getInstance(IFoo.class);
	Log.d("MY_TAG", "foo1: " + foo1.getHash());
	Log.d("MY_TAG", "foo2: " + foo2.getHash());
}

It prints that foo1 and foo2 are the same instance. But the strange thing is that it still works even if I remove bindScopeAnnotation statement. So, there are no scope verification in this case.


Security: Handling of ICMP messages

BMC handling of following ICMP messages.

ICMP flooding
ICMP timestamp request message
ICMP netmask request message

Identify tool to simulate such traffic and test BMC behavior.

test case 2 icmp timestamp request is in commit:
https://gerrit.openbmc-project.xyz/#/c/openbmc/openbmc-test-automation/+/24312/

closing use case 2 and 3 are done


[GOCA] migrate xml package from xmlpath to encoding/xml

Description
The goal of this migration is to use the encoding/xml package instead of xmlpath in order to decode the XML content from OpenNebula.
For each OpenNebula entity, a set of structures will be defined to which is directly mapped the XML content.
The developper will work directly with theses structures.
Sometimes due to dynamic parts he will have to do some tests but less than with xmlpath module.
The types conversions and parsing part are removed from the developper code,
in this way, his code will be much more simple, and this also allow auto completion.
Use case
It's useful for every XXX.info requests.
Interface Changes
This does not modify functions prototypes, but add a bunch on structures that the developer can use directly.
Additional Context
I'll provide a pull request soon.

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

Some bug has been found by the ONE team in my code so I reopen this case and provide a pull request to fix this.
Add:

Info method struct cleaning
remove some mutualized part among structs, it cost a bit more of memory but the code is less tricky...


Windows Flickering on dark mode - win10

Describe the bug
The window will flicker on resize and maximize/restore on dark mode. There's a work around on version 2.1.0 which is AllowsTransparency="True" but this won't work on 3.0.4 because you can't set the window style to none. Is there any work around for this before migrating to v3?
To Reproduce
Run the Demo/Gallery App and try to resize, maximize/restore.
Expected behavior
no flickering
Screenshots
No response
OS version
Windows 10
.NET version
.net8
WPF-UI NuGet version
3.0.4
Additional context
No response

Window style none is not supported for FluentWindow


Samples Directory needs to separate build environments

We discovered this while working on PR #870
A few of our samples require the full framework. That's fine, because they cover migrating from the full framework to Core, or supporting both (see here: https://docs.microsoft.com/en-us/dotnet/articles/core/porting/project-structure)
We need a project structure that enables the CI build server to build the right set of samples in the correct configuration. This is a matrix that comprises .NET products (.NET Core, .NET Standard, Full .NET Framework), and platforms (Windows, Linux, MacOS). Some Core projects may have a native dependency, because they explain how to create those kinds of projects.
This structure is further complicated by our current structure, which organizes samples based on content: C# samples, F# samples, .NET Core samples, and so on.
I believe all language samples (C# and F#) should build on all platforms. @cartermp can verify for F#. (I will verify for C#).
Core samples probably should all build on all supported Core platforms.
The interesting ones now are those that discuss the full .NET framework, or how to migrate from the full framework to Core.  They are listed at the end of this issue.
Proposal
We'll make a new directory for samples that are meant to build on the full framework only. This should be /samples/full-framework. This will include any code that discusses migration to core, or supporting the full framework as a development environment.
In the future, we can add sub-directories for other environments when this repository adds samples specific to those environments (for example, Xamarin projects, Windows client frameworks, and so on).
Samples Affected
Samples that do not build on Ubuntu (by design) are:
/samples/core-projects/libraries/frameworks-library
/samples/core-projects/libraries/migrate-library
/samples/core-projects/libraries/migrate-library-pcl
/samples/core-projects/libraries/migrate-library-xproj
/samples/core-projects/libraries/migrate-library-xproj-keep-csproj
These should all move to the new /samples/full-framework directory.
The topics that reference those samples must have all links updated when the samples move.

That makes sense. From a CI standpoint, I want different build agents to cover different areas, with certainty that the areas covered are not failed because of a framework scope mismatch.
/samples/full-framework makes sense to me.

A simple convention makes sense.
"full-framework" is a colloquialism, so we should pick something different than that. One option is to use the NuGet names. This will also help with specifying target framework version. So, a .NET Framework 4.6 project would be "net46". See: https://docs.nuget.org/Create/TargetFrameworks.

@richlander we need something that can fully encompass all possible variations of .NET "full" framework. Within full-framework we can create sub-directories with net46 and so on (because what will happen when net47 comes out?).
That said, we also need to move all core samples to /samples/core-framework or /samples/dotnet-core - easier to manage and more intuitive.

As I think about it, I really like the idea of using the NuGet package names.
Consider that we have CI servers with known configurations. For example, Windows with .NET Core 1.0, Windows with .NET 46, Ubuntu with .NET Core 1.0.
Each CI Server builds all samples it can:
. Windows with .NET Core 1.0: all samples for .NET Core 1.0
. Windows with .NET 46: all samples for .NET 46, or earlier, and all .NET Core 1.0 samples.
. Ubuntu with .NET Core 1.0: all samples for .NET Core 1.0
When .NET 47 comes out, we have two choices:

Add a Windows with 47 config (in addition to 46). The new server builds all 47 and earlier samples.
Update all 46 samples (and the build server) to 47.

Either would work, and we can do either as business needs dictate.

I think we should call it netframework or something like that. I don't think we want to keep changing folders every time a new version comes out.

@BillWagner something to keep in mind is that there will be a matrix, where we can say: this sample runs on 4.5, 4.6 but not earlier - that means that a single machine (e.g. Windows 7 with .NET 4.6) will attempt to build all samples within the scope (/samples/netframework - following @mairaw's naming convention here) and then report back whether it was successful or not. Besides, some samples will be spanning framework versions, so we need to validate that as well.
Thoughts on the above?

I think there are two good models:

Match the guide name.
Match the NuGet short name (no version).

If we look at Xamarin, it won't just be Xamarin, but Xamarin Android and Xamarin iOS (and others). If we keep that in mind, then the NuGet name is the best, IMO.

In the Xamarin case, would it make sense to have the structure similar to /samples/xamarin/android then?

That would work.

Updated Proposal
We need to solve the immediate problem of building samples for all platforms where we currently have code. The solution should provide a path for future concerns such as:

Xamarin Builds (build iOS and Android)
Versions of the framework or core, for upgrade scenarios
Native interop samples that (by definition) are valid only on one supported platform.

Currently we have:
samples/core-projects
samples/csharp-language
samples/getting-started
samples/linq
We will move to a system with:
/samples/core:  Builds on all supported core platforms. (Note this means that standalone package builds must contain a runtime node for each of win64, ubuntu, and MacOS)
/samples/framework: Builds on the .NET Framework (currently 4.6)
/samples/csharp: builds on all supported core platforms.
/samples/fsharp: builds on all supported core platorms. (This is currently a placeholder).
This can be extended in the future as new platforms are needed. For example:

/samples/xamarin-ios
/samples/xamarin-android

** Version Specific Samples **
In the future, when we add new samples that are version dependent, we can create version-specific sub-folders underneath the proposed top-level folders. These version specific folders would use the NuGet names for the framework and version.
** Moving current samples **
There are two top-level folders currently containing samples that need to move to accomodate this new proposal.

/samples/getting-started
o This directory contains 2 getting started projects: one for C#, and one for core. I propose moving 'getting-started' under each main topic (for example samples/csharp/getting-started and samples/core/getting-started) As we add more different environments, customers will be trying to get started with one of those, rather than getting started with everything .NET. Separating the getting started content for each major platform would make it easier for beginners to find the samples they need.
/samples/linq
o These should move under /samples/core/linq. The LINQ samples have all been updated to run on Core. This decision implies that any sample that runs on core would also run on framework. I propose we assume that, until we find a counter-example.

Please vote via :+1: or :-1: emoji. If further discussion is required, please comment.
/cc @mairaw @richlander @dend

@BillWagner what about /samples/xamarin/ios - overall the proposal looks good, but also would be great to establish some guidelines of how this will be extended in the future so that we are not really splitting the experience.

I like the proposal too. Agree with @dend's comment as well.

Self-assigning, and PR coming.
I'll put guidance in the contributing.md file about extending in the future.

fixed in #890


Openshift Error: EACCES: permission denied, mkdir '/var/lib/openshift/{instance}'

git push openshift master --force
Counting objects: 838, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (316/316), done.
Writing objects: 100% (838/838), 254.67 KiB | 0 bytes/s, done.
Total 838 (delta 494), reused 838 (delta 494)
remote: CLIENT_MESSAGE: Stopping io.js application...
remote: CLIENT_RESULT: io.js application stopped.
remote: Building git ref 'master', commit e3d3194
remote: npm WARN package.json<EMAIL_ADDRESS>No repository field.
remote: npm WARN package.json<EMAIL_ADDRESS>No license field.
remote: npm WARN deprecated<EMAIL_ADDRESS>graceful-fs version 3 and before will fail on newer node releases. Please update to<EMAIL_ADDRESS>as soon as possible.
remote: npm WARN deprecated<EMAIL_ADDRESS><EMAIL_ADDRESS>is no longer maintained. Upgrade to<EMAIL_ADDRESS>remote: npm WARN deprecated<EMAIL_ADDRESS>graceful-fs version 3 and before will fail on newer node releases. Please update to<EMAIL_ADDRESS>as soon as possible.
remote:
remote: ><EMAIL_ADDRESS>postinstall /var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo
remote: > gulp
remote:
remote: [10:50:52] Requiring external module babel-core/register
remote: [10:50:52] Using gulpfile /var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/gulpfile.babel.js
remote: /var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/mkdirp/index.js:90
remote:                     throw err0;
remote:                     ^
remote:
remote: Error: EACCES: permission denied, mkdir '/var/lib/openshift/{instance}'
remote:     at Error (native)
remote:     at Object.fs.mkdirSync (fs.js:799:18)
remote:     at sync (/var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/mkdirp/index.js:71:13)
remote:     at sync (/var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/mkdirp/index.js:77:24)
remote:     at sync (/var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/mkdirp/index.js:77:24)
remote:     at Function.sync (/var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/mkdirp/index.js:77:24)
remote:     at save (/var/lib/openshift/56d1c4d97628e1a3ce000138/app-root/runtime/repo/node_modules/babel-register/lib/cache.js:47:11)
remote:     at doNTCallback0 (node.js:407:9)
remote:     at process._tickCallback (node.js:336:13)
remote:
remote:
remote: CLIENT_RESULT: io.js modules installed.
remote: Preparing build for deployment
remote: Deployment id is 3a711a90
remote: Activating deployment
remote: CLIENT_MESSAGE: Starting io.js application...
remote: CLIENT_RESULT: Warning! Could not start io.js application!
remote: -------------------------
remote: Git Post-Receive Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 56d1c4d97628e1a3ce000138 (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/56d1c4d97628e1a3ce000138/iojs
remote: #<IO:0x00000000ed62a0>
remote: #<IO:0x00000000ed6228>
remote: )
remote: Deployment completed with status: failure
remote: post receive failed

Openshift deployment is broken? Seems like a permission issue but i can't figure out how to fix it, open shift doesn't give root permissions.
I'm guessing gulp is trying to create a cache dir but doesn't have permissions

I have same problem on Open Shift (in Heroku is OK)
I add a variable BABEL_DISABLE_CACHE=1
The web can access but can not invite, stuck in please wait button.
Please help us.

Does the suggestion in #136 fix it?

@jeroenleenarts I had the same problem, and https://github.com/rauchg/slackin/issues/136#issuecomment-183449142 fixed it for me.


Timeout when validating resources with large number of arcs

The following attempt of validation (a Shanghai hospital) agains the entity schema of hospitals:
curl -i -X POST -H "Content-type:multipart/form-data" 'http://localhost:8080/api/wikidata/validate' \
                                                         --form-string 'item=<http://www.wikidata.org/entity/Q33121756>' \
                                                         --form-string 'entitySchema=E187'

gives a timeout because the entity schema E187 refers to country and the country is Chile (Q148) which seems to take more time than expected to be retrieved and the whole result is a timeout.
Check how we can improve this situation by increasing the time the server waits or using some kind of streaming retrieval.

Looking at logs, there is a warning:
requestTimeout (5 minutes) is >= idleTimeout (1 minute). It is recommended to configure responseHeaderTimeout < requestTimeout < idleTimeout or disable some of them explicitly by setting them to Duration.Inf.


Create dataset loader for ParaCotta

https://indonlp.github.io/nusa-catalogue/card.html?paracotta

#self-asign


Add router_class param

I'm facing a problem when using a custom router becomes a real hack. The router_class param allows to pass custom router class.
The current solution:
import redis.asyncio as redis
from fastapi import FastAPI, Depends

from cachepot.constants import CachePolicy
from cachepot.routing import CachedAPIRouter
from cachepot.storages.redis import RedisStorage

app = FastAPI()

app.router = CachedAPIRouter(
    dependency_overrides_provider=app,
    # define dependencies inside overridden router only
    dependencies=(Depends(...),),
)

# hack to finish setting up custom router
app.setup()

client = redis.from_url('redis://<IP_ADDRESS>:6379')
storage = RedisStorage(client)

cache_policy = CachePolicy(
    storage=storage,
    key='cached_hello_world',
    ttl=30,
)

# Do not use @app.route() due to incapability
@app.router.get(path='', cache_policy=cache_policy)
async def cached_hello_world():
    return {'result': 'hello, world!'}

As you can see, I have to patch app with a new router using
app.router = CachedAPIRouter()

and then call
app.setup()

to be able to use it.
Also, direct
@app.router.get()

call is required because router doesn't support custom params. I would appreciate it if you would review this fix too.

I can also add some docs if there are no objections to the solution


chore: improve cypress happo screenshots (part 2)

FX-2850
Description
Cypress tests with happo screenshots are being improved. In this PR, I focused on 9 components:

ButtonAction (spec file deleted because of redundant tests with storybook)
ButtonCheckbox (spec file deleted because of redundant tests with storybook)
ButtonCircular (spec file deleted because of redundant tests with storybook)
ButtonRadio (spec file deleted because of redundant tests with storybook)
ButtonSplit (improved with names)
Calendar (improved with names)
CategoriesChart (improved with names)
Colors (spec file deleted because of redundant tests with storybook)
Container (spec file deleted because of redundant tests with storybook)

How to test

I separated commits to ease reviewing process
happo review and code review would be enough

Screenshots
happo reports are our screenshots
Development checks

Add changeset according to guidelines (if needed)
Read CONTRIBUTING.md and Component API principles
Annotate all props in component with documentation
Create examples for component
[ ] Ensure that deployed demo has expected results and good examples
Ensure the changed/created components have not caused accessibility issues. How to use accessibility plugin in storybook.
[ ] Self reviewed
Covered with tests

Breaking change

codemod is created and showcased in the changeset
test alpha package of Picasso in StaffPortal

PR commands

List of available commands:

@toptal-bot run all - Run whole pipeline
@toptal-bot run build - Check build
@toptal-bot run deploy:documentation - Deploy documentation
@toptal-bot run package:alpha-release - Release alpha version

PR Review Guidelines

When to approve? ✅
You are OK with merging this PR and

You have no extra requests.
You have optional requests.

Add nit: to your comment. (ex. nit: I'd rename this variable from makeCircle to getCircle)

When to request changes? ❌
You are not OK with merging this PR because

Something is broken after the changes.
Acceptance criteria is not reached.
Code is dirty.

When to comment (neither ✅ nor ❌)
You want your comments to be addressed before merging this PR in cases like:

There are leftovers like unnecessary logs, comments, etc.
You have an opinionated comment regarding the code that requires a discussion.
You have questions.

How to handle the comments?

An owner of a comment is the only one who can resolve it.
An owner of a comment must resolve it when it's addressed.
A PR owner must reply with ✅ when a comment is addressed.

Checked the screenshots and storybook, LGTM :+1:


Security Vulnerabilities

Dear team,
Please check full detailed report here
https://huntr.com/bounties/2ed02d49-aa91-4061-98b9-61ce096f0396
https://huntr.com/bounties/94a68137-bdea-4e6f-8c20-19f3f1e6f0b8
https://huntr.com/bounties/f42cf72a-8015-44a6-81a9-c6332ef05afc
https://huntr.com/bounties/e449567a-01eb-4129-85a8-cd89e6cfcaa8
Please check and validate these vulnerabilities

I highly encourage you to instead use GitHub security disclosures, as those above seem to require an account. It's not very polite.

hello @justinh-rahb
Open-webui have hosted their bug bounty program on huntr.com so that we security researchers can report vulnerabilities directly on huntr.com. Only maintainer's can access these reports on huntr.com because of security reasons

Open WebUI hasn't got a bug bounty program. This seems sus.


Question : pebblejs smoothness

Hi,
First of all, great job building this SDK ! I really enjoyed reading the docs.
I would like to develop apps for Pebble smartwatches, but as node.js developer who have not used C for years, the language barrier is quite a challenge for me (and the snake_case too, lol)... Pebblejs seems to be the solution.
I read the online doc and one of the first thing written is :

Please be aware that as a result of Bluetooth round-trips for all actions, Pebble.js apps will use more power and respond slower to user interaction than a similar native app.

And I really did notice significant delays when running the provided default app. Sometimes, when I click a physical button on my watch, the action can take seconds to be effective.
So, before I start, I'd like to know a few things :

Is it just that my phone's Bluetooth sucks ? (I don't think so, because I encounter the same problem on the CloudPebble emulator)
Is there any chance the responsiveness of on-phone javascript pebble apps will get better in the future ? (i.e. shorter delays)
Is there a way to "compile" a javascript application to make it a native pebble app ?
Can I at least display a "loading" visual clue between user physical button and the end of the Bluetooth round-trip ?
Can Pebblejs apps run without a phone connected ? (I guess not)

Also, I plan to have a charting feature in my app (the current lack of line/path UI.Element is not a problem, I'll just make bar charts for now), so I'd like to know if complex UI.Windows (with lots of UI.Elements in it) could take significantly more time to be displayed ?
Thanks for reading :-)
Eswak

No, thank you for compliments on the doc! There are certainly rough parts, but sections are being improved as pebble.js is being built.

Now for the real topic: Bluetooth. I appreciate the info about the emulator, that's something new to me. In other issues in this repo, I have hinted that there may be something in App Message that is adding extra delays on top of Bluetooth. Experiencing delays in the emulator makes that more of a possibility. I will have to investigate that as soon as I find the time.
Compiling JavaScript applications is something I am looking into, but I can't make any promises. Investigating the above issue or this are the two primary ways latency can be reduced.
A loading visual cue is an interesting idea, I'll take that as a feature request for the action bar.
You are correct, pebble.js completely depends on the phone. It'll display a (currently ugly) notice to run the phone app.

Many elements can cause it to take longer to load, but not significantly so. You would need to be sending more than 1.5KB in order to start seeing delays due to excessive elements. Showing a UI.Rect is 29 bytes, complete with size and color. I do plan to eventually add GPath support so that you may draw lines however!
Latency is a huge issue however. The strongest use case for pebble.js is displaying lists of rapidly updating data from the internet, such as the latests posts from a popular source since that latency would be unavoidable even with a C app. But otherwise, if latency is a real problem. you can use pebble.js as a way to prototype your idea. The Pebble developers blog has been releasing C tutorials. You can prototype your app in pebble.js and write the same app in C afterwards.

Thanks a lot for all these responses :-)
I guess I'll start to read the C tutorials while prototyping in JS... :+1:
Cheers !

this is completely off-topic but I just happened to back the Pebble Time Kickstarter and look what I saw on the confirmation screen :-p

Haha, I have to have my Pebble Time!
Interestingly, it seems the list of some other backers isn't very random. Most of those people were among the first to back the project. I wonder if it works by selecting a random slice/window from the chronological list, if it just displays the early backers for everyone, or the worst case, if it sorts using a comparator that just returns random().

Hi guys!
First of all, Meiguro, huge thanks for your work, awesome project! :+1:
JS is gradually becoming the programming language of the world over last years, and having ability to develop in JS for Pebble is priceless. Thank you again!
Well, of course nothing is perfect and here I think I fully back the eswak on the idea of making PebbleJS somehow work standalone unless it explicitly needs the phone access. Myself I am very interested in caching scenarios, since even 2K storage can quite easily store e.g. a dozen of notes or calendar events, which can be synced only rarely thus significantly prolonging the watch battery life. And the battery life is one of the best Pebble features...!
Are there any news or plans in this direction? I think transpiling JS to C is actually quite realistic, although of course involves a lot of work...


no-unused-prop-types sometimes fails to detect props in functions on stateless components

Here is a minimal example that triggers this:
const PagingBlock = function(props) {
  return (

       props.previousPage()}/>
       props.nextPage()}/>

 );
};

PagingBlock.propTypes = {
  nextPage: React.PropTypes.func.isRequired,
  previousPage: React.PropTypes.func.isRequired,
};

The error message is:
  18:17  error  'previousPage' PropType is defined but prop is never used  react/no-unused-prop-types

Notes:

Converting this to a React.createClass with static propTypes fixes the issue
Removing either  tag produces the correct lint error, the false error only occurs when both are present
The error is notified for the first tag (switching nextPage and previousPage inside the render function will make the error text say nextPage is defined but not used

cc @oliviakim95

Another test.
import React, { PropTypes } from 'react';
import './Button.css';
import Icon from '../Icons/Icon';
import cssClassPrefix from '../Styles/CSSClassPrefix';

const Button = props => (
  <button
    className={[`${cssClassPrefix}Button-${props.design}`]}
    type={props.type}
    disabled={props.disabled}
    onClick={() => props.onClick()}
    onFocus={() => props.onFocus()}
    onBlur={() => props.onBlur()}
    onMouseOver={() => props.onMouseOver()}
    onMouseOut={() => props.onMouseOut()}
  >
    {props.icon ? <Icon glyph={props.icon} /> : null }
    {props.value}
  </button>
  );

Button.displayName = 'Button';

Button.propTypes = {
  type: PropTypes.oneOf(['button', 'reset', 'submit']),
  design: PropTypes.oneOf(['filled', 'bordered', 'transparent']),
  icon: PropTypes.string,
  value: PropTypes.string,
  disabled: PropTypes.bool,
  onClick: PropTypes.func,
  onFocus: PropTypes.func,
  onBlur: PropTypes.func,
  onMouseOver: PropTypes.func,
  onMouseOut: PropTypes.func,
};

Button.defaultProps = {
  type: 'button',
  design: 'bordered',
  disabled: false,
}

export default Button;

Claims 4/5 of the on* function PropTypes aren't used, where the 5th is the last one.

this  bug also triggers when use ...props.
const PagingBlock = function(props) {
  return (
    <SomeChild {...props} />
 );
};

PagingBlock.propTypes = {
  nextPage: React.PropTypes.func.isRequired,
  previousPage: React.PropTypes.func.isRequired,
};

The error message is the same.
I think it should count all properties as used in this case.

Agreed.

Same issue...
export default function Content( { post } ) {
    const { title, author, body } = post;
    return (
        <Panel>

        </Panel>
    );
}

Content.propTypes = {
    post: PropTypes.shape( {
        title: PropTypes.string.isRequired,
        author: PropTypes.string.isRequired,
        body: PropTypes.string.isRequired,
    } ),
};

'post.title' PropType is defined but prop is never used (react/no-unused-prop-types) [javascript/eslint]
'post.author' PropType is defined but prop is never used (react/no-unused-prop-types) [javascript/eslint]
'post.body' PropType is defined but prop is never used (react/no-unused-prop-types) [javascript/eslint]

const FormInput = (props) => {
  const {
    input,
    type = "text",
    ...extraProps
  } = props;
  return (

       <input type={type} id={input.name} {...input} {...extraProps}/>

  );
};

FormInput.propTypes = {
  input: React.PropTypes.object.isRequired,
  required: React.PropTypes.bool,
  type: React.PropTypes.string
};

-> complains that required is unused even if it gets used through extraProps.

@xkr47 But it's not, though. How would Eslint know if it's not listed in the inline defaultProps literal or your return statement?

I think because extraProps is a rest arg, every prop in it should be marked as used (and it can be statically known in this  case).

I have a similar problem with PropTypes.shape.
MyComponent.propTypes = {
  error: PropTypes.shape({
    username: PropTypes.string,
    password: PropTypes.string,
  }),
}

And I pass error to the child component as a whole.
<MyChildComponent error={this.props.error} />
ESLint throws
error  'error.username' PropType is defined but prop is never used  react/no-unused-prop-types
error  'error.password' PropType is defined but prop is never used  react/no-unused-prop-types

Probably same issue...
import React, { PropTypes } from 'react';

export default function Article(props) {
    const {
        homepageThumb: {
            url: imageUrl,
            width: imageWidth,
            height: imageHeight
        }
    } = props;

    return (

    );
}

Article.propTypes = {
    homepageThumb: PropTypes.shape({
        url: PropTypes.string,
        width: PropTypes.number,
        height: PropTypes.number
    }).isRequired
};

  59:20  error    'thumbnail_images.homepage-thumb.width' PropType is defined but prop is never used   react/no-unused-prop-types
  60:21  error    'thumbnail_images.homepage-thumb.height' PropType is defined but prop is never used  react/no-unused-prop-types

I think I've figured out the source of this bug. Looking at @pfhayes example,
const PagingBlock = function(props) {
  return (

       props.previousPage()}/>
       props.nextPage()}/>

 );
};

PagingBlock.propTypes = {
  nextPage: React.PropTypes.func.isRequired,
  previousPage: React.PropTypes.func.isRequired,
};

It looks like when utils.getParentStatelessComponent() is called, the onClick ArrowFunctionExpression is returned instead of the PagingBlock function. In utils.getParentStatelessComponent() there is a regex test being performed on the Function keyword. This would return results for both FunctionExpression and ArrowFunctionExpression.
Need to find a way to differentiate between the two. I'll submit a PR if I can figure it out.

Still throws error when:
static propTypes = {
    data: React.PropTypes.arrayOf(React.PropTypes.any).isRequired,
};

static defaultProps = {
    data: [],
};

componentWillReceiveProps(nextProps) {
    this.state.data = nextProps.data; // Here ESLint do not see data prop
}

Yeah, for me usage of a prop only in componentWillReceiveProps also throws this linting error.

You both may want to open another issue for componentWillReceiveProps

@iegik  & @ahauser31 -
I ran into the same issue and found that if you destructure nextProps instead of using dot notation, the linting error is not thrown.
I also confirmed in this thread: https://github.com/yannickcr/eslint-plugin-react/issues/884#issuecomment-253903073

Still getting this in the most recent version of eslint-plugin-react in exactly the same code situation as the original example.

@geuis there are tests for the exact same code situation as the original example.
If you have a different example that is still failing, would be worth opening a new issue

Also failing to detect props being used in react lifecycle fucntions like
...
modalClosed: PropTypes.bool.isRequired

componentWillReceiveProps(nextProps) {
    if (nextProps.modalClosed) {
      this.props.router.goBack()
    }
  }

@wellingtonamaralleitao see #1232

I might do something wrong but this shows onItemClick propType not to be used:
import React from 'react';
import PropTypes from 'prop-types';

import './List.css';

function List(props) {
  return (

        I am a list
        {
          props.items.map(item =>
            (

              <button onClick={() => props.onItemClick(item.id)}>{item.title} {item.isAdded}
              </button>

),
          )
        }

  );
}

List.propTypes = {
  items: PropTypes.arrayOf(
    PropTypes.shape({
      id: PropTypes.number,
      title: PropTypes.string,
    }),
  ),
  onItemClick: PropTypes.func,
};
List.defaultProps = {
  items: [],
  onItemClick: null,
};
export default List;

@healqq looks legit. I'd recommend opening a new issue

export default class Users extends Component {

  static propTypes = {
    ...
    onLoad: PropTypes.func.isRequired,
  };

  async componentWillMount() {
    await Promise.all([
      this.props.onLoad(),
      this.onSearch(),
    ]);
    ...
  }

  ...

}

'onLoad' PropType is defined but prop is never used (react/no-unused-prop-types)

Using eslint-plugin-react v^7.14.3 still throw this error

Experiencing the same issue too. Giving me an error saying 'PropType is defined but prop is never used' when my props is being used within a function inside a functional component.

I have the same error too, I am passing a prop to a functional component and I define defaultProps so I can make sure it is always a function (it is not required prop) and it marks it as unused

I have the same error too with eslint-plugin-react v^7.19.0

How it was not fixed in 4 years??

@GorgeousPuree the issue is closed, so it's fixed. if someone still has this problem on the latest version, please file a new issue and I'll be happy to take a look.

@ljharb I'm sorry, pal, my bad. I've just mixed up this issue with another, which looks almost the same.

React.PropTypes is deprecated since 15.5.
I'm getting the same error, of unused but defined.
here's my code.
import PropTypes from "prop-types";

People.propTypes = {
  id: PropTypes.number,
  details: PropTypes.object,
  deleteFunc: PropTypes.func,
  importantFunc: PropTypes.func,
};

What am I doing wrong?

@shashwata27 theres no component in that code. Please file a new issue if you’re still having trouble.

@shashwata27 theres no component in that code. Please file a new issue if you’re still having trouble.

Check I updated the code above, should I make new issue?

Yes please; commenting on old closed issues is not an efficient way to get help.


LDAP search/reader user

Should be optional.
If not there, just bind as userdn passed in immediately to test success/failure on bind result.

This is very annoying: on my LDAP system accounts are not allowed so I have to configure my own credentials and every time I change my password the whole LDAP login goes down.
My system does not require credentials to perform authentication and the same should apply to Portainer...
Is there a workaround, like manually writing some setting in the configuration?

I'm facing the same problem on my Portainer installation. My company's LDAP server does not require a reader DN and can be queried anonymously directly.
As @rlogiacco mentions, it should be possible to configure a blank/empty reader DN/password in the settings and in this case skip reader DN binding entirely in blocks such as these:
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L95-L98
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L121-L124
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L177-L180
That shouldn't break existing behaviour and would support our very common LDAP use-case.
Thanks in advance for your consideration!

You can actually configure portainer and ldap without needing any reader dn or password.
I have an instance running connected to an ldap back end that supports anonymous access.
Rgds,
Neil Cresswell
On 30/11/2019, at 5:53 AM, Hugo Hromic<EMAIL_ADDRESS>wrote:

I'm facing the same problem on my Portainer installation. My company's LDAP server does not require a reader DN and can be queried anonymously directly.
As @rlogiaccohttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_rlogiacco&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=zK4LHFUq10Ah3nguxGRevys6SkRYbYge7tC6lFY6hRU&e= mentions, it should be possible to configure a blank/empty reader DN/password in the settings and in this case skip reader DN binding entirely in blocks such as these:
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L95-L98https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_portainer_portainer_blob_develop_api_ldap_ldap.go-23L95-2DL98&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=k2HBQvwiXHVJRII0y50qMJYAtqLpmDGZ2CY33GhEQF4&e=
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L121-L124https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_portainer_portainer_blob_develop_api_ldap_ldap.go-23L121-2DL124&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=lJ31evCSS2Jc0UXaCVoiYyLjwC2tCXMvakB7KrVEzFg&e=
https://github.com/portainer/portainer/blob/develop/api/ldap/ldap.go#L177-L180https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_portainer_portainer_blob_develop_api_ldap_ldap.go-23L177-2DL180&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=3LyZcRFkJTm6jcW_w0Xijf7BAOBVX8nPgRJwQ-bsxP4&e=
That shouldn't break existing behaviour and would support our very common LDAP use-case.
Thanks in advance for your consideration!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_portainer_portainer_issues_1118-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAFQ2XFJG4XVX5PZOMJUTLSTQWFCG5A5CNFSM4DWXEJ32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFPIRZY-23issuecomment-2D559843559&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=Pxe9Kb7B6u4bygADRgSHY_SjrnE46Z3C_aB_IfmG5qg&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AFQ2XFPR6ZNCS6DBLWTKRNDQWFCG5ANCNFSM4DWXEJ3Q&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=0fx0h4vB56iTLpw2McH1ZD6TqG_QGpbggVOB-PfMJpM&m=Tc3Y0nN-DOQhU9pqT7YCvP8n_pYVLQtyE551kXHj_g8&s=GeekultYcZI8P3Gt8GYizDO1x_AvIvUkA7Bdm1efbnw&e=.

Hi @ncresswell , thanks for your reply. Appreciated!
I did try leaving the ReaderDN and password settings empty and it didn't work for me. If I use my own credentials as the ReaderDN/password (as @rlogiacco said) then it works as expected. This is the only difference in settings that makes it work.
Can you share more specifically how you configured your LDAP settings in your instance for anonymous access? Maybe there is a bug then? I can help debug futher if necessary.

Hi again @ncresswell, I found out what is the problem now.
As you said, indeed when ReaderDN and Password are empty/blank, then anonymous LDAP access works as expected. The problem is that once you set a password for LDAP in Portainer, it is impossible to make it blank again, no matter if you leave the field empty in the UI.
In other words, if you do a fresh install of Portainer and never set an LDAP password, then anonymous access will work fine. However if you set a password once, you won't be able to ever make it empty again and thus anonymous access will stop working because Portainer will always send an empty ReaderDN with the last password entered instead of blank. This happens using both the Portainer UI and the Portainer API.
This is a bug imho and I managed to reproduce it now reliably. I will open a separate issue describing the problem and how to reproduce it. I think the solution is to find a way to clear the LDAP password if no longer required in the internal BoltDB storage of the settings.
Thanks anyway for the tip that made me investigate it further.

Closing this, as Portainer now supports anonymous LDAP

Thanks to @itsconquest and @hhromic along with anybody else who worked on fixing this!


Controls' gradient background is seen on mouseover even if no controls are enabled

[x] Issue does not already exist
[ ] Issue observed on https://plyr.io

Expected behaviour
If no controls are enabled at all, no gradient at the bottom to be shown on mouseover.
Actual behaviour
Even though you set no controls, there's still a gradient on the bottom of the video (where the controls should be) if you mouse over it.
Environment

Browser: Chrome
Version: 57
Operating System: macOS
Version: 10.12.4

Players affected:

[ ] HTML5 Video
[ ] HTML5 Audio
[x] YouTube
[x] Vimeo

Steps to reproduce

Set controls: [] as an option.
Mouseover on the video.

I'll add it my current work as I'm changing the controls.
Thanks
Sam

On 21 Apr 2017, at 7:14 am, Alejandro García Iglesias<EMAIL_ADDRESS>wrote:
Issue does not already exist
Issue observed on https://plyr.io
Expected behaviour
If no controls are enabled at all, no gradient at the bottom to be shown on mouseover.
Actual behaviour
Even though you set no controls, there's still a gradient on the bottom of the video (where the controls should be) if you mouse over it.
Environment
Browser: Chrome
Version: 57
Operating System: macOS
Version: 10.12.4
Players affected:
HTML5 Video
HTML5 Audio
YouTube
Vimeo
Steps to reproduce
Set controls: [] as an option.
Mouseover on the video.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

This is a duplicate so I'll close it - will track via the other issue 👍


Represent font face as a combo box in SUI

Summary of the Pull Request
This replaces the Profiles > Font Face text box with a combo box.
References
#6800 - Settings UI Epic
Detailed Description of the Pull Request / Additional comments

Enumerating the fonts

This doc was the main reference used to enumerate the fonts. It was mildly adapted to use WinRT instead of WRL.

Updating the UI

Similar to other combo box settings, Profiles keeps a reference to the current value. We use that as a way to update the settings model. If an invalid value is used, we fallback to Cascadia Mono.

Demo

Some questions for the room:

What should I do if loading the fonts fails? I don't have a "retry" operation anywhere, but I also don't know when we should do that.
I need @miniksa's help to determine how to identify a monospace font here.
After we can identify monospace fonts, what should we do here? I think we should completely filter the list to monospace fonts tbh. If you want a non-monospace font, you need to update the json.

With this proposed approach, if the user has a monospaced font selected, maybe I could just set the combobox as "custom" or something? Or create an item for the non-monospaced font? (this should be a rare case)

With this proposed approach, if the user has a monospaced font selected, maybe I could just set the combobox as "custom" or something? Or create an item for the non-monospaced font? (this should be a rare case)

IMO, if the user has Papyrus in their settings, then we should add that one in the combobox, along with the other monospace fonts. They can see clearly that Papyrus is selected, and they can keep that selection, or pick a sane, monospace one.

@msftbot make sure @miniksa signs off

If it were an Editable ComboBox, that makes it the best of both worlds.
You could also present a text warning, if the FontName read from the JSON, does not match a font available to use.


feat(config): add parameters for new Zooz ZEN72/74/77 firmwares, fix ZEN05 param 1

Revised https://github.com/zwave-js/node-zwave-js/pull/5156.
Partially addresses issue https://github.com/zwave-js/node-zwave-js/issues/4786
Added parameter 27, 28, 29 to zen77.
Added parameter 30 to zen72, zen74 and zen77 hardware v1.
Fix zooz zen05 param 1 https://github.com/zwave-js/node-zwave-js/issues/5248
Still no resolution for hardware versions where firmware drops below version 10.x (i.e. version 2.0, 3.0) differentiation see https://github.com/zwave-js/node-zwave-js/issues/5248 and https://github.com/zwave-js/node-zwave-js/pull/5244
But still provides updated configurations for zooz devices where firmware versions don't decrease vs. increase.
fixes: #4786
fixes: #5248

yay! Thansk @alvinchen1 and @AlCalzone !


feat: add the cairo runner

In order to run the first cairo program, the cairo runner structure is needed. This runner takes care of setting up the the program and execution segments, setting the start values for pc, ap and fp.

@lana-shanghai would love to pick this up over the weekend :)

Please do! :)

Please sync with @jobez to make sure you guys do not do any duplicate work! :)

i read this issue as a duplicate of this: https://github.com/keep-starknet-strange/cairo-zig/issues/12

Yes this was raised by Lana :) I was just searching in the issues and the code and couldn't find a reference to the runner, so that's why I added this, we can close if you prefer?

sgtm, j't'apprecie. des temps il y a un issue que etais deja vu et c'est vraim d'accord. oui?

sgtm, j't'apprecie. des temps il y a un issue que etais deja vu et c'est vraim d'accord. oui?

oui oui bagette