Proposal: Allow hooks managed by the event manager the ability to modify the query

I am trying to automatically add a useful MongoDB $comment (http://docs.mongodb.org/manual/reference/operator/meta/comment/) to my project whenever a Mongo update takes place. In order to do this, it appears that I will need to slightly modify the query before it is executed against the mongo driver.
It appears that the most elegant way for me to do this would be to register a listener on the collectionPreUpdate event within my project with code that looks roughly like this:
+    public function collectionPreUpdate(UpdateEventArgs $args)
+    {
+        $query = $args->getQuery();
+        $comment = $this->createUsefulComment();
+        $query['$comment'] = $comment;
+        $args->setQuery($query);
+    }

Doctrine/mongodb was not designed to allow the event hooks to modify the query as part of the events system. However, I submit to you all that this is a situation in where allowing me to customize the query before it's executed is extremely useful. I'm submitting this PR as an example of something I'm trying to accomplish and asking for your advise on if there is a better way to do this currently, or, if perhaps we should have something like this built into the repo.

Personally I'm :+1:

Any chance we can bump this? I've been on a private fork for a while now and this has been an extremely valuable technique for us. I'd like to get back on the main line.

Sorry, I was looking at this the other day but didn't get around with it. While I'm not sure what (besides "we're too slow to implement new MongoDB features" ;)) it could be used for, I don't see a problem adding this. My only question is, why only for update? Why not add it for all other query events as well?

It may be useful for the other query types. In my use case, it seemed this technique was useful for setting a $comment on my write queries.

Shall I take a stab at completing this feature? We'd like to see this make it into the next tag that Doctrine ships.

Sure, it's a good idea, I don't have time to do this myself, but

don't want to spoil all the fun, but this requires tests :-)

I just submitted a revision to the PR. I tried to implement every single Event that receives context information which could be manipulated before processing in Doctrine\MongoDB\Collection.

After a first look, I think this definitely needs tests to ensure the changed values are used for queries, not the originals.

@alcaeus My strategy in the PR was to find any place where there's a "do" command such as doGroup, doFindOne() etc were the listener is receiving variables that are subsequently passed into the EventListener. Each one of the Listeners I changed to support this has tests such as in FindEventArgsTest.php
The only thing I'm not specifically testing for (and I don't think the current codebase is testing for either) is if the final integration works between the Collection.php class and the Event Listener calls I modified.
I suppose I could setup a test where I register a listener on every one of the functions I modified where my listener changes each of the variables and then I mock out the "do" function in order to ensure that the change is detected. If you think that is necessary, please say so and I'll do it.

I'm not sure you'd need a mock; I think functional tests should do:

register event subscriber designed to change query (e.g.: ['foo' => 'bar'] is changed to ['foo' => 'foo'])
run query against basic data (e.g.: ['foo' => 'bar'])
ensure result matches the changed query, not the original

Since this is the center of your logic, there should be tests for it as @beberlei mentioned :)

Sorry if this sounds pedantic but I think the proper test here would not need to fire a real database query. I think the test should be able to prove that "If an event handler tries to change the $query, $newObj, $options, or whatever that was changed via my new event setters, that by the time the do() function fires, we receive the changed value."

Just pushed the rest of the tests to this PR: https://github.com/doctrine/mongodb/commit/3ea9c6537e6514883217cebbad2799f5c9e7367f

hmm.. i dont see a merge button. :)

hmm.. i dont see a merge button. :)

That's because you don't have merge permission here - it's up to maintainers to do that.

I just confirmed that this change set works with my app when I try to use it to set a mongodb $comment.

:+1:
FWIW, once this is released you might as well use the comment method in query builder:
https://github.com/doctrine/mongodb/blob/master/lib/Doctrine/MongoDB/Query/Builder.php#L307

Seeking confirming from the maintainers that there are no additional changes requested.

I was waiting for @jmikola to take a look at this before merging it. Due to conference travels this might take another few days.

Kindly seeking review by @jmikola when he's got some time. Thank you! ;)

Kindly seeking review by @jmikola .. thank you

Left some notes above for small fixes, but nothing major. One separate concern (not tied to a particular line of code) is that we already have MutableEventArgs to allow listeners for change results from the Collection methods. Additionally, that class has logic to check if some event data has actually changed (calculated in setData()). The class name also made sense at the time because EventArgs and its various sub-classes were all immutable (much like other events in DBAL, ORM, and ODM).
I wasn't able to find any events in DBAL and ORM for modifying database operations (i.e. queries), so there's probably not a similar API to compare this to -- I'm also not sure if/how they allow services to hook in and modify queries.
In any event, I wonder if we should leave EventArgs as-is and just start using MutableEventArgs, since the class already exists. Then the immutable EventArgs would remain in place for its other use cases, such as connection events. Beyond that, is there value in having isXXXChanged() methods for the various other event classes we're modifying here?

@jmikola As for the MutableEventArgs vs. EventArgs, that's your call.
In my case, I have already done the full regression test with this branch against my project and I can see everything works as expected so I'm just excited to see this ship so we can get back on the main line and off of our fork.

@jmikola Just wanted to triple check there's no other actions you are requesting of me on this ticket. We are very excited to see this hit the main line asap.

@blockjon: Sorry, I missed the notifications. Nothing to do on your end here. I'll quickly discuss with @alcaeus and then we can resolve this. Thanks for the contribution :+1:

I'm alright with adding setters to the named event classes (e.g. AggregateEventArgs), but I'd like to bring up one last point about EventArgs and MutableEventArgs. For the record, MutableEventArgs dates back to https://github.com/doctrine/mongodb/commit/161be2d2385142f3a7060cc0e9f54edb21cd7a7e and #94.
On a side note, while it'd be nice if we had an interface to denote whether an event class was mutable or immutable, nothing of the sort exists at the moment and extending MutableEventArgs doesn't make sense since it only concerns itself with tracking changes to the $data property.

Let's start by reviewing places where EventArgs is used:

Collection.php

preBatchInsert
preDropCollection, postDropCollection
preFindAndRemove
preGetDBRef
preInsert
preRemove, postRemove
preSave
postUpdate

Connection.php

preDropDatabase, postDropDatabase
preConnect, postConnect
preSelectDatabase, postSelectDatabase

Database.php

postCreateCollection
preDropDatabase, postDropDatabase
preGetDBRef
preGetGridFS, postGetGridFS
preSelectCollection, postSelectCollection

I'd prefer to leave EventArgs immutable and change some of these events to use MutableEventArgs (with the addition of a setOptions() method you require). Of these, I think only you're only requesting mutability for the following events:

Collection.php

preBatchInsert
preFindAndRemove
preInsert
preRemove, postRemove
preSave
postUpdate

There is a potential caveat with preBatchInsert, preInsert, and preSave, since ext-mongo potentially modifies the PHP zval and injects an _id field into the array/object. Currently, the arguments passed to these Collection methods make their way directly to the driver methods, which means the user can still access the field on whatever PHP value they supplied as an argument. If we start using MutableEventArgs and allow that argument to be changed, this could break that behavior. The driver would instead inject _id into the changed $data argument, leaving the original untouched. Users would then only be able to access that _id by hooking into the post event.
For that reason, I'd prefer to see preBatchInsert, preInsert, and preSave left as-is and continue to use immutable EventArgs and change only the following to use MutableEventArgs:

Collection.php

preFindAndRemove
preRemove, postRemove
postUpdate

This would still allow you flexibility to modify the queries used in deletes and updates, which may be all that your original use case required (of the methods dispatching EventArgs).

Opened https://github.com/lyft/mongodb/pull/1 with suggested changes. /cc @blockjon

@alcaeus: I think we're good to merge this with additional changes from https://github.com/lyft/mongodb/pull/1.

As I stated on https://github.com/lyft/mongodb/pull/1, this change is fine so long as I can modify the query object within the collectionPreUpdate event.

@blockjon: I don't expect any conflict with your needs. We're only using MutableEventArgs for preFindAndRemove, preRemove, postRemove, and postUpdate. The preBatchInsert, preInsert, and preSave events stick with immutable events (for reasons I cited in my previous post). All of the other events objects (including preUpdate) are using their respective event objects, which are now mutable per your own patch. :+1:

Merged manually. Thank you @blockjon for your contribution!


[WIP] Remove remaining template fields

Rebased this to fix history, rebased version is PR #2075
Work will continue there


test_events: Refactor do_set_user_display_settings_test.

Remove individual user setting tests and replace with test_set_user_display_settings.
Finishes PR #5023.

Automated message from Dropbox CLA bot
@sarahcstringer, it looks like you've already signed the Dropbox CLA. Thanks!

Codecov Report

Merging #5514 into master will decrease coverage by <.01%.
The diff coverage is 90%.

@@            Coverage Diff             @@
##           master    #5514      +/-   ##
==========================================
- Coverage   86.65%   86.64%   -0.01%
==========================================
  Files         432      432
  Lines       53568    53562       -6
  Branches     2090     2090
==========================================
- Hits        46418    46411       -7
- Misses       7150     7151       +1

Impacted Files
Coverage Δ

zerver/tests/test_events.py
98.93% <90%> (-0.15%)
:arrow_down:

Continue to review full report at Codecov.

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

Merged!  Nice work, @sarahcstringer!


How to Upgrade without Changing Name or Creating New Contract ?

All the examples make it look like to upgrade a contract, you are changing the proxy to a new implementation address whose Contract name is different from the old implementation. (BoxV2 against Box).
But how do you make changes to the old implementation without changing its name and successfully upgrade the proxy?
For example, you fix a simple logic in one line of code in Box and then you want the proxy to reflect this. But then following the provided steps don't work. Even after setting unsafeSkipAllChecks to false in opts.
So how do you upgrade without changing name?

You could use the same contract name in a differently named Solidity file, then refer to that contract using its fully qualified contract name in the format FILE_PATH:CONTRACT_NAME.  For example, "contracts/MyTokenV2.sol:MyToken"

Would it be possible to download the source from etherscan/polygonscan/etc and use that automagically as a comparison? Similar to what the truffle debugger did with the --fetch-external flag. I mean, would something like that somehow be considered as an addition to a roadmap?

@tomw1808 I think that makes sense as an enhancement and we will consider that as part of this issue -- we have a similar enhancement in mind for Hardhat in https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/598

ohhh so basically right now we need both contracts.
i was expecting it to run a comparison with the previous implementation, but it does make sense since if the contract has never been deployed there would be nothing to check against, same with using the same contract.
i think a cache/artifact system eill be a good idea to store previous versions to check against for upgrades where it stores the previous versions that oz foundry would then use to compare the current iteration (this artifact MUST be included in the commit since it is needed in future upgrades), doing it like this will make it easier to have fewer files while also allowing the oz checks to work.
now the problem here would be the changes mid development if something changed and created a conflict with the old builds (uncommited local)
ex.

commited build
changes made 1
conflicting change made for change 1

if so there should be a command to revert the changes for the artifacts to the commited build to clear the conflicts (which should be doable with git)
yeah now that i think about this enough it would be complicated to implement although it would be easier for the development side since there would be fewer files
what i was doing was just adding a public constant var for the contract version instead of a new implementationV2 and hoping the check would be smart enough to compare the changes from the previous contract state 😂which is foolish hahaha

So, I know that is very specific to our own project, but I made a sort of prototype now for a release pipeline. Not that we have so many releases, but I still like to have a functioning reassurance that I'm not overwriting anything in production that shouldn't be overwritten. I also know that doesn't apply to every project, ours is a bit bigger and dates back before hardhat even existed, so there was a lot of porting going on over the years. Anyways I ended up with something like this:

downloading the existing contracts from polygon explorer
opening anvil with a polygon mainchain fork and overwrite some storage slots so I don't need the hardware wallet to deploy new versions of a proxy
verifying the new contracts against the previous version
deploying them to the forked chain and running some unit tests
deploy everything using frame wallet with the ledger

So that would be what I will end up with. The main scripts are actually really not a lot, however its finicky and of course if would be better if there was some sort of toolchain that supported this somehow with a standard workflow...
Here's the script to download the polygon contracts (mind our own folder structure comes from truffle before):
https://github.com/Morpher-io/MorpherProtocol/blob/account-abstraction/helpers/chainfork/dl_source.js
and here's the script that runs everything, the script, then anvil and then overwrites the storage and then runs forge script to validate the contracts (and then run the unit tests in the future):
https://github.com/Morpher-io/MorpherProtocol/blob/account-abstraction/helpers/chainfork/start.sh
May it help someone out there...

@tomw1808 I think that makes sense as an enhancement and we will consider that as part of this issue -- we have a similar enhancement in mind for Hardhat in https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/598

if it's going to be fetched from an external source i think adding a custom natspec that indicates the chain, address and or name of the reference contract implementation would be good since not only will the deployed next version implementation would have a reference pointing to that contract itself meaning people will be able to see previous versions of the contract with clear reference, it would also make it easier on the development side since developers would just need to add a natspec for it without adding more contracts for new implementation versions.
the problem i am seeing with this is which would be used to check the code?
address().code (i don't know if it is possible to use this for storage layout verification)
or
block explorer api for fetching the source code (this would cost money since it is usually under pro tier feature)
maybe there are other ways to do it too

@Metaxona

i think a cache/artifact system eill be a good idea to store previous versions to check against for upgrades

For Hardhat, we do exactly that.  Hardhat Upgrades uses network files to save the storage layout of deployed contracts, which are used for comparison during later upgrades.  We decided not to use this approach for Foundry for the following reasons:

Unlike Hardhat, Foundry scripts first run as a local simulation on a local EVM.  A later phase of forge script can optionally broadcast some of the transactions that were simulated.  From the Foundry script, I am not aware of a way to properly determine if the current part of the code is being broadcast (and even if it is, the script may still fail at a later step).  Therefore, we cannot conclusively know when a deployment has occurred to a real network before saving the storage layout.
The maintenance of network files has been an issue for some Hardhat users in the past, since we recommend committing them to source control but users may sometimes forget to do so or lose certain versions of those files accidentally.  We determined that network files should not be used in the Foundry plugin's design to avoid these kinds of issues that users may face.

if it's going to be fetched from an external source i think adding a custom natspec that indicates the chain, address and or name of the reference contract implementation would be good

Supposedly the chain and address can already be determined from how the user is calling the upgrade function (via the connected network and the address parameter), but perhaps which specific explorer to get source code from needs to be provided somewhere.
@tomw1808

I made a sort of prototype now for a release pipeline

Thanks for sharing. Another possible future approach may be to keep previous releases in a different branch, and when we support comparisons with other build info dirs, the storage layout from the build info of the previous branch can be used for reference.


File upload does not accept new versions

If you upload a file, and then attempt to upload a file of the same name, nothing will happen. The originally uploaded version remains as-is.

Good catch. I need to set the If-Match header on the upload requests.


callout can work on the webpage, but it cannot work on the win application

It' solved in latest win app


The Check function returns exit(-1) which exits the Python interpreter

In [1]: y = np.random.randint(2, size=100)

In [2]: X = np.random.randn(100, 10)

In [3]: from xgboost import XGBClassifier

In [4]: mod = XGBClassifier(colsample_bytree=.05)

In [5]: mod.fit(X, y)
colsample_bytree=0.05 is too small that no feature can be included

And exits the interpreter. This happens in other places whenever Check return exit(-1).

this can be fixed. If there is a c function from python lib that allows us
to throw exception from shared lib. Actually we have a custom error msg
that allows redirection of error reporting. So in R it throws an error
instead. The only problem was I am not very familiar whether there exists
such hook in python
On Mon, Jun 15, 2015 at 2:13 PM Skipper Seabold<EMAIL_ADDRESS>wrote:

In [1]: y = np.random.randint(2, size=100)
In [2]: X = np.random.randn(100, 10)
In [3]: from xgboost import XGBClassifier
In [4]: mod = XGBClassifier(colsample_bytree=.05)
In [5]: mod.fit(X, y)
colsample_bytree=0.05 is too small that no feature can be included
And exits the interpreter. This happens in other places whenever Check
return exit(-1).
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/xgboost/issues/356.

Is that the stuff in R-package/src/xgboost_assert.c?

There is a error function in R runtime lib that can be called todo the
things
On Mon, Jun 15, 2015 at 2:31 PM Skipper Seabold<EMAIL_ADDRESS>wrote:

Is that the stuff in R-package/src/xgboost_assert.c?
—
Reply to this email directly or view it on GitHub
https://github.com/dmlc/xgboost/issues/356#issuecomment-112217589.

OK, here is one solution that can solve this problem, I am writing it down in case we want to do it in future. Basically, it seems to be hard to pass exception out from ctypes.
One possible solution: Rewrap the current python interface using cython, this means take the functions in wrapper.h and do the wrap. There wrapper need to be recompiled into a C++ module(by removing extern C with a macro switch), and customized the behavior of Check to throw an exception instead, cython will allow the exception to pass through and translated it into a python exception.
This do require a bit work to do and I do not have time recently on this. So I am putting the solution down here in case anyone is interested in take a stab on this
Tianqi

Another way would be to standardize current C interface, make every function return a integer referring to whether the result is successful or not. Catch the exception in the wrapper function and handle it properly, this allows us to keep the current ctypes interface without introducing cython dependency

should be fixed by #373


roles: add AT claims validation

Coverage increased (+0.2%) to 86.9% when pulling f6cf93bc49aa7d93951b2ab8367f1f9fd760d378 on dissoupov into dd43d2899cc36d6172ae1ae69fa35b15058083ab on main.


correct docker-compose file

Hi
Although the current docker-compose file works, there is some miss match between the recommended settings and the actual compose file's content.
So you suggest the following for docker run:

You should volume mount the /app/static directory as it contains the config.json (the file containing all links and settings which you will want to persist). It also contains an images directory which is used with the image lookup.

docker run -d \
  --name bender \
  -p 8080:8080 \
  -v </your/local/assets/>:/app/static \
  --restart=always \
  jez500/bender:latest

To map the /app/static folder, but in the compose file, the only volume is the www/assets folder
    volumes:
      - /your/local/assets/:/www/assets

If i try to use the same /app/static volume for the compose like you use for the docker run command, i get this:
    volumes:
      - /home/pi/docker/bender/static/:/app/static
    environment:
      - INIT_ASSETS=0 # i had to change this to 0

Nothing loads, only the page title is there as "Bender link dashboard".
if i add both volumes:
    volumes:
      - /home/pi/docker/bender/static/:/app/static
      - /home/pi/docker/bender/assets/:/www/assets
    environment:
      - INIT_ASSETS=0

With INIT_ASSETS=1 i get this the following error:

No configuration found, installing default config & assets
Assets directory not writable. Check assets directory permissions & docker user or skip default assets install by setting the INIT_ASSETS env var to 0

With INIT_ASSETS=0 - nothing loads
So could you update the docker-compose file with all the necessary volumes? Maybe i did something wrong, but as i see it, i need to map /app/static to store the configs outside of the container, and i have to use INIT_ASSETS=1 otherwise nothing loads. I think i need both of these.

Hi @S0und
thanks for raising this, yep should be /app/static and not /www/assets for volume mount. INIT_ASSETS=1 should remain for initial creation of config.json but is not required after that

This should be solved in 1.0.3 now https://hub.docker.com/r/jez500/bender/tags


Rubocop is not working

Rubocop on Visual Studio Code with Chef Infra Extension for Visual Studio Code is not working
Describe the problem
I installed Chef Infra Extension for Visual Studio Code extension and everything works fine apart from rubocop. I have MAC and I changed the executable path which is /usr/local/bin/rubocop but still no luck.
Software Version
I am using MAC OS Mojave Version 10.14.6
VSC Version: 1.40.2
Replication Case
I intensely wrote the false code but it was not underlined and there was no sign of rubocop.

@mudricd is this still occurring?

@mudricd is this still occurring?

I've got the same issue:
If I just run the Ruby extension (and disable the Chef extension) - rubocop runs and displays issues but doesn't use the cookstyle rules. That's fine and is to be expected I guess.
When the Chef extension is installed/enabled I don't see anything from the linter.

I've tried specifying the path to rubocop
I've tried to generate a cookstyle config cookstyle --auto-gen-config and then selectively re-enable the disabled checks
I've tried to increase the rubocop.fileCountThreshold setting

Nothing has worked. I still see no errors in my file.
I'm using VSCode on windows and using the Remote SSH Extension to SSH into an Ubuntu 20.04 machine. The chef code is hosted on the Ubuntu machine.

Seems to working now.
I set rubocop path to point to cookstyle instead and it seems to work.
"rubocop.path": "/opt/chef-workstation/bin/cookstyle"


Fixing CheckBox Bug

Fixes #2894
Describe the changes you have made in this PR -
Changed deleteOfflineProject under data.js file.
Screenshots of the changes (If any) -
https://user-images.githubusercontent.com/78701055/152624966-4275b6ea-0b49-4387-90b1-b16fd69566c3.mp4
Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Coverage remained the same at 81.774% when pulling 5074b95450f059fb1f6eaf78c04b0d13e68215b8 on Ankur-Agrawal-ece20:CheckBox-Bug-fixing into a978b46a15ad68aee6a19924b1d35bbe73eccae1 on CircuitVerse:master.


Adding alt text

Hello!
Thank you for this work! I was wondering how one would go about adding alt text and ARIA labels to this template?
Thank you!

If you want to put an image in your markdown source and make sure that it has alt text, I think the syntax is ![Alt](/path/to/img.jpg "image title").
If you want to update the templates themselves, I think they are mostly in the _includes and the _layouts directories. For example, here is the line in the template that adds alt text to the author's avatar.


Failed to activate the atom-ctags package

Cannot find module '/opt/atom/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'
Error: Cannot find module '/opt/atom/resources/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node'     at Module._resolveFilename (module.js:470:15)     at Module._resolveFilename (/opt/atom/resources/electron.asar/common/reset-search-paths.js:35:12)     at Function.get_Module._resolveFilename (/opt/atom/resources/app/src/module-cache.js:354:58)     at Module.require (file:///opt/atom/resources/app/static/index.js:40:43)     at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:10)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee:1:1)     at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)     at Object.value [as .coffee] (/opt/atom/resources/app/src/compile-cache.js:239:29)     at Module.load (module.js:488:32)     at tryModuleLoad (module.js:447:12)     at Function.Module._load (module.js:439:3)     at Module.require (file:///opt/atom/resources/app/static/index.js:47:45)     at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:3:9)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1)     at Object.<anonymous> (/home/zc/.atom/packages/atom-ctags/lib/ctags-cache.coffee:2:1)     at Module.get_Module._compile (/opt/atom/resources/app/src/native-compile-cache.js:106:36)     at Object.value [as .coffee] (/opt/atom/resources/app/src/compile-cache.js:239:29)     at Module.load (module.js:488:32)     at tryModuleLoad (module.js:447:12)     at Function.Module._load (module.js:439:3)     at Module.require (file:///opt/atom/resources/app/static/index.js:47:45)     at require (/opt/atom/resources/app/src/native-compile-cache.js:66:33)     at Object.activate (/home/zc/.atom/packages/atom-ctags/lib/main.coffee:48:19)     at Package.module.exports.Package.activateNow (/opt/atom/resources/app/src/package.js:253:25)     at /opt/atom/resources/app/src/package.js:225:38     at Package.module.exports.Package.measure (/opt/atom/resources/app/src/package.js:99:21)     at /opt/atom/resources/app/src/package.js:218:32

Temporary fix.
edit ~/.atom/packages/atom-ctags/node_modules/ctags/src/ctags.coffee and in the first line
{Tags} = require(process.resourcesPath + '/app/node_modules/ctags/build/Release/ctags.node') change app toapp.asar.unpacked, which becomes
{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

@kkraju4u my file already became as
{Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node')

but it's not working

@michaelczhou If you are using linux, try locate ctags.node in terminal to find the location of the node package. use that location in the coffee file.

Hi, is there any solution for mac?
My first line in ctag.coffee is {Tags} = require(process.resourcesPath + '/app.asar.unpacked/node_modules/ctags/build/Release/ctags.node') by default

@sergeialimov for Mac,actually you could find the ctags.node in app directory,/Applications/Atom.app/Contents/Resources/app/node_modules/ctags/build/Release/ctags.node,not in the app.asar.unpacked directory,so you should change the first line of your ctag.coffee file to  {Tags} = require(process.resourcesPath + '/app/node_modules/ctags/build/Release/ctags.node'),which just replace the app.asar.unpacked to app,it works for me,wish it would work for you.


$event->getIds() returns null for CustomerEvents::CUSTOMER_WRITTEN_EVENT

I have an event subscriber listening for CustomerEvents::CUSTOMER_WRITTEN_EVENT.
But when calling $event->getIds() I get null back.

My current workaround:
array_map(
  fn ($result) => $result->getPrimaryKey(),
  $event->getWriteResults()
)

Is this the correct place to report such issues? Or would https://github.com/shopware/platform be more appropriate? (or the forum?)
Edit: currently I'm at shopware/development tags/v<IP_ADDRESS>

Hello,
Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.
If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.


Fixed issues in VulkanTriangle Demo

Use TryGetInstanceExtension instead of deprecated TryGetExtension (fixed #349)
Moved _vkSwapchain initialization to CreateSwapChain()
Fixed out of bounds issue when iterating over presentModes

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


BottomBar will slide to screen bottom half and freeze some seconds when first time to select other bar item.

Screenshot:

Looks add CoordinatorLayout will fix this issue


Explorer problems

Exiting Explorer returned from OpenFile closes parents panel, also without notifying on UIClosing, not letting to interrupt.
Is that intended behaviour? If so, is there a way to implement file explorer chaining (like archive within archive)?
First created Explorer does not notify ExploreParent until other folder is opened.
After setting CanExploreLocation, only File.Name is passed to GetContent & OpenFile, without File.Data

I need some more details:

What do you want to in OpenFile?
How do you code this?

I do not understand the description of the problem, to be honest.

From the brief description, it looks normal. If an explorer use ExploreLocation then

/// It implements <see cref="Explorer.ExploreLocation"/>, works with pure paths, i.e. files without <see cref="FarFile.Data"/>.

Please do not be shy to provide more details and describe the scenarios you are
coding. Some pieces of your code will help, too. Note that I wrote this API
several years ago.

I basically expected OpenFile to allow me to handle specific file format like a directory, so that I can view it, and after go back to where I was earlier.
Kind of like with arclite plugin, where you can explore archive within archive within archive etc, but here it would just return to original file directory instead of previous archive object.
Here's my code, but basically returning any explorer in OpenFile, even empty one and trying to go back just closes the panel instead of returning control to parent explorer.
My use case is viewing Unreal Engine 4's pak file. Within this file, in some directory is a Vorbis sound bank, which is basically storing audio tracks in a file. I'd like to be able to view the bank file and return to viewing pak file after.

Maybe I'm initializing Explorer in a wrong way, but basically Location isn't applied (just empty line) and ExploreParent isn't called for the first Explorer, after ExploreDirectory is called and returns valid explorer, UIExplorerEntered is called for the first time, ExploreParent returns previous Explorer and then Location is applied and ExploreParent will be called.
Example:
Created empty Explorer, going back to parent folder, UIExplorerEntered and ExploreParent aren't called at all.
Created Explorer with single directory, open directory, ExploreDirectory is called as expected, go back to original folder, UIExplorerEntered and ExploreParent are called twice.

Oh, ok, got it. Didn't see that, since neither description of ExploreLocation nor CanExploreLocation mentions that, only function enum which I'm not using in code, so it felt like changing one thing that would allow to view directory size and do recursive search without changing the code breaks other stuff. Thanks for clarifying.

(1) I think you mix two concepts and two kinds of code and operation in your descriptions.

Explorers are for getting data (for panels) and navigation through tree-like data.
Panels use explorers to show their data and provide interaction.

The problem you are describing is about panels. I need to see your panel code.
Just a guess, I think you do not open the child panel as a child. As a result,
you just replace the current panel with a new one instead of making a stack of
panels (sound like you want this).
Here is what the default UIOpenFile does:
https://github.com/nightroman/FarNet/blob/3d6d4f4d9f7f0d8df71bedb6f4caa026d231b382/FarNet/FarNet/Panel.UI.cs#L495
Note that it opens the child panel by explorer.OpenPanelChild(this).
In other words, if you program correctly, i.e. open a new panel as a child then
closing the new panel should get you to the old panel as it was on opening.
I guess at some point you override something incorrectly and open a new
panel directly, not as a child.

(2) Mind you, if you use File.Data (OO "locations" instead of "paths") then you should not use the approach with ExploreLocation (pure text paths and nothing else). They are orthogonal.

(2) more details, please

what location 1st your explorer provides
you use the default bare panel, how it looks like? does it have ".." item?

(2) Here is the example of 4 different explorers and panels in 1:
https://github.com/nightroman/FarNet/blob/master/PowerShellFar/Bench/Test/Test-Explorer-.ps1
It's PowerShell and the script is for PowerShellFar. But ideas of coding and API is similar.
The 4th explorer "Location" is the location kind, your kind. It works fine, i.e. when we
enter "Location" and open the panel of this explorer and the go up then the parent path
panel is opened. That means all works fine.
I think if your current location/"path" is empty then you cannot expect going up.
Something wrong is with your paths model, I think.

As you noticed I'm using default panel, just changing some visual properties. So, not overriding any panel methods
Basically any location I've tried is ignored, made a gif illustrating it.
And yes, it does have parent ".." item, but it handles it like explorer doesn't exist

But it looks like you do not have any parent location according to your current path (empty?).

BTW, when you are in the root (just opened the first panel) what you expect on going up?

But it looks like you do not have any parent location according to your current path (empty?).

That's the problem, idk why it doesn't apply location I pass until I explore something and go back.

BTW, when you are in the root (just opened the first panel) what you expect on going up?

Getting ExploreParent called so that I may set PostName, close pak file handle and allow it to clean up memory. The location at the bottom would be nice, but not necessary.

(1) I think your problem is that in OpenFile you return a different explorer type. The same panel is reused with new Explorer. You may need to override open file and instead of letting FarNet do things open you child panel yourself.

That's the problem, idk why it doesn't apply location I pass until I explore something and go back.

Did you define/override the property Location in your explorer?

Tried opening just empty explorer of the same type, same thing.
I believe it's connected to (2), added directory to this empty explorer, opened it, went back and now it works like expected. So, fix to (2) should be a fix to this as well

It's not virtual/abstract so I can't override. No overlapping definitions either. I'm assigning it here, actually passing string.Empty here, but locally changing that to whatever, doesn't register.

OK, so all looks like by design (though it does not do what you want).
Hint: If you want "up" to work then think of some artificial "root" in your paths models. I.e. avoid empty locations. Empty means "you cannot go up".

I.e. something like "Pak...". Then you will get go to the parent working as you want.

Are you sure? Seems like an odd design decision, this is how it behaves right now (it's ~30s, it doesn't loop right away). But sure, I can work around it that way.

Odd design of what? FarNet is the API to the Far panel model.

NB Gifs are not so helpful (sorry, if it is me a bit slow). Better try to explain in words.

NB To be honest, I would not call this "odd". Far is initially designed to work with paths. An empty path means "no parent". Is this odd? It seems to be normal.

No no, I understand that, no issue here. My problem is with the fact that the first Explorer object is not registered as actually existing by the panel, until a child explorer is used. As I said before, UIExplorerEntered is not called

An empty path means "no parent"

Ok, but even if I'm setting the path, to the filesystem path + filename + my locations after, it's ignored until I explore directory. That's what's odd for me.

Like, you're even setting a "*" as a Location if no location was provided here, but it's also ignored until some folder is opened.

I suggested Pak\something, not *, please try this, too. Make you sure you see this path in your panel.
Anyway, I will investigate if you provide a problem sample that I can compile and see what's happening. Otherwise, it is a little difficult to guess just looking at GitHub source pages.

Here is some simple panel project to start with a sample:
https://github.com/nightroman/FarNet/tree/master/Modules/TryPanelCSharp

Ok, added bare minimum of code needed to show what I'm talking about.
https://github.com/jesterret/ExplorerExample
I'd expect that it would always show the message on the ExploreParent and the location it was set to.

Thank you, now I see what you mean. Let me investigate.

For some historical or technical reasons panels have their own CurrentLocation.
In some cases they are synced with explorers locations automatically ("second"
explorer and panel in your case), in some cases they are not ("first" panel).
Maybe it's the bug but a quick fix breaks some tests, so maybe it's a feature.
I need some time in order to fix this properly. But hopefully I can suggest
a workaround. In you explorer override EnterPanel and for the passed
panel set its CurrentLocation explicitly. I think this should solve
your problem for now.

Thanks a lot, I really appreciate it :)

Done, hopefully, you can remove the workaround.
I also tweaked help a little bit, as you mentioned.


Update 0.48b0

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_0ap46souoi/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:51: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

clone/recipe/meta.yaml:74: invalid_license_family: The recipe has an incorrect about/license_family value.{}
clone/recipe/meta.yaml:47: remove_python_pinning: On arch specific packages, python deps should not be constrained.
clone/recipe/meta.yaml:52: remove_python_pinning: On arch specific packages, python deps should not be constrained.
===== Final Report: =====
3 Errors and 1 Warning were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_fa4zfsahjb/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:51: python_build_tool_in_run: The python build tool setuptools is in run depends

===== ERRORS =====

clone/recipe/meta.yaml:47: remove_python_pinning: On arch specific packages, python deps should not be constrained.
clone/recipe/meta.yaml:52: remove_python_pinning: On arch specific packages, python deps should not be constrained.
===== Final Report: =====
2 Errors and 1 Warning were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_92lopaawpc/clone` failed. (See above for error)
The following problems have been found:
===== ERRORS =====

clone/recipe/meta.yaml:49: remove_python_pinning: On arch specific packages, python deps should not be constrained.
clone/recipe/meta.yaml:53: remove_python_pinning: On arch specific packages, python deps should not be constrained.
===== Final Report: =====
2 Errors and 0 Warnings were found


Issue with types in onExecute

Describe the bug
The type available to an onExecute hook are as follows:
export declare type OnExecuteEventPayload<ContextType> = {
    executeFn: ExecuteFunction;
    args: TypedExecutionArgs<ContextType>;
    setExecuteFn: (newExecute: ExecuteFunction) => void;
    setResultAndStopExecution: (newResult: ExecutionResult) => void;
    extendContext: (contextExtension: Partial<ContextType>) => void;
}

However, if I do:
export const myExecutePlugin = (): Plugin<MyContextType> => {
  return {
    onExecute: async ({ executeFn, setExecuteFn }) => {
      const newExecuteFn = async (args: TypedExecutionArgs<MyContextType>) => {
        // some implementation details
      };

      setExecuteFn(newExecuteFn);
    },
  };
};

I get a type error:
Argument of type '(args: TypedExecutionArgs<RelevantContext>) => Promise<ExecutionResult<{ [key: string]: any; }, { [key: string]: any; }>>' is not assignable to parameter of type '{ (args: ExecutionArgs): PromiseOrValue<ExecutionResult<{ [key: string]: any; }, { [key: string]: any; }>>; (schema: GraphQLSchema, document: DocumentNode, rootValue?: any, contextValue?: any, variableValues?: { ...; }, operationName?: string, fieldResolver?: GraphQLFieldResolver<...>, typeResolver?: GraphQLTypeReso...'.
  Types of parameters 'args' and 'schema' are incompatible.
    Type 'GraphQLSchema' is not assignable to type 'TypedExecutionArgs<RelevantContext>'.

This looks to be because the underlying function from graphql-js has two signatures for ExecuteFunction:
export function execute(args: ExecutionArgs): PromiseOrValue<ExecutionResult>;
export function execute(
  schema: GraphQLSchema,
  document: DocumentNode,
  rootValue?: any,
  contextValue?: any,
  variableValues?: Maybe<{ [key: string]: any }>,
  operationName?: Maybe<string>,
  fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>,
  typeResolver?: Maybe<GraphQLTypeResolver<any, any>>,
): PromiseOrValue<ExecutionResult>;

Whereas envelop only works with the first, the use of the ExecuteFunction type means that Typescript is expecting us to also handle the second invocation pattern.
Expected behavior
The code above should produce no type errors.
Environment:
"@envelop/core": "^1.0.3",
"typescript": "~4.2.4",

Additional context
I think the solution might be to provide our own EnvelopExecuteFunction type which is:
type EnvelopExecuteFunction<Context> = (args: TypedExecutionArgs<Context>): PromiseOrValue<ExecutionResult>;

What do you think?

Second is no longer support in graphql-js@16

Great! So I should just upgrade then, right?

Great! So I should just upgrade then, right?

Yeah, exactly :) Please close the issue if it's solved for you?


Does I2S Stereo in Slave mode have no channel synchronization?

When I2S is initialized in the DMA receive buffer, there is no certainty as to whether the receive data address is even or odd for the L or R channel. Depends on the I2S turn-on time. How to synchronize channels?
This is a hardware defect of all Bouffalo Lab chips?

Without a reset, the i2s will not re-sync.
static void reset_i2s0(void) {
	uint32_t tmpVal;
	tmpVal = getreg32(GLB_BASE+GLB_SWRST_CFG1_OFFSET);
	tmpVal |= GLB_SWRST_S1AA_MSK; // software reset I2S
	putreg32(tmpVal, GLB_BASE + GLB_SWRST_CFG1_OFFSET);
	tmpVal &= ~GLB_SWRST_S1AA_MSK; // software reset I2S
	putreg32(tmpVal, GLB_BASE + GLB_SWRST_CFG1_OFFSET);
}

After reset and initialization, you cannot stop DMA or clear the I2S FIFO - сhannel synchronization will be broken.

If your pcm data is 8 bits or 16 bits, you can use the channel merge feature to solve this problem

    /* enable channel merge */
    bflb_i2s_feature_control(i2s0, I2S_CMD_CHANNEL_LR_MERGE, true);
    /* enable i2s tx and rx */
    bflb_i2s_feature_control(i2s0, I2S_CMD_DATA_ENABLE, I2S_CMD_DATA_ENABLE_TX | I2S_CMD_DATA_ENABLE_RX);

You also need to change the bit width of the DMA's transmitted data.
This method can only work with 8/16bits of pcm data.

24 bits are used.
Solved by workarounds with reset I2S.
There are also situations in y I2C when reset is indispensable.
It is desirable to have macros or functions to reset controllers in the SDK.


request help: I deployed the apisix ingress controller on the k8s cluster. Can I use apisix Dashboard to create ApisixRoute and ApisixUpstream?

Issue description
I deployed the apisix ingress controller on the k8s cluster. Can I use apisix Dashboard to create ApisixRoute and ApisixUpstream?
Environment

your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
your Kubernetes cluster version (output of kubectl version):
if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):

If you use the architecture with etcd
you can deploy both the apisix-ingress-controller and apisix-dashboard in the same cluster, use the same etcd;
and the resources maintained by the APISIX Ingress Controller come with the description:
Created by apisix-ingress-controller, DO NOT modify it manually

and you can add route/service/upstream on the dashboard and it works.

If you use the new architecture without etcd, you can do nothing via apisix-dashboard.

如果你使用带有 etcd 的架构
您可以在同一个集群中部署 apisix-ingress-controller 和 apisix-dashboard，使用同一个 etcd；
APISIX Ingress Controller 维护的资源附带以下描述：
Created by apisix-ingress-controller, DO NOT modify it manually

您可以在仪表板上添加路线/服务/上游，它可以工作。
如果您使用没有 etcd 的新架构，您将无法通过 apisix-dashboard 执行任何操作。

不错，跟我了解的一样。确实是这样。


Using background image on OnboardingContentViewController

At the moment, you can only specify a background image on OnboardingViewController is it possible to create an instance of OnboardingContentViewController with a background image?
That way every OnboardingContentViewController will have a unique background image.
Or Is there a better way to achieve this?

Does it work?

I found this closed issue that discusses this problem: https://github.com/mamaral/Onboard/issues/42.
Hope it helps!


Fix amazonlinux 1 & 2 builds

Issue #, if available: n/a
Description of changes:
GitHub has changed the default nodejs used for actions to node20, which requires a more recent glibc than amazonlinux 1 & 2 have. This PR uses GH provided env variables to force the runner to use node16 which will work with amazonlinux 1 & 2.
Amazon Linux 2 was supposed to be EOL'd a year ago, but support was extended until June of 2025.
Amazon Linux 1 has been EOL'd since Jan 1st 2024, after also being extended.
Node16 will probably be removed from the GHA runner before Amazon Linux 2 is EOL'd, so we'll have to determine if we can work around it, or if we should just move everything over to Amazon Linux 2023.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Added an issue (#346) to give some TLC to Amazon Linux versions in our workflows.


memory leaks

owner attribute in Obj struct doesn't fix the problem.
There has to be way to ensure programs below dont result in memory leak
fun idx(arr: [int], i: int) -> int {
    return arr[i]
}

fun main() {
    print(idx([1, 2, 3, ], 1)) # the array allocated on the heap would be lost
}

fun log(s: string) {
    print(s)
}

fun main() {
    log("sahl seems nice") # the string allocated on the heap would be lost
}

./target/release/sahl samples/sample.sahl -c
valgrind --leak-check=full -s ./sahl exe.bin
==12148== HEAP SUMMARY:
==12148==     in use at exit: 3,247 bytes in 98 blocks
==12148==   total heap usage: 168 allocs, 70 frees, 39,280 bytes allocated
==12148==
==12148== 1,104 (80 direct, 1,024 indirect) bytes in 2 blocks are definitely lost in loss record 3 of 4
==12148==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==12148==    by 0x10AF34: run (sahl.c:680)
==12148==    by 0x10B5A9: main (sahl.c:783)
==12148==
==12148== 2,143 (1,880 direct, 263 indirect) bytes in 47 blocks are definitely lost in loss record 4 of 4
==12148==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==12148==    by 0x10A5A6: run (sahl.c:559)
==12148==    by 0x10B5A9: main (sahl.c:783)
==12148==
==12148== LEAK SUMMARY:
==12148==    definitely lost: 1,960 bytes in 49 blocks
==12148==    indirectly lost: 1,287 bytes in 49 blocks
==12148==      possibly lost: 0 bytes in 0 blocks
==12148==    still reachable: 0 bytes in 0 blocks
==12148==         suppressed: 0 bytes in 0 blocks
==12148==
==12148== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

garbage collection https://github.com/abooishaaq/sahl/commit/ad7358251a5d24f79b62338e8e06b299e1259c76 fixes this


Check Orion's Therapy mod and support if needed

https://steamcommunity.com/sharedfiles/filedetails/?id=1076950211

There doesn't appear to be anything for me to do here. Therapy appears to "just work" with Many Jobs.


Remove unnecessary nullables

Part of #9167
Basically we have a lot of unnecessary nullables, thereby simplifying the code
This PR finally fixes this comment

Codecov Report

Merging #9766 (fdf0743) into main (2b726d6) will increase coverage by 0%.
The diff coverage is n/a.

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

@@         Coverage Diff          @@
##           main   #9766   +/-   ##
====================================
  Coverage    63%     63%
====================================
  Files       203     203
  Lines      9816    9816
  Branches   1556    1556
====================================
+ Hits       6215    6221    +6
+ Misses     3104    3096    -8
- Partials    497     499    +2

Impacted Files
Coverage Δ

...rc/platform/common/dataScienceSurveyBanner.node.ts
70% <0%> (+5%)
:arrow_up:


new snippet added: to_binary_list

Convert all elements in an integer list to their binary notation.

Takes a list/tuple containing integers.
Returns a list with integers of arguement list converted to binary.

Okay, thanks for your response. I'll try to contribute something of value.


Select to JSON is shown on multiple rows

Description
Hello,
I have a simple table of about 450 records (Filled with random UUIDs).
When I try to convert it to JSON, the result is displayed on multiple rows (which makes it difficult to acquire the result or work with it in any way).
In the image below, there is shown the current behavior on the left (in DBeaver) compared to the behavior I would expect on the right (in SSMS):

DBeaver Version
Community Edition 24.0.5
Operating System
Windows 10
Database and driver
SQL Server
Microsoft JDBC Driver for SQL Server
Steps to reproduce

Create some table with a bunch of rows
Use select * from [yourTable] for json path

Additional context
No response

It seems that the database output results in chunks for optimization purposes. Assuming that you can't edit this field under any circumstances (it can't be a part of a table, view, etc.), we might try to take the same approach as in SSMS.

A large result set splits the long JSON string across multiple rows.
By default, SQL Server Management Studio (SSMS) concatenates the results into a single row when the output setting is Results to Grid. The SSMS status bar displays the actual row count.
Other client applications might require code to recombine lengthy results into a single, valid JSON string by concatenating the contents of multiple rows.

https://learn.microsoft.com/en-us/sql/relational-databases/json/format-query-results-as-json-with-for-json-sql-server?view=sql-server-2017&tabs=json-path#output-of-the-for-json-clause

If that is the case, the output is not really wrong, it is just difficult to work with, I am not sure if there is any potential value of seeing the individual chunks


Hardcoded object response values required in request rather than being able to use select columns generated from schema

Schema:
  fetch data from the table: "portfolio"
  """
  portfolio(
    """distinct select on columns"""
    distinct_on: [portfolio_select_column!]

    """limit the number of rows returned"""
    limit: Int

    """skip the first n rows. Use only with order_by"""
    offset: Int

    """sort the rows by one or more columns"""
    order_by: [portfolio_order_by!]

    """filter the rows returned"""
    where: portfolio_bool_exp
  ): [portfolio!]!

The mvn graphql:generateClientCode generates values from my schema that can be used as return values from queries like the following:
@GraphQLEnumType("portfolio_select_column") public enum portfolio_select_column { 	id, name; }
However when defining my query I have to hardcode the return values rather than being able to build my return values like I can for almost all other parts of the query:
	private GraphQLRequest portfoliosRequest;

        portfoliosRequest = queryExecutor
				.getPortfolioGraphQLRequest(String.format("{id name}"));<------------- magic strings

		return queryExecutor.portfolio(
				this.portfoliosRequest,  <------------ object response (why can't I specify enums?)
				Collections.singletonList(portfolio_select_column.id),  <-------- distinct_on param however does allow me to build with the enums
				null,
				0,
				Collections.emptyList(),
				portfolio_bool_exp.builder().build()
				);
	}

I can reference the enums in the portfolioRequest object response and String.format them but I'm unclear why the select column enums that are autogenerated aren't intuitively added into the building of the query and appear to need to be hardcoded strings - especially when the distinct_on param uses the enums.

Hello,
I'm not sure I understand the issue.
So here is what I undestood:

The part of the GraphQL schema you copied is a field of the GraphQL Query type.
You prepare this request in your Java code, and store this prepared GraphQLRequest into the portfoliosRequest  variable

Just a detail: Why to you use getPortfolioGraphQLRequest(String.format("{id name}")), getPortfolioGraphQLRequest("{id name}"); should be enough
So my understanding is that you would like the query parameters to be in the prepared GraphQL request, instead of having to provid them at runtime, when calling return queryExecutor.portfolio(...).
Is that correct ?
If yes, then take a look at the Full Request:
Prepare it this way:
portfoliosRequest = queryExecutor.getGraphQLRequest("query{portfolio:(distinct_on:[id]) {id name}}");

return queryExecutor.exec(portfoliosRequest).getPortofolio();

Hi,
I took another look today as I was sure I wasn't doing something right and I think I figured out what I wanted:
        org.forum.client.util.query_rootExecutor queryExecutor = new query_rootExecutor("http://localhost:8089/v1/graphql");

        com.graphql_java_generator.client.request.Builder builder = queryExecutor.getPortfolioResponseBuilder();
        com.graphql_java_generator.client.request.ObjectResponse request = builder.build();

        List<portfolio> portfolios = queryExecutor.portfolio(
                request,
                Collections.singletonList(portfolio_select_column.id),
                null,
                null,
                null,
                portfolio_bool_exp.builder().withId(Int_comparison_exp.builder().with_eq(1).build()).build()
        );
        logger.info("Portfolios read: {}", portfolios);

I couldn't understand why the some of the request was being hardcoded as a string - but I guess that is the definition of a partial request or full request within your generated code. So what I wanted was the Builder object that is generated for my request and using that I can generate the query fully using the plugin generated POJOs.
Thanks for you time again.


Connecting sensors to edgex

I am trying to connect sensors to edgex. Made edgex-device-mqtt as a service and wrote a profile for my sensors. Tell me, how can I send information from sensors to Edgex?
Attaching document with configuration.
edgex-device-mqtt.TXT

@Kovixer You can refer to the doc https://docs.edgexfoundry.org/1.2/examples/Ch-ExamplesAddingMQTTDevice/
You should setup the deivce-mqtt-go and your sensors to sub/pub to same MQTT broker, than device service can communicate with sensors via the MQTT broker.

I did everything according to the documentation. I didn't write a script on js because I don't need simulation, I have real devices. I can't see data from devices in edgex.
Here is my device-mqtt:

Here are logs of my device-mqtt:

Then I tried to check the data from my temperature sensor:

I have no idea what is wrong.

@Kovixer
Could you try command curl http://localhost:48082/api/v1/device to query the executable commands?  https://docs.edgexfoundry.org/1.2/examples/Ch-ExamplesAddingMQTTDevice/#execute-commands

The doc shows two use case https://docs.edgexfoundry.org/1.2/examples/Ch-ExamplesAddingMQTTDevice/#run-an-mqtt-device-simulator

sensor send async value to device-mqtt via broker
sensor accept request and return the response to device-mqtt via broker

Does your sensor support both?

I have tried this commad, here is the result:

I use zigbee devices. I guess my sensors support the second one(sensor accept request and return the response to device-mqtt via broker)

please upload text file instead of the figure.  it is really hard to read.

Uploading logs.TXT…

logs.TXT

@Kovixer
Your device profile lack of the device command, could you try to define the Temperature for deviceCommands, you can refer to the  ExamplesAddingMQTTDevice doc
Then you can recreate the device with the device profile and query the localhost:48081/api/v1/device or localhost:48081/api/v1/deviceprofile to see the changes.

I wrote a new device profile. After this command (localhost:48081/api/v1/device) the result was: service unavailable.
logs.TXT

@Kovixer After I go through your logs.TXT file, the service unavailable just the part of your device profile.
  -
    name: testwater_leak
    get:
      path: "/api/v1/device/{deviceId}/testwater_leak"
      responses:
      -
        code: "200"
        description: "get the current water leak"
        expectedValues: ["water_leak"]
      -
        code: "503"
        description: "service unavailable"
        expectedValues: []

Before testing with edgex, I recommend you use the MQTT client lib to test the real device can work with the MQTT broker:

subscribe the mqtt topic: https://mosquitto.org/man/mosquitto_sub-1.html
publish to mqtt topic: https://mosquitto.org/man/mosquitto_pub-1.html

I use zigbee2mqtt to check the data from my sensors.

How can I connect zigbee to edgex?

you can write a zigbee device service based on Go or C SDK.
Or, would you like to consider using the commercial version which contain zigbee device service and technical support.

What docker-compose file should I use for raspberry pi:

https://raw.githubusercontent.com/edgexfoundry/demo-grove-pi/master/docker-compose-demo-grove.yml
https://github.com/edgexfoundry/developer-scripts/blob/master/releases/geneva/compose-files/docker-compose-geneva-redis.yml.

I'm not sure, you can following the guideline from community doc https://wiki.edgexfoundry.org/display/FA/Running+on+a+RaspberryPi

how does device-mqtt-go determine which topic should be used?

For now, it is in the configuration
https://github.com/edgexfoundry/device-mqtt-go/blob/06d3741ca62ebd3e4d9b2e85a020dae99c1fa372/cmd/res/configuration.toml#L63-L73

should I change the topic name in the file to that one published by mqtt?

IncomingTopic is used to subscribe message from MQTT broker, you can change it to meet to meet your requirement.

What should I do if i have more than one topic?

It only support one topic in community version,
or you can subscribe all topic https://stackoverflow.com/questions/32904012/how-do-i-subscribe-to-all-topics-of-a-mqtt-broker

What should I do if i have more than one topic?

@Kovixer , if your topics uses a common bases path you can subscribe to multiple using the # wild card.
Example:
Publish Topics:
   mydevices/device1
   mydevices/device2

Subscribe topic:
   mydevices/#

How can I use the core comands with this device profile and configuration file:
edgex-device-mqtt.TXT
This is data from sensors in Edgex:

device-mqtt-go need to defines CommandTopic and ResponseTopic, and your real device need to handle the request and response.
This could be illustrated as the following steps:

device-mqtt-go publish request via CommandTopic
https://github.com/edgexfoundry/device-mqtt-go/blob/master/cmd/res/example/configuration.toml#L68

  [DeviceList.Protocols]
    [DeviceList.Protocols.mqtt]
       Schema = 'tcp'
       Host = '<IP_ADDRESS>'
       Port = '1883'
       ClientId = 'CommandPublisher'
       User = 'admin'
       Password = 'public'
       Topic = 'CommandTopic'

Real device need to receive request from CommandTopic

Real device send response by publishing message to ResponseTopic

device-mqtt-go subscribe response from ResponseTopic
https://github.com/edgexfoundry/device-mqtt-go/blob/master/cmd/res/example/configuration.toml#L89

ResponseTopic = 'ResponseTopic'

Taking this out of the Device WG project backlog as there has been no activity for a while. Should this issue be closed?

Hello there, i have a question regarding the fetching of commands from the MQTT-Broker. I am observing a delay of 1s between the recieving and the parsing of the command response.
Is there a way to avoid this hard-coded delay (file: driver.go, line: 460) ?

@vdenkov , No there is not. Please create a new issue for this to be reworked as 1 second is a bit long.

superseded by #212

Hello
Please can you help me?  How did you solve this problém?  I have the Same, i don't know how to connect the sensors to MQTT and edge x

Hello Please can you help me? How did you solve this problém? I have the Same, i don't know how to connect the sensors to MQTT and edge x

@Safinko , please submit your question as a Discussion with more detail about your use case.
https://github.com/orgs/edgexfoundry/discussions


Queue optimizations

This opimizes rtc task queue handling by caching results of sdp parsing and task priority initialization. It gives major performance gain even without https://github.com/rtc-io/rtc-tools/issues/37

@nathanoehlman - can I leave these to you to review and merge this and @vkosh other PRs please?
@silviapfeiffer - Did you ever resolve whether the CLA was required or not?  I know that was something that was being discussed before I moved on from NICTA, but wasn't sure of the outcome.
@vkosh - Thanks for the contribution to the project! :cake:

@vkosh Thanks for the pull requests! 2.6.1 has been published containing this and #10

@DamonOehlman @nathanoehlman Thanks for managing this. Would you have a look at https://github.com/rtc-io/rtc-tools/issues/37 which is a main performance blocker.

So, this has actually made our app quite unstable: stops peers from connecting and delays connecting quite a bit. Sorry to have to say, but I'd be in favor of pulling this patch at this point in time, actually.

@nathanoehlman @silviapfeiffer Is it possible to replicate the conditions that are causing app instability in a test somehow?  It would be great to know that people like @vkosh can make changes to the project without having to worry about breaking things upstream.
The tests here have always been a bit light on, and was one of the reasons I created higher level packages that tested more of the breadth of rtc.io (such as rtc-quickconnect-test).  The only trick now is to work out how to have that package resolve references to rtc-taskqueue to the host package rather than attempting to resolve it through it's own dependency tree.
Something I'll have a think about.  It's possible while the in progress version satisfies the version required by the rtc-quickconnect-test tree it will use the local, but it would need to be confirmed...

Unfortunately it's not good news on the dependency resolution front,  after doing a:
npm install rtc-quickconnect-test rtc-quickconnect --save-dev

in the rtc-taskqueue project dir, this was the result of a npm ls rtc-taskqueue:
<EMAIL_ADDRESS>/home/damo/code/rtc.io/rtc-taskqueue
└─┬<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └──<EMAIL_ADDRESS>

Yeah, sorry for that unhelpful comment. We will need to do some more testing to figure out exactly what is happening.

This is a tricky bug to to replicate in any form of local development environment.
My current thinking is that what is occurring is the following:

An initial WebRTC peer connection is established between to remote clients (can't be local clients) using a viable ICE candidate, which all works with the cached media types
The PeerConnection remains in the ICE 'connected' state, indicating that while it has achieved a viable peer connection, it will continue to examine other candidates for a better candidate pair.
A better candidate pair is discovered, and the connection attempts to upgrade to the newer pair
The caching of the media types than causes an issue somehow with the upgrading of the connection to the new candidate pair and things break.

@DamonOehlman If you've got any ideas about how to test this, I'd appreciate any suggestions

I think this may be related to https://github.com/rtc-io/rtc-tools/issues/37 (solved in https://github.com/rtc-io/rtc-tools/pull/38) somehow. All of candidates apply to all of peer connections which causes connections upgrade.
BTW I've been using this PR with https://github.com/rtc-io/rtc-tools/pull/38 in production for two weeks and I haven't noticed any issues in peers coupling.


No ROIs returned for segmenting tiny irregular shapes

Hello,
Thanks for all the amazing work you do on Cellpose!
I am  interested in using cellpose to segment malaria parasites in the images of blood samples. I have managed to successfully segment the blood cells in the images using the ctyo model and then human in the loop method to improve my model. However, I have been having issues successfully segmenting the actual malaria parasite in the images. I have tried training my model on manual annotations using nuclei and cyto as my initial model, with no avail. I outline the malaria parasite and run my model on the manual annotations in the GUI and I have tried adjusting the diameter as well as adjusting the flow_threshold, however, cellpose is not returning any ROIs back for anything.
I have attached some example images of malaria infected blood samples. As you can see the malaria are tiny and have a ring shape, but I do not outline the malaria in a circle.
Please let me know if there is anything I am dong wrong thus far. Thanks so much to anyone who is willing to help me. I greatly appreciate it!

hmm I think for this problem I would recommend thresholding the image, keeping only the darker pixels (you can play around with the brightness for example in cellpose). you could then run the thresholded image through cellpose, or if they are always so well isolated, I'd recommend https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.label.html#scipy.ndimage.label

going to close the issue for now, but can reopen if this doesn't help


Installation verify

@all
Does anyone who knows how to solve the following problem (HTTP ... error 404: Not found)?
**~/vatic$ turkic status --verify
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/byeonghak/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Configuration:
Sandbox:     True
Database:    mysql://root@localhost/vatic
Localhost:   http://localhost/
Testing access to Amazon Mechanical Turk... ERROR! Signature or access key missing
Testing access to database server... OK
Testing access to web server... ERROR! HTTP Error 404: Not Found
One or more tests FAILED!**
Any help from you will be greatly appreciated.
Bin Yang

@YangBain Have you been able to resolve the problem? I am stuck too.
I have followed this config file but still no luck.

@sjoycode When I change the path to DocumentRoot /path/to/vatic/public    <Directory /path/to/vatic/public>, it works.

Thank you, @YangBain, for your response.
It seems both of us messed up with the path to the right "public" directory of vatic. Let me describe my mistake in the following, and how I resolved it.
I started out with the installation, for some strange reason, by first cloning vatic's github directory, going inside it, and then executing vatic-install.sh. It is NOT the proper way to install vatic (I came to realize it later). The proper way of vatic installation (after installing dependencies) is to wget the vatic-install.sh, and execute it as suggested by the main documentation.
In my case, with the cloning of vatic's github repository I ended up with two "public" directories (which caused the confusion). Nevertheless, even with this improper installation I got rid of the HTTP Error 404 by updating the right-path-to-vatic's-public dircetory in the apache2 config file.
, and restarting the server (with graceful command), before executing the turkic status --verify command.

@sjoycode When I reinstall vatic and run $ turkic setup --database. I get  ImportError: No module named parsedatetime. But when I run python
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
python
Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

import parsedatetime

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
There is no problem. So do you know why I get this error. Thank you very much,

@YangBain, sorry about the late response.
I vaguely remember having faced similar difficulty, and finding one github thread useful to resolve the issue. I can't remember exactly which thread it was but have you taken a look at this thread?
https://github.com/maebert/jrnl/issues/75

@YangBain @sjoycode
Oh my godness, how foolish I am. I just messed up the root of vatic. In my case. I just modified the 000-configure file in apache. and I just used the /home/jchen311/vatic-tool/public instead of /home/jchen311/vatic-tool/vatic/public, and it works!

I am facing the similar difficulty with YangBain, but I can't open the two links: https://github.com/maebert/jrnl/issues/75  and http://cs-people.bu.edu/sameki/blog2.pdf.
Can you help me? Thank you very much.


Increase tx_bytes_limit to 100k bytes from 10k bytes

Change summary:

Increase tx_bytes_limit to 100k bytes from 10k bytes
Change tx_bytes_limit checking to use sizeof(args.tx_body) instead of sizeof(args)
Add test cases for ordered nonces (-2)

Related issues:

https://github.com/ainblockchain/ain-blockchain/issues/1277

Thanks for the review! @jiyoung-an Now merging..


GCS FUSE mount

Implement support for mounting a GCS bucket via FUSE. Can initially be read-only if that simplifies.

@slejdops mentioned today some issues with getting the mounting to be automatic. Needs investigation.

The auto mount has now been fixed.

Thanks @slejdops. It would be great if you could add in to the issue comments a few details about what you did to fix this, so we have a record in case we or someone else hits a similar problem.

The GCS bucket did not mount automatically on Jupyter notebooks. Replacing the deb gcsfuse package with one available via conda fixed it.

jhub bucket currently mounted. needs to be buckets inside malariagen-jupyterhub. everyone can read-write (jovian).


Website auto-staging adds dupe messages to PR

See https://github.com/flutter/website/pull/430#issuecomment-285517723
Maybe because Travis runs for both the PR and the Push?

cc @FaisalAbid

See http://stackoverflow.com/questions/34974925/travis-ci-creates-two-buids-for-each-github-commit-push/34975730
Basically what's going on is that what you pushed to github wasn't already at tip of tree (someone else had landed something since you last pulled). We should probably turn off the "push" tests. I have done so.

@Hixie turned off tests for push. Next PR for the website shouldn't create dupe messages. Will keep an eye on it.

Yep! Let me know! I do have a check to make sure it doesn't happen.
On Thu, Mar 9, 2017, 6:59 PM Seth Ladd<EMAIL_ADDRESS>wrote:

@Hixie https://github.com/Hixie turned off tests for push. Next PR for
the website shouldn't create dupe messages. Will keep an eye on it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/8696#issuecomment-285525046,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPfBAHxFcUa05FsVj4dFSuywPMozVovks5rkJJMgaJpZM4MYxeg
.

--
Sent from my phone


Why no have permission camera trigger in android

I have seen the code permission is not yet allowing it just show page error show need permission. why do not have runtime permission ?

Were you able to resolve this issue?


Add SWTH token

Hi, reopening this to resolve merge conflicts.
There was a previous confusion about base denoms. Please note that our unit / base denom (0 exponent) is swth on source chain. dswth is a new denom with 8 exponent for display use.

IBC tx: https://www.mintscan.io/osmosis/txs/89AEB65A1D7F67E8785A55427C6D9B37E24540F26389EBF6DD2FC6EE31183297
Balances:
osmosisd query bank balances osmo1t6tveyjtmcf54p56yrd9x48vecu94fyf6wytxe
balances:
- amount: "428888888"
  denom: ibc/8FEFAE6AECF6E2A255585617F781F35A8D5709A545A804482A261C0C9548A9D3
- amount: "100131476"
  denom: uosmo
pagination:
  next_key: null
  total: "0"

Hi @IbrarMakaveli, is this ok to merge?


Elevator

Describe the Bug
I built the elevator but when I un-assemble it, it remained in my world
Reproduction Steps
1.I Build the elevator
2.i un-assemble the elevator
3.THE ELEVATOR STILL IN MY WORLD
Expected Result
O_O
Screenshots and Videos
No response
Crash Report or Log
No response
Operating System
mac OS catalina
Mod Version
0.5.1f
Minecraft Version
1.20.1
Other Mods
No response
Additional Context
No response

Unable to reproduce, if you are able to consistently reproduce this with just create + fabric api feel free to open a new issue.


MM-58137 Fix crash by importing the correct Animated component

Summary
The ImagePreview component for some reason (code from 2Y) ago was using the wrong Animated component, now replaced with the one provided by the reanimated library.
This was causing the library to access a property directly that causes the crash as it should only be accessible in the UI Thread (native side)
This crash is only happening after updating the Reanimated library with all the other deps done for 2.16, so this PR needs to be cherry picked.
Ticket Link
https://mattermost.atlassian.net/browse/MM-58137
Release Note
NONE

This crash is only happening after updating the Reanimated library with all the other deps done for 2.16, so this PR needs to be cherry picked.

Do we need to cherrypick? It seems the dependencies PR didn't make the 2.16 branch https://github.com/mattermost/mattermost-mobile/pull/7863

This crash is only happening after updating the Reanimated library with all the other deps done for 2.16, so this PR needs to be cherry picked.

Do we need to cherrypick? It seems the dependencies PR didn't make the 2.16 branch #7863

then no cherry pick

Checking https://github.com/mattermost/mattermost-mobile/compare/v2.15.0..release-2.16 no apparent changes to the reanimated library has been made between these two versions.


Some information requests yield 500 errors

Hi!
I was trying to get cumulative data for admissions by age, in England, with cumulative cases by specimen date.
This produces a 500 error.

Link:
https://coronavirus.data.gov.uk/api/v2/data?areaType=nation&areaCode=E92000001&metric=cumAdmissionsByAge&metric=cumCasesBySpecimenDate&format=csv
If I'm attempting to do something which is invalid, please add functionality to indicate so on the page. Otherwise, please fix (:
If I'm doing something that should be valid but somehow isn't, please implement some sort of error handling for that sort of eventuality.
Finally, if you just happen to encounter an error, please have some sort of error page, perhaps linking here to make an issue with what was done.
Thanks,
Ted

Hi Ted
Thanks for this feedback. If you split this into two queries it will work. We will look to make this clear the reason for this in the documentation.
Thanks for flagging
Clare


Flutter module added in native ios app is not completely closed/destroyed/dismissed

Hi,
I'm facing issue after integrating flutter module into a native ios app.  After closing the flutter module either by using SystemNavigator.pop(animated:true), when trying to open it again from native ios app, the flutter module lands on the recently closed screen.  I have even tried by invoking a method from flutter module and closed the flutterViewController from native ios app, which again closes the app but opens the same screen that was exited before. Also, destroying the flutterEngine also didnt work.
Could anyone please share your knowledge regarding this.  It will be really helpful.
`FlutterEngine *flutterEngine = ((AppDelegate *)UIApplication.sharedApplication.delegate).flutterEngine;
FlutterViewController *flutterViewController = [[FlutterViewController alloc] initWithEngine:flutterEngine nibName:nil bundle:nil];
FlutterMethodChannel *channel = [FlutterMethodChannel<EMAIL_ADDRESS>binaryMessenger:flutterViewController.binaryMessenger];
//exitUpiModule triggered from flutter module
[channel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult  _Nonnull result) {
if([call.method isEqualToString:@"exitUpiModule"]){
	//CLOSES THE FLUTTER MODULE BUT WHEN OPENED IT LANDS ON THE SAME SCREEN
	[flutterViewController dismissViewControllerAnimated:YES completion:nil];

  }

}];`

@starjs-1508 Can you please provide a completed and minimal reproducible code sample so that we may verify this? In this case, it would be better if you could elaborate the sample code on a GitHub repository and share it here.
Also, please provide the output of flutter doctor -v as well. Thank you!


Fix returning interface types from rpc methods

Fixes #2003
interface does not extend Serializable but type does.
interface R1 {
  field: string;
}
type R2 = {
  field: string;
}

R1 extends Serializable fails.
R2 extends Serializable ok.
After the patch both interface and type match Serializable.
This fix is a starting point for the issue, there may be a better solution.

I have read the CLA Document and I hereby sign the CLA

Better fix may be done like this;
Here is Serializable type
https://github.com/cloudflare/workerd/blob/4098ac7c038d5097c470b3b5413b598b52730b98/types/defines/rpc.d.ts#L30-L58
This line does not match interfaces
    | { [key: string | number]: Serializable }

To make it work, Serializable should take the interface as a generic type like this;
type Serializable<T> =
...
    | { [K in keyof T]: Serializable<T[K]> }
...

But this solution make things more complicated.

The trouble is, we don't want user-defined classes to be considered serializable unless they extend RpcTarget.
Does this change keep that property, or will it make all user-defined classes be considered serializable?

@kentonv  I see the trouble, but the point is if developers believe that if the value is serializable and the type check fails, they will use some workarounds or will manuplate types, like here;
class SomeClass {
  member: number = 0;
}

type WorkAround = {
  member: number
};

class SomeDurableObject {
  async someRpc(): Promise<WorkAround> {
    return new SomeClass();
  }
}

// This will pass the check
const res = await someDoStub.someRpc();
console.log(res.member);

There is no way to avoid the example above.
So the real responsible part is the business logic that serializes.
I think that if the value is serializable, types should let it without workarounds that look unnecessary.
I also improved the fix and added a new constraint; object member cannot be a function.
Here is an example that shows the before and after the fix;
type RpcReturnType1 = {
  a: number;
  sub: {
    b: number;
  },
}
// Before fix: Ok
// After fix: Ok

interface SomeSubInterface {
  b: number;
}
interface RpcReturnType2 {
  a: number;
  sub: SomeSubInterface;
}
// Before fix: Fails
// After fix: Ok

type RpcReturnType3 = {
  cb: () => number
}
// Before fix: Ok (functions are considered objects, that's why they pass the check)
// After fix: Fails (added new constraint in the check)

Actually, it looks like returning callbacks are ok as I tested. (I didn't know rpc was capable of this)
As you said We don't want user-defined classes I just added the constraint, so developers use  RpcTarget for advanced usage. But I'm not sure if this constraint should be there.
By the way, my work here is to speed up things, and it is ok if you don't like it as I understand your concerns : )

I read the documentation about RpcTarget, and my fix conflicted with the documentation since using callback as rpc return type is valid usage.
I just reverted the function check in case of that you may use this pull request.
Now all the fix does is let class instances and interfaces as return types of an rpc method.

Can someone on the team who knows typescript better than me review this? @petebacondarwin @penalosa ?

LGTM
Just needed to use the generic within the recursive parts of the type too

The tests are failing because of the requirement Kenton metioned above: "we don't want user-defined classes to be considered serializable unless they extend RpcTarget"
I'll take another look at this now

I think the way forward here is to allow classes to be serializable but make clear to users that the serialized form is a plain-object, not the original class instance

Since the returned object is stubified, return types of all methods of the object will be Promise, and that will make a visible difference that it is not the original class instance. (Unless all methods of the original class are already returning Promise.)

Regardless of what the type system says, attempting to serialize an instance of a class (that does not extend RpcTarget) will fail at runtime. This is an intentional design choice which we won't be changing.
If there's no way for TypeScript to enforce the same at type-checking time, then it seems we should make TypeScript more lenient, and just live with the fact that this problem won't be diagnosed until runtime.

If class instances cause failure at runtime, I respect and agree that types should not let this usage.
Btw I missed fixing other Structured cloneable composites types, that's my fault and a proper fix should be like this;
type Serializable<T> =
...
  | Map<
      Serializable<T extends Map<infer U, unknown> ? U : never>,
      Serializable<T extends Map<unknown, infer U> ? U : never>
    >
  | Set<Serializable<T extends Set<infer U> ? U : never>>
  | ReadonlyArray<Serializable<T extends ReadonlyArray<infer U> ? U : never>>
...

Now my main concern is Serializable type is getting spagettier and may be harder to maintain future improvements, so I'm not confident with this fix.

Regardless of what the type system says, attempting to serialize an instance of a class (that does not extend RpcTarget) will fail at runtime. This is an intentional design choice which we won't be changing.

To clarify, I did mean to allow it in the typings, not to change the runtime behaviour to allow it.
I admit though I made an assumption that, since plain objects are allowed, classes would work in some form at runtime as if they were plain objects – eg. instance properties and methods work but prototype methods would not. But I see from the docs that we have decided that behaviour is "rarely useful in practice" and to avoid the footgun.

If there's no way for TypeScript to enforce the same at type-checking time, then it seems we should make TypeScript more lenient, and just live with the fact that this problem won't be diagnosed until runtime.

Essentially, what I was saying. And if we deem it useful to catch these anti-patterns at dev-time, we can implement a lint rule.

Linking this comment for visibility

Sorry I lost track of this.
Honestly I don't understand how this works. It might be nice to add a comment, unless this should just be obvious to typescript wizards.
Otherwise @penalosa if you could get the test passing (looks like CI doesn't like it right now) and click your approval then I'll be happy to merge.

Some little further fixes need to be done before merging. Let me do it.

My 2 main fixes are;

Fixed Serializable to properly resolve structured composite types.

-    | Map<Serializable<T>, Serializable<T>>
-    | Set<Serializable<T>>
-    | ReadonlyArray<Serializable<T>>
+    | Map<
+        T extends Map<infer U, unknown> ? Serializable<U> : never,
+        T extends Map<unknown, infer U> ? Serializable<U> : never
+      >
+    | Set<T extends Set<infer U> ? Serializable<U> : never>
+    | ReadonlyArray<T extends ReadonlyArray<infer U> ? Serializable<U> : never>

I realized that when using interfaces, callbacks were not being stubified (would not return a promise). I fixed this in the Stubify<T> type with a small change:

- : T extends { [key: string | number]: unknown } ? { [K in keyof T]: Stubify<T[K]> }
+ : T extends { [key: string | number]: any } ? { [K in keyof T]: Stubify<T[K]> }

I also added a comment at the top of the Serializable type.
See the commit: https://github.com/cloudflare/workerd/pull/2040/commits/09429df522cb1d43c5ead365035b959e9d035c6b

Thanks so much @alpertuna!
This is looking pretty good to me but I'd appreciate if @penalosa could sign off before we merge.

Doh, there's now a merge conflict...

@alpertuna ... rather than using a merge commit here, can I ask you to rebase the PR on main?

Sorry about that. Everything should be fine now.


Updated read me file

What does this pull request do?
Update to read me file
What is the intent behind these changes?
To give more information to dev so that they can setup environment quickly

@dhirajshettymoj true, @AledWEvans probably wants to be on Confluence and this PR purging from GitHub....my bad for approving.


FIDO UAF Client (Android) is not handling UAFIntentType.DISCOVER properly

According to FIDO UAF Application API and Transport Binding Specification:

Android intent invokes the FIDO UAF Client to discover the available authenticators and capabilities. The FIDO UAF Client generally will not show a UI associated with the handling of this intent, but immediately return the JSON structure. The calling application cannot depend on this however, as the FIDO UAF Client MAY show a UI for privacy purposes, allowing the user to choose whether and which authenticators to disclose to the calling application.
This intent MUST be invoked with startActivityForResult().

Current ExampleFidoUafClient class is not handling UAFIntentType properly and there is nothing to catch UAFIntentType.DISCOVER. As consequence a 3rd party Android RP App is not able to discovery and use Marvin UAF Client.
It is my suggestion to be included in finishWithResult method:
Bundle extras = getIntent().getExtras();
        if (extras != null) {
            String data = (String) extras.get("UAFIntentType");
            if (data != null) {

                if (data.equals(UAFIntentType.DISCOVER)) {
                    extras = new Bundle();
                    extras.putString("UAFIntentType", UAFIntentType.DISCOVER_RESULT.name());
                    extras.putShort("errorCode", ErrorCode.NO_ERROR.getID());
                    extras.putString("discoveryData", DiscoveryData.getFakeDiscoveryData());
                    intent.putExtras(extras);

                    setResult(Activity.RESULT_OK, intent);
                    finish();
                }

                if (data.equals(UAFIntentType.UAF_OPERATION.name())) {
                    String message = (String) extras.get("message");
                    String channelBindings = (String) extras.get("channelBindings");
                    String inMsg = extract(message);
                    String response = "";
                }

            }
        }

But it will implicate in a lot of modifications in onActivityResult method in MainActivity class.

Hi Emerson,
This is a good point. It would be nice to have implemented handling of the DISCOVER UAF intent type.
It looks like you are on the way to implement it. Let me know if you run into any issues.
Thanks,
Neb.

Hi Neb,
Yes, I already did that in a "new FIDO UAF Client", but I can do that on Marvin UAF Client. Probably this new code will imply in some changes on Android RP Client as well. I guess that is a good opportunity to split Marvin from RP Client.
What do you think?
BTW, should I get/work UAFClient from master branch or from f_android_uaf_client branch?
Cheers,

Hi, I have fix the use permission in manifest and android Intent as https://fidoalliance.org/specs/fido-uaf-v1.0-ps-20141208/fido-uaf-client-api-transport-v1.0-ps-20141208.html#android-intent-api: Why when i use conformance test tool from fido, i alway meet this error and can not get the return result JSON from my uaf server (this is an FIDO UAF server have certified): "E/UAFClientAPI: Malformed response: mandatory field IEN_COMPONENT_NAME is missing". Can you help me? Is there any more configuration for UAF Intent?

@silverstar235 your app response missing componentName in extra

The component name of the responding FIDO UAF Client. It must be serialized using ComponentName.flattenString()

Hi, i have used Intent.setComponent(myComponen). Expected that, i created
my new component for MainActivity and add it to  Bundle but it still not be
okay to send data to Conformance App.
Best regards,
NhuPhuong Tran
[image: Kết quả hình ảnh cho vtc smarttech]
Smart Technologies Investment & Development Co., Ltd. - R&D Department
614 Dien Bien Phu, District 10, Ho Chi Minh City, Viet Nam
Phone: 0166 7971 488
2017-06-15 14:27 GMT+07:00 Ackermann Yuriy<EMAIL_ADDRESS>
@silverstar235 https://github.com/silverstar235 your app response
missing componentName in extra
The component name of the responding FIDO UAF Client. It must be
serialized using ComponentName.flattenString()
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/eBay/UAF/issues/21#issuecomment-308651730, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ATD1ZknPyN3KS5ZGNRCgCzZ88Xcsrh16ks5sENzzgaJpZM4IjXuN
.

Try to look at intent response and check that it's actually contains componentName field


OCP 4.7 community-operators missing external-secrets-operator v0.5.1

We are using different OCP versions (4.7, 4.8, 4.9), and since https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/1060 was merged, external-secrets-operator have upgraded to v0.5.1 on OCP 4.8 and OCP 4.9, but clusters with OCP 4.7 have their latest version stuck at v0.5.0.
We tried recreating community-operator catalog pod without success.
Could you please submit external-secrets-operator v0.5.1 to OCP 4.7 community-operator catalog?
Thanks in advance

@slopezz please check again

@slopezz please check again

It is working @J0zi, thank you!