feat: cache and verify downloaded archive

This PR saves us time on CI and gives more confidence that downloaded archive is valid:

:recycle: retries twice before failing to download (replaced node-fetch with got)
:card_file_box:  adds caching of downloaded archives

right now go-ipfs download slows down each build of ipfs-desktop
electron, electron-builder and even our own aegir already do this type of caching for big third-party downloads
faster install and CI will provide additional incentive for people to migrate from go-ipfs-dep (https://github.com/ipfs/npm-go-ipfs-dep/issues/45)

:stop_sign: adds pre-commit hook to protect against commiting real binary to git
:detective: downloads .sha512 manifest and compares it with sha512 of downloaded archive

Demo: caching and verifying in action
First time downloads archive to the cache:
Downloading https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz to /home/lidel/.cache/npm-go-ipfs
Downloaded https://dist.ipfs.io/go-ipfs/v0.7.0/go-ipfs_v0.7.0_linux-amd64.tar.gz
Downloading go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512
Downloaded go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512
Verifying go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512
OK (1d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086)
Unpacked /home/lidel/project/ipfs/npm-go-ipfs
Linking /home/lidel/project/ipfs/npm-go-ipfs/go-ipfs/ipfs to /home/lidel/project/ipfs/npm-go-ipfs/bin/ipfs

Second time reused archive from the cache:
https://dist.ipfs.io/go-ipfs/versions
Found /home/lidel/.cache/npm-go-ipfs/go-ipfs_v0.7.0_linux-amd64.tar.gz
Verifying go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512
OK (1d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086)
Unpacked /home/lidel/project/ipfs/npm-go-ipfs
Linking /home/lidel/project/ipfs/npm-go-ipfs/go-ipfs/ipfs to /home/lidel/project/ipfs/npm-go-ipfs/bin/ipfs

Note that SHA512 is compared on every run.
If a single bit was flipped, it will return an error:
Found /home/lidel/.cache/npm-go-ipfs/go-ipfs_v0.7.0_linux-amd64.tar.gz
Verifying go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512
Expected   SHA512: 2d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086
Calculated SHA512: 1d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086
Error: SHA512 of /home/lidel/.cache/npm-go-ipfs/go-ipfs_v0.7.0_linux-amd64.tar.gz' (1d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086) does not match expected value from /home/lidel/.cache/npm-go-ipfs/go-ipfs_v0.7.0_linux-amd64.tar.gz.sha512 (2d5910f27e8d7ea333145f15c6edcbacc1e8db3a99365f0847467bdfa7c73f4d7a05562e46be8e932056c8324ed0769ca1b6758dfb0ac4c2e1b6066b57c4a086)
    at cachingFetchAndVerify (/home/lidel/project/ipfs/npm-go-ipfs/src/download.js:67:11)

cc @andrew

@achingbrain as agreed, I've updated tests and removed dead code ported from npm-go-ipfs-dep + added git workflow to run npm test on PRs.
I'm merging this, so the cache is included when  0.9.0 ships.


Investigate RISC-V DV coverage holes

estimate 4
remaining 2022-11-11 2

Many coverage holes reported in bitmanip instructions but they are clearly present in the logs, so likely bug rather than coverage hole.
Excluding bitmanip coverage is very high but remaining holes should be looked at to ensure no vital behaviour has been missed.

Bitmanip coverage fixed by https://github.com/google/riscv-dv/pull/910

Further investigation complete and written up at https://github.com/lowRISC/ibex/issues/1926 and https://github.com/lowRISC/ibex/issues/1925


Support methods accepting Exception

Hi, thanks for a great tool!
However it doesn't play that nicely with a logging method accepting Exception, such as TelemetryClient.TrackException(Exception).
Here's my current workaround:
    telemetryClient.TrackException(new Exception(context.Exception.ToAsyncString()));

But could be there a better way? For instance, reconstruct the actual, initial type of the exception.

Yes, I can see that could be a problem. Unfortunately the current public API of Application Insights doesn't seem to allow using this library. However the SDK is open-source, so you could open an issue there:
https://github.com/Microsoft/ApplicationInsights-dotnet
Looking at their code (ExceptionConverter class), they convert exceptions into their own serializable data format. They go through the StackFrames. I think you could probably ask for an extensibility point there, to either filter frames or provide the entire serialized structure.
I would not use the workaround you suggested, as it puts the entire stack trace into the exception's Message property. I imagine the formatting on AI's website would not be great.

A possible solution is to create a new subclass from Exception, override StackTrace property and return async friendly stacktrace. Something like StackTraceExtensions.ToAsyncFriendlyException(exception)

@Giorgi good shot! The only drawback is that the initial exception type is missing now.

@abatishchev We can pass the initial exception as an inner exception so detailed info will be available too. We can also include exception type in message for the new exception.

This is near-to-exactly what I'm doing so just decided to check any other options if any.

@Giorgi, that won't work for Application Insights because they use the StackTrace class to break down the stack frames and not the StackTrace property.

Bummer. Could you please suggest the best approach so far?

I was just writing a comment... I don't think it can be done. Especially in App Insights.


Investigate if we should connect Kupo to Ogmios or cardano-node

Arguments for cardano-node:

it's faster (as claimed by Matthias)
Ogmios will become optional
Arguments for Ogmios:
TBD

One possible argument for Ogmios is it may help with situations where tx's are submitted to ogmios but kupo isn't yet aware of them. This is purely hypothetical

Direct connection to cardano-node seems to work well and we haven't observed any problems with that.


IllegalStateException accessing state in non-AWT thread

Describe the bug
It is unclear how robustly Compose for Desktop allows for accessing state from non-UI threads. Often, it just works. But other times, it does not.
The compose snapshot system is supposed to be thread-safe. However, Swing/AWT is designed for all UI operations to occur on a single thread. My abstract understanding, which may be flawed, is that Desktop Compose creates a "safety layer" so that users can access state from any thread, and the underlying library will ensure that all AWT/Swing operations occur on the UI thread. I cannot find documentation on this, but this is how it seems to work 90-99% of the time. Occasionally, however, it just doesn't work and we get an exception like:
Click here to expand stack trace

Caused by: java.lang.IllegalStateException: Method should be called from AWT event dispatch thread
at org.jetbrains.skiko.SkiaLayer.needRedraw(SkiaLayer.awt.kt:517)at androidx.compose.ui.scene.skia.WindowSkiaLayerComponent.onComposeInvalidation(WindowSkiaLayerComponent.desktop.kt:110)
at androidx.compose.ui.scene.ComposeSceneMediator.onComposeInvalidation(ComposeSceneMediator.desktop.kt:465)
at androidx.compose.ui.scene.ComposeContainer$createComposeScene$1.invoke(ComposeContainer.desktop.kt:254)
at androidx.compose.ui.scene.ComposeContainer$createComposeScene$1.invoke(ComposeContainer.desktop.kt:254)
at androidx.compose.ui.scene.BaseComposeScene.invalidateIfNeeded(BaseComposeScene.skiko.kt:100)
at androidx.compose.ui.scene.BaseComposeScene$snapshotInvalidationTracker$1.invoke(BaseComposeScene.skiko.kt:57)
at androidx.compose.ui.scene.BaseComposeScene$snapshotInvalidationTracker$1.invoke(BaseComposeScene.skiko.kt:57)
at androidx.compose.ui.node.CommandList.add(SnapshotInvalidationTracker.skiko.kt:130)
at androidx.compose.ui.node.SnapshotInvalidationTracker$snapshotObserver$1.invoke(SnapshotInvalidationTracker.skiko.kt:75)
at androidx.compose.ui.node.SnapshotInvalidationTracker$snapshotObserver$1.invoke(SnapshotInvalidationTracker.skiko.kt:71)at androidx.compose.runtime.snapshots.SnapshotStateObserver.sendNotifications(SnapshotStateObserver.kt:83)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.access$sendNotifications(SnapshotStateObserver.kt:43)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$applyObserver$1.invoke(SnapshotStateObserver.kt:50)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$applyObserver$1.invoke(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotKt.advanceGlobalSnapshot(Snapshot.kt:1816)
at androidx.compose.runtime.snapshots.SnapshotKt.advanceGlobalSnapshot(Snapshot.kt:1831)
at androidx.compose.runtime.snapshots.SnapshotKt.access$advanceGlobalSnapshot(Snapshot.kt:1)
at androidx.compose.runtime.snapshots.GlobalSnapshot.notifyObjectsInitialized$runtime(Snapshot.kt:1360)
at androidx.compose.runtime.snapshots.Snapshot$Companion.notifyObjectsInitialized(Snapshot.kt:567)
at androidx.compose.runtime.DerivedSnapshotState.currentRecord(DerivedState.kt:246)at androidx.compose.runtime.DerivedSnapshotState.getValue(DerivedState.kt:269)
at matt.launch.proctool.ProcessToolCli$run$1$1$1$1.invokeSuspend(proctool.kt:141)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:811)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:715)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:702)

This stack trace is from a real application, not a test or a reproducer. I have spent a long time trying to create a reproducer, but I have to give up because I just cannot cause this error to happen again.
If I keep running the application and trying to repeat the steps that caused the above error, I cannot reproduce it.
Furthermore, I have tried to reproduce this by creating a minimal reproducer. I think that this error is caused by something having to do with accessing state from a different thread, so I tried to create a reproducer for this.
Click here to see (failed) reproducer code

import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import kotlin.random.Random
import kotlin.time.Duration.Companion.milliseconds

fun main() {
    var number by mutableStateOf(0)
    var number2 by mutableStateOf(500)
    val text by derivedStateOf {
        number2++
        number.toString()
    }
    val text2 by derivedStateOf { number2.toString() }
    var jitterBase by mutableStateOf<Int?>(null)
    val slowDerived by derivedStateOf {
        Thread.sleep(200)
        number.toString()
    }
    var slowDerivedDest by mutableStateOf<String>("")
    application {
        Window(
            onCloseRequest = ::exitApplication
        ) {
            LaunchedEffect(Unit) {
                withContext(Dispatchers.IO) {
                    launch {
                        while (true) {
                            delay(100.milliseconds)
                            number = text.toInt() + 1
                            jitterBase?.let {
                                window.setLocation(it + Random.nextInt(-5, 5), window.y)
                            }
                        }
                    }
                    launch {
                        while (true) {
                            delay(100.milliseconds)
                            slowDerivedDest = slowDerived
                        }
                    }
                }
            }
            Column {
                Text(text)
                Text(text2)
                Button(
                    onClick = {
                        jitterBase = if (jitterBase == null) window.x else null
                    }
                ) {
                    Text("Toggle Jitter")
                }
                Text(slowDerivedDest)
            }
        }
    }
}

This code failed to reproduce the bug. Even though I modify UI state at a very fast rate from multiple non-UI threads, I get no exceptions. Therefore, this is a deeper issue. Whatever caused the above exception is one issue, but possibly a smaller and more contained one. A possibly more meta issue here is that Desktop Compose users cannot predict when accessing state from non-UI threads is bad and when it is not.
I have tried to dig into the machinery. I read through some of the implementations along the stack trace in the exception above. I also tried to use a debugger. I was able to gather a bit of hopefully useful information, but it is not much.
I learned that a lot of the code in the deepest layers (SwingSkiaLayerComponent, ComposeSceneMediator, for example) seems to usually run at regular intervals to render frames. This frame rendering always occurs on the UI thread.
However, the compose notification machinery somehow allows non-UI threads to "leak" into these same operations which usually only run in the UI frame-rendering loop.
One potentially important observation I made is that in my reproducer, when I placed a breakpoint in Snapshot.kt#advanceGlobalSnapshot at the line that says val observers = applyObservers, I found that this line never executed in my reproducer. This means that whenever the global snapshot was advanced in my reproducer, the global snapshot had not been modified. If you look closely at the stacktrace from when the exception was thrown, you will see that the code entered this block, and therefore the global snapshot had been modified. I could not figure out how to reproduce the particular situation of calling "advanceGlobalSnapshot" with a modified global snapshot state, but perhaps this has something to do with the issue.
Another potentially important observation I made is that the error "Method should be called from AWT event dispatch thread" is called from skiko code, not on awt code. SkiaLayer.needsRedraw is the precise method that threw an exception. I was curious about exactly what UI operation was being done if the thread were to continue, so I looked into Redrawer.needRedraw.  needRedraw has many implementations, but I checked MetalRedrawer just as an example. I see it calls frameDispatcher.scheduleFrame, and all that this scheduleFrame function does is send a signal to another coroutine which likely is drawing frames in the proper frame.
Therefore, if my understanding is correct, at least for the MetalRedrawer implementation the exception thrown from SkiaLayer.needsRedraw probably isn't even neccesarry! Maybe the exception can just be removed? Of course, I suppose it must have been added for a reason so maybe there are other implementations of Redrawer that actually must call needRedraw on the AWT thread. But if that is the case, I wonder if the solution here could possibly be to just ensure that every implementation of Redrawer is safe to call needRedraw from any thread, as it seems to be with MetalRedrawer.
To conclude: It is very unclear and unpredictable when and where it is safe to modify UI state from different threads. It is impractical to ensure every single UI state access happens from a UI thread, especially when we are at the same time trying so hard to keep heavy work off the UI thread so that the UI runs smooth. The fact that accessing UI state from non-UI threads works 95-99% of the time seems to imply it should be 100%. Otherwise, if the design decision for this library is that it will never be fully safe to access UI state from non-UI threads, then maybe this library should strictly enforce that everywhere by throwing exceptions such that my reproducer above does fail.  Another possible approach towards solving this is to implement more fail-fast behavior so that if errors like the one I had ever pop up, there is a more clear cause.
Affected platforms
Deskop
Versions

Kotlin version*: 2.0.0-Beta5
Compose Multiplatform version*: 1.6.1
OS version(s)* (required for Desktop and iOS issues): Mac
OS architecture (x86 or arm64): arm64
JDK (for desktop issues): 17

Expected behavior

Clarity about what can be done in what threads
More clear exceptions, instead of cryptic ones like the one above, with more fail-fast behavior to aid debugging
More predictability and determinism with regard to how safe it is to use non-UI threads
Either prevent the error I got above on the library side, or somehow help me know what I need to do on my end to prevent it.

I think this is just a bug; there's no deep issue here.
BaseComposeScene.invalidate is not guaranteed to run on the main thread, therefore ComposeSceneMediator.onComposeInvalidation needs to check and schedule its code to run on the main thread if the current thread is different.
@igordmn ?

Same happens here - #4472

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


deleting related resources in one transaction

I would like to delete resources which are related to each other by one REST call using 1 transaction but I get 400 Bad request:
"Bundle contains multiple entries that refers to the same resource "
Is it expected behaviour? I would prefer to execute such deletion in one attempt so I am sure there are no leftovers left behind.

@tomjscrypt This should work. Would you be able to provide a sample bundle with synthetic data that shows what you're doing?

@CaitlinV39 indeed it works when relation is 1 level deep, like:
Observation <- Observation
Then I can delete all two Observations.
If it is more than 1 level deep:
Observation123 -> Observation345 -> Observation678
Then I get 400 and:
"diagnostics": "Bundle contains multiple entries that refers to the same resource 'Observation345', I reference them via "focus".

Hey Tom - If you can send me a full sample of the request you are making with synthetic data (either attach here or email me at cavoeg@Microsoft.com), we need a bit more details to troubleshoot.

@tomjscrypt - I'm going to close but if you're able to email me more information we can reopen


New releases not being published, causing installation errors.

It seems like the CI job for releasing new versions to crates.io is broken, causing the version to be stuck at 1.3.2, which fails to compile.
The failing release job can be seen here and the latest release on crates.io is here.
I had a quick look and I believe you should be able to update to using v2 of the publish crates action, which might fix the error.

Thanks for pointing it out, will fix :)


Leetcode Question Number 1929

Leetcode Question Number 1929 solution needs to be added in the repo .
The link for the question is this.
Accepted Languages C++ / JAVA .
You Only need to add the  class Solution in the file.
Make Sure you have read the contributions guidelines before creating an PR.

assign


Integration stops working

After setting up the integration, it will stop working after some time.
Error being thrown:
Logger: homeassistant.config_entries
Source: config_entries.py:504
First occurred: 11:20:46 (2 occurrences)
Last logged: 15:40:41

Error setting up entry <id> for postnl
Traceback (most recent call last):
  File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token
    await self.oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 519, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 94, in async_refresh_token
    new_token = await self._async_refresh_token(token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 184, in _async_refresh_token
    new_token = await self._token_request(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 217, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://login.postnl.nl/<id>/login/token')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry
    await auth.check_and_refresh_token()
  File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token
    raise HomeAssistantError(exception) from exception
homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url=URL('https://login.postnl.nl/<id>/login/token')

Also getting:
Logger: homeassistant.helpers.config_entry_oauth2_flow
Source: helpers/config_entry_oauth2_flow.py:211
First occurred: 11:20:46 (2 occurrences)
Last logged: 15:40:41

Token request for postnl_postnl failed (invalid_grant): refresh_token is invalid

Could you please enable debugging for the integration and share the debug log?

2024-04-03 17:09:57.975 DEBUG (MainThread) [custom_components.postnl] Setup Entry PostNL
2024-04-03 17:09:58.463 ERROR (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Token request for postnl_postnl failed (invalid_grant): refresh_token is invalid
2024-04-03 17:09:58.463 DEBUG (MainThread) [custom_components.postnl] API error: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')
2024-04-03 17:09:58.466 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry deb0a372-6d72-4e09-83fe-997beacbd137 for postnl
Traceback (most recent call last):
  File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token
    await self.oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 519, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 94, in async_refresh_token
    new_token = await self._async_refresh_token(token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 184, in _async_refresh_token
    new_token = await self._token_request(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 217, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry
    await auth.check_and_refresh_token()
  File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token
    raise HomeAssistantError(exception) from exception
homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')

Guess this should be it

Enabled debug logging from the UI and reloaded the plugin:
2024-04-04 09:38:04.340 ERROR (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Token request for postnl_postnl failed (invalid_grant): refresh_token is invalid
2024-04-04 09:38:04.341 DEBUG (MainThread) [custom_components.postnl] API error: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')
2024-04-04 09:38:04.344 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry deb0a372-6d72-4e09-83fe-997beacbd137 for postnl
Traceback (most recent call last):
  File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token
    await self.oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 523, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 94, in async_refresh_token
    new_token = await self._async_refresh_token(token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 184, in _async_refresh_token
    new_token = await self._token_request(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 217, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1060, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry
    await auth.check_and_refresh_token()
  File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token
    raise HomeAssistantError(exception) from exception
homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')```

Just reauthenticated after installing latest version. Will let you know if the issue occurs again

Thanks for sharing the logs. Unfortunately they aren't very helpful. Bad request can mean a lot of things and I want to pin point what the actual problem is. If it happens again, then I will add some extra logging in the integration.

On post.nl you are also not able to login. I assume they have some kind of maintenance. Let's give them some time to update their systems 😄

@arjenbos Just happened to me again, when restarting HomeAssistant:
Logger: homeassistant.config_entries
Source: config_entries.py:584
First occurred: 15:57:01 (2 occurrences)
Last logged: 16:18:53

Error setting up entry deb0a372-6d72-4e09-83fe-997beacbd137 for postnl
Traceback (most recent call last):
  File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token
    await self.oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 523, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 94, in async_refresh_token
    new_token = await self._async_refresh_token(token)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 184, in _async_refresh_token
    new_token = await self._token_request(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 217, in _token_request
    resp.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1070, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 584, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry
    await auth.check_and_refresh_token()
  File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token
    raise HomeAssistantError(exception) from exception
homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url=URL('https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token')

Alright, hopefully I can debug it when I have time. Looks like a retrieving a new token breaks for some reason.

same here, maybe i messed up something myself do

Same issue here.

i have to restart my server to get it running again and kinda randomly disconnect, some times it even doesnt show up anymore, i have the same isseu for several weeks now but i tought the project is not beein maintenced anymore.
@arjenbos any updates? have a good one!

This issue is really odd. I never had it and i'm hoping that I will get it. Now, I can't really debug it with the limited amount of information. Of course, I know where in the code this happens, but I don't know why. Why does PostNL return a Bad Request response?
Hopefully I get the same issue as well, so I can start fixing it.

Let me know if u need a tester I'm all here

Maybe this debug log will help.

2024-08-19 16:35:36.312 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration postnl which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2024-08-19 16:35:51.357 DEBUG (MainThread) [custom_components.postnl] Setup Entry PostNL

2024-08-19 16:36:01.924 ERROR (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Token request for postnl_pietje failed (invalid_grant): refresh_token is invalid

2024-08-19 16:36:01.925 DEBUG (MainThread) [custom_components.postnl] API error: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

2024-08-19 16:36:01.944 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry deb0a372-6d72-4e09-83fe-997beacbd137 for postnl

File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token

aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry

File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token

homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

2024-08-19 16:36:59.769 DEBUG (MainThread) [custom_components.postnl] Setup Entry PostNL

2024-08-19 16:36:59.862 ERROR (MainThread) [homeassistant.helpers.config_entry_oauth2_flow] Token request for postnl_pietje failed (invalid_grant): refresh_token is invalid

2024-08-19 16:36:59.863 DEBUG (MainThread) [custom_components.postnl] API error: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

2024-08-19 16:36:59.865 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry deb0a372-6d72-4e09-83fe-997beacbd137 for postnl

File "/config/custom_components/postnl/__init__.py", line 92, in check_and_refresh_token

aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

File "/config/custom_components/postnl/__init__.py", line 35, in async_setup_entry

File "/config/custom_components/postnl/__init__.py", line 98, in check_and_refresh_token

homeassistant.exceptions.HomeAssistantError: 400, message='Bad Request', url='https://login.postnl.nl/101112a0-4a0f-4bbb-8176-2f1b2d370d7c/login/token'

mm i wonder if some add blocker or my internet seutiy suite i blocking this and will check this tomorrow thanks for ur reply!

I finally had the same issue on my dev env. The logs state that the refresh token is invalid/expired. The core of Home Assistant should take care of refreshing the refresh token after every request, but some reason HA fails in refreshing the refresh token. In my installation, I never have this issue.
oAuth2 clearly states that if the refresh token is invalid, then a new authorization needs to take place. This is what I will change in the code, but it will only request you to re-auth the PostNL integration. Since there is NO valid refresh or access token, we need to re-auth the integration.
I will change the main branch and not release the code yet. Hopefully you can checkout the main branch and see what happens. Also, maybe check if the integration is running twice and it's using the same refresh_token for multiple instances.

If a refresh token expires for any reason, then the only action the application can take is to ask the user to log in again, starting a new OAuth flow from scratch, which will issue a new access token and refresh token to the application. That’s the reason it doesn’t matter whether the application knows the expected lifetime of the refresh token, because regardless of the reason it expires the outcome is always the same.

Source: https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/
Also, please be aware that if you run your HA multiple times with the same DB (for some reason), then it uses the refresh token will be used twice, and the refresh token should be revoked.

When the refresh token changes after each use, if the authorization server ever detects a refresh token was used twice, it means it has likely been copied and is being used by an attacker, and the authorization server can revoke all access tokens and refresh tokens associated with it immediately.

Source: https://www.oauth.com/oauth2-servers/making-authenticated-requests/refreshing-an-access-token/
So, it has nothing to do with an ad blocker or security suite.

This sounds perfect the devs are working on it. Thank you many many times


KAFKA-4586; Add purgeDataBefore() API (KIP-107)

@ijuma @ewencp @jjkoshy @radai-rosenblatt I have manually tested it successfully using the ./bin/kafka-purge-data.sh in the patch. I am going to add unit test and probably ducktape integration test as well. But the core code should be ready for review. Would you have time to review the patch?

@lindong28, thanks for the PR. I probably won't have time to review before next week. cc @junrao as well since he reviewed the KIP.

@jjkoshy @junrao @becketqin @ijuma @radai-rosenblatt I have added tests and the patch is fully ready for review. Would you have time to review this patch?

@lindong28 Thanks for the patch. It seems the patch has conflicts. Could you rebase?

@becketqin I thought it will take 1+ week for the patch to be reviewed and there will be conflict again anyway. Thus I was going to rebase after first round of review. What is our general guideline for rebasing big patches? I can certainly rebase it now if you think it is useful.

@becketqin I am rebasing the patch. Thanks in advance for help!

@becketqin All conflicts have been resolved and all tests are passed. Thanks!

@lindong28 Thanks for updating the patch. I'll take a look. Usually if there are multiple big patches in parallel, the committers who are reviewing the code would hold back some of the patches to avoid unnecessary rebase.

@becketqin Thanks so much for taking time to review the patch! Can you check if the updated patch has addressed your comments?

@becketqin I have addressed all your comments and all tests have passed. Could you take another look? Thanks!

@junrao @jjkoshy Do you have time to take a look? Given that we probably have a few big patches from KIP-98 (and potentially KIP-82 and KIP-112). We probably need to synchronize on them to avoid unnecessary rebase. It might be better to get this patch in first. What do you think? Thanks.

Also, it would be good to merge trunk into this branch. I know this can be annoying, but the request/response code has changed enough that some parts of the review can't be done properly without that.

@ijuma Thanks for reviewing the patch. This KIP depends on the KAFKA-4820 and I will rebase the patch after KAFKA-4820 is committed. And I will also explain the PurgeDataCommand in the mailing thread and the KIP wiki.
Initially we considered to use purge, truncate or delete in the method name. I don't have a strong preference among them. I chose purge because Joel prefers it and no one else raises concerns with it in the open source discussion. I guess one reason is to distinguish it from deleteTopic method. I can change it to delete if you and others like it better.
I think the purpose of including data in the method name is to distinguish it from deleteTopic method name. The reason of not having data in the API name PurgeRequest is because ProduceRequest or FetchRequest doesn't include data in the name. This seems reasonable to me.
The reason of including before in the method name is because we originally want to have two methods purgeDataBeforeOffset and purgeDataBeforeTime. Later we simplified the KIP to include only one method using offset. I like the idea of removing before in the method name. I will propose it in the KIP.

Thanks for explaining the reasoning for the name choices. Let me think about it and see how it fits with the other proposed AdminClient methods.

@ijuma @becketqin I have addressed all the comments and rebased the patch onto trunk. Do you have time to review the latest patch?

@junrao Thanks much for your review. I have updated the patch to address most of the comments. Can you see if my reply to your comments make sense?

@ijuma @becketqin @junrao Do you have time to give the patch another pass? I have gong through the patch and all the reviews and the patch seems good now.

@lindong28 : Have you run system tests on this PR?

@junrao Sorry for late reply. I didn't run Ducktape-based system tests previously. I have been trying to run the test since your comment. But it seems that some test will fail even on Kafka trunk without this patch. I am doing more detailed analysis to see if my patch is the cause of any test failure.

@junrao Some tests fail consistently even without my patch if I run ducktape-based system test on my desktop. I am not sure if it is because the setup on my desktop. Becket just told me that it may be more reliable to run system test via https://jenkins.confluent.io/job/system-test-kafka-branch-builder/. But all recent system tests have failed due to error ImportError: No module named setuptools since last Friday. Do you know who can look into this problem and fix the Jenkins setup?

@lindong28 : Sorry for the inconvenience. We just fixed an issue in the branch builder. Could you try it again?

@junrao Thanks much for the quick help! The system test has finished successfully. See https://jenkins.confluent.io/job/system-test-kafka-0.10.2/60/console. And I have made nextOffsetFromLog() private in the latest commit.
Is there further concern with the patch? I will rebase the patch if it is ready for merge. Thank you.

@junrao I just rebased the patch onto trunk. There is no conflict at all.

@junrao Thanks much for the quick help! Please ignore my previous comment.. I thought my test has succeeded but I was looking at the wrong test result. It should take another 3 hours for my test to finish.

@junrao I noticed that in a test I started yesterday using system-test-kafka-branch-builder-2 (instead of system-test-kafka-branch-builder), my branch has indeed passed all tests. See https://jenkins.confluent.io/job/system-test-kafka-branch-builder-2/201/console.
The patch has been rebased onto trunk without any conflict and nextOffsetFromLog() has been made private. Do we need further review or test? Is there anything else I can do?
Thanks for help!

@ijuma @junrao @becketqin I have renamed PurgeRequest to DeleteRecordsRequest, PurgeResonse to DeleteRecordsResponse, and purgeDataBefore() to deleteRecordsBefore().
For simplicity of internal code, I am still using purge to refer to deleteRecords when records is not explicitly specified as the operation target. For example, I use LogPurgeResult instead of LogDeleteResult or LogDeleteRecordsRequest. And delayedPurgePurgatory instead of delayedDeletePurgatory or delayedDeleteRecordsPurgatory. This should address Jun's goal of differentiating between removing whole log vs removing portion of the log since we only use delete when records is specified.
Can you review this patch again? Thanks!

Thanks for the patch. LGTM except one pending comments. @junrao Do you have time to take another look? Thanks.

@junrao Thanks for the comment! I have addressed most of them. Can you check if my reply make sense?

Test with JDK 8 and Scala 2.11 failed because KafkaStreamsTest.testCannotStartOnceClosed took more 2+ hours before it is killed. ./gradlew -PscalaVersion=2.11 streams:test --tests org.apache.kafka.streams.KafkaStreamsTest works on my machine. Thus the failure is probably not caused by this patch.

@junrao: All comments are addressed. All integration tests and system tests have passed. And @becketqin has reviewed the latest patch. Since we are so close to finish review for this patch, would you have time to review the patch again so that we can merge it before other major change in trunk?

@junrao All comments have been addressed as suggested. All tests have passed except org.apache.kafka.streams.integration.KStreamAggregationDedupIntegrationTest.shouldReduce with Scala 2.12, which I don't think is caused by this patch. Thanks for all your time to review the patch!

@junrao Thanks for the review. Yeah it took me quite a while to rebase the patch. I just finished rebase and the integration tests have passed. I will run system tests as well. Can you see if my reply to your most recent comment make sense?

@junrao @becketqin The patch has been rebased again on Ismael's most recent commit. All integration and system tests have passed. Can you review the latest patch? Thanks!

@junrao As of current patch the logStartOffset of compacted topic is always 0. It seems reasonable because if consumer seek to offset 0 of a compacted topic, they will still be able to consume (instead of receiving OffsetOutofRangeException) even if the offset of the first message is larger than 0. And it is not straightforward to retrieve the offset of the first message in the segment. According to Java doc, RecordBatch.baseOffset() will return the first offset of the original record batch for magic version prior to 2, which means the baseOffset of the first batch of the first log segment doesn't necessarily tell us the offset of the first message in the log. Does this sound reasonable?

It seems that right now, for a compacted topic, the base offset of the first segment is always 0. So, the patch is fine.

@lindong28 : Thanks for the patch. +1 from me. @becketqin : Do you want to make another pass and then merge?

@junrao @becketqin All integration tests have passed except org.apache.kafka.connect.runtime.WorkerTest.testAddRemoveTask with Scala 2.11. I don't think this is caused by this patch because this test passed all other recent tests. Thanks so much for taking time to review this patch!

@lindong28 Thanks for updating the patch. Merged to trunk.
@junrao @ijuma Thanks for the review!


BarcodeScannerButton getParameters

Hi
I can't get the event parameters (for example scanSuccess) for BarcodeScannerButton control
Table
lt_arg = client->get( )-t_event_arg.
in method Z2UI5_ON_EVENT
is empty...
My xml
lo_box2->barcode_scanner_button(
scansuccess =  client->_event( 'SCANSUCCESS' )
).
Help please

thanks I found the demo


prisma deploy results in error - Cluster secret in env var PRISMA_MANAGEMENT_API_SECRET does not  match for cluster default

The issue
When I run "prisma deploy". I get the following error.
   Cluster secret in env var PRISMA_MANAGEMENT_API_SECRET does not match for cluster default
Where do I find the cluster default secret?
Expected behavior
The deploy should happen successfully.
My docker-compose.yml
services:
  prisma:
    image: prismagraphql/prisma:1.7
    restart: always
    ports:
    - "4466:4466"
    environment:
      PRISMA_CONFIG: |
        port: 4466
        # uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
        managementApiSecret: my-secret

My prisma.yml
endpoint: https://my-server-name.herokuapp.com/server-prisma-heroku/dev
datamodel: datamodel.graphql
hooks:
  post-deploy:
    - graphql get-schema -p prisma

I have added a .env file in the root of the project with
PRISMA_MANAGEMENT_API_SECRET="my-secret"
Versions (please complete the following information):

OS: OS X High Sierra
prisma CLI: prisma/1.20.7 (darwin-x64) node-v10.12.0
Prisma Server: [e.g. 1.9.0]
graphql-yoga
Deployed to heroku without Docker. Followed an earlier tutorial on Prisma website

Additional context
The problem came after an update of Prisma CLI version. I followed the instructions from the Upgrade Guide

When I ran prisma account, I realised that I have been logged out after updating the CLI version. The issue got resolved when logged in again through the CLI.


It doesn't work for that some API is deprecated

I used this code and it has response an error:
response:
{u'error': {u'message': u'The app ID is blocked for access of the O365 Discovery Service.', u'code': u'101, Microsoft.Online.Services.O365Discovery.O365DiscoveryException'}}
https://social.msdn.microsoft.com/Forums/azure/en-US/d640a9ec-09f0-4c75-9883-93d153f6c07d/the-app-id-is-blocked-for-access-of-the-o365-discovery-service?forum=Office365forDevelopers
Office365 Discovery Service was deprecated by Microsoft in Jan 2018: https://developer.microsoft.com/en-us/office/blogs/outlook-rest-api-v1-0-office-365-discovery-and-live-connect-api-deprecation/
"Today, we are announcing the deprecation of the Office 365 discovery service and Office 365 discovery service SDK for .NET in favor of using the Microsoft Graph. Deprecation begins on January 10th, 2018. Newly registered apps will not be able to access the Office 365 discovery service. Existing apps can continue to use the service until November 1st, 2019. From November 1st, 2019 onward, the Office 365 discovery service will be fully decommissioned, and no apps will be able to use the service anymore"
The solution is to use Microsoft Graph APIs.

Hi,
I think I have the same problem as you (see below) when accessing a business account (works fine with a private account though).
{'error': {'code': '101, Microsoft.Online.Services.O365Discovery.O365DiscoveryException', 'message': 'The app ID is blocked for access of the O365 Discovery Service.'}}
I am a bit lost do you have a simple explanation or a ready to execute code somewhere?
I used the code sample provided in README.md and used "http://localhost" as redirect URI (also registered in Azure). I do get a code but also this error and can't use the code anyways.
import onedrivesdk
from onedrivesdk.helpers import GetAuthCodeServer
from onedrivesdk.helpers.resource_discovery import ResourceDiscoveryRequest

client_secret = '*******'
client_id='*******'
redirect_uri = 'http://localhost'
discovery_uri = 'https://api.office.com/discovery/'
auth_server_url='https://login.microsoftonline.com/common/oauth2/authorize'
auth_token_url='https://login.microsoftonline.com/common/oauth2/token'

http = onedrivesdk.HttpProvider()
auth = onedrivesdk.AuthProvider(http,
                                client_id,
                                auth_server_url=auth_server_url,
                                auth_token_url=auth_token_url)
auth_url = auth.get_auth_url(redirect_uri)
code = GetAuthCodeServer.get_auth_code(auth_url, redirect_uri)
auth.authenticate(code, redirect_uri, client_secret, resource=discovery_uri)
# If you have access to more than one service, you'll need to decide
# which ServiceInfo to use instead of just using the first one, as below.
service_info = ResourceDiscoveryRequest().get_service_info(auth.access_token)[0]
auth.redeem_refresh_token(service_info.service_resource_id)
client = onedrivesdk.OneDriveClient(service_info.service_resource_id + '/_api/v2.0/', auth, http)

response:
<IP_ADDRESS> - - [12/Mar/2019 11:53:41] "GET /?code=***&session_state=**** HTTP/1.1" 200 -

{'error': {'code': '101, Microsoft.Online.Services.O365Discovery.O365DiscoveryException', 'message': 'The app ID is blocked for access of the O365 Discovery Service.'}}

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-2-6130989ba125> in <module>
     18 # If you have access to more than one service, you'll need to decide
     19 # which ServiceInfo to use instead of just using the first one, as below.
---> 20 service_info = ResourceDiscoveryRequest().get_service_info(auth.access_token)[0]
     21 auth.redeem_refresh_token(service_info.service_resource_id)
     22 client = onedrivesdk.OneDriveClient(service_info.service_resource_id + '/_api/v2.0/', auth, http)

~\AppData\Local\Continuum\anaconda3\lib\site-packages\onedrivesdk\helpers\resource_discovery.py in get_service_info(self, access_token)
     27         print(response) # added this myself to print error code
     28
---> 29         service_info_list = [ServiceInfo(x) for x in response['value']]
     30         trimmed_service_info_list = [si for si in service_info_list
     31                                      if si.capability == 'MyFiles' and si.service_api_version == 'v2.0']

KeyError: 'value'

It's 2020 and it's working for me, @wekan8. Try regenerating your client_secret, client_id, and upgrading your installation with
pip3 install git+https://github.com/OneDrive/onedrive-sdk-python.git
pip3 install --upgrade git+https://github.com/OneDrive/onedrive-sdk-python.git

If this works, consider closing.

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #209 for more information


x/vuln: states that the vulnerability is fixed in a previous major release of Go, not that it's fixed in a later minor release

Setup
I was running with Go 1.18, and ran govulncheck ./... on my repo.
Got
GO-2022-0521
Calling Decoder.Skip when parsing a deeply nested XML document can cause a
panic due to stack exhaustion.

Call stacks in your code:
 github.com/xxxxx/communication-api/email.Sender.SendRaw calls github.com/aws/aws-sdk-go-v2/service/sesv2.Client.SendEmail, which eventually calls encoding/xml.Decoder.Skip

Found in<EMAIL_ADDRESS>
Fixed in<EMAIL_ADDRESS>
More info: https://pkg.go.dev/vuln/GO-2022-0521

Expected
While the output was correct, the "Fixed in" value is for an earlier version of Go (1.17), even though I'm running 1.18 and the issue was fixed in Go 1.18.4.
So I'd expect "Fixed in" to display 1.18.4 instead, rather than suggesting dropping a major version.

@golang/vulndb

Should be addressed now. Feel free to reopen if the issue presents itself again.


OneLogin SSO documentation updates

Description of the change

Added updated documentation for OneLogin SSO

Type of documentation

[ ] New documentation
[x] Documentation update
[ ] Hotfix

Notion ticket link

OneLogin documentation updates

Looks awesome! Just a value needs to be updated

thanks Aris - I've pushed the suggestion - LMK if we're good to go here.


Some svg files are not load in react native

NB Never post screenshots of code. Post copy paste-able code if you include any.
Ignoring this will likely lead to direct closing of the issue.
Please respect the time and energy of open source maintainers.
import {SvgUri } from "react-native-svg";
<SvgUri width={300} height={300} uri= {"https://storage.googleapis.com/sioinvest/Company%20Logos/Stripe-3.svg"} />
Bug
SVG File url not load
Please provide a clear and concise description of what the bug is.
Include screenshots if needed.
Please test using the latest release of the library, as maybe said bug has been already fixed.
Unexpected behavior
If you have unexpected behavior, please create a clean project with the latest versions of react-native and react-native-svg
react-native init CleanProject
cd CleanProject/
yarn add react-native-svg
cd ios && pod install && cd ..
modify App.js -> run the app

If it's still an issue with the latest versions,
please make an sscce in the clean project,
and make it available as a git repo on github.
Or as a https://snack.expo.io/ if expo has the latest version,
and / or the bug exists both in the latest version and the one used in expo and snack.
Environment info
Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project
React native info output:
"react-native": "0.68.2",
"react": "17.0.2",
 "react-native-svg": "^13.10.0",
 "react-native-svg-transformer": "^1.1.0",

Library version: x.x.x
Steps To Reproduce
Issues without reproduction steps or code are likely to stall.

git clone https://github.com/user/rnsvg-bug-repro
cd rnsvg-bug-repro
yarn
yarn ios
yarn android
...

Hello @atologistdipak,
Do you still have that issue?
If you still have that issue, please share the example to reproduce that issue.
Thank you.


docker-compose.yml does not work

docker-compose.yml does not work, because of no "edgexfoundry/docker-core-config-seed-go:latest" image. hub.docker.com has only "edgexfoundry/docker-core-config-seed-go:test" and "edgexfoundry/docker-core-config-seed-go:0.6.0". The same problem to other "-go" images.

With PR coming, I am making changes to the docker-compose.yml so that it is essentially the same as the docker-compose-california-0.6.0 so that it works, but this is problematic.  We need the "latest" tag applied to the latest docker image we create.  @JPWKU - can we have the CI process add the latest tag to the latest images when dumped into Docker Hub?


Problems on xamarin native android when internet is lost

We are using analytics-csharp library for our xamarin native android app to track events to Segment.  It works well, but there are two problems.

if there is no Internet at the time of SDK initialization, then even after it is restored, events are not sent
if at the time of SDK initialization there was internet, then it disappeared, then it was restored, events that were generated without internet are not sent.
do we need some additional setup?

hey @Oleg-0 thanks for reporting this issue. events should be retried after internet restored. can you try a manual analytics.Flush() to see if any events get flushed to server after network restoration. I'll take a look into this too.
we're going to release our GA version this week, which provides a flush policy that lets you customize when and how you want to flush. you'll soon be able to define your own way to flush in scenarios like this.

hey @Oleg-0 we've spotted and fixed the issue. will get a release out soon.

thank you very much! Does this also apply to the first part of the problem, that if at the time of SDK initialization there is no Internet, then even after it is restored, events, even new ones, are not sent?

hey @Oleg-0 ,we have released 2.3.0-alpha.2 that has the fix to the issue. note that this is a pre-release version which is meant for testing. use it as an urgent fix. the official 2.3.0 will be out in 2 days.

Thanks!


If the app gets rerendered, color icons on screen will not match with colors on legend

Very rare issue, not too urgent since it can be fixed with a refresh

With the new marker system, markers are rerendered every time we pull data, instead of updating positions of old markers. This issue is now closed.


lite-xl: update to version 2.1.7

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg build lite-xl lite-xl.passthru.tests
Also welcome to Nixpkgs!

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 362925

aarch64-darwin

:white_check_mark: 1 package built:

lite-xl


Print information message to console if Dummy Audio driver is loaded.

Godot version:
Godot Engine v3.2.2.stable.official - https://godotengine.org
OS/device including version:
any
Issue description:
If the dummy audio driver is loaded, the console should print that fact.  Otherwise, it is exceptionally hard to diagnose why a different audio driver is loaded.   The dummy audio driver was added in #20986 (but not yet in docs).
Steps to reproduce:
Take a project, set Project/Project Settings/Application/Audio/Driver to Foobar and restart.
Run any project with audio.
Did the dummy audio driver load?

Hmmm.....
It looks like the fix would be to change servers/audio_server.cpp around line 213 from:
	if (driver_count > 1 && String(AudioDriver::get_singleton()->get_name()) == "Dummy") {
		WARN_PRINT("All audio drivers failed, falling back to the dummy driver.");
	}

to
	if (driver_count > 1 && String(AudioDriver::get_singleton()->get_name()) == "Dummy") {
		WARN_PRINT("All audio drivers failed, falling back to the dummy driver.");
	} else if (String(AudioDriver::get_singleton()->get_name()) == "Dummy")) {
                WARN_PRINT("Using the dummy audio driver.");
       }

It would be awsome if someone with the dev environment could test this and put in a PR?

Gah! Somewhat of a tangent, but is the Project Settings/Application/Audio/Driver setting even used?  It looks like the code just ignores it and takes the core audio driver anyway.   Is there any documentation as to what is supposed to happen with this setting?

Gah! Somewhat of a tangent, but is the Project Settings/Application/Audio/Driver setting even used? It looks like the code just ignores it and takes the core audio driver anyway. Is there any documentation as to what is supposed to happen with this setting?

It's used, but it might not work on all platforms: https://github.com/Orama-Interactive/Pixelorama/pull/312

Take a project, set Project/Project Settings/Application/Audio/Driver to Foobar and restart.
Run any project with audio.
Did the dummy audio driver load?

Setting invalid driver name should not cause fallback to "Dummy", but use default one. "Dummy" is used only if it is selected in the settings or when all other drivers failed to load.

TL;DR:  We should print the "using dummy audio driver" warning but also need better documentation.

The bug report is incorrect, in that changing the driver to 'Foo' is same as leaving the driver blank.  Changing the driver name to "dummy" does load the dummy audio driver.  The exact message could be improved:  "No audio (using dummy audio driver)"

The documentation in project settings incorrect or incomplete.  One view is something like:
"Specifies the audio driver to use.  The value is platform specific, though a blank or unknown value uses the platform default.  The value 'dummy' uses a the dummy audio driver  which reduces CPU load by not producing sound.  Requires restarting the editor for changes to take effect."
If the documentation is wrong, please let me know.  I'll try to link to a better PR if its just the documentation.

Should this message only be printed in the editor Output panel, or also in projects? This may be annoying in projects that rely on the Dummy audio driver but are not headless (as that would result in additional non-removable CLI boilerplate output).


Arty S7 OpenOCD Support

This PR does two things:

Fixes a typo that prevented the import from nmigen_boards.arty_s7 import * from working properly.
Adds support for the openocd programmer for the Arty S7 board.

I kept in mind your comments re: OpenOCD and programmers in general when writing this PR. So perhaps consider it a litmus test to supporting more than one programmer in nmigen :):

I looked at the openocd invocations currently in nmigen-boards. All of them are different, pretty significantly so.

Indeed, all the openocd invocations are different, and this one's no exception. One difference is that I use the upstream board config file since it's available already (I committed it in mid 2018). Another difference is that I support both JTAG programming and flashing via a proxy.

We can just decide on what to do here. For example, we can decide that on every board with multiple ways to program it, toolchain_program takes a programmer="" keyword argument.

I went ahead and used this suggestion as-is.

toolchain_program should be configurable enough, and just enough, to cover the most typical use cases.

In addition, I added a flash keyword argument that lets the user choose between JTAG programming and flashing a bitstream. JTAG programming is noticeably faster, shortening the already long "write, compile, program" feedback loop. Hopefully at some point Vivado's time can be shaved off too :). Therefore I think this is a reasonable keyword argument to add that will cover most use cases. I don't know if vivado's programmer has an equivalent.

cc: @Fatsie Do you have any experience with programming flash via Vivado? It looks like the program_hw_cfgmem command (page 977) can do the trick, but seeing as Vivado is remote for me, I can't really test this.

@cr1901 I have minimal experience with Vivado; for the script I just looked up some commands and fiddled until the script did what it should do. You should be able to do the same unless you don't have Vivado installed.

Also apologize for being terse; I am busy with total different things ATM and I don't expect to look at this deeper in the near future.

You should be able to do the same unless you don't have Vivado installed.

I already said I don't have Vivado installed.
Anyways, @whitequark, can I please assert on this for now? I got someone to help test remotely while I coded a TCL script, but I just cannot get flash programming to work with Vivado. This is the closest I came up with:
open_hw_manager
connect_hw_server
open_hw_target
current_hw_device [lindex [get_hw_devices] 0]
set cfgMem [create_hw_cfgmem -hw_device [current_hw_device] s25fl128sxxxxxx0-spi-x1_x2_x4]
set_property PROGRAM.FILES top-norgb.bin $cfgMem
set_property PROGRAM.ADDRESS_RANGE {use_file} $cfgMem
set_property PROGRAM.BLANK_CHECK 1 $cfgMem
set_property PROGRAM.ERASE 1 $cfgMem
set_property PROGRAM.CFG_PROGRAM 1 $cfgMem
set_property PROGRAM.VERIFY 1 $cfgMem
program_hw_cfgmem $cfgMem

which bombs with:
ERROR: [Labtools 27-3347] Flash Programming Unsuccessful: Failure to set flash parameters.
ERROR: [Common 17-39] 'program_hw_cfgmem' failed due to earlier errors.

I have no idea what Vivado is complaining about; this is the correct flash, according to the Digilent manual. My ability to test is limited; I want someone else to add this functionality.

Anyways, @whitequark, can I please assert on this for now?

Like I said, that's the bare minimum, so you can do that.

@whitequark I got Flash programming working with the caveat that the user needs to manually reset/power-cycle the board. This appears to be a limitation of the Vivado API.


Add sorting with :sort => true for has_many :in => :array

References bug #428.
I actually don't mind the perf hit because it's a small one (it just asks what's the id is of this element's id in this list).  Also see the rdoc documents around sort_by.  (http://ruby-doc.org/core-2.1.4/Enumerable.html#method-i-sort_by)
I've left off sorting by default.

It looks like this fails on 1.8.7 due to the lack of Array#sort_by!; I think sort_by should work fine in #find_ids since it's just returning the desired values anyhow.
I'm still not crazy about hitting every doc in the association to find the first/last valid values. I'm not sure I have a better solution, though.

Going to merge this with some minor changes + an optimization to not do the extra query when no extra query is given.

Merged in 62c662b97a385fff1623002c65fdc94e6996ccda


Fix intword for 1,000 decillion

Fixes #86.
Changes proposed in this pull request:

When deciding what power to use, it assumed the next one was always 1,000 (=10**3) times bigger
That's the case for most, but the final step from decillion to googol is much bigger:

powers = [10**x for x in (3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 100)]
human_powers = (
    NS_("thousand", "thousand"),
    NS_("million", "million"),
    NS_("billion", "billion"),
    NS_("trillion", "trillion"),
    NS_("quadrillion", "quadrillion"),
    NS_("quintillion", "quintillion"),
    NS_("sextillion", "sextillion"),
    NS_("septillion", "septillion"),
    NS_("octillion", "octillion"),
    NS_("nonillion", "nonillion"),
    NS_("decillion", "decillion"),
    NS_("googol", "googol"),
)

Instead of comparing the gap to 10**3, compare to the actual gap: powers[ordinal_] / powers[ordinal_ - 1]

bump for merging pull reqeuest, when does the new update with the fixes drop? Until then i have edited my local humanize files 😅

Thanks for the bump, was waiting to see if anyone had any feedback/approvals :)
We're due a release, I'll do one within the next week, maybe on the weekend.


Added arm64 targets for linux binaries

This change adds support for arm64 targets for the linux binaries and an arm64 tarball target. See #135
The existing build-binaries, build-tar targets now compile for arm64 in addition to amd64 on linux.
Thanks to @jeremyje for the multi-platform/os support (#545). It makes this change much simpler.

GOOS=linux GOARCH=arm64 CGO_ENABLED=1 GO111MODULE=on \
  CC=aarch64-linux-gnu-gcc go build \
	-mod vendor \
	-o output/linux_arm64/bin/node-problem-detector \
	-ldflags '-X k8s.io/node-problem-detector/pkg/version.version=v0.8.8-2-g4690e87' \
	-tags "journald " \
	./cmd/nodeproblemdetector
# runtime/cgo
In file included from /usr/include/stdlib.h:24:0,
                 from _cgo_export.c:3:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
Makefile:167: recipe for target 'output/linux_arm64/bin/node-problem-detector' failed

Build Breakage

/ok-to-test
/sig node
/priority important-soon

/retest

/lgtm
/approve

Hi, are the pushed docker images multi arch ?

The docker image does not yet have multi arch support. Please see #586 where support is being added.


While editing the numbers manually the incDecFactor is not considered.

When editing the numbers, user are able to enter different number without getting affected by the increment decrement factor.

As @abulka mentioned in another discussion:

A relaxed interpretation of what should happen would be that the user can enter anything in range, and the inc/dec works off that.
The other interpretation is that whatever the user enters is corrected to be a multiple of the inc/dec factor based off the min. This is bit trickier and also relies on correct settings of the min/max/inc widget values to be fully self consistent. For example I could set up min: -1 max: 4 inc: 2 and never be able to get to 4. I could enter 4 manually and it would auto-correct to a multiple of the inc. factor starting from min, which would be 3. The user might not be so happy, since the max is 4 !

Solution approach:

Based on the min, max and incDecFactor decide whether the max value is inclusive or not.
Always round the manually entered value to the nearest allowed number.

Case-1:
min = 1, max=5 and incDecFactor=2.
* In this case the allowed values will be 1, 3 and 5.
* Includes the max value 5.
Case-2:
min = 1, max=6 and incDecFactor=2.
* In this case the allowed values will be 1, 3 and 5.
* Excludes the max value 6.
Case-3:
min = 1, max=3 and incDecFactor=0.5.
* In this case the allowed values will be 1, 1.5, 2, 2.5 and 3.
* Includes the max value 3.
Case-4:
min = 1, max=2.75 and incDecFactor=0.5.
* In this case the allowed values will be 1, 1.5, 2 and 2.5.
* Excludes the max value 2.75.
This can implemented with the following equation and validate the input.
Given a user enters a value say x :

Calculate y = (x - min) % incDecFactor.
If y==0 then x is valid don't change it.
If y>0 then calculate a=x+y and b=x-y.
If (a % incDecFactor)  == 0 then x=a else x=b.

Found a better approach to address this. This is based on the HTML input type=number implementation of chrome. The logic is spread across multiple files.

Evaluate if a stepMismatch occurs for the given input value.

step_range.cc line 146

If yes then buildup alternative candidates and show error message.

input_type.cc line 455
step_range.cc line 81


lorem.words doesn't return array

node version: 10.5.0
faker version: 4.1.0

This is a php package, you're probably looking for faker.js


Edited repo via GitHub

This has been requested so that developers can Sync the Source without obstruction of android.git.kernel.org

This is a mirror, so probably pull requests aren't accepted.
Also, you can get the same behaviour by using the --repo-url flag, e.g.
repo init --repo-url git://github.com/android/tools_repo.git

..and this is an exact duplicate of pull request #1...

Okay dude ,
I'm sorry
I just am not that skilled at Git (I'm still learning)
Instead , I just forked this and made the necessary changes ^^
Thanks for clearing it , It was stupid on my part


Unable to resolve dependency tree

What did I do:

npm i axios
npm i axios-better-stacktrace

Got an error (from report.txt which on screenshot):

Updated:
With --legacy-peer-deps option to npm install library is installed without above error.
Updated 1:
When I install 2 dependencies at once, then no errors occur.
npm i axios axios-better-stacktrace

Hi, it should be fixed in the latest version.


Melee refactor

Goals:

prediction
fix the attack effects jank (e.g. xenos) and kill effectsystem
toggle precision as an action
Fadeout for the red hit marker rather than on / off
thrust / swing per weapon (which I think we have anyway)
Fix the code being jank so it's easier to make changes
windup?

Requires https://github.com/space-wizards/space-station-14/pull/8475 because I want predicted component changes.

Requires https://github.com/space-wizards/space-station-14/pull/8475 because I want predicted component changes.

if the requirement is the reason the PR was closed, that should hopefully be fixed soon, unless there's some issues with the PR,

Requires #8475 because I want predicted component changes.

if the requirement is the reason the PR was closed, that should hopefully be fixed soon, unless there's some issues with the PR,

I mainly need predicted component changes on client for active melee weapon accumulators; if the PR doesn't fix my issue I can just find a workaround.


[FIX]: Board Settings switchs not working properly

Description
When you change the state of "Option to post cards anonymously" the "Limit votes" are checked too, and if you uncheck the "Limit votes" and "Option to post cards anonymously" the "Limit votes" are checked again.
Steps to reproduce

Login in the app;
On Boards/Dashboard page access to a board;
Open Board Settings dialog;
Change status of "Option to post cards anonymously" and "Limit votes".

Expected result
The status of switchs not change the other switch state.
Actual result
When you change a state of "Option to post cards anonymously" the status of "Limit votes" change too.

I can't reproduce your error


Fix: Update device

Description
Third time's a charm, they say, especially when you add unit tests on the third time. Follow up on #443
Fixes # (issue)
Type of change
What is it?

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation update
[ ] Tests update

Checklist:

[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] I run go fmt ./... to check that my code is properly formatted
[ ] I run go vet ./... to check that my code is free of common Go style mistakes

Codecov Report

Merging #444 (3bd5de3) into main (8c09200) will increase coverage by 0.91%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
+ Coverage   30.84%   31.75%   +0.91%
==========================================
  Files          31       31
  Lines        3174     3174
==========================================
+ Hits          979     1008      +29
+ Misses       2108     2072      -36
- Partials       87       94       +7

Impacted Files
Coverage Δ

pkg/services/updates.go
52.40% <75.00%> (+13.94%)
:arrow_up:

Continue to review full report at Codecov.

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


[BUG] extract-canim.py not handling Audi file correctly

Describe the bug
When running the extract-canim.py on a RS3_5_Tuerer_quattro_NavigationPlus.canim file, output file img_0.png seams to be incorrect.
Script output reports file size 1536000 bytes, when output file img_0.png is actually 11159 bytes and visually exactly the same as file img_1.png.
To Reproduce
Steps to reproduce the behavior:

Run python3 ~/extract-canim.py RS3_5_Tuerer_quattro_NavigationPlus.canim ~/output
Check output files img_0.png and img_1.png.

Expected behavior
img_0.png file should be the largest one, should containt color car image instead of black mask.
Screenshots

Firmware(please complete the following information):

Brand: Audi
Hardware-type MIB2High
Version 5098

Hello, check this:
https://github.com/Mich795/CANIM-Mod-Tool

Extract works all right. But compress doesn’t do a thing for me. No error, just nothing when I press the „compress images” button.


[staging-next] python3Packages.sphinx: fix build, enable tests, cleanup

Motivation for this change
The sphinx package looks wholly undermaintained and broke due to an unnecessary dependency on python3Packages.whoosh.
https://hydra.nixos.org/build/142649615
staging-next #122068
ZHF #122042
Things done

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

[x] NixOS
[ ] 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"
[ ] 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.

@mweinelt Did you hear back from @nand0p?

I have not.

Let's remove them then.


Formatter doesn't format data given in table data raw

Description:
Formatter doesn't work for data given in table data raw of a table literal expression.
Steps to reproduce:

Try formatting following code and look at the table data raw

import ballerina/io;

type Person record {
    int id;
    int age = -1;
    float salary;
    string name;
    boolean married;
    float amount = 55.0;
};

public function main() {
    table<Person> personTable = table {
        {key id, age, salary, name, married, amount},
        [
            {   1,     30  ,    300.5,"Mary",    true},
            {  2   ,  20 ,   300.5,   "John" ,true}
        ]
    };

    io:println(personTable);
}

Affected Versions:
1.0.1

This has been fixed in the 1.0.2 release hence closing the issue.


Race condition during blue-green deploys

The problem
We have deployed open source Cloud Foundry v265, upgrading from v257. We fully automate the deployment of applications using the blue-green-deployment plugin. There was zero downtime with CF v257, but now with CF v265 there is up to 60 seconds where requests to the app are responded to with a status code of 404.
Steps to reproduce

Deploy Cloud Foundry v265

Deploy an application

Set up a curl to monitor the app:
while true; do curl -s -o /dev/null -w "%{http_code} " https://${APP_NAME}.${APP_DOMAIN} -k; date; sleep 1; done | tee /tmp/bgd.out

Do a blue-green deploy using this example script.

You should see 404s returned after the unmapping of the route from the old application for up to 60 seconds.
Add a sleep of 60 seconds before the unmapping of the route from the old app and the problem goes away.
Debugging
Because the downtime is always less than 60 seconds I believe the state in BBS is correct and on the bulk update the problem gets fixed. Therefore, the route-emitter is somehow unregistering the route from the new app instead of the old app. I've confirmed this by tailing the logs of the GoRouter and I can see the unregistration messages being logged.
We compiled the route-emitter for every commit between that in Diego v1.18.1 and v1.19.0 and tracked it down to this commit: 525adefba513e0825545ecc4b40db19c36edbd9c. The commit was too big to do further debugging, so we rely on a fix from the maintainers.
Versions affected
cf-release v265
diego-release v1.19.0

Thanks, @henrytk! Looks like this routing issue caused problems with the unmap/map sequence at https://gist.github.com/henrytk/3a45e082b5713c268b5eea03dd922cfa#file-cf-blue-green-deployment-L8-L9, and we believe that this is now fixed with https://github.com/cloudfoundry/route-emitter/commit/f95c6093df6494bbbfebe2440538583fef2244da as part of https://www.pivotaltracker.com/story/show/148602639. That fix will be in the next final release of Diego final release, which I expect to cut shortly.
Best,
Eric, CF Diego PM


Hook into completion system for finer highlighting

For example, for highlighting in red if a directory is expected but a file was given, etc.
This would avoid having the ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS array.
All we have to do is to get the tag used for the part of the command, using _complete_help for example. Styles would then be declared per tag, allowing deep customization of the highlighting à la zstyle.

+1


cannot inject my own css file

Hi @antoine92190
const style = document.createElement('style')
style.innerHTML = '.vac-room-header { display: none !important; }'
this.$refs.chatWindow.shadowRoot.appendChild(style).....
i am using your above code in my custom method addCustomCss() and calling that method in mounted.... but fails....
shadowRoot undefined issue in console log..... even i am using ref="chatWindow" in </vue-advanced-chat/> component.... can u guide me how to resolve this....
i also used the below code ....
const style = document.createElement('style')
const styles = await import('./src/styles/theme.scss')
style.innerHTML = styles
this.$refs.chatWindow.shadowRoot.appendChild(style)..... but again fails with console error...
Uncaught (in promise) TypeError: Cannot convert object to primitive value
at VueComponent.addCustomCss .....
i am totally new in vuejs please can u guide me which approch should i use and how ????

This code have worked for me:
  mounted() {
    const style = document.createElement('style');
    style.innerHTML = '.vac-message-box { max-width: 90% !important; }';
    this.$refs.chatWindow.shadowRoot.appendChild(style);
  },

Ensure that you have ref="chatWindow" and that you are using mounted so that the component is in the DOM, and in a very rare case ensure that you have the component imported like this <vue-advanced-chat></vue-advanced-chat> not like this <vue-advanced-chat/>


save output to a file

Hello, I would like to know if it is possible to add that the address output is saved in a file? because at the moment it only shows it in the terminal.

…stream redirection?


[Maintainer Wanted] Deprecated

A number of people have opened issues on this repository asking why it has been deprecated (since there is not any information about this in the README etc) and why certain portions (backend) do not work anymore. Here is the answer: I let the hosting for the database expire (though I have a dump of all the data) because I no longer have the time to maintain this project the way I wish I could. However, this provides a good opportunity for the community, as I'm looking for a maintainer to step in! If I could give someone worthy, write-access to the repository so they can build it up again and update all the dependencies etc that would be a huge help. If anyone is interested in contributing please let me know via email<EMAIL_ADDRESS>or comment on this issue and I'd be happy to talk to you.

Hi I am interested to contribute :)

If you want, you can get started trying to update the dependencies, as they are very much out of date. A working application with latest dependencies (aka updating this app) would be a huge start!

Yes , i will get familiar with the environment . till now i was using svn.
I am new to git , need to understand how to update.
do you want me to create new branch??
On Tue, Mar 28, 2017 at 12:42 PM, Dominic Farolino<EMAIL_ADDRESS>
wrote:

If you want, you can get started trying to update the dependencies, as
they are very much out of date. A working application with latest
dependencies (aka updating this app) would be a huge start!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/domfarolino/angular2-login-seed/issues/28#issuecomment-289654217,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXta-Yd2sQMJopLKzaLlnI0BY4KHbP9Zks5rqIGagaJpZM4MXh8-
.

@nitishvu @domfarolino
Has anyone started to update the packages?

@cristianounix Not to my knowledge no. If you'd like to start that would be great! Let me know if you need help, though I haven't messed with the angular-specific stuff in a while. You'll probably need to run the server locally but I'd like to migrate the server to use mongodb/mongoose I think that would be a lot better and need done for sure.

Hi @domfarolino @cristianounix
I have updated with Dependencies and replaced the deprecated modules.
will  try update with Mongodb
you can check the code @GitHub

Could you (whoever is tackling this) submit a PR with the suggested changes/updates? That would be great.
/cc @nitishvu @cristianounix

Hi @nitishvu ,
I refered your updated dependencies it runs well but while register or using google login it gives me error as "User already exists". Could you please help me ??

Any updates on this @nitishvu @cristianounix? There's no ultimate rush or anything, just checking it see if anyone has looked at it since. If you'd like to submit a PR that would be cool.

Closing this and opening new issue for hacktoberfest


Load repository specific CI config from file

From .github/.ci.conf
Reference issue
Fixes #25
Fixes #21
Fixes #22

tested at https://github.com/pion/stun/pull/30


Migration for activityBar.visible not working

Testing #196272

Not sure if this has to do with default values, but since default is left, expected it to convert it to workbench.activityBar.location : hidden

Old workbench.activityBar.visible setting is a boolean setting. So if you have "workbench.activityBar.visible" = true migration sets workbench.activityBar.location to hidden and removes workbench.activityBar.visible setting.


Flask rollout prep: exit(1)

The second most common error in Flask that we don't get in PHP is an unexpected exit(1); stacktrace below. I wish I had more information on what exactly is going on here; all I know is that the first occurrence was at Apr 22, 8:42 PM and the last was at Apr 27, 4:10 AM. korlaxxalrok may be able to hook you up with more detailed logs.
Traceback(most recent call last):
File "/usr/local/lib/python3.7/site-packages/newrelic/api/wsgi_application.py", line 47, in __iter__
File "/usr/local/lib/python3.7/site-packages/newrelic/api/wsgi_application.py", line 454, in __iter__
File "/usr/local/lib/python3.7/site-packages/werkzeug/wsgi.py", line 506, in __next__
File "/usr/local/lib/python3.7/site-packages/werkzeug/wrappers/base_response.py", line 45, in _iter_encoded
File "/usr/local/lib/python3.7/site-packages/flask/helpers.py", line 162, in generator
File "/app/app/_printer.py", line 44, in gen
File "/app/app/_query.py", line 260, in gen
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py", line 1010, in __iter__
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py", line 1344, in fetchone
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1514, in _handle_dbapi_exception
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py", line 1336, in fetchone
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py", line 1461, in _fetchone_impl
File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/result.py", line 1448, in __buffer_rows
File "/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py", line 435, in fetchmany
File "/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py", line 328, in _fetch_row
File "/usr/local/lib/python3.7/encodings/cp1252.py", line 14, in decode
File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 201, in handle_abort

are those times in UTC or local time?

could be that because of an update the container got killed

are those times in UTC or local time?

it is... whatever New Relic is showing me. In theory I have it configured for US/Eastern but when I select time spans to examine it insists on using US/Los_Angeles. Gross.

No longer a problem


My code is much slower in TF2 than TF1

System information

Colab

Primary issue: My code is much slower on TF2 compared to TF1
You can verify this by running each notebook and seeing the difference in elapsed times.
I suspect it's a tf.data issue, because when you increase the value of ntopics (in TF2), the code slows down even more. The TF1 code is unaffected by changing ntopics. This parameter changes the size of the simulation dataset.
Secondary issue: My TF1 code is slower on GPU than CPU.
You can verify this by changing the TF1 code runtime and seeing the elapsed time goes up.
This problem has not (yet) been reproduced on TF2 because of the above primary issue.
I don't know if this is possible to fix because there are a lot of sequential operations in the main calculateloss function. But if you see anything that could be optimized in any way (preferably in TF2) please point it out!
Standalone code to reproduce the issue

TF1 colab notebook

TF2 colab notebook

Thank you

I am able to replicate this issue, please find the gist for tf 1 and tf2

Hi @osotsia, there is a lot of custom code here which makes it difficult to debug. You might want to try Stack Overflow where there's a larger community that can help you to better optimize your TF2 code.
However, a few things to keep in mind when using tf.function is that it works best with TensorFlow ops, as numpy and Python calls are converted to constants. If you prefer numpy you might want to check out the TF numpy API. You should also check to see that you aren't doing any unnecessary retracing, as that can also cause a slowdown. You can find out more about common tf.function pitfalls in the guide.
As for the GPU concern, we recently released a guide on how to debug your performance on GPUs. It's targeted to TF2, but you might still find it helpful.

Hi @nikitamaia
I've tried to bypass the custom code, see TF2 code here and TF1 code here. Now you should only need the last 2 code chunks.
In the 2nd-last chunk there is a line of code:
vocabulary_size = int(1e4)
This code increases the size of the variables we are optimizing with respect to (embeddings, and variances). When you make it larger (1e5 or 1e6), it slows down TF2 but doesn't slow down TF1. The extra variables are not part of the vocabulary, so they never get updated.
Does that help? Let me know if I should cut it down more. Or am I doing the optimization wrong? It seems harder to optimize a custom function in TF2 compared to TF1.


add a test for SearchStreams

tests \o/
it was surprisingly easy...
improves #77

i don't think having tests for bugs is useful in the long run - we should just fix the bug - i'm already fixing the issue with the negated data query - did a refactoring of the data query code for that...


[FR] [APP] Button to enable flashlight during barcode scanning

Problem
I've got labels inside drawers, which I am currently unable to scan with the InvenTree Android app, because of low light.
Suggested solution
A Button to enable the flashlight in the scanning screen would be nice.
Examples of other systems
Most other barcode scanning apps have a button to enable the flashlight. I can scan the labels without issue with those apps.
Device: Oneplus 6
OS: Android 11

Good idea!

New version of the app will have buttons to toggle flash and switch between front and back cameras. Should be released later today :)

Thanks. That was very quick and works perfectly!


Native function call  and ret cant work

Even though i tried to fix the bug but reap a little so i give up

Oh nice, i found a bug between underflow and overflow in my case CALL, UNDERFLOW -> OVERFLOW

But i found jmp 13 not jmp 15, i think lerp prgram cant complete in my life. And execute bme found the end result is UNDERFLOW and f64: 0.0000

Now i add plusf the result is jmp 14 but still cant work lol

Oh shit, i forget adding ret instruction

Now jmp 15 but bme failed

lerp program just can work on debasm cant work on bme, still cant found a bug

I think i can close the issue, i figure it ouy, not + 1 is ++ in case CALL.


Add header files for IDEs

Hi, as a follow up to https://github.com/AcademySoftwareFoundation/openexr/pull/1279, I found a couple more places where header files were missing from the CMakeLists.txt files. Adding the header files to the CMakeLists.txt files allows them to show up in IDEs.
Totally unrelated, but while I was making the changes I noticed there were three copies of the file "tmpDir.h" in the tests directories? Maybe that functionality could be refactored into "ImfMisc.h"?

It would definitely be good to clean up the multiple tmpDir.h files, although since this is strictly internal to the test suite, it would be best not to further pollute ImfMisc.h, since that's included lots of places.  tmpDir.h appears in OpenEXRTest, OpenEXRUtilTest, and OpenEXRFuzzTest. It's a bit sloppy, but could you leave it in OpenEXRTest and have the other directories include it via "../OpenEXRTest/tmpDir.h".

Adding "../OpenEXRTest" to the include path for the other tests seems reasonable, "tmpDir.h" just contains a few macros. I'll make a separate PR for that.


PyFunceble

@StevenBlack I saw you starred Funceble.  I just saw this post that recommends using PyFunceble instead.
https://github.com/funilrys/funceble/issues/178

Thank you @jawz101!


present and reset (CS:GO)

how do I find the memory patterns for present and reset in the CS:GO branch?
present = PatternFinder{ gameOverlayRenderer.getCodeSection().raw(), patternNotFoundHandler}("8B 4D ? A1 ? ? ? ? 51 FF"_pat).add(4).asstd::uintptr_t();
reset = PatternFinder{ gameOverlayRenderer.getCodeSection().raw(), patternNotFoundHandler }("E8 ? ? ? ? A1 ? ? ? ? 57 53"_pat).add(6).asstd::uintptr_t();
I want to slightly deupdate osiris to a version that doesn't have the inventory removed after the EoL of CS:GO

@danielkrupinski


Unification should check for spine length equality?

Shouldn't the spines be the same length here:
https://github.com/AndrasKovacs/elaboration-zoo/blob/d89688abd814d977968a2c7ca0ff4aecd40c3f2c/03-holes/Main.hs#L396

The two sides in unification always have the same type, so if the heads are equal, then the spines cannot be of different length (because then the sides would have different type).

Right, that makes sense.


Fixed honcho

Ok.. I was missing one thing that I didn't change. And broke the build.
The fact this is leading up to tests and thus CI is not without it's irony.

Hold on merging this!

@brianwarehime Should be good to go!


boards, samples, tests: Add bl654_dvk_bl654pa

Add defconfig, dts, yaml for bl654_dvk_bl654pa. They are largely the same as bl654_dvk
Add Kconfig support for bl654_dvk_bl654pa.
Add samples/bluetooth/hci_uart support for this config at 1 MHz with power amplifier
Add docs

I was trying to remove myself and github removed many assigned ones. Not sure, apologize.

I would also recommend rewording you commit to something like:
boards: Add bl654_dvk pa variant

Add pa variant definition to board.yml
Add bl654_dvk_nrf52840_pa files dts, yaml, defconfig
tests: adc_api overlay

Retarget to main

@ahedin25 could would like your review here.

Add DNM. We are discussing internally.


Change StoreProtocol to implement transaction

...rather than send. send becomes an asynchronous main actor isolated protocol extension that guarantees your changes will always happen on the main thread, but offers only a fire-and-forget interface.

@bfollington here's my take on #46.
Not sure if the method rename will cause too much carnage in Subconscious. If so, we could instead do:

send(:) synchronous but not isolated to main thread
sendAsync(:)

Nice! This is very similar to (one of) the abstractions I tried, it looks good on paper:

correct thread assignment
tests pass
actions and effects occur as expected

BUT it seems the major performance penalty comes from the synchronous mutation of a binding. Comparing the attached code snippets, the first one has a noticeable hang (visible in profiling tools) on each tab transition and the second does not.
A - has hangs
TabView(
    selection: Binding(
        get: { store.state.selectedAppTab },
        transact: store.transact,
        tag: AppAction.setSelectedAppTab
    )
)

B - no hangs
TabView(
    selection: Binding(
        get: { store.state.selectedAppTab },
        transact: { action in Task { store.transact(action) } },
        tag: AppAction.setSelectedAppTab
    )
)

Now, this violates a bunch of runtime guarantees so it's not acceptable. I think, if we want safe bindings + good performance, we might have to pull a similar trick to ValidatedTextField where we have a local @State variable powering the binding and replay the changes to the store in the background.
I agree with your assessment that by default bindings seem to expect synchronous updates but we seem to be doing way too much work on each update to support that (because we touch so much of the tree on every change to every store).
I keep running into resources that recommend wrapping pretty much any and every (costly) call with Task {} in SwiftUI.

You can somewhat bundle this into a ViewModifier:
@State var selectedTab: AppTab = .notebook

var body: some View {
    TabView(selection: $selectedTab) { ... }
    .modifier(
        StoreProxyViewModifier(
            state: $selectedTab,
            get: { store.state.selectedAppTab },
            send: store.send,
            tag: AppAction.setSelectedAppTab
        )
    )
}


Enhance stop orders table view to handle the position linked stop order

The Chore
Since it is now possible to have a stop order that will close x% of your position we need a way to show this in the stop order table.
I would think something simple like as the size just show x% of position instead of the actual size?
Acceptance Criteria

[ ] For stop orders where the size if given as a fraction of the position

[ ] Show the size as the percentage of the position

Additional details / background info

This does indeed already work