Don't directly delete abandoned txes from GUI

This fully closes bitcoin/bitcoin#12179. Currently, when a user abandons a transaction by clicking "Abandon Transaction" in the context menu, a call is made to remove it from the GUI view:
model->getTransactionTableModel()->updateTransaction(hashQStr, CT_UPDATED, false);
(The false parameter is for bool showTransaction)
This behavior is probably unwanted, as the transaction is not actually removed from the wallet and would show up again if the node is restarted.
However, the previous line, model->wallet().abandonTransaction(hash);, changes the underlying model and calls NotifyTransactionChanged(wtx.GetHash(), CT_UPDATED);, which queues a signal that eventually calls back to updateTransaction, this time with showTransaction set to true. This runs on a separate thread, so it gets called after the 'subsequent' updateTransaction. The transaction gets removed from the GUI and immediately added back.
In a nutshell, updateTransaction gets called twice. The first (direct) call deletes the transaction from the GUI. The second (sent via a queued signal) brings it back to the GUI. The first direct call is redundant and unwanted. Worse, if the abandonTransaction call fails for any reason, the transaction still gets removed from the GUI. (This is what caused bitcoin#12179. It can still be triggered if, eg., a user clicks "Abandon Transaction" the moment after a new block is found.)
There are no conditions (to my knowledge) where an abandoned transaction should be directly removed from the GUI. If the underlying model changes, the deletion should be reflected anyway by the queued signal to updateTransaction.
The behavior is borne out by the QT logs. To reproduce, send a transaction with RBF enabled, then bump the fee, then 'abandon transaction' on the first transaction. The logs will show something like this:
2022-11-28T14:48:00Z [qt] GUI: "NotifyTransactionChanged: 2c5811484f1adec92a739a5e70b453b03eaed0f7cc0538fbd0ee1589e586b951 status= 1"
2022-11-28T14:48:00Z [qt] GUI: "TransactionTablePriv::updateWallet: 2c5811484f1adec92a739a5e70b453b03eaed0f7cc0538fbd0ee1589e586b951 1"
2022-11-28T14:48:00Z [qt] GUI: "    inModel=1 Index=381-382 showTransaction=0 derivedStatus=2"
2022-11-28T14:48:00Z [qt] GUI: "TransactionTablePriv::updateWallet: 2c5811484f1adec92a739a5e70b453b03eaed0f7cc0538fbd0ee1589e586b951 1"
2022-11-28T14:48:00Z [qt] GUI: "    inModel=0 Index=381-381 showTransaction=1 derivedStatus=0"

Notice the duplicate updateWallet calls with different showTransaction values.

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.

@john-moffett Thank you for your contribution!

This fully closes bitcoin/bitcoin#12179.

That issue looks outdated as it describes behavior no longer possible on the master branch, for example, a user's ability to abandon of a conflicted transaction (see https://github.com/bitcoin/bitcoin/pull/12282).

Currently, when a user abandons a transaction by clicking "Abandon Transaction" in the context menu, a call is made to remove it from the GUI view

Is there a specific wrong or unexpected behavior from a user's point of view?

@hebasto Happy to help.

That issue looks outdated as it describes behavior no longer possible on the master branch, for example, a user's ability to abandon of a conflicted transaction (see https://github.com/bitcoin/bitcoin/pull/12282).

Yes, the main issue has already been fixed -- that a conflicted tx could still be "abandoned". However, an issue that still isn't fully fixed in master is that a row may be removed from the GUI when it shouldn't be. This is what was referred to in this comment. It typically won't occur, but still can in edge cases. For example, the following steps will reproduce the issue:

Send an RBF-enabled transaction.

Bump the fee.

Right click the original transaction in the GUI. Notice "Abandon Transaction" is clickable (as it should be).

A new block is added before you actually click "Abandon Transaction". (To simulate this, I started Qt in regtest with -server and issued sleep 10 && src/bitcoin-cli generatetoaddress 1 bcrt....)

Click "Abandon Transaction" (at this point it should be a no-op since it's now conflicted). However, the transaction is removed from the GUI:

Restart Bitcoin-Qt and the transaction reappears:

I'm curious whether another TransactionTableModel::updateTransaction() call is still required:

I believe it is unnecessary, as bumpfee will (on success) have committed a new transaction and the old transaction(s) get updated here:
https://github.com/bitcoin-core/gui/blob/0596aa40f77a630d8a21035856fa5fd6838b292e/src/wallet/wallet.cpp#L2301
Indeed, bumping the fee via bitcoin-cli results in an updated GUI.

This may also close https://github.com/bitcoin-core/gui/issues/635. I haven't been able to replicate that, but given the behavior of delete-then-add-back in master, it would make sense.


C++ solution for Problem. 58 in Easy Section

Hi @Vanshika2063 ,
I would like to add the C++ solution of Problem. 58 of LeetCode.
Could you please assign me with this issue?

sure

i also want to contribute vanshika

i also want to contribute vanshika

sure


Simplify the abstraction of evict policy

Regarding the abstraction of eviction in foryer-memory, i.e., the Eviction trait, I feel it is somewhat over-abstracted. We should simplify some of its interfaces and the use of generics to reduce the development and maintenance costs of the eviction algorithms.
Here are two references:

https://github.com/cloudflare/pingora/blob/main/pingora-cache/src/eviction/mod.rs
https://github.com/xiaguan/page_cache/blob/master/src/policy.rs

Looking forward to everyone's opinions."

I'm wondering why LRU evction in foyer-memory doesn't impl access().
And I can't understand the handle cleary, can you simplely explain it for me? Thanks.

I think we should consider refactoring foryer-memory :thinking: .
One reason is that our abstractions are somewhat complex, and the lack of documentation makes development and maintenance quite challenging :sob: .
Another reason is that the use of generics and unsafe might not be user-friendly for future users :face_with_head_bandage: .
Do you have any thoughts on how to address these issues step by step? I am also very willing to make my contribution :smiling_face_with_three_hearts:

I'm wondering why LRU evction in foyer-memory doesn't impl access(). And I can't understand the handle cleary, can you simplely explain it for me? Thanks.

The latest used LRU entry is moved when releasing, instead of accessing. When serving as an LSM-tree block cache, a block iterator can hold a block for a much longer time than other operations. If the entry is moved when accessing, a block that is held by a slow iterator will be evicted too soon after it is unheld.

One reason is that our abstractions are somewhat complex.

I agree. But some of the complexity comes from the use cases. We can discuss about where you want to refactor before you do it to avoid misunderstandings. 🥰

lack of documentation makes development and maintenance quite challenging 😭

Sorry about that. I will write some example and docs for it. For now, you can refer to how foyer-memory is used in RisingWave. [block cache](https://github.com/risingwavelabs/risingwave/blob/main/src/storage/src/hummock/block_cache.rs and meta cache

Another reason is that the use of generics and unsafe might not be user-friendly for future users 🤕 .

The unsafe is used for implementing intrusive data structures. To achieve better performance (e.g. remove a entry from a linked list with a entry pointer) and solve the multi-container problem (one entry is held by both the eviction container and the indexer), the intrusive data structure is a good choice to avoid redundant memory usage, memory copy and unnecessary lock usage to make the ownership checker happy.
The complexity is hidden behind the safe abstractions. It will not bother the user (and as you see, a naive user can focus on 2 generic types only). I think it is worth bothering the developer to provide better performance for users.

Do you have any thoughts on how to address these issues step by step?

As the saying goes, the onlooker sees clearly, but those involved are often confused. Ideas are always welcomed.


Android app startup time decreases dramaticaly after app-sync update

I get the following startup times for the same app (no updates at all):
Before app-sync update (.apk file install) = 6 sec
After app-sync update = 30 sec
The 6 seconds is achieved by lazy loading - https://docs.nativescript.org/angular/performance-optimizations/lazy-loading
Anyone else experienced the same issue?
Thank you for your answer.
Note: first version of the app uploaded to AppSync Server did not use lazy loading

I found out that the issue was related to the nativescript version.
After the update to Nativescript 6.0 the issue was gone.


why rpc and timer can't work together in direct running in module

I have met a strange problem, and test many times. I'm sure this is a bug, but how to solve it?
when the code is following, and run it with command line 'nameko run module', the timer runs normally. But when I run it with command line 'python module.py', the timer doesn't work.
class ServiceA:
    name='service_a'

    @rpc
    def dosomething(self):
        return 'hello world'

    @timer(interval=1)
    def daemon(self):
        print('ping')

if __name__=='__main__':
    runner=ServiceRunner(config={'AMQP_URI': 'pyamqp://guest:guest@localhost'})
    runner.add_service(ServiceA)
    runner.start()
    runner.wait()

And If I run following code, no matter 'nameko run module' or 'python module.py', the timer runs normally.
class ServiceA:
    name='service_a'

    @timer(interval=1)
    def daemon(self):
        print('ping')

if __name__=='__main__':
    runner=ServiceRunner(config={'AMQP_URI': 'pyamqp://guest:guest@localhost'})
    runner.add_service(ServiceA)
    runner.start()
    runner.wait()

So can anyone help solving it?

You're missing an eventlet.monkey_patch. See the note at the bottom of this section of the docs. nameko run applies this for you.
It happens to work in the timer-only case because that particular extension doesn't do any I/O, so doesn't need the eventlet patch to be applied.


libcpr: 1.10.2 -> 1.10.3

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/libcpr/cpr/releases.
meta.description for libcpr is: C++ wrapper around libcurl
meta.homepage for libcpr is: https://docs.libcpr.org/
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.10.3 in filename of file in /nix/store/4jy68b5hn438nq6g9g5vxynx85xma1ik-libcpr-1.10.3

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
libcpr

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/4jy68b5hn438nq6g9g5vxynx85xma1ik-libcpr-1.10.3 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A libcpr https://github.com/r-ryantm/nixpkgs/archive/8967221b9d689866e08faddeb8f919a01356367d.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/4jy68b5hn438nq6g9g5vxynx85xma1ik-libcpr-1.10.3
ls -la /nix/store/4jy68b5hn438nq6g9g5vxynx85xma1ik-libcpr-1.10.3/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

libcpr

Maintainer pings
cc @rycee for testing.

Result of nixpkgs-review pr 232354 run on x86_64-darwin 1

2 packages built:

libcpr
libcpr.dev

@ofborg build libcpr libcpr.passthru.tests

Thanks @wegank 🙂


Confirm a node actually has the child nodelist it claims to have before accessing the nodelist

Found that Django IncludeNode.child_nodelists is ('nodelists',), but the IncludeNode doesn't actually have a nodelists attribute. Check the attribute exists before accessing it. See https://github.com/boxed/django-fastdev/issues/47#issuecomment-2408610254.

Huh. I thought I fixed that in Django a while back. Thanks!


Remove Flux, Reflux, etc from generator

The generator has gained much more traction than I would have invisaged and to maintain it better I need to remove complexity and additional potentially unnecessary functionality.
A while back I merged in a pull request that introduced Flux and Reflux. Although the input was appreciated it has increased the overall scope of this generator, has confusing directory naming conventions (a, c, s) and with the growth of the options to develop with React, the additions could become endless. I should have paid more attention and had more forethought, however, I simply have not had the time to focus as I wanted on this generator.
I am going to start looking at removing all the unnecessary framework related bloat and hopefully someone in the community can separately write their own generators for them.

@weblogixx in regards to your suggestion https://github.com/newtriks/generator-react-webpack/issues/129#issuecomment-123608007 that looks great. My suggested plan of attack is to:

Strip back the generator to the original bare bones of functionality.
Update all packages both in templates and generator.
Fix existing issues related to core generated project.
Optimise for ES2015, etc.
Create a new release and merge back into master.
Focus on composing with other generators.

@newtriks Sounds good to me. So, first step would be to remove the flux stuff. What do you think about putting those changes in its own branch so we can still supply bugfixes for the current version in the trunk? Just added a new "slimdown" branch on my fork where i will remove flux and all of its traces.

@weblogixx done: https://github.com/newtriks/generator-react-webpack/tree/v1

@newtriks: I think I have a good working version done in v1. Mind to take a look and tell me if you find something you dont like? We then should plan how to migrate to the new version (should then be 2.0 because breaking changes?)

@weblogixx awesome work mate thank you! My thoughts so far are:

Not sure what this is about as the directory naming of simply c is unclear?
I think we could get rid of Grunt completely also and have that as a sub-generator. We could have all the necessary logic for running webpack etc using npm scripts in the package.json. What do you think?
I'd use ES2015/2016 module imports and destructuring in the JS, for example here.

What do you think?

Hi,
gonna look for this stuff in a couple of days. I think tge "c" directory is a nice shortcut as it allows to use yo react-webpack:c newcomponent, saves a view keystrokes.

I will try also to dive in if I get a chance

@newtriks: I recently played around with webpack and react, as well as a little unit testing (not finished at the moment). You can see it at https://github.com/weblogixx/react-webpack-template. All scripts use npm as runner, so there is no more grunt/gulp/whatever involved.
I still use karma as a unit runner, because it allows you to test events and other stuff. Even if it is slow, I think it is a good approach for the moment (at least until shallow rendering is fully implemented with all stuff that is missing from there. Also I had some problems with it (like testing components that get wrapped in AltContainers), so it does not seem that it is useable without any problems in the moment. When using karma, one could still use the "old" ReactTestUtils if needed, using the shallowRenderer only for "dumb" components that have no state but just do plain rendering.
Seems like it is not so easy to test react yet :(.
Please tell me what you think about the template, if it is acceptable for you, I will include it into the v1 branch.

Hey @weblogixx, thanks for this mate. I agree that Karma although slow is still maybe the better option. I started playing with some testing basics here. There are also some inspiration to be gained from this codebase I think.

Hi @newtriks, I got the next version ready. It only includes the basic react component creation (as usually with Stylesheet and Testsupport. You can test it at https://github.com/weblogixx/generator-react-webpack/tree/rewrite. It uses react-webpack-template as source of the project generation process, so version updates and stuff like that can be done without altering the generator code.
I also wrote some tests for the utility functions (just two or three needed ones) and the generation itself.
However, I build it from scratch because the internals of the current generator where a bit hard to gasp.
Please take a look at it and tell me what you think. I will create a new repository for a flux-enabled version that uses the base generator to provide alt.js support, just to see how easy it can be done.
What do you think about creating an organization for the complete generator packages, so they can be easier maintained? I could also move the template, as well as the 2.0 codebase onto it.
Looking forward to your answer.

@newtriks: Info: The new generator will only work on node >= 4.0.0. I used arrow functions and stuff like that to create it.

@weblogixx mate, this is amazing work thank you so much! The past three months for me have been consumed with so many things I have been unable to look at this generator, so your work is gratefully appreciated.
Once reviewed and deployed I suggest we maybe propose this generator to the https://github.com/rackt organisation? I don't know how they review potential repos but maybe @ryanflorence could be of assitance to us?

@newtriks: That would be really nice. There are some things missing currently (as the new readme and stuff), but that should be there in no time. Unit tests for react-webpack:component are there since the last commit, too :)

@newtriks: Seems like it works with composing, I still have to include support for creating new components but the rest seems to fit quite well. Please have a look at https://github.com/weblogixx/generator-react-webpack-alt for a running configuration.
Did you have time for a look at the new source already? I would like to roll out 2.0 as fast as possible (because the number of requests for 1.0 are still getting more).

As Version 2 is out now, this feature can now be closed.


TriggerEditDialog StartBoundary is not showing correct format

Hello, thanks very much for the great wrapper.
But I find there is time format display issue exists on the latest TriggerEditDialog -- When I set Non-English Time format on 'Region and Language' of Control Panel, for example, set Format to 'Franch (France)', set Short time format to 'HH:mm' and  Long time format to 'HH:mm:ss', then the StartBoundary on TriggerEditDialog will show 12h format instead of 24h format. That is unable to determine if AM or PM time.
I find this issue and root cause has ever been posted as below link:
https://taskscheduler.codeplex.com/discussions/441722
Is there any plan to fix this problem for the wrapper? Thanks.
Originally posted: 2017-02-07T23:00:10

Yes, please try the 2.5.22 release that was just pushed 2 days ago.
Originally posted: 2017-02-08T09:20:04

That works, thank you very much!
Originally posted: 2017-02-13T00:26:53


Add at-rule-no-unknown

Yes, or no? It would require and override when used with SCSS.

It's incompatible with SCSS syntax.


introduce the var to delete the kube-proxy so we can test the cilium …

introduce the var to delete the kube-proxy so we can test the cilium kpr

I tried it that way the problem is some distio doesn't support you to disable it during the install or I can't find it. I also ran into the other issues with EKS terraform module.
After a few attempts, I think this is almost the best way to implement it. I don't know what else is needed, but my understanding is we delete the kube-proxy ds/cm and delete all the iptable rules for KUBE should be enough. I'm open to any other idea if that's better for us to implement.


Response object not natively available when calling features from karate-config.js

This issue started occurring with Karate 1.0
The following feature file will fail when called from karate-config with error org.graalvm.polyglot.PolyglotException: ReferenceError: "response" is not defined
This same feature file will succeed when called outside of/after karate-config
Scenario: this will fail
    * table params
        | param1 | param2 | param3 |
        | 'abc'  | 'def'  | 'ghi'  |
    * call read('classpath:com/repro/httpbin/httpbin.feature@endpoint=get_httpbin') params
    * def headers = response.headers

The same feature file, now edited, setting call to a variable and referencing the variable works
Scenario: this will succeed
    * table params
        | param1 | param2 | param3 |
        | 'abc'  | 'def'  | 'ghi'  |
    * def r = call read('classpath:com/repro/httpbin/httpbin.feature@endpoint=get_httpbin') params
    * def headers = r[0].response.headers

Attaching a demo project referencing the issue
myproject.zip
To Repro
Open /src/test/java/com/repro/tests/test.feature and run @test=test1 scenario
Witness error in console or /build/karate.log
Open /src/test/java/com/repro/setup/customers/customers_setup.feature and goto line 11 to reach problematic code.
Comment out option 1 section of code
Uncomment option 2 section of code
Run @test=test1 scenario again

that's weird - since I'm having a very busy month cc @joelpramos since he is familiar with this code

I’m touching the calling of features with the fix I’m doing for #1793 so I’ll look into this one too.

@kirksl can you give it a try with the last commit at https://github.com/karatelabs/karate/pull/1828

@joelpramos i still the issue when trying latest develop branch

Took a look into your scenario bit better - problem is when calling a Feature with an array (i.e. multiple executions) in sharedScope the variables are not getting propagated to the parent.
I noticed that when fixing the original issue that lead me to refactor some details on the callFeature (Config changes weren't getting propagated to caller in shared scope).
The fix is to replace ScenarioEngine.java:2053 with the following:
            if (resultVariables.isMap()) {
                setVariables(resultVariables.getValue());
            } else if (resultVariables.isList()) {
                ((List) resultVariables.getValue()).forEach(r -> {
                    setVariables((Map) r);
                });
            }

i.e. the else condition will try to propagate all variables of the called Feature. Looking for yours and @ptrthomas opinion though... how do we think this should behave? Since it's an iteration we'll have the same variables with multiple values (e.g. the response object itself in case of calling an API) so is there value in propagating the shared scope?
I guess that was the design pre v1.0 so I'm ok implementing that behavior (and do the same to propagate any Config changes) but I think we should maybe add a note in the documentation to avoid this as the order of the execution of the scenarios cannot be guaranteed.

Btw to reproduce just need to add an array as argument in the call of the following file: karate-core/src/test/java/com/intuit/karate/core/parallel/call-single-from-config3.feature .
Response will become an array thus it won't propagate the response to the caller.

@joelpramos I'm ok to propagate, a call array loop always runs on one thread (scenario outlines can run in parallel)

@kirksl fixed in develop

thank you @joelpramos
my test is limited, but this appears fixed.
once the issue below is fixed i can fully test this on my end
https://github.com/karatelabs/karate/issues/1838

1.2.0 released

tagging this to #2009 - I'm going to undo this change. so a "call loop in shared scope" will never propagate variables back to caller. it doesn't make sense


New sensor containing next backup date

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
Currently we are not able to retrieve the next backup date.
Describe the solution you'd like
It should be interesting if we could retrieve this information in Home Assistant.
Describe alternatives you've considered
Creating a new sensor containing the date of the next planned backup named : "sensor.**_next_date"
Additional context
Don't know if my request is possible. Thanks for your work.

Hi @bastgau,
I had a look into this and I won't add a new sensor, as I don't use Duplicati as scheduler for my backups and I don't want to have sensors that are not used or are inactive.
However, I will adapt the integration to extract the next scheduled backup date (if available) and add it as attribute to the last_backup_execution sensor.
The next beta will contain this enhancement (besides a few others).

The information as attribute is fine too. 😉
Thanks.

Feel free to test it ☺
https://github.com/txxa/hass-duplicati/releases/tag/v0.2.0_beta2

Juste updated. Everything seems to be OK for me !


Fix released package.jsons' gitHead being the previous commit

Also, replace the clunky EndBug/add-and-commit action with simply good
old CLI Git usage.

Codecov Report

Merging #13 (810d335) into master (71cec49) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            3         3
  Lines           59        59
  Branches        10        10
=========================================
  Hits            59        59

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 71cec49...810d335. Read the comment docs.

Replaced by #14

Replaced by #14.


Empty dataframe in eia_io_trading.py

The dataframe titled 'df_ba_trade_sum' is empty when running main..py for BA areas.

Can you provide some more details? Perhaps it would be easier to share the model config file you're using and then which version of electricitylci you're running.

ELCI_1_config.txt
Here is the model config file in TXT format. I am using the latest version of electricitylci. Main.py for eGRID region works.   The dataframe 'df_ba_trade' is also empty in eia_io_trading.py.

It looks like the list 'BA_TO_BA_ROWS', which 'df_ba_trade' depends on, also remains empty in eia_io_trading.py.

Are you able to find the folders where electricitylci downloads the data files from EIA, etc.? I'm wondering if electricitylci/bulk_data/EBA.zip is either missing or downloading an empty version. I'd be surprised if electricitylci didn't error out if the download failed. The EBA.zip I have downloaded is from 2022 and is 457MB.

I located EBA.zip file which contains only EBA.txt. It is 321 MB compressed size. When I open this file through anaconda power shell prompt and display the first 10 lines, it is full of arrays with characters that look like the following: ["20230828T11-04","-642"],["20230828T10-04","-789"],["20230828T09-04","-866"]...["20181231T22-05","-442"],["20181231T21-05","-447"],["20181231T20-05","-473"]. In terms of all the folders within \electricitylci\data that have EIA data such as \eia860_2014 and \f923_2015, they seem to have all relevant EIA data successfully downloaded and stored.

Thanks - I'm looking at two different vintages of the EBA now - one I downloaded yesterday and one that I've had since 2022. There are two different issues going on here:

They changed the format of the file a little bit. In the 2022 era data, there's a field in the lines called geoset_id. This is where the code is currently looking for the text "keywords": EBA.NG.H or EBA.NG.HL. The new version of the bulk data file doesn't appear to have the same field. We'll likely need to change the code to do a regex search at the beginning of the lines to catch EBA.TVA-ALL.NG.COL.H for example. This is why you're getting completely empty dataframes.
They appear to be rotating through the data so that the 2016 data no longer exists. I see this line in the 2024 EBA "start":"20190101T00","end":"20240814T10" and in the same data line in the 2022 file I see: start":"20180716T01-05","end":"20220616T00-05". I'm actually trying to go back further but it appears I only have a May 2021 EBA.zip that doesn't contain 2016 data unless I'm misunderstanding the data here. For reference, I ran the electricitylci for the official version of the electricity baseline in May of 2020. So even we were correctly reading the new version of the file, we wouldn't be able to get 2016 data.

Just a quick update on the available data years. It takes more than a spot-check of a couple of lines. I found data going back to 2018 in the 2024 EBA.zip, and in the May 2021 version, there are data for 2016. Now whether the older data is in the right place, we won't really find out until the script turns up empty data frames. I have no desire to parse 2+GB text files. However, it appears that the 2024-vintage EBA.zip I have only has the data we need going back to 2019.

If you run the latest version of electricity LCI with the may 2021 EBA.zip version for 'BA' regional aggregation, does the main code run fine or do you run into an error with eia_io_trading.py? If it runs fine, which file do you recommend I download from EIA to replace the existing EBA.zip that the code generated?

I was able to run v.1.0.1 with my ~2021 era EBA.zip. Unfortunately, I'm not aware of historical EBA files being stored anywhere on EIA. I also just tried to add my 2021 as an attachment here, but file size limit is 25MB. I might make an attempt to filter mine for 2016 data needed and ad it here.

In the config file, I set 'replace_egrid' and 'net_trading' to False which means generation is coming from eGRID and trading does not depend on EIA data. In that case, what purpose does EIA bulk data serve? Is this bulk EIA data necessary for the code to run regardless of configuration settings? I am trying to think of a way to bypass the need for the data, if possible.

Well, that is a separate issue. You could use EPA_eGRID_trading: True and that'll use a different method entirely that doesn't depend on bulk data. You would also have to set replace_egrid: False. It's a different method. You'll only get consumption mixes for eGRID regions, if you're okay with that.

For posterity, even after removing the unneeded data from EBA.txt, I was still only able to get the zipped file size to 100MB.

The goal is to generate the inventories (generation or consumption) at the BA area spatial level. I realized that the epa trading method is irrelevant to BA aggregation so setting it to True results in error. I set this to False. I also set the net_trading to False. After this, we still get the original error of empty dataframes in eia_io_trading.py when running the main code for BA. It seems like the code requires this EIA data regardless of the model configuration for BA aggregation. If the issue is indeed within the EBA.zip itself, then the solution would be to obtain the 2021 zip file you have so that I can run the code successfully. I work at NREL and we can communicate externally (check email).

Basically, the question is why does the main code for BA calculate BA level consumption mixes via EIA bulk data when it has been specified by the configuration file that trading is turned off and generation should come from eGRID?

If your aggregation is BA then the script is going to force the consumption mix path to be compatible with that -  I think there's a logging message somewhere along the way that says this, but I think we chose to just go ahead and run the code rather than stop execution. regional_aggregation needs to be eGRID in order to use the EPA_eGRID trading scheme. And then the net_trading flag might be misteading - it's an option for the EPA_egrid trading scheme.

As another update here, it looks like in the updated EBA files, the datetime strings have changed to and are now time zone agnostic (all forced to zulu). In any case, it's going to require a change to how the datetimes are processed. Working on an update now.

As an FYI, I made some changes to the bulk data processing to address this. Still won't get 2016 data, but it can at least process a newer EBA.zip: https://github.com/KeyLogicLCA/ElectricityLCI/commit/3d8c244708497c61e53b375eabbec450e84f9f73

It's a pity that the EPA's API does not have data that go back to 2016. Fortunately, I have a copy of EBA.txt from March 2024, that includes data back to 2015. It includes 8,784 rows for net generation, and 2.5 million rows in BA trade.

In 2022, the U.S. Energy Information Administration (EIA) records officer transferred the older 930 data to NARA for permanent archival.  That link is here:
https://catalog.archives.gov/search?page=1&q="Hourly and Daily Balancing Authority Operations Report Files".


Missing license header files

file ./e2e/advanced/files/deploy.yaml does not contain license
file ./.github/workflows/comment-pr.yaml does not contain license

How did you find these ? I used the check_licenses.sh script and it did not see these files.

How did you find these ? I ran the check_licenses.sh script and it did not see these files.

During release process. I think it is the same script, but not sure 100%.

Ok, I found my issue, I have some temp files not without license so it block the full code scan.


if string contains % tr function crashes

I have similar string ".. 5% ...". Function tr crashes as it always try to push this string to format, I think we should check number of arguments in tr before applying format
  private static func tr(key: String, _ args: CVarArgType...) -> String {
    let localizedString = NSLocalizedString(key, comment: "")
    if args.isEmpty {
      return localizedString
    }
    return String(format: localizedString, arguments: args)
  }

Can you be more specific with your example?
Such a use case should never happen as the private tr function should only be called from inside the enum and the enum with associated values should always have the exact right number of arguments as they were generated by parsing the keys and values in Localizable.strings. Except if my string parsing misinterpreted that `

I have following ling in localized strings
"MY_PERCENT_STRING" = "5% from total amount";
When I use it in usual code I use NSLocalizedString("MY_PERCENT_STRING", comment: "")
I don't use it in any printf like function, so I should escape it

tr(.MY_PERCENT_STRING) crashes as it uses format function inside

Woops sorry I closed this by mistake while posting my last comment.
Ok I see the case now.
We should definitely improve the parsing of the string to detect if the % is indeed used as a formatter prefix or not. But even in your specific case, Your string is actually a totally valid formatting placeholder.
% f is actually totally valid per the printf-style formats, and means that it should expect a floating-point value as parameter (%f) but using a space as a padding character. And indeed you can try it:
$ swift
Welcome to Apple Swift version 2.1 (7<IP_ADDRESS> 700.1.76). Type :help for assistance.
  1> import Foundation
  2> String(format: "5% from total amount", 4.2)
$R0: String = "5 4.200000rom total amount"

So with your string there is no way for SwiftGen to know if that "5% from" is expected to be a string literal or a string with a format placeholder % f which expects a float as argument, so it will generate an enum with an associated Float value.

Note that your fix might be able to prevent that crash if there is no argument given but I'd rather say that:

This is strange that the case MY_PERCENT_STRING entry in the enum wasn't generated with an associated value of type Float as it should have parsed the % f in your string as a float parameter, so that's probably a bug in the parser
Your fix won't work if there are actual parameters, like "5% from total amount of %f euros" where you'll need to pass the total amount as parameters anyway…

So not sure how we could resolve this in a consistent manner other than expecting you to escape that % character. But anyhow, there still seems to be an issue in the function parsing the % arguments in the strings (I knew it wasn't perfect!) as it should have then detected it as a string expecting a Float and add that associated value — and I'm not even sure the parser currently takes any escaped %% into account, I'd have to check that too.
(I know that's not what you want to hear, as it means that the issue is not actually the crash itself, but the fact that it should have generated an associated value to that enum and that the fix would require you to use 5%% from … anyway as there won't be any way for SwiftGen to know that this % f is not a formatting argument otherwise)

Sorry "5% f" - is example string, and % f is just luck
Really it was like this "2.9% + 30"

Ok doesn't change the fact that the code parsing the string specifiers here needs improving indeed.
Would welcome any suggestion about how to improve that parsing while still handling the vastness of all the formatting possibilities, even stuff like % 2.4f and % f but detecting that % + is not valid anyway.

Note that even if you don't feel like fixing the parsing yourself / implementing the fix, I'd welcome any Unit Tests to cover as much use cases as possible (including cases like 2.9% + 30, 5% from total, 2.9% 3f and 5%% of %.3f.) so whoever implements the fix can ensure it both fix your case but doesn't break already working use cases.

tr should not pass such strings to String(format:, args:) function
% must be escaped just in case if string is used inside format, like: "%%5 among %d", but if it is used as is, as plain text escaping is not required. For fixing my case I added check to tr(key: String, _ args: CVarArgType...) as described before. I don't think isEmpty check break anything

Ah good point. So indeed your test might be a good security to avoid invoking formatting there — sorry for the misunderstanding :wink:

I am not sure this fix can be applied, as somebody could already workaround this issue by escaping %
As a solution I see this: we apply this fix, and we display warning if user uses %% inside string, that does not have any argument
e.g.
"%%5 in %d" - correct string
"%5 in 100" - correct string
"%%5 in 100" - warning

I'm not sure I agree with (1) as someone could willingly want the %% as a string literal for whatever reason, it's not up to SwiftGen to impose that %% is not a valid literal either.
But your solution of detecting if args is empty then don't use String(format:) should work, shouldn't it? Why do you say that "you're not sure your fix can be applied"?

Any news on this feature? You seem to be the only one having this issue, which I'm not sure is really fixable other than using %% in your strings, so I'm considering closing this issue?

Closing both because lack of response and also because I'm still not convinced there is an easy solution to your specific use case.
If your Localizable.strings contains "MY_PERCENT_STRING" = "5% from total amount"; then SwiftGen will generate case MY_PERCENT_STRING(Float) (misreading % f here for a placeholder), not case MY_PERCENT_STRING. So I can't see how it might be crashing?
I'd understand that it doesn't generate the case you expect, as you would want that case not to have associated value because you consider that % f not to be a format placeholder, but that wouldn't cause a crash, and anyway there is no way for SwiftGen to know when you use a totally valid printf-like placeholder like % f in your string that you don't mean it to be a placeholder… so you'd have to escape it in your Localizable.strings file.


When and how often to put in

Ratio(8%, 16%, 20%, 30%) on highest price of last 6 months keeps me out of the game...
Need another strategy to get me in...

lowest_price_52w+(highest_price_52w-lowest_price_52w)*ratio suggests me get in immediately
Too aggressive...
Need another better strategy to get me in...


Use blueprint to keep chase camera above ground before takeoff

Easier to avoid this by placing the camera downhill from the vehicle.


chore(dependencies): Update actions/cache action to v4

This PR contains the following updates:

Package
Type
Update
Change

actions/cache
action
major
v3.3.3 -> v4.0.0

Release Notes

actions/cache
v4.0.0
Compare Source
What's Changed

Update action to node20 by @takost in https://github.com/actions/cache/pull/1284
feat: save-always flag by @to-s in https://github.com/actions/cache/pull/1242

New Contributors

@takost made their first contribution in https://github.com/actions/cache/pull/1284
@to-s made their first contribution in https://github.com/actions/cache/pull/1242

Full Changelog: https://github.com/actions/cache/compare/v3...v4.0.0

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

:tada: This PR is included in version 1.1.12 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Change objects API to allow specifying options

Options will allow stating how particular errors should be treated, e.g. which additional errors should be allowed (ignored), which should be retried.
This change is almost transparent to the existing code, e.g. the old code like
framework.CreateObject(item.GetNamespace(), item.GetName(), &item)

will be still valid and will behave as it used to, but it will be also possible to do something like
framework.CreateObject(item.GetNamespace(), item.GetName(), &item, client.Allow(apierrs.IsUnauthorized), client.Retry(apierrs.IsNotFound))

which in addition will allow IsUnauthorized errors and will retry IsNotFound.
This PR is to address https://github.com/kubernetes/perf-tests/pull/466#discussion_r268795519

/assign @wojtek-t

I like it - thanks!
/lgtm
/approve


Exception::__clone() and Error::__clone() are not final in PHP 8.1

See https://3v4l.org/M1KSI

@kukulich Thank you for the PR! Could you please remove these methods from tests/TestData/mutedProblems.json as well?

@isfedorov Done.


add license title, remove extra newline

I'll assume this will go the same way as souporserious/react-tether#36, souporserious/react-motion-ui-pack#53 and souporserious/react-view-pager#25.


Added 2018-05-01 API version; Fixes

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[x] The title of the PR is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[x] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[x] If applicable, the PR references the bug/issue that it fixes.
[x] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[x] I have read the contribution guidelines.
[x] My spec meets the review criteria:

[x] The spec conforms to the Swagger 2.0 specification.
[x] The spec follows the guidelines described in the Swagger checklist document.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

Automation for azure-libraries-for-java

Automation for azure-sdk-for-node

Automation for azure-sdk-for-python

Automation for azure-sdk-for-go

@EvgenyAgafonchikov can I get some context on this PR please?  I.e. what are the new/affected APIs etc.

Make sure if these changes https://github.com/Azure/azure-rest-api-specs/pull/2975/files are also applied to this API version.

@EvgenyAgafonchikov ping

Closing, please follow up on my email @EvgenyAgafonchikov


Should support querying applications by UUID

The balena API has support for querying applications by UUID:
https://github.com/balena-io/open-balena-api/pull/491/files
The SDK should support this too. As for the model interface / function signatures, given that UUIDs and app names are both strings that cannot be readily unambiguously distinguished, the SDK should provide a way for the caller to explicitly specify whether the identifier is a UUID or application, for example:
application.get({ uuid: 'decade2' }, opts)

Some additional discussion took place in a private thread. Extract:

Any application name with exactly 32 or 62 characters in the set [a-fA-F0-9] would be indistinguishable from an application UUID (while not necessarily being a UUID, or at least not a UUID in balena's database, perhaps a UUID in the user's own database), and thus subject to a query error. It's a rare corner case, but we are better off avoiding them. It would be an unnecessary restriction to tell users that they shouldn't name applications with 32 or 62 characters from a particular character set. I like application.get({ uuid: '123456' }, opts) better than trial-and-error heuristic probabilistic auto detection. :-)

There is also the case of short UUIDs. For device UUIDs, I gather that the SDK currently issues a filtered query with $startswith: uuidOrId:
https://github.com/balena-io/balena-sdk/blob/v15.17.0/lib/models/device.ts#L514
For devices, the SDK only needs to do this when the UUID is not a number (JS data type), so at least it knows that the short UUID is actually a UUID. With applications, 7-char UUIDs would more easily be confused with names. For example, the word "decade2" is both a valid app name and valid short UUID. I am OK with the occasional conflict and error if the user chooses to use an ambiguous command line option/syntax like --application decade2 (in fact in this thread I have voiced my preference to keep allowing this kind of auto detection for backwards compatibility even in future major versions of the CLI, when others suggested that the next major version of the CLI should disallow auto detection / ambiguous identifier specification). But I also think that the SDK and the CLI should provide a way of unambiguously specifying whether the identifier is a name, UUID or database ID. So while the SDK could provide the feature of best effort filtering by long UUID, short UUID, app name, slug and database ID, I think there should also be a way of querying only by a specific identifier type like UUID. Like application.get({ uuid: 'decade2' }, opts).

See: https://www.flowdock.com/app/rulemotion/i-cli/threads/g26bVg0Nc518ZZknqxtX0GmWhwb

The open-balena-api has support for querying the application's uuid.
At the cloud API doesn't expose the application uuid in the v6 model.

That's now on v6
See: https://github.com/balena-io/balena-api/pull/2981

Splitted the alternate key object notation to:
See: https://github.com/balena-io/balena-sdk/issues/1176


How to move a deployment to different zones

Hi guys
We're facing a bigger migration and need to move our existing deployments to a new set of zones.
We have two options: a.) deploying new deployments to the new zones and manually importing the data or b.) connecting all zones to the existing BOSH director and move the deployments to the new zones.

Preconditions:

BOSH director (in zone z1) has cloud config with all configured zones
Network connectivity between all zones is given, i.e. instances in z1 can communicate with z4
Deployments with state (i.e. our data services or consul) do not need to keep their persistent disks since the deployed software (i.e. Consul, ETCD, MariaDB) syncs the state automatically to all instances, as long as a majority of instances is running

How we would do the migration with BOSH:
1.) initial state
bosh instances
Acting as client 'admin' on deployment 'dummy' on 'master-bosh'

Director task 13153

Task 13153 done

+-------------------------------------------------+---------+----+-----------+----------------+
| Instance                                        | State   | AZ | VM Type   | IPs            |
+-------------------------------------------------+---------+----+-----------+----------------+
| dummy/0 (29e57ee3-d6e7-4508-87ba-f5bb2a4573cf)* | running | z1 | apc_dummy | <IP_ADDRESS> |
| dummy/1 (ef8b74e4-d2f2-431d-80ac-a3bca18830fc)  | running | z2 | apc_dummy | <IP_ADDRESS> |
| dummy/2 (bb6d5526-7ea7-41da-abf0-88942e220498)  | running | z3 | apc_dummy | <IP_ADDRESS> |
+-------------------------------------------------+---------+----+-----------+----------------+

(*) Bootstrap node

Instances total: 3

2.) change zones, redeploy
$ bosh deploy
Generating deployment manifest
Acting as client 'admin' on deployment 'dummy' on 'master-bosh'
Getting deployment properties from director...

Detecting deployment changes
----------------------------
instance_groups:
- name: dummy
  azs:
  - z1 -> removed
  - z2 -> removed
  - z3 -> removed
  - z4 -> new
  - z5 -> new
  - z6 -> new
Please review all changes carefully

Deploying
---------
Are you sure you want to deploy? (type 'yes' to continue): yes

Director task 13154
  Started preparing deployment > Preparing deployment. Done (00:00:06)

  Started preparing package compilation > Finding packages to compile. Done (00:00:00)

  Started creating missing vms
  Started creating missing vms > dummy/6e8d491d-f286-467d-aae9-0038dd46c56d (3)
  Started creating missing vms > dummy/ae083f74-2bd1-4055-aaf2-61cfdc47a53c (4)
  Started creating missing vms > dummy/90d101eb-e415-48b5-98a5-a1a2892e7867 (5). Done (00:01:33)
     Done creating missing vms > dummy/6e8d491d-f286-467d-aae9-0038dd46c56d (3) (00:01:38)
     Done creating missing vms > dummy/ae083f74-2bd1-4055-aaf2-61cfdc47a53c (4) (00:01:44)
     Done creating missing vms (00:01:44)

  Started deleting unneeded instances dummy
  Started deleting unneeded instances dummy > dummy/29e57ee3-d6e7-4508-87ba-f5bb2a4573cf (0). Done (00:00:23)
  Started deleting unneeded instances dummy > dummy/ef8b74e4-d2f2-431d-80ac-a3bca18830fc (1). Done (00:00:24)
  Started deleting unneeded instances dummy > dummy/bb6d5526-7ea7-41da-abf0-88942e220498 (2). Done (00:00:23)
     Done deleting unneeded instances dummy (00:01:10)

  Started updating instance dummy
  Started updating instance dummy > dummy/6e8d491d-f286-467d-aae9-0038dd46c56d (3) (canary). Done (00:01:29)
  Started updating instance dummy > dummy/ae083f74-2bd1-4055-aaf2-61cfdc47a53c (4). Done (00:01:08)
  Started updating instance dummy > dummy/90d101eb-e415-48b5-98a5-a1a2892e7867 (5). Done (00:01:21)
     Done updating instance dummy (00:03:58)

Task 13154 done

Started         2017-08-10 06:22:41 UTC
Finished        2017-08-10 06:29:40 UTC
Duration        00:06:59

Afterwards:
+-------------------------------------------------+---------+----+-----------+----------------+
| Instance                                        | State   | AZ | VM Type   | IPs            |
+-------------------------------------------------+---------+----+-----------+----------------+
| dummy/3 (6e8d491d-f286-467d-aae9-0038dd46c56d)* | running | z4 | apc_dummy | <IP_ADDRESS> |
| dummy/4 (ae083f74-2bd1-4055-aaf2-61cfdc47a53c)  | running | z5 | apc_dummy | <IP_ADDRESS> |
| dummy/5 (90d101eb-e415-48b5-98a5-a1a2892e7867)  | running | z6 | apc_dummy | <IP_ADDRESS> |
+-------------------------------------------------+---------+----+-----------+----------------+

BOSH already handles the case when zones of instances change.
However, it completely gets rid of all old instances first (causing a time slot without any instances up - for our data services, this would mean the data is literally gone). Only afterwards it starts to update the new instances.
Would it be a big thing to change this behavior so that the new instances are updated before deprovisioning of the old ones?
As far as I understand the BOSH concepts, max_in_flight and canaries could probably applied here as well? If BOSH ensures that number of instances - max_in_flight of instances are running at all time, our data services could be migrated well.
We're happy to help implementing if it's a realistic task.
By the way, deployments with persistent disks behave the same - they're just deleted and rebuilt in the other zone, discarding the old persistent disk (surprisingly). Static IPs which tie an instance to a zone are not a concern for us since we won't use them.

We're aware that - with the current implementation - we're able to do our migration by moving one zone at a time. However, it would be easier to do this in one task (since we have to do it for 30 deployments...)

@MatthiasWinzeler

Network connectivity between all zones is given, i.e. instances in z1 can communicate with z4

is the network subnet spanning two azs or just one. if so that means that ip will be changing. im not entirely sure if you gonna have any problems with some of the software that doesnt like ip changes.

We're facing a bigger migration and need to move our existing deployments to a new set of zones.

what's the timeline? how urgent?

@cppforlife Each zone has its own, dedicated network subnet. IPs will change, but we're cautiously optimistic that most software we use does not rely on it. From the main CF ecosystem (i.e. CF, Diego, etcd, consul, cf-mysql et al) the only one I know of that breaks if IPs change is rabbitmq.
Timeline: We'll start migrating end of this year.

Closing due to inactivity.  Therefore it is often a case by case basis on what the best course of action is for a deployment. Please feel free to reopen if you have further questions.


Rewrite State transitions and storage

Revise with details about the storage abstractions, key-value tries, and proofs.
Move optimization/best practices to a topic under Design.
Resource:
https://github.com/paritytech/polkadot-blockchain-academy/tree/main/syllabus/4-Substrate/4.5-Db_and_Merklized_Storage

Duplicate


Fix one use of JavascriptExceptionObject::GetThrownObject in the async spawn function which I missed during an earlier round of cleanup

This is fault-injection case which causes us to call a rejection handler
with nullptr instead of Javascript undefined value.

@dotnet-bot test EOL Check please

Looks good to me


Webosckets Promise Exception

Hello, my websocket is nicely running and i can broadcast events from Laravel through it and listen to it from front vueJS.
But since few days i'm facing some issue popping into my websocket cli, everything is working fine but i have this popping
Unhandled promise rejection with TypeError: React\Http\Io\ClientRequestStream::closeError(): Argument #1 ($error) must be of type Exception, Error given, called in /var/www/html/vendor/react/promise/src/Internal/RejectedPromise.php on line 73 in /var/www/html/vendor/react/http/src/Io/ClientRequestStream.php:238
Unhandled promise rejection with RuntimeException: Request timed out after 60 seconds in /var/www/html/vendor/react/http/src/Io/Transaction.php:129

Hi everyone The problem is phpreact has a breaking change in their repos so "Unhandled promise rejection with TypeError" is not the exactly errors but yes there is a stackstrace. This won't be fixed soon after I track this issue.

This work for me: composer require react/promise:^2.3
For details, check my comment in this issue: https://github.com/beyondcode/laravel-websockets/issues/1142#issuecomment-1662450503

look this
https://github.com/beyondcode/laravel-websockets/issues/1158
you need install fix this error

composer require react/promise:^2.3

please close this,

@mpociot any ideas on this issue? using a lower version for react/promise works as a workaround but I assume that is not a permanent solution?
Or it should be added to the packages json file?

Check the BROADCAST_DRIVER=pusher in .env file, on "react/promise": "3.0" it's work fine. no need to make your version lower

composer require react/promise:^2.3
worked for me xD

Hi all, I'm new to Websockets, I just did a fresh installation of the Laravel Websockets with:
composer require beyondcode/laravel-websockets
After configuring everything and setting the path to access the dashboard, I started getting this weird error. I tried updating the react/promise as mentioned above:
composer require react/promise:^2.3
However, this is the output of the terminal:
PS C:\xampp\htdocs\websockets-test> composer require react/promise:^2.3
The "2.3" constraint for "react/promise" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Running composer update react/promise
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires react/promise 2.3 (exact version match: 2.3, 2.3.0 or <IP_ADDRESS>), found react/promise[v2.3.0] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - react/dns v1.12.0 requires react/promise ^3.0 || ^2.7 || ^1.2.1 -> found react/promise[v1.2.1, v1.3.0, v2.7.0, ..., v2.11.0, v3.0.0, v3.1.0] but it conflicts with your root composer.json require (2.3).
    - beyondcode/laravel-websockets 1.14.1 requires react/dns ^1.1 -> satisfiable by react/dns[v1.12.0].
    - beyondcode/laravel-websockets is locked to version 1.14.1 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Also tried with -W but got the same result, any idea how could I fix it ?
Thanks in advance,
Nico.

Hi all, I'm new to Websockets, I just did a fresh installation of the Laravel Websockets (1.14.1) with: composer require beyondcode/laravel-websockets
After configuring everything and setting the path to access the dashboard, I started getting this weird error. I tried updating the react/promise as mentioned above: composer require react/promise:^2.3
However, this is the output of the terminal:
PS C:\xampp\htdocs\websockets-test> composer require react/promise:^2.3
The "2.3" constraint for "react/promise" appears too strict and will likely not match what you want. See https://getcomposer.org/constraints
./composer.json has been updated
Running composer update react/promise
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires react/promise 2.3 (exact version match: 2.3, 2.3.0 or <IP_ADDRESS>), found react/promise[v2.3.0] but these were not loaded, likely because it conflicts with another require.
  Problem 2
    - react/dns v1.12.0 requires react/promise ^3.0 || ^2.7 || ^1.2.1 -> found react/promise[v1.2.1, v1.3.0, v2.7.0, ..., v2.11.0, v3.0.0, v3.1.0] but it conflicts with your root composer.json require (2.3).
    - beyondcode/laravel-websockets 1.14.1 requires react/dns ^1.1 -> satisfiable by react/dns[v1.12.0].
    - beyondcode/laravel-websockets is locked to version 1.14.1 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Also tried with -W but got the same result, any idea how could I fix it ? Thanks in advance, Nico.

Do this installation
composer require react/promise:^2.3
composer update
Then
npm install
npm run dev
The run dev is too important.

that didn't work with me

same ...


build: explicitly link tests to swiftCore swiftOnoneSupport

Add explicit links against the swift runtime for the tests which may
use the swift runtime.  This prevents link failures for the swift tests.

CC @das @MadCoder @dgrove-oss

@swift-ci please test

On Oct 1, 2017, at 11:50 AM, Saleem Abdulrasool<EMAIL_ADDRESS>wrote:
@compnerd commented on this pull request.
In CMakeLists.txt https://github.com/apple/swift-corelibs-libdispatch/pull/307#discussion_r142037457:

@@ -33,7 +33,32 @@ dispatch_common_warnings()
option(ENABLE_DISPATCH_INIT_CONSTRUCTOR "enable libdispatch_init as a constructor" ON)
set(USE_LIBDISPATCH_INIT_CONSTRUCTOR ${ENABLE_DISPATCH_INIT_CONSTRUCTOR})

-# TODO(compnerd) swift options
+option(ENABLE_SWIFT "enable libdispatch swift overlay" OFF)
+if(ENABLE_SWIFFT)
Nice catch.

Just doing my job ; )

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/apple/swift-corelibs-libdispatch/pull/307#discussion_r142037457, or mute the thread https://github.com/notifications/unsubscribe-auth/AAee3zvYmK-U7GL5Ybtzo6OYl3eYOXmPks5sn97xgaJpZM4PjDZD.

Can we get this merged?  This is holding up a sizable change at apple/swift#12098 and also improves the swift build of libdispatch as well as fixes the installation.

sorry I had forgotten about it. the new changes look fine, let's just test once more it still builds

@swift-ci please test

@MadCoder could you merge this please?  I don't have merge rights on libdispatch.

I merged.


Magic mouse scroll

Any way to access the magic mouse scroll wheel?

Never mind, I didn't see it in the docs, but found it in the code

Should the doc be updated instead of closing the ticket?


[CI/Build] Update vision tests

This PR moves the LLaVA-specific test code into the model test file. It also cleans up some of the code in preparation for #4199.

Answered


Send raw data through the stream

Add the ability to send row data directly thought the stream (without any formatting). It can be useful when using the stream outside of a web browser or to set our own structure for the data.

+1 to this. I need the ability to stream raw response.


support AtomsBase v0.4

thank you. Doesn't this need updates to AtomsCalculatorsUtilities first though?

The tests need to new version to run properly. It does pass on my computer with correct versions though

Well, they will pass here as well because they will just install the old ACU which restricts AB to < 0.4

Yes I am doing that atm. ACU will be tagged new release once the CI passes. Then I will come to this.
There is also a bug with Lennard-Jones potential, so I try to get in a fix for that too.

great, thank you.

AtomsBuilder needs an update too, to get the tests run on ABv04


Extra fields not updated

When updating extra fields in Eeschema (like DNP, MfrNo etc.), then updating the PCB from schematic in PCBnew, and then regenerating the HTML BOM, the previously updated fields are not showing the correct value. I.e. when you mark a component as DNP later on, it won't be marked as DNP in the BOM.
I'm not sure if this is a problem with InteractiveHtmlBom or KiCad itself, but I didn't notice such problems outside of InteractiveHtmlBom before.

It's not enough to simply update fields in schematic, you need to regenerate netlist file or xml file. Ibom doesn't read schematic directly.

Okay, using the netlist does the trick. But it doesn't work with "Update PCB from schematic", it seems to be a KiCad problem then?

No. Since v5 kicad doesn't use netlist as intermediate file when you do direct update from pcbnew so the netlist file doesn't get updated. Manual eeschema -> netlist -> pcbnew workflow is still supported but not for long.
You just need to remember that data sources for ibom are .kicad_pcb and .net/.xml files. If you want field data from eeschema you need to manually regenerate .net/xml.
If eeschema api makes it into v6 I'll make this more seamless but for now that's how it is.

Ah alright, so that was a misunderstanding from my side. Thanks for clearing that up!


When building for Android getting error : "Execution failed for task ':app:processLocalDebugGoogleServices'"

Describe the bug
When building for Android, I'm getting the error "Execution failed for task ':app:processLocalDebugGoogleServices'" and the app will not install on a device.
To Reproduce
Build the app for Android using
just all-android
on the command line.
Steps to reproduce the behavior:
Expected behavior
The app should install on an Android device
Screenshots
Smartphone (please complete the following information):
Sunmi V2s and a emulator running Android api 33
** Logs
Android app will connect to <IP_ADDRESS> for 10101 services
Using hardware rendering with device sdk gphone64 x86 64. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
FAILURE: Build failed with an exception.
Execution failed for task ':app:processLocalDebugGoogleServices'.

No matching client found for package name 'finance.get10101.app.local'

Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Get more help at https://help.gradle.org

Additional context
This is happening on MacOs

Please provide additional info - was this a mistake?

Circling back to this since its been updated with details - could you try this again and see if it's reproducible? Android support has come a way since the ticket was opened.

Now I am getting this on linux :sweat_smile:

Think I found a fix, will open a PR


media metadata: alt text support

Twitter has added a media metadata API endpoint. Currently it supports adding alt text to an image: https://blog.twitter.com/2016/alt-text-support-for-twitter-cards-and-the-rest-api
Other parts of the API are also being extended with a include_ext_alt_text parameter.
The above link notes that "Full documentation for this endpoint will soon be published and linked directly once available".

it lives and it would be very useful for making my bots more accessible

Hello to anyone who, like me, has searched the tweepy documentation for "alt_text", got zero results, then arrived here from a Google search. Maybe, particularly if like me you have little idea what you're doing with python, you'll be interested in this code I just wrote which tweets multiple images with the same alt_text using a modified version of what @fitnr wrote to add alt_text support to tweepy two years ago.
#!/usr/bin/python

import tweepy
import sys
import os

consumer_key='whatever'
consumer_secret='whatever'
access_token='whatever'
access_token_secret='whatever'

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

# adapted from https://github.com/fitnr/tweepy/commit/b387331c174a451cb8dba44b4e0c7988a92bad1b
def media_metadata_create(self, media_id, alt_text):
  post_data = {
   "media_id": media_id,
   "alt_text": {
     "text": alt_text
    }
  }
  json = tweepy.utils.import_simplejson()
  return tweepy.binder.bind_api(
    api=self,
    path='/media/metadata/create.json',
    method='POST',
    allowed_param=[],
    require_auth=True,
    upload_api=True
  )(post_data=json.dumps(post_data))

media_ids=[]

# arvg[2] is a directory containing images to tweet
for filename in sorted(os.listdir(sys.argv[2])):
  media_ids.append(api.media_upload(filename).media_id_string)

# argv[3] is alt text
for m in media_ids:
  media_metadata_create(api, m, sys.argv[3])

# arg[1] is the status text
api.update_status(status=sys.argv[1],media_ids=media_ids)


win32: if_perl: Generate if_perl.c into the auto directory

As I mentioned at https://github.com/vim/vim/issues/3526#issuecomment-428974612,
win32 makefiles generate if_perl.c into the src/ directory, however unix
makefile generates into the src/auto/ directory.
Make win32 makefiles as same as the unix makefile.

Codecov Report

Merging #3540 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3540      +/-   ##
==========================================
+ Coverage   77.19%    77.2%   +<.01%
==========================================
  Files          99       99
  Lines      139042   139043       +1
==========================================
+ Hits       107338   107344       +6
+ Misses      31704    31699       -5

Impacted Files
Coverage Δ

src/gui.c
57.39% <0%> (-0.16%)
:arrow_down:

src/ex_cmds2.c
84.43% <0%> (-0.1%)
:arrow_down:

src/channel.c
83.06% <0%> (-0.08%)
:arrow_down:

src/if_py_both.h
76.31% <0%> (ø)
:arrow_up:

src/gui_gtk_x11.c
48.45% <0%> (+0.04%)
:arrow_up:

src/if_xcmdsrv.c
84.53% <0%> (+0.17%)
:arrow_up:

src/libvterm/src/state.c
49.95% <0%> (+0.97%)
:arrow_up:

Continue to review full report at Codecov.

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


migrations: Add unique db constraint for firmware

enforce component_firmware_version table to have unique values on columns
vendor, model and version.
Also renamed migration 00010_server_components_idx.sql to use consistent numbering scheme.

Codecov Report

Merging #131 (5942b0b) into main (2d845d2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #131   +/-   ##
=======================================
  Coverage   74.00%   74.00%
=======================================
  Files          32       32
  Lines        2577     2577
=======================================
  Hits         1907     1907
  Misses        494      494
  Partials      176      176

Flag
Coverage Δ

unittests
74.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Can we add a test that ensures this is working and to make sure we see a failure if it is removed.

Thanks for the review @nicolerenee, I added a test case in 8f0b0de. Let me know what you think.


Define a quality gateway for unit tests

Create a Quality Gate for a unit-test coverage for the module according to #1113
Acceptance Criteria

[x] Create a project config file for refined modules
[x] Create a script parsing and running test suite according to the testing config
[x] Create a GH Action to ensure that the unit-test coverage does not decrease
[ ] Implement a ratcheting mechanism for package coverage


youtube-dl not updating to latest 2019.04.24

youtube-dl not updating to latest 2019.04.24

ref: https://github.com/lukesampson/scoop/pull/3060
Please wait for a few days for scoop-core migration. If you like to try develop version of scoop, ref: https://github.com/lukesampson/scoop/pull/3367#issuecomment-486597453

Closed by https://github.com/scoopinstaller/scoop-main/commit/d5ff199ea999fdf2f9378919c1775e13052e9c1e


Track_grad_norm only tracks the parameters of the last optimizer defined

🐛 Bug
When you enable track_grad_norm in Trainer you expect it to track the grad of all the parameters defined in your lightning module. It seems like it only tracks the parameters for the last optimizer defined in def configure_optimizers().
To Reproduce
Steps to reproduce the behavior:

Create a pytorch lightning module with more than one optimizer
Enable logging to tensorboard and track_grad_norm in the trainer
Train model and observe only gradients for the last optimzer is tracked
Delete all tensorboard data and restart tensorboard
Train a model with the optimizers returned in the different order. Observe which gradients are tracked again

Code sample
import pytorch_lightning as pl
from torch.utils.data import TensorDataset, DataLoader
from pytorch_lightning.loggers.tensorboard import TensorBoardLogger
from torch.optim import SGD
import torch.nn as nn
import torch

class MWENet(pl.LightningModule):
    def __init__(self):
        super(MWENet, self).__init__()

        self.first = nn.Conv2d(1, 1, 3)
        self.second = nn.Conv2d(1, 1, 3)
        self.loss = nn.L1Loss()

    def train_dataloader(self):
        xs, ys = torch.zeros(16, 1, 10, 10), torch.ones(16 ,1, 6, 6)
        ds = TensorDataset(xs, ys)
        return DataLoader(ds)

    def forward(self, xs):
        out = self.first(xs)
        out = self.second(out)
        return out

    def configure_optimizers(self):
        first = SGD(self.first.parameters(), lr=0.01)
        second = SGD(self.second.parameters(), lr=0.01)
        return [second, first]

    def training_step(self, batch, batch_idx, optimizer_idx):
        xs, ys = batch
        out = self.forward(xs)
        return {'loss': self.loss(out, ys)}

net = MWENet()
logger = TensorBoardLogger('somedir', name='testing')
trainer = pl.Trainer(track_grad_norm=2,
                     logger = logger)
trainer.fit(net)

Expected behavior
I expect that a pytorch module will report the gradient of all parameters when track_grad_norm is enabled.
Environment
cuda:
	GPU:
		GeForce RTX 2080 Ti
	available:           True
	version:             10.1
packages:
	numpy:               1.18.1
	pyTorch_debug:       False
	pyTorch_version:     1.4.0
	pytorch-lightning:   0.7.3
	tensorboard:         2.2.1
	tqdm:                4.45.0
system:
	OS:                  Windows
	architecture:
		64bit
		WindowsPE
	processor:           Intel64 Family 6 Model 158 Stepping 12, GenuineIntel
	python:              3.7.7
	version:             10.0.18362

Any progress on this issue? I face this too.

Still facing the issue when training a GAN with PL 1.0.7, either the generator or discriminator has all tracked gradients to zero in TensorBoard

A workaround is to implement on_after_backward to have access to the gradients and log them in your logger
https://pytorch-lightning.readthedocs.io/en/stable/lightning_module.html#on-after-backward

I think I found the problem. I implemented on_after_backward following the example in https://pytorch-lightning.readthedocs.io/en/stable/lightning_module.html#on-after-backward.
def on_after_backward(self):
    # example to inspect gradient information in tensorboard
    if self.trainer.global_step % 25 == 0:  # don't make the tf file huge
        params = self.state_dict()
        for k, v in params.items():
            grads = v
            name = k
            self.logger.experiment.add_histogram(tag=name, values=grads,
                                                 global_step=self.trainer.global_step)

First of all I think that example is wrong because v is not the gradient but the weight of the layer. A better example is
    def on_after_backward(self):
        # example to inspect gradient information in tensorboard
        if self.trainer.global_step % 25 == 0:  # don't make the tf file huge
        for k, v in zip(self.state_dict().keys(), self.parameters()):
            name = k
            # During the first step, when using multiple optimizers, gradients of parameters associated to an optimizer are equal
            # None as long as the optimizer.step() as not been called
            if v.grad is None:
                grads = 0
            else:
                grads = v.grad
            self.logger.experiment.add_scalar("grad_norm_2_" + name, torch.linalg.norm(grads),
                                                                  global_step=self.trainer.global_step)

But this example won't even work because on_after_backward is called for each optimizer. During one call, I have noticed that gradients of other optimizers are equal to zero. The last call correspond to the last optimizer returned by configure_optimizers. During this call all gradients of other optimizers are equal to zero
With this observation; I looked up Pytorch Lightning source code of https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/trainer/training_loop.py
In the function run_training_batch there is a loop over all the optimizers with the instruction
grad_norm_dic = self.run_batch_backward_pass(split_batch, batch_idx, opt_idx, optimizer)
so grad_norm_dic is overwrited at each iteration of the loop meaning that the returned grad_norm_dic is the one calculated for the last optimizer
The source code of run_batch_backward_pass is
def run_batch_backward_pass(self, split_batch, batch_idx, opt_idx, optimizer):
        # ------------------
        # GRAD NORMS
        # ------------------
        # track gradient norms when requested
        grad_norm_dic = {}
        if batch_idx % self.row_log_interval == 0:
            if float(self.track_grad_norm) > 0:
                model = self.get_model()
                grad_norm_dic = model.grad_norm(
                    self.track_grad_norm)

        # ------------------
        # CLIP GRADS
        # ------------------
        if self.amp_backend == AMPType.NATIVE and not self.use_tpu:
            self.scaler.unscale_(optimizer)
        self.clip_gradients(optimizer)

        # ------------------
        # .STEP + ZERO_GRAD
        # ------------------
        self.call_optimizer_step(optimizer, opt_idx, batch_idx, split_batch)

        return grad_norm_dic

We can see that grad_norm_dic is computed over all the parameters of the model not only the ones associated to the optimizer. That why I think that all the gradients are equal to zero except the ones associated to the optimizer.
run_batch_backward_pass(self, split_batch, batch_idx, opt_idx, optimizer) should only compute the gradients of the optimizer and its output should be inserted in a global dictionary instead of overwriting the existing one.

run_batch_backward_pass(self, split_batch, batch_idx, opt_idx, optimizer) should only compute the gradients of the optimizer and its output should be inserted in a global dictionary instead of overwriting the existing one.

This is mentioned as a todo
Where do you find run_batch_backward_pass? I can't find any reference to it.

Sorry I was looking at an old version xD
Now the tracked norm is calculated with
grad_norm_dic = self._cur_grad_norm_dict
in the optimizers loop so the overwriting still occurs

@ MikkelAntonsen any progress on this?

@edenlightning I've tried to implement a fix+some extra functionality. I'm awaiting feedback from @tchaton on what needs to be improved/fixed/done differently.

Hey @MikkelAntonsen,
I added some comments on your PR. Do you need me to help you ?
Best regards,
T.C

Yeah, I've tried to fix what you've mentioned. If you see anything that could be better, I'd be all ears. There are a lot of failing tests in places I haven't touched (on purpose at least), is that normal?

Hey, I'm interested in trying to tie this branch up and I believe it shouldn't be too much work with some guidance, @tchaton!:)

Hey, I'm interested in trying to tie this branch up and I believe it shouldn't be too much work with some guidance, @tchaton!:)


Add DOCX view support

Is your feature request related to a problem? Please describe.
Yes, cannot see docx preview.
Describe the solution you'd like
Transform DOCX into PDF in order to render the view. (Do not modify the original file).
Describe alternatives you've considered
Add a DOCX editor (more difficult).
Additional context
ñ

bc6a995


No Examples

Hi, I'm trying to get this working on a Arduino NANO IOT 33. Are there any examples that I could use to help me test the library and see whether it will work on my device?

In what configuration do you want to use this, as a replacement for the Leonardo ? Regardless of software support, the nano seems to have a single USB controller and no way to add one, so it's dead in the water IMO

I've added a mini USB host (

) and have it working using the same library as used for the bigger version. I'll be submitting the support for the IOT nano in a PR to that library soon.

Very cool indeed :)


Remove rlp controller

Removes the control plane RLP reconciliation.

Reverts https://github.com/Kuadrant/multicluster-gateway-controller/pull/163
Remove milestone 2 docs, steps no longer work on main, refer to milestone 2 tag if required.

Verified via ocm walkthrough locally
/lgtm
/approve


Recommended approach to monitor agent on Linux?

Hi - Are there any recommendations on the best approach to monitor the open-appsec Nano Agent on Linux? Noticed once that the server had started by the agent had failed to start.
Can check -
open-appsec-ctl --status
But is there any other ways without having to call this all the time? Is there an API to wall the SaaS platform to check?
Thanks

Hi,
Currently, we do not have an API exposed, we recommend verifying the installation has succeeded in and upgrade.


Using a class_name reference doesn't work when preload() on the class that tries to use the class_name

Godot version
3.4.stable
System information
Windows 11, GLES3
Issue description
When you try to acess some constant of static function on a script/class that preloads the script, it don't work:
Parser Error: The class "FactoryState" was found in global scope, but its script couldn't be loaded.
Steps to reproduce

Create a Script with class_name, like: class_name ClassTest
Create another Script that uses the reference of the class_name created before and tries to acess some constant or static function, like:

func _ready():
	print(ClassTest.CONSTANT)

Try to preload the new Script, like: var test_preload_script = preload("res://test.gd")
See the error: Parser Error: The class "FactoryState" was found in global scope, but its script couldn't be loaded.

Minimal reproduction project uploaded
Minimal reproduction project
tests.zip

Obs: When i change to load() instead of preload() it works, but i need to use preload() because with preload() i can "acess/see" attributes of the .gd class, so it's better to avoid programming errors like trying to acess a attribute that doesn't exists

This is cyclic dependency:

In FactoryState: var state = preload("res://states/DefaultState.gd")
In DefaultState: print(FactoryState.Test.TESTE)

Your DefaultState references FactoryState, but to load FactoryState it must preload DefaultState first.
IIRC, this can be resolved in 4.0 but could not be backported.


requirejs optimization issue with ol3

Hi,
I've been trying to bundle ol3 with my app using requirejs optimizer.
I ran into a runtime error :

Mismatched anonymous define() modules ...

After some research, I found that in my ol.js file, the rbush dependency was defined without name:
// export as AMD/CommonJS module or global variable
if (typeof define === 'function' && define.amd) define(function() { return rbush; });

Or that generate an issue in requireJS:

If you use the loader plugins or anonymous modules (modules that call define() with no string ID) but do not use the RequireJS optimizer to combine files together, this error can occur.

I modified the source likewise in order to avoid that error:
// export as AMD/CommonJS module or global variable
 if (typeof define === 'function' && define.amd) define("rbush", function() { return rbush; });

I gave a look in the code repository, but cannot find where to modify the code. I hope someone more skilled in ol3 will propose a PR

Thanks for the report, you should probably open an issue directly to rbush: https://github.com/mourner/rbush

Ok, thank you for the advice:
https://github.com/mourner/rbush/pull/29


Electron Shows an error when import the preload.js part of the module

Error
Showing the following error when importing the preload part of the module.
Error: module not found: custom-electron-titlebar at preloadRequire
Expected behavior
There preload.js part of the 'custom-electron-titlebar' should work without causing any err.
CODE[preload.js]
const {Titlebar,Color} = require('custom-electron-titlebar');

window.addEventListener('DOMContentLoaded', () => {
    new Titlebar({
            backgroundColor: Color.fromHex("#388e3c"),
            itemBackgroundColor: Color.fromHex("#121212"),
            svgColor: Color.WHITE,
            //menu: null // = do not automatically use Menu.applicationMenu

    });
});

Desktop

OS: WINDOWS 10
Electron version "^20.1.4"
Node Version "16"

@AlexTorresSk is this is because the new 20 update of electronjs?
As there any work around to solve this problem?

@Muhammad-Taif-Khan Do you have a solution to this issue yet? Seems as if the code in the preload is making my electron app crash

Not yet! did you find any work around?

@Muhammad-Taif-Khan Do you have a solution to this issue yet? Seems as if the code in the preload is making my electron app crash

@leytonoday  The issue is caused by importing the fs module in the titlebar.ts file of the custom-electron-titlebar.
In the new electron update, the preload.js file is sandboxed by default which means we can not import node js modules or any other module that uses nodejs modules inside them like fs, path, etc. which was the case with titlebar.ts.
in order to solve this issue, you will have to remove the fs module from the titlebar.ts or create an IPC event to import it in the main.ts file and then send it back to the titlebar.ts.
I was going to create my own pull request to solve this problem but I saw one that was created by someone a week ago.
remove fs module from titlebar.ts

Rather than waiting for this issue to be resolved by the repository owner,
I wrote my own code to make the titlebar. It's actually relatively easy.
The following link is my React component for a titlebar:
https://github.com/leytonoday/Clipboard-TTS/blob/main/src/renderer/components/titlebar/Titlebar.tsx
My titlebar doesn't have any menu, but I don't imagine that it'll be hard
to implement a system for that.
On Tue, 27 Sept 2022 at 10:33, Muhammad Taif Khan @.***>
wrote:

@Muhammad-Taif-Khan https://github.com/Muhammad-Taif-Khan Do you have a
solution to this issue yet? Seems as if the code in the preload is making
my electron app crash
@leytonoday https://github.com/leytonoday The issue is caused by
importing the fs module in the titlebar.ts file of the
custom-electron-titlebar.
In the new electron update, the preload.js file is sandboxed by default
which means we can not import node js modules or any other module that uses
nodejs modules inside them like fs, path, etc. which was the case with
titlebar.ts.
in order to solve this issue, you will have to remove the fs module from
the titlebar.ts or create an IPC event to import it in the main.ts file and
then send it back to the titlebar.ts.
I was going to create my own pull request to solve this problem but I saw
one that was created by someone a week ago.
remove fs module from titlebar.ts
https://github.com/AlexTorresSk/custom-electron-titlebar/pull/194#issue-1376940715
—
Reply to this email directly, view it on GitHub
https://github.com/AlexTorresSk/custom-electron-titlebar/issues/195#issuecomment-1259241919,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AISXUFB7GTIEMXI6BEKPR6DWAK5PVANCNFSM6AAAAAAQQCBHDU
.
You are receiving this because you were mentioned.Message ID:
@.***>

Fix on #194


Do BP5 files work with ADIOS2.jl?

Hi, I am using ADIOS2.jl on Cori at NERSC (using adios2 v2.8.2 libraries that I built myself). I can write BP5 files in serial mode (setting the engine type in the config.yaml file), but they seem to be unreadable.
If I try "bpls" on the bp5 file, I get,
[ADIOS2 EXCEPTION] <Core> <Engine> <ThrowUp> : Engine BP5Reader does not support DoAllStepsBlocksInfo

If I try to read the BP5 file with ADIOS2.jl in serial mode, inquire_all_variables returns an empty array.
The tests for adios2 itself pass. I assume that it tries bp5 files (but not really sure).
Have you tried bp5 files using ADIOS2.jl?  Thanks! -- Adam

Ok - I think I figured part of it out. BP5 insists on doing begin_step when reading while BP4 apparently does not. I was able to read a bp5 file with ADIOS2.jl. The bpls problem should go to the adios2 issues list.
By the way, getting ADIOS2.jl to use my build of the adios2 libraries on Cori was a little tricky. I'll open another issue with what I did to make that work so you can comment on it.

Why did you want to use your own build of adios2? The binaries provided by ADIOS2_jll should work there. Did you run into a problem, or was there a feature missing?

I see you are also the author of MPITrampoline. I've never tried that on Cori (I'm using MPI.jl v0.19.2). I suspect that and the newer MPI.jl will make things much easier. I think these things would allow me to use your ADIOS2_jll out of the box. Is this something I can try now?

Yes, you are right – you currently need to build your own adios2 library for this reason.
This should also work with MPItrampoline, although there are still some rough edges. To do this, you would:

Build MPIwrapper against Cray MPI
Use MPI.jl version 0.20.0
Use MPIPreferences to choose MPItrampoline_jll as binary
Set a few environment variables at run time that point MPItrampoline to the MPIwrapper library you created

I haven't tried this in the recent past, though.

OK - thanks - I don't see an MPI v0.20.0 - so probably have to wait for that. I have to look to see if the NERSC folks have set this up already. They now have a common depot, but not sure how MPI is set up.
Thanks again for your help! I'll let you know what I find with ADIOS2.jl on Cori.

It's the development version of MPI.jl. If you say develop MPI instead of / after add MPI in Julia, you'll get this one.

Hi Erik, I'm wondering - is there a reason why you didn't implement set_selection? My use case is that I'm going to have several very big separate one dimensional arrays (e.g. a billion rows and one column) in one file. When reading, I may only want to read in part of an array. I think set_selection would let me specify how much of the array I want to read (and where to start). But I don't see it implemented in ADIOS2.jl. If you just haven't gotten around to it, I can try to submit a PR. Or maybe there's something difficult about making that work. Thanks! -- Adam

This is likely an oversight. It should be straightforward to implement this function. Let me know if you encounter a problem in preparing a PR, I can then assist.

Ok - thanks! — Adam


Change react dependency to peer dependency

Most react packages put react in the peerDependencies section of the package.json. I'm not expert on npm but to my understanding this avoids multiple copies of react being placed in the dependency tree. I noticed my build size increased more than I expected after installing this so I dug around and found that changing your package.json removed an extra copy of react.

@dummerbd Thank you for creating this issue! You are definitely right, I'll make that change 👍


21 feature heterogenous execution mode which would allow each discrete worker to process multiple runs in parallel

Feature will add a new execution mode to allow the user to run the trials across multiple nodes by using multiple threads. This could allow multiple experiments to use the same GPU.

[ ] Requires unit tests to verify that this actually executes in parallel as expected. The unit test should compare the time taken to run trials locally as with running in a distributed way.

Codecov Report

Merging #22 (87a8323) into main (12f2e5e) will decrease coverage by 5.65%.
The diff coverage is 17.02%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   70.32%   64.67%   -5.65%
==========================================
  Files           6        7       +1
  Lines         374      419      +45
==========================================
+ Hits          263      271       +8
- Misses        111      148      +37

Impacted Files
Coverage Δ

src/Experimenter.jl
100.00% <ø> (ø)

src/heterogeneous_mapper.jl
0.00% <0.00%> (ø)

src/runner.jl
88.23% <57.14%> (-2.88%)
:arrow_down:


example not works: WebUI not exported

create main.ts

import { WebUI } from "https://deno.land/x/webui/mod.ts";

const myWindow = new WebUI();
myWindow .show("Hello World");
await WebUI.wait();

run

deno run --allow-all main.ts

shows an error

error: Uncaught SyntaxError: The requested module 'https://deno.land/x/webui/mod.ts' does not provide an export named 'WebUI'
import { WebUI } from "https://deno.land/x/webui/mod.ts";

Solution:
> git clone git@github.com:webui-dev/deno-webui.git

import { WebUI } from "./deno-webui/mod.ts";

const myWindow = new WebUI();
myWindow .show("Hello World");
await WebUI.wait();

Thank you @7flash, That's right, in the meanwhile @JOTSR is working on this to be fixed in the main repo.

Since the current doc is tracking the next comming release there are breaking changes on the exports. For production use keep using the stable latest tag on deno.land. If you want to test the new comming features and API import directly from the main branch of the repo   (pin a commit to reduce breaking changes).

The new stable version will be available soon after we voted to remove the webui.js from the source.

Not sure what it means, but I have a relevant question,
Is it recommended to implement backend with bind/call between frontend in terms of performance or rather perhaps better spawn my own http server in same process?

Sorry, I meant that the current repo has an unfinished implementation. You can use the latest stable version here. Or clone the current branch, and apply the patch mentioned by @JOTSR.
About the HTTP Server, usually, webui will take care of it for you. You will receive events (clicks, calls) quickly. Many people have already used webui 2.0.3 in a production environment, and it's working fine, with no performance issues.

Sorry, I meant that the current repo has an unfinished implementation. You can use the latest stable version here. Or clone the current branch, and apply the patch mentioned by @JOTSR.
About the HTTP Server, usually, webui will take care of it for you. You will receive events (clicks, calls) quickly. Many people have already used webui 2.0.3 in a production environment, and it's working fine, with no performance issues.

Another issue, I'm not sure if it's supposed to support async handlers of events, and in that case I should open another issue with more detailed description, but what happens that it works with one or two invocations, and then throws a fatal error:
malloc(): unaligned fastbin chunk detected

I don't know if it can be easily fixed to support async handlers and in meantime I will have to stick with following approach, where I have to manually register callback on frontend, then call backend function which will run callback passing result.
// frontend
window.cb = (result) => {}
window.webui.call('first_function', {});

// backend
myWindow.bind('first_function', async event => {
  const result = await secondFunction();
  myWindow.run(`window.cb(${result})`);
})

Do you mean this is causes issues:
webui_fn('first_function').then((response) => {
     window.cb(response);
});

sendRaw
can you show me an example how to use it?
thank you!


Support dynamic splits in InProcessCreate

Implement splitAtFraction in InProcessCreate. Create can be split
at any index.
Add @Category(RunnableOnService.class) to existing tests.

R: @dhalperi

Use an OffsetBasedSource for the whole thing.

LGTM

@tgroh presumably want to backport this?


Plugin's BasePlugin type is not a class derived from BasePlugin in WaveSurfer

Bug description
Property 'wavesurfer' is protected but type 'BasePlugin<EventTypes, Options>' is not a class derived from 'BasePlugin<EventTypes, Options>'. ts(2345)
BasePlugin, BasePluginEvents and GenericPlugin types are duplicated from src/base-plugin.ts to dist/wavesurfer.d.ts after rollup-plugin-dts has been added in https://github.com/katspaugh/wavesurfer.js/commit/add8c247b3e638682d69d723178bb1e19d57c9d6 and WaveSurfer.registerPlugin uses it, but plugins use the original ones from src/base-plugin.js
Screenshots

Thanks, on it!

Fixed in 7.5.7. ✅
Thank you for reporting and analyzing the problem!


Dev server: listen on next available port if port 5000 is not free

Is your feature request related to a problem? Please describe.
Pretty self explanatory. Most popular dev server listen on the next avaliable port if the default port is not available. This saves you from finding the process which is consuming that port.
Right now abell just crashes:

Describe the solution you'd like
Listen on next available port if port 5000 is occupied. Do not do this if user has specified the port.
Additional context
https://github.com/facebook/create-react-app/blob/8e761d19d14f47afdbbcfa6e19ed50c8ea1a63f4/packages/react-dev-utils/WebpackDevServerUtils.js#L448

Yep this is neccessary! Thanks for opening the issue. Keeping this open if someone wants to work on this.

I will most likely pick this up. Thanks!