Vendor pkg search should consider aliasing

A search with com.fasterxml.jackson.core as the vendor prefix should also consider fasterxml

This aliasing feature is moved to dep-scan to keep this db quite generic.


Greetings in 10 African languages from api

What?

A static us that displays "Hello World!" in 10 African languages at random.

Why?

To practice how to make an app that takes rails database as its backend and react as its frontend.

How?

Created a new Rails app called 'hello-world-rails-react'.
Used the command rails new -j webpack my_new_rails_app as described in the previous lesson's tutorial.
Verified that the jsbundling-rails gem is added to your Gemfile.
Initialized my project with Git.
Installed needed node dependencies as described in the previous lesson's tutorial.
Created a babel.config.js in the root folder of your project as described in the previous lesson's tutorial.
Updated webpack.config.js to include the babel loader as described in the previous lesson's tutorial.
Made sure that your project has a Postgres database set up.
Created a table for storing your messages and create 5 different greetings.
Created an API endpoint that selects a random greeting from your table.
Created a static view that will be the root of your app.
Created the App component with react-router and render it in your static view.
Created the Greeting component that will display a greeting. Set it up as a route in your App component.
Created a store, an action, and a reducer that will connect to your API endpoint to get the random greeting.
Displayed the random greeting in my Greeting component.

@t-yanick Thank you for reviewing my project. Working on it asap


add functions to upload/download certificates

Using the monitor API endpoints
/api/v2/monitor/system/certificate/download
/api/v2/monitor/vpn-certificate/local/import
Required to implement: https://github.com/fortinetdev/terraform-provider-fortios/pull/168

Hi @poroping ,
Thank you for contributing to Terraform FortiOS provider. /api/v2/monitor/system/certificate/download and /api/v2/monitor/vpn-certificate/local/import are monitor APIs. Monitor APIs are stateless, and we do not provide resources for stateless APIs. It will violate Terraform's purpose https://www.terraform.io/docs/language/state/purpose.html, and may make user confusing.
For monitor APIs, we have a solution of using generic resource: https://registry.terraform.io/providers/fortinetdev/fortios/latest/docs/resources/fortios_json_generic_api. We encourage user using this generic resource to handle monitor APIs to keep Terraform FortiOS provider's consistence.
Again, thank you for your contribution and great idea. You are very welcome to share your great thought and point out our problem. Please let me know if you have any questions.
Thanks,
Xing


Apple M1 chip - illegal hardware instruction

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): MacOS Big Sur 11.0.1
TensorFlow installed from (source or binary): https://www.tensorflow.org/install/pip
TensorFlow version: Latest stable (pip)
Python version: Python 3.8.5
Installed using virtualenv? pip? conda?: exactly like in the instruction https://www.tensorflow.org/install/pip
Bazel version (if compiling from source): /
GCC/Compiler version (if compiling from source): /
CUDA/cuDNN version: /
GPU model and memory: /

Describe the problem
After running the verification steps
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

The following error appear
illegal hardware instruction

Any other info / logs
This issue only appear on the Mac with the Apple M1 chip. The same setup procedure https://www.tensorflow.org/install/pip works fine on my other Mac`s.

Hello Mihai,
thanks for your quick response.
This information rather surprises me especially since Apple and TensorFlow did quite some advertising about it.

This means we will have to work on some kind of private Apple fork rather then on the official TensorFlow version?
Are there any plans to integrate this directly into TensorFlow?
This also means we are bounded to TensorFlow 2.4 on Apple M1 Macs?

It seems somehow odd to use a fork just because it is another chip.

Hello Mihai,
thanks for your quick response.
This information rather surprises me especially since Apple and TensorFlow did quite some advertising about it.

This means we will have to work on some kind of private Apple fork rather then on the official TensorFlow version?
Are there any plans to integrate this directly into TensorFlow?
This also means we are bounded to TensorFlow 2.4 on Apple M1 Macs?

It seems somehow odd to use a fork just because it is another chip.

The new chip is on ARM, afaik. We only release x86_64 official pips and leave everything else to the community.
there is #45404 to make this repo build on the ARM chips but will take a while until it lands and we still don't have this supported during release time. We have less than 1 engineer left for releasing.

The new chip is on ARM, afaik. We only release x86_64 official pips and leave everything else to the community.
there is #45404 to make this repo build on the ARM chips but will take a while until it lands and we still don't have this supported during release time. We have less than 1 engineer left for releasing.

In the near future, we’ll be making updates like this even easier for users
to get these performance numbers by integrating the forked version into
the TensorFlow master branch.

https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html

Can you provide us an ETA for that?
Great to see the community is working on that https://github.com/tensorflow/tensorflow/pull/45404. But it usually takes a lot of time till builds are implemented and integrated. That means I have to rely on Apple and their Support. This is a big issue in my opinion.

In the near future, we’ll be making updates like this even easier for users
to get these performance numbers by integrating the forked version into
the TensorFlow master branch.

https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html

Can you provide us an ETA for that?
Great to see the community is working on that https://github.com/tensorflow/tensorflow/pull/45404. But it usually takes a lot of time till builds are implemented and integrated. That means I have to rely on Apple and their Support. This is a big issue in my opinion.

Afaik Apple has not communicated at all with the team that does the releases. Given that there is only 1 person (actually less since releases are not prioritized), there cannot be an ETA.

Afaik Apple has not communicated at all with the team that does the releases. Given that there is only 1 person (actually less since releases are not prioritized), there cannot be an ETA.

https://github.com/tensorflow/tensorflow/issues/46044#issuecomment-753549970
I hope this comment will help you before merge  the Apple fork, which seems it will be a longgggg time.
:)

https://github.com/tensorflow/tensorflow/issues/46044#issuecomment-753549970
I hope this comment will help you before merge  the Apple fork, which seems it will be a longgggg time.
:)

Shouldn't it work when using Rosetta 2 though? Unfortunately it doesn't when running arch -x86_64 python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

Shouldn't it work when using Rosetta 2 though? Unfortunately it doesn't when running arch -x86_64 python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"

For Rosetta2: see #46044 (master branch should be able to compile, 2.4 branch waiting for a patch release)
For M1 chip, we landed #45404 so now if you compile this repo from source you should also get a working TF.
We are currently looking at how we can provide ongoing support.
I think we can close this now and leave #46044 open.

For Rosetta2: see #46044 (master branch should be able to compile, 2.4 branch waiting for a patch release)
For M1 chip, we landed #45404 so now if you compile this repo from source you should also get a working TF.
We are currently looking at how we can provide ongoing support.
I think we can close this now and leave #46044 open.

The blog post specifically links to a separate tensorflow repo that needs to be built, not the version that comes from PyPi
https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html

The blog post specifically links to a separate tensorflow repo that needs to be built, not the version that comes from PyPi
https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html

Closing this issue in the light of #45404. Thanks!

Closing this issue in the light of #45404. Thanks!

Is there any update on this issue? Now it is June 12th and I'm still getting this error.

I wanted to add that I get this not just with tensorflow, but with gcc/g++ (more often if I have some optimization/target pragmas), and with lots of things that use gcc/g++, like a rust crate I just tried to run.

Hey, It's July  I am still facing the issue, Is there a solution yet?

mark

You guys must see this post
https://developer.apple.com/metal/tensorflow-plugin/

I am M1 Pro user. I met this problem after activating the virtual environment Anaconda and installing tensorflow. When I run my program and it failed. I'm perplexed about it and hope that Tim Cook can help me.

Facing a similar issue created a new environment and installed all the required packages using conda-mini forge. Now the issue I'm getting is below
(TeleStoke) rish@DSIs-MBP Server % python app.py  zsh: illegal hardware instruction python app.py

Hi @rish2497 !
I could run scripts through "python app.py" but it is not giving output as expected compared to linux and windows.
We are bringing this to internal team again. Thanks for bringing it up again.
Thank you!

facing similar issue in October for other staffs
Python 3.9.12 (main, Apr  5 2022, 01:53:17)
[Clang 12.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from transformers import BertTokenizer, BertModel
>>> tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
>>> tokenizer.decode([101, 102])
zsh: illegal hardware instruction  python

https://docs.anaconda.com/anaconda/user-guide/tasks/tensorflow/
try out the first method of installing tensorflow. It worked for my M1 Macbook Pro

on your terminal simply type:
conda create -n tf tensorflow
here rename tf to the name of your choice

I am M1 Pro user. I met this problem after activating the virtual environment Anaconda and installing tensorflow. When I run my program and it failed. I'm perplexed about it and hope that Tim Cook can help me.

https://docs.anaconda.com/anaconda/user-guide/tasks/tensorflow/
try out the first method of installing tensorflow. It worked for my M1 Macbook Pro
on your terminal simply type:
conda create -n tf tensorflow
here rename tf to the name of your choice

https://docs.anaconda.com/anaconda/user-guide/tasks/tensorflow/

There are two versions (CPU-only and GPU). Can you specify which version you use?
Thanks!


Using the same endpoint for serving a Template and a JSON response

I would like to serve an HTML page when the accept header is set to text/html and serve a JSON object when the accept header is set to application/json.
Is that possible? If so, what should I set the response_class to?

Hi
my this help you
from fastapi import FastAPI, Response
from fastapi.requests import Request

app = FastAPI()

@app.get("/")
async def index(request: Request):
    data = {"name": "some name"}
    accept = request.headers["accept"]
    data = str(data)
    response = Response(content=data, media_type=accept)
    return response

You can do as @includeamin said. Or based by your question, I imagine that you want to do something with the response_class parameter, which is possible as well.
from fastapi import FastAPI
from fastapi import Response # or JSONResponse or any other that suits you

class MyOwnResponse(Response):
    """Check how it's done in the references."""

app = FastAPI(response_class=MyOwnResponse)

References:

https://fastapi.tiangolo.com/advanced/custom-response/#default-response-class
https://github.com/tiangolo/fastapi/blob/master/fastapi/responses.py
https://github.com/encode/starlette/blob/master/starlette/responses.py

Hi!
I've implemented the @html_or_json decorator that you can put on your path operation functions to make them return json when the accept header of request is application/json or render Jinja2 template if the accept header is text/html.
You can find the code here
html_json.py contains code for the decorator and main.py contains some examples on how to use the decorator.
Hope this helps somebody!

You should probably think about creating a middleware, or a custom APIRoute class.
I don't think we have a nice "content negotiation" setup yet, neither on third party packages, or native.

It is often desirable to redirect the root (/) of an API to /docs, when accessed in a browser, and to /openapi.json, when accessed by a script that sends the Accept: application/json header. Maybe this should even be the default for FastAPI.
For now we're doing this in a crude and ad-hoc manner, but it would make a lot sense to implement proper HTTP Content Negotiation. I have found a couple of packages (negotiate and negotiator) on PyPI that do this, however both of them have not been updated in over 10 years.
Maybe FastAPI should itself support HTTP content negotiation out of the box?
That is, to describe a route with each available content type and have the API use content negotiation to find out the correct one using the content negotiation algorithm. Maybe have a content_type parameter in the app decorator, and have the same route be described with more than one function, each for a content type. Like this:
@app.get("/", include_in_schema=False, content_type="text/html")
async def html_docs_redirect(
    return RedirectResponse(url="/docs",
        status_code=status.HTTP_307_TEMPORARY_REDIRECT)

@app.get("/", include_in_schema=False, content_type="application/json")
async def html_docs_redirect(
    return RedirectResponse(url="/openapi.json",
        status_code=status.HTTP_307_TEMPORARY_REDIRECT)

Thanks for the help here @includeamin and @Kludex ! 🙇
And thanks for the discussion everyone!
@augusto-herrmann interesting, this would mean that routing would depend not only on path and HTTP operation but also on a specific header, content-type. I've seen others also want other things to be taken into account when routing. E.g. a header defining the version of the app to use, or things like that. I'm still not sure about it, as it's a lot of extra complexity, to deal with, to code, to maintain, to explain, for users to learn, and I'm not sure the benefits are worth it.
But anyway, maybe you could create an independent issue with your specific feature request.
I think the ideas here would solve the original problem from @amjith, right? If that's the case, then you can close the issue. 🤓

@tiangolo yes, I think you mean issue #4694. That issue involves supporting multiple versions for media types. My suggestion is similar, but much simpler.
What I propose is just to have a content-type parameter in the app decorator (like in my example) and have FastAPI follow the HTTP spec on RFC 2295 on content negotiation to select the appropriate route.
I don't think this would be confusing to users, considering it would just be following what is already in the HTTP specs, has been widely practiced for years and is on the handbooks for REST APIs. RESTful Webservices Cookbook, by Subbu Allamanraju, published by O'Reilly media in 2010, has a whole Chapter 7 just about this behaviour. Here's an interesting excerpt (page 135 on the first edition):

Content negotiation is only cheap to implement when your development framework supports it.

Considering that FastAPI is a development framework that would cheapen the effort required for developers to implement content negotiation into their APIs, I think adding support for it in FastAPI makes a lot of sense.
I probably should create a new issue about it later. The issue template here is quite long and would take quite some time to fill out (yet not quite as long as implementing a PR with tests and implementation of course).


inject does not work without only

I wrote a .proto file containing a single message:
message Message {
  required string field = 1;
}

I tried to inject this definition into a module as shown in README.md:
defmodule Message do
  use Protobuf, from: Path.expand("../proto/message.proto", __DIR__), inject: true
end

Creating the message fails:
iex(1)> %Message{}
** (CompileError) iex:1: Message.__struct__/1 is undefined, cannot expand struct Message

iex(1)> Message.new
** (UndefinedFunctionError) function Message.new/0 is undefined or private
    (example) Message.new()

However, it started to work after after adding only option:
defmodule Message do
  use Protobuf, from: Path.expand("../proto/message.proto", __DIR__), only: :Message, inject: true
end

Creating the message succeeds:
iex(1)> %Message{}
%Message{field: nil}
iex(2)> Message.new
%Message{field: nil}

I'll take a look!

This is fixed in master, I'll push a new release today

I seem to still be running into this issue using 1.2.8 (or I'm just doing something horribly obvious wrong).
Lockfile:
  "exprotobuf": {:git, "https://github.com/bitwalker/exprotobuf.git", "fc6159d7f6a0b85930b2060d93be6fe3edf25fd9", [tag: "1.2.8"]}

Module (without only)
defmodule MessageTest do
  use Protobuf, from: ["priv/protos/message.proto"], inject: true
end

Output
iex(1)> MessageTest.__info__(:functions)
[defs: 0]

Module (with only)
defmodule MessageTest do
  use Protobuf, from: ["priv/protos/message.proto"], inject: true, only: :Message
end

Output
iex(1)> MessageTest.__info__(:functions)
[__struct__: 0, __struct__: 1, decode: 1, decode_delimited: 1, defs: 0, defs: 2,
 defs: 3, encode: 1, encode_delimited: 1, new: 0, new: 1, record: 0, syntax: 0]


DEFAULT_FILE_NAME disturbs some Gradle task when use with alternative use case

Current behavior
Hi,
we use this library with below config
project.ext.keyFiles = [
    debug: "keys.dev.json",
    staging: "keys.stage.json",
    release: "keys.prod.json",
]

but above config makes gradle task(like ./gradlew clean) failing
because we can't custom DEFAULT_FILE_NAME value(keys.development.json) within your lib and clean task doesn't recognize our gradle config value
(only solution is patching DEFAULT_FILE_NAME value)
Expected behavior
Gradle tasks are work well
Platform

[X] Android
[ ] iOS

React Native Version
any version
React Native Compressor Version
Reproducible Steps And Demo

@YangJonghun DEFAULT_FILE_NAME is fallback, it triggers when user dont define any keyFiles, can you paste your build.gradle file code here?

it is simple to reproduce

npx react-native@latest init AwesomeProject
add react-native-keys
add json files(without file named keys.development.json) in root path, I used below sample key files

keys.dev.json
keys.prod.json
keys.staging.json

add below code within android/app/build.gradle

project.ext.keyFiles = [
    debug: "keys.dev.json",
    staging: "keys.stage.json",
    release: "keys.prod.json",
]
apply from: project(':react-native-keys').projectDir.getPath() + "/RNKeys.gradle"

run cd android && ./gradlew clean
and then you can see below error.

> Configure project :app
keys.development.json
**************************
*** Missing KEYs file ****
**************************

build and run works properly, but some Gradle task will fail.

@YangJonghun thanks a lot for point out this issue

@YangJonghun can you check this issue with 0.5.7 version?

@numandev1
Thanks for your works
however, this fix introduces another bug.
when we use key value within groovy.
it doesn't work.
you can test apply below diff and run ./gradlew clean
project.ext.keyFiles = [
    debug: "keys.dev.json",
    staging: "keys.stage.json",
    release: "keys.prod.json",
]
apply from: project(':react-native-keys').projectDir.getPath() + "/RNKeys.gradle"

+ def value = project.keys.get("KEY")

android {
    ndkVersion rootProject.ext.ndkVersion

then you will encounter the following error
* Where:
Build file '/Users/yangjonghun/Desktop/AwesomeProject/android/app/build.gradle' line: 78

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'keys' for project ':app' of type org.gradle.api.Project.

@numandev1
Thanks for your works
however, this fix introduces another bug.
when we use key value within groovy.
it doesn't work.
you can test with below diff and run ./gradlew clean
project.ext.keyFiles = [
    debug: "keys.dev.json",
    staging: "keys.stage.json",
    release: "keys.prod.json",
]
apply from: project(':react-native-keys').projectDir.getPath() + "/RNKeys.gradle"

+ def value = project.keys.get("KEY")

android {
    ndkVersion rootProject.ext.ndkVersion

then you will encounter the following error
* Where:
Build file '/~~~~app path~~~/AwesomeProject/android/app/build.gradle' line: 78

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'keys' for project ':app' of type org.gradle.api.Project.

below patch works fine (because gradle clean task doesn't have any flavor)
     println(keysFile)
     def keys = [:]
     File f = new File("$project.rootDir/../$keysFile");
-    if (!f.exists()) {
-      println("**************************")
-      println("*** Missing KEYs file ****")
-      println("**************************")
-      return;
-    }

     if (f.exists()) {
       def parsedJson = new groovy.json.JsonSlurper().parseText(f.text)
-//     println(parsedJson.public)
       parsedJson.public.each { key, value ->
         keys.put(key, value.replace('"', '\\"'))
       }
     } else {
       println("**************************")
       println("*** Missing KEYs file ****")
       println("**************************")
+      return;
     }

     project.ext.set("keys", keys)

     android {
       defaultConfig {
         keys.each { k, v ->
           def escaped = v.replaceAll("%","\\\\u0025")
           buildConfigField "String", k, "\"$v\""
           resValue "string", k, "\"$escaped\""
         }
       }
     }
+  } else {
+    project.ext.set("keys", [:])
   }

 }

@YangJonghun thanks for pointing out this issue, fixed in 0.5.8, now you can use 0.5.8 version instead of patch


Have an explicit way of defining the api version parameter

Currently it is just a name convention where we look for the parameter name api-version (in azure). This is hacky, instead we could

Only look for a parameter using the Versions enum
hAve a ApiVersion scalar in the versioning library that define that value

Issue with 1. is it might be harder to compose, azure core libraries are not expecting that value today and we would need to add an extra template parameter.

I think 1. is the ideal solution as the versioning system is well-established. I don't know what Azure's use case is currently, but I propose extending the @versioned attribute in such a way you can optionally specify a parameter name to inject like:
@versioned(Versions, "versionParameter")
@service
@route("/api/{versionParameter}")
namespace Services {
    ...
}

To prevent name clashing, I also think this parameter should be opt-in only so if you don't set it, there isn't a default that's used.

@timotheeguerin Would be curious to get your thoughts on this. I should have pinged on the original comment.

I think the issue with this is versioning library assume some http parameter here and the 2 should be independent. I should be able to use versioning with other protocol.
What I was more thinking is that you have either in the @server or route/query be a parameter where the type is the version enum.


Add random input tests

This is partly just a way to add the our AL custom datatypes to make sure our random input tests can handle those. Let me know if I should just move those to an existing file. [On the other hand, that will require updates to other tests]

Just pinging about this short PR, @BryceStevenWilley


warn(late_bound_lifetime_arguments) is emitted on methods with lifetimes

use ambassador::{delegatable_trait, Delegate};

#[delegatable_trait]
pub trait Shout {
    fn shout<'a>(&'a self) {
        todo!()
    }
}

pub struct A;
impl Shout for A {}

#[derive(Delegate)]
#[delegate(Shout, target = "0")]
pub struct B(A);

fn main() {}

warning: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
  --> src/main.rs:5:15
   |
5  |     fn shout<'a>(&'a self) {
   |               ^^ the late bound lifetime parameter is introduced here
...
13 | #[derive(Delegate)]
   |          -------- in this derive macro expansion
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #42868 <https://github.com/rust-lang/rust/issues/42868>
   = note: `#[warn(late_bound_lifetime_arguments)]` on by default
   = note: this warning originates in the macro `ambassador_impl_Shout` which comes from the expansion of the derive macro `Delegate` (in Nightly builds, run with -Z macro-backtrace for more info)

Macro-expanded #[derive(Delegate)]:
impl Shout for B
where
    A: Shout,
{
    fn shout<'a>(&'a self) {
        self.0.shout::<'a>()
    }
}

As expected, macro-expaned code produces the same warning, but if we remove the lifetime from the turbofish, the warning disappears.
-        self.0.shout::<'a>() // warning
+        self.0.shout::<>()   // no warning

My wild guess is that ambassador should drop all lifetimes from turbofish calls, but keep type parameters. Maybe related: #50.

My wild guess is that ambassador should drop all lifetimes from turbofish calls, but keep type parameters.

I agree with you guess, as far as I know specifying lifetime parameters to a call is never necessary to make it compile so we can leave them out, keeping type parameters is still important as shown in the test added in #50. I am working on a fix.


Fix crash in WFP on weird interaction

Fixes #13099
Note that it's not a complete fix, the underlying problem will still exist, but it's a complex problem linked to skip synchronization. I will open an issue soon with more explanation
Thanks a lot to @yahiheb

Go home CodeFactor, you're drunk!


Ahelp relay doesn't communicate game mode

If significantly different rules apply to the game mode, it should be clearly communicated in the relay because it can be relevant for ahelps. I don't know what the best way to communicate this is because of the whole game presets vs game rules thing

What about API endpoints for admins that tell things relevant for admins - user list, gamerules, gamepreset, adminwho, etc?


Fixed path delimeters being stripped by chain routes affecting later routes

Chain route is manipulating the request object, and not restoring its state once its done, which can cause issues in later routes.

I do have a signed CLA on file, I promise!

@Bittarman
We know that! :smile:

Thanks! :+1:


Reduce CPU usage

Description of the issue
Add-on using about 25-27% CPU - seems a bit excessive.

Addon version
0.4.2
Platform
Home Assistant 2022.7.0b3
Supervisor 2022.06.2
Operating System 8.2
Frontend 20220630.0 - latest
Logs of the issue (if applicable)
No response

This is related to the package that checks the PS5 status, etc. I changed two things in the release of version 0.4.3:

Only browse for devices at startup. As such decreasing system strain.
Added device_check_interval to the configuration. By default it's 1000ms, of course, increasing the value will improve performance, at the cost of receiving less updates. 🤷♂

For me (on a rpi4 8gb) 4500ms seems to be the Performance vs. Frequency sweetspot.

Hi, CPU usage on 1.3.1 still around 20-30% on idle.

@alsvartr in that case please open a new issue with detailed Hardware info included.

@alsvartr in that case please open a new issue with detailed Hardware info included.

done


Update device-control-removable-storage-access-control.md

updated navigation path for device control policy under attack surface reduction

@JohanFreelancer9 please copy review

Issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/6421

@msbemba


Register

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/25569
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" e85ddfb8e7e5c68a3a1bbedacb6742e360e960b8
git push origin v0.1.0

@JuliaRegistrator register

Error while trying to register: "Tag with name v0.1.0 already exists and points to a different commit"

@JuliaRegistrator register

Error while trying to register: "Tag with name v0.1.0 already exists and points to a different commit"

@JuliaRegistrator register

Error while trying to register: "Tag with name v0.1.0 already exists and points to a different commit"

@JuliaRegistrator register

Error while trying to register: "Tag with name v0.1.0 already exists and points to a different commit"

@JuliaRegistrator register

Registration pull request updated: JuliaRegistries/General/25569
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" bc62ce33c1535206b4b4c85b72cc99e70292178f
git push origin v0.1.0

Registration pull request updated: JuliaRegistries/General/25569
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" bc62ce33c1535206b4b4c85b72cc99e70292178f
git push origin v0.1.0

Registration pull request updated: JuliaRegistries/General/25569
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" bc62ce33c1535206b4b4c85b72cc99e70292178f
git push origin v0.1.0

Registration pull request updated: JuliaRegistries/General/25569
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" bc62ce33c1535206b4b4c85b72cc99e70292178f
git push origin v0.1.0

Package registered. Tag created.


ci: double the timeout duration

I triggered release CI for all three shims (wasmtime, wasmedge and wasmer). Two out of three encountered a timeout issue so I am doubling the timeout duration for the build action
See failed runs:

https://github.com/containerd/runwasi/actions/runs/6699073525/job/18202498689#step:7:650
https://github.com/containerd/runwasi/actions/runs/6699079435/job/18202521220#step:7:638

LGTM


Dropdown does not open on tab focus

This is working in 3.5.2:

Use the tab key to navigate through form elements
Once the select2 element is reached, it will immediately open

This is not working in 4.0.1:

Use the tab key to navigate through form elements
Once the select2 element is reached, it will get focus, but it does not open! Further it seems there is no pragmatic way to open the dropdown.

This is also not working:
jQuery('#dropdown').select2({}).focus(function(){ $(this).select2("open");  });

Select2 doesn't trigger the focus event on the original element when the dropdown is focused. You can track the status of that in https://github.com/select2/select2/issues/1908.

Select2 no longer opens the dropdown on focus because this deviated from the standard behaviour in most browsers where focusing on a select box only changed the highlight (indicating that it was focused) instead of opening the dropdown.

So the main issue is an intentional behaviour change in Select2, and the second issue is a duplicate of https://github.com/select2/select2/issues/1908.

See this question on Stack Overflow on Opening Select 2 Dropdown on Focus which you can do like this:
$(document).on('focus', '.select2', function (e) {
  if (e.originalEvent) {
    $(this).siblings('select').select2('open');
  }
});

KyleMit  - thank you for that snippet! :)

There is a problem with this solution. If we use a multiple select with tag mode, it does not open when you click.

Well, adding "click" to the event, works like a charm. Thanks.

@KyleMit Thanks, just added this change to the code to avoid opening the disabled selects ;)
$(this).siblings('select:enabled')

Just copied this from this answer at stackoverflow and improve it with @diegomurakami 's comment:

...Trying to tab to the next element wouldn't work (tab order was effectively lost), so I added code to set focus back to the main select2 element when the dropdown is closing:

$(document).on("focus", ".select2", function (e) {
  if (e.originalEvent) {
    var s2element = $(this).siblings("select:enabled");
    s2element.select2("open");
    // Set focus back to select2 element on closing.
    s2element.on("select2:closing", function () {
      s2element.select2("focus");
    });
  }
});

@smarquez1 , when are you getting issues with tab order being lost?  I can't seem to reproduce that issue?   Totally believe it's happening, just trying to reproduce it myself

@smarquez1 , when are you getting issues with tab order being lost? I can't seem to reproduce that issue? Totally believe it's happening, just trying to reproduce it myself

Hope it's still ok to post here. Seems very close to the context I'm seeing. Hope commenting on a closed issue is not bad form.
Using 4.0.12 and only the (much appreciated and impressive) code here: https://jsfiddle.net/KyleMit/hbeon3g2/ ... along with these two options (in particular that may be relevant):
selectOnClose:true,  allowClear:true
... I am currently experiencing the following:
Tab to confirm selection
Preferred behaviour:

Selects chosen option
Closes Select2
Moves focus to the next field in the form

Actual behaviour:

Selects chosen option
Closes Select2
Leaves focus on the closed Select2 element
Hit Tab a second time and focus moves to the next field (in correct tab order)

Enter to confirm selection
Preferred behaviour:

Selects chosen option
Closes Select2
Moves focus to the next field in the form

Actual behaviour:

Selects chosen option
Closes Select2
Leaves focus on the closed Select2 element
Tab moves focus to the next field (in correct tab order)

I'm a little unclear if the actual behaviour is expected, deliberate, or there's something else at play (possibly a bug or case not accounted for?).
Would appreciate any feedback if possible :)

$(document).on("focus", ".select2", function (e) {
  if (e.originalEvent) {
    var s2element = $(this).siblings("select:enabled");
    s2element.select2("open");
    // Set focus back to select2 element on closing.
    s2element.on("select2:closing", function () {
      if (s2element.val()) s2element.select2("focus");
    });
  }
});

This works for focus but breaks functionality of closing select2 when clicking outside of select2-container.


Improve the way of checking return values of cairo1 test functions

Raised in https://github.com/software-mansion/protostar/pull/1507#discussion_r1111711631
We should replace runner.get_return_values(3)[0] with a code that will automatically read these values.
CairoFunctionRunner::run() does that but we cannot use it since we don't have identifiers (a member of the program). I thought we could maybe pass them somehow from rust code and found that rust uses signatures - that may be equivalent but I'm not sure.

related
#1550

We would like to use approach from the pr https://github.com/software-mansion/protostar/pull/1557

@MaksymilianDemitraszek closing this in favour of #1550

I think this issue is different than #1550 and we shouldn't close it. In #1550 we want to identify if tests failed or not in different places regardless of what we use underneath to determine this. Here, we want to improve the way of checking the memory after a run (runner.get_return_values(3)[0] - Please, note that we still use this line in #1550).

This is not going to be needed because of the typechecking we do on tests, so this should be pretty stable way to do things, unless we migrate away from the blank return types in tests (which in my mind shouldn't happen anytime soon).


Guild Wars 2 - High Frametimes on FoV autozoom

Hello,
in guild wars 2 there are fights, where the camera zooms automatically out. Whenever this happens, there is a massive spike in frametimes. The spike lasts for exactly 40 seconds, gpu usage drops to 50-70%.
An example can be watched here: https://youtu.be/uaeUKPnBXiM
How to reproduce:
Enter fractals of the mists on level 99 in challenge mote. As soon as you move your character within the boundaries of the first line (I was pointing out the trigger with my mouse in the video) the spike starts.
Software information
Guild Wars 2
No matter what settings were used, this issue was reproducible.
This issue was reproduced on multiple wine versions (4.13, 4.12, 4.11, 4.10), on multiple driver versions (430.40, 418.52.20), multiple d9vk versions (.13f, build 709) and on wined3d9.
System information

GPU: GTX 1060
Driver: 418.52.20
Wine version: Lutris 4.13
DXVK version: build 709

Apitrace file(s)
I was unable to trace with wined3d9 because of this crash on startup
apitrace: warning: caught exception 0xc0000005   apitrace: flushing trace
Here is a trace with d9vk. The last 15 seconds are relevant.
https://mega.nz/#!dLw1jaCa!-c7KSvQHUrRer3-_uDpH6-iDp8e5KKjvg5tFiX4iol8

Log of an instance when it happened?

Sorry for wasting your time by not providing a log right away.
This log was taken with zen kernel, 430.40 driver, lutris-4.13 and d9vk build 709
"debug" log level.
https://mega.nz/#!cDBgmCSL!vaRPuiiqQ2aJb57vnDKm6F_CvK4P5GF2CPQ7U3AsTNk

I spent a couple more hours on this issue testing out on more systems and talked to friends. This issue is also on windows without d9vk or any other wrapper present. Therefore it is not an issue in wine or d9vk, but once again arena nets vault.
I redirected this to arena net, but I highly doubt they will fix it.
Thanks for your service joshua.


Listing 10.5 - Column function return issue

https://github.com/bitfield/tpg-tools/blob/a0387e2bc60f86646f88b96f8e223224783153e5/10.5/pipeline.go#L57-L59
maybe it should be
	p.Reader = result
	return p

Yes, I think so, because otherwise we lose whatever the pipeline's Output was set to. Good spotting, thank you!

Fixed in e284c67.


TypeScript issue - graphiql option is not accepting true like suggested by the documentation

Issue workflow progress
Progress of the issue based on the Contributor Workflow

[x] 1. The issue provides a minimal reproduction available on Stackblitz using the issue template.

Please install the latest @graphql-yoga/* packages that you are using.
Please makee sure the reproduction is as small as possible.

[ ] 2. A failing test has been provided
[ ] 3. A local solution has been provided
[ ] 4. A pull request is pending review

Describe the bug
createServer's graphiql config option does not take true as an option like the documentation suggests
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect to be able to pass in true or a function that can return true into the graphiql option:
// Reports TypeScript errors
const graphQLServer = createServer({ graphiql: true });
const graphQLServer = createServer({ graphiql: () => true });

Documentation at https://www.graphql-yoga.com/docs/features/graphiql#dynamic-options suggests the above use case is possible.
Here's the minimal reproduction: https://stackblitz.com/edit/github-yaxvgd?file=src%2Fmain.ts
Environment:

OS: MacOS
NodeJS: 16.14.12
@graphql-yoga/* version(s): 2.0.0

Additional context

I'm guessing the type here should be updated to take boolean instead of false? I think we don't have to change anything in the logic here because it looks like it'll work when we pass in a true value
The documentation seems to have a syntax error as well?

// This line is in the documentation
graphiql: (request: Request, { req, res }) {

// Is this missing a `=>` to make it an arrow function? e.g.
graphiql: (request: Request, { req, res }) => {

Happy to make this change if it makes sense :)

Default is true so do not need to pass this as an option.

I think allowing true could make some use cases a bit more natural to read. For example, I want to disable GraphiQL in prod so I expected something like this would work:
const iseDev = process.env.NODE_ENV === "development"

createServer({ graphiql: isDev });

However, since true is not allowed by this TS type, I had to write it in different ways:
const iseDev = process.env.NODE_ENV === "development"

createServer({
  graphiql: isDev ? {} : false
  // OR
  graphiql: isDev ? undefined : false
});

I don't mind the workaround since it works but took me a bit of time to look through the source code and documentation to figure out why. So I think it might happen to others too.


Update kopia dependency

Change Overview
Revert
https://github.com/kanisterio/kanister/pull/1865
https://github.com/kanisterio/kanister/pull/1866
Pull request type
Please check the type of change your PR introduces:

[ ] :construction: Work in Progress
[ ] :rainbow: Refactoring (no functional changes, no api changes)
[ ] :hamster: Trivial/Minor
[ ] :bug: Bugfix
[ ] :sunflower: Feature
[ ] :world_map: Documentation
[ ] :robot: Test

Issues

fixes #issue-number

Test Plan

[ ] :muscle: Manual
[ ] :zap: Unit test
[ ] :green_heart: E2E

kopia/kopia@f8be8f6


Proposal: Reworking internal execution paths

Overview
There are execution orders that are not correct. There might be more, but so far I found the following issues, trying to bundle them together here:
#3612, #3585, #3580
It all boils down to the following two problems:

MRTK has two main service paths, activeServices and registeredMixedRealityServices. The former executes the FocusProvider, the latter executes the MixedRealityInputSystem

Issue 1:

FocusProvider: Updates all LinePointers. In PreRaycast positions get set on BaseMixedRealityLineDataProvider, but those get run through their localMatrix which has not been set yet. This only happens in PostRaycast when the component gets enabled

Issue 2:

FocusProvider: Updates all LinePointers which perform all their Raycasts and Update hit info
MRTK: Updates MixedRealityInputSystem in registeredMixedRealityServices. During this phase the TeleportPointer can perform movement and rotation. This makes all previously calculated Raycasts obsolete for all further calculations.

Bottom line: Raycasted PointerData as well as the darn BaseMixedRealityLineDataProvider matrix )who needs that anyways?) can be old.
Unity Editor Version
2018.3.8f1
Mixed Reality Toolkit Release Version
mrtk_development

The orders of the updates aren't random, actually. They're ordered by the service's priority.
But yes, it's true that all the systems get their updates called first, then the list of services.

@Alexees also great job with the graph! It really helps visualize the problem :)

I was referreing to Update from Unity. The three groups I created under "random ordered Updates" all contain Unity Updates, not Updates based on MRKT.

Gotcha. One last thing I also wanted to point out is that the events processed from the input system are not bound to an update loop. Once the button is registered as pressed in the data provider it immediately gets bubbled up to the input system, which then routes it to the appropriate GameObject.

@StephenHodgson I double checked. All InputEvents actually ARE bound to the MRTK Update loop. Now that I saw that I remember that some time ago there was a major decision made if you wanted to let the inputs bubble up on their own or if you wanted to pull them. Guess the decision felt on the latter. I think @keveleigh was involved in this.
I updated the graph

One issue entered the ring: The GazeStabilizer is responsible for smoothing the gaze into view even after teleportation. It has no idea of any rotation happening and needs to receive a transformation for its position data, or calculate that locally

All InputEvents actually ARE bound to the MRTK Update loop.

I'm not so certain about that. @SimonDarksideJ thoughts here?

@StephenHodgson all done.
I think I have introduced two accidental errors I will look into tomorrow. Will report back when I think all of these pull reqests are final.

All InputEvents actually ARE bound to the MRTK Update loop.

this is correct as of today.  There was a time they weren't, due to the dependency on the InteractionManager events.
Although, button events are still event driven for WMR at least.  For OpenVR, everything is a poll

@SimonDarksideJ just out of curiosity, how are they crap?

@StephenHodgson @SimonDarksideJ The problem became a little more complicated. The actual main problem is that motion controller positioning as well as the teleportation logic is all handled in the WindowsMixedRealityDeviceManager, which is run AFTER the FocusProvider which does raycasting. Of course it makes sense for button presses and such, because you want to able to hit stuff, but for the initial raycast, the controllers should have been moved already. The same approach I tried with the PlayspaceTransformation (delaying it until the next frame), won't work.
WindowsMixedRealityDeviceManager also needs a PreRaycast step, where it can position everything that needs positioning.

@StephenHodgson @SimonDarksideJ ok, you guys. I know I'm not part of your team and what I did here has a large impact on a lot of classes. It's basically a huge bug fix, therefore I did not consider this being a new feature.
I still think a lot of this was necessary. Several calls were not in the right order and things were not happening at the right time.
All the changes are spread across several pull requests at the moment. If you'd like I merge them into one large one.
A brief overview what all the changes do:

Position related changes on Input Devices are calculated in a Pre-Services step in the MixedRealityToolkit.

Changes to the MixedRealityPlayspace are postponed to the next frame
Moving both of these actions to the beginning of the MixedRealityToolkit Update cycle ensures that the GazeProvider can properly calculate it's raycasts with all transformations made.

The GazeStabilizer now operates in Playspace space, which assures taking teleport rotations into account

The Playspace got extracted to a static class to hide it's Transform, so the only way to transform it is to use the postponing queuing method

Now, gazes and rays and teleport and all that do not pop for a frame or lag anymore.

ok, you guys. I know I'm not part of your team
We're all one big happy family here, no us vs them :D  and every view has value.

how are they crap?
The InteractionManager is fine for in-time events (buttons, etc).  But for continuous events (like position, rotation) it seems to only work when wired up to a GO, unsure as to why.  SO when we just consumed the position/rotation events we were seeing lag while accessing it through C# only. Changing this to polling the InteractionManager resolved that.

The actual main problem is that motion controller positioning as well as the teleportation logic is all handled in the WindowsMixedRealityDeviceManager, which is run AFTER the FocusProvider which does raycasting

I would completely agree with your findings here and possibly a mistake in the order of events within the architecture.  Currently the services run one after another, based on a order determined at design time as whole services.
But you highlight a potential critical issue, where Position / Rotation should be evaluated in a different cycle to other events due to the different ways they are consumed.
Thoughts @StephenHodgson , if we agree, this would need a critical change, as developers have likely had to workaround this sync issue.
I'd also have to agree with your other recommendations, with the only exception being

The Playspace got extracted to a static class to hide it's Transform, so the only way to transform it is to use the postponing queuing method
The playspace manager is a service, yes.  But it has a physical representation in the scene which the service connects to.  So transforming the playspace is only a matter of transforming the connected GO (unless I'm misunderstanding you)

@SimonDarksideJ

We're all one big happy family here, no us vs them :D and every view has value.

nice to hear that :)

But you highlight a potential critical issue, where Position / Rotation should be evaluated in a different cycle to other events due to the different ways they are consumed.

my last pull request addresses that

It's true, but the only way to transform it is to get a hold of the Transform or GO. But the Playspace creates and maintains it itself. I merely wrapped all relevant Transform calls (some are missing but could easily be added). It was an attempt to avoid any uncontrolled manipulation. But thinking of it (SerializedField reference, transform.parent access from children, GameObject.Find...) This might be a little too much.
What do you think?

But thinking of it (SerializedField reference, transform.parent access from children, GameObject.Find...)
Any find operation in the new framework should be avoided at all costs due to their expense.  As you say the Playspace maintains a reference to the GO, so it should be responsible for all updates.

A developer only need locate the playspace service (which is highly performant) and then ask it to update.
I thought this was how it was working currently, based on @StephenHodgson updates related to teleportation, so I'd like him to comment on that one.
Just reviewed #3635 which seems a sensible change, but raises concerns for existing apps.  Also it has other changes unrelated to the PR mixed in, suggesting it wasn't done from a clean branch of development (sorry)

I know I'm not part of your team

That's not true, you're here aren't you? You're def part of our team :)
Overall I think you've done a great job so far pointing out some of the things we may have glossed over. One important thing to think about as well is the Solvers and how they (s)could have played into this, as their whole job is to better coordinate the order in which GameObjects were transformed is space in relation to each other. Wondering if that solution could help solve some of the issues we're seeing here?
I think adding more event hooks is okay as long as we clearly tell the story there.

Adding some Microsoft folks to try and get some more traction on this refactoring proposal. I know a great deal of work has been done around HoloLens 2 in terms of the input stack, which may or may not impact some of these components.

@Alexees , excellent catch. I'm pretty busy at the moment with RC1 but I should be able to have a closer look later this week. On first inspection, I would rather have the input system update all device managers before focus manager update. For that we would need to:

Register device managers in the input system instead of the mixed reality toolkit.
Have input system call update on device managers
Have a well defined execution order for activeSystems in the mixed reality toolkit so we can ensure input system runs before focus provider. Right now it seems to depend on whatever order Dictionary iterates with.

Register device managers in the input system instead of the mixed reality toolkit.
Don't think we need to change where they are registered @luis-valverde-ms , that's the whole point of the locator, if you need a reference to something, there is only one place to look.

But altering the update steps for devices to separate rotation / position from buttons wouldn't be that hard.  They already register and update the InputSystem, we would just need to update the execution order to multiple instead of a single call atm.

Don't think we need to change where they are registered @luis-valverde-ms , that's the whole point of the locator, if you need a reference to something, there is only one place to look

I must be missing something but I don't see the value in having a common interface to obtain a reference to an arbitrary service regardless of its type. We want more decoupling between different systems moving forward. In that context I think it is good to have input related services registered with the input system.

We want more decoupling between different systems moving forward

That was my point.  We would never embed the devices in the input system as that would too tightly integrate them.  Better to keep them lose and add an extra execution layer that an input system may or may not take advantage of.  But if the devices pump out events at different intervals between buttons and the rest, it would not impact the framework.

@luis-valverde-ms Keep in mind that putting the whole Input System first leads to outdated raycasts used during the controllers input events.
I vote for:

Translations
Raycasts
Buttons and such

@SimonDarksideJ , I'm not sure I follow. It may be just terminology but I consider devices to be input, not to consume it. For me, it feels natural to group them under the input system and order that relative to other systems that consume it, like focus.
@Alexees , I'm not sure I agree with processing buttons after changing focus. When you press a button to let's say click on something via a pointer, you do it based on what you are currently seeing, i.e. the information displayed on the last frame, not on what the pointer is going to be pointing at in the next frame. I'm not sure it makes a big different in practice but I think it is conceptually simpler to tick all input types (poses and buttons) together .
Which brings me to my main point which is keeping things as simple as possible. Tell me if I'm missing something but I think the issue we're trying to address is that of focus being ticked before device managers. The simplest solution I can think of is ticking device managers before focus. I'd rather avoid extending the device manager interface just for this because it forces every device implementer to be aware of what the core services are and to make the decision of what should be done before and after they tick.

@luis-valverde-ms I think you're right. thinking too much about all this made my head spin around event's order.

For me, it feels natural to group them under the input system and order that relative to other systems that consume it, like focus.

In RC1, data providers are registered and unregistered at the direction of their parent system. Flow is now:

Registrary loads system
Registrar calls enable on the system

System (ex: input) requests that the registrar load data providers

[some time later] Registrar calls disable on the system

System requests that the registrar unload data providers

Please note: in the case of the MixedRealityToolkit object, all configured services are loaded before they are enabled.

It has been a while this issue received updates and this was about quite a few and it's not clear which were fixed and which weren't.
Closing this because issues might just pop up again if they still exist


executions dont work with rimthreaded

IMPORTANT: Please first search existing bugs to ensure you are not creating a duplicate bug report!
Describe the bug
!!! bug description here !!!
whenever i execute a prisoner, as the prisoner dies, in the top left it says "cancelled" as he dies, doesnot trigger an event saying "execution is boring/great" and i get no mood buffs/debuffs
Steps to reproduce the behavior (VERY IMPORTANT)

Go to '...' ritual spot
Click on '....'  begin public execution
Scroll down to '....'
See error

Error Log
!!! Link to contents of Player.log or Error.log (MUST BE LINK) !!!
Player.log
!!! Link to HugsLib log. (MUST BE LINK) !!!
https://gist.github.com/f7b975b8aafd3f199acc68f968c56ef5
Save file
testnomod.zip
!!! Please add a save file where the issue occurs to speed up testing and fixing of the issue !!!
Screenshots
!!! Add screenshots to help explain your problem here !!!
Mod list (For vanilla report, it has to be same as below list.)

Harmony
Core
Royalty (optional)
HugsLib
RimThreaded

I tested it a couple of times in 2.5.16 and i got mood buffs for the executions
i did not get a message or a letter about the quality of the execution
i did get the "execution cancelled" message when the prisoner died.

so there is some weird behaviour, bit its not totally broken.


Custom public path on the fly for assets

Hey, I'm using loadable components in my application. I want to change the asset path in server side at the runtime. So used the below code snippet to achieve that. But it is not working, still it is referring old asset path. Added the below lines in serverRenderer.jsx(the final html construction file) or do i need to add this in any specific place?. Looking for your help.

const statsFile = non_webpack_require('./loadable-stats.json');
new ChunkExtractor({
stats: statsFile,
publicPath: '/cdn/assets/',
entrypoints: 'client'
});

Hello @srigar, it should work: https://github.com/smooth-code/loadable-components/blob/master/packages/server/src/ChunkExtractor.js#L169
Did you find the solution?

No it is not working. Did some work around for that.

@srigar Do you mind sharing your solution to others?


Multiple usernames and passwords for viewing

Describe the feature
I was wondering if it's possible to allow for different username/password combinations for reading the video feed...

Hello, if you need a more advanced authentication mechanism you can implement an external authentication server as described in the README:
https://github.com/aler9/rtsp-simple-server#authentication
We don't plan to improve the current authentication mechanism since most users need either a basic solution or a fully-customized one.


just error in CollectMineralShards

I can run other map just CollectMineralShards have problem. run agent and play is ok for other map.
but when I use CollectMineralShards, the window show the load, when load over, than cask:
python -m pysc2.bin.agent --map   CollectMineralShards
NSWindowEdgeResizing is off!
Traceback (most recent call last):
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 61, in catch_websocket_connection_errors
yield
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 152, in _read
response_str = self._sock.recv()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_core.py", line 293, in recv
opcode, data = self.recv_data()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_core.py", line 310, in recv_data
opcode, frame = self.recv_data_frame(control_frame)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_core.py", line 323, in recv_data_frame
frame = self.recv_frame()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_core.py", line 357, in recv_frame
return self.frame_buffer.recv_frame()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_abnf.py", line 340, in recv_frame
self.recv_header()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_abnf.py", line 288, in recv_header
header = self.recv_strict(2)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/abnf.py", line 375, in recv_strict
bytes = self.recv(min(16384, shortage))
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_core.py", line 427, in _recv
return recv(self.sock, bufsize)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/websocket/_socket.py", line 93, in recv
"Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"main", mod_spec)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/bin/agent.py", line 112, in
app.run(main)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/app.py", line 57, in run
really_start(main or sys.modules["main"].main)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/app.py", line 51, in really_start
sys.exit(main(argv))
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/bin/agent.py", line 98, in main
run_thread(agent_cls, FLAGS.map, FLAGS.render)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/bin/agent.py", line 74, in run_thread
visualize=visualize) as env:
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/env/sc2_env.py", line 180, in init
static_data = self._controller.data()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/remote_controller.py", line 151, in data
return static_data.StaticData(self.data_raw())
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/remote_controller.py", line 80, in _valid_status
return func(self, *args, **kwargs)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
return func(*args, **kwargs)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/remote_controller.py", line 147, in data_raw
ability_id=True, unit_type_id=True))
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 127, in send
res = self.send_req(sc_pb.Request(**kwargs))
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 113, in send_req
return self.read()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
return func(*args, **kwargs)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 86, in read
response = self._read()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 152, in _read
response_str = self._sock.recv()
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/contextlib.py", line 77, in exit
self.gen.throw(type, value, traceback)
File "/Users/codeMan/anaconda3/envs/keras/lib/python3.5/site-packages/pysc2/lib/protocol.py", line 63, in catch_websocket_connection_errors
raise ConnectionError("Connection already closed. SC2 probably crashed. "
pysc2.lib.protocol.ConnectionError: Connection already closed. SC2 probably crashed. Check the error log.

I also map editor to create new map， the new map also can run. just CollectMineralShards have problem

I can't replicate that problem, and unfortunately the error message you posted only says that SC2 quit or crashed. We'd need more details than that. One difference between that map and the rest is that it depends on one of the campaign mods. Are you using the starter edition?

Hi, I am also getting this error.
On Windows 10, with the latest expansion (Legacy of the Void), Python 3.5.3

SC2 does not crash if I run the map directly from the sc2 map editor.

@4rChon Yes， When I use the map editor，the map than can use in pysc2.

I get the exact same error message as @4rChon on Windows 7 x64 and python 3.6.2.
SC2 was installed and updated via Blizzard app today.
Same for me that it's just CollectMineralShards having the issue.

@tewalds this is most likely related to 3.17 patch.
It worked fine for me on 3.16.1 then crashed with same error as @4rChon after I updated to 3.17.
Additionally, it still works fine on Linux under 3.16.1 package.

I have the same error. Is it only in 3.17 version?
Anyone know how to downgrade 3.16 ?

I have the same issue:
Window 10 64 bit
python 3.5.2
I ran both "python -m pysc2.bin.agent --map CollectMineralShards" and "python -m pysc2.bin.agent --map CollectMineralShards --agent pysc2.agents.scripted_agent.CollectMineralShards" both ways produce the error.
When I checked the SC2 error files in Documents\StarCraft II\GameLogs The DMP file shows this.
Exception Code:	0xC0000005
Exception Information:	The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
When I attached the visual studio debugger to SC2_x64.exe  I get:
Exception thrown at 0x00007FF7489AE6B6 in SC2_x64.exe: 0xC0000005: Access violation reading location 0x0000000000000008. occurred
Now If in pysc2.bin.play on line 36 if I set render to False. The game loads with the
python -m pysc2.bin.play --map CollectMineralShards Will load fine, and not crash.
Though if I change the same option in pysc2.bin.agent on line 37 I still get the same crash error.
It always happens as the game is done loading, and lead me to suspect a rendering issue,but im not familiar enough with the code to track it down yet.

I am able to reproduce this. I can look into it on Tuesday.
There is a way to downgrade back to 3.16.1 but it is a bit annoying since PySC2 hasn't added support for it.
A hacky way of doing it:

Make sure you have the 3.16.1 binary still installed:

You should see this folder: C:\Program Files (x86)\StarCraft II\Versions\Base55958
If missing, launch the game normally and play an old 3.16.1 replay which should download it.

Rename the other BaseXXXXX folders to something else to force PySC2 to only find the 55958 one.
In "pysc2/lib/sc_process.py", add this to the list of command line arguments:

"-dataversion", "5BD7C31B44525DAB46E64C4602A81DC2"
(The magic string comes from here: https://github.com/Blizzard/s2client-proto/blob/master/buildinfo/versions.json)

@KevinCalderone in Version, I just have Base56787, so what can I do?

Looked into this. There was a crash bug introduce into 3.17 when doing a "RequestData" query on a map using campaign mods. This should only impact the CollectMineralShards mini game map. (As tewalds mentioned, that is the only one that uses campaign data)
The fix has been implemented for the 3.18 release.

@wwxFromTju Here are some more details steps for the first bullet of my above steps:

Download the 3.16.1 map pack. (Download Link)
Extract one of the replays from the pack.
Launch StarCraft II through the Blizzard app.
Click on the "Replays" tab.
Click on the "Show in Folder" button near the top. (This will open an explorer window to your replays folder)
Copy the replay into this folder.
In SC2, click on the "Multiplayer" tab and then the "Replays" tab again. (This will force it to refresh and show the replay you copied in)
Double click on the replay name to play it.
This will show an warning dialog saying you need to go offline to watch the replay. Press "Load" to continue.
You will see a progress bar of it downloading the old version.

The old game version should now be downloaded, and you should see a Base55958 folder in your Versions folder.

@KevinCalderone When I unzip the zip, need password. So the password is what?

See: https://github.com/Blizzard/s2client-proto#downloads
Password is 'iagreetotheeula'

@KevinCalderone great!  fix it!

@KevinCalderone I am getting this error playing replays too, not running the mineral shards map. I am unsure if the 3.18 fix resolves it so I thought I should report it. Replays worked before 3.17.
python` -m pysc2.bin.play --replay 0000e057beefc9b1e9da959ed921b24b9f0a31c63fedb8d94a1db78b58cf92c5.SC2Replay
----------------------- Replay info ------------------------
map_name: "Mech Depot LE"
player_info {
  player_info {
    player_id: 1
    race_requested: Protoss
    race_actual: Protoss
  }
  player_result {
    player_id: 1
    result: Defeat
  }
  player_mmr: 5402
  player_apm: 386
}
player_info {
  player_info {
    player_id: 2
    race_requested: Zerg
    race_actual: Zerg
  }
  player_result {
    player_id: 2
    result: Victory
  }
  player_mmr: 5564
  player_apm: 384
}
game_duration_loops: 20887
game_duration_seconds:<PHONE_NUMBER>773438
game_version: "<IP_ADDRESS>958"
data_build: 55958
base_build: 55958
data_version: "5BD7C31B44525DAB46E64C4602A81DC2"

------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 61, in catch_websocket_connection_errors
    yield
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 293, in recv
    opcode, data = self.recv_data()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 310, in recv_data
    opcode, frame = self.recv_data_frame(control_frame)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 323, in recv_data_frame
    frame = self.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 357, in recv_frame
    return self.frame_buffer.recv_frame()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 340, in recv_frame
    self.recv_header()
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 288, in recv_header
    header = self.recv_strict(2)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_abnf.py", line 375, in recv_strict
    bytes_ = self.recv(min(16384, shortage))
  File "C:\Program Files\Python35\lib\site-packages\websocket\_core.py", line 427, in _recv
    return recv(self.sock, bufsize)
  File "C:\Program Files\Python35\lib\site-packages\websocket\_socket.py", line 93, in recv
    "Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python35\lib\runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Program Files\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\play.py", line 183, in <module>
    app.run(main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 57, in run
    really_start(main or sys.modules["__main__"].main)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\app.py", line 51, in really_start
    sys.exit(main(argv))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\bin\play.py", line 141, in main
    controller.start_replay(start_replay)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 80, in _valid_status
    return func(self, *args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 55, in _check_error
    return check_error(func(*args, **kwargs), error_enum)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\remote_controller.py", line 134, in start_replay
    return self._client.send(start_replay=req_start_replay)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 127, in send
    res = self.send_req(sc_pb.Request(**kwargs))
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 113, in send_req
    return self.read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 86, in read
    response = self._read()
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 152, in _read
    response_str = self._sock.recv()
  File "C:\Program Files\Python35\lib\contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Program Files\Python35\lib\site-packages\pysc2\lib\protocol.py", line 63, in catch_websocket_connection_errors
    raise ConnectionError("Connection already closed. SC2 probably crashed. "
pysc2.lib.protocol.ConnectionError: Connection already closed. SC2 probably crashed. Check the error log.

@skjb Does the game crash and bring up the Blizzard error reporter when that happens? If so can you submit the report and post the exception ID number it displays in that window.

@skjb Actually I just tested using that replay and can reproduce the issue. The problem is that PySC2 hasn't added support for old version replays yet. The game was recently patched to 3.17, and that replay is from 3.16.1.
If you really need it to work, there are some hacky steps to downgrade PySC2 back to the old version: https://github.com/deepmind/pysc2/issues/53#issuecomment-326829857

@KevinCalderone Fantastic, thanks! That fixed it! :)

@KevinCalderone FYI Running <IP_ADDRESS>507 I still get this error

Just retested and seem to work for me.
Does it still crash and bring up the error reporter? Can you submit the report and give me the Occurence Id it shows in the window?

Please see my error above regarding replays, I get an identical error.
This is what the game shows:

The game then restarts and shows:

Oh sorry I thought you were referencing the crash from the top of this issue.
My comment here is likely still accurate.
I still don't think PySC2 has added old version support. I see in your screenshot it is launching the 3.18 version of the game. Replays only work with the game version they were played on.
I defer to @tewalds on what the timeline for this is.

@KevinCalderone @tewalds I am happy to help with this if you need, seems for replays you would need the specific version in run_configs/platforms.py exec_path method rather than choosing the max version available

Game version parameter to allow for playing older replays: https://github.com/deepmind/pysc2/pull/79

Ok, the code I just pushed fixes this in a few ways: Fixes the maps to not crash, lets you specify a game version, and will automatically launch the right version for a replay.


how to know whether the pool is available

https://github.com/WulianCC/node-wulian-mysql/blob/master/src/pool.js
sometimes query will go to be always hanging on, but no err was passed to logger
i guess maybe the pool is not useable any more.
how to confirm that the pool is ok, and how to recreate a pool?

Hi @willin, the pool is a general computer programming construct, and there is no such thing as the pool going bad. There can be cases where you check out connections from the pool and then never release them back, ending up in a situation where all connections are in-use and you can't get a connection from the pool, though.
You could probably add debug('wulian:mysql:release') to https://github.com/WulianCC/node-wulian-mysql/blob/master/src/pool.js#L51 and https://github.com/WulianCC/node-wulian-mysql/blob/master/src/pool.js#L43 to see if you have an equal number of queries to releases.
Otherwise, I would answer your question with "you never have to recreate a pool", and if you feel like you need to, there there are two possibilities:

You are not always releasing the connections you acquired back into the pool.
You found an unknown bug and it would be great to get more details on this.

https://github.com/WulianCC/node-wulian-mysql/blob/master/examples/pool.js
Here's a test, why it can query again after the connection is already released?

why it can query again after the connection is already released?

Because you still have a reference to the connection. The same object is handed out every time (which is the typical way a pool construct is done). You'll find the same behavior in generic pool modules like https://github.com/coopernurse/node-pool as well. You have to program your code not to perform queries after you programmed it to release it back into the pool.

thanks for your patient.
import mysql from 'mysql';
import debug from 'debug';
import {md5, getDefer} from 'wulian-common';
import {Pool} from 'generic-pool';

const db = {};
/**
 * 创建连接池
 * @param  {obj} options MySQL连接参数
 * @return {obj} MySQL Pool
 */
/* eslint no-console: 0 */
module.exports = async function createPool(options, logger = console.log) {
  const key = md5(JSON.stringify(options));
  if (!db[key]) {
    db[key] = new Pool({
      name: 'mysql',
      create: (callback) => {
        const c = mysql.createConnection(options);
        // parameter order: err, resource
        callback(null, c);
      },
      destroy: (client) => { client.end(); },
      max: options.connectionLimit || 10,
      // optional. if you set this, make sure to drain() (see step 3)
      min: options.connectionLimitMin || 0,
      // specifies how long a resource can stay idle in pool before being removed
      idleTimeoutMillis: 30000,
      // if true, logs via console.log - can also be a function
      log: process.env.DEBUG !== undefined
    });
  }

  const result = {};
  result.query = (sql) => {
    debug('wulian:mysql:query')(sql);
    const deferred = getDefer();
    db[key].acquire((err, client) => {
      if (err) {
        logger('wulian:mysql:pool', err);
        deferred.resolve({});
      } else {
        client.query(sql, [], (errQuery, rows) => {
          // return object back to pool
          // NOTICE:  `release` called after every query
          db[key].release(client);
          if (errQuery) {
            logger('wulian:mysql:query', errQuery);
            deferred.resolve({});
          }
          deferred.resolve(rows);
        });
      }
    });
    return deferred.promise;
  };
  // NOTICE: ignore release in project codes
  result.release = () => null;

  return result;
};

can it perform well?

Hi @willin, I'm not familiar enough with the generic-pool module to really say, as the built-in pool has been specifically designed to work with the MySQL connection lifecycle, including freshness checking.


Kourier does not appear to watch the CERTS_SECRET_NAME

Kourier does not, on a perusal of the code, watch the secret storing the common certificate. If that has been provisioned by certificate manager, then on rotation (usually 3 months) kourier will stop serving traffic.

If the core committers would come up with a recommendation on what to do about this, I might be able to convince my company to address it in a PR

The CERTS_SECRET_NAME thing is not something we really support within Knative itself, it was more an experimental thing in kourier itself. The current code reads the secret on startup, but also on changes of Knative Ingress objects. To make it automatically reload, ToEnvoySnapshot would need to be called when the Secret changes as well. Basically you add a new watcher on the secret-informer to trigger a reconciliation for all KnativeIngress objects when the secret changes.
An alternative to this is obviously to just kubectl rollout the kourier-controller deployment once the certificate updated.

OK, ta - I have been given permission to look at making these changes. We manage the Kourier rollout using the Operator so it would be preferable not to have to hand-hold it :-)

i have finally got it "sort of" working, the tests are failing however.

So on discovery - it wasn't clear what Kourier actually did - but it seems in essence reconcile the Knative Ingress objects, and then reconfigure Envoy Proxy to match. Our desire is that the knative ingresses themselves would be originally populated with the correct shared secret in the shared namespace, and I believe that knative serving is responsible for those, so I will continue my investigation of that code base to ascertain how that fits together and then raise a ticket for advice.

no further work.


Don't imoprt extinct taxa from external name sources

While we include extinct taxa in our database (eg https://www.inaturalist.org/taxa/339939-Tyrannosaurus-rex) but iNat isn't really about fossil observations so it's been suggested that we prevent taxa marked as extinct from being imported from our external name providers, which I think is a good idea.
EoL does have an "extinct" attribute, which it seems to draw from Paleobiology Database eg https://eol.org/pages/4433638/data

So would we able to check that attribute before importing a name, and provide an error message for users trying to import extinct taxa?

We retrieve data from EOL using their pages API, e.g. https://eol.org/api/pages/1.0/4433634.xml?synonyms=true&common_names=true, which doesn't seem to include any of that extinction status data. Their docs don't describe any additional parameters that would include that. They do seem to have an updated API, but using it would require redoing how we import taxa from EOL, which is sort of a separate issue.
I guess I'll leave this open in case anyone has advice on how we can get that extinction info out of the API we're using, but given how old it is I suspect we can't.

Have you considered using https://eol.org/api/pages/<page_id>/brief_summary.json?
Extinct species have the text 'This species is extinct' (e.g. https://eol.org/api/pages/4433638/brief_summary.json).  Higher ranks don't include that exact text, but they do use the past tense, e.g. https://eol.org/api/pages/4433634/brief_summary.json:
{"brief_summary":"Tyrannosaurus (Tyrannosaurids) is a genus of Dinosauria in the family tyrannosaurids. They were carnivores. Reproduction was oviparous."}
Seems like you could look for 'were' or 'was'.

That seems likes a lot of logic to throw at what is likely an uncontrolled and variable API response. I'm looking for a way to get extinction info out of https://eol.org/api/pages/1.0/4433634.xml, i.e. with a URL param of some sort, preferably in a field that comes from a controlled vocabulary. Otherwise I fear we'll just create more problems than we solve, like accidentally marking extant species as extinct.

You can't access the extinct boolean from the pages response, but that boolean is being directly used to set the brief summary text.

It seems pretty safe to invert it:
if the brief_summary contains "This species is extinct."
     then extinct = true

If this is not going to be acted on, can we please just close the open item, and accept the fact that users (like the one currently bulk importing extinct African stuff) are going to do it, that they will get upset when the stuff they spend time adding gets hidden as inactive and curators simply have to deal with it by spending the time to mark everything appropriately.


Add feature to change NVIM_APPNAME

Description
https://neovim.io/doc/user/starting.html#_nvim_appname
is it possible to change the neovim config directory in nixvim? Usually neovim installs to `.config/nvim' but i don't want to overwrite existing config and instead install to '.config/nixvim'. is this possible? it would be similar to using the $NVIM_APPNAME environment variable in neovim api.
if nixvim does not care about .config directory, there should at least be the ability to install nixvim with different NVIM_APPNAME so that you can use it alongside existing neovim configs.
Minimal, Reproducible Example
see pseudo code below to how i envision changing nvim_appname in nixvim.
programs.nixvim = {
    nvim-appname = "nvim-nixvim"
}

This could be added. Similar to allowing the exe name to be changed, it could be a useful customization.
Currently it's possible to use a "wrapped" config instead of ~/.config/nvim by setting wrapRc = true and impureRtp = false.
wrapRc will call nvim with -u, telling it to use the init.lua directly from the nix store.
Disabling impureRtp will cause ~/.config.nvim to be removed from the runtimepath.

hmmm i am still quite new to neovim and although it's great to see there is a workaround this seems quite complicated which goes against the ethos of nixvim. Is it possible to include such an update as i mention in the psuedo code? i believe this will be a great feature as it will allow people to do parrallell installs of nixvim and increase the takeup rate.

this seems quite complicated which goes against the ethos of nixvim.

Firstly, I don't think the following is especially complex:
programs.nixvim = {
  wrapRc = true;
  impureRtp = false;
}

Secondly, the ethos of nixvim isn't necessarily that everything should be simple. Rather our primary goal is to allow configuring neovim via the nix module system, as transparently as possible, with as little magic happening behind the scenes as possible.

is it possible to include such an update as i mention in the psuedo code?

As I said before: This could be added. Similar to allowing the exe name to be changed, it could be a useful customization.

i believe this will be a great feature as it will allow people to do parallel installs of nixvim

Just having NVIM_APPNAME support (or using a wrapped init via -u) is not enough to allow parallel nixvim installs.
The issue is that nixvim doesn't just install neovim config, it actually installs a nvim exe onto the PATH. Having multiple nixvim installs at the same time would therefore cause conflicts.
Therefore to achive multiple nixvim installs we need to do some additional refactoring, e.g:

allow disabling exe installation and only generate an init file
allow renaming the exe to avoid name conflicts

on related topic, i have installed nixvim but i would like to use it in parallel with my previous config i.e. i have two configs, one which uses programs.neovim.enable and the other that uses makeNixvimWithModule.
How can i run both on same machine in different terminal sessions? apologies if it is provided somewhere in your previous answer, there is alot going on under the hood which a novice like myself can't infer.

makeNixvimWithModule will use wrapRc internally to tell the nvim it installs to use the init file it builds. So you don't have to worry about init file conflicts.
If you use the nixvim build using makeNixvimWithModule via nix run or nix shell then yes, you can have access to it in a specific shell while still using your "globally installed" neovim elsewhere.

I couldn't seem to make it work. Started developing as a standalone flake. Than tried to port to my NixOS setup as an overlay.
    # overlay
    deliganli.novim = let
      system = "x86_64-linux";
      nixvim' = inputs.nixvim.legacyPackages.${system};
      nvim = nixvim'.makeNixvimWithModule {
        pkgs = prev;
        module = import ./novim;
      };
    in nvim;

    # ./novim/default.nix
    {
      # imports
      wrapRc = true;
      impureRtp = false;
    }

    # home config
    # contains my regular neovim setup
    home.file.".config/nvim".source = mkOutOfStoreSymlink "./nvim";

    # shell alias
    "novim" = pkgs.lib.getExe pkgs.deliganli.novim;

~/.config/nvim has the config from home-manager setup. But both novim and the nvim command is using the settings from nixvim


[Java] crate-java-testing

Problem
Both patches reflecting upon software packages which can be used for testing CrateDB did not include presenting the crate-java-testing package for Java. It is well alive.

https://github.com/crate/cratedb-examples/pull/54
https://github.com/crate/cratedb-examples/pull/280

Solution
Add a relevant snippet to cratedb-examples, and a corresponding documentation section to cratedb-guide, at https://cratedb.com/docs/guide/integrate/testing.html.

The example java-qa uses crate-testing already.
-- by-language/java-qa/pom.xml


Logz.io Enterprise app is not really there...

Hi, the guide for Azure SSO is great most of the time,
but in this article, I can't find the Logz.io enterprise app anywhere
I checked it under my Azure account with no luck
Thanks,

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

ID: 79f7ca61-d0f7-ecdb-ca0a-cdce521942cd
Version Independent ID: 40c1f090-86f3-ae96-7011-cd3d9be66589
Content: Tutorial: Azure Active Directory single sign-on (SSO) integration with Logz.io - Azure AD Integration
Content Source: articles/active-directory/saas-apps/logzio-cloud-observability-for-engineers-tutorial.md
Service: active-directory
Sub-service: saas-app-tutorial
GitHub Login: @jeevansd
Microsoft Alias: jeedes

@qualiit Thank you for pointing this out . We will have this reviewed with content author and update the thread.

@qualiit I am able to see that in my portal.

Can you confirm if you do not see in this location as mentioned in the screenshot ?

Yes, I can also see it. Make sure that you are login into Azure Portal with Cloud Application Administrator role or Global Admin role to add the application from gallery.

@qualiit We will close this now, feel free to reach out to us if you need any further help.

Hi Guys ,
What am i missing here

@qualiit : Here are the steps to add Logz.io in your portal.

Login to https://portal.azure.com
Go Azure Active Directory
Enterprise Application
Click on New Application

5) Enter the App name here :

You will be able to see it there :

Let me know if it helps.


STORM-1934 Fix race condition between sync-supervisor and sync-processes (1.x)

Please refer STORM-1933 and STORM-1934 to see reason of this issue and concept to fix.

sync-supervisor just downloads new topology code and writes new local assignment

shutting down workers and removing topology code is moved to sync-processes

sync-processes does all of jobs based on local assignment and allocated workers
remove unused / unneeded codes

PR for master: #1529
Here's my test result for this patch:

mvn clean install 5 times: not met supervisor intermittent failure (STORM-1933)

will try more times

kill worker via kill, kill -9, restart worker from UI: no issue on restarting worker
rebalance topology to change workers (3 -> 2): to test that new assignment has same worker port but different executors compared to assigned workers

worker is recognized as :disallowed, and killed & relaunched

Rebalance test in details:

Writing new assignment

6701 {:storm-id "test-topology2-4-1467185073", :executors ([7 7] [5 5] [3 3] [1 1]), :resources [0.0 0.0 0.0]},
6702 {:storm-id "test-topology2-4-1467185073", :executors ([6 6] [4 4] [2 2]), :resources [0.0 0.0 0.0]}

Assigned executors:

6701 {:storm-id "test-topology2-4-1467185073", :executors [[7 7] [5 5] [3 3] [1 1]], :resources #object[org.apache.storm.generated.WorkerResources 0x40c4d31c "WorkerResources(mem_on_heap:0.0, mem_off_heap:0.0, cpu:0.0)"]},
6702 {:storm-id "test-topology2-4-1467185073", :executors [[6 6] [4 4] [2 2]], :resources #object[org.apache.storm.generated.WorkerResources 0x4ba861f4 "WorkerResources(mem_on_heap:0.0, mem_off_heap:0.0, cpu:0.0)"]}}

Allocated:

"2e9bea10-02b7-4e55-88e7-b194b9917a63" [:disallowed {:time-secs<PHONE_NUMBER>, :storm-id "test-topology2-4-1467185073", :executors [[3 3] [6 6] [-1 -1]], :port 6703}],
"4630c4bf-9786-47ff-9f3b-6b42d9781b9d" [:disallowed {:time-secs<PHONE_NUMBER>, :storm-id "test-topology2-4-1467185073", :executors [[7 7] [1 1] [-1 -1] [4 4]], :port 6701}],
"b9a622d2-5e5b-4311-999c-8c8dd92da6b6" [:disallowed {:time-secs<PHONE_NUMBER>, :storm-id "test-topology2-4-1467185073", :executors [[2 2] [-1 -1] [5 5]], :port 6702}]}

NOTE: Due to forward reference, I have to move sync-processes to just before mk-synchronize-supervisor. Major changes are done in sync-processes so reviewers need to compare before & after manually. Sorry about that.
Since supervisor.clj is already ported to Java in master branch, I should have time to read ported code, and modify to be in sync.
Please review and comment while I'm working against master branch. Thanks!

Note: This patch removes the change from STORM-1561 since supervisor originally checks the change of executors in same port.
Please refer read-allocated-workers and matches-an-assignment?, and let me know if I'm missing here.

Build passes on storm-core so it's unrelated.

https://github.com/apache/storm/commit/aad9669643d5ba8552a2d5b62982c8f31d6471cd
I don't find clear usage from introduction of StandaloneSupervisor, so I guess it would be better to ask or wait someone who knows this ancient thing. :)

@HeartSaVioR The changes looks good. May be you can add some comments in sync-process and mk-synchronize-supervisor on what each is supposed to do.
In your comment where you rebalanced from 2 -> 3 workers, the allocated status for the new worker ":port 6703" is also disallowed, which looks odd since its a new worker.

@arunmahadevan Sorry for confusing: rebalance is done from 3 workers to 2 workers, and since all executors map are changed so all workers are disallowed and two new workers are launched.

@HeartSaVioR thanks for the clarification, it makes sense now. Can you also check rebalance from 2 -> 3 workers ?

@arunmahadevan
This works perfectly.

Writing new assignment

6700 {:storm-id "test-topology2-4-1467185073", :executors ([7 7] [4 4] [1 1]), :resources [0.0 0.0 0.0]},
6702 {:storm-id "test-topology2-4-1467185073", :executors ([6 6] [3 3]), :resources [0.0 0.0 0.0]},
6701 {:storm-id "test-topology2-4-1467185073", :executors ([5 5] [2 2]), :resources [0.0 0.0 0.0]}

Assigned executors:

{6700 {:storm-id "test-topology2-4-1467185073", :executors [[7 7] [4 4] [1 1]], :resources #object[org.apache.storm.generated.WorkerResources 0x6dabc02d "WorkerResources(mem_on_heap:0.0, mem_off_heap:0.0, cpu:0.0)"]},
6701 {:storm-id "test-topology2-4-1467185073", :executors [[5 5] [2 2]], :resources #object[org.apache.storm.generated.WorkerResources 0x6de46954 "WorkerResources(mem_on_heap:0.0, mem_off_heap:0.0, cpu:0.0)"]},
6702 {:storm-id "test-topology2-4-1467185073", :executors [[6 6] [3 3]], :resources #object[org.apache.storm.generated.WorkerResources 0x60f1fbb5 "WorkerResources(mem_on_heap:0.0, mem_off_heap:0.0, cpu:0.0)"]}}

Allocated:

"612eeee0-0ddc-4820-9062-c79276d56cf2" [:disallowed {:time-secs<PHONE_NUMBER>, :storm-id "test-topology2-4-1467185073", :executors [[2 2] [6 6] [-1 -1] [4 4]], :port 6702}],
"9751163a-f7b8-46a5-9b9c-bcd1fd1446cd" [:disallowed {:time-secs<PHONE_NUMBER>, :storm-id "test-topology2-4-1467185073", :executors [[7 7] [3 3] [1 1] [-1 -1] [5 5]], :port 6701}]

Now three workers are running.

Thanks @HeartSaVioR. It looks good.
+1

I'd like to get reviewed by @kishorvpatil if (but only if) he's available since it removes the changeset of STORM-1561. Since it's critical issue and related to race condition I'd also like to get reviewed by more contributors / committers.
And that would be really nice if affected users can apply this patch to see if this helps. I'll ping reporters for relevant issues and ask them to help testing.

@HeartSaVioR added resolution details in the description of the PR. Adding one more point here: (kill-existing-workers-with-change-in-components supervisor existing-assignment new-assignment) is not needed in sync-supervisor as it kills all the workers with invalid state which includes the old workers and rebalanced workers.

+1 LGTM.

Added some comments. I'll squash once reviewing is done.

@HeartSaVioR You may want to use (declare rm-topo-files) in the start so that you do not need to move defn sync-processes for handling forward references. This may make it easy to review the code.

@satishd Yeah it would be really better. Thanks for the tip. Applied.

@HeartSaVioR  I had a fix before for similar issue here https://github.com/apache/storm/pull/401/files . I don't see much of the code here. Can you take a look if that particular case is handled here.
@revans2 @kishorvpatil @d2r can you also take a look at this PR.

@harshach
sync-supervisor writes local assignment after code download for topology is completed.
Since sync-processes launches worker based on local assignment, there's a guarantee that code download is completed before launching worker.
Btw, as you see the diff, STORM-130 is not on recent code. Not sure why it's removed.

@harshach
And sync-processes (get-valid-new-worker-ids) checks topology files before launching workers.
If there's an issue which corrupts topology code or not having topology code, sync-processes doesn't launch worker, and next runs of sync-supervisor will try to download topology code again.

@harshach I commented your concern so could you revisit this?
@ptgoetz Could you also take a look?

@HeartSaVioR I am +1 .

+1

Thanks @HeartSaVioR . Merged into 1.0.x, 1-x, master branches.