Mocking final classes

Hi,
Kotlin classes are final by default, when i use this library to test kotlin classes, it gives me the following error:
org.mockito.exceptions.base.MockitoException:
Cannot mock/spy class com.app.network.entity.Movies
Mockito cannot mock/spy because :
 - final class

How do i test this? Please assist

Use mock-maker-inline to mock final classes

I did that but i still get the error. Not sure what else might be missing.
On Fri, Sep 7, 2018 at 8:04 AM Zak Taccardi<EMAIL_ADDRESS>wrote:

Use mock-maker-inline
https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2#mock-the-unmockable-opt-in-mocking-of-final-classesmethods
to mock final classes
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nhaarman/mockito-kotlin/issues/285#issuecomment-419288134,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE2GzHVS_DpwxckaJBCCyf61GAqbpXPPks5uYcYpgaJpZM4WcORA
.

Could you create a MWE for your issue? It's always easier to help if you have a bit more details.

Using mock-maker-inline should fix the issue, perhaps you've misconfigured it? See the original repo for details.

I started seeing this when upgrading to mockito-kotlin2.  I've got mock-maker-inline set up (and was working fine with mockito-kotlin 1.5.0), but after upgrading to v2 I'm seeing:
Caused by: org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: class org.jitsi.jibri.util.OsDetector.
Can not mock final classes with the following settings :
 - explicit serialization (e.g. withSettings().serializable())
 - extra interfaces (e.g. withSettings().extraInterfaces(...))

The class that causes it is final, but has no special settings that I know of:
enum class OsType {
    MAC,
    LINUX,
    UNSUPPORTED
}

class OsDetector {
    fun getOsType(): OsType {
        return when (System.getProperty("os.name")) {
            "Mac OS X" -> OsType.MAC
            "Linux" -> OsType.LINUX
            else -> OsType.UNSUPPORTED
        }
    }
}

I started seeing this when upgrading to mockito-kotlin2. I've got mock-maker-inline set up (and was working fine with mockito-kotlin 1.5.0), but after upgrading to v2 I'm seeing:
Caused by: org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: class org.jitsi.jibri.util.OsDetector.
Can not mock final classes with the following settings :
 - explicit serialization (e.g. withSettings().serializable())
 - extra interfaces (e.g. withSettings().extraInterfaces(...))

The class that causes it is final, but has no special settings that I know of:
enum class OsType {
    MAC,
    LINUX,
    UNSUPPORTED
}

class OsDetector {
    fun getOsType(): OsType {
        return when (System.getProperty("os.name")) {
            "Mac OS X" -> OsType.MAC
            "Linux" -> OsType.LINUX
            else -> OsType.UNSUPPORTED
        }
    }
}

try to add
<dependency>
    <groupId>net.bytebuddy</groupId>
    <artifactId>byte-buddy</artifactId>
    <scope>test</scope>
</dependency>

to the dependencies

I started seeing this when upgrading to mockito-kotlin2. I've got mock-maker-inline set up (and was working fine with mockito-kotlin 1.5.0), but after upgrading to v2 I'm seeing:
Caused by: org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: class org.jitsi.jibri.util.OsDetector.
Can not mock final classes with the following settings :
 - explicit serialization (e.g. withSettings().serializable())
 - extra interfaces (e.g. withSettings().extraInterfaces(...))

The class that causes it is final, but has no special settings that I know of:
enum class OsType {
    MAC,
    LINUX,
    UNSUPPORTED
}

class OsDetector {
    fun getOsType(): OsType {
        return when (System.getProperty("os.name")) {
            "Mac OS X" -> OsType.MAC
            "Linux" -> OsType.LINUX
            else -> OsType.UNSUPPORTED
        }
    }
}

try to add
<dependency>
    <groupId>net.bytebuddy</groupId>
    <artifactId>byte-buddy</artifactId>
    <scope>test</scope>
</dependency>

to the dependencies

I have the same error message when mocking JWTVerifier class (Java, not Kotlin), but adding the bytebuddy dependency doesn't solve the issue for me. This seems like a limitation of Mockito (Section 39: https://www.javadoc.io/doc/org.mockito/mockito-core/2.2.7/org/mockito/Mockito.html#Mocking_Final). Is there any way to bypass it?
Mockito cannot mock this class: class com.auth0.jwt.JWTVerifier.
Can not mock final classes with the following settings :
 - explicit serialization (e.g. withSettings().serializable())
 - extra interfaces (e.g. withSettings().extraInterfaces(...))

public final class JWTVerifier implements com.auth0.jwt.interfaces.JWTVerifier {
    private final Algorithm algorithm;
    final Map<String, Object> claims;
    private final Clock clock;
    private final JWTParser parser;

    JWTVerifier(Algorithm algorithm, Map<String, Object> claims, Clock clock) {
        this.algorithm = algorithm;
        this.claims = Collections.unmodifiableMap(claims);
        this.clock = clock;
        this.parser = new JWTParser();
    }

    static Verification init(Algorithm algorithm) throws IllegalArgumentException {
        return new JWTVerifier.BaseVerification(algorithm);
    }

    public DecodedJWT verify(String token) throws JWTVerificationException {
        DecodedJWT jwt = new JWTDecoder(this.parser, token);
        return this.verify((DecodedJWT)jwt);
    }

    public DecodedJWT verify(DecodedJWT jwt) throws JWTVerificationException {
        this.verifyAlgorithm(jwt, this.algorithm);
        this.algorithm.verify(jwt);
        this.verifyClaims(jwt, this.claims);
        return jwt;
    }
    ...
}

@meganzhao10 A lot has changed since mockito-kotlin 1.5.0. This looks like a problem related to the creation of your mock.
Could you please share the test.

@bohsen This is the test file. I'm able to run the tests successfully in IntelliJ. But mvn test failed with the message that I think it's part of Mockito limitations:
class ControllerTest {

    private Controller controller;

    @Mock
    private JWTVerifier verifier;

    @BeforeEach
    void setUp() {
        initMocks(this);
        controller = new Controller(verifier);
    }

    @Test
    void testFunc1() {
        ...
    }
    ...
}

I also included the pom.xml dependencies if that's helpful
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version><IP_ADDRESS></version>
        </dependency>
        <dependency>
            <groupId>io.lettuce</groupId>
            <artifactId>lettuce-core</artifactId>
            <version>5.2.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.auth0</groupId>
            <artifactId>java-jwt</artifactId>
            <version>3.9.0</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.17.2</version>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.24.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

@meganzhao10 Have you tried including mockito-inline artifact in your dependencies?

@meganxhao10 If the Controller only has a dependency on the abstraction com.auth0.jwt.interfaces.JWTVerifier then I don't see any reason why this shouldn't work.

@meganzhao10 If the Controller only has a dependency on the abstraction com.auth0.jwt.interfaces.JWTVerifier then I don't see any reason why this shouldn't work.

@bohsen You're right that it should have worked. I built a Java container - the test passes with the base image 3.6.3-jdk-11-slim but failed with 3.6.3-jdk-14-slim. Then I switched my Java version from 14 to 11 and mvn test works, though I'm not sure it why the mock doesn't work with Java 14

@meganzhao10 Maybe share this with the original Mockito project? I'm not sure if their CI test suite tests against java 14, but IMO it would make sense to create an issue on this.


Debug icon polish

After merging in the new icons here is still things left to be done:

[ ] Breakpoint hint decoration takes priority over regular breakpoint decoration. If a user hover over breakpoint it should show that decoration, not the transaparent one. For this we would need the breakpoint-hint icon back, since otherwise it is hard for me to prioritize css rules usch that this one is not respected
[ ] Start icon in select box looks too big - compare it to debug toolbar
[ ] Breakpoints have increased in size, let's decrease their size a bit
[ ] Restart icon looks too large

fyi @chryw

@isidorn thanks!
I already have some of these fixed on my own fork. Just tackling some conflicts now. will keep you posted!

@chryw awesome, thanks!

[ ] current-and-brekapoint.svg and stackframe-and-breakpoint.svg are not correct, since they only have the arrow, not the red breakpoint dot
[ ] With the new breakpoint size the conditional breakpoint icon does not really work since the equality lines are too far apart (this can also be seen in your screenshot on the BREAKPOINTS view)
[ ] The new breakpoint size makes the breakpoints looks more square like, and not like a perfect circle. I am not sure if this is just me or the shape of the breakpoint also changed, not only the size?

[ ] Pause buttton might need to have the two parallel lines closer - feels too strong now imho

@chryw Everything is tackled except my comment about the conditional breakpoint - I still feel like the parallel horizontal lines are too far apart and bringing them closer would make it look more like an equality sign which is the point of the icon. What do you think?

@chryw this looks great! So yes yes

@chryw we seem to have done everything on the list. Closing this item.
FYI one use so far complained that we reduced the breakpoint size, but let's wait for more feedback. Just so you know that it might happen that we have to bring back the old size some time next week if more poeple do not like it.
Thanks again for your great help


Separate the engine-part of game_actor

It doesn't really make sense to call game_actor.world to affect something engine-wide and game_actor.rect to affect something of the individual GameActor. Much better would be to get an argument engine and one game_actor. Maybe for that purpose, a static variable called "engine" should be added to GameActors - best would be a dummy-class that contains the engine-things.

The engine parts like input or world are made static two times: Once in EngineWrapper and then again in GameActorComponet - which is unneeded complication. I'll fix it.

NICE JOB ME


cutouts

It would be nice if there was an option to overlay a circular aperture indicating the object in the center of the cutout.

There is already a set of options for overlaying a circle onto all cutouts in plot_cutout() - mark_x, mark_y, mark_r. Currently it only works in pixel coordinates, and the color/linewidth are hardcoded. Do you need more configurability for it?

A bit more control added in 081ba9aa9448bc0e4675a52ef1fdb16e9c8d9f99

It's great, thanks @karpov-sv


python: can't open file 'CUDA_VISIBLE_DEVICES=': [Errno 2] No such file or directory

when I run the shell:
./examples/asr/aishell/run.sh
I got an error:
INFO:absl:Finished processing AISHELL subset test
Computing cmvn
python: can't open file 'CUDA_VISIBLE_DEVICES=': [Errno 2] No such file or directory
what should I do please? Or do I miss something?
Thanks.

"CUDA_VISIBLE_DEVICES=" should be placed before python. Thanks for spotting this bug out


help

i got this error code
C:\Users\gamer\miniconda3\python.exe "C:\Users\gamer\PycharmProjects\brawl_bot1\brawl bot 1\BrawlStarsBot\detection_test.py"
Traceback (most recent call last):
File "C:\Users\gamer\PycharmProjects\brawl_bot1\brawl bot 1\BrawlStarsBot\detection_test.py", line 3, in
from modules.windowcapture import WindowCapture
File "C:\Users\gamer\PycharmProjects\brawl_bot1\brawl bot 1\BrawlStarsBot\modules\windowcapture.py", line 2, in
import win32gui, win32ui, win32con,win32com.client
ModuleNotFoundError: No module named 'win32gui'
Process finished with exit code 1

You must install requirements for code. Try again pip install -r requirements with python 3.11 or older


💡[FEATURE]: Preloader

Is your feature request related to a problem? Please describe.
Yes addition of preloader will increase user interest to the site
Describe the solution you'd like
I would like to add a simple animation that would render until the site is being loaded
Describe alternatives you've considered
The loader would be completely responsive and matching the theme of site
Additional context
Kindly assign this issue to me under GSSoC'24

I would like to work on this issue please assign me


opensmtpd: fix interaction with dovecot-2.3.1

This has been merged upstream at
https://github.com/OpenSMTPD/OpenSMTPD/pull/847
Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
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 nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

cc @obadz @rickynils
For the backport to 18.03, I wonder whether it's best to also backport the 6.0.3p1 update, as it appears to not introduce any backward-incompatibility, and the patch doesn't apply cleanly on 6.0.2p1 (even though it would most likely be easily adapted)

Success on x86_64-linux (full log)
Attempted: opensmtpd
Partial log (click to expand)
shrinking /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/sbin/smtpd
shrinking /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/sbin/smtpctl
shrinking /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/libexec/opensmtpd/mail.local
shrinking /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/libexec/opensmtpd/encrypt
gzipping man pages under /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/share/man/
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/libexec  /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/bin  /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/sbin
patching script interpreter paths in /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1
checking for references to /build in /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1...
moving /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/sbin/* to /nix/store/q1rzdyaw6pp301smqy7p1zw2jffypjwv-opensmtpd-6.0.3p1/bin

Success on aarch64-linux (full log)
Attempted: opensmtpd
Partial log (click to expand)
shrinking /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/libexec/opensmtpd/mail.local
shrinking /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/sbin/smtpctl
shrinking /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/sbin/smtpd
gzipping man pages under /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/share/man/
strip is /nix/store/min150lkigznaayzpwvf8d4jdl1dqvx6-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/libexec  /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/bin  /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/sbin
patching script interpreter paths in /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1
checking for references to /build in /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1...
moving /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/sbin/* to /nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1/bin
/nix/store/884mpjk83fsq4ayf53jzh39a271dch9l-opensmtpd-6.0.3p1

A 6.0.3p1 backport should be fine.

Just opened https://github.com/NixOS/nixpkgs/pull/42168 that should do the backport of 6.0.3p1 as well as of this fix :)

Success on x86_64-linux (full log)
Attempted: opensmtpd
Partial log (click to expand)
shrinking /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/sbin/smtpd
shrinking /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/sbin/smtpctl
shrinking /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/libexec/opensmtpd/mail.local
shrinking /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/libexec/opensmtpd/encrypt
gzipping man pages under /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/share/man/
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/libexec  /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/bin  /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/sbin
patching script interpreter paths in /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1
checking for references to /build in /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1...
moving /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/sbin/* to /nix/store/pcapx63yhnqbl0zp7bbvl6694ksiczsh-opensmtpd-6.0.3p1/bin

Success on aarch64-linux (full log)
Attempted: opensmtpd
Partial log (click to expand)
shrinking /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/libexec/opensmtpd/mail.local
shrinking /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/sbin/smtpctl
shrinking /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/sbin/smtpd
gzipping man pages under /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/share/man/
strip is /nix/store/min150lkigznaayzpwvf8d4jdl1dqvx6-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/libexec  /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/bin  /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/sbin
patching script interpreter paths in /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1
checking for references to /build in /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1...
moving /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/sbin/* to /nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1/bin
/nix/store/i8bcdbzh2s88jjj35606694k425a9xiw-opensmtpd-6.0.3p1

Thanks!


Inaccuracy with PrecipitationProbability

Input:

Result:

Resolved with https://github.com/Banovvv/SimpleWeather/commit/1ab146e22c8003f1fcfcb4a13063d69cbd88c30f


Delayed call and merge of the fix for element being to high to fit in viewport

Hello, i have added more functionality, and

more updates came in


[SPARK-26525][SHUFFLE]Fast release ShuffleBlockFetcherIterator on completion of the iteration

What changes were proposed in this pull request?
Currently, spark would not release ShuffleBlockFetcherIterator until the whole task finished.In some conditions, it incurs memory leak.
An example is rdd.repartition(m).coalesce(n, shuffle = false).save, each ShuffleBlockFetcherIterator contains  some metas about mapStatus(blocksByAddress) and each resultTask will keep n(max to shuffle partitions) shuffleBlockFetcherIterator and the memory would never released until the task completion, for they are referenced by the completion callbacks of TaskContext. In some case, it may take huge memory and incurs OOM.
Actually, We can release ShuffleBlockFetcherIterator as soon as it's consumed.
This PR is to resolve this problem.
How was this patch tested?
unittest
Please review http://spark.apache.org/contributing.html before opening a pull request.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

thanks, merging to master!


⚠ AVS (kty) has degraded performance

In c021359, AVS (kty) (https://avus.com.br) experienced degraded performance:

HTTP code: 200
Response time: 14798 ms

Resolved: AVS (kty) performance has improved in 10fdc7d after 15 hours, 2 minutes.


UserHasLicenseAssignedDirectly over Azure Active Directory V2 PowerShell module

Hi Microsoft
Function "UserHasLicenseAssignedDirectly"
Would it be possible the release or update the guide/documentation for V2 powershell module?
(with Get-AzureADUserLicenseDetail or Get-AzureADUser)
Reference: Azure Active Directory V2 PowerShell module
(https://docs.microsoft.com/en-us/powershell/module/msonline/?view=azureadps-1.0)

Customers are encouraged to use the newer Azure Active Directory V2 PowerShell module instead of this module

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b5905fd6-5899-f2c6-ff56-f90c4183b5f4
Version Independent ID: d4ac0732-5985-702c-3260-f6b615f24292
Content: PowerShell and Graph examples for group licensing - Azure AD
Content Source: articles/active-directory/enterprise-users/licensing-ps-examples.md
Service: active-directory
Sub-service: enterprise-users
GitHub Login: @curtand
Microsoft Alias: curtand

@weyCC81
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

Hi @curtand
Would it be possible to get an update?

@JamesTran-MSFT
Any updates on this?

@weyCC81
Thank you for following up on this!
@curtand, do you have any update on this?

Hi @curtand
Is there an update on this available?

#reassign:@barclayn

@weycc81 thank you for your submission. I have created a work item internally to track this.  #please-close


Updated Installable version of pygdal

In order to allow agpypeline to be installed without conflicting pygdal versions, the tagged version can be updated from 0.0.21 to 0.0.34. Additionally, in order to avoid discrepancies between pygdal and the default gdal version (which appears to be installed separately than the pip installations), different versions of agpypeline are currently being used by transformer-opendronemap's dockerfile and pylint_check.yaml file.

The default version after making the changes is now 0.0.36


unable extract slide title containing equation

I was trying to extract from a pptx file the slide titles. The method proposed here works fine if the title contains only text. However, as soon as the title contains an equation (i.e. generated with the office equation tool), the described method does not work, and instead it gives the following error (let us assume that the slide number is the 26th):
from pptx import Presentation
prs = Presentation('My_Presentation.pptx')
print(prs.slides[26].shapes.text)
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'SlideShapes' object has no attribute 'text'
(on any other "normal title" slide this works just fine and the result is what I would expect)
Any work around for me would do, even completely ignore the equation part within the title as I have quite a few presentations to parse in this way and I cannot really go manual on this.
I am using Python 3.7

Please ask support questions on StackOverflow using the "python-pptx" tag.


Exception error while running example

Hi I got the following Exception error on line 39 (final Either...) of the sample project.
_TypeError (type 'Left<List<ValidationError>, User>' is not a subtype of type 'Either<List<Error>, User>')
Do you have any clue? I am running on Dart 2.7.
Regards,
Pierre

Hi, I replaced the Error class with the ValidationError class and it fixed the problem. I don't know if casting will cause any side effects though. Vraisemblablement
39-40  final Either<List<Error>, User> validationResult =
             userValidator.verify(someUser);

changed to:
39-40  final Either<List<ValidationError>, User> validationResult =
             userValidator.verify(someUser);

Now, I can appreciate the good code that you write.
Regards,
Pierre

Hi @lafpi, thank you for taking the time trying out this package. I've released a new version of the package with better documentation and completely replaced the sample project for a more elaborate one.
All custom error types should implement ValidationError.
I've also put together a small article about the sample project, it its useful:
https://dev.to/danielcardonarojas/form-validations-with-bloc-verify-1aib

Thanks for taking time to respond. I will give it a try.
Pierre


GUACAMOLE-563: Update Tomcat to version 9

@schleyk:
Your commit messages also need to have the JIRA issue prepended to them.

The issue for updating the Tomcat version is GUACAMOLE-450, which resulted in the Tomcat version in use being bumped to 8.5 (see #268). GUACAMOLE-563 requests that the Tomcat version of old releases be retroactively bumped, and was closed as invalid.
Can you speak to why specifically you want to bump all the way to 9, following the bump to 8.5 which has already been completed? If you have a compelling reason why 9 should be preferred for the Docker images going forward (and have tested that the image works correctly), then GUACAMOLE-450 should be reopened citing that reason, with this change referencing GUACAMOLE-450 and not GUACAMOLE-563.

I built the guacamole-client docker image with the latest Tomcat Docker image tomcat:9.0.7-jre9 locally.
All my guacamole connections work without problem on this version:
(RDP, SSH, telnet, VNC with Duo Auth)
I do not see the reason for use an older version of Tomcat?
I change the JIRA issue to GUACAMOLE-450.

I do not see the reason for use an older version of Tomcat?

The 8.5.x series is not an older release; it is an actively-supported version of Tomcat (latest release being 8.5.31 on 2018-04-27) that is well tested with Guacamole. The question is not "why use an older version", but rather "why switch to the latest 9.x rather than the latest 8.5.x".
For this change to be merged, the answer to that question can't simply be "why not." The current state is stable, up-to-date, and known-good. There needs to be a reason behind the change other than the fact the number is bigger.

There needs to be a reason behind the change other than the fact the number is bigger.

...and, some further testing to make sure everything does work in Tomcat 9.  While it seems like you've done a decent amount of testing, Kevin, there are at least several other authentication extensions that need to be verified against Tomcat 9 and JRE 9.  Having that validated would be great - obviously we'll have to get there eventually, but, at this point I agree with Mike, that there isn't sufficient justification or testing here, to move to Tomcat 9 & JRE 9.


Ensure inputs of cosine of solar zenith angle are chunked when needed

Pull Request Checklist:

[x] This PR addresses an already opened issue (for bug fixes / features)

This PR fixes #1536

[x] Tests for the changes have been added (for bug fixes / features)

[ ] (If applicable) Documentation has been added / updated (for bug fixes / features)

[x] CHANGES.rst has been updated (with summary of main changes)

[x] Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

New function xc.core.utils._chunk_like to chunk a list of inputs according to one chunk dictionary. It also circumvents https://github.com/pydata/xarray/issues/6204 by recreating DataArrays that where obtained from dimension coordinates.
Generalization of uses_dask so it can accept a list of objects.
Usage of _chunk_like to ensure the inputs of cosine_of_solar_zenith_angle are chunked when needed, in mean_radiant_temperature and potential_evapotranspiration.

The effect of this is simply that the  cosine_of_solar_zenith_angle will be performed on blocks of the same size as in the original data, even though its inputs (the dimension coordinate) did not carry that information. Before this PR, the calculation was done as a single block, of the same size as the full array.
Does this PR introduce a breaking change?
No.
Other information:
Dask might warn something like PerformanceWarning: Increasing number of chunks by factor of NN. Where NN should be the number of chunks along the lat dimension, if present. That exactly what we want,  so it's ok.

@coxipi  I think that idea is better indeed!
I changed to a chunks arguments in the cosine function itself. The user still needs to know to pass that argument, but it's much shorter!

coverage: 90.433% (-0.006%) from 90.439%
when pulling ce2c5651d6b96ce7f3bd531b31603e6172841754 on fix-1536
into 6efc6766269c93d7ab7133ed818400a00fe627e1 on master.


iox #243 fix posix timer

These are small fixes that should address the segmentation fault in the destructor and several races that may lead to lost callbacks.
I also tried to simplify some code and protect it against against races, but due to time constraints and the current design this could only be done in a limited way.
There are still potential problems in the timer and a redesign is advised, potentially including a variant that is not using a heavyweight callback mechanism which creates threads for each callback.

Please merge latest master into your branch for coverage update.


getPageSource() doesnot capture all window elements. NoSuchElement exception.

Hi,
I am working on automating windows based Classic .Net Desktop application using WinAppDriver.
.getPageSource() is not displaying all the elements.
Attaching the screenshot from inspect.exe.

Below is the pageSource:

I am unable to identify the elements inside Window.
In PageSource only the Window and Title Bar is displayed. All other elements inside the Window are missing.

PageSource:

Other elements such as TabControl etc are not identified.
Any help appreciated.

Hi @umadevisk89,
Can you try sharing the .exe (or tell us where we can download it) so we can repro this?
Also an updated screenshot of Inspect.exe focused on the right window (right now it is focused on the snipping tool) would help as well!
Thanks

Hi @hassanuz ,
Can you share your mail id so that I can share the app?
Thanks

Yes - please do reach out to me at<EMAIL_ADDRESS>

Thanks. Shared the file.
Please have a look into it.

I'm having trouble similar to the mentioned problem. I am using WinAppdriver to automate our custom application. The application is launched, i am able to login by entering username and password and clicking login button. However after loggin in, another window opens up, where in i cannot perform action on any of the controls. I am using AutomationId to identify the control, however it says "no such element found"

I have a similar problem; I can see the app I'm trying to automate in inspect.exe, but if I try to use FindElementByxxx I get "no such element found", and if I dump Root's PageSource, I can see all the other running apps, but not this one.   It is a proprietary app with a complicated setup, so I can't upload a sample setup, but I can upload images of the inspect window and the PageSource xml if that would help.

Seeing the same issue, did anyone ever find a solution?

Did anyone solve this issue? I am not getting the screen elements of the presented screen


Improve theming possibilities for block_content entities

It seems that when using block_content entities there's a poor support for theming.
These 2 functions will add classes and theme suggestions based on the block type:
/**
 * Implements template_preprocess_block().
 */
function kiso_preprocess_block(&$variables) {
  // Add classes for block_content entities, based on block type.
  if ($variables['base_plugin_id'] == 'block_content' && !empty($variables['content']['#block_content'])) {
    /** @var \Drupal\block_content\BlockContentInterface $block_content */
    $block_content = $variables['content']['#block_content'];
    $variables['attributes']['class'][] = 'block--block_content--' . $block_content->bundle();
  }
}

/**
 * Implements hook_theme_suggestions_alter().
 */
function kiso_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
  // Add theme suggestions for block_content entities, based on block type.
  if ($hook == 'block'
    && $variables['elements']['#base_plugin_id'] == 'block_content'
    && !empty($variables['elements']['content']['#block_content'])) {
    /** @var \Drupal\block_content\BlockContentInterface $block_content */
    $block_content = $variables['elements']['content']['#block_content'];
    $suggestions[] = $hook . '__block_content__' . $block_content->bundle();
  }
}

Related d.o issue: https://www.drupal.org/project/drupal/issues/1896098

I think underscores in the class name might probably need to be replaced by hypens - to be consistent with all other classes.

Regarding utility classes to be used within the block.html.twig template, both the configuration.provider and the derivative_plugin_id Twig variables are used to print the generated module (Provider) and a related useful class. These variables pass through the clean_class filter in the Twig template to prepare a string for use as a valid HTML class name (replacing _ by -) [ see Html::getClass() ].
We need to update the following source code:
https://github.com/openfed/kiso/blob/32b2fc2a823630a719cc5ffc2bd34aecf681be1a/includes/preprocess.block.inc#L21-L24
... using the following one (based on your code @lramarojaona):
// "Custom block" provider.
case 'block_content':
  if (!empty($variables['content']['#block_content'])) {
    /** @var \Drupal\block_content\BlockContentInterface $block_content */
    $block_content = $variables['content']['#block_content'];
    $view_mode = strtr($elements['#configuration']['view_mode'], '.', '_');
    $variables['derivative_plugin_id'] = ($view_mode !== 'default') ? $block_content->bundle() . '__' . $view_mode : $block_content->bundle();
  }
  else  {
    $variables['derivative_plugin_id'] = $elements['#derivative_plugin_id'];
  }
  break;

I just added the $view_mode variable when block types are using specific view mode displays other than the "default" one.


Enhance Integrations table

@larsonel suggested some improvements to the integration table:

Date of creation
Clinic ID (Antech)
Last Start/Restart date/Time?
Ability to "copy" the integration ID and then paste it into the Event Filter for Integrations

@monsieurBelbo Would it be useful if we were able to search (either a textbox or a dropdown) by hospital?
For instance, searching for all the integrations in "1326 VCA Bay Park Animal Hospital".


Select should have a higher z-index

Drop down in general should probably have a z-index around 5 to allow for more flexibility in layering.

I am going to make this configurable but also this is a good time to re-evaluate the z-index of all components

Heres what I am thinking
Page/Drawer/Modal 100
Header 50
Dropdowns 10
Other content table headers etc 1-5
Normal Content unset/0

This will be a pretty major breaking change so I will put it in its own PR so users can still get other changes.


Tweak overbright indicator icon to be more visible on white background (3.x)

3.x version of https://github.com/godotengine/godot/pull/54383.
An outline is now present on all sides to ensure it's more visible when the "new" color (on the right of a ColorPicker) is overbright.

Thanks!


handle missing member data

What problems does this PR solve?
Empty member fields in the csv file result in the value being None after parsing the csv. This PR handles that case.
How has the changes been tested?
Unit tests and the action has been tested with expected results.
Reasons for careful code review
If any of the boxes below are checked, extra careful code review should be inititated.

[ ] This PR contains code that could remove data

Thanks! NB: TravisCI fails but upon closer inspection, there is some post-test action that causes the failure. The actual unit tests pass.


Uninstall all datadog integrations on upgrade

What does this PR do?
Uninstall all datadog integrations on upgrade
Motivation
After an upgrade we want the installed integrations versions to be always the ones that ship with the agent package
QA

Install both previous and later integration versions with the integration command
Upgrade the agent to a version with this change (the old version doesn't have to have it)
Check that no leftover files are left (duplicate metadata folders for example)

It should support deb and rpm package formats

Codecov Report

Merging #2684 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2684      +/-   ##
==========================================
+ Coverage   56.69%   56.71%   +0.01%
==========================================
  Files         380      380
  Lines       24094    24094
==========================================
+ Hits        13661    13664       +3
+ Misses       9520     9518       -2
+ Partials      913      912       -1

Impacted Files
Coverage Δ

pkg/secrets/secrets.go
69.89% <0%> (ø)
:arrow_up:

pkg/forwarder/transaction.go
85.47% <0%> (+2.56%)
:arrow_up:

It takes a few seconds for pip to uninstall all the packages:
root@ubuntu-xenial:/home/vagrant# time sh -c "/opt/datadog-agent/embedded/bin/pip freeze  | grep ^datadog- | grep -v datadog-checks-base | xargs /opt/datadog-agent/embedded/bin/pip uninstall -y -q --no-cache-dir"

real	0m2.850s
user	0m2.412s
sys	0m0.384s

I think it's fine to do this during an upgrade

I've tested the operations which previously caused two metadata folders of the same package to be installed, on both ubuntu and centos. Each time, the python environment was cleaned up after an upgrade.

I will look for a solution on Windows

@remicalixte I think this actually deserves a release note, since it does have an impact on the agent's behavior. Could you add one for 6.8?
(side note: it was determined that the issue isn't present on Windows, so no related change is needed on Windows)


No authentication method, requested by the service provider

We are having an issue getting the login page response in "java-saml-tookit-jspsample" working. And this issue is in reference to a previous issue that was closed before: "invalid value on onelogin.saml2.security.requested_authncontext #137" and we believe it to be an issue with property as well:
onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:xc:classes:Password
but we are uncertain to what information we would need.
our shib is:
idp_version: 2.3.8
And this in the idp-process log: 10:07:18.514 - WARN [edu.internet2.middleware.shibboleth.idp.authn.AuthenticationEngine:308] - No authentication method, requested by the service provider, is supported
any help on this issue would be greatly appreciated.

The value on the demo settings is right:
https://github.com/onelogin/java-saml/blob/9588c495663846f83d6cc30d596bf931ee27cd6b/samples/java-saml-tookit-jspsample/src/main/resources/onelogin.saml.properties
I see the one on the Readme is wrong.

You should set:
onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:xc:classes:Password
If that is the AuthNContext supported by your IdP.
Otherwise, set
onelogin.saml2.security.requested_authncontext = urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified
Or leave it empty

oh okay, thank you! so we did try that and clicking the login button brought up our login page , but puting in our own user information brought gave us this error:
invalid_response
The status code of the Response was not Success, was urn:oasis:names:tc:SAML:2.0:status:Responder -> Unable to encrypt assertion
and this is with leaving onelogin.saml2.security.requested_authncontext =, to be empty as we have already tried the other idea you suggested.
so we tried to fill this in the property
onelogin.saml2.sp.privatekey =
and this as well
onelogin.saml2.sp.x509cert =
and we got the cert and private key by trying to get a self sign cert from here: https://developers.onelogin.com/saml/online-tools/x509-certs/obtain-self-signed-certs
and we still are getting the same issue, what would you think could be missing  for it to have a invalid response?

Unable to encrypt assertion is an issue in the IdP side who is not able to encrypt the Assertion of the generated SAMLResponse.
Is possible that you configured the IdP to encrypt the Assertion but you have not provided to the IdP the SP public cert to be used on the encryption process.
if you run the demo and you access to the metadata URL, if the onelogin.saml2.sp.privatekey and onelogin.saml2.sp.x509cert  are ok, and the onelogin.saml2.security.want_assertions_encrypted = true,  the SP metadata should contain a KeyDescription for the encryption process. You should register it properly on your IdP
Or if you don't require encrypted assertion on your use case, try disable it on your IdP.


[BUG] Not able to configure Load Balancer rules in isolated network

Describe the bug
I created an isolated network and I dont see any option to create Load balancer rules.
Only source NAT is enabled in that network
The issue mentioned in https://github.com/apache/cloudstack-primate/issues/678 states that it should be hidden if PF or static nat is enabled. In my case none of them are enabled and still I dont see any options.
This is blocking testing the HAproxy Loadbalancer customization.
To Reproduce
Steps to reproduce the behavior:

Log in as a User or an Admin
Go to Networks
Click on Add networks and create a new Isolated network
Select the isolated network created above. Click on public IP address and select the IP address on which Source NAT is enabled
I dont see any tab for Load balancing

Expected behavior
I should see a tab for load balancing
Screenshots
New ui

I do see load balancing option in old ui

I do see it for VPC though

cc @utchoang @andrijapanicsb

Load balancing rules cant be configured on Source NAT IP in VPC in legacy UI but it can be confgiured in primate which is a bug

@ravening are you working on a fix, or want us to triage?

@rhtyd yes working on a fix. will create pr soon


[stable/cerebro] bump image

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/assign @davidkarlsen

/ok-to-test

/lgtm


Package.getActivationCommands is deprecated.

Deprecated APIs will be removed when Atom 1.0 is released in June.
Use activationCommands instead of activationEvents in your package.json
Commands should be grouped by selector as follows:
  "activationCommands": {
    "atom-workspace": ["foo:bar", "foo:baz"],
    "atom-text-editor": ["foo:quux"]
  }

Package.getActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:808:9)
Package.hasActivationCommands (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:733:20)
<unknown> (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:185:24)
Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:163:15)
Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:177:12)
PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:355:14)

Thanks I'll check this out ASAP :+1:

Fixed, thanks!


Fixed some issues around ReferenceCodec in OpenAPI spec rendering

There is a currently an issue where declareSchemaRef from the openapi3 package interferes with the way that ReferenceCodec controls its recursion to prevent infinite loops. What ends up happening is that declareSchemaRef preregisters the named schema into the Declare monad to prevent infinite loops, which is the same technique that ReferenceCodec uses, which results in ReferenceCodec not running fully and declaring all the necessary dependent schemas. declareSchemaRef is used by servant when generating OpenAPI specs, so that's how I ran into this issue.
I solved this problem by tracking the recursion state of declareNamedSchemaVia in a separate State monad instead of doing it in the Declare monad. This way it does not conflict with declareSchemaRef.
I've added a MutuallyRecursiveA test case and set of golden tests that use declareSchemaRef that demonstrate the problem (autodocodec-api-usage/test_resources/openapi-schema/declareSchemaRef/mutually-recursive.json).
The PR also fixes an issue where the NamedSchema returned when processing ReferenceCodec was not renamed with the name specified. This resulted in unnecessary duplicate schemas getting added to the final OpenAPI spec. You can see this particular issue by looking at the old golden test result for the Recursive type (autodocodec-api-usage/test_resources/openapi-schema/recursive.json), which has a duplicate spec in there.
I also adjusted the LegacyValue test case (autodocodec-api-usage/test_resources/openapi-schema/legacy-value.json) because both the "new" and "old" objects were given the same name, which resulted in the final schema missing the actual definition of the old object schema. By giving the old object a different name, the OpenAPI schema now correctly contains both the old and new schemas.
I've added the tests commit before the fixes, so if you check out that commit you can see how the existing code fails.

This looks like a perfect PR, but CI is derping out. Let me see if I can get it to run.

You'll need this diff to make CI happy about formatting:
https://pastebin.com/vLhwbGvm
And this diff to make --pedantic happy:
https://pastebin.com/eGXtQZKR

@NorfairKing Thanks for those patches, I've applied them 🙂

@NorfairKing Is there something more I can do to help get this PR merged? 🙂

Oh dear @daniel-chambers I'm sorry I missed this. Thanks for the extra ping. Let me get this merged today.

@daniel-chambers I can merge as-is but then I cannot release to hackage.
Any chance you could do the version bumps and changelog updates?
I think your changelog description would be more accurate than what I could write.

@NorfairKing No problem! I've given it a major version bump because all the functions in Autodocodec.OpenAPI.Schema are exported by default and I changed the type signature of two top level functions in there. It does feel like the two functions I changed probably shouldn't be exported though, they look like utility functions for the module internals to me...
Hopefully the changelog notes are okay! It's a bit hard to be concise and still describe the changes well, unfortunately. 😀

Unless you want to release #15 as a whole separate version, perhaps we could merge this PR, update the changelog in that PR and then release both together as <IP_ADDRESS>? (The author of #15 is my colleague and we'd like both changes released if possible 🙂)

@daniel-chambers Excellent. Merging both now.


2212.0.0 release planning

[ ] #94
[ ] #95
[ ] #96
[ ] #151
[ ] #119
[ ] #159
[x] #39
[ ] #61
[ ] #129
[ ] #137
[ ] #55
[ ] #57

I will take #119, #159, #61, #129

I will work with @THagen-BB to work on #96. For #95 I think we need some clarification on what the ask is here, is it as simple as removing the enumerations corresponding to Elements we have created in the taxonomy?

Closing due to 2305.0.0 release, in favor of a new issue to track the next release.


chrome crashes when  upload 1.8G video

the online version is ok .  use master , cant upload file ?

hi , how did you fix it. I'm facing the same problem


PR for Issue 788 - Redis updated for UUID, contracts, and propagated across services

This brings Redis to Core Data, Core MetaData, Export Client, and Scheduler. The notification service will be merged separately. There is no plan to support the Logger which defaults to using a file.
Please note changes to metadata/rest_command.go and metadata/rest_deviceprofile.go; there are inconsistencies with how err == ErrNotFound and err == nil are treated and this is my proposed workaround. At some point we should make a decision on what the right way is and propagate those changes.
There are a few Black Box tests that are failing from what I believe are minor bugs in the tests. I will need to revisit that.

@andresrinivasan Thanks for the PR. When you have a chance, can you squash the commits please?

@andresrinivasan I think this looks good enough to pull in so we can make additional tweaks. Testing via blackbox looks pretty good. Can you rebase and squash your commits please?

Hmmm. That didn't work out the way I expected. Backing out.

Much better.

recheck


Revert "Merge pull request #736 from golem131/Scala-2.11.9"

This reverts commit d1eb03d47a7ec06389c0891f72164f5ec8d8fe42, reversing
changes made to 17ef9b39e7cf1de1aca72388926529cd740022d7.
thx: https://github.com/getquill/quill/pull/736#issuecomment-291794084
Problem
https://github.com/scala/scala/pull/5821
Solution
Use old scala version.
Checklist

[x] Unit test all changes
[x] Update README.md if applicable
[x] Add [WIP] to the pull request title if it's work in progress
[x] Squash commits that aren't meaningful changes
[x] Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

@fwbrasil revert is bad idea. Scala already released 2.11.10 version. See #739

you're right. thanks.


Problem with creating event subscription using the quickstart guide

This is autogenerated. Please review and update as needed.
Describe the bug
I am working through the "Quickstart: Route custom events to web endpoint with Azure CLI and Event Grid" example at https://docs.microsoft.com/en-us/azure/event-grid/custom-event-quickstart#code-try-5 and got stuck here:
az eventgrid event-subscription create
--source-resource-id "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.EventGrid/topics/$topicname"
--name demoViewerSub
--endpoint $endpoint
I am really not sure what the issues is, since I am only learning, but maybe one of the engineers might test the quickstart guide through.
Command Name
az eventgrid event-subscription create
Errors:
'subscription-id'
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 631, in execute
    raise ex
cli/core/commands/__init__.py, ln 695, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 688, in _run_job
    six.reraise(*sys.exc_info())
...
python3.6/site-packages/msrest/service_client.py, ln 108, in _request
    request = ClientRequest(method, self.format_url(url))
python3.6/site-packages/msrest/service_client.py, ln 151, in format_url
    url = url.format(**kwargs)
KeyError: 'subscription-id'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az eventgrid event-subscription create --source-resource-id {} --name {} --endpoint {}

Expected Behavior
Environment Summary
Linux-4.15.0-1082-azure-x86_64-with-debian-stretch-sid
Python 3.6.5
Installer: DEB

azure-cli 2.5.1 *

Additional Context

eventgrid

Thanks for looking into this. I managed to create the subscription in the Azure Web interface, so this seems to be more of a problem with the guide's CLI commands (or my interpretation of them), not with the the Event Grid itself.

Hello @suterma . Thanks for reporting this issue. If you are using { } as part of the command while they are meant to be placeholders for the values for subscription Id, resource group, etc.
the source-resource-Id represents the ARM Id for the topic on which the event subscription is created. For example, let us assume that you want to create an event subscription on a custom topic that is (already created) in

Azure Subscription: 1380c0bd-8cc0-483a-8718-5ebd2affdf87,
Resource Group: ResourceGroupExample
Topic Name: TopicExample
endpoint https://www.example.com/index
The command will look like:

az eventgrid event-subscription create
--source-resource-id "/subscriptions/1380c0bd-8cc0-483a-8718-5ebd2affdf87/resourceGroups/ResourceGroupExample/providers/Microsoft.EventGrid/topics/TopicExample" --name demoViewerSub --endpoint https://www.example.com/index
Please let us know if this resolve this issue for you and if further help is needed.
We will add work item to investigate if we can improve these help text further
thanks

Thanks for your input, and yes, this resolves the issue at hand.
Unfortunately it was not clear to me that the bracketted terms must be replaced, especially because I was not aware of how to get the azure subscription id. So I assumed they might be meant literally.
Another reason is, in all the previous commands in this guide, the placeholders were expressed with $ variables.
I am closing this issue here, but I suggest for the written guide, that this particular command gets changed to use the $ style variables style too.


Record statistics on which test covers which condition

Assuming that gobco would output which test covers which condition, it would be possible to answer questions like the following:

For each testee, is there a test that covers all branches of that testee? (minimal unit tests)
Which tests are necessary to get 100% branch coverage for a given testee?

Implementation ideas:

Have an additional list of test names for each condition, possibly indirectly by mapping the test name to an int for performance.
Extend the gobco JSON output with this list of tests.

Hi @visu-suganya, as you already guessed, gobco does not really provide branch coverage but instead condition coverage, despite its name. Up to now, I didn't need branch coverage, as I could tell from the missing conditions what parts of the code are still uncovered. Do you actually need the branch coverage, or is it merely a feeling of "the program is named gobco, so it should report branch coverage"? What use case do you have that requires branch coverage but not condition coverage?

@rillig
Thanks for the immediate reply.
I need branch coverage result so that developers can easily fix when compared to condition coverage.
In branch coverage, only 2 outcomes totally but in condition coverage, need to cover all the 4 outcomes(it will be difficult to cover all in development period).
So Firstly I need to achieve branch coverage as first step and then go for condition.

Hi @rillig
Is there any possibility to get C1(branch coverage) output?

To get C1 output, you can change the method instrumenter.markConds by removing the branches for *ast.UnaryExpr and *ast.BinaryExpr. If that generates the output that you expect, I'll include it in the next release.

@rillig Thanks for the implementation and please release the implemented feature so that I can use it.
Thanks a lot.

I don't have plans to add this feature anymore. In the past few years I didn't have a need for it.
The comments on this issue are generally off-topic, they are not about finding out which tests cover which code, but about implementing branch coverage in addition to condition coverage.


Add more tests and S gate

Added S gate translation and test for KronBlock

@Roger-luo Does this PR require anything else?
If not, I think its good to merge


New image transformation example

Motivation
Fixes #50
Related to #65
The showcase of image transformation possibilities.
Checklist

[ ] Code follows coding conventions held in this repo
[ ] Automated tests have been added
[ ] Tests are passing
[ ] Docs have been updated (if applicable)
[ ] Temporary settings (e.g. variables used during development and testing) have been reverted to defaults

How to test
If manual testing is required, what are the steps?

@rshackleton  - what do you think about it - I think it might be a decent resource for image transformation start.


Change port forward command order in default note

Signed-off-by: Aisuko<EMAIL_ADDRESS>
What this PR does / why we need it:
We should take to get POD_NAME at first and forward pod's port to the local port, at last, print it to the screen.
Special notes for your reviewer:
If applicable:

[x] this PR contains documentation
[ ] this PR contains unit tests
[ ] this PR has been tested for backwards compatibility

/retest

@Aisuko Looks good. Can you rebase and push changes to kick off a build again? Seemed an issue with build system previously.

@hickeyma  Rebuild has been succeeded.  Once invoked, it waits for user input to exit (CTRL + C), which is why the echo was on the earlier line. Now when a user copies those commands and attempts to execute them, the echo will not be shown.
I think this needs to be reverted.


custom background image

Anyone know how I can use a custom background image for ly instead of the animation or standard black background?

Ly is a CLI application. Unless you manage to convert your image to 16 colors and keep it decent you can't. And even if you managed to make that image, you should implement it yourself

Like @IlmastroStefanuzzo  said if you want an image you have to convert it to ASCII art in the resolution of your terminal(not monitor res). It's kind of a pain in the neck but I've created some custom animations(a still image would just be an animation that never updates) for my self here.
Look for the doom/rainbow/nyan functions and their relevant _init funcs. I can try to answer any questions you might have, but it's been awhile since I made these animations and this project seems like it might be dead so I'm not really invested in it.

Thanks for getting back to me guys. I was thinking something like the FreeBSD Beastie ASCII logo. Problem is I can only use my from FreeBSD pkg because when I try to compile the git source it doesn’t work cause some of the libs are different on FreeBSD.

Btw you can use jp2a to turn jpg images to ASCII art. You can get a colored output with --color and adjust the width with --width=[number of character] (it will automatically change the height to maintain the ratio)

A demonstration of jp2a

A demonstration of jp2a

How can I add the ASCII image to the ly configuration?

As discussed in #324, ASCII art background images and profile pictures won't make it into Ly, sorry :(


Please fix the podspec file for RN > 0.60

pod install gives issue that the homepage is missing in the podspec file.. please fix this from
Pod::Spec.new do |s|
  s.name         = "RNIKInteractiveImageLibrary"
  s.version      = "1.0.0"
  s.summary      = "RNIKInteractiveImageLibrary"
  s.description  = <<-DESC
                  RNIKInteractiveImageLibrary
                   DESC
  s.homepage     = ""
  s.license      = "MIT"
  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
  s.author             = { "author" =><EMAIL_ADDRESS>}
  s.platform     =  :ios, "7.0"
  s.source       = { :git => "https://github.com/author/RNIKInteractiveImageLibrary.git", :tag => "master" }
  s.source_files  = "RNIKInteractiveImageLibrary/**/*.{h,m}"
  s.requires_arc = true

  s.dependency "React"
  #s.dependency "others"
end

TO
Pod::Spec.new do |s|
  s.name         = "RNIKInteractiveImageLibrary"
  s.version      = "1.0.0"
  s.summary      = "RNIKInteractiveImageLibrary"
  s.description  = <<-DESC
                  RNIKInteractiveImageLibrary
                   DESC
  s.homepage     = "https://github.com/InterfaceKit/react-native-interactive-image-gallery"
  s.license      = "MIT"
  # s.license      = { :type => "MIT", :file => "FILE_LICENSE" }
  s.author             = { "author" =><EMAIL_ADDRESS>}
  s.platform     = :ios, "7.0"
  s.source       = { :git => "https://github.com/author/RNIKInteractiveImageLibrary.git", :tag => "master" }
  s.source_files  = "RNIKInteractiveImageLibrary/**/*.{h,m}"
  s.requires_arc = true

  s.dependency "React"
  #s.dependency "others"

end

I've made a PR to fix the autolinking @alvaromb
https://github.com/InterfaceKit/react-native-interactive-image-gallery/pull/12


Improve reliability of release version rollout tracking

Before this commit, a new release image rollout version was assumed to be
successful without any meaningful invariants being enforced. As a result,
observers were given inaccurate information about the current state of the
rollout (e.g. reporting rollout success when the underlying CVO rollout is
incomplete or failing).
Now, when the hostedcluster reports that a release version is Completed, the
user can have more confidence that the version has actually been rolled out all
the way through to the hosted cluster's OCP components.
To achieve this, the hosted control plane operator now inspects the underlying
CVO of a hosted cluster and incorporates the CVO's clusterversion state into
the hostedcontrolplane rollout tracking functions. For example, when rolling
out a new release image for a hostedcontrolplane, completion will only be
reported once the clusterversion inside the hosted cluster reports having
completed rollout of the semver for the release image.
As an additional piece of state to leverage for rollout analysis, the Failing
condition of the clusterversion is now mirrored to the hostedcontrolplane
status via the ClusterVersionFailing condition to provide a more authoritative
proxy for hosted cluster operator health in aggregate.
Internally, the hosted control plane operator is now capable of efficiently
inspecting hosted cluster resources as well as triggering hostedcontrolplane
reconciliation based on events originating from the hosted apiserver. This
capability is driven by a new intermediate caching abstraction paired with a new
cache management controller which knows how to reconcile hosted cluster
kubeconfigs and maintain an internal resource cache with event handlers. This
cache is shared with the hosted control plane controller and provides the hosted
apiserver client and event access.

If this is the correct way forward, I can clean up the factoring and port the e2e tests to remove the direct guest cluster inspections and replace them with checks against the new condition type.

@csrwng has suggested we consider instead looking at the clusterversion resource; need to talk through that and make a decision.

@csrwng has suggested we consider instead looking at the clusterversion resource; need to talk through that and make a decision.

Turns out the clusterversion only tracks operator status during rollouts, when what we want here is a steady state analysis of operator conditions. So as far as I know, clusteroperator is the best thing we have to track.

/test e2e-aws-pooled

Squashed/fixed up commit message.

/lgtm
/hold

/hold cancel


[QUESTION] SkRuntimeEffect and making the image background transparent.

Hi,
I wish to make an image background transparent and have the following solution as suggested on the Skia Google group:
https://jsfiddle.skia.org/canvaskit/12da8034d9fbf655956ba745d76acc9b9dc053ae78e468256624400b8a1015cb
https://groups.google.com/forum/#!topic/skia-discuss/gjr5-ZpSX80
This solution works very well and I am in the process of converting this to use SkiaSharp.
I ran into a problem with SkRuntimeEffect  as it does not seem to be available?
My question's are as follows:

Is SkRuntimeEffect  available and if not is their an alternative?
Is there an existing SkiaSharp solution for doing this? Simply put I want to pick a color in an image and replace it with transparency.

Here is the Skia code:
// #slider0:threshold #slider1:exponent
// Format Code shortcut (Shift + Alt + F)

const surface = CanvasKit.MakeCanvasSurface(canvas.id);
if (!surface) {
    throw 'Could not make surface';
}

slider1.value = 0.2
slider0.value = 0.4

const getExponent = () => slider1.valueAsNumber * 15;
const getThreshold = () => slider0.valueAsNumber * 3;

const skcanvas = surface.getCanvas();
const paint = new CanvasKit.SkPaint();

const prog = `
 in fragmentProcessor color_map;
 uniform float scale;
 uniform half exp;
 uniform float3 in_colors0;

 void main(float2 p, inout half4 color) {
    half4 texColor = sample(color_map, p);
    if(length(abs(in_colors0 - pow(texColor.rgb, half3(exp) ) )) < scale) discard;
    color = texColor;
 }`;

function main(textureImgData) {
    const context = CanvasKit.currentContext();
    const textureShader = CanvasKit.MakeImageFromEncoded(textureImgData).makeShader(
        CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp);

    const fact = CanvasKit.SkRuntimeEffect.Make(prog);

    function drawFrame() {
        CanvasKit.setCurrentContext(context);
        skcanvas.clear(CanvasKit.BLACK);

        const shader = fact.makeShaderWithChildren([getThreshold(), getExponent(), 1.0, 1.0, 1.0], true, [textureShader]);
        paint.setShader(shader);

        skcanvas.drawRect(CanvasKit.LTRBRect(0, 0, 400, 400), paint);
        surface.flush();
        requestAnimationFrame(drawFrame);
        shader.delete();
    }
    requestAnimationFrame(drawFrame);

}

const loadBrick = fetch(

    'https://cdn.shopify.com/s/files/1/0161/0482/products/AyeGear_T5_tshirt_with_pockets_clothing_fashion_style_hiking_fishing_cycling_scottevest_pickpocket_proof_concealed5.jpg?v=1502127434')
    .then((response) => response.arrayBuffer())
    .then(main);

Thanks
Mark.

The work to expose SKRuntimeEffect was started in: https://github.com/mono/SkiaSharp/pull/1321
As soon as the package builds, then you can test a few things and see if it is working as expected.

I have been fiddling around here and I think I got something that is pretty nice. Let me know your thoughts on the API:
// input values
SKCanvas canvas = ...;
float threshold = 1.05f;
float exponent = 1.5f;

// shader
var src = @"
in fragmentProcessor color_map;

uniform float scale;
uniform half exp;
uniform float3 in_colors0;

void main(float2 p, inout half4 color) {
	half4 texColor = sample(color_map, p);
	if (length(abs(in_colors0 - pow(texColor.rgb, half3(exp)))) < scale)
		discard;
	color = texColor;
}";
using var effect = SKRuntimeEffect.Create(src, out var errorText);

// input values
var inputs = new SKRuntimeEffectInputs(effect);
inputs.Set("scale", threshold);
inputs.Set("exp", exponent);
inputs.Set("in_colors0", new[] { 1f, 1f, 1f });

// shader values
using var blueShirt = SKImage.FromEncodedData(Path.Combine(PathToImages, "blue-shirt.jpg"));
using var textureShader = blueShirt.ToShader();
var children = new SKRuntimeEffectChildren(effect);
children.Set("color_map", textureShader);

// create actual shader
using var shader = effect.ToShader(inputs, children, true);

// draw as normal
canvas.Clear(SKColors.Black);
using var paint = new SKPaint { Shader = shader };
canvas.DrawRect(SKRect.Create(400, 400), paint);

This looks amazing!
The only think I would change is easier constructs to bind the uniforms:
var inputs = new SKRuntimeEffectInputs(effect);
inputs["scale"] = threshold;
inputs["exp"] = exponent;
inputs["colors0"] = new[] { 1f, 1f, 1f };

or
var inputs = new SKRuntimeEffectInputs(effect)
{
      ["scale"] = threshold,
      ["exp"] = exponent,
      ["colors0"] = new[] { 1f, 1f, 1f }
}

@Ziriax Thanks for the feedback. I updated the code to use the much better indexer and/or the dictionary initializer.
With regards to the color/vectorx, I need to finish binding the other math types that is used by skia. The are obsoleting/removing a few of the more clunky ones and may be pretty useful to investigate whether the system versions are compatible.

You are doing so much work at such a fast pace, amazing.

@mattleibow this is awesome. Super excited to start testing later today. Many thanks.

It seems the SKRumtimeEffect depends on the surface. I use it with the UWP SKXamlCanvas and the app crashed. But I use SKSwapChainPanel, it works well. :confused:

Ah, yeah. That is correct for now.
The current build only has the GPU support. I need to fix up some compiler issues and dependencies for the CPU interpreter for the effects.

Great! I think it's time for me to learn SKSL. Thanks for your job on SkiaSharp.

Merged in https://github.com/mono/SkiaSharp/pull/1604


Investigate adding ocaml-tree-sitter Hack tests to CI tests

Is it https://github.com/returntocorp/ocaml-tree-sitter-languages or https://github.com/returntocorp/ocaml-tree-sitter-semgrep that tests different Hack repos against their parser?
Wonder if we can leverage some of their work and run their tests as part of this repos CI tests (first we need to add CI tests 😅).

ocaml-tree-sitter-languages and ocaml-tree-sitter-semgrep are currently in the process of being split and re-organized, so as of right now the answer is both. Both languages repo and semgrep repo have a Hack subfolder that lists projects to scan for parsing stats. The process is briefly described here: https://github.com/returntocorp/ocaml-tree-sitter-languages/blob/main/doc/adding-a-language.md#parsing-statistics. However, there are some existing flaws in this process, like not properly capturing PHP vs Hack files since the scanning is entirely based on file extensions. Or, incorrectly identifying files with Hack-like extensions (https://github.com/returntocorp/ocaml-tree-sitter-languages/pull/6).
Generally, the OCaml parser seems to inherit any flaws in the original grammar, so for the most part any errors in the grammar that trigger with t-s-h's npx tree-sitter parse would reappear with o-t-s's make stat. make stat functions very similarly to bin/fetch-examples; bin/test-examples in that it relies on cloning a list of public repos to generate statistics against. The process is here: https://github.com/returntocorp/ocaml-tree-sitter-core/blob/main/scripts/lang-stat (this can publish to https://dashboard.semgrep.dev/metric/semgrep.core.hack.parse.pct). Also it can handle internal private repos, which is helpful for a language like Hack that doesn't have a lot of large open source repos.
The t-s-h corpus tests are still the only tests that actually test the correctness of parse results instead of just checking for explicit parse errors.


Let PrecedenceGroupDeclSyntax conform to BracedSyntax

You also need to remove the XFail here
https://github.com/apple/swift-syntax/blob/6e708c4fa643057f41e3af7e6c0a2c405a487e56/CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift#L520

Oh, that means this conformance was intentionally left out? Is it okay then to add it now?

I created these XFails at some point but it looks like we just never went through this one and re-considered it. I don’t see a reason why PrecedenceGroupDeclSyntax should’t conform to BracedSyntax.

@swift-ci Please test Windows


Environment variable AZ_BATCHAI_NUM_GPUS is returning empty string

Hi, while trying to setup a distributed learning job with TF I found out that AZ_BATCHAI_NUM_GPUS variable (described here) doesnt exist and it returns an empty string:
Part of my job.json config:
...
"masterCommandLineArgs": "--job_name=worker --num_gpus=$AZ_BATCHAI_NUM_GPUS
...

Error msg:
 error: argument --num_gpus: invalid int value: ''

Either support that variable or fix the docs 😀
Thanks!
CC: @AlexanderYukhanov

thank you for reporting the issue, working on the fix


Workout Planner Extension

Problem Statement
Users often struggle to keep track of their workout routines and goals.
Solution
Develop a workout planner extension.
Additional context
The extension should have a user-friendly interface with intuitive navigation.

Please assign this to me if you like the idea, mam @Sulagna-Dutta-Roy


[@azure/openai] fixed openAI credentials

Packages impacted by this PR
@azure/openai
Issues associated with this PR
https://github.com/Azure/azure-sdk-for-js/issues/26021
Describe the problem that is addressed by this PR
It's evident that when we use an OpenAI key
https://github.com/Azure/azure-sdk-for-js/blob/ad7b405ee43d76778f3f65ffd40f898d6481ee7e/sdk/openai/openai/src/OpenAIClient.ts#L113-L119
We set the credentials to use apiKeyHeaderName: "Authorization", however when you create the client it completely overrides the options. This leads to the following error from openAI's API:
error: {
    message: "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
    type: 'invalid_request_error',
    param: null,
    code: null
  }

Wanted to tag some relevant contributors:
@deyaaeldeen @jeremymeng @joheredi

Thank you so much for addressing this issue.
@MaryGao could we update the code generator accordingly?

@deyaaeldeen I think this issue is already resoloved in our latest codegen.
https://github.com/Azure/autorest.typescript/blob/main/packages/typespec-test/test/openai_modular/generated/typespec-ts/src/rest/openAIClient.ts#L23-L29


Investigate usage of git pre-commit hooks

It would be nice to have pre-commit hooks that run rustfmt, clippy, and tests. Need to do research into a smooth workflow

Sorry to interject now, but I question the wisdom of using pre-commit hooks. If you wish all submissions to be rustfmt- and clippy-clean, then you may state that in your contributing guide (you do already for the first) and even enable CI testing if you wish (I have found this a nuisance in the past but it's viable).
Running these automatically during pre-commit could impact workflow negatively given that rustfmt actively adjusts code (I have had it prevent code from compiling before). Using a pre-receive hook may make more sense (see https://githooks.com/).
I'm not sure that @paulkernfeld's solution will help much given that many users are used to typing cargo test and cargo fmt? It is simply another way of achieving the same thing.

It's interesting that rustfmt can break your code, that doesn't seem like something that should happen. I mostly opened this issue because it's hard to tell in a PR whether or not rustfmt has been run, particularly with white-spacing. This then becomes a slight nuisance later on when I or someone else edits a file that sneaked in without formatting, and our PRs become bloated with formatting changes.
I'm going to play around with @paulkernfeld branch and cargo make for a little but I'm also open to other suggestions to resolve the above issue

It's interesting that rustfmt can break your code, that doesn't seem like something that should happen.

They've probably fixed it by now; it was a corner-case involving a range (..) and other op.
I tried running rustfmt on the Rand project this week; nothing broke but I decided the result was in many cases worse than the current formatting (in my opinion).

I'm personally less interested in the formatting than just having it be consistent for everyone who contributes. We can always customize the formatting through the TOML file


[c4] dict

Background: carmen is using the stat index as a fast "does this key exist" lookup to save on i/o when there's no grid to be loaded from a shard anyway. This was previously implemented using the same type of cache + the _exists check to save on parsing the protobuf message fully.
This PR switches to:

Using sparse_hash_set as a dictionary for doing this check,
Alternatively loading a PBF into this second dictionary cache using loadAsDict()
Looking up a dictionary value from a shard using the _dict() method

What test/cache.bench.test.js has to say about this:
c4
# bench load
ok 3 load x256 took 29704ms
{ rss:<PHONE_NUMBER>, heapTotal: 7195904, heapUsed: 3495056 }

c4-dict
# bench load
ok 3 loadAsDict x256 took 19397ms
{ rss: 233611264, heapTotal: 7195904, heapUsed: 3499864

o_O nice perf win


Expose getMarkets to RPC

totally...

I'd like to get a full suite of test-client.js payloads, since unit tests dont' actually test the json dispatch and would have caught this.


EK-147: Updated the template to include all names of intellcont_auth, convert ternary operations to if() statements

…_auth
currently using semicolon as delimeter

The most recent item in this timeline is a review request, but there are still unresolved comments from the first review (see the diff). Prod renders a dash that is missing now.


Feature Collection pop-up definition-re-evaluate what we expose

The feature collection popup information exposes all of the details for baseline attribute information, information we use for geocoding and our own internal information. We need to reevaluate what we want exposed.

This is already fixed.


App outbound connecting timed out because App selected an ephemeral port that collisions with the existing socket on 15001(outbound) listener

Bug Description
Sidecar intercept and TCP proxying all outbound TCP connection by default:
(app --[conntrack DNAT]--> sidecar) -----> upstream-tcp-service
But in some scenarios, App just get a connect timed out error when connecting to the sidecar 15001(outbound) listener.
Scenarios:

When sidecar has a half-open connection to App. e.g:
$ ss
tcp FIN-WAIT-2 0 0 <IP_ADDRESS>:15001  <IP_ADDRESS>:44410(POD_IP:ephemeral_port)

This can happen, eg:  TCP Proxy half-closed connection leak for 1 hour in some scenarios #43297
There is no track entry in conntrack table because nf_conntrack_tcp_timeout_close_wait time out and expired.

App invoke syscall connect(sockfd, peer_addr) , kernel allocation a ephemeral port(44410 in this case) , bind the new socket to that  ephemeral port and sent SYN packet to peer.

SYN packet reach conntrack and it create a track entry in conntrack table:

$ conntrack -L
tcp  6 108 SYN_SENT src=<IP_ADDRESS> dst=<IP_ADDRESS> sport=44410 dport=7777 src=<IP_ADDRESS> dst=<IP_ADDRESS> sport=15001 dport=44410

SYN packet DNAT to <IP_ADDRESS>:15001

SYN packet reach the already existing FIN-WAIT-2 <IP_ADDRESS>:15001  <IP_ADDRESS>:44410 socket, then sidecar reply a TCP Challenge ACK (TCP seq-no is from the old FIN-WAIT-2) packet to App

App reply the  TCP Challenge ACK with a RST(TCP seq-no is from the TCP Challenge ACK)

Conntrack get the RST packet and check it. In some kernel version, conntrack just invalid the RST packet because the seq-no is out of the  track entry in conntrack table which created in step 3.

App will retransmit SYN but all without an expected SYN/ACK reply.  Connect timed out will happen on App user space.

Different kernel version may have different packet validate rule in step 7:
RST packet mark as invalid:
  SUSE Linux Enterprise Server 15 SP4:
    5.14.21-150400.24.21-default

# cat /proc/sys/net/netfilter/nf_conntrack_tcp_ignore_invalid_rst
0

####################

RST packet passed check and NATed:
  Ubuntu 20.04.2:
    5.4.0-137-generic

# cat /proc/sys/net/netfilter/nf_conntrack_tcp_ignore_invalid_rst
cat: /proc/sys/net/netfilter/nf_conntrack_tcp_ignore_invalid_rst: No such file or directory

It seems related to kernel patch: Add tcp_ignore_invalid_rst sysctl to allow to disable out of
segment RSTs which merge to kernel after kernel v5.14
Good news is that, someone will fix the problem at kernel v6.2-rc7: netfilter: conntrack: handle tcp challenge acks during connection reuse:
When a connection is re-used, following can happen:
[ connection starts to close, fin sent in either direction ]
 > syn   # initator quickly reuses connection
 < ack   # peer sends a challenge ack
 > rst   # rst, sequence number == ack_seq of previous challenge ack
 > syn   # this syn is expected to pass

Problem is that the rst will fail window validation, so it gets
tagged as invalid.

If ruleset drops such packets, we get repeated syn-retransmits until
initator gives up or peer starts responding with syn/ack.

But in some scenarios and kernel version, it will be an issue anyway.

More detail info
Version
$ ./istioctl version
client version: 1.16.2
control plane version: 1.16.2
data plane version: 1.16.2 (4 proxies)

$ kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.25.3
Kustomize Version: v4.5.7
Server Version: v1.25.6

CNI: Calico

Additional Information
No response

@labilezhu  thanks for reporting this, any ways to prevent it?

In istio i am not sure option 2 is possible. Option 3 is relatively complex.
Looks option 1 is the most simple way to do.

Thanks for the super detailed report. This seems like https://github.com/istio/istio/issues/38982 - is it the same or just similar?

/reopen
Now close_wait time is 60s by default in linux kernel, so if app keep in close_wait for more than 60s, then this issue will happen.

Vote to reopen this issue. We also encountered this connection timeout problem.
Even if the RST packet in step 7 is not invalideated，It would still take at least 1 second (based on rfc6298 ) to retransmit SYN packet, and 1 second is too long for many online services.


New package: Jigsaw.OutlineClient version 1.12.1

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:
(Automated response - build 870.)

Hi @rakleed,
The installation is unattended, but installs a driver which isn't unattended:

Unfortunately, installer switches are not usually provided for this situation. Are you aware of an installer switch to have the driver silently install as well?

Are these options not suitable for Winget?

https://forums.openvpn.net/viewtopic.php?t=28084
https://superuser.com/q/946105

Are these options not suitable for Winget?

https://forums.openvpn.net/viewtopic.php?t=28084
https://superuser.com/q/946105

I don't see why they wouldn't be suitable for WinGet. But they'd have to be added to the installer by the developer.

Edit: Would Insecure.Npcap work?

What are you talking about? I could find such solution.

Edit: Would Insecure.Npcap work?

What are you talking about? I couldn't find such solution.


issue #227 add parallelizeBatches config option (WIP)

Fixes #227
neo4j-streams and the connect worker can write messages in batches out of order, because it parallelizes transactions.  When a volume comes in and we attempt to write more than one TX batch at a time, the fact that this is done concurrently (to improve throughput) means things can be written out of order.  Issue #227 is a case where the order matters and results in poor CDC outcomes.
Proposed Changes (Mandatory)
Add a configuration flag neo4j.batch.parallelize with default value true.  By switching it to false users can make TXs synchronous, which guarantees ordering at the expense of throughput.

It also fails with a compile error:
[ERROR] /home/travis/build/neo4j-contrib/neo4j-streams/kafka-connect-neo4j/src/main/kotlin/streams/kafka/connect/sink/Neo4jService.kt: (142, 13) 'if' must have both main and 'else' branches if used as an expression


Qiskit 0.34.0 issue with IBMQ.ibmq being None

Informations

Qiskit version: 0.34.0
Python version: 3.8.12
Operating system: WIndows 11

What is the current behavior?
from qiskit import IBMQ
ibmq = IBMQ.imbq

This code always results in ibmq staying None. Even when I run in Jupyter notebooks in separate blocks, I still get the same error that it is resulting in None.
Steps to reproduce the problem
Just run the code above. Then, optionally add something like print(ibmq and you should see that None gets printed out.
What is the expected behavior?
The expected behaviour is to have a non-None type so that I can use the ibmq#save_account and ibmq#load_account methods. I am unable to follow the Qiskit tutorials without this.
Suggested solutions
I took a look and saw the lazy loading approach. Not sure if that might be the reason behind it all. I made sure that the imports it tried to look for were present (they were) and tried to debug but I could not figure it out.

You don't need to access IBMQ.ibmq (and really, it should probably be a private attribute).    For example:
from qiskit import IBMQ
IBMQ.load_account()

I'll close this issue as stale now, but please feel to re-open if the solution I provided didn't work for you.


useTransition is not interpolating to correct final value

🐛 Bug Report
The title is pretty much self explanatory. The final value is always off by a small margin.
Another interesting thing as pointed by @meesvandongen is triggering re-render makes it go to correct value.
To Reproduce
https://codesandbox.io/s/6z9kn5p1zw
Expected behavior
Interpolate to correct final value
Link to repro (highly encouraged)
https://codesandbox.io/s/6z9kn5p1zw
Environment

react-spring v8.0.19
react v16.8.6

This might be fixed by #632. I'll check sometime soon.

This might be fixed by #632. Can you give it a try with the v9 branch?
git clone https://github.com/react-spring/react-spring.git --branch v9 --depth 1
cd ./react-spring
yarn
yarn link

# In your repro directory:
yarn link react-spring

linking to this branch causes a run time error:
Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)
Stack trace:
Uncaught Invariant Violation: Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)
    at invariant (http://localhost:3000/static/js/0.chunk.js:385:19)
    at resolveDispatcher (http://localhost:3000/static/js/0.chunk.js:1770:32)
    at useState (http://localhost:3000/static/js/0.chunk.js:1794:24)
    at useForceUpdate (http://localhost:3000/static/js/main.chunk.js:111:74)
    at useTransition (http://localhost:3000/static/js/main.chunk.js:1887:21)
    at App (http://localhost:3000/static/js/main.chunk.js:2817:87)
    at renderWithHooks (http://localhost:3000/static/js/0.chunk.js:21053:22)
    at mountIndeterminateComponent (http://localhost:3000/static/js/0.chunk.js:23209:17)
    at beginWork (http://localhost:3000/static/js/0.chunk.js:23844:20)
    at performUnitOfWork (http://localhost:3000/static/js/0.chunk.js:27888:16)
    at workLoop (http://localhost:3000/static/js/0.chunk.js:27929:28)
    at renderRoot (http://localhost:3000/static/js/0.chunk.js:28009:11)
    at performWorkOnRoot (http://localhost:3000/static/js/0.chunk.js:28966:11)
    at performWork (http://localhost:3000/static/js/0.chunk.js:28876:11)
    at performSyncWork (http://localhost:3000/static/js/0.chunk.js:28850:7)
    at requestWork (http://localhost:3000/static/js/0.chunk.js:28705:9)
    at scheduleWork (http://localhost:3000/static/js/0.chunk.js:28518:9)
    at scheduleRootUpdate (http://localhost:3000/static/js/0.chunk.js:29213:7)
    at updateContainerAtExpirationTime (http://localhost:3000/static/js/0.chunk.js:29239:14)
    at updateContainer (http://localhost:3000/static/js/0.chunk.js:29307:14)
    at ReactRoot.push../node_modules/react-dom/cjs/react-dom.development.js.ReactRoot.render (http://localhost:3000/static/js/0.chunk.js:29620:7)
    at http://localhost:3000/static/js/0.chunk.js:29772:18
    at unbatchedUpdates (http://localhost:3000/static/js/0.chunk.js:29095:14)
    at legacyRenderSubtreeIntoContainer (http://localhost:3000/static/js/0.chunk.js:29768:9)
    at Object.render (http://localhost:3000/static/js/0.chunk.js:29843:16)
    at Module../src/index.js (http://localhost:3000/static/js/main.chunk.js:2879:50)
    at __webpack_require__ (http://localhost:3000/static/js/bundle.js:782:30)
    at fn (http://localhost:3000/static/js/bundle.js:150:20)
    at Object.0 (http://localhost:3000/static/js/main.chunk.js:2952:18)
    at __webpack_require__ (http://localhost:3000/static/js/bundle.js:782:30)
    at checkDeferredModules (http://localhost:3000/static/js/bundle.js:46:23)
    at Array.webpackJsonpCallback [as push] (http://localhost:3000/static/js/bundle.js:33:19)
    at http://localhost:3000/static/js/main.chunk.js:1:57

@sjnonweb That error often occurs when two React versions exist in the same bundle. I forgot to include cd ./dist before yarn link in my previous comment, so you could try again with the updated steps. I'll try to check it out today, too.

That error often occurs when two React versions exist in the same bundle. To save you the trouble, I'll check this out today. 👍

This is fixed by #632

Thanks man!
About the error above: I did go to dist before linking the package yet i got that error, also on doing npm ls i only get one version of react, not sure what i did different. Anyways thanks a lot for the help. keep up the good work.

You need to eject react-scripts and change some Webpack config to get it working. 😵

ahh right!

You can use v9 like this now: yarn add react-spring@next


javadoc generation fails when using JDK 8

Javadoc generation fails when using JDK 8. The error is "Bad use of '>'" and it points to @ author.

http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
Hint: with maven it works like a charm as -Dadditionalparam='-Xdoclint:none'


sublime-merge-dev: 2078 -> 2081

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for sublime-merge-dev is: Git client from the makers of Sublime Text
meta.homepage for sublime-merge-dev is: https://www.sublimemerge.com
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2081 with grep in /nix/store/4ffy7l3hv3bmbsira3mnlwbsl41slqk6-sublime-merge-2081
found 2081 in filename of file in /nix/store/4ffy7l3hv3bmbsira3mnlwbsl41slqk6-sublime-merge-2081

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

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
sublime-merge-dev

Instructions to test this update (click to expand)

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

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

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

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

1 package built:

sublime-merge-dev

Maintainer pings
cc @zookatron for testing.

I built these changes locally on nixos 22.11 and tested the application out with a few repos, everything seems to be working properly 👍


AnatomicalLocation schema - additional revision needed

This relates to PR #179 and the many many issue raised in other repos related to that.
@skoehnen ask offline about a use case, where an annotation is made in an atlas (coordinate space). This annotation is a point (x,y,z) in the coordinate space and a user may want to add some sort of label/name to it to distinguish between different point more easily.
I think that I raise in one of the issues that we should make the schema that is proposed in #179 more generic, basically removing any of the "target" references. This way a property in one schema could be called "targetLocation" (e.g. for stereotactic surgery, electrode placements, etc.) for describing what location the researcher was aiming for, while in another schema the property could be called something else (e.g. for injection sites that were annotated in the images following all the histological steps) for describing which location it really was in the end.
To me, @skoehnen use case would be possible to capture with this schema as well. We do not have anything else that would fit this otherwise. The best compromise would have been "CustomAnatomicalEntity" which has a "CustomAnnotation" but these annotations do not match the type of annotation that he would like to capture.
My proposal for the revision is the following:
{
    "_type": "https://openminds.ebrains.eu/sands/AnatomicalLocation",
    "required": [
        "anatomicalEntity",
        "targetIdentificationType"
    ],
    "properties": {
        "anatomicalEntity": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "_instruction": "Add the anatomical entity(s) for this anatomical location.",
            "_linkedTypes": [
                "https://openminds.ebrains.eu/sands/ParcellationEntity",
                "https://openminds.ebrains.eu/sands/ParcellationEntityVersion",
                "https://openminds.ebrains.eu/sands/CustomAnatomicalEntity",
                "https://openminds.ebrains.eu/controlledTerms/CellType",
                "https://openminds.ebrains.eu/controlledTerms/UBERONParcellation"
            ]
        },
        "identificationType": {
            "_instruction": "Add the identification type used to get to this anatomical location.",
            "_linkedTypes": [
                "https://openminds.ebrains.eu/controlledTerms/AnatomicalIdentificationType"
            ]
        },
        "coordinates": {
            "_instruction": "If possible, add the coordinates that best represent this anatomical location.",
            "_embeddedTypes": [
                "https://openminds.ebrains.eu/sands/CoordinatePoint"
            ]
        },
        "additionalRemarks": {
            "type": "string",
            "_instruction": "Enter any additional remarks that are needed to interpret the properties of this anatomical location (e.g., what the coordinates represent: a central position, bottom, left corner edge, etc)."
        },
        "lookupLabel": {
           "type": "string",
           "_instruction": "Enter a lookup label for this anatomical location that may help you to more easily find it again."
        }
    }
}

Note: This is a bit of a mix of topics. The PR #179 should be revised to be more generic. This may not be the perfect fit for @skoehnen use case, but the schema is needed regardless of that. @skoehnen use case may be solve by this schema, then we don't have a problem. But if not, then we need to discuss other SANDS schemas instead (either the annotation schemas to allow more annotation types or the coordinatePoint to have a lookupLabel or a new schema for custom point annotations or whatever).
@lzehl what do you think? Please also tag more people, I was not sure who else be useful to include...
FYI @Peyman-N

@UlrikeS91 & @skoehnen thanks for raising the issue. I disagree a bit though
The "CustomAnatomicalEntity" which has a "CustomAnnotation" was exactly meant for the use case you describe.
But so far we only covered the use case in the annotation schemas in general (custom or atlas) where the annotation is a volume or area. Annotations should cover though points, vectors etc as well. (everything you "draw" onto something for some reason).
For this reason I want to rather adapt the annotation schemas to cover all use cases. I need to think this a bit over before I make a counter suggestion.

is now discussed here #183


Fix first/last groupby aggregation on list columns

Closes https://github.com/NVIDIA-Merlin/NVTabular/issues/1678
Uses list.get functionality in cudf to fix "first" and "last" aggregation on list columns.

Note that the current CI failure should be resolved by https://github.com/NVIDIA-Merlin/core/pull/154


Upgrade fabric8 to 6.7.2

@wind57 could you take a quick peek?  This will fix the snakeyaml issue on main, but had to make some changes based on functionality changes in the client


error while executing terminal command

it is showing error while i am executing this cmnd in cmd prompt
python retrain.py --output_graph=retrained_graph.pb --output_labels=retrained_labels.txt --architecture=MobileNet_1.0_224 --image_dir=images
Error :-   File "retrain.py", line 234, in get_image_path
mod_index = index % len(category_list)
ZeroDivisionError: integer division or modulo by zer

You should check the image directory. It seems like no image is present in the given directory, therefore the number of images = 0 hence you're getting this error.


Add basic auth

Add basic auth

Is this issue resolved by #50, or should we also implement a more beefy auth tool (like Bearer token auth) for the other endpoints?

Yes let's get the Bearer authentication in place for the other endpoints.

Yes let's get the Bearer authentication in place for the other endpoints.

Great, I will add it.

Thanks Thomas


Fix ethers tests

I (mostly) fixed the ethers tests.
There were a few issues:

When using ts you need to include their type extension's in the tsconfig.json. This should be clear in the docs, sorry.
ts-node normally ignores parts of tsconfig.json. To make it work more like tsc you have to set the env variable TS_NODE_FILES to true. I did that with a .env file.
The Buidler Runtime Environment can/should be imported directly from Buidler project's tests. The this.env thing is for testing the plugin itself. It's defined by the useEnvironment helper.
Mocha was trying to run all the tests, including the Buidler projects' ones. I set it to only run the top-level ones.

Finally, I found an issue with Buidler :( It kills the process after running TASK_TEST, so only one of the projects can be run at the time. I will fix this in the next version.
Thanks a lot for creating this plugin!

Finally, I found an issue with Buidler :( It kills the process after running TASK_TEST, so only one of the projects can be run at the time. I will fix this in the next version.

This was fixed in https://github.com/nomiclabs/buidler/pull/336

@alcuadrado This is great, thanks so much for solving. (I've swapped the test skips because the truffle test has slightly more info to look at. . .)