Implement retries and expose caching for access tokens

Closes: https://github.com/GoogleCloudPlatform/google-cloud-php/issues/172
Example using Stash:
<?php
require 'vendor/autoload.php';

use Google\Cloud\Storage\StorageClient;
use Stash\Driver\FileSystem;
use Stash\Pool;

$driver = new FileSystem([]);
$pool = new Pool($driver);

$storage = new StorageClient([
    'authCache' => $pool
]);

@tmatsuo @PaulNaylor PTAL and let me know what you think!

Note Stash does not actually follow PSR-6 standards yet (see https://github.com/tedious/Stash/pull/328), so I would suggest not using Stash in examples/documentation until a new stable version (0.15) is tagged.

@bshaffer thank you for the reminder. I changed the example to use symfony's cache component ater seeing that issue.

Hi @dwsupplee. Thanks for this.. I wish I could say it's all good and working for me, but I've had mixed results. Firstly, the good news, the "POST https://www.googleapis.com/oauth2/v4/token resulted in a 500 Internal Server Error ..., .../google/cloud/src/RequestWrapper.php, line:283" issue has gone, as of 5 days ago (Nov 2nd) when I rolled out the new code you provided.
However I've not managed to get the symfony/cache working, and I have another error I've spotted, (it was there before the new code, it's only that I just noticed it).
The error is:
Error: [Google\Cloud\Exception\ServiceException:0] htmlentities(Error creating resource: [message] fopen(https://www.googleapis.com/oauth2/v4/token): failed to open stream: Fetch error
[file] .../vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php
[line] 312), .../vendor/google/cloud/src/RequestWrapper.php, line:218 <br />"

... could this be failing the exponential backoff several times and therefore failing?
For the symfony/cache can I pass it in like so...
DatastoreClient([...,'authCache' => new ArrayAdapter()]);
or am I missing something?


IPFS node doesn't connect on dApp start

Operation System
Ubuntu 20.04
TokelPlatform-1.2.0.AppImage
Bug
About 30 seconds later I get the following popup, see attachment.

Now I got this

Thanks. Those two seem unrelated. The first screenshot you attached is probably an error happening when starting the IPFS node.
If you can attach logs, that would greatly help us understand where the error is happening 😄
on Linux: ~/.config/{app name}/logs/{process type}.log
on macOS: ~/Library/Logs/{app name}/{process type}.log
on Windows: %USERPROFILE%\AppData\Roaming\{app name}\logs\{process type}.log

I don't have any logs, but I think the error comes from the following file:
https://explorer.tokel.io/tokens/0b47a8488ca2e9797535397d3d5d866d7fda33fb61bad83db95172e834a47e59/transactions
Here I used a hash that the origin hash of IPFS redirects to.
ipfs://QmPgLWCmFW5Ajo21pWEVyVmmym3Ms7t6wHxw8J6Xisa8Hw
redirects to
ipfs://bafybeiat4236rpbyu254x5fjvic7arv7jmy6hxacj5m4kyqm6vkwc4jxi/
Probably, I can't say for sure, the IPFS node of the dApp can't handle it.

That is the only what I can find in Session Storage:
2021/12/15-10:38:46.813 258ca Reusing MANIFEST /home/ubuntu/.config/tokelPlatform/Session Storage/MANIFEST-000001
2021/12/15-10:38:46.814 258ca Recovering log #3
2021/12/15-10:38:46.814 258ca Reusing old log /home/ubuntu/.config/tokelPlatform/Session Storage/000003.log

So, far I've seen some reasons for the local node to not resolve IFPS hashes:

The dApp IPFS node fails to initialize because there's an existing repo.lock in place, leftover from a previous non-graceful exit, or from another instance of IPFS currently running
The dApp IPFS node fails to initialize because it can't setup the IPFS repo locally (maybe bad permissions?)
The IPFS hash fails to resolve because there's not enough peers connected to find the file
The IPFS hash fails to resolve because the local node can't fetch data, maybe due to firewall configuration or internet

It's important to note that due how IPFS works, some queries maybe just take very long to resolve, so I can imagine some folks don't wait enough for their content. We can improve this however by adding more relevant peers on initialization.
This commit has some exploratory work on connecting to more peers on initialization. I'm however facing some AbortController errors which I imagine are due to mismatching nodejs versions.
Going forward, I suggest we change our implementation of IPFS to be separated in two parts:

the node we already have in the main process, which should exit gracefully (#255) and respect any other existing IPFS nodes in the machine.
an ipfs-http client in the renderer process, that will try to connect to our built-in node if possible, or other local nodes, but may as well connect to any other IPFS node specified in dApp settings (better than using an http gateway)

@lenilsonjr Has this issue been addressed in the latest releases, or is it still possible?


Fix #2517 : Check for incomplete parentheses to prevent SQL injection.

What did this pull request do?
Fix for #2517

Codecov Report

Merging #2519 into master will decrease coverage by 0.04%.
The diff coverage is 68.75%.

@@            Coverage Diff             @@
##           master    #2519      +/-   ##
==========================================
- Coverage   79.34%   79.29%   -0.05%
==========================================
  Files          24       24
  Lines        3452     3468      +16
==========================================
+ Hits         2739     2750      +11
- Misses        612      615       +3
- Partials      101      103       +2

Impacted Files
Coverage Δ

scope.go
86.66% <68.75%> (-0.35%)
:arrow_down:

Continue to review full report at Codecov.

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

@emirb I've applied your comment. Can you check it again please?

Thanks @herpiko.

hi All
this issue still exists

@wahyuhadi you say the issue is still existing. Could you please provide more information or an example of the code that is vulnerable please?
Thank you,

@sneko
You can see in here
https://github.com/wahyuhadi/gorm-sqlInjection

@wahyuhadi ,
I see that you are passing, as a primary key, an interface from gin.Context.
When querying with First using inline conditions, it is said that it only works with integer primary key 👍
Since there is no prepare statement in this usecase, it seems logical that there is an issue in this example, wdyt ?
Maybe I'm wrong.
// Get by primary key (only works for integer primary key)
db.First(&user, 23)
//// SELECT * FROM users WHERE id = 23;
// Get by primary key if it were a non-integer type
db.First(&user, "id = ?", "string_primary_key")
//// SELECT * FROM users WHERE id = 'string_primary_key';

// Plain SQL
db.Find(&user, "name = ?", "jinzhu")
//// SELECT * FROM users WHERE name = "jinzhu";

db.Find(&users, "name <> ? AND age > ?", "jinzhu", 20)
//// SELECT * FROM users WHERE name <> "jinzhu" AND age > 20;

// Struct
db.Find(&users, User{Age: 20})
//// SELECT * FROM users WHERE age = 20;

// Map
db.Find(&users, map[string]interface{}{"age": 20})
//// SELECT * FROM users WHERE age = 20;

But still, it seems necessary to use the specific gorm pattern to avoid SQL injection.
I do have a doubt as well regarding the strenght of the library either regarding that topic.
@jinzhu maybe you can lightened us a bit more ? :)

@maeglindeveloper
The injection id=id=1)) or 1=1-- , i call this double param injection
If you change the injection id=email=some@email.com)) or 1=1--
The query will change with where<EMAIL_ADDRESS>

@wahyuhadi yes, I understood first time ;)


"synced undefined"

First time checking:

Log:
[2020-05-07 06:29:50.356] [userDataSync] [info] GlobalState: Skipped removing Comments.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:29:50.356] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.3d261645-323d-4fec-82bb-4673189f62ef.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:29:50.356] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.46969da5-9d57-4719-9eaf-0e0b6ca394b4.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:29:50.356] [userDataSync] [info] GlobalState: No changes found during synchronizing ui state.
[2020-05-07 06:29:50.414] [userDataSync] [info] Extensions: No changes found during synchronizing extensions.
[2020-05-07 06:29:50.414] [userDataSync] [info] Sync done. Took 520ms
[2020-05-07 06:33:38.064] [userDataSync] [info] Auto Sync: Triggered.
[2020-05-07 06:33:38.439] [userDataSync] [info] Settings: No changes found during synchronizing settings.
[2020-05-07 06:33:38.445] [userDataSync] [info] Keybindings: No changes found during synchronizing keybindings.
[2020-05-07 06:33:38.449] [userDataSync] [info] Snippets: No changes found during synchronizing snippets.
[2020-05-07 06:33:38.454] [userDataSync] [info] GlobalState: Skipped removing Comments.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:33:38.454] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.3d261645-323d-4fec-82bb-4673189f62ef.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:33:38.454] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.46969da5-9d57-4719-9eaf-0e0b6ca394b4.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:33:38.454] [userDataSync] [info] GlobalState: No changes found during synchronizing ui state.
[2020-05-07 06:33:38.530] [userDataSync] [info] Extensions: No changes found during synchronizing extensions.
[2020-05-07 06:33:38.530] [userDataSync] [info] Sync done. Took 466ms
[2020-05-07 06:34:01.300] [userDataSync] [info] Auto Sync: Triggered.
[2020-05-07 06:34:01.533] [userDataSync] [info] Settings: No changes found during synchronizing settings.
[2020-05-07 06:34:01.537] [userDataSync] [info] Keybindings: No changes found during synchronizing keybindings.
[2020-05-07 06:34:01.539] [userDataSync] [info] Snippets: No changes found during synchronizing snippets.
[2020-05-07 06:34:01.542] [userDataSync] [info] GlobalState: Skipped removing Comments.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:34:01.542] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.3d261645-323d-4fec-82bb-4673189f62ef.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:34:01.542] [userDataSync] [info] GlobalState: Skipped removing workbench.views.service.sidebar.46969da5-9d57-4719-9eaf-0e0b6ca394b4.state.hidden in remote storage. It is not registered to sync.
[2020-05-07 06:34:01.542] [userDataSync] [info] GlobalState: No changes found during synchronizing ui state.
[2020-05-07 06:34:01.622] [userDataSync] [info] Extensions: No changes found during synchronizing extensions.
[2020-05-07 06:34:01.622] [userDataSync] [info] Sync done. Took 323ms

Its totally weird that you get that label as I do not think I am not generating this. It looks a mix of old and new syntax which should not co-exist 7726671d823bd18c4f6db60bdeb429429c3f0421
Wondering how you got into this state

@sandy081 oh because I use the en-gb language pack, you should definitely change the nls id of the string if you change the number of variables it uses.

you should definitely change the nls id of the string if you change the number of variables it uses.

Not aware of this.
@dbaeumer Is it true?

I believe the string gets flagged for translation as it changed, but you don't know how long that will take.

Ok AFIK they are good/fast at updating translations. So intending to not fix this as this will get fixed by translations team.

It's still going to be broken for days or weeks in Insiders, meaning anyone with a language pack will see this undefined bug. The fix is as simple as adding "2" to the id to revert it to the default en-us string.

This never went away for me, it's still there after uninstalling the language pack.

Really do not understand what is wrong with translations. Changed the id as the last thing to fix/


Start unit tests for cycle paths getProps, with a tool for generating…

… the input. #29
There are a bunch of classification problems, and unit tests would be fantastic to have before working on them. This PR just lays the groundwork -- actually adding more tests later. The little HTML helper page looks like this:

Also we can use this same approach (unit tests with OSM tag input, and some kind of output) for different types of output, like LTS (https://github.com/dabreegster/routing-engines/issues/7)

Just a ping here @Pete-Y-CS


use OpenTelemetry recommended method to record RPC errors

something wrong with iOS tests again? I can't find the actual error


Not helpful exception reported when DTD of root map cannot be found

Let's say I'm publishing a DITA Map which has an unknown specialization (for example you can modify the DOCTYPE to point to some non existing public and system ID).
The publishing breaks with this error message:
   D:\projects\eXml\frameworks\dita\DITA-OT2.x\plugins\org.dita.base\build_preprocess.xml:42: Failed to run pipeline: [DOTA069F][FATAL] Input file 'file:/D:/projects/eXml/samples/dita/flowers/flowers.ditamap' cannot be located or read. Ensure that file was specified properly and that you have permission to access it.

which is not helpful at all.
The initial FileNotFoundException received in the code is this one:
   Caused by: java.io.FileNotFoundException: D:\projects\eXml\samples\dita\flowers\map.d2td (The system cannot find the file specified)

but when the method "org.dita.dost.module.GenMapAndTopicListModule.processFile(Reference)" catches it, it probably assumes that the exception refers to the published file and ignores its message.

👍  one more report:
https://www.oxygenxml.com/forum/viewtopic.php?f=20&t=15028&p=44422#p44422

I've gotten this complaint more often recently as well. Also, probably somewhere in the same series of thrown / caught exceptions, we recently had a broken DTD module where Java reported the broken DTD file but gave no indication which file referenced that DTD (out of many hundreds). Not sure if that's the same section of code or not, but it would be nice if -- when we can't read a file due to missing/broken DTD -- we reported the name of the file.


Failing unit test for dictionary variable

Hello @phatboyg
Please, take a look at failing test. I expect dictionary to contain one entry, but it is empty.

@phatboyg forgot to mention that my unit test started to fail after I updated to 8.0.9-develop.658. Before that I was on 8.0.6 and my according test was passing.

This works:
        [Test]
        public async Task Should_be_properly_serialized_as_a_message_with_dictionary_variable()
        {
            var key = NewId.NextGuid();
            var result = new Dictionary<Guid, string> { [key] = "Hello" };

            var builder = new RoutingSlipBuilder(NewId.NextGuid());
            builder.AddVariable("Result", result);
            builder.AddActivity("test", new Uri("loopback://localhost/execute_testactivity"), new { });

            await InputQueueSendEndpoint.Send(builder.Build());

            ConsumeContext<RoutingSlip> received = await _received;

            var completedResult = received.GetVariable<Dictionary<Guid, string>>("Result");

            Assert.IsNotEmpty(completedResult);

            Assert.That(completedResult.TryGetValue(key, out var value));
            Assert.That(value, Is.EqualTo("Hello"));
        }

By default, MassTransit discards null entries (and possibly dictionary values) so it's probably a serializer setting you would need to change.

Well, ok. I'm not experiencing any problems with such behavior. Just wanted to be sure that this is not a bug of MassTransit.

Note the use of GetVariable, vs what you were using. That is the recommended approach to ensure the deserializer is used to convert the incoming message to the type requested.


ChangeType not working with types provided to the parser using dependsOn.

What version of OpenRewrite are you using?
I am using

OpenRewrite v8.17.1
Maven/Gradle plugin v5.23.1
rewrite-java v8.17.1

How are you running OpenRewrite?

I am using the following unit test:

    @Test
    void renamePackageWithDependsOn() {
        @Language("java")
        final String schemaClass1 = """
          package my.example.xprivate.x1.MySchema;

          public class MySchemaType {}
          """;

        @Language("java")
        final String schemaClass2 = """
          package my.example._private._1.MySchema;

          public class MySchemaType {}
          """;

        rewriteRun(
          spec -> spec
            .parser(JavaParser.fromJavaVersion().dependsOn(schemaClass1, schemaClass2))
            .recipe(new ChangeType(
              "my.example.xprivate.x1.MySchema.MySchemaType",
              "my.example._private._1.MySchema.MySchemaType",
              true
            )),
          //language=java
          java("""
            package my.example.app;

            import my.example.xprivate.x1.MySchema.MySchemaType;

            class MyApp {
                void doWork(MySchemaType mySchema) {}
            }
            """, """
            package my.example.app;

            import my.example._private._1.MySchema.MySchemaType;

            class MyApp {
                void doWork(MySchemaType mySchema) {}
            }
            """)
        );
    }

What is the smallest, simplest way to reproduce the problem?
Using the provided test.
What did you expect to see?

package my.example.app;

import my.example._private._1.MySchema.MySchemaType;

class MyApp {
    void doWork(MySchemaType mySchema) {}
}

What did you see instead?

diff --git a/my/example/app/MyApp.java b/my/example/app/MyApp.java
index 5a97edd..9ff90dd 100644
--- a/my/example/app/MyApp.java
+++ b/my/example/app/MyApp.java
@@ -1,7 +1,5 @@
 package my.example.app;

-import my.example._private._1.MySchema.MySchemaType;
-
 class MyApp {
     void doWork(MySchemaType mySchema) {}
 }
\ No newline at end of file

What is the full stack trace of any errors you encountered?

N/A

Are you interested in contributing a fix to OpenRewrite?

Yes.

That's a strange case indeed; thanks for the detailed runnable example. I wouldn't quite know why that's missed here. I'm guessing you ran into this when doing something similar in an actual recipe beyond this test case?
Thanks for the offer to look into this as well!

Findings:

Compilation errors being swallowed for classes provided via dependsOn, if a class is not declared on the default package:

1255073806633000:3: error: class MySchemaType is public, should be declared in a file named MySchemaType.java
public class MySchemaType {}
       ^

There's a fix for this issue, I'm going to open a PR today
2. Identified a possible small optimization on ChangeTypeVisitor -   There's a fix for this issue, I'm going to open a PR today
3. Package names used the failing test does not follow the the conventions, although their values are valid. For example, ChangeType uses JavaType.ShallowClass.build(oldFullyQualifiedTypeName) to create types. The build method identifies names based on conventions, while the types provided by the failing test don't follow the convention, but are still valid accordingly to the java specification.
No clue on how to fix this item

Updated the last comment with the fixes for the first 2 findings.

Thanks for the fixes so far! I've given the test that you provided above another go and I can replicate it using only a capital letter in the package name already 🤔
@Test
void renamePackageWithDependsOn() {
    @Language("java") final String schemaClass1 = """
      package foo.Capital;
      public class MySchemaType {}
      """;
    @Language("java") final String schemaClass2 = """
      package bar.Capital;
      public class MySchemaType {}
      """;

    rewriteRun(
      spec -> spec
        .parser(JavaParser.fromJavaVersion().dependsOn(schemaClass1, schemaClass2))
        .recipe(new ChangeType(
          "foo.Capital.MySchemaType",
          "bar.Capital.MySchemaType",
          true
        )),
      //language=java
      java(
        """
          package my.example.app;

          import foo.Capital.MySchemaType;

          class MyApp {
              void doWork(MySchemaType mySchema) {}
          }
          """,
        """
          package my.example.app;

          import bar.Capital.MySchemaType;

          class MyApp {
              void doWork(MySchemaType mySchema) {}
          }
          """
      )
    );
}

Which again fails with
diff --git a/my/example/app/MyApp.java b/my/example/app/MyApp.java
index 7fe83d7..9ff90dd 100644
--- a/my/example/app/MyApp.java
+++ b/my/example/app/MyApp.java
@@ -1,7 +1,5 @@
 package my.example.app;

-import bar.Capital.MySchemaType;
-
 class MyApp {
     void doWork(MySchemaType mySchema) {}
 }

Look like we misidentify an owning class where there is none, just because the package contains an uppercase letter. :/

Here's a simpler test:
@Test
void changeTypeWithCapitalLettersInPackageName() {
    @Language("java") final String schemaClass = """
      package bar.Capital;
      public class MySchemaType {}
      """;

    rewriteRun(
      //language=java
      java(schemaClass, spec -> spec.afterRecipe(cu -> {
            JavaType.FullyQualified typeFromParser = cu.getClasses().get(0).getType();

            // Called on ChangeClassDefinition constructor
            JavaType.ShallowClass shallowClass = JavaType.ShallowClass
              .build(typeFromParser.getFullyQualifiedName());

            assertThat(shallowClass)
              .hasFieldOrPropertyWithValue("fullyQualifiedName", typeFromParser.getFullyQualifiedName())
              .hasFieldOrPropertyWithValue("owningClass", typeFromParser.getOwningClass());
        }
      ))
    );
}

And a variant for classes starting with lowercase letters, also failing:
@Test
void changeTypeWithClassNamesStartingWithLowercaseLetters() {
    @Language("java") final String schemaClass = """
      package bar.capital;
      public class mySchemaType {}
      """;

    rewriteRun(
      //language=java
      java(schemaClass, spec -> spec.afterRecipe(cu -> {
            JavaType.FullyQualified typeFromParser = cu.getClasses().get(0).getType();

            // Called on ChangeClassDefinition constructor
            JavaType.ShallowClass shallowClass = JavaType.ShallowClass
              .build(typeFromParser.getFullyQualifiedName());

            assertThat(shallowClass)
              .hasFieldOrPropertyWithValue("fullyQualifiedName", typeFromParser.getFullyQualifiedName())
              .hasFieldOrPropertyWithValue("owningClass", typeFromParser.getOwningClass());
        }
      ))
    );
}


Run powershell samples in clean dotnet core container

I am trying to run dot-net core app from "Host Powershell" section., https://github.com/PowerShell/PowerShell/tree/master/docs/host-powershell
So I can run .net app which require PS sessions support in minimalistic environment
Steps to reproduce

Make sure you have your Docker daemon in Linux mode or just run it on Linux host
Save following dockerfile locally as Dockerfile.1.1.2_ps:

FROM buildpack-deps:jessie-scm

# Install .NET CLI dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        libc6 \
        libcurl3 \
        libgcc1 \
        libgssapi-krb5-2 \
        libicu52 \
        liblttng-ust0 \
        libssl1.0.0 \
        libstdc++6 \
        libunwind8 \
        libuuid1 \
        zlib1g \
        apt-transport-https	\
		git-core\
    && rm -rf /var/lib/apt/lists/*

# Install .NET Core SDK
ENV DOTNET_SDK_VERSION 1.0.4
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-dev-debian-x64.$DOTNET_SDK_VERSION.tar.gz
ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
    && mkdir -p /usr/share/dotnet \
    && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \
    && rm dotnet.tar.gz \
    && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \
	&& mkdir /scripts

# Trigger the population of the local package cache
ENV NUGET_XMLDOC_MODE skip
RUN mkdir warmup \
    && cd warmup \
    && dotnet new \
    && cd .. \
    && rm -rf warmup \
&& rm -rf /tmp/NuGetScratch

#install powershell
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
	&& curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list \
	&& apt-get update \
	&& apt-get install -y powershell

# get powershell source
RUN mkdir -p /projects/PowerShell && git clone https://github.com/PowerShell/PowerShell.git /projects/PowerShell

WORKDIR /projects/PowerShell/docs/host-powershell/sample-dotnet1.1

ENTRYPOINT /bin/bash

This comes from Docker hub plus code to install repo and pull Powershell repo, so there is standard and ready environment for the test
Then, run
docker build -t powershell_test -f Dockerfile.1.1.2_ps . & docker run -ti --rm powershell_test
You'll end up in sample-dotnet1.1 app directory.
Next,
dotnet restore ./MyApp/MyApp.csproj
This one succeeded and proper NuGet packckages are pulled, as it mentioned here:
https://github.com/PowerShell/PowerShell/issues/2284

NuGet Config files used:
/projects/PowerShell/docs/host-powershell/sample-dotnet1.1/NuGet.config
/projects/PowerShell/nuget.config
/root/.nuget/NuGet/NuGet.Config
Feeds used:
https://api.nuget.org/v3/index.json
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
https://powershell.myget.org/F/powershell-core/api/v3/index.json

Then, start application:
dotnet run --project ./MyApp/MyApp.csproj
Expected behavior
Application runs and produce output:

 Get-Command Write-Output
CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Write-Output                                       <IP_ADDRESS>    Microsoft.PowerShell.Utility

Actual behavior
appBase: /projects/PowerShell/docs/host-powershell/sample-dotnet1.1/MyApp/bin/Debug/netcoreapp1.1

Evaluating 'Get-Command Write-Output' in PS Core Runspace

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Runspaces.RunspaceFactory' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'api-ms-win-eventing-provider-l1-1-0.dll': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at System.Management.Automation.Tracing.EtwActivity.UnsafeNativeMethods.EventActivityIdControl(ActivityControlCode controlCode, Guid& activityId)
   at System.Management.Automation.Tracing.EtwActivity.GetActivityId()
   at System.Management.Automation.Runspaces.RunspaceFactory..cctor()
   --- End of inner exception stack trace ---
   at System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace()
   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.Invoke()
   at Application.Test.Logic.Start(String[] args) in /projects/PowerShell/docs/host-powershell/sample-dotnet1.1/Logic/UseRunspace.cs:line 20
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Management.Automation.PowerShellAssemblyLoadContextInitializer.InitializeAndCallEntryMethod(String basePaths, AssemblyName entryAssemblyName, String entryTypeName, String entryMethodName, Object[] args)
   at Application.Test.Program.Main(String[] args) in /projects/PowerShell/docs/host-powershell/sample-dotnet1.1/MyApp/Program.cs:line 25

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.4
OS                             Linux 4.9.36-moby #1 SMP Wed Jul 12 15:29:07 UTC 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Not being expert in .dotnet it is not quite clear what is missing here. I've tried to set different RID in project, "debian.8-x64" from "dotnet --info". Tried to publish & run. Tried to set AppBase to "/opt/microsoft/powershell/6.0.0-beta.4/"
Same error. Ok, if there some Win-only assemblies, why "powershell" executable works right in the same container? It is using the same assemblies. Or, not,
I am looking for a simple and concise  answer for "mere mortals". Otherwise, I have to run a hybrid swarm with Linux and Windows node just for Powershell only. Dealing with Windows docker is pain, just pain and bugs. Even after having few successful Linux Docker deliveries

Hi,
I have the same issue but the version is .netcore 2.0.

@Vetal-ca
Just to make sure. I notice you're on v6.0.0-beta.4.  Have you try with PowerShell v6.0.0-beta.5?
To make sure you're getting the same issue.
:)

@MaximoTrinidad
My environment is PowerShell v6.0.0-beta.5.
Environment Data
 PS /app> $PSVersionTable
 Name                           Value
 ----                           -----
 PSVersion                      6.0.0-beta
 PSEdition                      Core
 GitCommitId                    v6.0.0-beta.5
 OS                             Linux 4.9.41-moby #1 SMP Fri Aug 18 07:29:56 UTC 2017
 Platform                       Unix
 PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
 PSRemotingProtocolVersion      2.3
 SerializationVersion           <IP_ADDRESS>
 WSManStackVersion              3.0

Same stack trace with the example on v6.0.0-beta.6 in .netcore 2.0 (in CentOS 7):

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
GitCommitId                    v6.0.0-beta.6
OS                             Linux 3.10.0-514.26.1.el7.x86_64 #1 SMP Thu Jun 29 16:05:25 UTC 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

I can repro on Debian 8.
Looks like this issue is because all PowerShell Core packages we published so far contain windows assemblies only.
This is blocking hosting powershell in .NET Core applications on Linux/OSX.
Essentially this is a direct result/duplicate of #3417


Retrieve Response Http Headers and inject inside the Operation.Data

Hi Everyone!
I have a graphQL API to query that requires HTTP request headers for each request and that returns the relative HTTP response headers
I found the response to half of the problem that I am trying to solve from https://github.com/apollographql/apollo-android/issues/2030#issuecomment-647873074
It looks like I can use the method provided by https://github.com/apollographql/apollo-android/blob/master/apollo-runtime/src/main/java/com/apollographql/apollo/internal/RealApolloCall.java#L178-L183 to add the request header for each request and now I was wondering how I can map the HTTP response headers to the POJO class that implements an Operation.Data. https://github.com/apollographql/apollo-android/blob/master/apollo-api/src/commonMain/kotlin/com/apollographql/apollo/api/Operation.kt#L40
Maybe I am missing something and it is already there in some bean property?

Hi! You can get the HTTP response headers from response.executionContext:
    val response: Response<YourQuery.Data> = //... get a response using ApolloClient
    val httpContext = response.executionContext[OkHttpExecutionContext.KEY]
    httpContext?.response?.headers?.forEach {
        println("${it.first}=${it.second}")
    }

This is a fairly new API and it will most likely require a recent version. Also, it's not documented yet but it should certainly be added somewhere. Let me know if it worked and I'll add it.

I am using `apollo-api-jvm:2.2.1` Is it only in kotlin such support?

      final OkHttpExecutionContext context = response.getExecutionContext().get(OkHttpExecutionContext.KEY);
        Optional.ofNullable(context)
            .map(OkHttpExecutionContext::getResponse)
            .map(okhttp3.Response::headers)
            .map(Headers::toMultimap)
            .orElse(Collections.emptyMap());

This is the solution. I upgraded the apollo-runtime to 2.2.1

Hi!
Glad to hear that retrieving the HTTP response headers is working 👍
Regarding OKHttpInterceptors, I'm not sure to understand what you are using them for. Can you elaborate a bit more? To change the headers on an ApolloCall, you can use ApolloCall.requestHeaders() without a OkHttpInterceptor

Yes, the headers problem is solved.
ApolloCall<V> apolloCall = ApolloClient.builder()
        .serverUrl(String.format(myProperties.getServerUrl(), locale.getCountry(), locale.toLanguageTag()))
        .okHttpClient(okHttpClient)
        .build()).query(operation);

I am referring to this snippet as you can see I would need to change the serverUrl for each request to add the java.util.Locale depending on the user request.
myProperties.getServerUrl is something like https://mygreatgraphqlserver/blablabla?country=%s&language=%s and I wanted to avoid to generate an ApolloClient Bean for each request, or the ApolloClient bean is designed by taking in consideration that you can have a new one for each request?

Ah yes, there's no way to change the serverUrl per-request. What you can do is create a "generic" ApolloClient and use ApolloClient.newBuilder() to change the serverUrl without instantiating a new OkHttpClient every time:
// Initial generic client
ApolloClient genericClient = ApolloClient.builder()
        .serverUrl("dummyUrl")
        .okHttpClient(okHttpClient)
        .build()

// When you want to change the serverUrl:
ApolloClient apolloClient = genericClient.newBuilder()
        .serverUrl("https://your.real/url")
        .build()


Network traffic flow

Can you expand a bit on how is the data transferred to the vault on each type of backup?; for a crash-consistent backup should be directly captured in the back-end, but how does it happen for app/file level consistent? is it sent by the OS to the recovery services vault? if so, does that mean that if there is a VPN or Express route configured with forced tunneling, will the traffic go through ER/VPN and then to the storage account?
Thanks!

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

ID: 2bdbfa0f-4305-1b2f-2dd9-a8c23e789a78
Version Independent ID: 7ceb2658-7fa8-3fbb-a9a6-81ddd40f4dd3
Content: Planning your VM backup infrastructure in Azure
Content Source: articles/backup/backup-azure-vms-introduction.md
Service: backup
GitHub Login: @markgalioto
Microsoft Alias: markgal

@gmoed Thanks for the feedback! I have assigned the issue to the content author to evaluate and update as appropriate.

@Adam-Smith-MSFT Please assign to me

This article refers to back up of Azure VMs. For Azure VM backup, backups go over the Azure fabric.
If you're referring to on prem to Azure, the Microsoft Azure Recovery Services (MARS) agent (installed directly on a machine for file/folder backups, or on Azure Backup Server/DPM for backup of protected apps) sends backup data (encrypted/HTTPS) over the internet connection  used by the agent.
thx. Let me know if you have any more questions or I misunderstood your question.
#please-close

I meant Azure backup for an Azure VM, I had an issue in an environment where internet access was restricted and if backups where taken while the machine was online they failed. If we shutdown the VM then it completed ok, this indicates there is a dependency for internet traffic on the VM, however I'm not sure if its for the data or just for control.

@rayne-Wiselman, any followup to @gmoed 's comments above?

@gmoed Hi, the requirement for Azure VM internet access is documented here - https://docs.microsoft.com/en-us/azure/backup/backup-azure-arm-vms-prepare#prerequisites
Here's what I got from the team: YFor IaaS VM backup, internet access is needed for control commands only but for SQL backup, the back data also needs internet access.

I added the info about internet access reqs into https://docs.microsoft.com/en-us/azure/backup/backup-architecture#architecture-direct-backup-of-azure-vms as well.
Hopefully this is now covered.
Thanks!
#please-close


Updated resiliency guidance

Docs Build status updates of commit 0c36e59:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

docs/.markdownlint.json
:white_check_mark:Succeeded

docs/aws-professional/index.md
:white_check_mark:Succeeded
View

docs/best-practices/api-design.md
:white_check_mark:Succeeded
View

docs/checklist/availability.md
:white_check_mark:Succeeded
View

docs/checklist/dev-ops.md
:white_check_mark:Succeeded
View

docs/checklist/index.md
:white_check_mark:Succeeded

docs/checklist/resiliency-per-service.md
:white_check_mark:Succeeded
View

docs/checklist/resiliency.md
:white_check_mark:Succeeded
View

docs/cloud-adoption/governance/governance-disciplines.md
:white_check_mark:Succeeded
View

docs/cloud-adoption/operations/operational-fitness-review.md
:white_check_mark:Succeeded
View

docs/example-scenario/ai/commerce-chatbot.md
:white_check_mark:Succeeded
View

docs/example-scenario/apps/decentralized-trust.md
:white_check_mark:Succeeded
View

docs/example-scenario/apps/devops-with-aks.md
:white_check_mark:Succeeded
View

docs/example-scenario/data/fraud-detection.md
:white_check_mark:Succeeded
View

docs/example-scenario/infrastructure/regulated-multitier-app.md
:white_check_mark:Succeeded
View

docs/example-scenario/infrastructure/wordpress.md
:white_check_mark:Succeeded
View

docs/guide/architecture-styles/microservices.md
:white_check_mark:Succeeded
View

docs/guide/design-principles/self-healing.md
:white_check_mark:Succeeded
View

docs/guide/pillars.md
:white_check_mark:Succeeded
View

docs/guide/technology-choices/compute-comparison.md
:white_check_mark:Succeeded
View

docs/index.md
:white_check_mark:Succeeded
View

docs/patterns/bulkhead.md
:white_check_mark:Succeeded
View

docs/reference-architectures/app-service-web-app/app-monitoring.md
:white_check_mark:Succeeded
View

docs/reference-architectures/enterprise-integration/basic-enterprise-integration.md
:white_check_mark:Succeeded
View

docs/reliability/_images/bulkhead.png
:white_check_mark:Succeeded
View

docs/reliability/_images/composite-sla.png
:white_check_mark:Succeeded
View

docs/reliability/_images/disaster-recovery.png
:white_check_mark:Succeeded
View

docs/reliability/architect.md
:white_check_mark:Succeeded
View

docs/reliability/deploy.md
:white_check_mark:Succeeded
View

docs/reliability/disaster-recovery.md
:white_check_mark:Succeeded
View

docs/reliability/index.md
:white_check_mark:Succeeded
View

docs/reliability/monitoring.md
:white_check_mark:Succeeded
View

docs/reliability/requirements.md
:white_check_mark:Succeeded
View

docs/reliability/testing.md
:white_check_mark:Succeeded
View

docs/resiliency/disaster-recovery-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/disaster-recovery-high-availability-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/failure-mode-analysis.md
:white_check_mark:Succeeded
View

docs/resiliency/high-availability-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/high-availability-checklist.md
:white_check_mark:Succeeded
View

docs/resiliency/images/retry.png
:white_check_mark:Succeeded

docs/resiliency/images/sla1.png
:white_check_mark:Succeeded

docs/resiliency/index.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-local-failures.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-loss-azure-region.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-on-premises-azure.md
:white_check_mark:Succeeded
View

docs/toc.yml
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 9a246b1:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

docs/.markdownlint.json
:white_check_mark:Succeeded

docs/aws-professional/index.md
:white_check_mark:Succeeded
View

docs/checklist/availability.md
:white_check_mark:Succeeded
View

docs/checklist/dev-ops.md
:white_check_mark:Succeeded
View

docs/checklist/index.md
:white_check_mark:Succeeded

docs/checklist/resiliency-per-service.md
:white_check_mark:Succeeded
View

docs/checklist/resiliency.md
:white_check_mark:Succeeded
View

docs/cloud-adoption/governance/governance-disciplines.md
:white_check_mark:Succeeded
View

docs/cloud-adoption/operations/operational-fitness-review.md
:white_check_mark:Succeeded
View

docs/example-scenario/ai/commerce-chatbot.md
:white_check_mark:Succeeded
View

docs/example-scenario/apps/decentralized-trust.md
:white_check_mark:Succeeded
View

docs/example-scenario/apps/devops-with-aks.md
:white_check_mark:Succeeded
View

docs/example-scenario/data/fraud-detection.md
:white_check_mark:Succeeded
View

docs/example-scenario/infrastructure/regulated-multitier-app.md
:white_check_mark:Succeeded
View

docs/example-scenario/infrastructure/wordpress.md
:white_check_mark:Succeeded
View

docs/guide/architecture-styles/microservices.md
:white_check_mark:Succeeded
View

docs/guide/design-principles/self-healing.md
:white_check_mark:Succeeded
View

docs/guide/pillars.md
:white_check_mark:Succeeded
View

docs/index.md
:white_check_mark:Succeeded
View

docs/patterns/bulkhead.md
:white_check_mark:Succeeded
View

docs/reference-architectures/app-service-web-app/app-monitoring.md
:white_check_mark:Succeeded
View

docs/reference-architectures/enterprise-integration/basic-enterprise-integration.md
:white_check_mark:Succeeded
View

docs/reliability/_images/bulkhead.png
:white_check_mark:Succeeded
View

docs/reliability/_images/composite-sla.png
:white_check_mark:Succeeded
View

docs/reliability/_images/disaster-recovery.png
:white_check_mark:Succeeded
View

docs/reliability/architect.md
:white_check_mark:Succeeded
View

docs/reliability/deploy.md
:white_check_mark:Succeeded
View

docs/reliability/disaster-recovery.md
:white_check_mark:Succeeded
View

docs/reliability/index.md
:white_check_mark:Succeeded
View

docs/reliability/monitoring.md
:white_check_mark:Succeeded
View

docs/reliability/requirements.md
:white_check_mark:Succeeded
View

docs/reliability/testing.md
:white_check_mark:Succeeded
View

docs/resiliency/disaster-recovery-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/disaster-recovery-high-availability-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/failure-mode-analysis.md
:white_check_mark:Succeeded
View

docs/resiliency/high-availability-azure-applications.md
:white_check_mark:Succeeded
View

docs/resiliency/high-availability-checklist.md
:white_check_mark:Succeeded
View

docs/resiliency/images/retry.png
:white_check_mark:Succeeded

docs/resiliency/images/sla1.png
:white_check_mark:Succeeded

docs/resiliency/index.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-local-failures.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-loss-azure-region.md
:white_check_mark:Succeeded
View

docs/resiliency/recovery-on-premises-azure.md
:white_check_mark:Succeeded
View

docs/toc.yml
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Make circleci-integration-kubernetes gate required

The test has been running stable for more than a week. TOC approved making this a required gate in today's meeting.
We should make circleci-integration-kubernetes gate required.
https://testgrid.k8s.io/istio-presubmits#circleci-integration-kubernetes

Done for master


Improve linked headlines

Closes: #5174
As discussed in https://github.com/plone/volto/issues/5174

[x] disable "copy anchor link to clipboard" functionality for anonymous users of the website (this is a feature that no public website has anywhere in the world)
[x] keep the feature for now for logged-in users, integrators can disable it with a feature toggle
[x] change the wording of the notification from "Link copied to clipboard" to "Anchor link copied to the clipboard" to make it more obvious that an anchor link has been copied (again, this only works for editors that know the feature)
[x] fix the bug that the anchor link does not work if your headline has a special character (e.g. "Überschrift")

Unfortunately this is a Chrome issue, it does works well in FF and Safari :( This only happens in SSR. At least, on links, and when the router is present, it does well.

[x] disable the "copy to anchor link to clipboard" for the page title

Letf TODO: try to normalize the links that have special characters, so we make sure that all of them will work in all situations.


MM-28296: improved slash command autocomplete

Summary
When the slash command prompt in the playbook details backstage is blurred with an empty or only / value, just revert back to Add a Slash Command as though nothing was entered. This  makes it easy to click back in and trigger the autocomplete prompt right away.
Ticket Link
Fixes: https://mattermost.atlassian.net/browse/MM-28037

Codecov Report

Merging #312 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #312   +/-   ##
=======================================
  Coverage   40.54%   40.54%
=======================================
  Files          22       22
  Lines        2849     2849
=======================================
  Hits         1155     1155
  Misses       1528     1528
  Partials      166      166

Continue to review full report at Codecov.

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


Crash on rename symbol (C++)

We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug

Press F2
Rename Symbol
VS Code crashes

Happens with code_1.67.0-1651667246_amd64.deb
Doesn't happen with code_1.66.2-1649664567_amd64.deb
VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:49:24.808Z)
OS version: Linux x64 5.13.0-40-generic
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz (6 x 2711)

GPU Status
2d_canvas: unavailable_softwarecanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: disabled_softwaremultiple_raster_threads: enabled_onoop_rasterization: disabled_offopengl: disabled_offrasterization: disabled_softwareraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: disabled_softwarevideo_encode: disabled_softwarevulkan: disabled_offwebgl: unavailable_softwarewebgl2: unavailable_software

Load (avg)
0, 0, 1

Memory (System)
7.76GB (0.76GB free)

Process Argv
--unity-launch /home/jha/Development/Viza/mee066-esw-intercom-apps --crash-reporter-id 9a2e1da6-5c56-4d59-a955-71d648d08bca

Screen Reader
no

VM
100%

DESKTOP_SESSION
ubuntu

XDG_CURRENT_DESKTOP
Unity

XDG_SESSION_DESKTOP
ubuntu

XDG_SESSION_TYPE
x11

Extensions (35)

Extension
Author (truncated)
Version

numbered-bookmarks
ale
8.3.0

bracket-pair-colorizer-2
Coe
0.2.4

doxdocgen
csc
1.4.0

bitbake
Eug
1.1.2

vscode-terminals
fab
1.13.0

todo-tree
Gru
0.0.215

output-colorizer
IBM
0.1.2

latex-workshop
Jam
8.26.0

plantuml
jeb
2.17.2

better-cpp-syntax
jef
1.15.13

cmake-language-support-vscode
jos
0.0.4

vscode-clangd
llv
0.1.17

codeacejumper
luc
3.3.2

git-graph
mhu
1.30.0

vscode-dotnet-runtime
ms-
1.5.0

python
ms-
2022.6.0

jupyter
ms-
2022.4.1011282140

jupyter-keymap
ms-
1.0.0

jupyter-renderers
ms-
1.0.6

remote-containers
ms-
0.234.0

remote-ssh
ms-
0.78.0

remote-ssh-edit
ms-
0.80.0

cpptools
ms-
1.10.0

cpptools-extension-pack
ms-
1.2.0

clang-tidy
not
0.5.1

cpp-check-lint
Qiu
1.4.7

quicktype
qui
12.0.46

java
red
1.6.0

partial-diff
ryu
1.4.3

code-spell-checker
str
2.1.11

intellicode-api-usage-examples
Vis
0.1.1

vscodeintellicode
Vis
1.2.20

vscode-java-dependency
vsc
0.19.1

vscode-java-pack
vsc
0.22.4

markdown-pdf
yza
1.4.4

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30475216

Added the *.dmp file to the zip.
788aa006-5532-42ea-94aa-c941f3a7ebf1.zip

The same thing happens when i do "Replace in Files".
I attached another dump for this case:
05652857-9d70-4a69-9e75-1771b442c16c.zip

Hey @deepak1556, this issue might need further attention.
@hamajo75, you can help us out by closing this issue if the problem no longer exists, or adding more information.

Hello, I experienced the same issue recently, I'm currently on version 1.73 running on Ubuntu 20.04.
In attachment the logs, including the dump file.
vscode-rename-logs.zip

Hi,
i think i resolved the issue finally by disabling the extensions

cpptools
cpptools-extension-pack

There might have been some sort of conflict with the vscode-clangd extension.

Thanks for your update, I'm using only the cpp extensions from microsoft. I tried also to disable them, but no luck, vscode still crashes when trying to rename a class name across the whole workspace (sometimes it shows the preview, sometimes crashes even before that).

same here, I do observe the same crash on 1.72.2 on Ubuntu 20.04.
@hamajo75 's input helped, though.
Disabling Microsoft's C/C++ Extension Pack and re-enabling only C/C++ & CMake did the trick. No crashes anymore.

had the same on version 1.72.2 on ubuntu 20.04
@hamajo75 's hint helped me to fix it too: I disabled all extensions that I didn't strictly need. Now VSCode doesn't crash anymore when renaming variables. I now still have the Microsoft's cpp tools enabled (not the extension pack, though)

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.
Happy Coding!


Updating Docs

Updated README.md to include configuration options for the Notification Service.

Option 'template' has been replaced by "templateUrl"
Please, update. Then I merge pull-request

:+1: Good call - done!


服务器部署，host指向local host地址

我在服务器部署了本项目，通过docker compose up启动，关于astra_playground和astra_graph_designer链接指向都是localhost:8080和localhost:49483，我本机的电脑并没有部署相关服务，造成agents功能以及gd server找不到数据。astra_playground我通过修改.env文件添加NEXT_PUBLIC_REQUEST_URL参数为我服务器IP解决了，但是astra_graph_designer服务我修改.env文件NEXT_PUBLIC_USE_MOCK，并不能重新编译，希望提供一个服务器部署方案。

十分感谢！

@limujun, good to have this issue. Right now, we don’t think having Graph Designer on the cloud is a good idea, as it’s not productive from a development standpoint. Simply using it locally for development and testing is more than enough. You don’t need to have it on the cloud.
I see your point, as some other providers are doing so; therefore, I’m going to label this issue with "enhancement" and “question,” and we’ll see what we can do later. Meanwhile, if you have time, please go ahead and translate the issue into English. Making the community international will benefit all contributors.
Appreciated.

the problem is graph designer is using next.js, and NEXT_PUBLIC_REQUEST_URL mainly works on compile time, not runtime. if you are using our pre-compiled version in docker compose, you won't be able to change the pointing URL.
because it's next.js, one potential solution is to add api handlers to graph designer so that the api will access its local relative service endpoints.

close for no response. please reopen if issue persists.


fix(data): optimized regex for 933211 w/ crs-toolchain

referring to #2581
the bb test works as expected on sandbox (payload blocked at PL3 by 933211)
$ curl -i -H "x-format-output: txt-matched-rules" -H "x-backend: apache" -H "x-crs-version: nightly" -H "x-crs-paranoia-level: 3" "https://sandbox.coreruleset.org" -G --data-urlencode "code=(sy.(st).em)(@id)"
HTTP/1.1 200 OK
Date: Wed, 23 Nov 2022 09:20:17 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
X-Unique-ID: Y33l0Z2dMj7W2sk7D7FPGQAAAJI
x-backend: apache-nightly

933211 PL3 PHP Injection Attack: Variable Function Call Found
942431 PL3 Restricted SQL Character Anomaly Detection (args): # of special characters exceeded (6)
949110 PL1 Inbound Anomaly Score Exceeded (Total Score: 8)
980170 PL1 Anomaly Scores: (Inbound Scores: blocking=8, detection=8, per_pl=0-0-8-0, threshold=5) - (Outbound Scores: blocking=0, detection=0, per_pl=0-0-0-0, threshold=4) - (SQLI=3, XSS=0, RFI=0, LFI=0, RCE=0, PHPI=5, HTTP=0, SESS=0)

this PR adds data file for a better description and optimization of the regex

all payload is detected, the problem is that with the optional trailing ; or $ this rule is prone to many FPs. That's the reason why we decided to add a required [;$]+ at the end of the payload

My idea is to accept this FP (this is a 'dog' (not a cat).) for PL3 and clone this rule for PL2 enforcing the trailing ;|$. Any concerns about it?

I do not understand what you want to do exactly, but I agree on the acceptance of a rather exotic FP on PL3 and being a bit more selective with the matches on PL2.

I've removed the FP check for 933211 (PL3), and I've optimized the rule on PL2 that matches only if the payload has a trailing ;
since the two rules 933210 and 933211 are "twins" I hope it's ok to change them in a single PR. If not, I'll split this in 2

@theMiddleBlue run crs-toolchain util renumber-tests -a to fix test numbering.

@theMiddleBlue run crs-toolchain util renumber-tests -a to fix test numbering.

But the wrong test number is for another rule if I'm not wrong. Is it ok to have here this change? Or maybe a new PR?

I think it's fine. It's not a semantic change and this shouldn't usually happen, it's just because the linter is new.

@theMiddleBlue @theseion Can we fix the lint problem here? This looks like one of the last ones for the BB fixes...

Rebased and fixed.


refactor fitting engine to not use fnnls or astropy.modeling

[WIP]
Still WIP but opening a PR to track related issues.
This PR is a fairly major rewrite of the emission-line fitting engine with an eye toward porting the code to the Perlmutter/GPUs (e.g., https://jaxopt.github.io/stable/constrained.html). Specifically, all the astropy.modeling routines have been replaced with a simpler table-based linemodel of parameters (including tied parameters), resulting in about 300 fewer lines of code and notable speed-ups.
However, the speed-ups have been used to include one additional (third) round of fitting where emission lines are minimally constrained to one another, which leads to notable improvements in the line-fitting results for systems with complex line-kinematics (and to account for any cross-camera wavelength-calibration issues).
Second, I've moved away from the home-grown fnnls algorithm for continuum fitting and am now just using scipy.optimize.nnls which I also hope to be able to port to a GPU.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

497 of 587 (84.67%)  changed or added relevant lines in 4 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-2.5%) to 67.532%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

py/fastspecfit/emlines.py
411
453
90.73%

py/fastspecfit/continuum.py
58
106
54.72%

Files with Coverage Reduction
New Missed Lines
%

py/fastspecfit/emlines.py
1
65.96%

Totals

Change from base Build<PHONE_NUMBER>:
-2.5%

Covered Lines:
2028

Relevant Lines:
3003

💛  - Coveralls

This icicle graph shows the original code (using astropy.modeling:

And here's with the refactored code (including the third round of fitting), where I'm fairly certain I can shave off more time in _build_emline_model using numba.jit.

The line-fitting portion of this PR has been tested fairly extensively but will need additional development. In addition, the work on the continuum-fitting engine will require new templates, but I'm going to defer that work to a different PR. Merging now.


Balancing with unequal bins

Hi, I am curious - what will happen if I have a cooler with unequal bins after IC? Will the balancing make row/column sums equal, or proportional to the bin length? Or is there a way to specify this?
I'm just thinking of making a cooler file with TAD coordinates as bins, and wondering how to deal with balancing it.
Thanks!

Balancing will always balance to equalize coverage of the bins, whatever those bins represent. I think this is actually the desired behavior depending on the research question: e.g. if you bin at the fragment level, you can balance the matrix to determine the relative frequency of contacts captured between those things.
Balancing in a way that remains proportional to genomic length could be interesting. That amounts to specifying a set of fixed bin-specific weights in addition to the balancing weights being computed and solving:
B_ij = a_i*b_i * a_j *b_j * A_ij

where 1/a_i is proportional to the genomic bin lengths. Then one solves for the b_i, and the final weights stored will the w_i = a_i * b_i.
P.S. As an aside, are you sure you want to bin by TAD? And if so, which representation makes more sense for the questions you are trying to answer?

Well, if bins are "equal", by length or by number of fragments, then balancing to obtain equal visibility is the only logical way I see. But if the bins are not equal, like in my case, this approach doesn't make sense, since one wouldn't expect equal visibility from them... My other question is actually related to this one, since an easy way to simulate the desired behaviour would be to create a regular equal-bin-size cooler, balance it and then coarsegrain with desired bins.
So... A thought - could I just multiply the weights stored in the cooler in the end by the bin length?
PS
No, I am not sure :) But I thought it could be an easy and fast way to calculate statistics about interactions between different TADs, and wanted to give it a try. I am not sure what you mean in your second question...

So... A thought - could I just multiply the weights stored in the cooler in the end by the bin length?

Yes, I think you're right. (See edited equation in the first post). If the matrix you actually want is S_ij * n_i * n_j and you compute balancing weights x_i, according to A_ij * x_i * x_j = S_ij, then the true weights you want would be w_i = x_i * n_i .

an easy way to simulate the desired behaviour would be to create a regular equal-bin-size cooler, balance it and then coarsegrain with desired bins.

Agreed. If you coarsegrain the balanced values. Though, I think small discrepancies between this and the previous approach can arise due to ignoring of filtered bins.

the bins are not equal, like in my case, this approach doesn't make sense, since one wouldn't expect equal visibility from them

I disagree only at a very technical level. Since we're deriving relative contact frequencies between objects, we can in principle choose to make any objects we want to be "equal" and balance accordingly and it wouldn't be "technically wrong" to do so, but the interpretation will change. Maybe it makes sense if you want some kind of length-independent measure of mutual "affinity" between a set of regions, rather than the contact frequencies between them. Though, I can't immediately think of how such a thing could be useful.

Cool, thanks! I guess I'll give it a go and see what happens. This should really simplify and speed up the analysis.
This could also be useful for compartments, I think, by the way.
I agree that technically doing regular balancing with unequal bins is OK, what I mean it doesn't make much sense biologically... At least I also don't see how it can be useful.

OK, so, balancing with unequal bins seems to be broken completely, actually... I created the cooler using cooler cload hiclib --assembly mm9 $1 $2 $3 (where arguments are the bins file, fragments file and output file). I use cli to balance too - cooler balance $file, this is what I get:
INFO:cooler:Balancing "serum_tads.cool"
multiprocess.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/multiprocess/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/cooler/tools.py", line 51, in apply_pipeline
    data = func(chunk, data)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/cooler/ice.py", line 58, in _marginalize
    np.bincount(pixels['bin1_id'], weights=data, minlength=n)
ValueError: The first argument of bincount must be non-negative
"""

The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/bin/cooler", line 11, in <module>
    load_entry_point('cooler==0.7.5.dev0', 'console_scripts', 'cooler')()
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/cooler/cli/balance.py", line 184, in balance
    map=pool.imap_unordered)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/cooler/ice.py", line 257, in iterative_correction
    .reduce(add, np.zeros(n_bins))
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/cooler/tools.py", line 241, in reduce
    return reduce(binop, iter(self.run()), init)
  File "/exports/igmm/eddie/wendy-lab/ilia/Hi-C/lib/python3.5/site-packages/multiprocess/pool.py", line 695, in next
    raise value
ValueError: The first argument of bincount must be non-negative

This is the cooler that I got with unequal bins (zipped to allow attachment)
serum_tads.cool.zip
Fetching regions from it is also broken:
st.matrix(balance=False).fetch('chr1')
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-43-2e63c99e5e43> in <module>()
----> 1 st.matrix(balance=False).fetch('chr1')

/usr/local/lib/python3.5/dist-packages/cooler/core.py in fetch(self, *args, **kwargs)
    564         if self._fetch is not None:
    565             i0, i1, j0, j1 = self._fetch(*args, **kwargs)
--> 566             return self._slice(self.field, i0, i1, j0, j1)
    567         else:
    568             raise NotImplementedError

/usr/local/lib/python3.5/dist-packages/cooler/api.py in _slice(field, i0, i1, j0, j1)
    294                 grp = h5[self.root]
    295                 return matrix(grp, i0, i1, j0, j1, field, balance, sparse,
--> 296                     as_pixels, join, ignore_index, max_chunk)
    297
    298         def _fetch(region, region2=None):

/usr/local/lib/python3.5/dist-packages/cooler/api.py in matrix(h5, i0, i1, j0, j1, field, balance, sparse, as_pixels, join, ignore_index, max_chunk)
    597
    598     else:
--> 599         i, j, v = query_rect(triu_reader.query, i0, i1, j0, j1)
    600         arr = coo_matrix((v, (i-i0, j-j0)), (i1-i0, j1-j0)).toarray()
    601

/usr/local/lib/python3.5/dist-packages/cooler/core.py in query_rect(triu_reader, i0, i1, j0, j1)
    376     # symmetric query
    377     if (i0, i1) == (j0, j1):
--> 378         i, j, v = triu_reader(i0, i1, i0, i1)
    379         nodiag = i != j
    380         i, j, v = np.r_[i, j[nodiag]], np.r_[j, i[nodiag]], np.r_[v, v[nodiag]]

/usr/local/lib/python3.5/dist-packages/cooler/core.py in query(self, i0, i1, j0, j1)
    268         i, j, v = [], [], []
    269         if (i1 - i0 > 0) or (j1 - j0 > 0):
--> 270             edges = h5['indexes']['bin1_offset'][i0:i1 + 1]
    271             data = h5['pixels'][field]
    272             p0, p1 = edges[0], edges[-1]

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/tmp/pip-huypgcah-build/h5py/_objects.c:2840)()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper (/tmp/pip-huypgcah-build/h5py/_objects.c:2798)()

/usr/local/lib/python3.5/dist-packages/h5py/_hl/dataset.py in __getitem__(self, args)
    472
    473         # Perform the dataspace selection.
--> 474         selection = sel.select(self.shape, args, dsid=self.id)
    475
    476         if selection.nselect == 0:

/usr/local/lib/python3.5/dist-packages/h5py/_hl/selections.py in select(shape, args, dsid)
     92
     93     sel = SimpleSelection(shape)
---> 94     sel[args]
     95     return sel
     96

/usr/local/lib/python3.5/dist-packages/h5py/_hl/selections.py in __getitem__(self, args)
    259             return self
    260
--> 261         start, count, step, scalar = _handle_simple(self.shape,args)
    262
    263         self._id.select_hyperslab(start, count, step)

/usr/local/lib/python3.5/dist-packages/h5py/_hl/selections.py in _handle_simple(shape, args)
    445     for arg, length in zip(args, shape):
    446         if isinstance(arg, slice):
--> 447             x,y,z = _translate_slice(arg, length)
    448             s = False
    449         else:

/usr/local/lib/python3.5/dist-packages/h5py/_hl/selections.py in _translate_slice(exp, length)
    486         raise ValueError("Step must be >= 1 (got %d)" % step)
    487     if stop < start:
--> 488         raise ValueError("Reverse-order selections are not allowed")
    489
    490     count = 1 + (stop - start - 1) // step

ValueError: Reverse-order selections are not allowed

(The bins I used are, of course, stored in the cooler)
Is it a bug?..

You somehow ended up with negative pixels. Could you send me the frag file you used?
cooler dump -t pixels serum_tads.cool | head
-1	-1	129160
-1	0	18147
-1	1	6913
-1	2	8114
-1	3	2216
-1	4	1674
-1	5	3177
-1	6	1010
-1	7	4076
-1	8	2020

It's huge, that won't be easy! But the exact same frag file works fine with with equal 1Mb bins, or any other resolution... I could try again tomorrow with some small frag file and send it if it also doesn't work?

alright, sounds good!

Hi, I shared a link to a file with you by email. I am thinking is it possible this is because the first bin doesn't start at 0, that's why there are negative coordinates? I'll check now.

Yes, this seems to be the problem - after I added another bin there between 0 and the start of the previously first bin balancing works fine. So, I guess, if there are reads that fall before the first bin, there is a problem?

Ah, yes, that is it! So far, the assumption has been that bins are a complete segmentation of each scaffold without gaps. It certainly doesn't have to be this way, but would require updating the aggregators. I can reopen as a new issue. For now, it should at least raise an error.

By they way, when I added a bin in the beginning I only did it for the first chromosome, all others were still not starting from zero (and they are all also not ending at the very last bin) - and it seemed to work!

Continue discussion in #104


Update README links to point to nodezoo repo.

Addresses https://github.com/nodezoo/nodezoo-workshop/issues/46

Cheers!


Add player name badge and built in result viewer

This adds a prompt asking the player for their name when the editor starts, which will be displayed in the bottom left corner:

I've also added a built in result viewer to simplify things, and to keep the name visible when showing the results at the end of the round:

This PR also includes a couple of other small changes:

Increased the font size to make the code more legible to the audience.
Closing the reference screenshot now focuses the cursor back to the editor (@petterheterjag should be happy).
Included a sample asset from Unsplash (e.g. a public domain image).
Some minor layout tweaks.

LGTM


Install nano in docker container

After installing the nano, it shows an error message - Error opening terminal: unknown.

Run the command to fix it
$ export TERM=xterm
Reference:
http://andykdocs.de/development/Docker/Fixing+the+Docker+TERM+variable+issue


Add child resource from module cross subscriptions

Is your feature request related to a problem? Please describe.
Not sure if this is something that's not supported, or if it's something I do not understand.
I have one module creating SQL server, this template is shared around the organization. Depending on a boolean flag set, I am trying to set the virtualNetworkRules for the SQL server.
The vnets exists in other subscriptions.
In order to maintain the "list" of vnets one can link with i have created a dedicated module for the vnets, which use the existing function (the vnets it self is maintained in a separate codebase).
What I struggle with within the vnet module is to correctly construct the reference and add the virtualNetworkRules on the sql server as a subresource to the SQL server.
adding the subnet module for reference
// a helper module calling existing vnets and linking with

@allowed([
  'foo'
  'uat'
  'prod'
])
param env string

@allowed([
  'sql'
])
param resourceType string

param resourceName string

param resourceSub string

param resourceRG string

var environmentConfig = {
  foo: {
    vceSubscription: ''
    vnets: {
      vceBlueResourceGroup: '${env}-blue-rg'
      vceGreenResourceGroup: '${env}-green-rg'
      blueVnet: '${env}-blue-vnet'
      greenVnet: '${env}-green-vnet'
    }
  }
}

resource vceblueSubnet 'Microsoft.Network/virtualNetworks/subnets@2021-02-01' existing = {
  name: '${environmentConfig[env].vnets.blueVnet}/aks-${env}-blue-net'
  scope: resourceGroup(environmentConfig[env].vceSubscription, 'ehrnstvnet-test-rg')
}

resource vcegreenSubnet 'Microsoft.Network/virtualNetworks/subnets@2021-02-01' existing = {
  name: '${environmentConfig[env].vnets.greenVnet}/aks-${env}-green-net'
  scope: resourceGroup(environmentConfig[env].vceSubscription, environmentConfig[env].vnets.vceGreenResourceGroup)
}

// this one is deployed by the SQL module
resource sqlServer 'Microsoft.Sql/servers@2021-02-01-preview' existing = if (resourceType == 'sql') {
  name: resourceName
  scope: resourceGroup(resourceSub, resourceRG)
}

resource sqltoVCEnetBlue 'Microsoft.Sql/servers/virtualNetworkRules@2021-02-01-preview' = if (resourceType == 'sql') {
  name: '${sqlServer.name}/${vceblueSubnet.name}'
  properties: {
    virtualNetworkSubnetId: vceblueSubnet.id
    ignoreMissingVnetServiceEndpoint: true
  }
  dependsOn: [
    sqlServer
  ]
}

Figured this out. My incorrect segment length came from adding ${vceblueSubnet.name} to the network rule. it helps to sleep on it :)


Deleted photos on gdrive

Last night I loaded the app for the first time and it worked great, it displayed the photos from my South America trip just fine. This morning I tried again and THE PHOTOS ARE GONE! Tried using my pad to see if the photos are there and they are not.
This is more than a minor problem! I can go to backup but really? You published an app that mistakenly deleted photos?

Ignore this. There was a glitch but it's available on my desktop and will unload this and reload


Feature/push fails

I didn't wire up the task in cumulusci.yml because its pretty rarely used and you can just do it in your local if you need to. Happy to add it to the global if we want...or strategize about how to register the mostly-releng-tasks....
Also ran black on the stuff that hasn't been formatted yet.
Changes

Adds a PushFailTask class that generates a report of push failures from a given request id.

Re whether to register the task...it'd be nice if we had a way to group tasks in the list, and then maybe a way to hide a group unless you have a flag in your personal settings. In other words I want a way to say "show me all the releng tasks" rather than needing to configure each one. This is obviously a separate feature request though.

I do think we should register this task since we already have 4 push_* tasks and this use seems at least as useful to managed package projects as the other 4.
I agree we should have some support for task grouping at some point but am not too worried about including this one task in the interim.

@davisagli ready for rereview.


Community Tagging

Supporting tagging (or categories) is fairly straightforward if we allow the publisher full control, but the ideal solution for tagging is one that allows community consensus. That is, there is some sort of consensus or voting mechanism that does not give the publisher full control over the tags applied to their content.
Community-based tagging would also solve issues surrounding adult content being improperly indicated.

I like the idea of everyone OTHER than the publisher applying tags.

@wallermadev they're pretty much equivalent in terms of functionality -- the system wouldn't be able to prevent the author from applying tags in any meaningful way.

is_claim_mine.
I realized after my first comment that I need the ability to tag a file
with ue4-asset
On 28 Aug 2017 6:59 pm, "Jeremy Kauffman"<EMAIL_ADDRESS>wrote:

@wallermadev https://github.com/wallermadev they're pretty much
equivalent in terms of functionality -- the system wouldn't be able to
prevent the author from applying tags in any meaningful way.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lbryio/lbry/issues/744#issuecomment-325428583, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHrNEHeRgdKal04leVZrPC-nSrg4Ku1bks5scwAKgaJpZM4OK3SX
.

As a publisher, I want to be able to add relevant tags to my video for better results in search engines. I'm worried about others gaming the system.

See: https://github.com/lbryio/lighthouse/issues/49#issuecomment-375987417

this is currently part of proposals


Suckless/Simple Terminal (ST) color scheme support

I wanted to add Iceberg color scheme to ST.
I hope you'll add this to the list (if you do, please, refer me as vejetaryenvampir).
Yours sincerely.
Here it is:
static const char *colorname[] = {
  /* 8 normal colors */
  "#161821", /* black   */
  "#e27878", /* red     */
  "#b4be82", /* green   */
  "#e2a478", /* yellow  */
  "#84a0c6", /* blue    */
  "#a093c7", /* magenta */
  "#89b8c2", /* cyan    */
  "#c6c8d1", /* white   */

  /* 8 bright colors */
  "#6b7089", /* black   */
  "#e98989", /* red     */
  "#c0ca8e", /* green   */
  "#e9b189", /* yellow  */
  "#91acd1", /* blue    */
  "#ada0d3", /* magenta */
  "#95c4ce", /* cyan    */
  "#d2d4de", /* white   */
};

unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
static unsigned int defaultcs = 7;
static unsigned int defaultrcs = 0;

Thank you for porting Iceberg!

Could you share some screenshots of the theme?
Can you host the theme file yourself? (e.g. Gist)
I'm not a ST user so cannot maintain the theme. Hosting it yourself is better way to keep its quality. I'll add a URL to README.

Thank you for porting Iceberg!

Could you share some screenshots of the theme?
Can you host the theme file yourself? (e.g. Gist)
I'm not a ST user so cannot maintain the theme. Hosting it yourself is better way to keep its quality. I'll add a URL to README.

Can I use my account on notabug.org? Because I don't like github (I use my friend's account for now).

Can I use my account on notabug.org? Because I don't like github (I use my friend's account for now).

I do not mind what service you use. Please share the link and some screenshots.

Can I use my account on notabug.org? Because I don't like github (I use my friend's account for now).

I do not mind what service you use. Please share the link and some screenshots.

I'll do it when I fix Xorg...

Can I use my account on notabug.org? Because I don't like github (I use my friend's account for now).

I do not mind what service you use. Please share the link and some screenshots.

I hope it is clear enough: https://notabug.org/vejetaryenvampir/st-iceberg

Thank you! I checked screenshots and it looks good to me. Added a link in c94e82a.
BTW, I recommend adding a license file to your repository. It may help your theme users.

Thank you! I checked screenshots and it looks good to me. Added a link in c94e82a.
BTW, I recommend adding a license file to your repository. It may help your theme users.

I think I chose GPLv3 but not added. :)

I added manually now. Now, can I close this issue?

Sure! Thank you for contributing!

I added manually now. Now, can I close this issue?

Sure! Thank you for contributing!


Late splitting

In the dataset reader construct function:
 def _construct(self):
        """
        construct encoded train, dev, test set.
        """
        vocab_path = cfg.dataset_path + 'vocab.word2idx.json'
        if not os.path.exists(self.dataset.data_path) or not os.path.exists(vocab_path):
            self.data = self.dataset.preprocess_data()
        else:
            self.data = json.loads(open(self.dataset.data_path, 'r', encoding='utf-8').read().lower())
        self.vocab.load_vocab(cfg.vocab_path)

        encoded_data = self._get_encoded_data(self.data)
        self.train, self.dev, self.test = self._split_data(encoded_data, cfg.split)
        random.shuffle(self.train)
        self.train_batch = self._construct_batches(self.train, 'train', cfg.batch_size)
        self.dev_batch = self._construct_batches(self.dev, 'dev', cfg.batch_size)
        self.test_batch = self._construct_batches(self.test, 'test', cfg.batch_size)
        self.batches = {'train': self.train_batch, 'dev': self.dev_batch, 'test': self.test_batch}

the splitting of the dataset into training-dev-test set occurs after the vocab creation and encoding of the data. IMHO, we may add bias in that way, as if only the train set had been used, then we may had a different frequency distribution, changing for example the <unk> words, during inference.

Thanks for the comment. I agree that constructing the vocabulary without seeing the test split is indeed a better practice and should be followed in NLP experiments. Since studying out-of-vocabulary is not our work's main goal, we will keep this part as it is for reproduction considerations.


Should we really include Behaviours and Logging into the base nuget?

@daniel-luberda
I'm wondering if we should create separate nuget for such nice helpers, there may be more over time.
So maybe something like what Michael Ridland did with his FreshEssentials might be a better approach.
What to you think?

IMO Logging is handy in core.
Behavior which I added is in Xamarin.Forms project, so it won't harm to have it there. I didn't have any intentions to add more behaviors, but this one is very commonly used and handy (turns events into commands -> helps with binding -> which is MVVM related).

ok


Add Git LFS support for tasks

Easy win. People keep asking about large assets. Now there's native support for git-lfs :)
https://github.com/METR/mp4-tasks/blob/2339567f68f000a8bed4e92ae208a35a4fc2c6d5/filtered_loan_default_analysis/assets/test.csv
$ viv task ssh

root@e361b2ee26f8:~# ls /home/agent/
instructions.txt  test.csv  train.csv
root@e361b2ee26f8:~# ls
__pycache__  assets  common  filtered_loan_default_analysis.py  metr-task-standard
root@e361b2ee26f8:~# tail /home/agent/test.csv
79055,8000.0, 36 months,12.12,266.18,B,B3,Gordon Food Service,2 years,MORTGAGE,65000.0,Not Verified,Jan-2013,debt_consolidation,Debt consolidation,24.79,Dec-2002,15.0,0.0,7138.0,44.1,26.0,f,INDIVIDUAL,2.0,0.0,"70230 Rodriguez Roads Apt. 533
New Carolynton, OH 00813"
79056,18500.0, 60 months,13.99,430.37,C,C4,IS Service Desk Supervisor,10+ years,MORTGAGE,73500.0,Verified,Jun-2015,home_improvement,Home improvement,1.91,Feb-2005,6.0,0.0,3245.0,27.7,10.0,w,INDIVIDUAL,4.0,0.0,"1433 Katherine Place
Port Donald, CA 00813"
79057,20000.0, 36 months,8.18,628.39,B,B1,Guidance Counselor,10+ years,OWN,110000.0,Source Verified,Oct-2015,debt_consolidation,Debt consolidation,11.53,Mar-1991,12.0,0.0,23190.0,64.2,21.0,f,INDIVIDUAL,0.0,0.0,"2239 Ian Causeway Apt. 612
North Lisashire, AZ 29597"
79058,5750.0, 36 months,16.24,202.84,C,C5,Prep Person,10+ years,MORTGAGE,21000.0,Verified,Jan-2014,credit_card,Credit card refinancing,31.83,Aug-1990,9.0,1.0,9625.0,73.0,22.0,w,INDIVIDUAL,4.0,1.0,"203 Thomas Plaza Apt. 960
Sandraberg, NM 22690"
79059,1500.0, 36 months,6.03,45.66,A,A1,Fontana Unified School District,6 years,MORTGAGE,50000.0,Not Verified,Oct-2012,major_purchase,Spa Loan,11.78,Aug-2002,7.0,0.0,324.0,1.0,15.0,f,INDIVIDUAL,1.0,0.0,"84199 Christopher Pike Suite 997
East Jessica, WV 30723"

That makes me wonder if we need to run git lfs install inside ~/.vivaria/mp4-tasks-mirror too.

I tested by running git lfs install outside any repository in the server container, but I could wipe it all away and test again from scratch.

OK, if it works in that situation then I expect it'll work elsewhere, too 👍

Tested again in a fresh server container built from scratch, works. Moved docs to git support part of readme


test.todo not working for angular projects just for Node based

🐛 Bug Report
The test.todo function doesn't work for Angular 7.x projects. It gives the following error:

TypeError: Cannot read property 'apply' of undefined

  60 |     expect(paddingLat).toBe(0.0005);
  61 |   });
> 62 |   test.todo('getLatPadding should return padding');
     |        ^
  63 | });

To Reproduce
Create a new angular 7.x project, write a test.todo('Description')
Expected behavior
test.todo should work as expected and issue a report of todo tests
envinfo
npx: installed 1 in 1.394s
System:
OS: macOS 10.15
CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
Binaries:
Node: 10.16.3 - ~/.nvm/versions/node/v10.16.3/bin/node
Yarn: 1.19.1 - ~/.nvm/versions/node/v10.16.3/bin/yarn
npm: 6.12.0 - ~/.nvm/versions/node/v10.16.3/bin/npm
npmPackages:
jest: 24.9.0 => 24.9.0

Sorry, this needs a proper repro. An Angular project could have lots of things in the setup that break this.


Flush debounced changes when form is unmounted

Hi everybody, hi @davidkpiano,
thanks for creating this awesome library! It is truly super-helpful, and I very much enjoy using it. This is more of a suggestion/enhancement than a bug: I'm not sure whether this issue should be responsibility of the library. I might also be applying the LocalForm wrong — any hints or suggestions would be very welcome!

The Problem
Form debouncing works perfectly by itself. However, when the form is removed from the page / unmounted, any changes that are still delayed by the debouncing are lost.
Steps to Reproduce
In the example, make a change to the form and change the UI state before the debounce delay is reached. The onChange callback does not get called, and the change is lost.
Expected Behavior
It would (in my view) be fantastic if the debouncing could be flushed when either the form or the control is removed/unmounted from the app, so that any remaining changes are applied.
Actual Behavior
Pending changes are lost.
Reproducible Code Example
I've put together a very basic example at https://codepen.io/anon/pen/pPmjGZ . I sincerely hope it makes sense, and would be happy to make changes or answer questions.

I would be glad to help with resolving this issue if that were ok with you, though it might take some talking through the RRF internals for me to be able to help effectively. Again — it might well be that my approach is wrong, and I would be happy to learn in that case.
Thanks again, and the best regards,
-Felix

This sounds like something that's a good idea - I'll get it done this weekend.

Hi @davidkpiano, thanks for the super-quick response! If there is anything I can do to help with this, do let me know, I'd be glad to help.
I've noticed that debouncing is not covered in the docs, would you like me to draft a brief section? (I'll need until the end of the week to get around to this, but I'd be happy to give it a try. This would go in the Control Component API docs, right)


Uncover output (-o x.txt) result is empty

Uncover output result is empty

uncover version 1.0.8

When using the parameter (-o res.txt) to export the result to a txt file, but the size of the txt file is 0.
uncover kali$ echo 'domain="hackerone.com"'|uncover -e fofa -o res.txt

  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /
\__,_/_/ /_/\___/\____/|___/\___/_/

		projectdiscovery.io

[INF] Current uncover version v1.0.8 (latest)
<IP_ADDRESS>:443
<IP_ADDRESS>:443
<IP_ADDRESS>:80
<IP_ADDRESS>:80
<IP_ADDRESS>:8880
<IP_ADDRESS>:80
<IP_ADDRESS>:8443
<IP_ADDRESS>:8080
<IP_ADDRESS>:8080
<IP_ADDRESS>:2086
<IP_ADDRESS>:2086
<IP_ADDRESS>:80
<IP_ADDRESS>:2083
<IP_ADDRESS>:443
<IP_ADDRESS>:2082
uncover kali$
uncover kali$ ls -al
total 0
drwxr-xr-x   3 kali  staff   96  5 30 12:25 .
drwx------@ 17 kali  staff  544  5 30 12:17 ..
-rw-r--r--   1 kali  staff    0  5 30 12:25 res.txt
uncover kali$ cat res.txt
uncover kali$

bumping this - still seems to be an issue

@chasingboy @assetgrower fixed in latest release - https://github.com/projectdiscovery/uncover/releases/tag/v1.0.9


chore: updating version.go adding more detail to Agent function

Fixes #823

@izikdepth @Ja7ad @kehiy
This PR is crucial, and we should ensure that we won't need to refactor it in the future. If you're all okay with it, let's schedule an internal meeting to discuss the best approach.
Question from @izikdepth
Using above parameters: runtime.GOOS, runtime.GOARCH
Can we know if the agent is GUI or CLI?

@izikdepth @Ja7ad @kehiy
This PR is crucial, and we should ensure that we won't need to refactor it in the future. If you're all okay with it, let's schedule an internal meeting to discuss the best approach.
Question from @izikdepth Using above parameters: runtime.GOOS, runtime.GOARCH Can we know if the agent is GUI or CLI?

We can known with global variable or etc before init node, of course need this global has been set in cmd.

Question from @izikdepth
Using above parameters: runtime.GOOS, runtime.GOARCH
Can we know if the agent is GUI or CLI?

We can have this meeting tomorrow or now if everyone ok(?).

tomorrow

Question from @izikdepth
Using above parameters: runtime.GOOS, runtime.GOARCH
Can we know if the agent is GUI or CLI?

We can have this meeting tomorrow or now if everyone ok(?).

tomorrow

@izikdepth pip updated: https://pips.pactus.org/PIPs/pip-14

Fixed in:

#841


Interaction with Kubernetes Drain and Cordon operation

We need to consider what we should do with the Kubernetes drain and cordon node for maintenance.
Also, when Kubernetes is doing recommended upgrade, each node will be drained. Need to take care of that scenario as well.

What cordon did is add changes to the node spec, including a taint and unscheduable=true.
spec:
  podCIDR: <IP_ADDRESS>/24
  podCIDRs:
  - <IP_ADDRESS>/24
  taints:
  - effect: NoSchedule
    key: node.kubernetes.io/unschedulable
    timeAdded: "2020-05-04T06:15:48Z"
  unschedulable: true

We will use https://github.com/longhorn/longhorn/issues/307 to help with the node drain case. Cordon case will be handled on #1287 . Maintenance guide about drain and cordon is at #1121 .
Close this issue.


Updated scanner.py --> Config.json was wrongly pathed

Description
There is a bug in file src/scanner.py line 41 --> print get_absolute_path('../config.json')

get_absolute_path function searching the config.json file in src dir but it is present in root dir.

Fixes # (issue)
Type of change

[ ] Bug fix (The path of config.json is wrong in src/scanner.py in line 41)

@rexj8 consider creating the PR in develop branch and not in master.


[DROOLS-991] allow to configure maxEventsInMemory in FileLogger

+1

Merged by https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/5b3f7672b3af9f25af7c77fe83decccc83f029fe


Overriding endpoint in provider configuration isn't used for retrieving requests

Description
We are using an API proxy for accessing the IONOS API, which we configure by setting IONOS_API_URL. This address is successfully used to let the terraform provider make requests to create resources (e.g. ionoscloud_user), but when retrieving the status for the underlying request, the wrong endpoint (which is not resolvable/reachable from our environment) is used, causing the resource creation to fail.
Expected behavior
I expect the provider to use the configured IONOS API endpoint for all requests to the IONOS API.
Environment
Terraform version:
1.5.3

Provider version:
6.4.10

OS:
Ubuntu

How to Reproduce
In our setup, we use a Proxy to access the IONOS API. The default endpoint is not reachable from our environment.
For reproducing the error in such a setup, you simply need to run terraform apply with an overriden endpoint and any example resouce (I tested it with ionoscloud_user):
provider "ionoscloud" {
endpoint = "http://my-proxy.local"
}
resource "ionoscloud_user" "this" {
active     = true
first_name = "test"
last_name  = "User"
email      =<EMAIL_ADDRESS>password       = "doesntmatter
administrator  = false
}
Error and Debug Output
Error: request failed with following error: Get "https://<redacted>/cloudapi/v6/requests/<uid>/status": dial tcp: lookup <redacted> on <IP_ADDRESS>:53: no such host

   with ionoscloud_user.this,
   on main.tf line 41, in resource "ionoscloud_user" "this":
   41: resource "ionoscloud_user" "this" {

<redacted> is the base-API-URL that is returned in the LOCATION header from the user-creation response.
Additional Notes
I looked at the provider and go-sdk and found that after creating a resource (i.e. user), the LOCATION header from the response is used to retrieve the request status, and the function from the ionos go-sdk would override the host of the location header when it is configured in the client.
The host and scheme are never set on the client, neither explicitly when the terraform provider configures it, nor implicitly in the client's NewApiClient or [NewConfiguration](https://github.com/ionos-cloud/sdk-go/blob/master/configuration.go#L130) methods.

@LiviusP is there any way I can help with fixing this?

Looking at how to best override the location header that's being returned

I believe the best fix would be to simply fix the configuration in https://github.com/ionos-cloud/sdk-go/blob/master/configuration.go#L130 by setting endpoint and scheme when the hostUrl is set. Then the sdk will already override the location header for us.

We're doing some tests. If you have something that works, you can maybe create a PR? We always encourage the creation of PRs.

I believe https://github.com/ionos-cloud/sdk-resources/pull/339 could address this. To my understanding that repo generates the SDKs, correct? If that approach looks generally good to you @cristiGuranIonos, I can also add tests and add the code to the other client's templates.

Should be fixed in v6.4.11

Thanks, that worked for me :)