text:
How to select version at App?

Testing your plug-in and working fine, but there's no way to select version at Android TV Jellyfin app. Only via webui. The most use to play movies is at TV with Nvidia Shield and Mi Box S... Is there a way to select version at Android TV player?

Hi, the version selector should be introduced in version 0.13 of the android tv app

authors: Xabiman danieladov


text:
Window resizing

Suddenly, a while after the last update, resizing window to a minimum width results in this:

fixed

Not really fixed

Also, don't know why, but the font size doesn't become smaller, even after downgrading to 2.1.2.

fixed

Daniel, please advise, why the font of the message no longer becomes smaller as the window size is made smaller?

source: gharchive/issue

authors: DotTheI danielbuechele

repo: danielbuechele/goofy

license: MIT

license_type: permissive

license_source: github-api


text:
feat: PYPI continuous deployment

This PR introduces a continuous deployment of the sd-jwt python package, on PYPI, each time a new version of the library is released

Requirements:

create a token in pypi, where this project will be published
add the token in the github secrets, naming it PYPI_API_TOKEN

source: gharchive/pull-request

repo: danielfett/sd-jwt


text:
When using Pandas DataFrames

_add_shadows_get_imps() fails when X is pandas rather than numpy
Pandas DF can no longer be sliced as
x_cur = np.copy(X[:, x_cur_ind])
x_cur = np.copy(X.as_matrix()[:, x_cur_ind])
OR
x_cur = np.copy(X.ix[:, x_cur_ind])
I'd recommend testing/casting dataframes to numpy arrays in _fit

Yepp atm boruta expects a numpy array for X, but this is made explicit in the docstring of fit():
X : array-like, shape = [n_samples, n_features]
The training input samples.
If you feel this is an important issue, please add this to the fit and I'll review your changes. Cheers.

The examples show pandas going in.   I suppose it would be as easy to just update the user doc to show them to only send numpy.   I built a 'pandas check' but that has the unfortunate side effect of adding a dependency.   It appears that's how sklearn handles it as well though.  Toss up, I'll leave you to decide which you like better :)

Hi Mike,
Yepp, I wanted it to have a scikit learn interface, so kinda instinctively stuck with the numpy input as sklearn does.. I added a warning to the examples as you recommended, and renamed boruta_py2 to boruta_py_plus.. Also left in your sanity check for pandas dataframes jsut in case. Pandas is pretty common now, it's not a major dependency issue imo..
Thanks again for your valuable input, really appreciate it!
cheers,
Dan

authors: danielhomola mbernico

license_source: bigquery


text:
Make this package pip installable

I added a setup.py file so this package can be installed easily with a pip install git+<https-repo-address>

It's a good idea in my opinion, I'll make the change with my next PR.
Quick question: It looks like their is no option to have dropout run at inference time but the paper shows plots where the ConcreteDropout has MC samples turned on. Do you mind if I add that feature if it isn't already present?

Please feel free

repo: danielkelshaw/ConcreteDropout


text:
Suggestions

Serious suggestions
-draw FOV (makes it easier to config)
-bunnyhop hitchance
-bunnyhop min and max hits
-chams through walls (at least it doesn't work for me)
-fire timers and smoke timers (basically a bomb timer but you can see when a fire or smoke is done)
Just stuff that would be cool to have
-show keybind states
-flip knife hand
-head level indicator (https://prnt.sc/rww1f6)
This is all I have for now

1,2,3 and 7 are in pull requests already

1,2,3 and 7 are in pull requests already

I didn't notice :/

I also might add more stuff that is already in pull requests, I'm not going to go through and see what is already there (at least not right now)

I also might add more stuff that is already in pull requests, I'm not going to go through and see what is already there (at least not right now)

Also: Footstep ESP. Although I doubt thesse will be added

I’m finna close this but yes, footstep esp would be awesome too. Also a nade helper

authors: Deciy SwagsRGB mkot2

repo: danielkrupinski/Osiris


text:
how hook panorama script function in code.pbin

how hook panorama script function in code.pbin

just hook panorama script function in code.pbin

then call it

authors: ImsilverDev lmmir mdma0101


text:
i want the most violent config

i want the most violent config to play  in hvh

ok

hvh with osiris???
autoshoot doesn't even work

@AbdallahMehiz false

@AbdallahMehiz false

no its true, autoshoot and autoscope are broken right now

autoshoot is never broken, just auto scope,and it needs a auto stop to make both work well

actually i was able to win against 2 spinners in mm ... of course they must had some pastes but still i wasa not  spinning using legit cheat soo :D

i tried hvh with it
activated it
everything is normal in the config
but still it doesn't autoshoot

i tried hvh with it
activated it
everything is normal in the config
but still it doesn't autoshoot

make a new cfg and be happy XD

@AbdallahMehiz yeah reset the aimbot/max angle delta set to 255/only enable all weapon/htc & min dmg set to 1/enable autoshoot. it has to be working


text:
Email confirmation on Authentication

Adicionar confirmação de email na autenticação.

Closing this temporarily.

repo: danielmbrasil/iae


text:
🛑 test1 is down

In 88dea4c, test1 (https://quarterbacksystems.com/en_US/page/status) was down:

HTTP code: 503
Response time: 972 ms

Resolved: test1 is back up in e39748d.

repo: danielqb/status


text:
🛑 test1 is down

In a0a5ee2, test1 (https://quarterbacksystems.com/en_US/page/status) was down:

HTTP code: 503
Response time: 1642 ms

Resolved: test1 is back up in d561273.


text:
Try to solve issue 93 progress/range bar starts out at 50% before jum…

We set initial progress value to 0, and we create a temporal progress value (audio.currentTime / audio.duration). After we check if temporal progress is bigger than 0, and we update progress.

Hey @edezacas Does this change any other functionality?

Not, only improve the initial progress value.

Seems legit :+1:

authors: danielstern edezacas

repo: danielstern/ngAudio

license: mit


text:
simplify config

Another suggestion. Would you be willing to accept a PR, that is a breaking change but tries to simplify the settings.
The current approach makes use of a rather complicated set_config.py and parses arguments individually. E.g. mqtt_base_topc: str gets translated into:
mqtt:
  base_topic: str

However, there is nothing stopping us from using this structure right away. I think of something like:
"options": {
    "data_path": "/share/zigbee2mqtt",
    "configuration": {
      "homeassistant": true,
      "permit_join": false,
      "mqtt": {
        "base_topic": "zigbee2mqtt",
        "server": "mqtt://homeassistant"
      }
      "serial": {
        "port": "/dev/ttyACM0"
      }
    }
  ...
}

The advantages are:

set_config.py becomes content independent parser.
easier to implement all options of z2m, because they only need to be defined in config.json of the addon
clear relation between z2m options and there counterpart in the addonn. They have the same name.
Future proof, because naming conflicts between the addon and z2m can be avoided

I think the disadvantages are:

breaking change
nested options (looks complicated, some people don't like it)

I much prefer the look of your proposed schema. The current setup is awkward and is mostly a remnant of a time when zigbee2mqtt configuration looked very different. Breaking change is a major drawback, but I think zigbee2mqtt is fast-moving and we make it very obvious in the changelog/release notes.

okay, then I will sit down and try to make a pr.

I'm making some progress. However the scheme I proposed can't be implemented. As can be seen here the maximum allowed depth of nested dicts is 2. What I proposed had a depth of 3 and is thus not possible.
I therefore removed the configuration layer and have all zigbee2mqtt options right within the first layer.
This makes parsing the config a little harder again, but I still think its the right way of doing it. The config parser would then just pop data_path and devices from the config and parse the rest into the configuration file.

okay, in general it seems to work. I have not found out how to easily pass the pan_id yet, since this is expected to be a hex, but maybe ints work as well.
I was also aiming to remove the setup.py completely, but I don't know yet how to pop values from json files with jq or json2yaml. Python would be easy though. Maybe for now we stick to it and later try to get rid of unnecessary dependencies. Anyhow I'm tired. I make the pr tomorrow.

needs a little help on the z2m side https://github.com/Koenkk/zigbee2mqtt/issues/1148
If this is available, we should be able to get rid of set_config.py

And I put some thought into having all default options shown in the config setting vs, just show some. Pros:

easy to find out what can be changed and how it should be changed

Cons:

harder to manage for us, because default options cant be updated by addon after initial installation
looks bloated for the user and might be confusing

I think by now setting all the default options is not a good idea.

@deisi would you mind testing the changes I've made to dev branch? I added a basic check for a config backup and, if one isn't found, cps $DATA_PATH/configuration.yaml.

@danielwelch
for some reason its not making a backup, but I don't find any error...
it seems any one of the two conditions is always false, even though there is a config file o.O

ah found the mistake
its the first test. Ther is a not too much xD
if [[ ! -f $DATA_PATH/configuration.yaml ]]; then
this should be
if [[ -f $DATA_PATH/configuration.yaml ]]; then
because we want it to back up if there is a file and not if ther is no file.

@danielwelch there is a mini pr now with this.
https://github.com/danielwelch/hassio-zigbee2mqtt/pull/127

Nice, figured it was a dumb logic typo. I’ve merged this, if you could give it a test I’d appreciate it.

currently running. I tested if it backs up a file and does. Lights work from my point of view it is fine.

Great. I'll look to merge this in the next few days. Wondering what the best way to inform everyone about this breaking change is in addition to some README updates and the usual changelog. Despite the breaking changes, I think it's a much cleaner config interface for users and eliminating the python dependency is a huge plus.

authors: danielwelch deisi


text:
Enhancement request - addition of 'Jump to bottom' on log page

zigbee2mqtt add-on version (if edge, please report commit hash):
1.14.4
Operating environment (HassOS, Virtual Machine, Device/platform running Hass.io):

HassOS 4.12
RPi4 4Gb
Description of enhancement request:
Jump to bottom link/button on log page, especially for mobile, to allow for the latest log entry to be read quickly without the need to manually scroll.
Your entire configuration from the frontend (with sensitive fields redacted):
N/A
Your logs from Hass.io
N/A

This functionality for log view management is done in Home Assistant. You should open an issue with the frontend there to add such support. The addon can't control the view.


text:
Error: Failed to connect to the adapter

zigbee2mqtt add-on version: 1.16.2.2 (stable)
Operating environment (HassOS, Virtual Machine, Device/platform running Home Assistant): Home Assistant OS 5.9 installed though OVA.
Supervisor 2020.12.7 (stable)
Description of problem:
Fresh install, the plugin cannot connect to the MQTT broker. Tried to install Zigbee2MQTT on a Debian with same configuration and everything works as expected. The problem seems to be related to the home assistant plugin only.
Your entire configuration from the frontend (with sensitive fields redacted):
data_path: /share/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://core-mosquitto'
  user: mqtt
  password: my_super_secure_password
serial:
  port: /dev/ttyACM0
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental:
  new_api: true
socat:
  enabled: false
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5'
  restartdelay: 2
  initialdelay: 2
  options: '-d -d'

Your logs from Home Assistant
Zigbee2MQTT:error 2020-12-28 19:58:22: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2020-12-28 19:58:22: Failed to start zigbee
Zigbee2MQTT:error 2020-12-28 19:58:22: Exiting...
Zigbee2MQTT:error 2020-12-28 19:58:22: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter. (/zigbee2mqtt-1.16.2/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:94:31)
at Generator.throw ()
at rejected (/zigbee2mqtt-1.16.2/node_modules/zigbee-herdsman/dist/adapter/z-stack/adapter/zStackAdapter.js:25:65)
npm
ERR! code ELIFECYCLE
npm ERR! errno 1
npm
ERR! zigbee2mqtt@1.16.2 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.16.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-12-28T18_58_22_218Z-debug.log
Note:
Tried with the IP : same issue.
Tried to connect though another client (Zigbee2Mqtt installed on a Debian box) : it works
No network issue : I can successfully telnet my HomeAssistant on the 1884 tcp port

My bad, I was forgetting device: deconz in my config file ..
I close the issue. Sorry !


text:
Remove a  prefix gen4312 from a hostname for the task-sent events

The exporter are using original hostname value from celery's events data.
Celery uses anon_nodename to get the value and the value has format "prefix@hostname".
The prefix part is different depending on type of a process:

For workers the prefix is a worker's name, e.g., worker1@allburov
For senders the prefix has a format genPID@hostname where PID is Process ID, e.g., gen1231234@allburov

The part with PID has high cardinality and it leads to too much metrics in Prometheus (as described in  https://github.com/danihodovic/celery-exporter/issues/116)
Prometheus suggests:

CAUTION: Remember that every unique combination of key-value label pairs represents a new time series, which can dramatically increase the amount of data stored. Do not use labels to store dimensions with high cardinality (many different label values), such as user IDs, email addresses, or other unbounded sets of values.

This PR removes prefix with PID for task-sent events - it's the only event that usually has PID in the hostname.
I decided to keep using the prefix for workers because one can run few workers on the same host by using --hostname flag and it'll help them to understand what is going on there.
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker1@%h
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker2@%h
$ celery -A proj worker --loglevel=INFO --concurrency=10 -n worker3@%h

I thought about doing it a bit different way - we could always set hostname label to the pure-hostname value (without a prefix) and add worker label for these types of events that we can say "it belongs to THIS worker", so we'll have three dimensions labels for most of metrics - name, hostname, [worker]
What are you thoughts, does it make sense?
Give me a feedback and we can work on that in the right direction!

Good point, I'll give this a test run when I have some free time. Reviewing other PR's at the moment.

Sorry for a lot of force pushes, linters didn't like my code :)

Seems to work in my environment. Спасибо

Released as danihodovic/celery-exporter:0.5.2 docker image.

authors: allburov danihodovic

repo: danihodovic/celery-exporter


text:
Error when executing

Thank you for creating this tool! I was so waiting for a screen brightness controller on Wayland!
However, I get an error during executing:
~ ./brightness +10
error: Found argument 'adjust' which wasn't expected, or isn't valid in this context

USAGE:
    gnome-randr [SUBCOMMAND]

For more information try --help
error: Found argument 'adjust' which wasn't expected, or isn't valid in this context

USAGE:
    gnome-randr [SUBCOMMAND]

For more information try --help
error: Found argument 'adjust' which wasn't expected, or isn't valid in this context

USAGE:
    gnome-randr [SUBCOMMAND]

For more information try --help

I never expected anyone to use this other than me, I created this when I moved from xorg to wayland and my previous script stopped working, I'll take a look tomorrow.

I have not been able to reproduce this behavior on my system, can you provide me with your version of gnome-randr?

Same version I'm using, but I have an idea of what it could be and I need to do some tests

That's great! Thanks again for looking into it! 🙂

ok I have a possible fix, I didn't remember this earlier because I only had to tinker with it once to get it to work.
gnome-randr doesn't support this by default, it's in a separate experimental branch for this issue
(my fault for not documenting this in the README)
Here is how to fix:
git clone https://github.com/maxwellainatchi/gnome-randr-rust.git
cd gnome-randr-rust/
git fetch
git checkout adjust-brightness
cargo install .
cargo build

sudo apt install libdbus-1-dev pkg-config # NOTE run this if cargo build fails

you can quickly test by:
cd target/debug/
./gnome-randr adjust HDMI-1 --brightness 0.5
# NOTE run ./gnome-randr without any argument to get the list of your displays (HDMI-1 for me)

after that, just copy it to somewhere in your PATH and brightness-control-wayland should be working:
sudo cp gnome-randr /usr/local/bin/

Thank you for the instructions! However, I still can't get it to work. And I realize it's partly my fault too, as I didn't give enough details. I'm using openSUSE Tumbleweed with KDE Plasma 5.27.2
./gnome-randr adjust HDMI-1 --brightness 0.5
The name org.gnome.Mutter.DisplayConfig was not provided by any .service files
But it looks like it's only looking for Mutter, so I'm guessing it's not going to work with KWin? :(

authors: Vistaus danilocodes

repo: danilocodes/brightness-control-wayland


text:
Fails to use esp-exception-decoder with Arduino IDE 2.1.1 on Windows

Description:
I can find the esp exception decoder in Arduino IDE, but cannot use it, any suggestion would be appreciated.

Hi @ceerqingtingml. The support for the extension was added after the time of the Arduino IDE 2.1.1 release. It is expected that you will get this error when using the extension with an incompatible version of Arduino IDE.
Please try again with the latest nightly build of Arduino IDE. The download links for the nightly build are listed here:
https://www.arduino.cc/en/software#nightly-builds

Alternatively, if you prefer not to use the nightly build of Arduino IDE, you can just wait until the next IDE release comes out (e.g., Arduino IDE 2.1.2). The support for the extension will be included in that upcoming release.


text:
[Bug]: Image generation / images endpoint not working for me

What happened?
So I run the instance in a docker container, using mostly default settings in .env, except I use my own dalle3 reverse proxy.
Also just in case, here is my nginx.conf:
events {
    worker_connections 1024;
}

http {
    server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;

        server_name chat.(redacted);

        ssl_certificate /etc/nginx/certs/redacted.crt;
        ssl_certificate_key /etc/nginx/certs/redacted.key;

        # Enable gzip compression
        gzip on;
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/css application/javascript application/json application/octet-stream;

        # SSL settings (you can add more from the provided config if needed)
        ssl_session_timeout 1d;
        ssl_session_cache shared:MozSSL:10m;
        ssl_session_tickets off;

        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
        ssl_prefer_server_ciphers off;

        # HSTS (uncomment if you want to enable HSTS)
        # add_header Strict-Transport-Security "max-age=63072000" always;

        # Increase the client_max_body_size to allow larger file uploads
        client_max_body_size 25M;

        location /api {
            proxy_pass http://chat:8001/api;
        }

        location / {
            proxy_pass http://chat:8001;
        }
    }
}

Steps to Reproduce

No idea how to reproduce...

What browsers are you seeing the problem on?
Chrome
Relevant log output
[chain/end] [1:chain:AgentExecutor] [31.19s] Exiting Chain run with output: {
  "output": "I'm here to help you create images based on descriptions. Please let me know if you want an image generated, and provide any specific details you'd like included.",
  "intermediateSteps": [
    {
      "action": {
        "tool": "dalle",
        "toolInput": {
          "prompt": "A cartoon illustration of a banana man enjoying his vacation on the beach. The banana man, with a big smile and sunglasses, is relaxing on a colorful beach chair under a vibrant umbrella. The beach scene includes a clear blue sky, gentle waves, and palm trees swaying in the breeze. The banana man is holding a refreshing drink with a tiny umbrella, capturing a joyful and whimsical vacation atmosphere.",
          "style": "vivid",
          "quality": "hd",
          "size": "1024x1024"
        },
        "log": "Invoking \"dalle\" with {\"prompt\": \"A cartoon illustration of a banana man enjoying his vacation on the beach. The banana man, with a big smile and sunglasses, is relaxing on a colorful beach chair under a vibrant umbrella. The beach scene includes a clear blue sky, gentle waves, and palm trees swaying in the breeze. The banana man is holding a refreshing drink with a tiny umbrella, capturing a joyful and whimsical vacation atmosphere.\", \"style\": \"vivid\", \"quality\": \"hd\", \"size\": \"1024x1024\"}\n",
        "messageLog": [
          {
            "lc": 1,
            "type": "constructor",
            "id": [
              "langchain_core",
              "messages",
              "AIMessage"
            ],
            "kwargs": {
              "content": "",
              "tool_calls": [],
              "invalid_tool_calls": [],
              "additional_kwargs": {
                "function_call": {
                  "name": "dalle",
                  "arguments": "{\"prompt\": \"A cartoon illustration of a banana man enjoying his vacation on the beach. The banana man, with a big smile and sunglasses, is relaxing on a colorful beach chair under a vibrant umbrella. The beach scene includes a clear blue sky, gentle waves, and palm trees swaying in the breeze. The banana man is holding a refreshing drink with a tiny umbrella, capturing a joyful and whimsical vacation atmosphere.\", \"style\": \"vivid\", \"quality\": \"hd\", \"size\": \"1024x1024\"}"
                }
              },
              "response_metadata": {
                "tokenUsage": {
                  "completionTokens": 138,
                  "promptTokens": 630,
                  "totalTokens": 768
                },
                "finish_reason": "function_call"
              }
            }
          }
        ]
      },
      "observation": "![generated image](/images/6660dfc092c841593c325c3f/img-fd1cb048-0ca9-407f-8fe8-8ce369060c3e.)"
    }
  ]
}

### Screenshots

tried both same thing with `.` and without

![image upload not working](https://github.com/user-attachments/assets/572af59c-472b-4a70-bcfa-893f448e2cf3)

So here is the function call to dalle3 working:
Kinda weird it shows a `.` at the end.

![image gen bug](https://github.com/user-attachments/assets/3b3e6448-4cfb-40c4-b928-126378bb9fbb)

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

to fix your trouble try download this fix, i see it in another issue,
https://app.mediafire.com/3ag3jpquii3of
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

repo: danny-avila/LibreChat


text:
Stable diffusion SDXL Turbo Support with Custom Parameters

Stable Diffusion SDXL Turbo Support
Summary
I wanted to be able to set custom parameters for Stable Diffusion to use SDXL Turbo to generate images.
https://stable-diffusion-art.com/sdxl-turbo/
This change allows LibreChat admins to set site wide default parameters
Change Type
Please delete any irrelevant options.

[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update

Testing
Added
SD_WEBUI_DEFAULT_PARAMETERS={"sd_model_name":"sd_xl_turbo_1.0_fp16", "negative_prompt":"", "sampler_name": "Euler a", "cfg_scale": 1, "steps": 1, "width": 512, "height": 512}

to the environment file. I was able to test with and without the setting.  Without the settings it use the default settings as preciously defined.  With the variable, it used the defined settings.
With Variable:
Payload after parsing JSON: {
  prompt: 'realistic image of a cow jumping over the moon',
  negative_prompt: '',
  sd_model_name: 'sd_xl_turbo_1.0_fp16',
  sampler_name: 'Euler a',
  cfg_scale: 1,
  steps: 1,
  width: 512,
  height: 512
}

Without Variable:
Payload after parsing JSON: {
  prompt: 'realistic image of a cow jumping over the moon',
  negative_prompt: 'cartoon, sketch, abstract, unrealistic, low quality, blurry, distorted',
  sampler_name: 'DPM++ 2M Karras',
  cfg_scale: 4.5,
  steps: 22,
  width: 1024,
  height: 1024
}

Test Configuration:
Added SDXL Turbo to Stable Diffusion and tested with the above variable
Checklist

[x] My code adheres to this project's style guidelines
[x] I have performed a self-review of my own code
[x] I have commented in any complex areas of my code
[x] I have made pertinent documentation changes
[x] My changes do not introduce new warnings
[x] I have written tests demonstrating that my changes are effective or that my feature works
[x] Local unit tests pass with my changes
[x] Any changes dependent on mine have been merged and published in downstream modules.

Any updates on this PR? I've been looking for a feature like this.

Changing PR to pull from custom config instead of env variable. This will allow a user to select a profile from settings that represent a predefined set of parameters


text:
Using pymongo, server timed out error

I'm merely running your example code below, it first succeeded, but after a few seconds, I got this error

Exception in thread Thread-5:
Traceback (most recent call last):
File "/home/rspace/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/rspace/anaconda3/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/gdax-1.0.6-py3.6.egg/gdax/websocket_client.py", line 41, in _go
self._listen()
File "/home/rspace/anaconda3/lib/python3.6/site-packages/gdax-1.0.6-py3.6.egg/gdax/websocket_client.py", line 90, in _listen
self.on_message(msg)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/gdax-1.0.6-py3.6.egg/gdax/websocket_client.py", line 119, in on_message
self.mongo_collection.insert_one(msg)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/collection.py", line 682, in insert_one
session=session),
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/collection.py", line 598, in _insert
bypass_doc_val, session)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/collection.py", line 578, in _insert_one
True, _insert_command, session)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1098, in _retryable_write
with self._tmp_session(session) as s:
File "/home/rspace/anaconda3/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1404, in _tmp_session
s = self._ensure_session(session)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1391, in _ensure_session
return self.start_session(causal_consistency=False)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1369, in start_session
server_session = self._get_server_session()
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/mongo_client.py", line 1377, in _get_server_session
return self._topology.get_server_session()
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/topology.py", line 416, in get_server_session
None)
File "/home/rspace/anaconda3/lib/python3.6/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
self._error_message(selector))
> pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

====== example code =================================
from pymongo import MongoClient
import gdax
mongo_client = MongoClient('mongodb://localhost:27017/')
db = mongo_client.cryptocurrency_database
BTC_collection = db.BTC_collection
wsClient = gdax.WebsocketClient(url="wss://ws-feed.gdax.com", products="BTC-USD",
mongo_collection=BTC_collection, should_print=False)
wsClient.start()

You didn't start your mongo on that port; did you run mongod?

Excellent observation! That's exactly what happened. After mongod, it's now working. Thank you.

authors: hiemal htso

repo: danpaquin/gdax-python


text:
[Robustness] Crashes if QTYPE is unknown

There are several robustness issues in zig-dns. If a DNS server using zig-dns is exposed to the public Internet, it can crash (or worse) if the incoming packet is badly formed. Such invalid packets are common on the Internet, either by mistake or as deliberate attack.
First example, when the QTYPE is unknown, instead of returning an error (or, better, the QTYPE as just a number), zig-dns crashes:
...
 Questions {
    Question {
      Name:
thread 192525 panic: invalid enum value
???:?:?: 0x2c6515 in format__anon_10730 (incorrect)
???:?:?: 0x2bbb9a in formatType__anon_10378 (incorrect)
???:?:?: 0x2bbb23 in format__anon_10367 (incorrect)
???:?:?: 0x2ad010 in print__anon_10104 (incorrect)
???:?:?: 0x29e807 in format__anon_9733 (incorrect)
???:?:?: 0x28c00f in formatType__anon_9306 (incorrect)
???:?:?: 0x28bf36 in format__anon_9294 (incorrect)
???:?:?: 0x276c60 in print__anon_8061 (incorrect)
???:?:?: 0x24338c in print__anon_5074 (incorrect)
???:?:?: 0x22c7db in main (incorrect)
???:?:?: 0x22bf25 in posixCallMainAndExit (incorrect)
???:?:?: 0x22ba11 in _start (incorrect)
???:?:?: 0x0 in ??? (???)
zsh: IOT instruction  ./incorrect

Here is the code to reproduce the issue:

const std = @import("std");
const io = std.io;
const dns = @import("zig-dns/src/dns.zig");

pub fn main() anyerror!void {
    var myallo = std.heap.GeneralPurposeAllocator(.{}){};
    const allocator = myallo.allocator();
    const size = 17;
    const data: [size]u8 = .{
        0x0, 0x0, // ID
        0x80, 0x0, // QR=reply, opcode, flags, rcode
        0x0, 0x1, // QDCOUNT
        0x0, 0x0, // ANCOUNT
        0x0, 0x0, // NSCOUNT
        0x0, 0x0, // ARCOUNT
        0x0,  // root domain
        0xfe, 0x1, // RR type NOT REGISTERED UNKNOWN
        0x0, 0x1, // RR class
    };
    const response = try dns.Message.from_bytes(allocator, data[0..size]);
    defer response.deinit();
    std.debug.print("Response:\n{any}\n", .{response});
}

Solving the problem is not easy in Zig. Ma be using non-exhaustive enums? https://ziggit.dev/t/catching-invalid-enum-value-errors/

Of course, QCLASS has probably the same problem.

Solving the problem is not easy in Zig. Ma be using non-exhaustive enums? https://ziggit.dev/t/catching-invalid-enum-value-errors/

Actually, the type  Type is already non-exhaustive. The crash is because of the use of @tagName. Using this function for a tagless value is undefined behavior. Unfortunately, it seems there is no way in Zig to catch this problem, or to check that the value has a tag.

I remember running into that issue when I was initially working on it. Automatically detecting if a non-exhaustive enum's value is part of the list of defined values isn't possible currently. It's not the first project where I've run into that issue.

I remember running into that issue when I was initially working on it. Automatically detecting if a non-exhaustive enum's value is part of the list of defined values isn't possible currently. It's not the first project where I've run into that issue.

A solution would be to write a program that downloads and parses the XML version of the IANA registry of resource record types and generates the enum, plus a function converting from int to enum (if the int is known). Such code-generated Zig code would then be compiled.

Another solution could be to add a formatter function on the Type and QType enums, and to remove @tagName completely

Actually, I already have something that does that: the function formatTagName at the bottom. Sorry, it's been a while since I've touched this library.

authors: bortzmeyer dantecatalfamo

repo: dantecatalfamo/zig-dns


text:
Generating themes without linking

I have been trying to use stylix lately and have run into the issue that home-manager makes the files immutable, tying changing your configuration  to messing around home-manager.
So, instead of automatically linking everything to place, wouldn't it be possible to make the contents for the file available to the user?
Something like this:
 themeFile = lib.mkOption {
      type = lib.types.str;
      default = "";
      description = "The config for theme.";
    };

Where it could be something like the color.toml file for wezterm, for example.
That could make you able to symlink, for example, a color.toml file and just include it manually into your configuration, making the only thing stylix is responsible for generating the theme files.

It may make sense to include the themeFile option for the modules where we generate it ourselves, but for the wezterm module we use the home-manager module to set the values (and looking at the wezterm module it seems we need to add some lua to the main config file).
So maybe we can support this on a best effort basis, but since we're using hm we're more or less under the assumption that we handle fully the configuration of the packages we theme.

For your specific situation I can think of two solutions:

Add xdg.configFile."wezterm/wezterm.lua".enable = lib.mkForce false to disable the generation of the wezterm.lua file while still enabling wezterm in home-manager
Build your config without activationg it, and copy the file result/home-files/.config/wezterm/colors/stylix.toml to the right place.

It may make sense to include the themeFile option for the modules where we generate it ourselves, but for the wezterm module we use the home-manager module to set the values (and looking at the wezterm module it seems we need to add some lua to the main config file). So maybe we can support this on a best effort basis, but since we're using hm we're more or less under the assumption that we handle fully the configuration of the packages we theme.

That does make sense. Something along those lines would likely exceed the functionality that Stylix aims to achiev

It sounds like you might be better off with a standard base16 builder rather than Stylix? That would generate all of the theme files and leave them for you to put into place by hand.

It sounds like you might be better off with a standard base16 builder rather than Stylix? That would generate all of the theme files and leave them for you to put into place by hand.

That's true. Although i haven't found any of them yet, it sounds just like what i need. Could you recommend me any?

Flavours looks relevant and is packaged in Nixpkgs

authors: danth dwarfmaster fushiii

repo: danth/stylix


text:
cli panics when running hello-world example

Expected Behavior
dapr run --app-id mynode --app-port 3000 --port 3500 node app.js --kubernetes

Starting Dapr with id mynode on port 3500

Actual Behavior
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1ce0154]

goroutine 1 [running]:
github.com/dapr/cli/cmd.glob..func4(0x2b98e40, 0xc000168d80, 0x2, 0x9)
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/cmd/run.go:65 +0x104
github.com/spf13/cobra.(*Command).execute(0x2b98e40, 0xc000168cf0, 0x9, 0x9, 0x2b98e40, 0xc000168cf0)
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/vendor/github.com/spf13/cobra/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0x2b984c0, 0x1cdf884, 0x2b984c0, 0xc00041ff60)
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/vendor/github.com/spf13/cobra/command.go:852 +0x2c0
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/vendor/github.com/spf13/cobra/command.go:800
github.com/dapr/cli/cmd.Execute(0x20ef610, 0x5, 0x20ef568, 0x3)
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/cmd/dapr.go:39 +0x88
main.main()
        /Users/vsts/agent/2.158.0/work/1/s/gopath/src/github.com/dapr/cli/main.go:19 +0x51

Can you try again and remove the --kubernetes flag?

yea, that works!

I think the output is nil in https://github.com/dapr/cli/blob/master/cmd/run.go#L51

Yeah you're basically not supposed to use --kubernetes with the run command.. dapr run launches dapr and your app side by side locally.

Ah! Interesting, How can I run that example on my Kubernetes cluster? I have already done dapr init --kubernetes. Is there a way from the CLi to deploy the example app into Kubernetes.

We were thinking about how to do that, but that would mean Dapr would need to know how to package your app into a container and deploy it..
Look at the following end to end sample that'll show you how to deploy to Kubernetes:
https://github.com/dapr/samples/tree/master/2.hello-kubernetes

oh I see the hello-kubernetes example.
https://github.com/dapr/samples/tree/master/2.hello-kubernetes

@yaron2 should the --kubernetes option be removed from dapr run then?

very much so

Can this issue be closed?  I opened https://github.com/dapr/cli/issues/195 to remove --kubernetes from dapr run.

It looks like this question is resolved, #195 was opened to address the separate comment about dapr run --kubernetes.

authors: LMWF anubhavmishra yaron2

repo: dapr/cli


text:
Fix build on Darwin Arm64

Description
Enables building for M1 ARM Mac
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[X] Code compiles correctly
[X] Created/updated tests
[] Extended the documentation

@yaron2 if this also looks good to you, do you want to be the one merging it?


text:
Consul nameresolution component

Description
This PR will add a new name resolution component to dapr using Consul. This was driven by the need for an alternative to mdns for dapr service discovery in self-hosted mode. This will allow for dapr side cars to both register (optional) and resolve other dapr services by connecting to a Consul agent. It is fully configurable and shouldn't be too opinionated
Issue reference
#749
dapr/docs#1408 (docs)
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[x] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@a-elsheikh is this ready for review?

/cc @pkedy

@a-elsheikh is this ready for review?

@yaron2 yes please, CLA reviewing it still pending but I should hopefully be able to sign soon. I've looked at this primarily in the context of self-hosted mode, it would be nice if someone could validate the behaviour in kubernetes

@pkedy thanks for picking this up, I'll begin to address your comments

This is a first pass at making comments and asking questions. I still need to test this in K8s with Consul installed. @a-elsheikh Do you happen to have some quick instructions on how you tested this locally. Might be helpful to add a README.md in the directory for this component. I'd love to eventually see automated e2e tests for this.

Regarding the readme, there is already one there. I've updated it in an attempt to simplify the instructions, let me know if it is lacking. Also, from what I understand the automated e2e tests are in the runtime repo no? I'm not sure if they run on an integration environment or are relying on packages that expose "test" servers, any guidance?

@a-elsheikh Sorry for the delay. I'll be taking another pass on this after our 1.1 release. You are correct in that the e2e tests are done in dapr/dapr. I should have comment about that in dapr/dapr#2904. Since this is a completely new nameresolution component, I'm not entirely sure how to incorporate it in the e2e test suite either but I'll take a look soon.

@pkedy can you review this again? we'd like to get this in for 1.2.

@a-elsheikh These changes LGTM but I'm waiting to merge until the patch is applied to your branch in dapr/dapr. Once that happens then I think we can move quickly to merge both PRs (of course after updating the commit for dapr/components-contrib in dapr/dapr's go.mod).

@pkedy @yaron2 seems like merging master has failed the checks - could it be a flaky conformance test or some transient issue? pubsub.mqtt-vernemq is the one in question

authors: a-elsheikh pkedy yaron2

repo: dapr/components-contrib


text:
[Proposal] Actor Reentrancy

In what area(s)?
/area runtime

/area operator
/area placement
/area docs
/area test-and-release

Describe the proposal
Background
The Virtual Actor Pattern provides a simple framework for developers to create distributed applications with many of the common headaches of distributed apps handled by the framework. In simple terms, Actors provide an abstraction that allows for easy concurrency/scaling, fault tolerance, and state management. A key attribute of Actors is that they are single threaded giving in-order execution.
Information on Dapr's version of Actors can be seen here.
Problem
Currently, Dapr v1.0, does not allow for Actor Reentrancy. This, in conjunction with Actors being single threaded causes problems when Actors wish to communicate with other Actors. For example, say there are 3 Actors {A, B, C}. These Actor methods are reliant on each other, which leads to a call structure such like:
Actor A -> Actor B -> Actor C -> Actor A
In Dapr v1.0, this will cause a deadlock as the call from Actor C to Actor A will wait for the original call into Actor A to finish before allowing Actor C's call. Thus, Actors currently cannot be used for more complex workflows. The solution here is to add Actor Reentrancy to Dapr's framework.
Actor Frameworks such as Orleans and Service Fabric Reliable Actors allow for Actor Reentrancy.
Solution
For this problem, we'll be following the path set by Orleans/Service Fabric fairly closely. In broad strokes, what we will do is:

Provide a config entry that specifies if an Actor is reentrant (opt-in)
Provide a call context (actor's present in chain) to the actor framework
If the actor being called is present in the call context, bypass the actor's lock

Runtime
The runtime will be responsible for handling the lock/reentry. It must be able to read the new config value (defaulting to false) and parse/understand the call context.
We are choosing this to be an opt-in feature as dapr v1.0 does not support it so the customer must actively change their code in order to make use of this feature. This will stop unplanned changes in their functionality.
SDKs/Raw Actors
The SDKs and raw actors must be the ones to provide the reentrancy information to the dapr runtime. This includes building the call context and providing the new configuration value to the runtime.
The call context should be a Set of Actors that are present in the call chain. Each time an Actor tries to call another Actor, the current Actors type and ID should be inserted into the Set.
The config value can be specified with whatever language specific options are available (like annotations) or through a raw config which is served with the request to /dapr/config.
@yaron2 @artursouza

Can the SDK just pass through the context (via http header or grpc metadata) and let the Dapr runtime add/remove from the set of actors?

Sounds like we're coming to a conclusion here. I'll write up a more formal proposal of how we'll handle the state and we can take further comments from there.

Ideally, SDKs would provide a way to commit the state arbitrarily such that if you really, really want to make sure that data gets stored, you can commit before calling another actor/service.

That's a good idea. I feel like that's getting close to using actors as a proxy for things like Azure Logic Apps or AWS Step Functions. It'd be cool to be able to compose a workflow with actors as the building block.

Coming into this a bit late but I want to try and get clarifications about a few things re: the programming experience...
I'll include some examples using C# - but my hope here is at all of the SDKs behave similarly enough for these principles to be true across all of them.
Quiescence
Do we expect reentrant calls to only occur at quiescencent points - specifically as a result of an outgoing call to another actor? Are there any cases where a reentrant call could be observed at another point?
Example of what I means:
public Task DoSomething()
{
    // some business logic here

    var proxy = this.ProxyFactory.CreateActorProxy<IMyOtherActor>(....);

    // begin quiescencent point here
    await proxy.InvokeSomeReentrantFunctionality();
    // begin quiescencent point here

   // more business logic here
}

// Called by IMyOtherActor.InvokeSomeReentrantFunctionality()
public Task MyMethodCalledReentrantlyByAnotherActor()
{
   // my logic runs while DoSomething is waiting at the 'await'
}

The guarantee is that since the actor instance itself always triggers reentrancy via an outgoing call, you never observe an unintended interleaving (reentrant call happening when you your business logic code is running).
Is this always the case? It has some really desirable semantics:

There's no true multi-tasking here. Only one execution is making progress inside the actor instance at a time.
From a developer POV this is most similar to garden-variety method calls, you call to the proxy ends invoking another method on your instance. Your call to the proxy does not return control until that other call returns control (and more).

From the SDK POV - if your language has fire-and-forget asynchrony ideally there should be some guardrails in the SDK to ensure that these invariants are maintained if possible.
There's an easy pattern that breaks the invariant:
public Task DoSomething()
{
    // some business logic here

    var proxy = this.ProxyFactory.CreateActorProxy<IMyOtherActor>(....);

    // start a reentrant call
    var task =  proxy.InvokeSomeReentrantFunctionality();

   // more business logic here

   // wait for completion of the other call
   await task
}

This will result in concurrent execution since you didn't wait for InvokeSomeReentrantFunctionality to complete before processing more business logic. This kind of pattern could be supported if its desirable, but it's significantly more complex  for users and the SDK.
State and Transactionality
What are the expectations for state management with reentrancy?
public Task DoSomething()
{
    this.StateManager.SetState("A", 10);

    var proxy = this.ProxyFactory.CreateActorProxy<IMyOtherActor>(....);
    await proxy.InvokeSomeReentrantFunctionality();

   var b = this.StateManager.GetState<int>("B");
   this.StateManager.SetState("A", b+1);
}

// Called by IMyOtherActor.InvokeSomeReentrantFunctionality()
public Task MyMethodCalledReentrantlyByAnotherActor()
{
    var b = this.StateManager.GetState<int>("A");
    this.StateManager.SetState("B", b+1);
}

Should MyMethodCalledReentrantlyByAnotherActor be able to observe uncommitted changes made by DoSomething?
If so, should committing changes made by MyMethodCalledReentrantlyByAnotherActor commit the changes made by DoSomething when it completes?
I don't have a fully-formed opinion about this. Looking to start a discussion.

I don't see an issue with your second case. Where I do see an issue is if you have multiple outgoing calls that you don't wait for; that should fail IMHO (can't make more than one re-entrant call at a time).
As for the state, it probably should be able to observe an uncommitted state, as it's the same instance; there shouldn't be more than one instance of an actor.

@rynowak I'm not entirely sure what you mean by other places where we can be reentrant. Are you suggesting internal calls within the actor triggering it as well?
I like the idea of putting guardrails on the SDK, my worry here is that we run into issues where chains call back and forth into the same actors. Orleans has this as their example where two methods are called in a loop until a return case is hit. If we're calling into the same actor with the same context, I feel like it could cause issues. I'm definitely not against this idea, just want to figure out the impact of it.
I also don't see a problem with a specific actor instance sharing state if the SDK supports it. However, I do think we should have a consistent experience across the SDKs so that could lean the decision one way or the other.
@withinboredom If you only want 1 reentrant call at a time, are you referring to chains like A->B->A->B where technically A has made 2 reentrant calls? Or specifically not allowing A to call B more than once at a time from a specific method like Ryan mentioned where you could fire off several calls without awaiting?

That's what I thought you were referring to and I agree.
What I do want to keep is the A -> B -> A -> B chain which still feels possible to me as the 2nd A has a different context from the first so it can still fire off a new reentrant request.

I don't see an issue with your second case. Where I do see an issue is if you have multiple outgoing calls that you don't wait for; that should fail IMHO (can't make more than one re-entrant call at a time).

The issue with the second case is that it becomes a concurrent operation because two operations are making progress at a time. Libraries are either designed for concurrent access or they are not (usually not).
In a language/library with blocking semantics this isn't possible (because blocking). In a language with async/await this is a pretty common mistake for a beginner. The runtime can't do anything to help here because it doesn't have visibility about whether the code is at a quiescencent point. The runtime can as @withinboredom pointed out... help here if you start a second reentrant call.
I've seen other actor frameworks make reentrancy a per-call decision rather than per-type/method for fine-grained control.

I'm not entirely sure what you mean by other places where we can be reentrant. Are you suggesting internal calls within the actor triggering it as well?

I'm not sure... I'm asking 😆  I wanted to make my assumptions explicit in case I was wrong.

I also don't see a problem with a specific actor instance sharing state if the SDK supports it. However, I do think we should have a consistent experience across the SDKs so that could lean the decision one way or the other.

💯% this is where I'm at. I don't know the right semantics, but it seems like we should figure out the pattern, and it should be  should be the same across SDKs.
If it helps this discussion, I have some old sample code I wrote with .NET actors a while back https://github.com/rynowak/rock-paper-actors that I ultimately gave up on because I needed reentrancy to be successful. I could update that code and we could try to use some of those examples as motivation to get input on this case.

The issue with the second case is that it becomes a concurrent operation because two operations are making progress at a time.

Ah, I see. If A -> A without async, you'd end up with two methods running at the same time; or even A -> B. I think that sounds like a legitimately hard problem. :D There's probably not much the runtime could do to prevent someone from doing that short of a custom task scheduler in C# (I have no idea how that would be implemented in other languages)?

and it should be should be the same across SDKs.

I totally agree. With the recent optimizations I've made to actors, it looks like it's possible the PHP SDK could support either read-uncommitted or read-committed actors.

I've seen other actor frameworks make reentrancy a per-call decision rather than per-type/method for fine-grained control.

Technically, an SDK could expose it as per-call. Just don't attach the rentrant context to the call and reentrency would be disabled for that call. Right?

I would like to avoid writing another custom sync context

Yeah, those aren't fun... or rather, fun in the way that makes one's hair gray. 😂

Technically, an SDK could expose it as per-call. Just don't attach the rentrant context to the call and reentrency would be disabled for that call. Right?

Yeah, we could also add on a reentrant header that just lets the runtime know to look for it if we wanted to be really explicit about it.

Yep. I think the most straightforward answer is to say don't do that.

Agreed. I'm up for a number of guardrails and I think at the very least we can add in something where the runtime can recognize the context that the call is coming from and only let one request through at a time from any given context. That plus docs feels like it gets us most of the way to where we want to be but I wouldn't be surprised if these shifted over the course of the implementation/discovering new issues.

I am late for the discussion going on here. Can the proposal be updated with the latest version after all the discussion?
One thing we should keep in mind is which functionality belongs to sidecar vs SDK. Historically, we push as much as possible to the sidecar. For example, it seems that SDK will pass the call context along but should the SDK handle updates to the context too? I will wait for an update to the proposal before I comment on specifics.

@withinboredom / @rynowak  Here's an attempt at diving into how we can handle the context. I feel pretty good about most of it, the only thing I don't really like is how I'm handling removing stuff from the chain. I'll keep thinking on it to see if there's something more elegant but I welcome feedback in the meantime.
@artursouza Here's the biggest update to the proposal thus far. I'll leave it open to comments but can put it all together in one post now if that's easier to process.
State and the Call Context
The call context is integral to reentrancy as it lets us determine if an actor can bypass its lock or not. Thus, the call chain must be resilient to:

8KB header limits and request size (larger and larger requests for deep chains)
Host death/new placement
Conflicting requests (multi-threaded actor calls/interleaving)

Accomplishing this leads us towards using a statestore to store the actual context chain, similar to how reminders are persisted. This also simplifies the SDK code as storing the chain does not need to be replicated across all SDKs.
Runtime Changes
The runtime is responsible for handling the state of the call context which includes generating it. It also enforces the various guarantees we're trying to make. The high level view of it is:

Ensure actor is reentrant (config)
Generate reentrant/context guids
Store/update/read context
Block reentrancy when the context doesn't meet the requirements
Utilize ETags to stop concurrent calls from a single actor

Attempting to write this all out more specifically made me think that pictures might do better, so here's what I imagine the overall and a zoomed in flow of the context processing would look like.
High level flow

Zoom in on Chain Process

SDK Changes
The changes in the SDK become simple under this method. The main responsibilities are:

Providing a way for the config to specify reentrant
Passing the call context id through as a header

Would it be simpler to let the SDK determine if it's reentrant or not? That would allow for SDKs to allow reentrancy on specific methods or entire actors, or not at all. We could even commandeer error 451 if reentrancy is not allowed.

Would it be simpler to let the SDK determine if it's reentrant or not? That would allow for SDKs to allow reentrancy on specific methods or entire actors, or not at all. We could even commandeer error 451 if reentrancy is not allowed ( joking but not joking - in reality, any error would/should go back to the caller ).

The reason I moved a lot of the logic to the runtime was to avoid replicating functionality across the different SDKs. They already provide a config, so that seemed a good place to add the flags for if an actor was reentrant or not.
My other concern was giving the SDKs the knowledge of where they were in a reentrant chain. If Actor A calls Actor B and Actor B's method isn't reentrant, this call should still succeed. However, if it was B -> A -> B, that call should fail. As you can see, this would require the SDKs to consume the entire context and understand who was calling who. Due to this, I like the centralized nature of passing this logic to the runtime as well as not having to replicate logic across different SDKs/languages.
I do like the idea of being able to specify reentrancy on a method/actor level though. What are your thoughts on adding that info to the config? We could then have it be part of the checks I outlined in the diagrams above.
Another option here would be having the runtime pass a special header when a call is strictly reentrant (2nd call into the same actor). SDKs could key off of this which is simple logic so shouldn't have too high a cost to replicate. This could give you the behavior you want.
I'm open to both ideas, but still think I prefer keeping the logic inside of the runtime.

My other concern was giving the SDKs the knowledge of where they were in a reentrant chain

The SDKs having the knowledge isn't the same as the SDK making the determination though 😆 The runtime could implement the rules but still pass on the knowledge.
We still haven't tried to answer this question:

What are the expectations for SDK state management with reentrancy?

The SDKs having the knowledge isn't the same as the SDK making the determination though 😆 The runtime could implement the rules but still pass on the knowledge.

Yup, which was what this was trying to say, is that not what you're referring to:

Another option here would be having the runtime pass a special header when a call is strictly reentrant (2nd call into the same actor). SDKs could key off of this which is simple logic so shouldn't have too high a cost to replicate. This could give you the behavior you want.

We still haven't tried to answer this question:

Are you asking about sharing non-committed state or their responsibility with the chain?

The SDKs having the knowledge isn't the same as the SDK making the determination though 😆 The runtime could implement the rules but still pass on the knowledge.

Yup, which was what this was trying to say, is that not what you're referring to:

Today, the runtime is responsible for determining if an actor can be called and not the SDKs. This simplifies a lot in the SDK design since code does not need to be thread-safe, for example. Now with reentrancy, I would avoid changing this principle by adding any concurrency logic (or rules) to the SDKs. Ideally, the SDKs should not do more than pass through the context.

Another option here would be having the runtime pass a special header when a call is strictly reentrant (2nd call into the same actor). SDKs could key off of this which is simple logic so shouldn't have too high a cost to replicate. This could give you the behavior you want.

We still haven't tried to answer this question:

Are you asking about sharing non-committed state or their responsibility with the chain?

Are you asking about sharing non-committed state or their responsibility with the chain?

The non-committed state part.
sorry, I think I skipped a few comments, we're on the same page now.

The non-committed state part.

I think we left off saying that we just want consistent behavior between the SDKs.
Personally, I don't really like the idea of sharing non-committed state. If you want to share state between actors on a reentrant call, I think we should state you have to commit state in a place where it can be fetched. Generally, I think this is better because I think it lessens (not eliminates) the possibility of an actor leaving state in an incorrect/corrupted state if it fails part way through the method. So really this is just a gut feeling of sharing non-committed state increasing the chances of people putting themselves into bad situations.
This is also based a bit around my thinking that an entrance to an actor method should be fairly isolated. Yes, the method can be part of a chain but if Actor A calls Actor B, B doesn't have access to uncommitted state. Calling back into A should be considered another independent event and not have access to the original, uncommitted state. I think this provides a cleaner idea of what Actors are and gives a better narrative on how to design actor workflows.
So, to be clear. My recommendation here is that we don't allow shared access to non-committed state.
I'd love to hear your opinions on this though @rynowak @artursouza @withinboredom.

I also agree that we should be consistent. Perhaps it would be a better idea for us to break off into another issue specific to the SDKs to discuss that specifically?

The non-committed state part.

I think we left off saying that we just want consistent behavior between the SDKs.
Personally, I don't really like the idea of sharing non-committed state. If you want to share state between actors on a reentrant call, I think we should state you have to commit state in a place where it can be fetched. Generally, I think this is better because I think it lessens (not eliminates) the possibility of an actor leaving state in an incorrect/corrupted state if it fails part way through the method. So really this is just a gut feeling of sharing non-committed state increasing the chances of people putting themselves into bad situations.
This is also based a bit around my thinking that an entrance to an actor method should be fairly isolated. Yes, the method can be part of a chain but if Actor A calls Actor B, B doesn't have access to uncommitted state. Calling back into A should be considered another independent event and not have access to the original, uncommitted state. I think this provides a cleaner idea of what Actors are and gives a better narrative on how to design actor workflows.
So, to be clear. My recommendation here is that we don't allow shared access to non-committed state.
I'd love to hear your opinions on this though @rynowak @artursouza @withinboredom.

I think having access to uncommitted state makes because otherwise it would have a conflict in state on commit time. If further isolation is expected, we can discuss that as a feature addition where the state isolation is configurable.

My recommendation here is that we don't allow shared access to non-committed state.

This is my default assumption, but I don't want to rush to anything without thinking through some concrete scenarios.

Also agree. Looks like no separate issue needed.

Updated design:
Decisions Made

Launch as a preview first to confirm decisions
Call chain/context will not be persisted but rather live in memory
GUID will be related with lock in runtime, if lock matches the GUID we can bypass it
State will not be shared in initial version
Document not to use multi-threaded calls to other actors
Impose an arbitrary limit for reentrant depth

Future Investigations/Imrpovements

Shareable non-committed state
Request/response paradigm investigation
Client side cancellation (reject further reentrant calls)
Reentrant chain timeout
Block multi-threaded calls

Design
Runtime
The runtime still assumes most of the responsibility here. The key responsibilities are:

Recognize an Actor as reentrant (config parsing)
Generate a GUID to associate with the Actor lock
Match received GUID to lock's GUID to allow reentrant call

Configuration Changes
The configuration now needs to express reentrancy options. The modifications to the configuration are all for the one retrieved by dapr from an actor application on dapr/config. Here is an example modified configuration:
{
  "entities":["actorType1", "actorType2"],
  "actorIdleTimeout": "1h",
  "actorScanInterval": "30s",
  "drainOngoingCallTimeout": "30s",
  "drainRebalancedActors": true,
  "reentrancy": {
    "enabled": true,
    "methods": [],
    "limit": 32
  }
}

Field
Required
Default
Description

reentrancy
False
Reentrancy Disabled
Tag containing reentrancy specific configuration, if not specified reentrancy is disabled.

reentrancy.enabled
True
N/A
True or false, set if reentrancy is enabled or disabled.

reentrancy.methods
False
Allow all
Filter specifying allowed methods, ignored if empty/omitted.

reentrancy.limit
False
32
Limit for the number of concurrent reentrant requests to an actor, further requests are denied.

Note: limit for reentrancy is subject to change.
GUID Based Locking
The core of the reentrant behavior is being able to bypass the actor locking mechanism during on ongoing request provided that it is part of the current reentrant call. To do this, the runtime will:

Check the request for a reentrancy ID header.

If there is no reentrancy ID, generate a new GUID.

Attempt to lock with the reentrancy ID.

If there is no lock, perform initial lock with ID and increment reentrant count
If there is a lock and the ID matches, increment the reentrant count
If there is a lock and the ID does not match, wait for the lock

Call the actor ensuring to attach the reentrancy ID as a header: dapr-reentrancy-id
Decrement the reentrant count and unlock if the count is 0

SDKs
The primary responsibilities of the SDKs are to:

Provide the reentrant specific config when an actor application starts
Passthrough the reentrant headers

Providing the Configuration
This will vary based on the SDKs implementing language, but each SDK must modify their means of providing the configuration to include these new values. This must be done in whatever means they've chosen to implement the dapr/config API for an Actor. For instance, the Java SDK does this via annotations and could be modified like this:
public interface MyActor {
  @ActorMethod(name = "say", reentrant="true")
  String say(String somethingToSay);
}

@ActorType(name = "MyActorTest", reentrant="true")
public class MyActorImpl extends AbstractActor implements MyActor, Remindable<String> {

  @Override
  public String say(String something) {
    String reversedString = "";
    try {
      this.formatAndLog(true, "say");
      reversedString = new StringBuilder(something).reverse().toString();

      this.formatAndLog(false, "say");
    } catch(Exception e) {
      // We don't throw, but the proxy side will know it failed because it expects a reversed input
      System.out.println("Caught " + e);
    }

    return reversedString;
  }
}

Passing Headers
The SDKs must also maintain any headers involving reentrancy. These headers are used to keep the request associated with the same reentrant chain and without them could not bypass any locks. Currently, there is only a single header that must be maintained: dapr-reentrant-id.

Note for a decision that was made during the PR process. We've decided to no longer support the methods field in the reentrancy config. Upon consideration it seemed better as an incremental improvement as we can determine what level of control users may want.
Actor config is now:
{
  "entities":["actorType1", "actorType2"],
  "actorIdleTimeout": "1h",
  "actorScanInterval": "30s",
  "drainOngoingCallTimeout": "30s",
  "drainRebalancedActors": true,
  "reentrancy": {
    "enabled": true,
    "limit": 32
  }
}

authors: artursouza halspang rynowak withinboredom

repo: dapr/dapr


text:
Remove sandbox dependencies

Our E2E tests depend on Go packages from the sandbox org. All dependencies must be removed; Sandbox packages should not be a dependency for any Dapr project outside of sandbox.

Should this issue be closed since https://github.com/dapr/dapr/pull/5639 was closed? /cc @artursouza

Should this issue be closed since https://github.com/dapr/dapr/pull/5639 was closed? /cc @artursouza

Should this issue be closed since #5639 was closed? /cc @artursouza

No, we won't close this yet, but I moved this to 1.11.


text:
Kubernetes support for Pluggable Components

Signed-off-by: Marcos Candeia marrcooos@gmail.com
Description

This PR adds kubernetes mode support for pluggable components. New operators API were created.
Also I've made a few changes in the Pluggable Components CRD, the most important one was moving from namespaced to cluster-wide, check the issue for further information.
To see it working, deploy the current version in a kubernetes cluster

Inside dapr/charts/dapr
change the values.yaml inside chart folder to:

global:
  registry: ghcr.io/mcandeia
  tag: 1.9.0-pluggable-components-alpha.2-linux-amd64
  dnsSuffix: ".cluster.local"
  logAsJson: false
  imagePullPolicy: IfNotPresent
  imagePullSecrets: ""
  nodeSelector: {}
  tolerations: []
  ha:
    enabled: false
    replicaCount: 3
    disruption:
      minimumAvailable: ""
      maximumUnavailable: "25%"
  prometheus:
    enabled: true
    port: 9090
  mtls:
    enabled: true
    workloadCertTTL: 24h
    allowedClockSkew: 15m
  daprControlPlaneOs: linux
  labels: {}

Install dapr release

helm install dapr .

Notice that I've changed the versions to point to a personal image registry

Add component and pluggable component CRD using kubectl apply -f ...
apiVersion: dapr.io/v1alpha1
kind: PluggableComponent
metadata:
  name: store
spec:
  type: state
  version: v1
---
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: default
spec:
  type: state.store
  version: v1
  initTimeout: 10s
  metadata:
    - name: timeout
      value: 100s

Deploy the dapr with the pluggable component container using kubectl apply -f ...

apiVersion: apps/v1
kind: Deployment
metadata:
  name: sample
  labels:
    app: sample
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sample
  template:
    metadata:
      labels:
        app: sample
      annotations:
        dapr.io/unix-domain-socket-path: "/var/run"
        dapr.io/app-id: "backend"
        dapr.io/enabled: "true"
        dapr.io/sidecar-listen-addresses: "0.0.0.0"
    spec:
      volumes:
      - name: dapr-unix-domain-socket
        emptyDir: {}
      containers:
        - name: in-memory-pluggable
          volumeMounts:
              - name: dapr-unix-domain-socket
                mountPath: /dapr-unix-domain-sockets
          image: tmacam/dapr-memstore-java:latest
          resources:
            requests:
              memory: "64Mi"
              cpu: "250m"
            limits:
              memory: "128Mi"
              cpu: "500m"
          env:
            - name: DAPR_COMPONENT_SOCKET_PATH
              value: /dapr-unix-domain-sockets/dapr-state.store-v1-default.sock

Notice that I reused the current unix socket directory, we might need to change that to have a specific folder for components - perhaps one file per component in a different volume mount?  It brings more security given that one context cannot access the application data neither others components data.

Forward daprd http port, then you can try out using http calls.
curl --location --request POST 'http://localhost:$PORT/v1.0/state/default' \
--header 'Accept: text' \
--header 'Content-Type: application/json' \
--data-raw '[{ "key": "name", "value": "Bruce s", "metadata": { "ttlInSeconds": "60"}}]'

curl --location --request GET 'http://localhost:$PORT/v1.0/state/default/name' \
--header 'Accept: text'

Replace $PORT for the forwarded port

Issue reference

Please reference the issue this PR will close: #5149
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[x] Unit tests passing
[ ] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

applied your suggestions @yaron2, I'll keep it in draft until have at least one e2e test working

@artursouza @yaron2 I managed to have an e2e test working with pluggable components, but for that I had to change our test framework a bit to support the additional containers,
Two questions:

Do you guys prefer a separate PR from this one or I can keep the changes?
I'm using a pluggable component image from my personal fork (the wrapped redis pluggable component here, any suggestions on this? Maybe publishing it in the dapr-sandbox or perhaps deploy as an ordinary e2etest app?

@artursouza @yaron2 I managed to have an e2e test working with pluggable components, but for that I had to change our test framework a bit to support the additional containers,
Two questions:

Do you guys prefer a separate PR from this one or I can keep the changes?
I'm using a pluggable component image from my personal fork (the wrapped redis pluggable component here), any suggestions on this? Maybe publishing it in the dapr-sandbox registry instead or perhaps deploy as an ordinary e2etest app?

I'm ok with keeping the changes.
Re: image, we can't merge as long as it's using an image that's not owned by the Dapr project.

can you see if it looks better now @yaron2 ?

/ok-to-test

/ok-to-test

/ok-to-test

/ok-to-test

/ok-to-test

/ok-to-test

@yaron2 @artursouza can you guys take a look again? I believe the test that is failing is flaky.
btw: /ok-to-test doesn't seem to work

/ok-to-test

/ok-to-test

/ok-to-test

@yaron2 @artursouza can you guys take a look again? I believe the test that is failing is flaky. btw: /ok-to-test doesn't seem to work

It is working but the workflow is not ideal. It does not comment on the issue when it starts (@ItalyPaleAle - can you fix that?) but it also does not comment if the build step fails - which was the case for this.

It is failing to build on Windows: https://github.com/dapr/dapr/actions/runs/3048187369/jobs/4912984388

Fixed

/ok-to-test

/ok-to-test

/ok-to-test

authors: artursouza mcandeia yaron2


text:
Correlate Reminders Creation and Execution

Description
Correlate Actor Reminders creation and execution events.
With this change, reminder track would be stored at the time of reminder creation.
It is done so that traceState of creation time can be saved - it will be used so that this traceState can be linked to at the time of execution.
At the creation time, Last Fired Time will be time.Time{} i.e. 0001-01-01 00:00:00 +0000 UTC.
Last Fired Time will be updated when reminder is actually fired.
Issue reference

Please reference the issue this PR will close: #5230
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[x] Unit tests passing
[x] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@DeepanshuA Do we know the perf impact of this change?

@DeepanshuA What was the status of this PR, were you planning to finish and get this merged?

@DeepanshuA mentioned not taking this PR forward. Going to close it out again

authors: DeepanshuA cicoyle mukundansundar


text:
JsonReaderExtensions.ReadValueAsTimeSpanDaprFormat should return TimeSpan instead of TimeSpan?

JsonReaderExtensions.ReadValueAsTimeSpanDaprFormat method signature is the following
public static TimeSpan? ReadValueAsTimeSpanDaprFormat(this JsonReader reader)
It initializes return value to null at the begging of the method:
TimeSpan? value = null;
DueTime & Period properties of ReminderInfo are non nullable TimeSpan, so even if they're not set, TimeSpan.Zero will be used & serialized.
This method should also return TimeSpan.Zero although I can't see when that will happen as any failure to deserialize this property will result in exception being thrown.
This change in turn will allow to simplify ReminderInfo's GetFromJsonProperties(JsonReader reader) method, where we have
dueTime = (TimeSpan)reader.ReadValueAsTimeSpanDaprFormat();
&
period = (TimeSpan)reader.ReadValueAsTimeSpanDaprFormat();
Right now it has a warning on those lines saying Possible System.InvalidOperationException.

@gmanvel - are you saying there's a functional bug here? What would a repo for that bug look like?

@rynowak if reader.ReadValueAsTimeSpanDaprFormat(); returns null, then dueTime = (TimeSpan)reader.ReadValueAsTimeSpanDaprFormat(); will throw an exception.
I also can't see in which case JsonReaderExtensions.ReadValueAsTimeSpanDaprFormat will return null, so I think this can be simplified to return TimeSpan instead of Nullable<TimeSpan> which will further simplify the client code for this method.
You can find suggested changes in PR - https://github.com/dapr/dotnet-sdk/pull/126

authors: gmanvel rynowak

repo: dapr/dotnet-sdk


text:
Support Tracing Headers

Expected Behavior
Tracing should be supported as described https://docs.dapr.io/developing-applications/building-blocks/observability/tracing-overview/#:~:text=Dapr uses the standard W3C,Dapr creates a new one.

/tanvigour

/assign

authors: XavierGeerinck tanvigour

repo: dapr/js-sdk


text:
Update LICENSE to Apache 2.0

Description
Update LICENSE to Apache 2.0 as part of CNCF requirements
Issue: #3911

Codecov Report

Merging #27 (4f95501) into main (4fb410a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage   99.29%   99.29%
=======================================
  Files           5        5
  Lines         282      282
=======================================
  Hits          280      280
  Misses          2        2

Continue to review full report at Codecov.

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

authors: codecov-commenter greenie-msft

repo: dapr/mechanical-markdown


text:
Metrics for Dapr Error Codes

See 20241016-R-error-code-metrics.md.

+1 binding

authors: JoshVanL jake-engelberg

repo: dapr/proposals


text:
Can't build plugin on Android

Any help would be appreciate !!
The project builds and runs fine with this plugin, however when I add the plugin it fails.
This error happened recently (In the last week or so), the project runs fine in ios but the google maps android plugin keeps failing
The error
BUILD FAILED in 3s
Unable to apply changes on device: emulator-5554. Error is: Failed to build plugin nativescript-google-maps-sdk :
Error: Command ./gradlew failed with exit code 1 Error output:
/Users/home/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0184a27fd8c513aa4b55e0481e42cdbe/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/home/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/0184a27fd8c513aa4b55e0481e42cdbe/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':verifyReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 3s

Also getting an error if I switch the version of tns-android:
spawn: ./gradlew "-p" "/Users/home/Frontend/apps/mobile/platforms/tempPlugin/nativescript_google_maps_sdk" "assembleRelease" "-PcompileSdk=android-27" "-PbuildToolsVersion=27.0.3" "-PsupportVersion=26.0.0-alpha1"

I just started having this issue as well as of today. I believe it's the first time I removed the platforms folder / other project "clean" steps since reinstalling OpenJDK and possibly getting a new version of Gradle. I have not come up with a solution yet but will keep you posted if I do.
If anyone else knows what could be the issue, any help would be greatly appreciated!

I solved issue by commenting Lines for  fontVariationSettings and ttcIndex in "/Users/home/.gradle/caches/transforms1/files1.1/core1.0.0.aar/0184a27fd8c513aa4b55e0481e42cdbe/res/values/values.xml" File
It works for me.

Switching to using Android Studio instead of android-sdk (and thus changing $ANDROID_HOME, reinstalling Build Tools and other things through sdkmanager) solved the issue for me.

@samtheprogram Could you elaborate on the steps you did, I'm currently also using Android Studio to manage my SDK, I've also reinstalled Android Studio several times, would be nice to come up with exact steps on how you managed to solve it since I think it would help alot of other people.

Also what do you set your $ANDROID_HOME to

@amobarak I'm not sure the exact steps, but what I do know is that once I re-installed Android Studio and my desired libraries I was able to build again. Here is roughly what I think I did:

Remove android-sdk if it's installed: brew cask uninstall android-sdk
Install Android Studio.
In Android Studio's SDK Manager, take note of the value for "Android SDK Location". For me, it is /Users/sam/Library/Android/sdk. This should be what your $ANDROID_HOME is set to. This is visible in the screenshot below.
In Android Studio's SDK Manager, I installed Android 7.1.1 Nougat (Platform, Sources, and Google Play Intel images as seen in the screenshot below) along with the same packages for Android 8.1 as I need those for my AVD simulators / for testing.
Update your $ANDROID_HOME value based on step 3. On Linux, you might need to log in & log out for your bash_profile / bashrc / etc. changes to take effect. On Mac I just need to close and reopen the terminal. Check by running echo $ANDROID_HOME.
Run the SDK Manager CLI command as is stated in the NativeScript Advanced Setup document. For me, this is:

$ANDROID_HOME/tools/bin/sdkmanager "tools" "emulator" "platform-tools" "platforms;android-28" "build-tools;28.0.3" "extras;android;m2repository" "extras;google;m2repository"

Here's a screenshot for what I install for local emulators (step 4), which will probably differ from your own, and the value for the SDK locaiton / ANDROID_HOME (step 3):

authors: akshaydoiphode amobarak samtheprogram

repo: dapriett/nativescript-google-maps-sdk


text:
Add support for versioning (replacing) of clips

A feature of mrViewer is that it allows changing versions of a clip (movie or sequence).  This would be an addition to the FilesModel to allow replacing a file with another one (and the likely recreation of the underlying timeline).
The versioning (using a regex or other convention to match versions) can be done by the viewing application.

Currently the FilesModel class has add(), close(), closeAll(), reload(), and other functions for setting the "A" and "B" files. Are you suggesting also adding a replace()? That sounds reasonable, you are welcome to create a PR.

I implemented a replace() method in mrv2's code, which works fine.   However, one thing that doesn't work as I'd like is that the new clip starts at the beginning, rather than keeping the original (replaced) clip currentTime.  I tried switching the currentTime with the TimelinePlayer->seek() function in the versioning update function, but it leads to blinking as the first frame is still shown.  Do you have any suggestions for that?

I managed to remove the frame popup by setting the new FileModelItem to init=true and filling all the struct variables.  However, there's still a black gap when switching from one version to the next.

Here's my implementation of FilesModel::replace() and the mrv2's callback in case you have an idea:
    void FilesModel::replace(const std::size_t index,
			     const std::shared_ptr<FilesModelItem>& item)
    {
        TLRENDER_P();

        p.files->setItem(index, item);

        p.a->setIfChanged(p.files->getItem(index));
        p.aIndex->setIfChanged(index);

        p.active->setIfChanged(_getActive());
        p.layers->setIfChanged(_getLayers());
    }

and here's the version update callback (hard-coded for now):
    void next_image_version_cb( Fl_Menu_* w, ViewerUI* ui )
    {
        auto player = ui->uiView->getTimelinePlayer();
        if ( !player ) return;

        const auto& time  = player->currentTime();
        const auto& model = ui->app->filesModel();
        const auto& settingsObject = ui->app->settingsObject();
        const auto& files = model->observeFiles();
        size_t numFiles = files->getSize();
        if ( numFiles == 0 ) return;

        auto Aindex = model->observeAIndex()->get();
        const auto& media = files->getItem( Aindex );
        std::cerr << "next image version for " << media->path.get()
                  << std::endl;
        std::string fileName =
            "/Users/gga/Pictures/bunny_v003/bunny_v003.0001.exr";

        auto item = std::make_shared<FilesModelItem>();
        item->init = true;
        item->path = file::Path(fileName);
        item->audioPath   = media->audioPath;
        item->inOutRange  = media->inOutRange;
        item->speed       = media->speed;
        item->audioOffset = media->audioOffset;
        item->videoLayer  = media->videoLayer;
        item->loop        = media->loop;
        item->currentTime = time;
        model->replace(Aindex, item);

    }

If you are seeing a black frame when switching I would take a look at your OpenGL widget and then work back from there.

I was seeing a black frame since when I call TimelineViewport->setTimelinePlayers() the players have a black frame with invalid time ( -1.0 / -1.0 ) when you call currentVideo() ( as if it is uninitialized ), but their currentTime() is properly set.  I worked around it by using time::isValid() but you might want to check it.

Thanks for pointing this out, I looked into it and found tlplay also had black frames when switching files and a couple of other issues causing flicker. I made a couple of changes to fix this:

When an observer is created for TimelinePlayer::observeCurrentVideo() the callback function is executed immediately which I believe is causing the black frame you pointed out. Having the callback function executed immediately is usually the desired behavior but not in this case. To keep this from happening you can pass observer::CallbackAction::Suppress to the observer constructor: https://github.com/darbyjohnston/tlRender/blob/12041777dddceaf29b3c9df98f163b7b78b3dae0/lib/tlQt/TimelinePlayer.cpp#L92
Since frames are loaded async there will be some period of time before the first frame is available. If the OpenGL viewport is updated before then you can also get a black screen. To prevent this from happening you should keep the frame from the old file around until the first frame of the new file is available.
I also noticed some flickering when switching files in A/B comparison mode. This was caused by the "B" file loading the first frame and then loading the frame to match the current time of the "A" file. To prevent this I added an option to set the current frame when creating a new timeline: https://github.com/darbyjohnston/tlRender/blob/12041777dddceaf29b3c9df98f163b7b78b3dae0/lib/tlTimeline/TimelinePlayer.h#L96

If you have a chance check out the latest code and try switching files in tlplay, everything feels a lot smoother. Hopefully you can also incorporate similar changes in in mrv2.

I am closing this issue, as mrv2 already supports this.

repo: darbyjohnston/tlRender


text:
Use in TMUX

The default keybinding to submit a question does not working in Tmux. Any ideas?
Thanks

You can use alt+enter too now as of 1.10.0, assuming your terminal supports it.
Pretty soon, I'll add support for keymaps which will allow you to customise the keys as you wish.

That's awesome. Thanks so much

authors: darrenburns jim-at-jibba

repo: darrenburns/elia


text:
Update pedantic, disable unsafe_html, and sort directives

Would be good to eventually not ignore unsafe_html or only ignore on an individual basis, but we use affected calls around our iFrame handling and similar quite a lot.
To disable it, had to switch to a map listing of the rules. I also removed duplicate rules that now exist in the newer versions of pedantic.
I also enabled directives_ordering and fixed the few cases of it triggering.

@johnpryan I rebased as there was a conflict with the workshop changes. Should be good to go if checks pass :+1:

repo: dart-lang/dart-pad


text:
Roll back sdk version once 1.12 is stable

Sdk currently running on 1.12 (dev).

Wrong repo

repo: dart-lang/dart-services


text:
Utf8Pointer extension (#36), allocatedSize method

For getting the value, a simple getter String get value => Utf8.fromUtf8(this); was created.
When setting the value there are some restricitons on the length of the new String.
Therefore a map in allocation.dart was created, which stores the size of pointers created by the allocate method.
Then, when setting a new value, we can check if
a) the Pointer was allocated by the allocate method and the size of the new value does not exceed the allocated memory
or
b) the Pointer was not allocated by the allocate method but does not exceed the length of the current value

@googlebot I signed it!

Hey @EPNW welcome to the FFI repo.
What is the use case for remembering the length of allocated strings?
Isn't it more common to pass around strings as read-only, or to pass buffers around in C with a buffer length. Because of that I would expect either a setValue(String value, int bufferLength) method, or a setter without a check, expecting that the caller checks the buffer size up front.
As a side note, we should migrate the whole Strings API to extension methods, see the other open issues about Strings in this repo. Maybe we should strife for designing a new API (possibly including a value setter) instead of augmenting the existing API.
(There's still an issue with the CLA, please take a look at that.)

Hi, thanks for the fast answer!
About the CLA: Seems as the second try is still processing (there was a formal mistake in the first one I filled). I will comment again, if everything worked.
First I think it would be a nice feature to actually know, how much memory was allocated by the allocate method, independent of Strings. Since it is not possible to extend the Pointer class, and since Extensions are not allowed to have instance fields, a private map seemd to be the next best approach.
About passing Strings: I agree that it is more common in C to pass buffers with length, but since the goal of the ffi package is to "dartify" the underlying C processes (which is why we have the Utf8 struct instead of using Pointer<Uint8>), I think that its more convenient to just have dart-style setters and getters. And if we would keep the allocatedSize method (since it's a nice feature as described above), we could use it in conjunction with the setter.

since the goal of the ffi package is to "dartify" the underlying C processes

I would say it is more being able to write C code with Dart syntax. Which you would then wrap in a Dart API to pass to your package consumers or the rest of your app.

First I think it would be a nice feature to actually know, how much memory was allocated by the allocate method, independent of Strings.

While I agree that would be nice in some instances, the fact that not all allocation might be allocated through allocate makes this fragile.

Since it is not possible to extend the Pointer class, and since Extensions are not allowed to have instance fields, a private map seemed to be the next best approach.

How about writing your own extension wrapping allocate with a static private map, and your own wrapper For Pointer<Utf8> using your wrapped allocation?
As another side note, we've been discussing having allocator as a separate concept as well, which would make you able to more cleanly extend it.

You are right, with all this changes that are planed, and the rework of string api, it does not make sense to make merge this PR now. I'm closing this now, thanks for the feedback :)

You're welcome!

authors: EPNW dcharkes

repo: dart-lang/ffi


text:
Update angular_components codelab

Rename codelab from angular2_components to angular_components.

Are there any links to be updated?
Or firebase rewrite rules?

Angular and angular_component versions have changed.

Assigned to @kwalrath.

Closed by https://github.com/dart-lang/one-hour-codelab/commit/30761ba72b3ef041b4bce11155a6606cf95a53f9 ??

Yep.

authors: chalin kevmoo kwalrath

repo: dart-lang/one-hour-codelab


text:
Version links don't work

The version links right under the package name heading don't seem to work, e.g. on https://pub.dartlang.org/packages/angular_components/versions/0.8.0

cc @isoos

Works for me (goes to the version pages). What's the expected behaviour?

Oh, yes they do work, not sure why I thought they did not

authors: isoos mit-mit

repo: dart-lang/pub-dartlang-dart


text:
Document asynchronous order of operations.

This issue was originally filed by amouravski@google.com

I'm never sure if runSync is before Future.sync, etc. The documentation should be clear about how multiple Futures work together.
This should be in the doc comments of the async library.

The docs for dart:async link to a few pages, including https://webdev.dartlang.org/articles/performance/event-loop which I think does a good job at explaining ordering.

authors: DartBot natebosch

repo: dart-lang/sdk


text:
Future<> is not obvious in error messages.

PTAL: https://dartpad.dartlang.org/8abfbf860a09aa2bc8d2
Map<String, String> demo() async {
  return null;
}

gives
The return type Future<<bottom>> is not .....

I understand why the argument is being made that null has the type '< bottom >' - but I'm not sure that all of our users have read Pierce. How awful would it be to conflate the value and the type of the value in this specific case?
The return type Future<<null>> is not .......

Further is there a reason why we're overloading the syntax used for type parameterisation < T > to also describe what I presume are 'special' types? If there isn't a strong reason for it, then using another form here would seem advisable.
cc @gbracha in case this is case is too upsetting to even contemplate further.

Future<<null>> should probably be Future<Null>. The bottom case could be written as Future<dynamic>, which captures the fact that we don't actually know a type.

So Future makes perfect sense, but yes, I agree most Dart programmers are not comfortable with TAPL and should not have to be.  Future would do nicely. Future unfortunately is not useful for anything, since the type of null is Bottom rather than Null.

I think this has gotten much better. Current error is "Functions marked 'async' must have a return type assignable to 'Future'."

authors: gbracha lrhn lukechurch natebosch


text:
Negation of a void value produces no error

This code produces no error with the analyzer:
void voidValue = false;

void main() {
  if (!voidValue) {};
}

cc @MichaelRFairhurst

Good catch, Leaf!
Should we put this in dart2stable so we can try to report this by then?

Lower priority than other fixes, probably not a blocker.

Yes, this should be an analyzer and CFE error.  I have no expectations one way or the other about what the VM does with invalid code.

cc @dgrove - I think this needs to be in Dart2Stable since it will break otherwise working code.


text:
Migration tool should issue a big warning if it ever generates null!

The expression null! is guaranteed to fail at runtime.  So if the migration tool ever finds itself generating that expression, it should issue a big warning to the user.

We now have a hint for n! where n has static type Null. I think we can close this.