[TypeScript Common] Support schemaNamespace config

Describe the bug
schemaNamespace has no effect on output code
To Reproduce
overwrite: true
documents:
  - './src/modules/**/*.ts'
  - './src/modules/**/*.tsx'
schema: 'http://localhost:4000/graphql'
generates:
  src/generated/graphql.tsx:
    config:
      noNamespaces: true
      enumsAsTypes: true
    plugins:
      - 'typescript-common'
      - 'typescript-client'
      - 'typescript-react-apollo'
  cypress/fixtures/graphql.d.tsx:
    config:
      enumsAsTypes: true
      schemaNamespace: 'MyNamespace'
    plugins:
      - 'typescript-common'
      - 'typescript-client'

Expected behavior
the export namespace is present
Schema/Documents
If possible and relevant, please provide your GraphQL schema and GraphQL documents.
Environment:

OS: Mac
Codegen: Latest
Node: 10

Hi @tomitrescak !
The schemaNamespace is a config for typescript-server only.

Hi, it's documented in typescript-common. Anyway, this package id already a ser Dreamweaver. Bren using prisma for server and Apollo for client till now but Im so much happier with your work.
If I can add a wish it would be a possibility to generate ambient types wrapped in a namespace.
declare namespace MyTypes {
....

Thanks @tomitrescak !
It's just a bad copy-paste :) removed from the docs in: https://github.com/dotansimha/graphql-code-generator/commit/379d37bcf842543b5456cf0b9c1f8251d04ee8e9
We are trying now to find alternatives for namespaces, because not all environments can use it (such as babel-typescript, and it's in use in create-react-app). But I agree that we need to wrap the types of typescript-server with the namespace.

Hi, thanks for the fix. The ambient types would be really cool. It solves the nMespacing issues

Fixed in the recent refactor. we will release it soon.

Fix available in 1.0.0 👍


vscode flickering on mac (macbook air M1 ) while using with external display.

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.73.0 (Universal)
OS Version: MacOS 13.0 (22A380) Apple M1

Steps to Reproduce:

Connect your laptop with an external display.
Use your vscode on fullscreen. (On any display)
Start using your vscode, after sometime it will start happening. (No pattern here, Unable to reproduce consistently)
Maybe switching between two displays triggers this issue. Not sure. (Like browser on main display then switch to vscode on another display and it happens)

Flickering happens on the main and external display as well. Flickering is random. Sometimes the screen goes black for a long (3-4 secs). Sometimes it flickers continuously.
Will publish more related videos. It's pretty random. Unable to record all situations.
https://user-images.githubusercontent.com/96908258/200257870-5a55e608-844d-44d0-a7b4-e99a6043c3ab.mp4

I have the same problem with my MBA M1.

The same on mbp 14 m1pro

I am experiencing the same issues. Very problematic as it is occurring more frequently as of today for me. But the problem started when updating to MacOS 13.0

Same issues. MacBook Pro 16 and external Benq 4k display

same issue

M1 Max MacBook Pro 16 and external Benq 4k display.

Yeah, same exact issue. M1 chip MacBook Pro 14 inch.

Me too. Following.

Me too, MBAM2 external Samsung monitor.

Please try our exploration build based on newer runtime and confirm if the issue still persists. Thanks!

Mine flickers very fast.
Laptop
MacBook Pro
14-inch, 2021
Apple M1 Pro
32 GB
macOS 13.1 (22065)
External Display
BenQ PD3220U, 4k 60hz, used as main display, macbook in clamshell mode

Having the same issue lately

The flicker is bad, gives me a headache.
I did find out it is partly because of the themes. Not always though, the themes seem to make it happen just more often.
Especially the kimbie dark theme. When it gets really bad, I must close everything and be on an empty desktop until it stops.
The external display on the macs hdmi port is the culprit. The laptop screen and the other connected with thunderbolt never flicker.
External Display:  Asus VS247.

https://forums.macrumors.com/threads/m1-air-ghosting-flickering-with-external-display.2271670/page-23
Having had my m1 mac for a long time, I already switched to "normal" x86 machine. Problem is even worse when running asahilinux. But, hear me out: It is rumored that its a issue with EDID, which could mean that running your display with a capture card that has passthrough in between could actually help. Cost around 160 bucks ( e.g NZXT Signal 4K30 )  But it could also be a regional issue - some machines may not have the issue, produced somewhere else.

Happened to me on my M1 macbook pro after I switched from HDMI to USB-C/Displayport.  After I switched away from "Solarized Dark" theme to "Dark+ V2 (Experimental)" the flickering went away.

I doubt it has to do with the theme. Can you let me know if you don't have any flickering for the next couple days?

I have now switched back to HDMI from the MacBook.
Now the flickering is gone. Seems like it doesn't have anything with VS Code Theme. It seems to be a USB-C problem with a BenQ 4K monitor.

@aneelang After looking at the video I think my issue is different.  My flickering is much quicker than the reporter's.  It almost looks like it's doing interlacing like an old TV, except it's vertical and not horizontal.  Also it makes the whole monitor flicker even if code is only using half of the screen.  It does not stop flickering until I change the theme or I remove "black" dialogs hovering over the main editor window.
I agree that it's not likely the theme but maybe it could be the rendering/contrast?  I could get it to happen pretty consistently by doing the following:

Set my theme to "Solarized Dark" or "Solarized Dark+"
Open up the command dialog (Shift+Cmd+p)

Having the almost-black background of the dialog hover over the slightly lighter background of Solarized Dark seems to be the trigger.  I tried a few other themes but couldn't re-create it as noticeably.
After I restarted Code today I could not reproduce the issue.  I've had it open for several days including suspend/resumes.
Other notes

I have code in remote edit mode to a Linux host over SSH.  I'm not sure if it's ever happened when just editing files locally.
I'm using a Dell S3221QS (4k) connected with a Plugable USB-TDP adapter.
I'm running Ventura 13.2.1

@jagibson I absolutely have no evidence about what I'm about to say:
This is a issue with M Series devices which is triggered by certain colors/schemes which apple is unable to fix.
As pointed above, in the countless sub-links in the link I've posted: Changing the EDID sometimes had helped. But the real fix would be related to hardware, rather than software.

I have LG Ultrafine external, Macbook Pro connected via Thunderbolt, and as soon as I disconnect from the external display, it will first go complete dark, then it will come back, and the flickering starts, and more than half of the screen will go dark. Even after I kill vscode, the problem is still there, but seems less frequent than when Vscode is on. I've tried many things include reset System Management Controller, and now I am on this thread here. I really don't know what it is.

Some people claim that disabling nightlight helps.

It looks definitely related to VS code. This morning I used browser, notes for about 30 minutes with no flickering or dark screen problem whatsoever, but as soon as I started the vscode, the problem started. I quit the vscode, for about 30 seconds, it has a lingering effect on the flickering and mouse cursor was sluggish, then the problem stopped.
I suspect vscode triggerred something in the display settings/driver, and causing this issue.
Here is my settings from vscode.
Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:54:09.061Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 22.3.0
Sandboxed: No

I suspect vscode triggerred something in the display settings/driver

Thats what I was talking about. Everything dark-theme related or specific dark gray tones seem to trigger this specific behavior. @samuelan Are you certain this issue ever shows up on light themes?

Thank for asking, @zDEFz. I have night shift turned off, and I always use light theme, never really used dark theme.

I am having the same issue.  The flickering on my screen is very rapid.  Just bought a brand new MacBook Pro M1 Max 32 GB RAM and my screen flickers when I use full screen visual studio code with HDMI to an external LG monitor.
Will continue following.

Update 4/4/2023. I replaced my Macbook. The technician said it was not vscode or any other software. It was the hardware related to the display.
The flickering and half screen goes black in non-deterministic fashion got worse last few days with or without the VScode running. I conclude it's not vs code.

This absolutely is an issue with VS Code. No other app triggers this, and its happening to a lot of people.
M1 Mac, Dark theme, external display (1440p 165Hz) over HDMI

I found a workaround ... mostly. I make sure every workspace only has one single theme extension enabled. I went to all my workspaces and disabled all themes globally first. Then in each workspace, I only enable the extension for the theme I want in that workspace. This means all the others theme extensions are disabled.
If I enable every theme extension in a workspace and then choose a theme, the flicker will get bad.  I am also suspicious of too many extensions in general so I only enable extensions selectively per workspace and have all global extensions disabled.
I blame extensions fighting with each-other.

This absolutely is an issue with VS Code. No other app triggers this, and its happening to a lot of people.
M1 Mac, Dark theme (Solarized dark), external display (1440p 165Hz) over HDMI

I have a M1 Mac too and other apps trigger this as well. Correlation does not imply causation
So which apps am I talking about? mostly electron based ones. And it is most visible in dark scenes.

happens with me too.
MacBook Pro M2 Pro
external monitor: LG

This was happening to me when using a MacBook Pro (Apple M1 Pro, Ventura 13.4) and using a Samsung G9 Odyssey monitor in Pip mode (split screen). It would cause my other split to flash and be very distracting. It would only happen when the terminal window was visible on the Mac. You could resize the window to zero height or close it entirely and it would stop happening.
To solve this, I changed my theme from Dark Modern to Dark+.

I think @zDEFz is right - the issue is deeper than vscode.  I had it happen with Microsoft Remote Desktop (another MS product?) when connecting to a remote server that had just the right subdued colors.

I've checked on the thread I've posted before once again. There is a person claiming to have found a fix with 'technically an external GPU'
https://forums.macrumors.com/threads/m1-m2-flickering-ghosting-with-external-display-merged.2271670/post-32017012
I haven't tried it personally. It involves buying a 140 EUR adapter OWCCADPDL2HDMI https://www.amazon.de/OWC-Display-DISPLAYLINK-Thunderbolt-OWCCADPDL2HDMI/dp/B09RMVL865 and a 10 EUR HDMI Emulator.

The flicker is even worse when you are already feeling nauseous. Uggh, this about made me puke today. Just wait till someone has epilepsy and comes across this one.

The flicker is even worse when you are already feeling nauseous. Uggh, this about made me puke today. Just wait till someone has epilepsy and comes across this one.

Not all triggers are visual. Any type of stress can trigger epilepsy as well.

For me switching the theme Dark+ worked as a temp fix for the flickering on my BenQ 4K external monitor.

Disabling the "True Tone" option in system preferences seemingly fixed the flickering for me.
In my case it was a scroll-dependent flicker visible mainly in the status bar at the bottom of the VSCode window, as well as the accordion section titles in the sidebar.
Laptop: MBP 14in M2 Max
Monitor: BenQ EW3280U

I'm getting the flickering pretty bad with an older (2018, non-Apple Silicon) MBP
Model: MBP 15in 2.6 GHz 6-Core Intel Core i7
Monitor: AOC U2790B
VSCode: 1.82.0
Version: 1.82.0
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 22.6.0

These two combined steps worked for me:

For the monitor, set the Color Profile to Generic RGB Profile as in this suggestion
Use the monitor's native resolution, rather than scaled.

I recently ran into this with a Samsung LF32TU87 monitor. While setting the Color profile did not resolve the problem, using the native resolution did. Thank you spockoyno!

The one thing that worked for me was disabling GPU rendering. Preferences: Configure Runtime Arguments, add "disable-hardware-acceleration": true

I was getting the flickering pretty bad with an older (2018, non-Apple Silicon) MBP
Model: MBP 15in 2.6 GHz 6-Core Intel Core i7 Monitor: AOC U2790B VSCode: 1.82.0 Version: 1.82.0 Electron: 25.8.0 ElectronBuildId: 23503258 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: <IP_ADDRESS>-electron.0 OS: Darwin x64 22.6.0
UPDATE This solved my issue:

I fixed the problem by disabling automatic graphics switching on my macbook pro.
The setting is located in system preferences -> battery.
It worked!

https://stackoverflow.com/questions/29966747/how-can-i-disable-gpu-rendering-in-visual-studio-code

This worked for me, though scrolling seems not so smooth now. But it's much better than that flickering.

This resolved it for me...
With VSCode open:

Open the command palette: {CMD}+{SHIFT}+P
Open the configuration file: type "Preferences : Configure Runtime Arguments"
Change the property "disable-color-correct-rendering" to false.

Apparently, "disable-color-correct-rendering" was removed from both Electron and VSCode in recent versions

To sum it up - Apple did mess something up, and it is working if it doesn't use Apples implementation?

For me, changing the resolution ratio worked on my Dell. It didn't like the intermediary options. I had to scale it all the way until it matched a native resolution of the monitor.

For me, changing the resolution ratio worked on my Dell. It didn't like the intermediary options. I had to scale it all the way until it matched a native resolution of the monitor.

You know, its all kind of weird. On my older macbook pro from 2016, after update to ventura/sonoma, Microsoft Teams is only usable through the Browser if any external display is connected. Otherwise, the whole application becomes non-interactable.

So, is there no solution to this except for disabling the hardware acceleration, which by itself comes at a cost of reduced performance?

So, is there no solution to this except for disabling the hardware acceleration, which by itself comes at a cost of reduced performance?

These are all guesses. What works for you might not for others.
On top, you have issues if you do not use apple displays.
Why? Well, because apple does do their own stuff. See https://social.treehouse.systems/@marcan/112129842235465322

These two combined steps worked for me:

For the monitor, set the Color Profile to Generic RGB Profile as in this suggestion
Use the monitor's default resolution, rather than scaled.

MacBook Pro M1, Dell external monitor. I tried various other things mentioned on this thread, but in the end, switching from scaled -> default resolution on the monitor worked. Flickering was pretty bad, triggered by scrolling and typing.

Intel Macbook Ventura 13.6.6 -> Turning off "Zoom per window" fixed it for me. Having multiple windows/split windows makes it worse.

https://github.com/microsoft/vscode/assets/24477285/59bc2ceb-4942-4b45-8aca-2ee7dfdb62dd
I'm still experiencing it on an external display on a M3 Max Macbook.

What worked for me (at least in the short term) was commenting out "disable-color-correct-rendering": true, in the runtime arguments. This was activated for some reason—turning it off got rid of the flicker (for now).

Why do y'all not stop using mac? Serious question. This is very specific and apple hasn't made an official statement.
If they felt their users were worth a dime for them, they'd really invest some honest efforts and money.

Why do y'all not stop using mac? Serious question. This is very specific and apple hasn't made an official statement. If they felt their users were worth a dime for them, they'd really invest some honest efforts and money.

@xdefz Because my company doesn't support Linux and Windows is not to my taste.

Why do y'all not stop using mac? Serious question. This is very specific and apple hasn't made an official statement. If they felt their users were worth a dime for them, they'd really invest some honest efforts and money.

@xdefz Because my company doesn't support Linux and Windows is not to my taste.

You should return the device under the companies return policy ( usually apple enterprise ).
If enough do this, maybe the issue is going to be addressed.

I mean we got now 32 Pages of possible solutions and Apple has no statement! https://forums.macrumors.com/threads/m1-m2-flickering-ghosting-with-external-display-merged.2271670/page-32

I found a fix that worked for me.

Open System Preferences > Displays
Select your external monitor > bottom of page click Advanced...
Turn on Show Resolutions as a list > Close out of the popup
At the bottom of the resolution list, turn on Show All Resolutions
Select one of the resolutions marked with (low resolution) next to it.

I believe this is a built-in way to turn off dithering and other graphic settings that may be causing issues.

I got the flickering issue on my Macbook Pro i7. It was fine for ages (have that notebook since 2019) but started gradually this year and got worse during the last few months. Sometimes VSC even completely freezes for a while when trying to do sth. Tried to clean up my Mac and followed some of the instructions here but no luck so far.
Ordered a Macbook Pro M4 these days because it was time for a notebook upgrade anyway, but are scared after reading this thread that VSC will be broken there too.

I got the flickering issue on my Macbook Pro i7. It was fine for ages (have that notebook since 2019) but started gradually this year and got worse during the last few months. Sometimes VSC even completely freezes for a while when trying to do sth. Tried to clean up my Mac and followed some of the instructions here but no luck so far.
Ordered a Macbook Pro M4 these days because it was time for a notebook upgrade anyway, but are scared after reading this thread that VSC will be broken there too.

I was told yesterday that this is because of Electron enforcing RGB. I wonder how true it is.

I believe I have something corresponding to @jagibson's description of "vertical interlacing" weird looks, only on the external monitor (a LG HDR WQHD+); It does not happen on the macbook pro's internal that I have experienced (I have a M4Pro).
It's also only on the specific Space where VSCode opens (others remain sharp), and you can see the resolution suddenly degrades on the whole screen as VSCode opens and the resolution coming back to normal sharp as you quit VSCode. It's also only with VSCode and no other app.
I just moved it to a different Space once opened, and moved it back and it went away. Now trying to reproduce it, and it won't - the picture is now crisp. It appears to be quite random. Will work for days, and today for no apparent reason, it started to mess up for example.


EF6.2 error the function evaluation needs to run all the threads

       var query = db.User.Where(t => t.Disable == 0);
        query = query.Where(t => t.DeptName != null);
        query = query.Where(t => t.StaffName=="Json");
        var list = query.ToList();

When debugging, I can look at the results of the query in version 6.13, but in version  6.2 it will report the function evaluation needs to run all the threads of the error, or that can not calculate the expression, not support the operation。
How do I normally debug in version 6.2?

@zxcyfz What version of VS are you using?

vs2017 and vs2013

@ajcvickers vs2017 and vs2013


Support new app: Arc Browser

BundleId of the app
company.thebrowser.Browser
Example window titles
gmail
GitHub
Google

We already support ArcBrowser, unless it's broken?
https://github.com/wakatime/macos-wakatime/blob/main/WakaTime/Watchers/MonitoredApp.swift#L4

Hey @alanhamlett I think it's broken! 😬
On the dashboard I can see warp or slack for example, but not arc.
App is up to date: 5.23.1
There's no errors in these logs:
#  ~/.wakatime/macos-wakatime.log

2024-08-30 09:16:16.924: App changed from Arc to Warp (dev.warp.Warp-Stable)
2024-08-30 09:16:33.522: App changed from Warp to RubyMine (com.jetbrains.rubymine)
2024-08-30 09:16:34.281: App changed from RubyMine to Warp (dev.warp.Warp-Stable)
2024-08-30 09:16:36.205: App changed from Warp to RubyMine (com.jetbrains.rubymine)
2024-08-30 09:16:39.633: App changed from RubyMine to Arc (company.thebrowser.Browser)
2024-08-30 09:16:42.634: App changed from Arc to Warp (dev.warp.Warp-Stable)

#  ~/.wakatime/wakatime.log
# Errors from a few days ago fixed by a reinstall.

{"caller":"pkg/language/chroma.go:127","file":"README.md","func":"language.selectByCustomizedPriority","level":"warning","message":"failed to load folder files extensions: failed to read directory: open : no such file or directory","now":"2024-08-26T18:49:37+02:00","os/arch":"darwin/arm64","plugin":"Warp/0.1.0-20240814.223322 macos-wakatime/5.20.0","time":1724690977.517945,"version":"v1.98.3"}
{"caller":"pkg/language/chroma.go:132","file":"README.md","func":"language.selectByCustomizedPriority","level":"warning","message":"failed to load head from file \"README.md\": failed to open file: open README.md: no such file or directory","now":"2024-08-26T18:49:37+02:00","os/arch":"darwin/arm64","plugin":"Warp/0.1.0-20240814.223322 macos-wakatime/5.20.0","time":1724690977.517945,"version":"v1.98.3"}

Is there anything I can do on my side? Thanks!


[gen_l10n] Add option to format generated localizations files

See title. This adds a --format flag to the flutter gen-l10n command. We do this by returning the list of generated files from LocalizationsGenerator.writeOutputFiles and doing post processing from the generate_localizations.dart file. This should also be the way of adding any additional post processing steps to the gen-l10n command going forward.
Fixes #98122
Relevant PRs: #108563, #98701.

@christopherfujino @HansMuller can I get a quick look at the changes just to make sure this makes sense before I go and update generate_localizations_test.dart?

I'm confused why this is opt-in. In what situation wouldn't you need the file to be formatted like the rest of the project ?

I'm confused why this is opt-in and even optional. In what situation wouldn't you need the file to be formatted like the rest of the project ? How will this play out with vs code auto gen of localization on save ?

if you don't use dart format on your codebase
if we don't make this opt-in, it will be a breaking change to customers who check in their generated files.

if you don't use dart format on your codebase
if we don't make this opt-in, it will be a breaking change to customers who check in their generated files.

How will dart format be a breaking change ?

So what ?

Not necessarily breaking, but it would be a bit annoying/confusing having to commit unexpected changes due to formatting changes.
For automatic generation, I'll add a format option to the yaml config.

I think #108563 has already done what this PR has done. And we have another test case issue with test timeout that need to be resolved. Also, @thkim1011 is on the review list.

if you don't use dart format on your codebase

If you don't, #103414 should also be considered as a breaking change.

if we don't make this opt-in, it will be a breaking change to customers who check in their generated files.

Generated files can be affected only once after they update their SDK. We do have a couple of patches during SDK updates like ignoring frame rates limitation when building iOS apps.

Not necessarily breaking, but it would be a bit annoying/confusing having to commit unexpected changes due to formatting changes.

That's only valid for the first localization gen and only because it did not originally obey formatting rules, with it should have. So again, why should this be opt-in ?
I can tell you why I don't want this opt-in, simply because it's inconvenient.

I think #108563 has already done what this PR has done. And we have another test case issue with test timeout that need to be resolved. Also, @thkim1011 is on the review list.

@AlexV525 is there a specific reason why we should pass in artifacts and processManager into LocalizationsGenerator and doing the formatting within the LocalizationsGenerator class in your PR? I think this is the only difference between our PRs? I feel that any sort of post processing on the generated files don't really belong in the LocalizationsGenerator class, but I'm not completely opposed to your PR either.

I feel that any sort of post processing on the generated files don't really belong in the LocalizationsGenerator class

IMO it belongs to the generator, something like who generates them should format them. In #108563 the generator obtain the artifacts and the process manager not only from the context runner, but also from a build target's environment.

I don't see any tests that verified if generated files are well-formatted.

Whether or not a file is formatted is something that dartfmt knows, but its not the tools responsibility to test. If we've tested that dartfmt has been invoked that is good enough for me


How to send multiMssage?I use SubmitMultiExample but it does't work

String[] desNum = desAddr.split(",");
if (desNum.length > 1) {
Address[] addresses = new Address[desNum.length];
for (int i = 0; i < desNum.length; i++) {
Address address = new Address(TypeOfNumber.INTERNATIONAL, NumberingPlanIndicator.UNKNOWN, desNum[i]);
addresses[i] = address;
}
SubmitMultiResult submitMultiResult = session.submitMultiple(null, TypeOfNumber.UNKNOWN, NumberingPlanIndicator.UNKNOWN, sourceAddr,
addresses, new ESMClass(), (byte) 0, (byte) 0, null, null,
new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT), ReplaceIfPresentFlag.REPLACE,
DataCodings.ZERO, (byte) 0,
msg.getBytes(ENCODE));
messageId = submitMultiResult.getMessageId();
thow exceptions:
Exception in thread "pool-2-thread-2" java.lang.ArrayIndexOutOfBoundsException: 16
at org.jsmpp.util.SequentialBytesReader.readCString(SequentialBytesReader.java:64)
at org.jsmpp.util.DefaultDecomposer.submitMultiResp(DefaultDecomposer.java:539)
at org.jsmpp.session.state.SMPPSessionBoundTX.processSubmitMultiResp(SMPPSessionBoundTX.java:77)
at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:83)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Hi Sun, from the log, I see that during the reading of the messageId of the received submit_multi_resp, scanning for the 0x00 byte, the data stream is exhausted. Do you have the network log of this message? Either some data is not received, or the header is not matching the data length...

org.jsmpp.extra.ResponseTimeoutException: No response after waiting for 5000 millis when executing submit_multi with session 442ba3fa and sequence_number 2
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:297)
at org.jsmpp.session.SMPPSession.submitMultiple(SMPPSession.java:356)
at org.jsmpp.examples.StressClient.sendMultiMessage(StressClient.java:202)
at org.jsmpp.examples.StressClient$1.run(StressClient.java:164)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after 5000 millis
at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:119)
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:291)
... 6 more

Hi, this means after the submit_multi_sm was send, and waiting for 5 seconds, there was still no answer received from the SMSC. You could increase the timeout value to see if something is received. Afterwise contact the SMSC operator and check why no answer was generated.

20 seconds still no answer,I use StressServer on my PC as the SMPP sever .and use StressClient as cleint to send SMS.
org.jsmpp.extra.ResponseTimeoutException: No response after waiting for 20000 millis when executing submit_multi with session 3b39ffb8 and sequence_number 2
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:297)
at org.jsmpp.session.SMPPSession.submitMultiple(SMPPSession.java:356)
at org.jsmpp.examples.StressClient.sendMultiMessage(StressClient.java:202)
at org.jsmpp.examples.StressClient$1.run(StressClient.java:164)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jsmpp.extra.ResponseTimeoutException: No response after 20000 millis
at org.jsmpp.extra.PendingResponse.waitDone(PendingResponse.java:119)
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:291)
... 6 more

Hi, the problem was in DefaultDecomposer, where the PDU body of the submit_multi_resp was not ignored when the status indicated an error. The StressServer currently only supports submit_sm requests. I committed the code with the fix. I will later add handling of the submit_multi in the StressServer.

Hi I pull ourCode and run it ,shows:
org.jsmpp.extra.NegativeResponseException: Negative response 00000008 (System Error) found
at org.jsmpp.session.AbstractSession.validateResponse(AbstractSession.java:244)
at org.jsmpp.session.AbstractSession.executeSendCommand(AbstractSession.java:305)
at org.jsmpp.session.SMPPSession.submitMultiple(SMPPSession.java:362)
at org.jsmpp.examples.StressClient.sendMultiMessage(StressClient.java:202)
at org.jsmpp.examples.StressClient$1.run(StressClient.java:164)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Yes, submit_multi was not implemented. I updated StressServer now to send the submit_multi_resp. See org.jsmpp.examples.StressServer#onAcceptSubmitMulti

ok bug fixed，thanks a lot

I run it on ISP server and use StressClient as SMS client：
2020-02-24 04:05:36,309 [pool-2-thread-2] ERROR org.jsmpp.session.state.AbstractGenericSMPPSessionBound - Receive generick_nack. command_status=00000003, sequence_number=00000002
2020-02-24 04:05:36,309 [pool-1-thread-1] ERROR org.jsmpp.examples.StressClient - Failed submit short message 'hello jsmpp' to<PHONE_NUMBER>41,919820018674
org.jsmpp.GenericNackResponseException: Receive generic_nack with command_status 00000003
at org.jsmpp.session.state.AbstractGenericSMPPSessionBound.processGenericNack(AbstractGenericSMPPSessionBound.java:97)
at org.jsmpp.session.PDUProcessTask.run(PDUProcessTask.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

I released 2.3.9 to Maven including the fix.


Merge button can be clicked multiple times, sometimes leads to HTTP 500

Description
It seems like it is possible to click multiple times on the merge button while the merge is being processed server side. This seems to actually send multiple requests to the server.
We had one situation where the user ended up with an HTTP 500 and an inconsistent state: The changes were merged but the Pull Request in Gitea was still opened, and showed no changes anymore.
The logs showed that multiple requests to process the PR were being processed by the server, within approximately 2 seconds.
We had to correct the data in the DB for the PR to be shown as "Merged".
This issue may not be very apparent if the network connection and the server are fast. However, there are use cases where the user may have to wait few seconds. E.g. We have a hook which synchronously sends the commits to an SVN server (with Subgit); this causes a little delay which can easily reach 3-5 seconds.
To reproduce
It should be easily reproducible by creating a pre-receive.d/sleep hook which simply sleeps to add an artificial delay.
Solution idea
At least disable the merge button when it is clicked. It would also be great to have an additional, server-side check to avoid processing more than one request related to a specific PR at a time.
Gitea Version
1.17.0+rc1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Debian (but Gitea runs in the gitea/gitea:latest container)
How are you running Gitea?
Gitea runs in a Docker container (gitea/gitea:latest).
We have another container which contains a running Subgit process which synchronizes the respective Git repo with an SVN server.
In order for this to work, there's two pre-receive and two post-receive hooks. Both for pre- and post-, there's one hook that will simply call the other Subgit hook using SSH (because Subgit is running in a different container than Gitea), and then there's the actual Subgit hook that triggers the Subgit process (i.e. to send the commits to SVN if users pushed to the main branch).
This implies that a Push to the main branch will be successful and accepted only if Subgit successfully sent it to the SVN server, and only if the SVN server accepted the commit. In every other case, the Git push will be rejected.
Database
PostgreSQL

Fixed by #25219


feat: add metrics enablement

Event Streams allows enablement of enhanced customer metrics using the provision parameters. Add the metrics enablement to the main module, and to examples/complete, modules/fscloud, and solutions/quickstart. Update READMEs.
Description
Add metrics enablement to the module. This is a customer-requested feature.
Metrics enablement is already a provision parameter, so no update to the terraform provider version is needed.
Release required?

[x] No release
[ ] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Run the pipeline
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

@Ak-sky The CI failure was from invalid credentials while creating the topics:
kafka server: SASL Authentication failed: Authentication failed, invalid credentials

This is odd, since the same credentials were used to create the Event Streams service instance and that worked. Topic creation also worked in the previous CI run.
I looked at the logging from the kafka servers, but unfortunately Cloud Logs is having problems in us-south and they're unavailable.  I also notice terraform created the testacc-subnet and VPC in eu-de, but the Event Streams instance in us-south - I don't know if that might be the cause.
Could you re-run the pipeline to see if the same error happens again?

/run pipeline

/run pipeline

@kccox, can you please point me to the terraform provider doc URL to support metrics?

I have converted this to draft because we would prefer to implement https://github.com/terraform-ibm-modules/terraform-ibm-event-streams/issues/322 first. That will allow the metrics variable to be list(string) and validated.

@kccox FYI, looks like a PR has been raised for migrating to parameters_json -> https://github.com/terraform-ibm-modules/terraform-ibm-event-streams/pull/325

@kccox https://github.com/terraform-ibm-modules/terraform-ibm-event-streams/pull/325 is merged now so you should be good to proceed to use parameters_json to add this support

/run pipeline

/run pipeline

@ocofaigh This is ready for review

@ocofaigh Added the metrics to examples/fscloud

/run pipeline

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

GitHub release
v2.8.0

Your semantic-release bot :package::rocket:


Support for Dehumidifier, Washer, & Dryer

Is your feature request related to a problem? Please describe:
Currently only supports Refrigerator and Air Purifiers.
Other devices don't show up.
Describe the solution you'd like:
Ability to monitor status & possibly control additional devices. ie
Describe alternatives you've considered:
Looks like an older version (wideq) used to have the ability to do this.
https://github.com/ssut/wideq-js
Additional context:
Example of LG devices that you might be able to add support for from wideq-js:

Device
Implementation
Status
Control

Dehumidifier
✔
✔
✔

AC
✔
⚠ needs testing
⚠ needs testing

Refrigerator
✔
✔
✔

Dishwasher
✔
⚠ needs testing
❌

Dryer
✔
⚠ needs testing
❌

Washer
✔
⚠ needs testing

their new API is really different, that why I created new repository instead of make PR to wideq-js
I'm trying implement as much as possible, my priority is my owned device (air purifier, refrigerator, and next is washer dryer)

@town3r when you turn debug mode on, you can see device data of Dryer and Dehumidifier (in case your device using thinq v2), please upload it here and I'll try my best to implement it
thank you so much

Looks like both use v2. (I think)
Let me know if you need anything else or there's something i shouldn't have included.
LG ThinQ HomeBridge logs.txt

:O
They're showing up!
[27/04/2021, 10:42:10] [LGThinQ] Found device:  xxxxx: Washer (WASHER T1789EFH_F)
[27/04/2021, 10:42:10] [LGThinQ] Restoring existing accessory from cache: Washer
[27/04/2021, 10:42:10] [LGThinQ] Found device:  xxxxx: Dehumidifier (DEHUMIDIFIER DHUM_056905_WW)
[27/04/2021, 10:42:10] [LGThinQ] Restoring existing accessory from cache: Dehumidifier
[27/04/2021, 10:42:10] [LGThinQ] Found device:  xxxxx: Dryer (DRYER RV13U6AM8W_D_US_WIFI)
[27/04/2021, 10:42:10] [LGThinQ] Restoring existing accessory from cache: Dryer

I'm not really seeing any Debug logs from the devices communicating w/ HomeKit or LG regarding their current status.

I'm not really seeing any Debug logs from the devices communicating w/ HomeKit or LG regarding their current status.

yep, I write log for not supported device only
Is their showing correct status ?

Dehumidifier needs some work.
This is what I see within the Home app.

This is what the LG app shows normally:

I was thinking you might be able to setup current humidity level as a humidityAccessory.
Similar to how the homebridge-dyson-pure-cool plugin works.
dyson-pure-cool-device.txt

I updated a bit, added humidity threshold control

Nice!
Has the update been pushed out?
I saw the plugin jumped from v0.1.9 to v0.1.10 but didn't notice any changes on the devices.
It would be kind of cool if the Plugin Settings would update w/ the list of devices and let you enable/disable which are added to HomeKit or even enable/disable which specific toggle options are visible
ie: The Child Lock & Door Lock toggles for both Washer/Dryer.
For the Dehumidifier:
Are you able to remove the "Humidify" option?
It really should just be: Auto (Smart), On, & Off
Would be really cool if it also displayed current Humidity level & it sounds like you're working on adding the desired humidity % control.
Really impressed so far! Keep up the awesome work. :)

Oh nice!
I had installed v0.1.10 last night but didn't see the change.
Had to downgraded back to v0.1.9 and upgraded back to v0.1.10
This is what I'm seeing in the Home app now.

I'm noticing the following error in the debug logs:
(node:26577) UnhandledPromiseRejectionWarning: Error: Request failed with status code 400
    at createError (/usr/local/lib/node_modules/homebridge-lg-thinq/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/local/lib/node_modules/homebridge-lg-thinq/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-lg-thinq/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:26577) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1897)

thanks for your report
i'll investigate it carefully

v0.1.11 seems to have resolved the error messages. :)

If possible, could you enable debug logs for the dehumidifier devices?
I'd like to watch and see which API values change when I make changes to the devices current state.
ie: Fan on Low or High, When the water bucket becomes full.
A few things to note about the Dehumidifier device status and toggles.
It currently has Auto, Humidify, & Off.
The device it self can't humidify the air, it can only Dehumidify it.
Could be just Auto & Off or Smart & Off or On & Off.
The current humidity level also isn't being displayed yet.
A Temperature is displayed but it is stuck at -11 which I know the room it's in isn't that cold.
I also do not think my device really has any TemperatureSensor for the Air.
It should have a HumiditySensor tho.
I found some of the following, sadly i don't know enough to really modify your awesome work to see which would work or not.
Let me know if there's anything on my side that could help.
"airState.humidity.current" = public.hap.characteristic.relative-humidity.current
HAP-Specification-Non-Commercial-Version.pdf
8.20 Humidity Sensor
9.34 Current Relative Humidity
9.76 Relative Humidity Dehumidifier Threshold
9.81 Rotation Speed
A dehumidifier must include ”9.76 Relative Humidity Dehumidifier Threshold” (page 194).
9.81 Rotation Speed” (page 197) to control fan speed if the
fan cannot be independently controlled.

I already implemented Current Relative Humidity but I don't know why it's not showing up
I'll remove TemperatureSensor in next release
for Rotation Speed, homekit only support 0 - 100% speed

Power options seem to be fixed..
Temp is still being displayed instead of current humidity.

Getting closer!
The room environment button now has current humidity but it's tiny under the broken temp sensor.

Also looks like it no longer says what the desired humidity level is anymore.

The two accessories that are added:
-Temperature
-Dehumidifier
-Current Relative Humidity

Are you able to add a Humidity Sensor as third accessory?
8.20 Humidity Sensor (page 145)
public.hap.service.sensor.humidity
And as always thank you for all your hard work on this!

Yes I can add Humidity Sensor but it's will be duplicated (I think), because HumidifierDehumidifier already have CurrentRelativeHumidity characteristic (your home app is showing up current humidity, I think we remove temperature and it will be fine)
For temperature sensor, I think it's got cached in Home App, try manual "Reset Homebridge Accessory", remove and re-add Homebridge in Home App

Nice!
The Remove Single Cached Accessory from Homebridge worked and now the temperature sensor accessory is gone.
This is what it's displaying now:
Random Temp is gone! Yay.
Missing Target Humidity % value.

Single Accessory that includes current humidity

A separate accessory for just the humidity sensor would allow it to display the current humidity level under the Climate dashboard.

Oh just saw the new update.
Installing and clearing cached device real quick.

Desired humidity % is back! :)

Looks like a separate humidity accessory is needed if we want the current humidity to be included/displayed under climate.

I added HumiditySensor in new release
How about controlling humidity desired and turn on/off from Homekit ? it's work ?

Great work!

Powering On and Off works.
Changing desired humidity works.
Humidity sensor displays in climate dashboard.

Any idea if it's possible to detect when the device is actually running and dehumidifying  vs sitting idle waiting for the humidity % to go past the desired level?

on LG app is showing idle status?
I just looked at model specification but nothing related "idle" status
I think when "current humidity" higher than desired, it's actually running and dehumidifying to lower "current humidity", otherwise it's idle waiting, that right?

The device status icon changed depending on if it's idle or actively running.
Idle

Running

I'd be happy to grab the debug logs of from the device when it's status changes if you're able to enable debug/verbose logging for devices that aren't technically experiencing errors.

I'd be happy to grab the debug logs of from the device when it's status changes if you're able to enable debug/verbose logging for devices that aren't technically experiencing errors.

I'll insert debug logging for dehumidifier data in v0.2.2-test.1, data will write once at homebridge startup, when you see device changed status to idle, just restart homebridge to get new device data
I'll compare to find which is different, hope that help

I think you're right.
Found this which shows no idle option :(
Turning the device Off and On changes : airState.operation: from 0 to 1

"airState.operation": {
 "data_type": "enum",
 "default": "0",
 "value_mapping": {
   "0": "@operation_off",
   "1": "@operation_on"

I don't get why the app icon is smart enough to change when it is in an "idle" state tho. :(
Also found that the airState.miscFuncState.watertankLight:, value doesn't seem to change when the water tank is full / empty. Even tho the app sends a notification and the bucket full light turns on when full. Nothing changed in the debug log.
For the fan speed found:
"airState.windStrength":2, = Low
"airState.windStrength":6, = High
Here's a google sheet of the debug logs I collected.
https://docs.google.com/spreadsheets/d/1caTTNeVThx1eECmGAoeDQmCvdGi4DuJb1o1kEuuqBdM/edit?usp=sharing

Current State
Control

Power On & Off = ✅
Adjust Desired Humidity % = ✅
Fan Speed Low/High = ⚠

Status

Power = ✅
Current Humidity = ✅
Desired Humidity = ✅
Current State = ⚠
Watertank Level = ❌

Here's a google sheet of the debug logs I collected.
https://docs.google.com/spreadsheets/d/1caTTNeVThx1eECmGAoeDQmCvdGi4DuJb1o1kEuuqBdM/edit?usp=sharing
I think you're right.
Found this which shows no idle option 😢
Turning the device Off and On changes : airState.operation: from 0 to 1

"airState.operation": {
 "data_type": "enum",
 "default": "0",
 "value_mapping": {
   "0": "@operation_off",
   "1": "@operation_on"

Think it would be possible to utilize the values of
airState.humidity.current:60, & airState.humidity.desired:75, to set the HomeKit status as Idle
If airState.humidity.current is less than airState.humidity.desired set public.hap.characteristic.humidifier-dehumidifier.state.current to 1 ”Idle”?
Also found that the airState.miscFuncState.watertankLight:, value doesn't seem to change when the water tank is full / empty. Even tho the app sends a notification and the bucket full light turns on when full. Nothing changed in the debug log.
For the fan speed found:
"airState.windStrength":2, = Low
"airState.windStrength":6, = High
But as you mentioned public.hap.characteristic.rotation.speed utilizes 0-100% speed ranges.

I already request access to your drive, my email is<EMAIL_ADDRESS>for fan speed, I'll set it 3 state map to speed: 0 = AUTO, 1 = LOW, 2 = HIGH, but in homekit it may not showing AUTO, LOW, HIGH label (just scroll speed with 3 speed level: 0, 1, 2)

Done!

can you look into airState.opMode ?
normally opMode = 17, maybe it will change
   "airState.opMode": {
      "data_type": "enum",
      "default": "0",
      "value_mapping": {
        "0": "@AC_MAIN_OPERATION_MODE_COOL_W",
        "1": "@AC_MAIN_OPERATION_MODE_DRY_W",
        "2": "@AC_MAIN_OPERATION_MODE_FAN_W",
        "3": "@AC_MAIN_OPERATION_MODE_AI_W",
        "4": "@AC_MAIN_OPERATION_MODE_HEAT_W",
        "5": "@AC_MAIN_OPERATION_MODE_AIRCLEAN_W",
        "6": "@AC_MAIN_OPERATION_MODE_ACO_W",
        "7": "@AC_MAIN_OPERATION_MODE_AROMA_W",
        "8": "@AC_MAIN_OPERATION_MODE_ENERGY_SAVING_W",
        "9": "@AP_MAIN_MID_OPMODE_CLEAN_W",
        "10": "@AP_MAIN_MID_OPMODE_SLEEP_W",
        "11": "@AP_MAIN_MID_OPMODE_SILENT_W",
        "12": "@AP_MAIN_MID_OPMODE_HUMIDITY_W",
        "13": "@AP_MAIN_MID_OPMODE_CIRCULATOR_CLEAN_W",
        "14": "@AP_MAIN_MID_OPMODE_BABY_CARE_W",
        "15": "@AP_MAIN_MID_OPMODE_DUAL_CLEAN_W",
        "16": "@AP_MAIN_MID_OPMODE_AUTO_W",
        "17": "@AP_MAIN_MID_OPMODE_SMART_DEHUM_W",
        "18": "@AP_MAIN_MID_OPMODE_FAST_DEHUM_W",
        "19": "@AP_MAIN_MID_OPMODE_CILENT_DEHUM_W",
        "20": "@AP_MAIN_MID_OPMODE_CONCENTRATION_DRY_W",
        "21": "@AP_MAIN_MID_OPMODE_CLOTHING_DRY_W",
        "22": "@AP_MAIN_MID_OPMODE_IONIZER_W"
      },
      "label": "운전 모드"
    }

in v0.2.2-test.2 , I'll write debug log when opMode not equal 17, please update and check it

Updated the google sheet.
Columns 1-3 are new debug logs in the different states.
Idle (not running, no fan, is silent, app icon doesn't show water droplets) Smart status message
On (running, fan is on, not silent, app icon show water droplets), Smart status message
Off (not running, fan off, silent.) Operation Off status message
The app itself doesn't let me change the opMode from what I've found so far.
It remains set as 17 "Smart Mode" even when I turn the machine off via the LG app.
How does your plugin actually pull the status & control the device?
Does the device have it's own API that you're able to call? Similar to my TV (http://<IP_ADDRESS>:8001/api/v2/) or is it all in the cloud via an LG Thinq server?
I'm guessing in the cloud.
I have a feeling it has something to do with the increased network traffic to aic-service.lgthinq.com I've been seeing in PiHole.

yup, cloud only (not sure dehumidifier has own api)
I think you can use proxyman app to debug LG app, you can see all traffic

Hmm even proxyman seems to pull basically the same exact stuff as your debug logs.
I was curious, did you get lucky enough to be accepted as a partner?

https://thinq.developer.lge.com/en/cloud

nop, LG only accept partnership as business, I try before but no luck

Have a MD16GQSA1 dehumidifier available for testing. Let me know if/how I could help. I installed v0.2.2-test.10 and so far the status and settings for humidity target % plus current are working.
Logs show this repeatedly:
[homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Current Humidifier-Dehumidifier State': characteristic value 1 is not contained in valid values array. See https://git.io/JtMGR for more info.

Other functions available in the LG app for this model which I could gain data on if needed:

Mode (smart, jet, silent, spot, laundry)
Speed (high, low)
Ionizer (on, off)
Schedule

😮 I wish the US had that model.

Have a MD16GQSA1 dehumidifier available for testing. Let me know if/how I could help. I installed v0.2.2-test.10 and so far the status and settings for humidity target % plus current are working.
Logs show this repeatedly:
[homebridge-lg-thinq] This plugin generated a warning from the characteristic 'Current Humidifier-Dehumidifier State': characteristic value 1 is not contained in valid values array. See https://git.io/JtMGR for more info.

Other functions available in the LG app for this model which I could gain data on if needed:

Mode (smart, jet, silent, spot, laundry)
Speed (high, low)
Ionizer (on, off)
Schedule

yup, please install latest verison and turn on homebridge debug mode
you can see your device data, please upload here
@town3r I already added speed control via home app, did you try it ?

@nVuln here is my device data - https://gist.github.com/cknowles/7567a8e4553199e9b636d86ddb81ab33. Obfuscated a little as don't know the sec model for this.

Not seeing the speed control after updating and removing cached device.

Been looking for 7 hours now for a dehumidifier we can buy in the US that has any way of connecting to homekit. This is basically it. The only official homekit one is impossible to find in the US, the Xiaomi ones that have homebridge support are impossible to get in the US, the one where the guy created his own replacement mother board is impossible to find in the US, so I started looking at wifi dehumidifiers with a protocol shared amongst it's smart device lineup, and found LG's smartthinq.
Basically, THIS IS IT! You have the best, most working solution that doesn't require me to spend the time learning to write homebridge applications. So great work guys, you've come along way.
Now, that being said, it'd be great to see this get finished and for us to have a 100% working homekit dehumidifier option in the US.
Let me know if there's anything I can do to help. I'm ordering one right now. Thank you so much for all of this work. I promise you there will be thousands of people using this once it's completed.

What model did you end up getting?
Sadly the model I have just doesn't give the status of different things like if the tank is full or if it's actually on and running or it's just the fan or off waiting for it to get humid.

Tank is currently full and the light on the machine is on.
Current Debug logs from machine in state above:

"deviceType":403
"modelName":"DHUM_056905_WW"
"subModelNm":null
"sensorType":null
"alias":"Dehumidifier"
"deviceCode":"AI02"
"networkType":"02"
"tftYn":"N"
"guideTypeYn":"Y"
"guideType":"DHUM_TYPE1"
"pccModelYn":"N"
"autoOrderYn":"N"
"drServiceYn":"N"
"ssid":"Skynet"
"timezoneCode":"America/Chicago"
"timezoneCodeAlias":"USA/Chicago"
"sdsGuide":"{"deviceCode":"AI02"}"
"newRegYn":"N"
"remoteControlType":""
"fareTarget":null
"area":"331530"
"sleep":null
"deviceState":"E"
"rmsClientId":null
"regDtUtc":"20200810203648000"
"regIndex":0
"blackboxYn":"Y"
"groupableYn":"N"
"controllableYn":"N"
"combinedProductYn":"N"
"masterYn":"Y"
"snapshot":{"airState.windStrength":2
"airState.diagCode":0
"mid":286759479
"airState.miscFuncState.watertankLight":1
"airState.quality.sensorMon":1
"airState.humidity.current":65
"airState.operation":1
"airState.reservation.absoluteStopTime":0
"airState.wMode.humidification":0
"airState.humidity.desired":60
"timestamp":1630497188752
"airState.notification":256
"static":{"deviceType":"403"
"countryCode":"US"}
"airState.tempState.current":-20
"airState.miscFuncState.extraOp":0
"airState.miscFuncState.airRemoval":0
"airState.filterMngStates.desorption":0
"airState.reservation.absoluteStartTime":0
"airState.reservation.targetTimeToStart":0
"meta":{"allDeviceInfoUpdate":false
"messageId":"uMIt01K0Q7mc2jr_ADsQ3g"}
"online":true
"airState.opMode":17
"airState.reservation.targetTimeToStop":0
"airState.notificationExt":1}
"manufacture":null
"online":true
"platformType":"thinq2"

Empty Tank - Light off

"deviceType":403
"modelName":"DHUM_056905_WW"
"subModelNm":null
"sensorType":null
"alias":"Dehumidifier"
"deviceCode":"AI02"
"networkType":"02"
"tftYn":"N"
"guideTypeYn":"Y"
"guideType":"DHUM_TYPE1"
"pccModelYn":"N"
"autoOrderYn":"N"
"drServiceYn":"N"
"ssid":"Skynet"
"timezoneCode":"America/Chicago"
"timezoneCodeAlias":"USA/Chicago"
"sdsGuide":"{"deviceCode":"AI02"}"
"newRegYn":"N"
"remoteControlType":""
"fareTarget":null
"area":"331530"
"sleep":null
"deviceState":"E"
"rmsClientId":null
"regDtUtc":"20200810203648000"
"regIndex":0
"blackboxYn":"Y"
"groupableYn":"N"
"controllableYn":"N"
"combinedProductYn":"N"
"masterYn":"Y"
"snapshot":{"airState.windStrength":2
"airState.diagCode":0
"mid":289982786
"airState.miscFuncState.watertankLight":1
"airState.quality.sensorMon":1
"airState.humidity.current":60
"airState.operation":1
"airState.reservation.absoluteStopTime":0
"airState.wMode.humidification":0
"airState.humidity.desired":60
"timestamp":1630500336350
"airState.notification":256
"static":{"deviceType":"403"
"countryCode":"US"}
"airState.tempState.current":-17
"airState.miscFuncState.extraOp":0
"airState.miscFuncState.airRemoval":0
"airState.filterMngStates.desorption":0
"airState.reservation.absoluteStartTime":0
"airState.reservation.targetTimeToStart":0
"meta":{"allDeviceInfoUpdate":false
"messageId":"4wCBnQOZSJyIGTzhVeVJ3w"}
"online":true
"airState.opMode":17
"airState.reservation.targetTimeToStop":0
"airState.notificationExt":0}
"manufacture":null
"online":true
"platformType":"thinq2"

Unfortunately, the "airState.miscFuncState.watertankLight":1 doesn't change to match the current state of the hardware.
The app sends an alert similar to when the washer or dryer are done.

Also unfortunately the device icon in the LG app doesn't update with current tank state either.

how about airState.notificationExt ?
next time water tank is full, do not read notification on app, just empty it on device and restart, let see if airState.notificationExt changed or not

Unfortunately, the "airState.miscFuncState.watertankLight":1 doesn't change to match the current state of the hardware.
But I think you might be right.
From previous debug logs above
Tank Full & Light On "airState.notificationExt":1
Tank Empty & Light Off "airState.notificationExt":0
New test:
Full Tank alert = "airState.notificationExt":1
Didn't open app.
Emptied tank & restarted homebridge = "airState.notificationExt":0
I do have a feeling that the notification might also be triggered if the humidity level gets too high like in my previous screenshot. Can't easily test that. But next time i have it off for a while and that alert pops up, I'll see if i can remember to check the debug logs.
I did notice this "airState.notification":256 any idea what 256 is related to?

Think you could tie the tank Full / Empty state to the public.hap.characteristic.water-level for dehumidifiers?

”9.128 Water Level” (page 234)
Property: Value
UUID: 000000B5-0000-1000-8000-0026BB765291
Type: public.hap.characteristic.water-level
Permissions: Paired Read, Notify
Format: float
Minimum Value: 0
Maximum Value: 100
Step Value: 1
Unit: percentage

I did notice this "airState.notification":256 any idea what 256 is related to?

I guess this field is total notification of device, but maximum of this field is 1 byte = 256

I guess this field is total notification of device, but maximum of this field is 1 byte = 256
If you wanna test, try remove all notification and see
Thanks! Gave it a try but the value remains the same at 256. All good.

The model number I ordered is UD501KOJ5. Hopefully that is the same but I figured it should should the same protocol, even if the models are slightly different. I’ll see what happens when it arrives this Friday.

The model number I ordered is UD501KOJ5. Hopefully that is the same but I figured it should should the same protocol, even if the models are slightly different. I’ll see what happens when it arrives this Friday.

Ahh yup! That's the same one I got. It's been great so far. Kinda loud but as you said thanks to @nVuln it works with HomeKit.
HomeKit ALL THE THINGS!

Ahh yeah I had to clear the cached accessory.
Tho after that idk what happened but I ended up having to reset the Homebridge accessory itself and re-add everything. ¯_(ツ)_/¯
Side note: when full tank alert popped.
HomeKit updated w/ water tank 100%

As for the idle state.
If it's dehumidifying it looks like this and says lowering to XX%

Where if it's "idle" it just says Set to %

At least I'm guessing. Not sure if it normally says "Dehumidifying", "Idle", or "Inactive"


remaining data_array fields (color size lat lon etc)

There are probably like 30 <DataSelector> elements we need to think about. A good place to start is streambed/shelly/plotlyjs/static/plotlyjs/build/data-keys.json

doing this as part of adding all chart types


After my training using a third-party corpus, the robot was unable to answer accurately

I plan to use Chatterbot to build a chatbot. After training with a third-party corpus, MY questions cannot be answered accurately, and the error rate is almost 100%.   What kind of thing does he write to you?
Have a meal not
User----> What is light
hello
User----> Ray Bradbury
What's your name
User----> What is the heart of children
boring
User----> William Gibson
Have a meal not
User---->


Import views issues when restore

Hi, first of all, thank you very much for your hard work. I have been using the tool and its amazing.
But I have issues, when restore database with views by dependency errors (view does not exist). I fixed it adding code for create temporary tables as views (before to export views). I work it in version <IP_ADDRESS>
I trying it in the new version, and it have the same issues to import views.
PD: Sorry for my bad english XD.
PD2: I attach the source code
MySqlBackup.zip

Hi, I have downloaded the code that you uploaded. I can see that the following 2 new block of codes are added before export view to avoid the error of dependency views.
void Export_Tables_View()
{
	StringBuilder _sqlCreateTemporary;
	if (!ExportInfo.ExportViews || _database.Views.Count == 0)
		return;
	Export_WriteComment("");
	Export_WriteComment("Dumping tables temporary");
	Export_WriteComment("");
	textWriter.WriteLine();
	foreach (MySqlView view in _database.Views)
	{
		if (stopProcess)
			return;
		_sqlCreateTemporary = new StringBuilder();
		//_sqlCreateTemporary.AppendFormat("DROP TABLE IF EXISTS `{0}`;",view.Name);
		_sqlCreateTemporary.AppendFormat("SHOW CREATE TABLE `{0}`;", view.Name);

		QueryExpress.ExecuteScalarStr(Command, string.Format("DROP TABLE IF EXISTS `{0}`;", view.Name));
		QueryExpress.ExecuteScalarStr(Command, string.Format("CREATE TEMPORARY TABLE `{0}` AS SELECT * FROM `{0}` LIMIT 0,1;", view.Name));
		System.Data.DataTable dt = QueryExpress.GetTable(Command, _sqlCreateTemporary.ToString());
		foreach(System.Data.DataRow tmp in dt.Rows)
		{
			Export_WriteComment(string.Format("Dumping structure for {0}",view.Name));
			Export_WriteComment("Creating temporary table to overcome VIEW dependency errors");
			Export_WriteComment("");
			Export_WriteLine(ReFormatTableView(tmp["Create Table"].ToString()) + "; ");
			textWriter.WriteLine();
		}
		//QueryExpress.ExecuteScalarStr(Command, string.Format("DROP TABLE IF EXISTS `{0}`;",view.Name));
	}
}

string ReFormatTableView(string cText)
{
	cText = cText.Replace(" CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,", ",");
	cText = cText.Replace(" CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL", "");
	cText = cText.Replace(" COLLATE utf8_spanish_ci DEFAULT NULL,", ",");
	cText = cText.Replace(" COLLATE utf8_spanish_ci DEFAULT NULL", "");
	cText = cText.Replace(" unsigned NOT NULL DEFAULT 0,", ",");
	cText = cText.Replace(" unsigned NOT NULL DEFAULT 0", "");
	cText = cText.Replace(" unsigned NOT NULL,", ",");
	cText = cText.Replace(" unsigned NOT NULL", "");
	cText = cText.Replace(" NOT NULL DEFAULT 0.0000,", ",");
	cText = cText.Replace(" NOT NULL DEFAULT 0.0000", "");
	cText = cText.Replace(" NOT NULL DEFAULT 0.00,", ",");
	cText = cText.Replace(" NOT NULL DEFAULT 0.00", "");
	cText = cText.Replace(" COLLATE utf8_spanish_ci NOT NULL,", ",");
	cText = cText.Replace(" COLLATE utf8_spanish_ci NOT NULL", "");
	cText = cText.Replace(" CHARACTER SET utf8mb4 NOT NULL DEFAULT '',", ",");
	cText = cText.Replace(" CHARACTER SET utf8mb4 NOT NULL DEFAULT ''", "");
	cText = cText.Replace(" CHARACTER SET utf8mb4 DEFAULT NULL,", ",");
	cText = cText.Replace(" CHARACTER SET utf8mb4 DEFAULT NULL", "");
	cText = cText.Replace(" NOT NULL DEFAULT 0,", ",");
	cText = cText.Replace(" NOT NULL DEFAULT 0", "");
	cText = cText.Replace(" DEFAULT NULL,", ",");
	cText = cText.Replace(" DEFAULT NULL", "");
	cText = cText.Replace("ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_spanish_ci", "ENGINE=MyISAM");
	cText = cText.Replace("ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci", "ENGINE=MyISAM");
	cText = cText.Replace(" COLLATE utf8_spanish_ci,", ",");
	cText = cText.Replace(" COLLATE utf8_spanish_ci", "");
	cText = cText.Replace(" unsigned,", ",");
	cText = cText.Replace(" unsigned", "");
	cText = cText.Replace(" NOT NULL,", ",");
	cText = cText.Replace(" NOT NULL", "");
	cText = cText.Replace(" CHARACTER SET utf8,", ",");
	cText = cText.Replace(" CHARACTER SET utf8", "");
	cText = cText.Replace(" TEMPORARY", "");
	cText = cText.Replace(")mb4,", "),");
	cText = cText.Replace(")mb4", ")");
	return cText;
}

Can you provide examples that will repeat the view dependency error?
Thanks

Is it possible that "views", "functions" and "procedures" depend on each other?

Hi bro, sorry for late. I leave an example, showing these dependencies. It should be noted that the ReFormatTableView routine, I use to format the declarations of the fields because it throws me an error when importing them, since this one appears in MariaDB 10.2.16
TestDump 2018-07-14 114544.zip

Hi bro, sorry for late. I leave an example, showing these dependencies. It should be noted that the ReFormatTableView routine, I use to format the declarations of the fields because it throws me an error when importing them, since this one appears in MariaDB 10.2.16
TestDump 2018-07-14 114544.zip

Hi, bro I change code for this,

        void Export_Tables_View()
        {
            //StringBuilder _sqlCreateTemporary;
            if (!ExportInfo.ExportViews || _database.Views.Count == 0)
                return;
            Export_WriteComment("");
            Export_WriteComment("Dumping tables temporary");
            Export_WriteComment("");
            textWriter.WriteLine();
            foreach (MySqlView view in _database.Views)
            {
                if (stopProcess)
                    return;

                    Export_WriteComment(string.Format("Dumping structure for {0}", view.Name));
                    Export_WriteComment("Creating temporary table to overcome VIEW dependency errors");
                    Export_WriteComment("");
                    Export_WriteLine(ReFormatTableView(view.Name));
                    textWriter.WriteLine();
            }
        }

So:
 string ReFormatTableView(string cViewName)
        {
            StringBuilder cText = new StringBuilder();
            System.Data.DataTable hColumns = QueryExpress.GetTable(Command, string.Format("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='{0}' AND TABLE_SCHEMA='{1}'", cViewName,_database.Name));
            cText.AppendFormat("CREATE TABLE `{0}` (\r\n",cViewName);
            foreach(System.Data.DataRow rcol in hColumns.Rows)
            {
                cText.AppendFormat("`{0}` {1},\r\n", rcol["COLUMN_NAME"].ToString(), rcol["COLUMN_TYPE"].ToString());
            }
            cText.AppendLine(") ENGINE=MyISAM;");
            cText = cText.Replace(" CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,", ",");
            cText = cText.Replace(" CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL", "");
            cText = cText.Replace(" COLLATE utf8_spanish_ci DEFAULT NULL,", ",");
            cText = cText.Replace(" COLLATE utf8_spanish_ci DEFAULT NULL", "");
            cText = cText.Replace(" unsigned NOT NULL DEFAULT 0,", ",");
            cText = cText.Replace(" unsigned NOT NULL DEFAULT 0", "");
            cText = cText.Replace(" unsigned NOT NULL,", ",");
            cText = cText.Replace(" unsigned NOT NULL", "");
            cText = cText.Replace(" NOT NULL DEFAULT 0.0000,", ",");
            cText = cText.Replace(" NOT NULL DEFAULT 0.0000", "");
            cText = cText.Replace(" NOT NULL DEFAULT 0.00,", ",");
            cText = cText.Replace(" NOT NULL DEFAULT 0.00", "");
            cText = cText.Replace(" COLLATE utf8_spanish_ci NOT NULL,", ",");
            cText = cText.Replace(" COLLATE utf8_spanish_ci NOT NULL", "");
            cText = cText.Replace(" CHARACTER SET utf8mb4 NOT NULL DEFAULT '',", ",");
            cText = cText.Replace(" CHARACTER SET utf8mb4 NOT NULL DEFAULT ''", "");
            cText = cText.Replace(" CHARACTER SET utf8mb4 DEFAULT NULL,", ",");
            cText = cText.Replace(" CHARACTER SET utf8mb4 DEFAULT NULL", "");
            cText = cText.Replace(" NOT NULL DEFAULT 0,", ",");
            cText = cText.Replace(" NOT NULL DEFAULT 0", "");
            cText = cText.Replace(" DEFAULT NULL,", ",");
            cText = cText.Replace(" DEFAULT NULL", "");
            cText = cText.Replace("ENGINE=InnoDB CHARSET=utf8 COLLATE=utf8_spanish_ci", "ENGINE=MyISAM");
            cText = cText.Replace("ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci", "ENGINE=MyISAM");
            cText = cText.Replace(" COLLATE utf8_spanish_ci,", ",");
            cText = cText.Replace(" COLLATE utf8_spanish_ci", "");
            cText = cText.Replace(" unsigned,", ",");
            cText = cText.Replace(" unsigned", "");
            cText = cText.Replace(" NOT NULL,", ",");
            cText = cText.Replace(" NOT NULL", "");
            cText = cText.Replace(" CHARACTER SET utf8,", ",");
            cText = cText.Replace(" CHARACTER SET utf8", "");
            cText = cText.Replace(" TEMPORARY", "");
            cText = cText.Replace(")mb4,", "),");
            cText = cText.Replace(")mb4", ")");
            return cText.ToString();
        }

Hi, thanks for the code sharing.
I do notice something, let's take this line as example:
cText = cText.Replace(" COLLATE utf8_spanish_ci DEFAULT NULL,", ",");

It seems that it only limited to
utf8_spanish_ci

but there are many more other than "spanish"...
I think maybe this is not a universal solution.

Hi, thank you for your good work work und efforts in maintaining this useful library.
Most likely I ran into the same problem.
You asked for an example to reproduce the dependency error.
Let's assume you have a database with 3 views.
create or replace view v1 as select * from v2; create or replace view v2 as select * from v3; create or replace view v3 as select * from t;
View v1 is dependent on v2, and v2 on v3, and v3 is dependent on table t.
If you export this database and try to import the backup file you'll experience this error.
The already suggested solution might have some drawbacks, when views are empty so that the temporary tables might not be created with correct column definitions.
I would suggest a recursive solution. While you try to create all views you remember all views which failed to create and try again until all views have been created or the list of failed reports does not decrease.
Best regards

Hi!!
Yeah, was my mistake, tha section of replacement code is not necessary, because the sql code generated don't including it, only field definition. So, I thought that it's good solution.
Regards..

Hi together,
we ran in the same issue.
In our opinion the clearest way to fix this is to resolve the dependencies of a view and build the correct ordering for the export.
In principle, the solution is simple by just using "Topological Sort Algorithmen"
See: Wiki - Topological sorting
But how to figure out the dependent views:
Our solution is certainly not the best, but adequate for our current needs. We simply search the SQL for the occurrence of other view names and if we found any, that's the dependencies.
In code it looks like this:
void Export_Views()
{
	if (!ExportInfo.ExportViews || _database.Views.Count == 0)
		return;

	Export_WriteComment("");
	Export_WriteComment("Dumping views");
	Export_WriteComment("");
	textWriter.WriteLine();

	// ----------------------------------------------------
	// local func to determine the dependencies of one view
	IEnumerable<MySqlView> determineDependenciesFunc(MySqlView view)
	{
		return this._database.Views
			.Where(current => view.Name != current.Name) // filter ourself
			.Where(current => view.CreateViewSQLWithoutDefiner.Contains($"`{current.Name}`"));
	}
	// ----------------------------------------------------

	// Before: foreach (MySqlView view in this._database.Views)
	foreach (MySqlView view in this._database.Views.TopologicalSort(determineDependenciesFunc))
	{
		if (this.stopProcess)
			return;

		if (view.CreateViewSQL.Trim().Length == 0 ||
			view.CreateViewSQLWithoutDefiner.Trim().Length == 0)
			continue;

		this.Export_WriteLine(string.Format("DROP TABLE IF EXISTS `{0}`;", view.Name));
		this.Export_WriteLine(string.Format("DROP VIEW IF EXISTS `{0}`;", view.Name));

		if (this.ExportInfo.ExportRoutinesWithoutDefiner)
			this.Export_WriteLine(view.CreateViewSQLWithoutDefiner);
		else
			this.Export_WriteLine(view.CreateViewSQL);

		this.textWriter.WriteLine();
	}

	textWriter.WriteLine();
	textWriter.Flush();
}

For the topological sort we implement an extension method for IEnumerable (see Stackoverflow) :
internal static class EnumerableExtensions
{
	public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> nodes, Func<T, IEnumerable<T>> connected)
	{
		var dictionary = nodes.ToDictionary(node => node, node => new HashSet<T>(connected(node)));
		while (dictionary.Count > 0)
		{
			var current = dictionary.FirstOrDefault(x => x.Value.Count == 0);
			if (current.Key == null)
				throw new ArgumentException("Cyclic connections are not allowed");

			dictionary.Remove(current.Key);

			yield return current.Key;

			foreach (var connections in dictionary.Values)
				connections.Remove(current.Key);
		}
	}
}

What do you think about that solution?
Best regards kl1mm

Hi, can you guys download and try this build and provide feedback. Is this build solve the VIEW dependencies problem?
This is compiled in .NET Standard 2.0
[MySqlBackup.NET_Issue_21_Debug1.zip]
(https://github.com/MySqlBackupNET/MySqlBackup.Net/files/2553718/MySqlBackup.NET_Issue_21_Debug1.zip)

Not working for us:

Hi, here is the test fix. You may download this version and see if the problem with VIEW dependencies solved or not.
This build I have included a test for creating VIEWs dependencies environment.
The sample SQL script can be found in MySqlBackupTestApp.exe
Run the [MySqlBackupTestApp.exe] > [Main Menu] > [Test] > [Export / Import VIEW with Dependencies within VIEWs]
This is compiled in .NET Standard 2.0
MySqlBackup.NET_Issue_21_Debug2.zip

In the build-debug2 (the DLL attached above), I have adopted FranksDevRepo suggestion:

I would suggest a recursive solution. While you try to create all views you remember all views which failed to create and try again until all views have been created or the list of failed reports does not decrease.

that performs loop to create all the the views one by one until all succeed or fail. Here is the code that I have modified:
The following block is the execution of SQL into database, but before executing the SQL, I have tried to capture any "CREATE VIEW" SQL command into a temporary DICTIONARY (_dicImportView).
void Import_AppendLineAndExecute(string line)
{
    _sbImport.AppendLine(line);
    if (!line.EndsWith(_delimiter))
        return;

    string _importQuery = _sbImport.ToString();

    bool skipexecute = false;
    if (_importQuery[0].ToString().ToUpper() == "C")
    {
        string _iq = _importQuery.ToLower();
        if (_iq.StartsWith("create "))
        {
            string[] splitoption = new string[] { " as " };
            string[] _saq = _iq.Split(splitoption, 1, StringSplitOptions.RemoveEmptyEntries);
            if (_saq[0].Contains(" view"))
            {
                _dicImportView[_importQuery] = false;
                skipexecute = true;
            }
        }
    }

    if(!skipexecute)
    {
        _mySqlScript.Query = _importQuery;
        _mySqlScript.Delimiter = _delimiter;
        _mySqlScript.Execute();
    }

    _sbImport.Clear();
    _sbImport = new StringBuilder();
    GC.Collect();
}

After all other SQL finished executing into database, then performs the creation of VIEW in a loop in attempt to create the VIEW one by one:
void Import_View()
{
    bool excutedOnce = true;

    Dictionary<string, Exception> _dicViewErr = new Dictionary<string, Exception>();

    while (excutedOnce)
    {
        excutedOnce = false;
        string lastExecutedView = "";

        foreach (var kv in _dicImportView)
        {
            if (kv.Value)
                continue;

            if (stopProcess)
            {
                processCompletionType = ProcessEndType.Cancelled;
                break;
            }

            _mySqlScript.Query = kv.Key;
            _mySqlScript.Delimiter = _delimiter;

            try
            {
                _mySqlScript.Execute();
                excutedOnce = true;
                lastExecutedView = kv.Key;
                if (_dicViewErr.ContainsKey(kv.Key))
                {
                    _dicViewErr.Remove(kv.Key);
                }
                break;
            }
            catch(Exception ex)
            {
                _dicViewErr[kv.Key] = ex;
            }
        }

        if (lastExecutedView.Length > 0)
        {
            _dicImportView[lastExecutedView] = true;
        }
    }

    if (_dicViewErr.Count > 0)
    {
        foreach(var kv in _dicViewErr)
        {
            _lastError = kv.Value;
            if (ImportInfo.IgnoreSqlError)
            {
                if (!string.IsNullOrEmpty(ImportInfo.ErrorLogFile))
                {
                    File.AppendAllText(ImportInfo.ErrorLogFile, Environment.NewLine + Environment.NewLine + kv.Value.ToString());
                }
            }
            else
            {
                StopAllProcess();
                throw kv.Value;
            }
        }
    }
}

Here is CS file of MySqlBackup.cs
MySqlBackup.zip

I think kl1mm suggestion is also good. The topology attempt can be included in the next release so that the VIEW will be created in a better order.

Hi together,
we ran in the same issue.
In our opinion the clearest way to fix this is to resolve the dependencies of a view and build the correct ordering for the export.
In principle, the solution is simple by just using "Topological Sort Algorithmen"
See: Wiki - Topological sorting
But how to figure out the dependent views:
Our solution is certainly not the best, but adequate for our current needs. We simply search the SQL for the occurrence of other view names and if we found any, that's the dependencies.
In code it looks like this:
void Export_Views()
{
	if (!ExportInfo.ExportViews || _database.Views.Count == 0)
		return;

	Export_WriteComment("");
	Export_WriteComment("Dumping views");
	Export_WriteComment("");
	textWriter.WriteLine();

	// ----------------------------------------------------
	// local func to determine the dependencies of one view
	IEnumerable<MySqlView> determineDependenciesFunc(MySqlView view)
	{
		return this._database.Views
			.Where(current => view.Name != current.Name) // filter ourself
			.Where(current => view.CreateViewSQLWithoutDefiner.Contains($"`{current.Name}`"));
	}
	// ----------------------------------------------------

	// Before: foreach (MySqlView view in this._database.Views)
	foreach (MySqlView view in this._database.Views.TopologicalSort(determineDependenciesFunc))
	{
		if (this.stopProcess)
			return;

		if (view.CreateViewSQL.Trim().Length == 0 ||
			view.CreateViewSQLWithoutDefiner.Trim().Length == 0)
			continue;

		this.Export_WriteLine(string.Format("DROP TABLE IF EXISTS `{0}`;", view.Name));
		this.Export_WriteLine(string.Format("DROP VIEW IF EXISTS `{0}`;", view.Name));

		if (this.ExportInfo.ExportRoutinesWithoutDefiner)
			this.Export_WriteLine(view.CreateViewSQLWithoutDefiner);
		else
			this.Export_WriteLine(view.CreateViewSQL);

		this.textWriter.WriteLine();
	}

	textWriter.WriteLine();
	textWriter.Flush();
}

For the topological sort we implement an extension method for IEnumerable (see Stackoverflow) :
internal static class EnumerableExtensions
{
	public static IEnumerable<T> TopologicalSort<T>(this IEnumerable<T> nodes, Func<T, IEnumerable<T>> connected)
	{
		var dictionary = nodes.ToDictionary(node => node, node => new HashSet<T>(connected(node)));
		while (dictionary.Count > 0)
		{
			var current = dictionary.FirstOrDefault(x => x.Value.Count == 0);
			if (current.Key == null)
				throw new ArgumentException("Cyclic connections are not allowed");

			dictionary.Remove(current.Key);

			yield return current.Key;

			foreach (var connections in dictionary.Values)
				connections.Remove(current.Key);
		}
	}
}

What do you think about this solution?
Best regards kl1mm

Hi kl1mm, are you able to re-code this part to be compatible with .NET Framework 2.0 by taking out the LINQ?

A new version of this library is released. It's not only support dependencies within VIEWs, it supports dependencies among Procedures, Functions and Views.

Hi kl1mm, thank you very much for the code. I will take some time to study it and patch it to the library.
You may use the library with or without IgnoreSqlError=true, it will import the dependency VIEWs/Functions/Procedures. If you encounter any error, you may share the error message here.

Hi all, a new version (v2.3) is released, where this problem is resolved. You may try it out.


Index type assertion on class member destroys syntax highlightning

class A {
    public props = {} as {};
    public a: string;
}

The second public keyword is not being highlighted in blue.

This issue was moved to Microsoft/TypeScript-TmLanguage#59


Duplicate README

Both Readme.MD and README.md exist, which causes a problem on checkout since one overwrites the other.

Fixed in 1877e9e19a4fd9026cfa3e3bad64ede1bdb2194c.


standardize config and app setup; rename cmd/pds to cmd/laputa

We had discussed these changes briefly. Probably worth a one-over.
I'm fairly opinionated about using the DATABASE_URL convention, don't care as much about the other variables.

Updated the DATABASE_URL helper to accept the sqlite= and postgres= (DSN) syntax from before. I don't have test coverage for this, but did test all the variations locally. Will end up with test coverage when I add postgres tests in CI.
@whyrusleeping said in slack "other than that it seems good"

I merged and pushed this, the ordering was weird and github was confused and marked as closed.


feat: undo manager

Description
Undo manager.
Undo/Redo availability notification in Copilot will be added after implementing 2way communication with plugin.
Fixes #2
Type of change

[ ] Bugfix
[x] Feature

Checklist

[x] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
[x] I have added a description following the guideline.
[x] The issue is created in the corresponding repository and I have referenced it.
[x] I have added tests to ensure my change is effective and works as intended.
[x] New and existing tests are passing locally with my change.
[x] I have performed self-review and corrected misspellings.

Additional for Feature type of change

[x] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

In general, it works however it stops if you modify the code. You cannot undo anymore

In general, it works however it stops if you modify the code. You cannot undo anymore

Yes, that by purpose not to affect user changes. Final solution after 2-way plugin communication would be to disable undo/redo on Copilot if not possible.

Not sure this approach would work with formatter plugins that update files after saving.

Not sure this approach would work with formatter plugins that update files after saving.

This is a good point, I could not find an option in VS Code  (maybe I was blind to see it) other than installing a separate extension for auto-formatting?
You can always use the hotkey to format, but in that case the document is locked so the undo/redo should happen before you can use formatting hotkey.
Can we test this somehow? Or need to be tested with external plugin like Prettier Code Formatter extension?

Not sure this approach would work with formatter plugins that update files after saving.

Yes, that is the same problem we have with IntelliJ plugin, on save actions are causing undo redo issues. Not solved yet.

Follow up https://github.com/vaadin/copilot-internal/issues/2102


Fix upload content instead of directory

Sorry I ended up working on https://github.com/lyft/flytekit/pull/41 fixing the same issue. :(


ripgrep: 12.0.0 -> 12.0.1

https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md#1201-2020-03-29

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Tested and works on Linux x86_64.


[$250] [#Wave-Control - Add Sage Intacct] Non-reimbursable options text turns gray when clicked

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.6-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Issue found when executing PR https://github.com/Expensify/App/pull/43776
Action Performed:

Navigate to https://staging.new.expensify.com/
Log in with the expensifail account
Navigate to Workspace settings - More features
Enable "Accounting"
Navigate to Accounting - Export - Export non-reimbursable expenses as
Click on "Credit card transactions"
Click on "Vendor bills"
Close the RHP
Navigate to Accounting - Export - Export non-reimbursable expenses as
Click on "Vendor bills"
Click on "Credit card transactions"

Expected Result:
The text should stay white
Actual Result:
Non-reimbursable options text turns gray when clicked. Only the first click makes the color change after opening the RHP. Clicking on the other option isn't changing the color
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/c62acda9-fcb2-4f07-aa4d-47c7dba55999
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~010028a93d94af7536
Upwork Job ID:<PHONE_NUMBER>455645006
Last Price Increase: 2024-07-11
Automatic offers:

allgandalf | Reviewer | 103079311

Issue OwnerCurrent Issue Owner: @allgandalf

@blimpich  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Added to the appropriate project so that the project organizer can triage, but this seems very low-priority to me since its just slightly off text color and in a place where exceedingly few customers will see in the next year.
Unassigning as well.

cc @yuwenmemon if you are handling it as well?
@blimpich its good to always find the project leader as well and ping them here or send a DM so they are aware and it does not slip through the cracks (there is many issues in the waave-control project)

@war-in Can you have a look at this one?

@yuwenmemon I'm currently looking 👀 The thing is connected with PressableWithFeedback component.
We use OpacityView there and set dimming when item is pressed. It works correctly on mobile (checked on android) but breaks on web.
What I found is that onPressOut is not triggered just after onPressIn function. That's why the pressed component is dimmed.
https://github.com/Expensify/App/assets/61014013/04abef47-0181-4557-a937-7874164fe396

This was caused during our review process of https://github.com/Expensify/App/pull/44739 (https://github.com/Expensify/App/pull/44739#issuecomment-2219455613). Since we already had an issue for this, let's push https://github.com/Expensify/App/pull/44739 forward.
Please assign me to this issue @yuwenmemon

I found the root cause of the issue! It was wrong handleMouseUp prop in BaseListItem component.
Fortunately, it's already fixed on main branch 🎉
I think issue can be closed now :)

Yes I can confirm that this issue is fixed 🎉. We can close it then 😄
https://github.com/Expensify/App/assets/16502320/983e0137-e9fe-491e-b59a-3f6a8c75032c

Excellent!


htmlgen broken?

With the latest database build it produces the following output;
--------------------------------------------
Loading tilegrid.


[Monitor] az monitor action-group: Support event hub receiver

Closes https://github.com/Azure/azure-cli/issues/20371

Description

Testing Guide

--action eventhub NAME SUBSCRIPTION_ID EVENTHUBNAMESPACE EVENTHUBNAME [usecommonalertschema]

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Monitor


Lingering Shape site location map not displaying

After classifying lingering shape videos, instead of seeing the site location map, I just get a broken image icon.

Fixed in 99769a3d34f37406ddcc814234556d523095fe3f

Same problem again for lingering shape part 2.

And for current DryLake data too!

The second lingering shape group is fixed. Dry Lake appears to have a different issue with getting the map. Still working on it.

I'm now not getting maps for either lingering shape or dawn bird -- I haven't had any dry lake videos in a while, can't comment on that.

@jwidness, the maps are fixed. The most recent issue with them was my mistake when working on the site this weekend, but it's fixed now.


Change the encoded batchPosition to uint64_t (#2943)

Initially, the encoded batchPosition was uint32_t the max batch row is 64k. However, some testrequire larger batch size. So this commit changes the encoded batchPosition to uint64_t.

Initially, the encoded batchPosition was uint32_t the max batch row is 64k. However, some testrequire larger batch size. So this commit changes the encoded batchPosition to uint64_t.


LGBMTuner GPU support

When training model in vanilla LGBM you could specify the target device to be GPU
model = LGBMClassifier(
    device="gpu",
)

However, when running the model with LGBMTuner I do not see such option. Upon launch of the fit() - CPU utilization spikes to 100%.. Is there any way to make the program utilize GPU? Could you document it?

Thank you for a great comment. Just added GPU support.
At init you can specify the device_type keyword argument as of of the following: 'cpu', 'gpu', 'cuda', 'cuda_exp'
tuner = LGBMTuner(metric = 'auc', device_type = 'gpu')

Just update the package to a latest 3.3.0 version:
$ pip install --upgrade verstack


Command line  string concatenation

Contains
Fixes the LGTM "Command line is built with string concatenation" described in #3510.
A simple switch from string concatenation to using an array of strings as recommended here has been made.
How to test
Start the game and go to the "Module Details" screen while creating a game using the Advanced option. Find the only usage of UIButtonWebBrowser when clicking "Open in browser". This should work as expected with the fix.
Side note: Clicking the "Module Details" button doesn't open up the module details screen when no module from the list is selected, producing this error:
java.lang.NullPointerException: null
	at org.terasology.rendering.nui.layers.mainMenu.advancedGameSetupScreen.AdvancedGameSetupScreen.lambda$null$13(AdvancedGameSetupScreen.java:493)

This pull request fixes 3 alerts when merging 72e6e1cde503ea488458b459044a01be838497ed into 9118708ad3f34f0bc05572fe54ad47538c3164bb - view on LGTM.com
fixed alerts:

3 for Building a command line with string concatenation

Comment posted by LGTM.com

Closing since this has already been fixed in #3512


vue-cli-service build --name some-component --entry ./packages/index.js --target lib

What problem does this feature solve?
this command not let vue.config.js work,i add some setting to drop_console
configureWebpack(config) {
if (process.env.NODE_ENV === 'production') {
const terserWebpackPlugin = config.optimization.minimizer[0];
const terserOptions = terserWebpackPlugin.options.terserOptions;
terserOptions.compress["warnings"] = false;
terserOptions.compress["drop_console"] = true;
terserOptions.compress["drop_debugger"] = true;
terserOptions.compress["pure_funcs"] = ['console.log']
}
}
What does the proposed API look like?
vue-cli-service build

but i use the command:vue-cli-service serve --mode=production has work,did the --target lib no use the vue.config.js,if i require use webpack plugin in the env of  --target lib,can i take what method to slove the problem.

I can't really follow your description. What's not working? terser is not picking up your changed options when building as a library?
We would need a reproduction to understand what's going on, so please provide one.

I know the seeting is work in the umd
https://cli.vuejs.org/guide/build-targets.html#library
office say ： dist/myLib.common.js: A CommonJS bundle for consuming via bundlers (unfortunately, webpack currently does not support ES modules output format for bundles yet)
only the umd.min.js is work

package.json    is "main": "dist/vuedraggable.umd.min.js", not "main": "dist/vuedraggable.umd.js"


Enhancement Request for MonthCalendar

First of all, I really love the Calendar add-on.  I am currently using it on a client project.  I would like to to ask if it is possible to add navigation buttons on top of the MonthCalendar to move back and forth by month.  Thanks and keep up the great work!

Hello. I think that InlineDatePicker (added in v2.1.0) fits that description.

https://addonsv23-staging.flowingcode.com/year-month-calendar/inline-date-picker

Ahhh,...thank you.  Let me try it.
On Wed, Aug 10, 2022 at 5:04 AM Javier Godoy @.***>
wrote:

Hello. I think that InlineDatePicker (added in v2.1.0) fits that
description.
[image: image]
https://user-images.githubusercontent.com/11554739/183895944-444c47f5-a3b8-4fe7-b71d-9110de77c8c7.png
https://addonsv23-staging.flowingcode.com/year-month-calendar/inline-date-picker
—
Reply to this email directly, view it on GitHub
https://github.com/FlowingCode/YearMonthCalendarAddon/issues/17#issuecomment-1210579089,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACIXSWMIB6KKOBCUBFNN4LLVYOLFVANCNFSM56C6V5YQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

--
Regards,
Allen

I'm closing this issue as the requested feature is already implemented. Feel free to create a new issue in case you find any bugs or missing features.


Update docker-compose.yml

Checklist:

[ ] My pull request has a descriptive title. (unlike Update index.md). Check this guide regarding titles.
[ ] If applicable, I have tested these changes.

Closes #XXXXX

Sorry Christian,
Meant to push to my own fork and not to yours sorry for the inconvenience.
Best wishes,
Elliott
On Thu, 25 May 2023 at 13:43, Christian Lempa @.***>
wrote:

Closed #70 https://github.com/ChristianLempa/boilerplates/pull/70.
—
Reply to this email directly, view it on GitHub
https://github.com/ChristianLempa/boilerplates/pull/70#event-9339678632,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AROTPJFWZIPBDNNVTMBOGB3XH5HVJANCNFSM6AAAAAAYAMORIQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Ah that makes a lot more sense ;) don’t worry mate, mistakes happen


Profile feed changes

[x] Add a searchable string filter
[ ] Add sorting capability (preserve pagination)
Sort by publication date
Sort by number of comments
Sort by number of ratings

searchable string filter - 89d0d0ef4fd50eaf19df61ce55b98f176a4d28eb

sorting capability - 705f200182d1a3278b1654f99ac000d4a722ef21


BatchWriter flushing?

I would like to see a method to flush the batch writer immediately and await until it's flushed.
Knowing the data is flushed to Influx can be important when copying data between 2 different retention policies.
We are trying to implement a 'quarantine' feature, where we can highlight data ranges that need to be kept indefinitely.

I need this too. Either I do not understand how batchWriter should be used, or nobody until now cared if points sent to the writer were actually written into InfluxDB. When I close my application last several points are not written. Please advise. Thanks.

@AlecsandruDuma I ended up making my own batch writer, unfortunately it's not open source and I can't make it open source. However, it was fairly trivial.

I simply didn't need it so far, so I didn't implement that initially as a part of the BatchWriter. If you need it asap, I'll welcome a PR. But I won't be able to push a new release of the lib in the next 1-2 months because I'm busy with some other things. If you can wait, I'll add it for the next release myself.
Currently the batch writer simply flushes every XY milliseconds and doesn't handle any tails. You can either ensure in your app that you "wait" for that amount of MS before actually killing your app, or add a .StopAndFlush() to the library and I'll merge it in when I have the time.
And the BatchWriter will probably require implementation of IDisposable so the .StopAndFlush() gets called automatically.


Regular expressions in function Clickhouse

Hello. study ClickHouse. I am interested in the syntax of regular expressions. For example, I need to find string that contain character '2' followed by '3' or '4'. Has tried: '\2[3-4]' not particularly helps. Maybe someone can help, thank you.

select x, match(x, '2[3-4]') as match from (select arrayJoin(['12345', '224', '125432']) x)

┌─x──────┬─match─┐
│ 12345  │     1 │
│ 224    │     1 │
│ 125432 │     0 │
└────────┴───────┘

We use re2 syntax that is limited version of PCRE:
https://clickhouse.yandex/docs/en/query_language/functions/string_search_functions/#match-haystack-pattern