Add envFrom values to Gateway helm chart

Please provide a description of this PR:
Adds an optional field to support loading all required envs directly from Kubernetes secrets or configmaps
See also:

https://github.com/istio/istio/issues/42860

What is the usecase? This seems fairly niche, may be suited for https://istio.io/latest/docs/setup/additional-setup/customize-installation-helm/

What is the usecase? This seems fairly niche, may be suited for https://istio.io/latest/docs/setup/additional-setup/customize-installation-helm/

I agree it is niche, but the main use case reported in the issue was to safely pass env vars from Kubernetes secret.
Let me get back to the reporter, if the advanced helm chart configuration will also solve this issue.

It would be useful to know what env var they are trying to set

WasmPlugin gives you the option to set configuration using pluginConfig and vmConfig. If you want to pass on secrets
(like JWT keys) you have to use environment variables from the host. We need to pass env variables from Kubernetes secrets generated by the secret manager.

@kyessenov @ingwonsong are there better approaches to secrets for WASM?

@kyessenov @ingwonsong are there better approaches to secrets for WASM?

one of the approaches would be to extend Wasm API for supporting Secret from https://istio.io/latest/docs/reference/config/proxy_extensions/wasm-plugin/#EnvVar

There's nothing specific to secrets in Wasm. Using env variables seems reasonable to establish workload identity.

@cnvergence: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
a62f2b3b9d67bde53141601e69d36c193d9e2d70
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@cnvergence: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
a62f2b3b9d67bde53141601e69d36c193d9e2d70
link
true
/test lint

integ-cni_istio
a62f2b3b9d67bde53141601e69d36c193d9e2d70
link
true
/test integ-cni

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@cnvergence: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-cni_istio
a62f2b3b9d67bde53141601e69d36c193d9e2d70
link
true
/test integ-cni

lint_istio
a62f2b3b9d67bde53141601e69d36c193d9e2d70
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@cnvergence: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
cd1a053a2f2a094e0983292a6a24938305a33f8b
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@cnvergence: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
cd1a053a2f2a094e0983292a6a24938305a33f8b
link
true
/test lint

unit-tests_istio
cd1a053a2f2a094e0983292a6a24938305a33f8b
link
true
/test unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest-required

@howardjohn I think for this use case, this is still valid
PTAL: https://github.com/istio/istio/issues/42860#issuecomment-1404979716

No-one needs injecting secrets on a gateway level (or WasmPlugins)? Isn't moving authorization/authentication layer to the gateway a common use case? How people are managing secrets needed by WasmPlugin, using kustomize as post processing tool? Actually I think it feels like a common use case - one of the best use cases if you don't want to manage additional api gateways like kong, tyk or krakend.

@cnvergence: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

integ-ambient_istio
cd1a053a2f2a094e0983292a6a24938305a33f8b
link
true
/test integ-ambient

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Loads of tests

For a study thesis, we should add a lot of testing (to the actual work, #34 deals with the JS tests)

If we don't have many more tests, we should at least explain why:

Our base layer is TomP2P
Therefore, a "unit test" involves TomP2P. Mocking TomP2P away would be hard.
Therefore, writing tests involves setup and can fail for unforeseen reasons

Mentioned and ok


NC oddities?

Perhaps not a coding issue at all, but does anyone have an explanation for the perfect 50.0% - 50.0% vote tallies for North Caroliona?  It seems unlikely that new votes would break so precisely and so consistently.  Also, some voting blocks have odd numbers of votes, but still 50.0% allocation to each candidate.  How is that possible?

I don't think we do, no. It's very hard to speculate without knowing more about the procedures that NC is using for counting.

Please note that the numbers of votes for both did not change. Only the remaining votes (est.) changed. (To me looks like they removed some non-valid votes/mails and did not post updated figures of already-processed votes)

I'm just puzzled why the vote differential did not wobble even a single vote (up or down) when new blocks with odd numbers are split ~50-50?

Block Breakdown calculation probably needs a few more conditions.

Best guess is: they need to "N/A" block breakdowns when there are decreases in vote remaining not just increases.

Got it.  If these updates are not new votes being added, but instead alterations to the estimated # of votes remaining, then the breakdowns now make sense.  It was not clear from these tables that the total # votes counted had not changed.


Initializing problem

Just installed this plugin but can't get it working.
[4/30/2020, 3:20:39 AM] Loaded config.json with 0 accessories and 1 platforms.
[4/30/2020, 3:20:39 AM] ---
[4/30/2020, 3:20:40 AM] Loaded plugin: homebridge-loxone-ws
homebridge API version: 2.5
[4/30/2020, 3:20:40 AM] Registering platform 'homebridge-loxone-ws.LoxoneWs'
[4/30/2020, 3:20:40 AM] ---
[4/30/2020, 3:20:40 AM] Loading 1 platforms...
[4/30/2020, 3:20:40 AM] [Loxone] Initializing LoxoneWs platform...
[4/30/2020, 3:20:40 AM] [Loxone] Info: rooms array not configured. Adding every room.
[4/30/2020, 3:20:40 AM] [Loxone] object
New WS: <IP_ADDRESS>:80
[4/30/2020, 3:20:40 AM] [Loxone] Platform - Waiting 8 seconds until initial state is retrieved via WebSocket.
[4/30/2020, 3:20:40 AM] [Loxone] LOXONE WS: connect
[4/30/2020, 3:20:48 AM] [Loxone] Platform - Retrieving initial config from<EMAIL_ADDRESS>[4/30/2020, 3:20:48 AM] [Loxone] Platform - The widget 'Kerstboom in Living' of type Meter is an item not handled.
[4/30/2020, 3:20:48 AM] [Loxone] Platform - The widget 'Lichtsturing in Living' of type LightControllerV2 is an item not handled.
[4/30/2020, 3:20:48 AM] [Loxone] Platform - The widget 'Master helderheid of Lichtsturing in Living' of type Dimmer was skipped.
[4/30/2020, 3:20:48 AM] TypeError: Class constructor PlatformAccessory cannot be invoked without 'new'
    at LightbulbItem.AbstractItem (/usr/local/lib/node_modules/homebridge-loxone-ws/items/AbstractItem.js:22:25)
    at LightbulbItem.SwitchItem (/usr/local/lib/node_modules/homebridge-loxone-ws/items/SwitchItem.js:12:23)
    at new LightbulbItem (/usr/local/lib/node_modules/homebridge-loxone-ws/items/LightbulbItem.js:6:26)
    at exports.Factory.parseSitemap (/usr/local/lib/node_modules/homebridge-loxone-ws/libs/ItemFactory.js:66:29)
    at Request._callback (/usr/local/lib/node_modules/homebridge-loxone-ws/index.js:88:38)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/request/request.js:185:22)
    at Request.emit (events.js:316:20)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:316:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/request/request.js:1076:12)
[4/30/2020, 3:20:48 AM] Got SIGTERM, shutting down Homebridge...

duplicates https://github.com/Sroose/homebridge-loxone-ws/issues/51


Benchmarks

Both to help direct development, and to show the performance of the code to users, there should be benchmarks.
These benchmarks need to be runnable from node.js. We will need to keep track of:
the hardware it's running on
the OS
the node/iojs version
the software vector implementation we are testing
the resulting time taken
Is there an existing benchmark module we should be using? Otherwise I'll write some code that will take these measurements and log them.

https://github.com/mateogianolio/vectorious/blob/master/benchmarks/Vector/suite.js runs a Vector benchmarks multiple times. Much of the time is spent starting instances of iojs. It produces the total measurement in s, measured with high precision (to the nanosecond), after the set of benchmarks has completed.


Separate PSR-7 implementation into own component

This will be ONLY the PSR-7 methods and nothing more.

Any reason why not reusing Zend Diactoros? That would be less things to maintain

The main reason is that we think that for a robust ecosystem there should be more components implementing the PSR than just one.

Slim 4 uses Slim-Http.


Lock detection

detect lock and transfer open-loop

detection available in closed-loop to count up when BEMF is not match to feedBackConstant


Search not working with older wiki data

After loading a wiki that was running MW 1.31 and an old version of CirrusSearch into a MW created with meza rhel8-35.x branch, searches fail with the following error:
An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later.
Research and resolve.

Not sure what this was all about, but I started from a clean VM and meza install, restored wiki backups, and didn't have this issue. Resolving for now and will re-open if the problem recurs.


"app is not defined" error

When I try to run this plugin on android, I get the error "app is not defined" from line 7 in https://github.com/bazzite/nativescript-vibrate/blame/develop/src/vibrate.android.ts
Am I missing something?

Fixed it by doing platform remove android and platform add android as per documentation, but the issue, https://github.com/NativeScript/nativescript-cli/issues/669, that's referred to has long been fixed.
Additionally, the docs say the permission is automatically added, but it isn't

@Burgov Those issues were fixed in the version 2.0.1.


Node WA skill parents have a stack overflow exception when writing to stroage accounts

Describe the bug
Currently the parent bot throws circular JSON reference error when attempting to write bot state to storage when using skills.
Version
Version:  2.0.0-nightly.246099.8fa93
Electron: 8.2.4
Chrome: 80.0.3987.165
NodeJS: 12.13.0
V8: 8.0.426.27-electron.0
Browser

[x] Electron distribution
[ ] Chrome
[ ] Safari
[ ] Firefox
[ ] Edge

OS

[ ] macOS
[x] Windows
[ ] Ubuntu

To Reproduce
Steps to reproduce the behavior:

Create a node web app bot with an echo trigger and dialog
create provision and skill manifest
create a node wa parent and provision (make sure you include cosmosdb in the provision)
update the appsettings of the parent to use cosmosDB
Add the skill as a local bot and wire it up
Launch the bots and send a message to the parent to trigger the skill

Expected behavior
Storage (CosmosDB and blob have been confirmed broken)
Screenshots

Additional context
Josh G and I have already done some initial digging, here's what we know.
It's unclear if the issue is in the SDK, Composer, Cosmos, skills specifically, or some combination of all of the above. It's less likely the issue is entirely with Cosmos since the odds that 0 customers are using JS and Cosmos is effectively 0%.
Here's the error:
[onTurnError] unhandled error { TypeError: [Maximum nesting depth of 127 exceeded. This is most likely caused by recursive component dialogs. Try reworking your dialog code to make sure it does not keep dialogs on the stack that it's not using. For example, consider using replaceDialog instead of beginDialog.] Converting circular structure to JSONat JSON.stringify ()at javaScriptFriendlyJSONStringify (C:\home\site\wwwroot\node_modules@azure\cosmos\dist\index.js:7250:17)at bodyFromData (C:\home\site\wwwroot\node_modules@azure\cosmos\dist\index.js:7257:16)at C:\home\site\wwwroot\node_modules@azure\cosmos\dist\index.js:7920:35at Generator.next ()at C:\home\site\wwwroot\node_modules@azure\cosmos\node_modules\tslib\tslib.js:117:75at new Promise ()at Object.__awaiter (C:\home\site\wwwroot\node_modules@azure\cosmos\node_modules\tslib\tslib.js:113:16)
at request (C:\home\site\wwwroot\node_modules@azure\cosmos\dist\index.js:7918:18)at C:\home\site\wwwroot\node_modules@azure\cosmos\dist\index.js:7220:20name: 'DialogContextError',message:'[Maximum nesting depth of 127 exceeded. This is most likely caused by recursive component dialogs. Try reworking your dialog code to make sure it does not keep dialogs on the stack that it's not using. For example, consider using replaceDialog instead of beginDialog.] Converting circular structure to JSON',dialogContext:{ activeDialog:'BeginSkill['=settings.skill['nodeEchoWa517'].msAppId','']',parent: 'NodeWAParent517',stack: [ [Object], [Object] ] } }
Exception caught in sendErrorMessage Error: Error "Converting circular structure to JSON" occurred in serializing the payload - "Activity".at serializeRequestBody (C:\home\site\wwwroot\node_modules@azure\ms-rest-js\dist\msRest.node.js:3564:19)at ConnectorClient.ServiceClient.sendOperationRequest (C:\home\site\wwwroot\node_modules@azure\ms-rest-js\dist\msRest.node.js:3518:13)at Conversations.replyToActivity (C:\home\site\wwwroot\node_modules\botframework-connector\lib\connectorApi\operations\conversations.js:54:28)
at CoreBotAdapter. (C:\home\site\wwwroot\node_modules\botbuilder\lib\botFrameworkAdapter.js:845:71)at Generator.next ()at C:\home\site\wwwroot\node_modules\botbuilder\lib\botFrameworkAdapter.js:15:71at new Promise ()at __awaiter (C:\home\site\wwwroot\node_modules\botbuilder\lib\botFrameworkAdapter.js:11:12)at CoreBotAdapter.sendActivities (C:\home\site\wwwroot\node_modules\botbuilder\lib\botFrameworkAdapter.js:812:16)at Proxy. (C:\home\site\wwwroot\node_modules\botbuilder-core\lib\turnContext.js:377:54)

This was a fun one! There were two very subtle cases of JSON serialization cycles.

The app insights telemetry client (not the null telemetry client) fails JSON.stringify with a cycle error once you've tracked an event (it must hold references to tracked events, thus introducing a cycle). Generally not a problem, but it is included in trace events (via options) which are serialized
CosmosDbPartitionedStorage fails JSON.stringify with a cycle error after initialization (this.client), which is problematic because it is included in dialog state by the begin skill action (via conversationState) which is serialized

The "simple" fix is to write custom toJSON methods for these types that yield a simplified object when serialized. I've verified this fix works locally. We never attempt to "revive" these types after serialization, so I can't think of a reason this would be problematic.

Shiproom - approved.  need to get a 4.13.3 patch for JS SDK.  Need to understand the NBT implications and whether we need to cut RC14 of these

Should be resolved with 4.13.4

Shiproom - fix was verified with 4.13.4 release


user feedback, describing chromosomal location in gene page "top matter"

I, 3650640-3653435 (2796nt) coding start to stop
In fact, the gene is on the opposite strand, so it seems to me that it should read:
I, 3650640-3653435 (2796nt) coding stop to start

transfered to
https://github.com/pombase/website/issues/657

Do we agree that this text switch should be made for reverse strand?
It's 'kind of' obvious if the numbers go down and not up, but  I see the point when you are comparing 2 long integers side -by -side that it's just easier if it tells you clearly  the direction....I have no idea if there is a convention for this though....

It would be great if anyone has any wisdom on this before we chat, so that we don't need to discuss. I  lean towards the change.... so if there is a reason NOT to do this, let me know...

My unhelpful comment is: I've never really liked the text "coding start to stop".
I'd kind of prefer it to say "coding region".

I think we changed to "coding start to coding stop" for a reason. Were people getting confused that this referred to the genomic start and stop  and they found this confusing in a "spliced" coding region, although you are absolutely correct it should be "coding region".
If this is  8less* confusing we could switch back. It s would be good to link to the history if anyone remembers...

I think this is the older discussion: #59

Action
flip so that number order matches start to stop
do the same for the UTRs so that they are the same way around as each other

flip so that number order matches start to stop

I've now done that.

do the same for the UTRs so that they are the same way around as each other

When I checked, the UTR numbers were in the correct order already.  I just needed to swap the CDS start and stop.
I'm going to close this.  I hope that was all that was needed.

ValWood added the announce label 10 days ago

Sorry, I missed that bit.  I'll re-open.


Warn when things are unnecessarily monadic

I occasionally see Haskell newbies write functions like addFive x = return (x + 5). Is there a way we can add a hint that can catch functions that wrap their result in a pure or return but aren't actually doing anything monadic (or applicative)?

On reflection, I think I've been convinced this is something beginners do. There's no nice and easy fix, but maybe that's just because we're going after things that are more fundamental. I think I'd be inclined to allow this and and make it on by default.
Duplication hints have still been pretty useless, but maybe that's not what this is.

I also support the idea that newcomers do this somewhat regularly - in particular I have experience with students writing their Haskell coursework with a lot of places where the only "IO" is pure/return.

Ok, patches welcome then. Shouldn't be too hard :)

I'm interested in working on this, what's the criteria for raising a hint? Is it enough to check if pure/return are being used locally without any monadic computation?

Hey @iambrj - not totally sure what the heuristics should be. My guess is:
foo x y z = return (any expression)

Should definitely warn. As should pure instead. As should $` instead of brackets around the expression. How much we go beyond that is up to you/us.

@ndmitchell Where do you reckon this hint should be placed? afaiu you can't use the Match mechanism for this(?)

Special hint, custom written. My guess is Monad.hs is the most sensible location.

Since the fix for this was reverted, can it be reopened?


Popup background issue with windows phone in IE

Hello,
In windows phone I am facing issue with popup background once it's gets loaded. I have attached screenshots for reference which I took for both scenario i.e. working and not working from 'http://dimsemenov.com/plugins/magnific-popup/' site only.
Please check this and provide your feedback/solution for it.
Thanks In Advance.
Avinash Patil

Hi Dmitry,
Have you got time to look into this issue, please check and let us know your thoughts.
Thanks Again!
Avinash Patil


aes-crypto missing from Maven Central

Added mavenCentral() to the build.gradle file and added the dependency to app/build.gradle, but aes-crypto is not available.  Tried "0.0.1", "0.+", and "1.+" (to match your most recent release).

I'm having the same issue

Yes same for me.

how to see the recent release？

Until this issue is solved I've created jitpack build here: (https://jitpack.io/#pbochenski/java-aes-crypto/v1.1)

I've released version 1.1.0 of this library that includes Jitpack-hosted Maven installation instructions. See the updated README for the details.


Move aria specific combobox props out of base type

There are some props that aren't used by stately in ComboBoxProps, which can be confusing for users to know where to pass props: to useComboBoxState or useComboBox.
For example:
https://github.com/adobe/react-spectrum/blob/34717616f3a6555d3f4d6739635d3ac347b50a58/packages/%40react-types/combobox/src/index.d.ts#L41-L43
should move to Aria specific props (and also be included in the Spectrum types). We will need to create a new AriaComboBoxProps in that file with those props and extend in SpectrumComboBoxProps.
cc @arackaf

I am taking a look at this issue!


Update lazy loading SPEC history

This started from input by @rkern on https://discuss.scientific-python.org/t/spec-1-lazy-loading-for-submodules/25/7
It also now includes updates to the authors list, and updates the text to match the scikit-image implementation at https://github.com/scikit-image/scikit-image/pull/5101

I'm thinking about how lazy-loading impacts other libraries/packages or even the user's other code. There are two cases:

we use lazy-loading within a library to let the user avoid having to import sub-packages of the library.
we use lazy-loading for optional dependencies of the library.

For the first, another library may import our library and use some sub-packages which complete the load process. This seems to be handled well in the sense that the object is looked up via a universal attribute obtained using sys.modules["module"].__getattr__ (if I understand this correctly). So, when the lazy load is completed, it is available to any other reference to the library.  I guess if someone tries to import the sub-package directly, they will use syntax which looks up the sub-package as an attribute of the larger library object -- just as needed.
For the second case, let me call the optional dependency numpy and the library that lazily imports it networkx.  Then a user may import numpy separately from importing networkx. If the user imports numpy before networkx, all is good... no lazy-loading is done. But if the import of numpy occurs after importing networkx confusion could arise. The numpy import will find "numpy" in sys.modules and consider that module placeholder as the full numpy object. If numpy is not installed, an error to that effect will occur at the first point in the user's code where they use numpy (instead of when they import it). That could cause confusion because the code (other than importing networkx) doesn't involve lazy-loading at all. The NetworkX lazy-load shifts the loading of the user's direct import of numpy from the time of import to the time of use.
Perhaps we need to reconfigure the lazy-load of optional libraries so that it doesn't touch sys.modules until the lazy load is needed.   Could we avoid loading "numpy" into sys.modules during the import of networkx? Maybe by storing the "lazy-numpy" object in the networkx sub-module rather than on sys.modules. external import and use of numpy will behave as normal. Checking for the presence of "numpy" in sys.modules should occur at the lazy-load, and (if it wasn't there the first time) again when networkx first uses numpy.  Upon first use, the lazy-numpy object should check if "numpy" has been added to sys.modules and if so, use it. Otherwise actually do the import and put the imported object into sys.modules to be available to all other parts of the user's code.

The scope of this SPEC is only about case 1, not 2.

This PR extends the spec from simply lazy.install_lazy to also include lazy.load.  I would be fine making the load feature a separate spec if needed, but they are certainly related.
I do have another question: What does the name install_lazy refer to? Are we installing anything? Or maybe this refers to the imports done while someone installs our library? I'm not saying we shouldn't call it install_lazy, I just don't understand the meaning of install in this setting.  In the grand scheme of things, the function seems to provide a package-wide organization of import timing for lazily imported subpackages. Is there another way to frame this goal that aligns with install_lazy?   Would something like lazy_submodules be a better name, or lazy_import_organization?

Sorry, didn't see that. This PR seems to have drifted in scope.

Thanks for bringing that up, @dschult.  I think the skimage PR is indeed a bit wider than the SPEC, so let's handle the proxy-module insertion into sys.modules there.
There's been some discussion around naming, and there's no firm agreement on feels intuitive.  Currently, the function that hooks all the imports into place is called lazy.attach.

(I've updated the SPEC to match the naming used in the PR now.)


Set @typespec/compiler as a peerDependency in library templates

As specified in the documentation:

Use peerDependencies for all TypeSpec libraries (and the compiler) that you use in your own library or emitter.

@microsoft-github-policy-service agree company=“Pinterest"

/azp run typespec - pr tools

All changed packages have been documented.

:white_check_mark: @typespec/compiler

Show changes
@typespec/compiler - internal ✏

Set @typespec/compiler as a peerDependency in library templates

@microsoft-github-policy-service agree company=“Pinterest"

Hey @sarangan12 , can we merge this?


Webpack 4.0 does not support tree shaking for 3rd party libraries

Version:
cra@next latest code.
Repo:
Run source-map-explorer on source map for a simple es6 import and finds the entire module bundled.
Tested:
import { Button } from '@material-ui/core/es';
import { add } from 'ramda/es';
import { map } from 'lodash-es';

I've found in ramda's case disabling the vendor chunk splitting somehow made tree shaking work, but has no effect in the other two cases (material/lodash-es).
// Automatically split vendor and commons
    // https://twitter.com/wSokra/status/969633336732905474
    // https://medium.com/webpack/webpack-4-code-splitting-chunk-graph-and-the-splitchunks-optimization-be739a861366
    splitChunks: {
      chunks: 'all',
      name: 'vendors',
    },

Looks like it only afffects a single module (ramda).  Gonna close this for now and test later.

I believe it looks for the key side-effects in package.json.


Greetings from competitor

Hi guys. Sorry for off topic. I’ve found your lib on Reddit and wanted to say hello from my library
I think creating UI libs is a most entertaining front end task. Cheers.

Looks like a great library, I like it. I keep it on there even that indeed is an off topic. Maybe someone will find it useful as well.

It looks like a great library, I like it. I keep it on there even though it is offtopic. Maybe someone will find it useful as well.

Thanks. I think, we can cooperate somehow. Not merging libs, of course. We are using different approaches, but maybe share experience.


Switch to using the 'raw' binding in guides

The guides, especially the PMO guide, had some use of the
prop:from="'String value'" binding. This PR switches it to use
prop:raw="String value" instead. Closes #1087

Coverage remained the same at 96.067% when pulling 99c1472b36ca1c48cccbe73e4d11e0d5f148b4b7 on raw into 895ac366b34f38adc328b700cea5884058316d49 on master.


compiler bug as reported in the console (icr)

I have defined some settings in Amber (config/environments/development.yml)
secrets:
  rabbitmq_host: localhost
  rabbitmq_username: crawler
  rabbitmq_password: password

The following command results in a compiler error
typeof(Amber.settings.secrets)

`icr(0.25.1) > typeof(Amber.settings.secrets)
Module validation failed: PHI node operands are not the same type as the result!
  %24 = phi i32 [ 0, %nil4 ], [ %23, %not_nil5 ]
 (Exception)
  from Crystal::CodeGenVisitor#finish:Nil
  from Crystal::Compiler#codegen<Crystal::Program, Crystal::ASTNode+, Array(Crystal::Compiler::Source), String>:(Tuple(Array(Crystal::Compiler::CompilationUnit), Array(String)) | Nil)
  from Crystal::Compiler#compile<Array(Crystal::Compiler::Source), String>:Crystal::Compiler::Result
  from Crystal::Command#run_command<Bool>:Nil
  from Crystal::Command#run:(Bool | Crystal::Compiler::Result | Nil)
  from main
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues`

Crystal version
Crystal 0.25.1 (2018-06-30)
LLVM: 5.0.2
Default target: x86_64-apple-macosx
Amber CLI (amberframework.org) - v0.8.0

I can't reproduce, is this fixed? If not, can you provide a git repo of the exact files which trigger this.


implement integration testing and CI/CD

As suggested, there should be some kind of testing and CI/CD. My approach is to setup a kafka docker image and write a bunch of tests, like what kafkacat does.
For CI/CD, I have little experiences on them, but it should not be hard once we have docker-based tests.

Why not use Github Actions?

It looks like the github actions workflow didn't run well. I would like to draft a pr to fix it :)

@qiujiangkun Hi, please place a branch protection rule, and add tests into the checks. So that every pr would be required to pass the CI before merging.

I set up such rules

Thanks for your quick response! Let me fix the CI.


Add support for controlling the start of a marker

Closes GH-4.

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master     #6   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           1      1
  Lines         121    120    -1
=====================================
- Hits          121    120    -1

Impacted Files
Coverage Δ

index.js
100% <100%> (ø)
:arrow_up:

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 785303b...1d5db50. Read the comment docs.


Ensure consistent project and nuget versions across repo

Should be 16.0?
MRT's *.vxcproj say 15.0 but everything else in Reunion says 16.0

Originally posted by @DrusTheAxe in https://github.com/microsoft/ProjectReunion/pull/444#discussion_r575502195
The ES should have some sort of check that ensures we're being consistent in the tools we're using.

See Incorrect WindowsTargetPlatform[Min]Version in *.vcxproj #445 for more details

@huichen123, do you have an issue to address the VS version in your project file?

Assigning to @BenJKuhn to get into the ES backlog.

It should be ok to update MRTCore VS version and WindowsTargetPlatform[Min]Version.

There are a number of different "version" aspects that this could cover. Most version considerations have been either consolidated, simplified away, or moved to management by Maestro at this point, so I'm closing out this issue.


Errors messages aren't rendered with html_safe anymore

Hi, sometimes I need to put some html to error messages:

In 3.0.2 that worked, in 3.1.0 it doesn't.

Hi, this was a security change. If you trust the hint content you can mark it as html safe. You can find more info here

Hi, ok, thanks, but I don't see how do I render my error messages, defined in en.yml with html_safe?

I believe simple form should not do anything like that, if developers allow users to pass labels – ok, it is their pain to escape them properly. But why escaping validation errors? It seems like a regression to me, you took care about those 0.1% of rare cases when users can pass html content and left 99% of simple form users without a solution.

@heaven If your error is something like this:
errors.add :invalid, "#{name} is invalid"
# or

errors.add :invalid, name: name

en:
  ...
    invalid: "%{name} is invalid"

And we just html safe whatever is in the error, we are opening your application to XSS because name could be anything, if the user can change this field. We prefer to play on the safe side here.
If you need the html portion in your form, and you're pretty sure there's no harm on it, you can pass the error by yourself on these rare cases as well:
f.input :zomg, error: f.object.errors[:zomg].first.try(:html_safe)

Or something like that. If you want that functionality back you could monkey patch Simple Form in your app, for example rewriting this method, and mark all errors as html safe back again - but now it's up to you to check if you have or not a case like I mentioned above.
It's all about being a bit more secure, unfortunately there are bad people out there, and we have to play on the safe side.
Thanks.

real code from a working application:
f.input :license_number, error: error_sub(f, :license_number, /sign in(?=\?\Z)/, link_to('sign in', new_session_url, remote: request.xhr?))

and in a helper:
  def error_sub(form, field, re, html)
    err_str = form.object.errors[field].first
    return nil unless err_str.present?
    new_err = ERB::Util.html_escape(err_str).gsub(re, html)
    new_err.html_safe
  end

Now I can use "%{value} is already registered. Did you want to sign in?" as error string with correct safe escaping of user input, but not of my link. The regular expression is anchored exactly where I want it with a positive lookahead assertion, in case some funny person submits "sign in" as input data.
Downside: now the view is coupled to the i18n.

why it can't be resolved by marking key from locale as in rails http://guides.rubyonrails.org/i18n.html#using-safe-html-translations?


webpack modern-legacy-config, partial html is not valid as template

We have use case where supplied html is not full html, but just a a partial that is used in server to construct full html.
webpack build does not work with this format right now, I haven't checked it for rollup

Are you passing this partial to the index-html plugin?

@bennypowers updated title, I passing a path to input property for config

We parse the HTML in order to inject elements into it. In what sense is your HTML partial? Is it still valid HTML?

it is valid html, but woithou html, body or head tags like
<x-component></x-component>
<script type="module" src="./my-component.js"></script>

That's an interesting use case...
Are you expecting polyfills etc. to be injected here, or do you just need a bundled JS output?

Yes, I need polyfills too
Can I do so by providing a template to index html plugin configuration?

Yep, then providing the template should work out. Let me know if it works for you.

Closing this as there is no actionable item. Providing the template manually should work here.


[Modules] Change private modules rules and warnings

We used to advertise private modules to be declared as submodules
(Foo.Private). This has proven to not scale well since private headers
might carry several dependencies, introducing unwanted content into the
main module and often causing dep cycles.
Change the canonical way to name it to Foo_Private, forcing private
modules as top level ones, and provide warnings under -Wprivate-module
to suggest fixes for other private naming. Update documentation to
reflect that.
-Wprivate-module is now ignored by default (allowing time for transition
from Foo.Private without breaking all users) and is checked for before
emitting the diagnostics.
rdar://problem/31173501

@swift-ci please test

@jrose-apple updates with the requested additional tests

Ah, specifically we wanted @import A.Private to be able to find A_Private, right? I don't see a test for that.

@jrose-apple right, but this isn't implemented in this PR, this is "remove old warning behavior and enforce new policy" part of the work.
Remaping A.private to A_Private in case the former doesn't match anything should come next.


progressbar: fix regression with hidden bars

The documentation of the progress bar states that the progress bar will output only the label of the bar if it is outputting to a file that is not a tty. However, this was broken a few versions ago, without the documentation being adjusted, and even a test added.
Restore this behaviour so we follow the documentation again, and adjust the test to match. Fixes #1138.

When/where was it removed? Why was it removed?

It was removed somewhere between versions 6.7 and 7.0, as it works in 6.7 but doesn't in 7.0.
It appears to not have been removed on purpose, as git log 6.7...7.0 click/_termui_impl.py does not show any commits that mention removing this. It was likely a regression introduced by one of the refactorings.
I'd also argue that even if it was removed on purpose, it should still be kept, since 1. the docs outline this behaviour, 2. if you have a script running in the background that hangs during something that has a progress bar, it would probably be nice to know that it entered that progress bar at some point.

git bisect points to 61266619cb201accdba6392a4809d3e70cac2b5c as the first bad commit.

The PR was #863.

Looking over the discussion again, it's less obvious that this should move forward as stated.
The use case, as I understand it, is having cmd-with-progressbar | parse-output-cmd work nicely without the progressbar interfering.
One way or another, the docs don't currently match the behavior.
If we change the behavior back and call this a "bug" in 7.0, things cohere well. If we change the documentation to reflect the new behavior and say this was an intentional behavior change between 6.x and 7.x, that holds together too.
The original change proposed in #863, writing to stderr instead of stdout, seems best.
That satisfies both use cases nicely. If you're running some background process, you should be collecting stderr, and if you pipe to another command, you only want to read stdout.
Command authors can easily enough add curl-style -s/--silent options -- the only thing at stake is what is the best "sane default" for the built-in progressbar.
But now I'm proposing even more changes in behavior, different from what it did in 6.x or 7.0, and I'm really really not sure that's a good idea.

I think restoring the behavior makes sense, this PR seems fine. I think the stderr default also makes sense, but I'm hesitant to change it at this point, especially since I'm trying to stop making changes to our progress bar and point users to tqdm for anything beyond basic tasks.


Add image ext in filename matching

Motivation and context

Fixes filename matching after Datumaro update 1.5 (no affected CVAT releases)

Fixes a problem with intermediate dots in imported filenames, that were considered as extension separators

How has this been tested?

Checklist

[ ] I submit my changes into the develop branch
[ ] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[ ] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[ ] I have updated the license header for each file (see an example below)

# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

Coverage increased (+0.05%) to 69.766% when pulling ad8bac4763b655c8426da968ae00ea9fea39d2db on zm/fix-dots-in-filenames into 967b8c507646af2fc237f63b937dd1c8c4b16a21 on develop.


Use cases?

Could you put a section with a few use cases into the README? I think, it is important that tools provide examples of what they’re useful for.

Hey,
If course, I will add some :)


Short solution needed: "Bind Redis to certain IP address" (redis)

Please help us write most modern and shortest code solution for this issue:
Bind Redis to certain IP address (technology: redis)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments to make solution explained.
Link to this issue in comments of pull request.

Bind Redis to multiple IP addresses


Show Page UV Items Section

Summary
Split child works display in the items section on a work's show page in every theme. They do not display in HykuCommons.
Knapsack

HykuCommon

Acceptance Criteria

[ ] Split child works do not display in the items section on a work's show page in every theme

This ticket is not needed. THis is not current behavior for hykucommons https://demo.hykucommons.org/concern/generic_works/a8ca9698-63ed-4a48-be02-030f215942c5?locale=en


WIP: test using fixed variables instead of ParameterJuMP

This PR is still a WIP. It's untested etc. Trying some things locally, but I thought I'd push this here so you can see the direction.
It is likely that the overhead of the extra decision variables is worse than ParameterJuMP or POI, but we should at least test and benchmark this approach before considering more complicated ones.
x-ref https://github.com/NREL-SIIP/PowerSimulations.jl/issues/800#issuecomment-1340076963

@jd-lara try this out on a larger example. It seems to work for the one you sent me. I don't see much of a difference in the timings (at all). Is there a parameter I need to set to use PJ?

@odow thanks for the fix. I merged into the poi branch since that one had a lot of the tests fixed to remove ParameterJuMP.


Enhance grid mean options

Introduce 3 new options "-grid_delay_absolute_mean", "-grid_delay_absolute_median", "-grid_delay_absolute_stdev" which are intended to compute the specified statistics across all station time observations for a given grid.
Existing options "-grid_delay_mean", "-grid_delay_median", "-grid_delay_stdev" now modified to take the mean across a given grid for which specified statistic has been computed on a station-by-station basis (e.g. for "-grid_delay_stdev", the mean of the station-wise variance is passed for each gridcell).
@dbekaert PS sorry for the delay. I thought I pushed it last night, but just realized last night it apparently didn't go through, I'll blame it on the mandated laptop reset!

Also, should mention that reviewers should feel free to suggest changes/modify the code regarding comments and documentation. Perhaps my explanations in the code may not be so transparent.


refactor(gql_schema): Incorporate feedback iteration 2 and add Skill node

Renamed attempted_question to AttemptsQuestion for clarity
Changed follows to ContainsTopic to better represent hierarchical relationships
Linked InitialInteraction to specific Question Banks (IQ, Textbook, English, Math) to categorize interactions effectively
Deferred optimization of answer storage; maintained existing AnswerSheet structure
Replaced list structures with separate nodes and relationships to enhance normalization
Standardized edge names using a verb-noun format for consistency across the schema
Introduced the Skill node to manage student competencies, including relevant relationships

Now we have an Answer Node so in Interaction rather than
    DIRECTED EDGE ATTEMPTED_QUESTION {
        score :: INT,
        answer :: STRING,
        attempt_date :: DATE NOT NULL
    } CONNECTING (Interaction -> Question),

Should we connect it to the Answer Node instead that connects to Question? So we are not storing the progress in an Edge for Interaction anymore. @Wania-Kazmi @usmanashrf

Focusing on Design rather than optimization this flow looks better:
[ Student ]
   |
   v (HAS_PARTICIPATION)
[ StudentInteraction ]
   |                   \
   v                    v (INCLUDES_LEARNING_EXCHANGE)
[ Interaction ]     [ LearningExchange ]
   |                   |
   v (COVERS_TOPIC)     v (ANSWERED_QUESTION)
[ Topic ]          [ Question ]

Key Changes are:
Introduce StudentInteraction and streamline Interaction relationships

Add StudentInteraction node to represent individual student assignments
Connect LearningExchange to StudentInteraction for multiple Q&A exchanges
Rename edges for clarity:

HAS_PARTICIPATION → ENROLLED_IN
ASSIGNED_TO_INTERACTION → PART_OF_INTERACTION
INCLUDES_LEARNING_EXCHANGE → PERFORMS_EXCHANGE
RESPONDS_TO_QUESTION → ANSWERED_QUESTION

Replace undirected CONTAINS with directed CONTAINS_QUESTION from Topic to Question
Remove redundant topic_idsLIST attribute from Interaction node

This is updated in the latest commit!


The "stop streaming" button does not work properly if clicked before streaming starts

If the user clicks the "stop" button (in the prompt text input box) before any streaming output is actually received back by Moxin, then it will permanently freeze the app.
see screenshot below -- I clicked the stop button before anything actually started streaming back from the model, and it results in the app being permanently stuck in this state.

An "easy" fix would be to disable the stop button until streaming begins. But on slower machines (and/or larger models), it can take multiple minutes for the model to send the first streaming output buffer back, so that solution is not ideal because the user has no option but to helplessly wait until the model actually generates something (which defeats the entire benefit of a stop button, imo).

Part of this issue was addressed by #246, but we're aware the backend has a limitation where it is not possible to interrupt the chat generation before the streaming has started. We will have a bit more robust code around the cancellation when the integration with Mae is completed.

Currently, it should not freeze the whole app but it seems like the stop button doesn't work until something is streamed back. The linked PR should fix that. You can test it if you want.

Feel free to close the issue if it's been fixed. I don't have the bandwidth to test it thoroughly enough myself.

No worries, notifying you just in case. Will proceed like that then 🙌


Failed to connect to org1-ca.localho.st port 443: Connection refused.

What happened?
While running "curl -k https://org1-ca.localho.st:443/cainfo" I am getting "curl: (7) Failed to connect to org1-ca.localho.st port 443: Connection refused" error.
What did you expect to happen?
It should deployed and worked perfect.
How can we reproduce it (as minimally and precisely as possible)?
Run following commands:
kubectl hlf ca create  --image=$CA_IMAGE --version=$CA_VERSION --storage-class=standard --capacity=1Gi --name=org1-ca
--enroll-id=enroll --enroll-pw=enrollpw --hosts=org1-ca.localho.st --istio-port=443
kubectl wait --timeout=180s --for=condition=Running fabriccas.hlf.kungfusoftware.es --all
curl -k https://org1-ca.localho.st:443/cainfo
Anything else we need to know?
No response
Kubernetes version

# kubectl get nodes -o wide

Hey @rohitshukla11 , looks like you are following the readme to set up HLF network locally.
If that's the case then, the host you are trying to connect to resolves to ClusterIP of the proxy that you are using (in this case , istio). ClusterIP cannot be accessed locally , hence you are getting the connection refused error. The above curl command works only inside the cluster i.e; you need to run that inside some pod inside the cluster.

Hey @rohitrj22 thanks for the response I am running this inside the Google cloud Kubernetes cluster. Can you guide me or provide a resource to set up hyperledger fabric network inside Kubernetes cluster. Thanks

Hey @rohitshukla11 , You need to exec into a pod and execute the curl command as the host resolves to ClusterIP
of the istio proxy.

You can try this command kubectl run curl --image=appropriate/curl --restart=Never --rm -it -- curl -k https://org1-ca.localho.st:443/cainfo


'Ignore' messages when bot offline?

Hi, I was testing the Bot Counter example and it works perfectly, but after I take it down, if I continue to send messages to him, when I start him again he will count all the messages that I sent him while he was offline. Is there any way to prevent or limit this? Thanks.

hello, please take a look at issue #35

Yes, thank you very much!


couldn't launch vi

what should i do

This repo is for problems/feature request with cheat and not to support all listed commands.
You should probably ask this on StackOverflow.com or in another help forum (possibly for your Distro).

Thanks ,I am not have to use it ,just okay


native_posix missing features

This is a non-exhaustive list of known missing* features in the native_posix board.
* missing = not (yet) implemented / supported, not (properly) tested.
The purpose being to make it clear for users, to track, and to have a container for requests.

Devices/drivers:

UART

interrupt driven IF

Subsystems:

Console ("pull style", getchar(), getline(), putchar())
CPP (no C++ support yet)
Logger backend: control verbosity from the executable command line & merge the char out function with pre_print
Shell backend using the process stdin&out

Support for doing blocking poll/select/read/write calls on host file descriptors (the block would block the calling zephyr thread, and yield to any other pending zephyr thread like it if was a zephyr blocking call, and if not idle zephyr all together)

Note that the reason why these have not been implemented yet is because there is not sufficient drive to do so, and nobody should expect there to be anytime soon.

Add CONFIG_HW_STACK_PROTECTION and CONFIG_USERSPACE to this list.
Although off the top of my head I can't think of a good way to do it, it really does depend heavily on hardware. This might need to be a documented limitation.


540 | Single Element in a Sorted Array | Java

Single Element in a Sorted Array -
What will change - Add Java implementation for LeetCode problem 540: Single Element in Sorted Array
Type of Issue -
Please add/delete options that are not relevant.

[x] Adding New Code

Programming Language
Please add/delete options that are not relevant.

[x] Java

Self Check

Ask for issue assignment and wait to get assigned to it before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server ✉ - https://discord.gg/CXksGdn
Happy Coding,

Please assign this issue to me. First open source contribution :)


Benchmark

Hey, just saw your reddit post: https://reddit.com/r/MachineLearning/comments/1cqv5y4/r_our_new_classification_algorithm_outperforms/
Congrats on the algorithm, great to have things that run fast!
Wrt performing better than common boosted tree ensembles:

I recommend to read the following two paper that benchmark multiple classifiers against each other on many datasets.

https://arxiv.org/pdf/2207.08815
https://arxiv.org/pdf/2305.02997
You could even reuse TabZilla and see how your classifier compares as a function of data set characteristics such as size. It is very handy!

The mean 10-fold CV results are a function of the CV procedure and subject to some uncertainty. I would recommend to decide how you want to test whether the difference between classifier performances actually exists. This is a nice introduction of how to do it (or not).

Some boosted tree versions are optimized for speed (oftentimes using GPUs). Maybe include some for more comprehensive speed comparisons. SketchBoost is an example.

Excited to see where this goes!
Cheers

Hey, just saw your reddit post: https://reddit.com/r/MachineLearning/comments/1cqv5y4/r_our_new_classification_algorithm_outperforms/
Congrats on the algorithm, great to have things that run fast!
Wrt performing better than common boosted tree ensembles:

I recommend to read the following two paper that benchmark multiple classifiers against each other on many datasets.

https://arxiv.org/pdf/2207.08815
https://arxiv.org/pdf/2305.02997
You could even reuse TabZilla and see how your classifier compares as a function of data set characteristics such as size. It is very handy!

The mean 10-fold CV results are a function of the CV procedure and subject to some uncertainty. I would recommend to decide how you want to test whether the difference between classifier performances actually exists. This is a nice introduction of how to do it (or not).
Some boosted tree versions are optimized for speed (oftentimes using GPUs). Maybe include some for more comprehensive speed comparisons. SketchBoost is an example.

Excited to see where this goes!
Cheers

Hey!
Excellent suggestions. Especially the TabZilla one! I will keep this issue open until we go through them. Thanks for your comment!
Cheers


 Looks like the mentioned PR passed the engine upgrade test as mentioned at https://github.com/longhorn/longhorn-manager/pull/2363#issuecomment-1855094264 before

Analysis:
The PR https://github.com/longhorn/longhorn-manager/pull/2363 is indeed the root cause. We accidentally clean up the replica folder during the engine upgrading/live migrating process:

Tracking one replica during engine upgrade/migration process, testvol-r-8571f4c4
A new inactive replica, testvol-r-31debf74,  is created to clone the replica testvol-r-8571f4c4:2023-12-20T21:57:36.524937622Z time="2023-12-20T21:57:36Z" level=info msg="Cloned a new matching replica testvol-r-31debf74 from testvol-r-8571f4c4" func="controller.(*VolumeController).createAndStartMatchingReplicas" file="volume_controller.go:3739" accessMode=rwo controller=longhorn-volume frontend=blockdev migratable=false node=phan-v607-upgrade-fail-pool2-3be6d107-gjwkw owner=phan-v607-upgrade-fail-pool2-3be6d107-gjwkw state=attached volume=testvol

Next we switch the active field of the replicas as a step near the end of the upgrade/migation:2023-12-20T21:57:40.716530264Z time="2023-12-20T21:57:40Z" level=info msg="Switching replica testvol-r-8571f4c4 active state from true to false due to longhornio/longhorn-engine:master-head" func="controller.(*VolumeController).switchActiveReplicas" file="volume_controller.go:3770"
2023-12-20T21:57:40.716859020Z time="2023-12-20T21:57:40Z" level=info msg="Switching replica testvol-r-31debf74 active state from false to true due to longhornio/longhorn-engine:master-head" func="controller.(*VolumeController).switchActiveReplicas" file="volume_controller.go:3770"

So testvol-r-8571f4c4 is switching from true to false and testvol-r-31debf74 is switching from false to true
Note that the replica switching are only in the local map, it has not been persisted to the ETCD yet: link
Then, we remove the inactive replica testvol-r-8571f4c4 after the upgrade/migration:2023-12-20T21:57:40.887033403Z time="2023-12-20T21:57:40Z" level=info msg="Removing inactive replica testvol-r-8571f4c4" func="controller.(*VolumeController).cleanupCorruptedOrStaleReplicas" file="volume_controller.go:925" accessMode=rwo controller=longhorn-volume frontend=blockdev migratable=false node=phan-v607-upgrade-fail-pool2-3be6d107-gjwkw owner=phan-v607-upgrade-fail-pool2-3be6d107-gjwkw state=attached volume=testvol

Note that in the deleteReplica() function, it update the replica testvol-r-8571f4c4 before issue a delete API request: link
At this point, from ETCD perspective, both old replica, testvol-r-8571f4c4, and new replica, testvol-r-31debf74, are inactive. Furthermore, the old replica, testvol-r-8571f4c4 has deletion timestamp
This condition trigger the replica controller to immediately clean up the replica folder: link2023-12-20T21:57:41.050750098Z time="2023-12-20T21:57:41Z" level=info msg="Cleaning up replica" func="controller.(*ReplicaController).syncReplica" file="replica_controller.go:259" controller=longhorn-replica node=phan-v607-upgrade-fail-pool2-3be6d107-v9rvz nodeID=phan-v607-upgrade-fail-pool2-3be6d107-v9rvz ownerID=phan-v607-upgrade-fail-pool2-3be6d107-v9rvz replica=testvol-r-8571f4c4

The fix here would be do not cleanup replica folder if there are more than 1 replicas CR for it even if all replica CRs are in active
Now that replica folder are cleaned up, the new replica cannot find the data folder, testvol-r-31debf74:2023-12-20T21:57:46.298524971Z [testvol-r-31debf74] time="2023-12-20T21:57:46Z" level=error msg="Failed to get size of file /host/var/lib/longhorn/replicas/testvol-7159747e/volume-head-000.img" func=util.GetFileActualSize file="util.go:209" error="no such file or directory"

The new replica, , is killed and restarted. In the next start, it artificially recover the volume meta data and render volume as empty, a.k.a data has been lost:

2023-12-20T21:57:52.980648456Z [testvol-r-31debf74] time="2023-12-20T21:57:52Z" level=info msg="Creating replica /host/var/lib/longhorn/replicas/testvol-7159747e, size<PHONE_NUMBER>/512" func="replica.(*Server).Create" file="server.go:52"
2023-12-20T21:57:52.980669401Z time="2023-12-20T21:57:52Z" level=warning msg="Recovering volume metafile /host/var/lib/longhorn/replicas/testvol-7159747e/volume.meta, and replica info: {Size:5368709120 Head: Dirty:false Rebuilding:false Error: Parent: SectorSize:512 BackingFilePath: BackingFile:<nil>}" func="replica.(*Replica).tryRecoverVolumeMetaFile" file="replica.go:1088"

Test plan:
Make sure that the test below passed:

test_engine_live_upgrade_with_backing_image
test_engine_live_upgrade
test_auto_upgrade_engine_to_default_version
test_migration_confirm
test_migration_with_unscheduled_replica
test_migration_with_failed_replica
test_migration_with_restore_volume

Note - the long list of failures in https://ci.longhorn.io/job/public/job/master/job/sles/job/amd64/job/longhorn-tests-sles-amd64/759/ was also seen in 760 and 761, but then reduced in 762 on Dec 22, apparently by the fix-to-the-fix in https://github.com/longhorn/longhorn-manager/pull/2392
Now it is only apparently test_engine_live_upgrade_with_intensive_data_writing that fails, starting in run 767 on Dec 27, and since then.

And yet every run in v1.5.x branch from https://ci.longhorn.io/job/public/job/v1.5.x/job/v1.5.x-longhorn-tests-sles-amd64/248/ and after has been run on
longhorn-manager version: be400cf167198f7a7b438df3de49c2b5df5842c5

Which is the backport of that same change:
* be400cf1 (HEAD -> v1.5.x, origin/v1.5.x) chore(csi): update default images version
* 8a8b11ab fix(log): mismatched args
* ffc99fab Add a startup probe to the longhorn-csi-plugin container
* 3edd68d7 Increase ignoreKubeletNotReadyTime to 15 seconds
* 4e000bef Fix: data lost during engine upgrade/migration
...

So this is a little confusing.

Running the test manually passed. This is a bit weird.
longhorn-test:/integration/tests # pytest -svvl test_engine_upgrade.py::test_engine_live_upgrade_with_intensive_data_writing
============================================ test session starts =============================================
platform linux -- Python 3.9.18, pytest-5.3.1, py-1.11.0, pluggy-0.13.1 -- /usr/bin/python3.9
cachedir: .pytest_cache
rootdir: /integration, inifile: pytest.ini
plugins: repeat-0.9.1, order-1.0.1
collected 1 item

test_engine_upgrade.py::test_engine_live_upgrade_with_intensive_data_writing PASSED

Looks like there are something special about the test cluster. The instance-manager are being restared due to failed liveness probe which inturn cash the volume and fail the test:
    uid: 837ef9c1-25cd-4615-8d48-53651b4b5e75
  note: 'Liveness probe failed: dial tcp <IP_ADDRESS>:8500: connect: connection refused'

@roger-ryao is helping to create an identical cluster as the test pipeline

Looks like there are something special about the test cluster. The instance-manager are being restared due to failed liveness probe which inturn crashed the volume and failed the test:
    uid: 837ef9c1-25cd-4615-8d48-53651b4b5e75
  note: 'Liveness probe failed: dial tcp <IP_ADDRESS>:8500: connect: connection refused'

@roger-ryao is helping to create an identical cluster as the test pipeline

Create an identical test environment and provide it to @PhanLe1010

To isolate the longhorn-manager changes, I ran with builds at the following SHAs from before the regression failures started:
munson4suse/longhorn-manager:a42748a4 <- failed with md5 mismatch.
jmunson4suse/longhorn-manager:bece02b4 <- failed with md5 mismatch.
jmunson4suse/longhorn-manager:dead2b7d <- failed to set up test, error in reset_engine_image.
jmunson4suse/longhorn-manager:2fb03c11 <- failed to set up test, error in reset_engine_image.

So it occurs with earlier code, which implies that it's a combination of changes, not just a longhorn-manager thing.

The liveness probe is a symptom, not a direct cause.  It tries to access /data/ to do its check and is rejected with a connection refused.
In the first failure from the support bundle above, in ./logs/longhorn-system/longhorn-manager-5ltt5/longhorn-manager.log, shortly after the engine upgrade is complete, the instance manager monitor is already failing its check several seconds before the liveness probe event:
2024-01-01T09:01:52.024224981Z time="2024-01-01T09:01:52Z" level=info msg="Engine longhorn-testvol-1ujmvd-e-0 has been upgraded from longhornio/longhorn-engine:master-head to longhornio/longhorn-test:upgrade-test.9-8.5-4.1-1" func="controller.(*VolumeController).finishLiveEngineUpgrade" file="volume_controller.go:2877" accessMode=rwo controller=longhorn-volume engine=longhorn-testvol-1ujmvd-e-0 frontend=blockdev migratable=false node=ip-10-0-2-141 owner=ip-10-0-2-141 state=attached volume=longhorn-testvol-1ujmvd volumeDesiredEngineImage="longhornio/longhorn-test:upgrade-test.9-8.5-4.1-1"

2024-01-01T09:01:53.546695089Z time="2024-01-01T09:01:53Z" level=error msg="Failed to receive next item in instance watch" func="controller.(*InstanceManagerMonitor).Run.func2" file="instance_manager_controller.go:1310" controller=longhorn-instance-manager error="rpc error: code = Unavailable desc = error reading from server: EOF" instance manager=instance-manager-0811a3c3be2865140741c4de438628a9 node=ip-10-0-2-141
2024-01-01T09:01:54.547850667Z time="2024-01-01T09:01:54Z" level=error msg="Failed to receive next item in instance watch" func="controller.(*InstanceManagerMonitor).Run.func2" file="instance_manager_controller.go:1310" controller=longhorn-instance-manager error="rpc error: code = Unavailable desc = error reading from server: EOF" instance manager=instance-manager-0811a3c3be2865140741c4de438628a9 node=ip-10-0-2-141

2024-01-01T09:01:55.984904530Z W0101 09:01:55.984782       1 logging.go:59] [core] [Channel #121 SubChannel #122] grpc: addrConn.createTransport failed to connect to {Addr: "<IP_ADDRESS>:8501", ServerName: "<IP_ADDRESS>:8501", }. Err: connection error: desc = "transport: Error while dialing: dial tcp <IP_ADDRESS>:8501: connect: connection refused"

      name: instance-manager-0811a3c3be2865140741c4de438628a9
      namespace: longhorn-system
      resourceVersion: "1308"
      uid: 02bc32f4-6918-45a8-8147-02adf09cf391
    kind: Event
    lastTimestamp: "2024-01-01T09:01:55Z"
    message: 'Liveness probe failed: dial tcp <IP_ADDRESS>:8500: connect: connection refused'

It looks like the instance manager pod crashed right after the engine upgrade finish due to the function ProcessReplace() doesn't initialize the Conditions map which causes the panic "assignment to entry in nil map" when getProcessToUpdateConditions() attempts to add a key to it.
[longhorn-instance-manager] time="2024-01-04T06:35:28Z" level=info msg="Process Manager: successfully replaced process longhorn-testvol-jogcok-e-0" func="process.(*Manager).ProcessReplace" file="process_manager.go:583"
[longhorn-instance-manager] time="2024-01-04T06:35:28Z" level=info msg="Process Manager: successfully unregistered process longhorn-testvol-jogcok-r-9b014111" func="process.(*Manager).unregisterProcess.func1" file="process_manager.go:343"
panic: assignment to entry in nil map

goroutine 14 [running]:
github.com/longhorn/longhorn-instance-manager/pkg/process.(*Manager).getProcessToUpdateConditions(0xc00051c008?, 0xc000501cc0?)
	/go/src/github.com/longhorn/longhorn-instance-manager/pkg/process/process_manager.go:163 +0x4a5
github.com/longhorn/longhorn-instance-manager/pkg/process.(*Manager).checkMountPointStatusForEngine(0xc000322800)
	/go/src/github.com/longhorn/longhorn-instance-manager/pkg/process/process_manager.go:147 +0x14a
github.com/longhorn/longhorn-instance-manager/pkg/process.(*Manager).startInstanceConditionCheck(0xc000322800)
	/go/src/github.com/longhorn/longhorn-instance-manager/pkg/process/process_manager.go:130 +0x125
created by github.com/longhorn/longhorn-instance-manager/pkg/process.NewManager in goroutine 1
	/go/src/github.com/longhorn/longhorn-instance-manager/pkg/process/process_manager.go:90 +0x3a5
➜  ~/.kube

Proposing PR https://github.com/longhorn/longhorn-instance-manager/pull/353 but still need sometime to test it
So the flow is engine upgrade init -> engine upgrade finish -> checkMountPointStatusForEngine begin -> panic -> instance-manager pod crash -> liveness probe failed -> data mount point is broken -> the test cannot read/read wrong data -> test failed
This also fits the finding of @james-munson that:

This problem is caused by other component than longhorn-manage
The liveness probe is a symptom, not a direct cause
This problem doesn't happen in 1.5.x because PR https://github.com/longhorn/longhorn-instance-manager/pull/316 has not been backported

Thanks @roger-ryao and @james-munson

cc @ChanYiLin :point_up:

The test passed with @PhanLe1010 's private image: https://ci.longhorn.io/job/private/job/longhorn-tests-regression/5867/ and https://github.com/longhorn/longhorn-instance-manager/pull/353 has been merged

Verified on master-head 20240108

longhorn master-head https://github.com/longhorn/longhorn/commit/f5dd46a7496b54973f3d0621c5e96de84ea24ec1
longhorn-manager master-head https://github.com/longhorn/longhorn-manager/commit/a601b9b14da2ef3bb72f225dc3bc6b94515f0d33

The test steps

https://github.com/longhorn/longhorn/issues/7396#issue-2050208669

Result passed


Breaks shell command because of ; character

How is the official example of
cleancss -O1 all:off;tidySelectors:on one.css

supposed to work? To all of my knowledge this is interpreted as two separate commands by bash. Of course neither cleancss -O1 all:off nor tidySelectors:on one.css is a valid command, so it returns a help for the first one and -bash: tidySelectors:on: command not found for the second one.

I think docs are wrong as it should be cleancss -O1 "all:off;tidySelectors:on" one.css - could you give this one a try?

Yes, with quotation marks it works well.

It's fixed then.


Init.json is wrong?

Hey, I tried filling in my own info and such into the Init.JSON and PS complains about the very first line. Thought I messed up somewhere but even trying to drop the installer.jsx into PS right from a fresh download from here gives this message
http://puu.sh/njrLV/453f12e447.png
I tried sticking ; on all the line ends but that didn't help much either. Json formatters say it is malformed as well.
This was in CS6, CC 2014 and CC 2015 that they all give an error.

@TravisEvashkevich, is this still an issue (the code has been updated)?
Please let me know that I'll close this. Thank you

Hey,
Never got it to work before and gave up. Just wrote a batch script to copy folders to where they needed to be.
I can try again if you've changed something but I won't be able to for a few days(don't have access to my laptop atm)

I fixed a JSON parsing error – I've tried the provided example and it works. I'm doing some spring cleaning in the issues :-) Let me know, no hurry.
(recent problem is: permission issues on Macs)
Thank you


[Update Snap] Social Names

Checklist
All items in the list below needs to be satisfied.

[ ] Is the summary of the change documented in this ticket?
[ ] Has a MetaMask Snaps team member reviewed whether the changes need to be vetted?
[ ] If there are changes that need to be vetted, attach a description and the relevant fixes/remediations to this issue.
[ ] The corresponding pull request in this repo has been merged.

This update removes the matchers from the endowment: https://github.com/Montoya/social-names-snap/commit/ec95237b271849a901daf013988585da9710d5fa
It also updates the suggested name returned for addresses on Farcaster. There are no other changes.
The new version is 0.1.3


Support hex colors in all messages

Maybe use IJ refactoring tools to repoint ChatColor.translate to something else?

Implemented in 9.0 for 1.17-only, using the #RRGGBB format.


No responses

Will this still operate as normal while the ChatGPT is down/overloaded?

This is just an interface to GPT3 API. IT doesn't use the Chatgpt api. So in order to use it you will need an API key and create a filed named .env in the client directory with your key in it.

I have my key in the .env file and it is located in the client directory

If you open up the dev tools in the browser and check the console, what error do you get?

You don't see an Axios error?

I don't see an Axios error. I have Node 19.2.0 (the current version)

If the app isn't responding after you submit your question, you should get an Axios error in the console. So I don't know what to make of the issue. The chrome errors shouldn't prevent this from working.

I am getting the Axios error. How do I go about fixing this?

You don't see an Axios error? Also which version of node are you using?

I am getting the Axios error. How do I go about fixing this?

You don't see an Axios error? Also which version of node are you using?

I am getting the Axios error. How do I go about fixing this?

What is the error?


d2l-list

Demo<EMAIL_ADDRESS>Readme: https://github.com/BrightspaceUI/core/blob/majones/d2lList/components/list/README.md
Design: http://design.d2l/components/lists/
Out of scope:
Selecting and links
Draggable
Multiple Columns
This adds the basic styling and first attempt at the style interface for consumers.
Add responsive behaviour for images that are bigger than the required size. So this component can be used by the consumer without any worry about responsive behaviour no matter where they put a list on their page.

Given these awesome comments - I want to go experiment and try some new routes. Hopefully these work out and I can change some of these.


api: OpenAPI support

Signed-off-by: Ce Gao<EMAIL_ADDRESS>

This change is

Ref https://github.com/kubernetes/kube-openapi/issues/13

It seems that I misunderstand the meaning of the beta feature CustomResourceValidation. We do not have to generate/serve open api spec to use the feature.

SGTM

@jlewi
I am trying to generate crd validation with the support of https://github.com/ant31/crd-validation, and we need the openapi_generated.go in this PR for the generation. Therefore PTAL.

/assign @ScorpioCPH @jlewi

It is not urgent anymore since we know that it is not practical to use crd validation feature to validate all types in the CRD. I am switching to the way described in https://github.com/kubeflow/tf-operator/issues/561#issuecomment-392412816

/retest

/retest

PTAL again @jlewi

/hold
I prefer to merge #610 first since this PR may have conflicts with it.

/hold cancel
I will fix the conflicts asap.

Rebasing upstream/master, thus no need to review again.


[BTHome] Sents "ghoste" events and one extra icon

Affected hardware version
Bangle 2
Your firmware version
2v21.31
The bug
When button is pressed in front, some times it triggers again without pressing the button so the lights turn back one. I can't find relativity why it dose that or when it dose that. For now, it seems to be completely random for me.
I have two buttons (light and fan) at front menu, but for some reason, there is two light buttons. The first light button is first in the list and the second light and fan are "side by side". Those two lights also trigger two different buttons. I can't also delete the only one light button. I can delete all the other buttons.
Installed apps
launcer, touche keyboard, BTHome, Clock info, pebble++, Rings, Run, Scheduler, welcome.

ok, so it is still happening. All the switches do the same. Sometimes multiple times ( I turn on, it turns it off, I turn it on, it turns it off, I trun it on, it stays on). It doesn't happen all the time. Sometimes it works like it should.
Sometimes I also get this message at the bottom of the screen in red "memory_busy". It goes away when I hard reset it. Don't know if related

Is this similar in behaviour to #3243? Or @gfwilliams would you say it's more of the hardware and light touches? The lights being displayed will be the config file, which it sounds like you've got to the bottom of. If you check the IDE, are there errors about memory logged?

I have two buttons (light and fan) at front menu, but for some reason, there is two light buttons. The first light button is first in the list and the second light and fan are "side by side".

I'm not sure I understand how the icons can be side by side - any chance of a screenshot? App Loader -> More... -> Screenshot
And also connect with the Web IDE and download your bthome.json file so I can see how it's set up and reproduce.
It would be helpful if you could attach the log from Home Assistant for the Bangle when this happens - it might explain what is happening.
If you have just a single button, does this happen? Or is it only with multiple buttons?

I have the pebble++ front. In there, there is is this "button" that you can slide the options what you see ( steps, bpm, buttons etc).  The options are in the list and in the list there was two light options. But now, when I hard reset it, I don't see the double light icons anymore.
But the ghost event still happens. I see two events in home assistant, even when I press only ones. The second event usually comes after 2-7 seconds. But it doesn't happen all the time. Sometimes it works fine.

I'll need that bthome.json file mentioned above before I can really figure out what's going on I'm afraid. As-is, it works for me, so I need to see how yours is configured

Sure! Here is the button.json file content:
{buttons:[{name:"light",icon:"light",n:0,v:"press"},{name:"light",icon:"light",n:0,v:"press"},{name:"fan",icon:"fan",n:1,v:"press"}],showBattery:true}

Ok, thanks! Please can you give the version 0.03 from the development app loader a try?
I spotted two issues that might fix this:

You had two identical buttons - due to the way we were putting those in the menu, they just appeared as a single item. That's almost certainly the source of your two identical buttons. Now you'll still get that but you can see them in the app/settings and can remove/change one
I wasn't handling multiple button numbers quite right, so as a result when you pressed the light button it would have created and advertised a third button event, and that could be what was causing you so much trouble.

Now it appears to work ok - I deleted your second light (but it shouldn't have mattered) and if you load the BTHome app and then paste in NRF.setAdvertising = print; in the IDE:
>NRF.setAdvertising = print;
=function () { [native code] }
// ------------- I tap 'light' here, it advertises first button pressed
{
  "64722": [ 64, 0, 205, 1, 88, 58, 1, 58, 0 ]
 } { "interval": 50, "whenConnected": true }
// ------------- a few seconds later - advertises no events
{
  "64722": [ 64, 0, 206, 1, 95, 58, 0, 58, 0 ]
 } {  }
// ------------- I tap 'fan' here, it advertises second button pressed
{
  "64722": [ 64, 0, 207, 1, 88, 58, 0, 58, 1 ]
 } { "interval": 50, "whenConnected": true }
// ------------- a few seconds later - advertises no events
{
  "64722": [ 64, 0, 208, 1, 96, 58, 0, 58, 0 ]
 } {  }

// ------------- I tap 'light' here, it advertises first button pressed
{
  "64722": [ 64, 0, 209, 1, 89, 58, 1, 58, 0 ]
 } { "interval": 50, "whenConnected": true }
// ------------- Quickly I tap 'fan' here, it advertises second button pressed
{
  "64722": [ 64, 0, 210, 1, 88, 58, 0, 58, 1 ]
 } { "interval": 50, "whenConnected": true }
// ------------- a few seconds later - advertises no events
{
  "64722": [ 64, 0, 211, 1, 96, 58, 0, 58, 0 ]
 } {  }

It is still doing it. And every time I try to demo it or film it, it doesn't do it. Can you re open this issue? I will look later with IDE, what is going on and why id dose this randomly. really hard to catch it when it appears occasionally

Did you change the settings first so there weren't the two identical buttons any more?
Maybe you can try with the NRF.setAdvertising = print; line like I did above. It won't advertise anything when you do that so won't work, but at least it'll be obvious what it's outputting and if it's wrong

ok, I have maybe idea what's going on.
In our home, we have shelly plus 1pm and they can be as bluetooth proxys. I noticed that the "ghoste" effect only happens in some places. So now I turned off the proxy effect and it looks like it is working. Can't say yet, because it worked randomly. But that might be it. I will let you know soon, did this work.
If it is true, I have two options ( or more?)

I turn off the bluetooth option from shelly
In home assistant, I only take one(1) event in some time.
Make same code edition in the app. I was trying to look in the home assistant node red, can I identify original signal, but no luck with that.  Maybe I can sent "button down" and "button up" message or running number in watch that will be sent to home assistant.

But there is a new problem: if you edit a button and then save it it greats a second one and if you save again, then there is a third one.

This has always been there by the look of it - I'll do a fix.

we have shelly plus 1pm and they can be as bluetooth proxys

Ok, well, that makes a lot of sense then. It's possible that Shelly's implementation reports advertising data in a different way to other BTHome receivers, so that as you move between rooms home assistant gets different data and thinks the reported values changed.
If you can debug that in Home Assistant I'd report it to Shelly
Maybe try the BTHome app and leave Button # always at 0 for every action. You can do different actions by changing 'Action' to press/double-press/etc
It's entirely possible that Shelly has been tested with normal events but forwards >1 event differently.

Duplicate buttons fixed with https://github.com/espruino/BangleApps/commit/12716a172a7e108be483e13af2f7a4f445627053
And if the rest is Shelly (which seems likely) there's nothing we can do on the app side - it appears to be working as expected


Guide types: learning vs practicing guides

Currently we have developed two types of guides:

"learning campaigns", that cover very few tools or elements from theory, have no domain, and may contain explanations. Those guides are usually named in spanish as "mumuki-funcional-guia-3-haskell-lambdas"
"challenge campaigns" , which cover more elements, have a richer domain, and contain no explanations. Those guides are usually named in spanish as "mumuki-funcional-tp-chocobos"

It would be nice to let the platform know about that, and have a different visual presentation, in order to recognize them easily

@faloi @PalumboN @aguspina @mmatos @asanzo I would like to hear your opinions here

+1 to this.
I think we should provide at least a challenge guide for each learning guide, so the student can optionally practise what she/he has just learned.
Another difference I see is subject-specific guides (e. g. conditional repetition on Gobstones or higher order functions on Haskell) VS what you described there, that could cover many aspects of the paradigm.

Moving this to https://github.com/uqbar-project/stones-spec/issues/17


Avoid the robot to step in place in case the minAngle is less than the feetYawDelta.

Fixes #42
I have tested it in simulation.
Instead of computing the difference in the orientation using directly the yaw of the foot, I consider the corresponding unicycle angle (after removing the delta).

In the first version of this PR there was a bug. When computing the difference between the current unicycle angle, and the stance foot, this latter quantity was never updated even if new steps were added. Hence, it was always taking only step when turning. Afterwards, the constraint on the maximum angle was (obviously) failing. Apart from this problem, the interesting thing was that the robot feet were not becoming parallel after the failure of the constraints. I got puzzled by this, so I dig into the code and I found a series of other problems fixed by https://github.com/robotology/unicycle-footstep-planner/pull/44/commits/c9773d5206cdba82a0e40e331d61210179618da7.
Hence, I took the occasion to do also a bit of cleanup.
I did a couple of more tests in simulation. But it may be worth checking this on a real platform.

I did a couple of more tests in simulation. But it may be worth checking this on a real platform.

@GiulioRomualdi and @isorrentino quickly tested it on the robot. @GiulioRomualdi I think this is ready to be reviewed/merged.

I did a couple of more tests in simulation. But it may be worth checking this on a real platform.

@GiulioRomualdi and @isorrentino quickly tested it on the robot. @GiulioRomualdi I think this is ready to be reviewed/merged.

Friendly ping @GiulioRomualdi

I did a couple of more tests in simulation. But it may be worth checking this on a real platform.

@GiulioRomualdi and @isorrentino quickly tested it on the robot. @GiulioRomualdi I think this is ready to be reviewed/merged.

Friendly ping @GiulioRomualdi

Friendly ping @GiulioRomualdi :grin:

I did a couple of more tests in simulation. But it may be worth checking this on a real platform.

@GiulioRomualdi and @isorrentino quickly tested it on the robot. @GiulioRomualdi I think this is ready to be reviewed/merged.

Friendly ping @GiulioRomualdi

Friendly ping @GiulioRomualdi

Friendly ping @GiulioRomualdi. We should try to close this by the end of this sprint

I rewired the PR and it seems ok. Furthermore, last week I run the walking several time on the robot and everything went fine

I rewired the PR and it seems ok. Furthermore, last week I ran the walking several time on the robot and everything went fine

Great, thanks!


Subclassing API

Let's have a C++ class that can be subclassed:
class Example {
public:
  Example(int x);
  virtual ~Example();
  virtual int vfunc2(double y);
protected:
  void func1();
};

First, we create a C++ wrapper:
class ExampleSubclass : public Example {
  ExampleSubclass(int x);
  ~ExampleSubclass();
  void func1();
  int vfunc2(double y);

  void set_vfunc2_func(int (*func)(void*, double), void* data);
  void set_destructor_func(void (*func)(void*), void* data);
private:
  int (*m_func2_func)(void*, double);
  void* m_func2_data;

  void (*m_destructor_func)(void*);
  void* m_destructor_data;

};

ExampleSubclass::ExampleSubclass(int x) : Example(x) {
  m_func2_func = 0;
  m_func2_data = 0;
  m_destructor_func = 0;
  m_destructor_data = 0;
}

ExampleSubclass::~ExampleSubclass() {
  if (m_destructor_func) {
    m_destructor_func(m_destructor_data);
  }
}

void ExampleSubclass::func1() {
  return Example::func1();
}

void ExampleSubclass::set_vfunc2_func(int (*func)(void*, double), void* data) {
  m_func2_func = func;
  m_func2_data = data;
}

void ExampleSubclass::set_destructor_func(void (*func)(void*), void* data) {
  m_destructor_func = func;
  m_destructor_data = data;
}

int ExampleSubclass::vfunc2(double y) {
  if (m_func2_func) {
    return m_func2_func(m_func2_data, y);
  } else {
    return Example::vfunc2(y);
    // or abort() if the method was pure virtual
  }
}

The wrapper exposes all protected functions of the base class and reimplements all its virtual functions. It allows to add callbacks for each virtual method. If a callback is not set, it calls base class implementation, as if the method was not reimplemented. It also allows to add a destructor callback for cleanup purposes.
Rust API changes the order of operations. First, the user needs to assign virtual functions. Then the object can be created:
let x = ExampleSubclassBuilder::new();
x.bind_func2(|arg| arg as i32);
let object: CppBox<ExampleSubclass> = x.new(constructor_arg);

If not all pure virtual functions were bound, ExampleSubclassBuilder::new function will panic.
ExampleSubclassBuilder::new creates a Rust struct that owns all lambdas and ensures that they are not deleted until the object itself is deleted. The struct is kept in memory by calling mem::forget. The destructor callback is used to delete this struct when it's not needed anymore. If the base class's destructor is virtual, you can pass the ExampleSubclass object's ownership to the C++ library. When it delets the object, the Rust struct cleanup will still be done. If the base class's destructor is not virtual, the only correct way to release the resources is to let CppBox delete the object.
ExampleSubclass Rust type is just a wrapper for ExampleSubclass C++ class, similar to other class wrappers. It exposes all its public methods, thus providing access to protected methods of the base class. Callback setters are not exposed. ExampleSubclass will provide means to downcast it to Example base type, just as any other derived class.
Example of initialization of a Rust struct with a subclass field:
impl MyExampleSubclass {
  pub fn new(arg: i32) -> MyExampleSubclass {
    let mut obj = MyExampleSubclass {
      example: CppBox::null(),
      other_data: 42,
    };
    let subclass = ExampleSubclassBuilder::new();
    x.bind_func2(|arg| {
      // can capture `self` or its field in some form here
      arg as i32
    });
    obj.example = x.new(arg);
    obj
  }
}

Could it possible use https://github.com/rust-lang-nursery/rust-bindgen way?

Can you describe what is the way you mean? I found the doc page that says that they don't support cross language inheritance at all.

They support inheritance (its the first stated) and even somehow work with vtable as I've seen in their code.

That crate is exactly what I needed... but is outdated and broken. Is there any way to create event filter QObjects using just the base ritual Qt crates?

That crate is exactly what I needed... but is outdated and broken. Is there any way to create event filter QObjects using just the base ritual Qt crates?
Update: I was using the crate wrong and the event filters do work. Still a bit of a hassle, but at least theres a solution.

Hi Melvyn. Do you mind sharing a snippet of how you used it? Having a hard time making it work

Sure, it's pretty messy (first attempts) but works:
unsafe fn add_event_filters(self: &Rc<Self>) {
    fn file_list_event_filter(obj: &mut QObject, event: &mut QEvent) -> bool {
        // Function body has to be unsafe rather than function, because the filter requires an FnMut
        // Which only safe function pointers are
        unsafe {
            if event.type_() == q_event::Type::DragEnter {
                println!("Trace: received DragEnter event.");
                // Transmute is safe because we check the event type
                let devent: &mut QDragEnterEvent = transmute(event);
                let mime_data = devent.mime_data().text().to_std_string();
                // There is a method QMimeData.urls() but dealing with QLists is no fun
                let urls: Vec<&str> = mime_data.lines().collect();
                // Check if there are any files, excluding paths ending with / (dirs)
                if devent.mime_data().has_urls()
                    && urls
                        .iter()
                        .any(|url| !url.is_empty() && !url.ends_with('/'))
                {
                    println!("Trace: event has valid data, accepting.");
                    devent.set_drop_action(DropAction::LinkAction);
                    // If we don't accept the DragEnter event, the DropEvent won't trigger
                    devent.accept();
                    return true;
                }
            } else if event.type_() == q_event::Type::Drop {
                println!("Trace: received Drop event.");
                // Transmute is safe because we check the event type
                let devent: &mut QDropEvent = transmute(event);

                let obj_type = CStr::from_ptr(obj.meta_object().class_name());
                if obj_type.to_bytes() != b"QListWidget" {
                    println!(
                        "Error: received even on wrong QObject ({:?} instead of QWidget)",
                        obj_type
                    );
                    return false;
                }
                // Transmute is safe because we check the widget type
                let list_widget: &mut QListWidget = transmute(obj);

                let mime_data = devent.mime_data().text().to_std_string();
                let urls: Vec<&str> = mime_data.lines().collect();
                for file in urls.iter().filter(|f| !f.ends_with('/')) {
                    list_widget.add_item_q_string(qs(file.replacen("file://", "", 1)).as_ref());
                }
                devent.set_drop_action(DropAction::LinkAction);
                devent.accept();
                return true;
            }
            return false;
        }
    }
    self.ui.lib_list.install_event_filter(
        CustomEventFilter::new(Self::file_list_event_filter).into_raw_ptr(),
    );
}

Sure, it's pretty messy (first attempts) but works:
unsafe fn add_event_filters(self: &Rc<Self>) {
    fn file_list_event_filter(obj: &mut QObject, event: &mut QEvent) -> bool {
        // Function body has to be unsafe rather than function, because the filter requires an FnMut
        // Which only safe function pointers are
        unsafe {
            if event.type_() == q_event::Type::DragEnter {
                println!("Trace: received DragEnter event.");
                // Transmute is safe because we check the event type
                let devent: &mut QDragEnterEvent = transmute(event);
                let mime_data = devent.mime_data().text().to_std_string();
                // There is a method QMimeData.urls() but dealing with QLists is no fun
                let urls: Vec<&str> = mime_data.lines().collect();
                // Check if there are any files, excluding paths ending with / (dirs)
                if devent.mime_data().has_urls()
                    && urls
                        .iter()
                        .any(|url| !url.is_empty() && !url.ends_with('/'))
                {
                    println!("Trace: event has valid data, accepting.");
                    devent.set_drop_action(DropAction::LinkAction);
                    // If we don't accept the DragEnter event, the DropEvent won't trigger
                    devent.accept();
                    return true;
                }
            } else if event.type_() == q_event::Type::Drop {
                println!("Trace: received Drop event.");
                // Transmute is safe because we check the event type
                let devent: &mut QDropEvent = transmute(event);

                let obj_type = CStr::from_ptr(obj.meta_object().class_name());
                if obj_type.to_bytes() != b"QListWidget" {
                    println!(
                        "Error: received even on wrong QObject ({:?} instead of QWidget)",
                        obj_type
                    );
                    return false;
                }
                // Transmute is safe because we check the widget type
                let list_widget: &mut QListWidget = transmute(obj);

                let mime_data = devent.mime_data().text().to_std_string();
                let urls: Vec<&str> = mime_data.lines().collect();
                for file in urls.iter().filter(|f| !f.ends_with('/')) {
                    list_widget.add_item_q_string(qs(file.replacen("file://", "", 1)).as_ref());
                }
                devent.set_drop_action(DropAction::LinkAction);
                devent.accept();
                return true;
            }
            return false;
        }
    }
    self.ui.lib_list.install_event_filter(
        CustomEventFilter::new(Self::file_list_event_filter).into_raw_ptr(),
    );
}

Thanks Melvyn. Had been experimenting with Paint events, still maneuvering around to make it work. 👨🏽💻


Nothing but comments generated

using aws-appsync-codegen version 0.17.2
node version 9.3.0
npm version 5.6.0
typescript version 2.7.2
Given schema.graphql:
interface CanAccess {
  groupsCanAccess: [String]
  id: ID!
  owner: String!
  peopleCanAccess: [String]
}

type Mutation {
  createTemplateType(input: CreateTemplateTypeInput!): TemplateType
  deleteTemplateType(input: DeleteTemplateTypeInput!): TemplateType
  updateTemplateType(input: UpdateTemplateTypeInput!): TemplateType
}

type Project implements CanAccess {
  groupsCanAccess: [String]
  id: ID!
  owner: String!
  peopleCanAccess: [String]
  rating: Int
  tags: [String]
  title: String!
}

type Query {
  getTemplateType(id: ID!, title: String!): TemplateType
  listTemplateTypes(after: String, first: Int): TemplateTypeConnection
}

type TemplateType {
  id: ID!
  imageUrl: String
  title: String!
}

type TemplateTypeConnection {
  items: [TemplateType]
  nextToken: String
}

input CreateTemplateTypeInput {
  id: ID!
  imageUrl: String
  title: String!
}

input DeleteTemplateTypeInput {
  id: ID!
  title: String!
}

input UpdateTemplateTypeInput {
  id: ID!
  imageUrl: String
  title: String!
}

Then running aws-appsync-codegen introspect-schema schema.graphql --output schema.json
Followed by running aws-appsync-codegen generate **/*.graphql --schema schema.json --target typescript --output operation-result-types.ts or aws-appsync-codegen generate schema.graphql --schema schema.json --target typescript --output operation-result-types.ts
I expect some sort of a file to be generated that has some sort of code. Instead, it generates the following:
/* tslint:disable */
//  This file was automatically generated and should not be edited.

The following is the Swift result based on README.md
//  This file was automatically generated and should not be edited.

import AWSAppSync

The following is Flow results based on command in README.md
/* @flow */
/* eslint-disable */
//  This file was automatically generated and should not be edited.

and nothing more.
I can't say what I expect other than using your docs something that might look like the following, but more robust.
export type CharactersQuery = {
  characters: Array<{
    __typename: 'Human',
    name: string,
    homePlanet: ?string
  } | {
    __typename: 'Droid',
    name: string,
    primaryFunction: ?string
  }>
}

Same applies if I use any of the other commands in README.md file for generation

Hi @teddarling we're currently investigating.

@teddarling it looks like you're using the SDL file which defines your GraphQL API and not an *.graphql file which has queries and mutations that define the selection set for your operations.
We have a detailed walk through of this process in the AWS AppSync documentation: https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-ios.html
Can you try again with GraphQL queries and/or mutations defined?

So, using the info from your link, I am able to add queries and get things to work using the schema.graphql file downloaded from the AppSync dashboard.

@teddarling great is everything working for you now?


update jenkinsfile to add more fields and check before package

@inviscid Good catch. Definitely need to re-add that.

Codecov Report

Merging #38 into develop will decrease coverage by 0.31%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop      #38      +/-   ##
===========================================
- Coverage    62.46%   62.14%   -0.32%
===========================================
  Files          534      534
  Lines        30621    30621
  Branches      2821     2821
===========================================
- Hits         19126    19029      -97
- Misses       11322    11410      +88
- Partials       173      182       +9

Flag
Coverage Δ

#cypress
53.20% <ø> (-0.86%)
:arrow_down:

#python
67.40% <ø> (ø)

Impacted Files
Coverage Δ

...rontend/src/SqlLab/components/QueryAutoRefresh.jsx
47.72% <0.00%> (-18.19%)
:arrow_down:

...et-frontend/src/SqlLab/reducers/getInitialState.js
33.33% <0.00%> (-16.67%)
:arrow_down:

superset-frontend/src/reduxUtils.ts
49.27% <0.00%> (-14.50%)
:arrow_down:

superset-frontend/src/SqlLab/actions/sqlLab.js
17.24% <0.00%> (-8.52%)
:arrow_down:

...rontend/src/SqlLab/components/TabbedSqlEditors.jsx
50.34% <0.00%> (-8.40%)
:arrow_down:

superset-frontend/src/components/TableSelector.jsx
48.03% <0.00%> (-3.94%)
:arrow_down:

...rontend/src/SqlLab/components/SqlEditorLeftBar.jsx
41.17% <0.00%> (-3.93%)
:arrow_down:

superset-frontend/src/SqlLab/reducers/sqlLab.js
11.11% <0.00%> (-3.30%)
:arrow_down:

...end/src/SqlLab/components/TemplateParamsEditor.jsx
88.57% <0.00%> (-2.86%)
:arrow_down:

...erset-frontend/src/SqlLab/components/SqlEditor.jsx
48.07% <0.00%> (-2.57%)
:arrow_down:

... and 2 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 f1e5a67...6b2e01a. Read the comment docs.