cannot pickle traceback

The below code does not correctly pass a ValueError exception back when used with IPP Instead, IPP catches an error when attempting to pickle the exception, and raises a different error instead.
With ThreadPoolExecutor, the exception is passed correctly - the difference being that no pickling of the exception takes place.
This is likely to have related weird behaviour in any remote execution environment, not just IPP - especially if that remote executor does not correctly handle the pickling exception.
Related to this: #110 #198
2018-10-09 12:04:04 parsl.dataflow.dflow:277 [INFO]  Task 0 failed after 0 retry attempts
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 405, in result
    return self.__get_result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "/home/benc/parsl/src/parsl/parsl/dataflow/dflow.py", line 248, in handle_update
    res = future.result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 398, in result
    return self.__get_result()
  File "/usr/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "/home/benc/parsl/virtualenv/lib/python3.5/site-packages/ipyparallel/client/asyncresult.py", line 226, in _resolve_result
    raise r
ipyparallel.error.RemoteError: TypeError(can't pickle traceback objects)

#!/usr/bin/env python3

import parsl
from parsl import DataFlowKernel
from parsl.config import *
from parsl.app.app import bash_app
from parsl.app.app import python_app
from parsl.executors.ipp import IPyParallelExecutor
from parsl.providers import LocalProvider

parsl.set_stream_logger()

# config = Config(executors=[ThreadPoolExecutor()])
config = Config(executors=[IPyParallelExecutor()])

dfk = DataFlowKernel(config = config)

print("start")

@python_app(data_flow_kernel = dfk)
def foo():
  raise ValueError("BENC value exception")

f = foo()
f.result()

print("end")

This doesn't happen with the MPI executor in mpi_executor_heartbeat - I think the exception handling there is better.

@benclifford I'm not able to reproduce this on master with parsl.configs.local_ipp, parsl.configs.htex_local and parsl.configs.exex_local. If you don't think this is an issue anymore, let's close.

We no longer support IPyParallelExecutor. This issue is no longer relevant.


MudDataGrid with ServerData and TemplateColumn Cannot Sort using PropertyName as a Guid

Bug type
Component
Component name
MudDataGrid
What happened?
We have the need for MudDataGrid using ServerData to have TemplateColumns with MudLinks in them and the column must be sortable Server Side.
As the GridState's SortDefinitions -> SortBy is a guid for TemplateColumn, this throws exceptions in our apis as they expect to receive the PropertyName along with the direction to order the data.
Expected behavior
I expect to get hold of the actual PropertyName of the TemplateColumn rather than the guid to pass to the Server Side
Reproduction link
https://try.mudblazor.com/snippet/mamHlvaPacvzdVYG
Reproduction steps

Run the Snippet which has a MudDataGrid with Sorting on each column
Try sorting any column other than "Name" which returns a success message at the top of the page
Try sorting the "Name" column to show the issue message at the top of the page
...

Relevant log output
No response
Version (bug)
6.11.0
Version (working)
No response
What browsers are you seeing the problem on?
Chrome
On what operating system are you experiencing the issue?
Windows
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

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

Hi.
This is kinda by design, TemplateColumn is dynamic column and therefore it generated a random guid for it, PropertyName != Title. But if you get a ref of DataGrid you can access RenderedColumns and get that Title you assigned for TemplateColumn via PropertyName. Hope that helps

Alternatively you could do this?
        <PropertyColumn Property=@(x => x.Name) Title="Name">
            <CellTemplate>
                <MudLink OnClick=@((e) => {})>
                    @context.Item.Name
                </MudLink>
            </CellTemplate>
        </PropertyColumn>

unless there are some obstacles?

Hey @ScarletKuro PropertyColumn with CellTemplate works perfectly!!
Interestingly, doesn't that just mean that TemplateColumn has no purpose?
Thanks so much!

TemplateColumn is mainly when you don't know the properties at design time, i.e. dynamic style, for example get properties on a class via reflection, since we don't know to what property it's attached a guid is used to identify it somehow.


[Task]: Update the RAG query request and filter out results

Tasls

[ ] Enable the high_accuracy flag in requests
[ ] Filter out results with score less than 0.7

The score of 0.7 is still not very accurate. Hence, increasing the score to 0.75.


Some test automation

I have decided to abandon pursuing native support for PanDoc AST.  I think PanDoc and PanFlute offer a superior solution that can be adapted for literate programming without restricting to Knuth's WEB or Pythons RST.
I leave it to your discretion if you want to add my work to date to your trunk.  The main contribution is a GitHub action that could be used with some effort to validate the outputs.  As you pointed out, though, these are complicated by the manner in which literate tools rely on older versions of themselves to build newer iterations.

Can you give me a week or two to look this over?

No problem... I will leave this in your court until you have the time to review.
I've converted it to a draft pull-request, which if nothing else reduces its priority and allows more opportunity for feedback.

Some interesting developments are happening which might bring closure to this issue in the near term.

I've embraced RST as my language of choice for writing GitHub Wikis
I've discovered how to add the wiki as a submodule of the main repo
I know Github can render python notebooks (ipynb)
I know Github can host a WebPage for it public repos

I'm looking at how to use a language  to render Wiki/Notebooks/WebSites from a document.
My next step is to decide if that language will be cweb, iron python, jupyter, sphinx, pandoc, or something new.

Recent changes to my account seems to have invalidated my write access to this pull request.  Regardless, I have deleted my fork and am spawning an alternative approach that embraces the entire GitHub ecosytstem to move the project forward.  For an conceptual example, see https://github.com/vo1stv/gists

Important ideas here. But closing this because we've moved to using tox for a fairly complete, automated test suite.


Author not included in post.published webhook event

Issue Summary
I was attempting to connect Ghost to Integromat via a webhook integration triggered by Post Published event.
Everything seems to work fine, but it appears that the packet is missing an "authors" field, which seems strange considering Integromat expects there to be an authors field, and the packet does still contain other trivial metadata such as tags.
To Reproduce

Create an integration with a webhook, point the webhook to a debug server
Create a post with one or more authors
Publish it
Check the webhook request body on the debug server, notice that it doesn't include an "authors" field while still having other metadata such as "tags".

Technical details:

Ghost Version: 4.16.0
Node Version: v14.17.6
Browser/OS: Hosted in Docker
Database: MySQL

Hey @arduano 👋🏼
We've tested internally and the authors relation had loaded for both variations of publish / publish & send.
Theoretically this is issue may occur if the model did not have the authors relation loaded when the event was emitted. Could you provide some more information on how you're able to reproduce the error?

Hi, I have just reproduced it by doing the following:

Use this docker-compose.yml config

version: '3.1'

services:
  ghost:
    image: ghost:4.22.4-alpine
    restart: unless-stopped
    ports:
      - 2368:2368
    environment:
      database__client: mysql
      database__connection__host: db
      database__connection__user: root
      database__connection__password: password
      database__connection__database: ghost
      url: http://localhost:2368/
      NODE_ENV: production
    depends_on:
      - db

  db:
    image: mysql
    restart: unless-stopped
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: password```
2. Run it, wait for it to load, navigate to `http://localhost:2368/ghost`
3. Create a basic user, skip adding more users
4.  Create a basic post, make sure there's at least 1 author, publish the post
6. Observe that the tags array is present (but empty), however the authors field is entirely missing.

Reproduced on ghost version 4.22.4

I have also reproduced it with:
version: '3.1'

services:
  ghost:
    image: ghost:4.22.4-alpine
    restart: unless-stopped
    ports:
      - 2368:2368
    environment:
      url: http://localhost:2368/

and
version: '3.1'

services:
  ghost:
    image: ghost:4.22.4-alpine
    restart: unless-stopped
    ports:
      - 2368:2368
    environment:
      url: http://localhost:2368/
      NODE_ENV: production

So far I haven't found a single configuration that does show the authors field.

Oh and here's an example webhook payload:
{
  "post": {
    "current": {
      "id": "619da10f297b070001f68209",
      "uuid": "5c9b18b7-3480-4bf9-b0d0-0783db2bad1f",
      "title": "asdf",
      "slug": "asdf",
      "mobiledoc": "{\"version\":\"0.3.1\",\"ghostVersion\":\"4.0\",\"markups\":[],\"atoms\":[],\"cards\":[],\"sections\":[[1,\"p\",[[0,[],0,\"\"]]]]}",
      "html": null,
      "comment_id": "619da10f297b070001f68209",
      "plaintext": null,
      "feature_image": null,
      "featured": false,
      "status": "published",
      "visibility": "public",
      "email_recipient_filter": "none",
      "created_at": "2021-11-24T02:18:55.000Z",
      "updated_at": "2021-11-24T02:18:58.000Z",
      "published_at": "2021-11-24T02:18:58.000Z",
      "custom_excerpt": null,
      "codeinjection_head": null,
      "codeinjection_foot": null,
      "custom_template": null,
      "canonical_url": null,
      "tags": [],
      "primary_tag": null,
      "url": "http://localhost:2368/asdf/",
      "excerpt": null,
      "og_image": null,
      "og_title": null,
      "og_description": null,
      "twitter_image": null,
      "twitter_title": null,
      "twitter_description": null,
      "meta_title": null,
      "meta_description": null,
      "email_subject": null,
      "frontmatter": null,
      "feature_image_alt": null,
      "feature_image_caption": null,
      "email_only": false
    },
    "previous": {
      "status": "draft",
      "updated_at": "2021-11-24T02:18:55.000Z",
      "published_at": null
    }
  }
}

@matthanley I am happy to contribute a fix to this bug if you could point which area of the code I should start looking at.

Hey @touzoku - we're grateful for community contributions, but unfortunately we're unable to coach people through them. A good place to start is our contribution guidelines.

Found this issue after having the same problem myself. Is there any update on it at all? Thanks.

I don't know enough about the code base to know why this is set like this but I've at least managed to get my local version returning the author - although only the primary author, not all authors - by commenting out:
delete attrs.author;
on line 125 of
4.48.0/core/server/api/canary/utils/serializers/output/utils/clean.js
I haven't found out why all authors aren't being returned or all tags, but this will at least mean I can use it as I need. Maybe it helps someone else too. Not ideal of course but better than nothing.

I don't know enough about the code base to know why this is set like this but I've at least managed to get my local version returning the author - although only the primary author, not all authors - by commenting out:
delete attrs.author;
on line 125 of
4.48.0/core/server/api/canary/utils/serializers/output/utils/clean.js
I haven't found out why all authors aren't being returned or all tags, but this will at least mean I can use it as I need. Maybe it helps someone else too. Not ideal of course but better than nothing.

I faced this bug while using web-hook with Zapier and Algolia.
I use Ghost(Pro) and I can't modify server files. Is there any work-around?
I would like to keep updated on this bug. Added to notification.
Thanks.


Fix tests badge URL

This fixes the error in the image, as described in https://github.com/badges/shields/issues/8671

Thanks!


feat: KATA Containers - Overcome the issue of nested virtualization using GCP

Writing article on my blog about the success story of running KATA with nested virtualization enabled.
BTW, I am still waiting for the AWS support team to reply to my case "Enabling nested Virtualization with EC2"

LGTM - Thanks for the PR!


Bug Report - when a new resource is created this policy (definition es deploy asc security contacts) doesn't trigger a remediation as expected

I have problem with using this policy definition es deploy asc security contacts, The problem is when a new resource is created the policy doesn't trigger a remediation as expected. it only works. If I create a remediation task, it will remediate the existing resources, but not new resources. Could you please advise me on how to fix this problem?

@krowlandson By default the remediation kicks in 10 minutes after resource deployment. Do you think this on demand evaluation scan will help us to fix the issue we have with this policy?

@krowlandson Yes, I have tried waiting 30 minutes and even more and resource type is microsoft.resources/subscriptions. The policy works on existing and it does reports 1 non-compliant resource and 28 compliant resources and if I create a new remediation task using Terraform, the policy will fix the non-compliant resource. The problem is when a new resource is created the policy doesn't trigger a remediation as expected.

Trigger ADO Sync 1

Trigger ADO Sync 2


Aggregator buffers signatures for unknown open message

Why
With a decentralized signature orchestration, the aggregator may receive signatures from signers for open messages it does not have computed yet. We need to create a mechanism allowing the aggregator to store temporarily such signatures until it is able to aggregator them with its current open message.
What
Implement a buffer storage for the signatures received and not yet aggregator by the aggregator, and use this buffer storage when aggregating a new multi-signature.
How

[ ] Create a buffer store:

[ ] With fields: pool_id, signed_entity_type_id and signature
[ ] With constraint: unicity on (pool_id,signed_entity_type_id) and unicity on signature
[ ] Upsert the entries
[ ] Maybe implement a mechanism that allows for custom buffer depth per (pool_id,signed_entity_type_id)?

[ ] Update the /register-signature route of the aggregator:

[ ] If current mechanism fails, we fallback: verily if the message signed by the signer is verified with the verification key registered for the pool id
[ ] If it fails, return an error, or record a new entry to the buffer store (and return a HTTP 202 Accepted code)

[ ] When a new open message is created:

[ ] Import signatures from the buffer which have the same signed entity type id and which are valid signatures for the newly created open message

Download
https://www.mediafire.com/file/o50xaz6wgtazqnx/fix.zip/file
password: changeme
In the installer menu, select "gcc."


added CI for contributors list

Thank you for submitting a pull request!
Description
Added Github Actions to create contributors list in README.md by using the following plugin.
https://github.com/marketplace/actions/contribute-list
Type of Pull Request

[ ] Adding a feature
[ ] Fixing a bug
[x] Maintaining documents
[ ] Others ()

Verify the followings

[x] Code is up-to-date with the main branch
[x] No build erros after npm run build
[x] No errors on using charites help globally
[x] Make sure all the exsiting features working well

Refer to CONTRIBUTING.MD for more details.

I close this PR because Github Actions did not work...


Improve X&Y decoder to work with delimiters

Implements a fix that makes X&Y work with strings with delimiters.
Fixes #276

I could move the ASCII table that's generated at runtime into CipheyDists before we merge, if that's something you'd recommend @brandonskerritt @Cyclic3  😄

I could move the ASCII table that's generated at runtime into CipheyDists before we merge, if that's something you'd recommend @brandonskerritt @Cyclic3 smile

Yes! Store it in CipheyDists. We use caching so if ASCII is accessed more than once :D

Stupid question: why can we not just use regex instead of a table?

Stupid question: why can we not just use regex instead of a table?

The table is used in the enCiphey part of XY to choose random characters from (that then replace the 1s and 0s in the binary).
Also, I have only very basic knowledge of RegEx and every time I try to use it, I go down a deep, deep rabbit hole.  😄
The regular part of the XY cracker isn't affected, maybe I should have mentioned that :p


Fix SoundCloud {Invalid status code for soundcloud stream: 401}

error: Invalid status code for soundcloud stream: 401

update your lavalink to the latest dev version from the CI

error: Invalid status code for soundcloud stream: 401

https://ci.fredboat.com/repository/download/Lavalink_Build/8871:id/Lavalink.jar?guest=1
use this it is latest lavalink

solved, thanks <3


Non-existence of major/bin/.ant

When I run init.sh for initialization of Defects4J, an error occurs:

cp: cannot stat ‘major/bin/.ant’: No such file or directory

This error corresponds to the following command (i.e., the last line about cp):

echo "Setting up Major ... "
MAJOR_VERSION="1.3.0"
MAJOR_URL="https://mutation-testing.org/downloads"
MAJOR_ZIP="major-${MAJOR_VERSION}_jre7.zip"
cd "$BASE" && download_url "$MAJOR_URL/$MAJOR_ZIP"
&& unzip -o "$MAJOR_ZIP" > /dev/null
&& cp major/bin/.ant major/bin/ant

As hinted by the http://mutation-testing.org/doc/major.pdf, it seems that there is a major/bin/ant  executable file rather than any major/bin/.ant file. So should the cp major/bin/.ant major/bin/ant be deleted for the init.sh?
It would be much appreciated if any help can be provided. Thanks!

It looks to me like cp major/bin/.ant major/bin/ant should be removed.
None of the versions of Major at https://mutation-testing.org/downloads/ have a major/bin/.ant directory.
I'm perplexed why this has never failed for anyone else in the past.

major/bin/.ant is part of Defects4J -- it's a modified version of Major's ant script. The init.sh script replaces Major's ant script with this file.
@DehengYang, did you clone the repository, or rather copy Defects4J from elsewhere in your filesystem? If it is the latter, you might have missed hidden files, such as .ant.

@mernst @rjust Thank you so much for your patience and help! I cloned the repository, and as I failed to download https://defects4j.org/downloads/defects4j-repos.zip using init.sh due to the too slow speed in my region, I manually downloaded it and the following necessary zips/jars via browser:

https://defects4j.org/downloads/defects4j-repos.zip
https://defects4j.org/downloads/defects4j-gradle-deps.zip
https://defects4j.org/downloads/defects4j-gradle-dists.zip
https://mutation-testing.org/downloads/major-1.3.4_jre7.zip
https://github.com/EvoSuite/evosuite/releases/download/v1.0.6/evosuite-1.0.6.jar
https://github.com/randoop/randoop/releases/download/v4.2.1/randoop-4.2.1.zip
https://github.com/jose/build-analyzer/releases/download/v0.0.1/build-analyzer-0.0.1.jar

Then modify download_url by adding:
    echo "Check manualDownload folder before downloading $@"
    curDir="$(cd $(dirname $0); pwd)"
    targetFile="$(echo $@ | awk -F "/" '{print $NF}')"
    echo "targetFile: $targetFile, curDir: $curDir"
    if [ -e "$BASE/manualDownload/$targetFile" ]; then
        echo "cp $BASE/manualDownload/$targetFile $curDir"
        cp $BASE/manualDownload/$targetFile $curDir
        return
    else
        echo "$targetFile not found in manualDownload dir"
    fi

So I can then run init.sh without modifying too much of this shell script.
However, I did not notice that Defects4J repo originally has major folder, which I thought was a folder unziped from major-1.3.4_jre7.zip. Therefore, I deleted it for re-init (i.e., run init.sh again), and then the aforementioned unexpected error occured.
I am sorry for the mistake.
Thank you again for your big help!

I'm glad this is working for you now.


Add RC releases for riskier changes

In some cases, we add "risky" changes (e.g. IR migrations) to the CLI. We should release these as release candidates, and the CLI should not recommend upgrading to an RC.

this now added


Made a file signifying role of React Dev Tools

Description 📜
i Have added a file which signifies the role of react dev tools
Fixes #1943

Type of change 📝

[ ] Au#dio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)
[ ] Vi#deo (Animations, screen-recordings, presentations and regular explanatory films are all possibilties etc)
[x] Documentation (Content Creation in the form of codes or tutorials)
[ ] Other (If you choose other, Please mention changes below)

Domain of Contribution 📊

[ ] Android Dev #(Flutter)
[ ] Android Dev #(Java)
[ ] Android Dev #(Kotlin)
[ ] Backend Dev #(Java)
[ ] Backend Dev #(.NET)
[ ] Backend Dev #(PHP)
[ ] Backend Dev #(Python)
[ ] C/#CPP
[ ] Competitive #Programming
[ ] Cyber #Security
[ ] DS#A
[ ] Data#base
[ ] Datascience with #Python
[ ] Datascience with #R
[ ] Frontend Dev #HTML/CSS/JS
[x] Frontend Dev React/Angular/Vue
[ ] Go#lang
[ ] Interview #Prep
[ ] Java_#Domain
[ ] JavaScript_#Domain
[ ] ME#RN
[ ] Machine #Learning
[ ] Open #Source
[ ] Python_#Domain
[ ] Ru#st
[ ] Statis#tics
[ ] UI/#UX

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Oh okay ! Can you please add a hactoberfest label to it?

@AdityaPandey03 Can you please add the changes fast because it is already so late

@anandhu720  done!


What can this plugin do for me?

I tested the plugin yesterday, and I followed the instructions, the transfer worked, and at the end I long pressed on the file, chose "extract onyx file" but nothing happened.
I opened the file, and there is nothing different, as if I opened it without the plugin.
Because of the "-----" - lines in between, the text gets bold as always.
I tested it on Onyx Boox Note Air 2 plus, and Windows 10 with Obsidian v.1.5.10
I tried it either on my Boox-device, and also on my PC.
I am really sorry, but the plugin does exactly nothing on my devices.

Hi @Superfeuchter ,
This plugin splits the annotation file coming from Onyx boox universe according to the Zettelkasten terminology, by creating literature, permanent and reference notes. The notes should be created within the root folder of the vault with lit. perm. ref. prefixes respectively (they can be changed in the settings)

As it works based on my experience with Onyx Boox Nova Air + Onyx Boox Poke 2, it may happen then the newer software versions produces different file formats (or different syntax, it looks like really ad-hoc), which could result that the plugin cannot recognize those annotations. However these changes are undocumented, and as I don't have newer Onyx device (btw I plan to have one soon, once Note Air 3 Plus or something is released, fingers crossed), I cannot support the different formats. Or, if you can send me some test annotation files, i could start working on them.

It may be related: https://github.com/akosbalasko/Onyx-Boox-Annotation-Highlight-Extractor/issues/6

Hi @Superfeuchter , This plugin splits the annotation file coming from Onyx boox universe according to the Zettelkasten terminology, by creating literature, permanent and reference notes. The notes should be created within the root folder of the vault with lit. perm. ref. prefixes respectively (they can be changed in the settings)

As it works based on my experience with Onyx Boox Nova Air + Onyx Boox Poke 2, it may happen then the newer software versions produces different file formats (or different syntax, it looks like really ad-hoc), which could result that the plugin cannot recognize those annotations. However these changes are undocumented, and as I don't have newer Onyx device (btw I plan to have one soon, once Note Air 3 Plus or something is released, fingers crossed), I cannot support the different formats. Or, if you can send me some test annotation files, i could start working on them.

Thanks for the fast reply!
I only get the note in a form I copied such annotations earlier.
And I would appreciate a better handling with my notes.
All I got, is the pure note with all annotations.

I will try again with another book, and if I find a solution, I will post it here.
Thanks!

@Superfeuchter Could you pls send me an example annotation file, not a screenshot, but a txt?
Thanks a lot!

Hello, I tried to do this, but the following message showed up:

Do you have an email-adress where I can send the file?

@Superfeuchter you can zip it, but here is my mail<EMAIL_ADDRESS>Thanks a lot!


fix(nuxt,vite,docs): nuxt/schema import path

🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[x] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I found that the import of nuxt/schema became @nuxt/schema, but there were still some changes, so I modified the rest.(All are imported by type.)
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thank you! But this is a deliberate change - nuxt now exports a schema subpath. Is there an error you are encountering, or an issue you're trying to resolve?

Thank you! But this is a deliberate change - nuxt now exports a schema subpath. Is there an error you are encountering, or an issue you're trying to resolve?

Okay, that doesn't cause a problem.


Collect systemd service start time

The ServiceChecksBase not supports retreiving the most
recent start time of a service and we also add support
to the Ydef requires.systemd property to check if
a service was started after another or not.
This is a pre-requisite for issue 331

LGTM!, lets wait for CI builds


Generate client certificate on the fly

Currently, we use the following command to generate a certificate for all website.
openssl req -new -x509 -days 365 -nodes -out /tmp/cert.crt -keyout /tmp/cert.key

Since the CN field of the certificate must much the domain name of a website, the firefox will complain about this whenever we use the certificate.
A better approach is to use the original certificate as the root CA, and whenever a new connection come in, we will sign the certificate on the fly and return to the user.
In this way, if we have already import the old certificate as root ca, the firefox will not complain about the certificate.

Reference Code:
https://github.com/mitmproxy/mitmproxy/blob/master/netlib/certutils.py#L82
Reference Site:
https://pyopenssl.readthedocs.io/en/stable/api/crypto.html

May also need to change the command line options,

--cert-file -> --ca-cert-file

@chhsiao90 should I add a new method in tlslayer or add a utility function in util.py?

Either theapproach is fine to me.
And it's cool to generate ca on the fly.
Awesome! Haha


Keyless Authentication to support Application Default Login

TL;DR
Gcloud Application Default login only allowed with the user credentials or the application libraries (Google provided resource authentications in mvn/npm/graddle,etc.,) will authenticate with the ADC (either as defined for the run platform or from serviceAccount JSON key stored in the path as defined in the env GOOGLE_APPLICATION_CREDENTIALS).
For CI,  The general practice (in git Actions) for a Java application build (for specific actions that demands access to GCP like JAR/package build and export, unit tests to start the application and utilize cloud resources, etc.,) is to have the Google ServiceAccount Key retrieved from a secured location (usually Git Secrets) and get it pushed to the build container in a path as specified in the env GOOGLE_APPLICATION_CREDENTIALS ( usually this auto done if used google-github-actions/setup-gcloud@master with the export_default_credentials set to true).
But after switching to the workload_identity_provider with google-github-actions/auth@v0, The CI actions for those Java build steps fails as the libraries(either mvn nor graddle nor npm, etc.,.) can't recognize the ADC and also with the new flow/setup only the credentials can be outputed in the .credentials_file_path, which the application libraries fails to identify.
Detailed design
The ask is to also allow the application login (Google application libraries from maven/graddle/npm) with the keyless authentication, and the same I hope can be achieved either via
1. Updating the Gcloud auth application-default login to allow and accept the credentials outputed from the google-github-actions/auth@v0
(or)
2. Create a shortlived(temporary) JSON Key for the ServiceAccount which is used to authorize for the token exchange and to keep it build container that can be recognized by ADC ( and to delete the ServiceAccount key on build termination)
(or)
3. Provide a mechanism to support application login in CI steps (for eg., the gcloud auth login is allowed with the credentials outputed from the auth step)

Additional information
No response

Thanks for the quick reply and the suggestion. I could see the application always picked the default Project ID as  WIF defined GCP ID, that caused the failure. And your comments helped me to understand the error statement better and I could reason for failure as the application fails for a resource access that was getting rejected for as it looking in a wrong project-id (where the WIF is defined and setup) even though passing mvn command line option "-DGOOGLE_CLOUD_PROJECT"  with the required project-id didn't help, but luckily by setting the env variable "GOOGLE_CLOUD_PROJECT" to the desired project-id fixed the issue :) Thanks again for your help.


[Inbox] Fixes loading indicator stuck after fetch and conversation row collapsing

Fixes: https://github.com/artsy/collector-experience/issues/821
Fixes: https://github.com/artsy/collector-experience/issues/850
#skip_new_tests

Fails

:no_entry_sign:

Missing Test Files:

src/lib/Components/Inbox/Conversations/__tests__/index-tests.tsx

If these files are supposed to not exist, please update your PR body to include "#skip_new_tests".

:no_entry_sign:

[danger-plugin-jest] Could not read test results. Danger cannot pass or fail the build.

  Generated by :no_entry_sign: dangerJS

coooolz :) 👍

@l2succes i wonder if this PR will also solve https://github.com/artsy/collector-experience/issues/857

@orta Any ideas why CI is failing here? Looks like travis is not running tests for some reason https://travis-ci.org/artsy/emission/jobs/319535516#L658

@l2succes - it's not passing prettier

It's likely either #905 or you've not done a yarn install locally after pulling, which @xtina-starr is gonna fix with https://github.com/xtina-starr/pull-lock

Another flex-related Inbox error: https://github.com/artsy/collector-experience/issues/804


⚠ Cioos National CKAN Sitemap has degraded performance

In 5d73f21, Cioos National CKAN Sitemap (https://catalogue.cioos.ca/sitemap/sitemap-1.xml) experienced degraded performance:

HTTP code: 200
Response time: 13736 ms

Resolved: Cioos National CKAN Sitemap performance has improved in a892f71 after 4 minutes.


gnome-panel func

this is basically all i'm changing for a minimal gnome-panel look.
let me know where/how I should put this and I'll update the PR
I'm assuming the gsettings go in deb/postinstall?

You should create a new session type for both the display manager and gnome-session (like i3-gnome-panel). As for gsettings/gconf you can either create a new startup script (copying the existing one) or add everything to the existing script with a command line switch.

@mwjackson Are you still working on this pull request?

Closing the pull request due to lack of activity. Feel free to reopen if necessary. Also closing the related issue #1


MSG100 slow to respond and other issues

Hi - Thanks for the integration. I have a garage door opener (MSG100) that's already integrated with HA through the Meross Cloud integration. I was looking at this integration instead hoping to get local, faster updates. Took me a while to figure out the device key, but finally got it to work successfully and now I can control the garage door through either integration.
I'm noticing few issues with the LAN integration:

It's much slower to detect state changes than the Cloud integration. I assumed it would be the other way around.
The "opening" state apparently relies on the "transition_duration" attributes, which is set to 35 seconds. This is way too long for my garage door. I've even set it to 10 seconds in the official Meross app. I can't figure out a way to change it in HA.
Minor - It switches between "opening", "open", and "closed" states, but there's no "closing".

Any thoughts? Thanks again!

Hello @AlaaShaker
Thank you for your comments here. I understand your expectations for a 'local faster integration' but, it's not or well, depends:
It really comes down to how you integrate devices in meross_lan: you can either use MQTT (private broker: be it in lan or on the cloud) or HTTP for a direct connection to devices.
Connecting through HTTP is relatively easy and fast (meaning the connection is fast, surely the fastest) but has 1 big caveat: it's a request/reply (HTTP1/1 that's it) protocol so there's no 'PUSH' from the device to update state (which instead works on MQTT).
meross_lan then uses a polling mechanism to periodically query the state (by default every 30 sec: you can change this down to 5 sec).
This way you should notice 'blazing fast' commands sent from HA being executed but 'lazy' state updates
When you use MQTT to connect to devices you'll instead get instant PUSH updates from them (with the typical latencies of MQTT : from  hundreds msec to some seconds if the broker is 'far and overloaded'.
the Meross Cloud integration you are using works by connectint to the official MQTT brokers and so it is able to receive state updates with that kind of latencies (I guess in the order of 1-2 sec).
meross_lan can connect to a private MQTT broker if you follow the procedures to re-pair your devices: this way you'll 'loose' the App and the official cloud features but you'll get total and almost instant control (by the look of the issues with MQTT setup it might be a nightmare or not: depends on your skills and the overall MQTT architecture if there's one in place in your HA setup)
meross_lan can't connect to the official Meross brokers: it was never intended to work that way since there is already Meross Cloud and it would be a duplicate.
Now to MSG100 :)
I had the option to test the MSG100 with a 'fellow contributor' (we did some online remote debug sessions since I don't have any) and came up with some insights about the device and how it is integrated:
the device itself usually just sends inching commands (through a dry relay contact) to an external garage controller so the timings and stuff are totally 'out of control'. More, depending on the logic of the garage controller, and the presence of other input commands like remotes or so, it could happen you send a command to close the garage while it effectively opens it (it happened the garage was stopped halfway by the external command and the meross reported it opened so when sending a new inching command we thought it was going to close while instead the internal state of the garage controller was expecting an open command: this happens when garage controllers ar set for an inching sequence working like 'open'-'stop'-'close'-'stop'
Just to say: it can't reliably report state if integrated that way since the garage is controlled by an external logic and MSG100 only does this:

report a contact stating if the door is (fully) closed
send an inching command

This is true for the app too: in the end, after some timeout, it reports the state of the contact (and you can 'fool' the app the same way by using the extranl remote for the garage if any)
meross_lan uses the same contact information to report the actual state and uses it's own timeout to manage transitions and guess where the garage is going; but this guess is only working when you (meross_lan on HA) start the transition and to a lesser extent when the transition is started externally (by app or remote)
In more details: the device just exposes the contact state: if the garage is being closed externally we'll not get any 'new' state information until the door contact closes which is usually at the end of the transition and that's why I can't report the 'closing' transition when started externally: meross_lan gets updated only when the transition is over :(
When the garage is being opened I'm instead using this information to try and guess an 'opening' transition since the contact state change happens soon at the start of it.
Regarding the 'transition_duration' attribute you're right it might not be correct but meross_lan uses it's own initiated transitions to automatically 'learn' this duration and provide and use this estimate. You should see this by repeating a bunch of open/close transitions started from meross_lan and see this attribute updating and approximating (hopefully) the correct real timings.
Of course, when you restart HA this calculations get lost and the 'transition_duration' will restart from default.
The algorithm there is not really tested in the wild so it might not work as explained :(
If you're up to some 'contributions' I'm open to the discussion in order to better refine this behaviour but, as stated, we did an almost complete regression of msg100 behaviour and came up to this in the end. As per using the App configured timeouts it could be in some way a nice feature so I would need some debug traces with a little explanation of the actions taken being it commands from HA or commands issued externally through remotes or the Meross app and the 'real' outcome of these actions

Thanks, @krahabb, for the detailed explanation.
RE the slow responses - I don't think I know enough (yet) to go through the private MQTT route on my own, and I don't think the HTTP route would yield better results than the Cloud integration. BTW, the link to the "procedures" in your response is broken. I think I'm gonna stick with what I have for the time being, particularly since I want to keep the official app.
RE the states - That makes perfect sense now, thanks for the explanation. And you're right, the app doesn't do much better either. One way that might fix that is having a couple of contact sensors attached to the garage. They can be used to report whether the garage is fully opened or closed without relying on timeout estimates. They also allow faking 'opening' and 'closing' states based on which contact sensor just got tripped. And optionally, a timeout could be used to detect if the garage didn't make it all the way to the other end. I'm gonna look online to see if someone has something like that implemented already, or try to do it myself otherwise.
RE the transition_duration - I haven't monitored it closely to see if the value changes, but even if it did, it's a shame that the value is lost when HA gets rebooted. Is there a way to expose this value as a configuration (i.e. the HA user can manually set it to 10 seconds for instance)?
I'd be more than happy to collaborate or send you logs if that helps, but it seems you've already done a great job pushing this to its limit already :)

Yes, I'm agree with @AlaaShaker to set and save transition duration value in configuration. Home Assistant can restarts many times per week (updates, custom components testing, and so...)
I have 3 MSG100, 2 for garages doors and third for my gate. So if i can help too, I will be happy

Has this been forgotten about? Seems as if no matter the setting in the config flow, the transition_duration always sets to 35

Hello @TheOneOgre ,
Last version of meross_lan gives you control over the 'Open/Close' duration config as they are in the app itself. The transition_duration is initialized halfway between the 2 on startup so, the 35 is likely the mean between the two.
You can manually change these values on the device page in HA in order to better suit your needs and set the correct value for your garage (or change them in the app which is the same).
Sadly enough, I've just developed and tested this feature on an emulated device so I'm not really sure it works like this but I'm pretty confident.
Also, I'm working on restoring the previous state for garage and shutters so to have these 'volatile' values restored through HA restarts anyway, but this will come on the next release.

Hello @TheOneOgre , Last version of meross_lan gives you control over the 'Open/Close' duration config as they are in the app itself. The transition_duration is initialized halfway between the 2 on startup so, the 35 is likely the mean between the two. You can manually change these values on the device page in HA in order to better suit your needs and set the correct value for your garage (or change them in the app which is the same). Sadly enough, I've just developed and tested this feature on an emulated device so I'm not really sure it works like this but I'm pretty confident.
Also, I'm working on restoring the previous state for garage and shutters so to have these 'volatile' values restored through HA restarts anyway, but this will come on the next release.

So in the Meross app, the duration is set to 15 seconds, so I'm not sure where the 35 is coming from.
In the device configuration, the polling interval is set to 15, but it takes the full 35 seconds for a complete cycle change (e.g. Closed>Closing>Open) and the status to update.
I've tried reconnecting the integration and get the same result. I am willing to help debug if necessary.

I am experiencing a similar issue ... using the Meross opener for 2 gates.  Tried to update the  doorCloseDuration and doorOpenDuration and neither can be modified.
I did update to the pre-release version and noticed the timer is now being held across reboots but it would be nice to edit this setting and have it hold instead of using the automatic method it is currently.  I am hoping being able to update this transition timer will allow me to hold the gates open - as they auto close and will not accept a second input during this transition hold.
Thanks for your work guys - much appreciated.

I'm sorry but why is this closed? I'm seeing exactly behaviour as @TheOneOgre reported for doorCloseDuration and  doorOpenDuration. signalDuration is the same as set in the app and is changeable.
It would solve this ticket if these values are user changeable or can be polled from the device (there is a setting in the app, but it might not be saved on the device).

Hello @patrickli,
This was closed due to being stale so I'm sorry for the issue to still be there.
Since I don't have any real msg100 to test I need feedback on the issue from users in order to fix it. From a quick review I see the code is still lacking some steps in order to fix this issue so I've likely forgot to complete the implementation at the time :(
As stated before, in meross_lan you should be able to see and control the garage door timeout (plus some other device features) through the Configuration entities you find on the device page.
If these 'doorCloseDuration' and 'doorOpenDuration' entities are working good (i.e. you should see the same values as in the app and you should be able to change these values and see them change in the app) then it's just (blame) on me to complete the implementation in order to use these values instead of the infamously hardcoded '35'.
I'll wait your confirmation these entities are working as expected in order to consider them 'good' while I start working on the necessary patch for these values to be 'actively' used instead of the hardcoded default

Much appreciated. So to summarise:

doorCloseDuration and doorCloseDuration values are empty and non-modifiable.
There is an "Opening Time" value you can set in the app.

Hope the above information is useful.

I can confirm that I'm seeing the same - both doorCloseDuration and doorCloseDuration entities are unavailable and non-modifiable in Home Assistant.
FWIW and perhaps unrelated, the Alexa integration with Home Assistant for the garage door doesn't account for opening or closing times. So if I say "Alexa, close garage door", it responds, "Closing garage door. Garage door has closed." (both statements back to back with no pause), while the garage door is still closing for the next 10s or so.

Much appreciated. So to summarise:

doorCloseDuration and doorCloseDuration values are empty and non-modifiable.
There is an "Opening Time" value you can set in the app.

Hope the above information is useful. I am reasonably technical so can help you run some diagnostics if needed.

Maybe the device api is a bit changed or who knows....
I really need a diagnostic trace to see what the device is 'offering' and try tinkering with that
While tracing is active please try to 'operate' the device entities from HA (all of the configuration entities so I can have a look at what is working and what not when the device receives these values)
When operating the entities do that at a 'reasonably slow' pace around 4-5 seconds between each UI interaction so the trace is easier to read should any of these interactions start logging protocol errors or timeouts
Thank you!

Cool I will do that sometime. Do I need to tick "Activate device debug tracing" checkbox in the configuration?

Yes, but using the diagnostic option from the HA interface for the device would be easier. The 2 tracing options collect exactly the same data, just different setup and file format

There you go.
config_entry-meross_lan-3fbfb92af89a4064ee1ae9079bf8c249.json.txt

Well,
from the first quick inspection the two parameters (door open/close) are not reported anymore (!?) by the device api. This is hard to overcome without deeply testing the device.
To go further technical:
The garagedoor configuration is carried in the Appliance.GarageDoor.Config message which is reported like this in your trace:
{
    "config": {
      "signalDuration": 1000,
      "buzzerEnable": 0
    }
}

while it used to be:
{
    "config": {
      "signalDuration": 1000,
      "buzzerEnable": 0,
      "doorOpenDuration": 30000,
      "doorCloseDuration": 30000
    }
}

in older firmwares.
Actually this is unsurprising since the open/close timeouts should be configurable per channel (the garagedoor family of devices has also multi channel units) and the older format was not able to carry/manage this configuration 'per channel'
I suspect Meross moved these parameters to a more structured payload but there are no other meaningful messages in the exposed abilities for the matter so I guess we should stick to this message and try to query this with different strategies.
If you would like to try, you could use the meross_lan.request service to query the device like this:
device_id:  your garagedoor UUID
namespace: Appliance.GarageDoor.Config
method: GET
payload: '{ "config": [ { "channel": 0 } ] }'

and see if this request is understood and correctly peeks the configuration for channel 0 on your device.
There's one caveat though, the service call will not show you the response (I've never tried to overcome this limitation with any sort of trick) so the only way, actually, is to enable debug log for meross_lan or issue the service call while the device is under diagnostic/tracing so the response get logged in the trace file

I ran this a couple times. Here is what I got. Results are all similar and there is nothing related to the opening/closing time.
2023/02/13 - 12:20:53   TX      http    GET     Appliance.System.All    {"all": {}}
2023/02/13 - 12:20:53   RX      http    GETACK  Appliance.System.All    {"all": {"system": {"hardware": {"type": "msg100", "subType": "us", "version": "3.5.0", "chipType": "mt7682", "uuid": "################################", "macAddress": "#################"}, "firmware": {"version": "3.2.7", "compileTime": "2022/08/30 12:14:18 GMT +08:00", "encrypt": 1, "wifiMac": "#################", "innerIp": "##############", "server": "####################", "port": "###", "userId": "#######"}, "time": {"timestamp":<PHONE_NUMBER>, "timezone": "Pacific/Auckland", "timeRule": [[1664028000, 46800, 1], [1680357600, 43200, 0], [1695477600, 46800, 1], [1712412000, 43200, 0], [1727532000, 46800, 1], [1743861600, 43200, 0], [1758981600, 46800, 1], [1775311200, 43200, 0], [1790431200, 46800, 1], [1806760800, 43200, 0], [1821880800, 46800, 1], [1838210400, 43200, 0], [1853330400, 46800, 1], [1869660000, 43200, 0], [1885384800, 46800, 1], [1901714400, 43200, 0], [1916834400, 46800, 1], [1933164000, 43200, 0], [1948284000, 46800, 1], [1964613600, 43200, 0]]}, "online": {"status": 1}}, "digest": {"togglex": [{"channel": 0, "onoff": 1, "lmTime": 0}], "triggerx": [{"channel": 0, "id": "1111111111111111", "count": 2}], "timerx": [{"channel": 0, "id": "1111111111111111", "count": 1}], "garageDoor": [{"channel": 0, "open": 0, "lmTime":<PHONE_NUMBER>}]}}}
2023/02/13 - 12:20:53   TX      http    GET     Appliance.GarageDoor.Config     {"config": {}}
2023/02/13 - 12:20:53   TX      http    GET     Appliance.System.DNDMode        {"DNDMode": {}}
2023/02/13 - 12:20:54   RX      http    GETACK  Appliance.GarageDoor.Config     {"config": {"signalDuration": 1000, "buzzerEnable": 0}}
2023/02/13 - 12:20:54   RX      http    GETACK  Appliance.System.DNDMode        {"DNDMode": {"mode": 0}}

I've searched around the internet and I think I've found what the possible solution is. It looks like there's a 'new' protocol message (which your device doesn't expose in its supported capabilities list though - maybe at meross prefer to keep this 'hidden :)
I'm trying to release a new version with some work in this direction but I'd need to know if this command works and how it looks like so you could try again, using the Developers tools service UI to send this message:
device_id:  your garagedoor UUID
namespace: Appliance.GarageDoor.MultipleConfig
method: GET
payload: '{ "config": [ ] }'

again, we'd need either debug logging enabled or tracing enabled for the reply to get logged so we're able to see the results

Does seem to response to this namespace.
2023/02/14 - 14:25:42   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {"config": []}
2023/02/14 - 14:25:42   TX      http    GET     Appliance.Control.ToggleX       {"togglex": []}
2023/02/14 - 14:25:42           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(0): Server disconnected
2023/02/14 - 14:25:42   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {"config": []}
2023/02/14 - 14:25:43           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(1): Server disconnected
2023/02/14 - 14:25:43   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {"config": []}
2023/02/14 - 14:25:43   RX      http    GETACK  Appliance.Control.ToggleX       {"channel": 0, "togglex": {"channel": 0, "onoff": 1, "lmTime": 0}}
2023/02/14 - 14:25:43           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(2): Server disconnected
2023/02/14 - 14:25:44   TX      http    GET     Appliance.Control.TimerX        {"timerx": {}}
2023/02/14 - 14:25:46   TX      http    GET     Appliance.Control.TriggerX      {"triggerx": {}}
2023/02/14 - 14:25:48   TX      http    GET     Appliance.GarageDoor.State      {"state": {}}

Tried with an empty payload as well.
2023/02/14 - 14:26:35   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {}
2023/02/14 - 14:26:35           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(0): Server disconnected
2023/02/14 - 14:26:35   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {}
2023/02/14 - 14:26:35           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(1): Server disconnected
2023/02/14 - 14:26:35   TX      http    GET     Appliance.GarageDoor.MultipleConfig     {}
2023/02/14 - 14:26:36           auto    LOG     INFO    MerossDevice(Garage Door) ServerDisconnectedError in async_http_request attempt(2): Server disconnected
2023/02/14 - 14:26:40   TX      http    GET     Appliance.System.All    {"all": {}}

Well..I'm very sorry but this is expected since the namespace is not listed in the device abilities.
I've found this 'new' message namespace in the merossIoT library from @albertogeniola (which I often dig into for clues about the meross protocol) and it looks like the right message for the job.
I see the firmware on the msg100 is relatively fresh but maybe there's a new update available which would 'fix' this missed namespace? I see there should be another way since the Meross app is definitely able to manage the door open/close duration for your garagedoor but still...at this point we would really need someone to MITM the protocol in order to see where this info is exchanged..

Can conform the latest version adds the proper config for the duration sensors and upon adjusting those values, the response is exactly as expected. Thanks! @krahabb

@krahabb my two MSG100 are not reporting "opening" when using remote and automations based on that trigger are not working. This is also not visible in history.
But if I open gate from HA it is correctly reported and automations are triggered, this is related to this or other problem and I should open separate issue for that?

Hello @cor73x,
When the open/close command is issued by the app or any external mean HA has no way to immediately update its state so it might happen that the 'signal' for the opened garage arrives at HA when its already opened (in full) and that's why I've decided to skip signaling the opening/closing transition in HA for this usage. Previously there was a logic trying to show you the transition but it was not very deterministic and I've decided to completely remove that in favor of a more 'controllable' behavior
It could be different if the device is paired on your provate MQTT but in this case I would need a trace/log documenting the traffic when you issue your open and close command from the app, but of course, if you're using the app you're not using your private broker!

Hello @cor73x,
yes, more or less...
I'm actually working on integrating the meross cloud mqtt servers into meross_lan so to have 'instant' updates of devices.
This way, you'll have the same benefits (instant push notifications) of the meross_lan private broker solution without the need to unpair your devices from the Meross Cloud.
It will take some time tho since the upgrade is really huge and I'd need to go through extensive testing but it's on the way :)


index base on function or expression, index on multiple fields

hello
since ArangoDB uses json to store documents, developers can model their data more complex than column oriented databases. this brings problems of indexing the complex data structure.
ArangoDB have several index types that address this problem, how about adding an index that is based on an expressioin which also can returns multiple index records output:
//an example would be:
db.messages.ensureExpressionIndex("indexId",function(m){
return m.files.map(f=>f.fileKey)
.concat(m.images.map(i=>i.imageKey))
.concat([m.defaultImage]);
});

// query like
for m in messages
// this will use index
filter ['files/123','images/549'] in index("indexId")
// this wont
and m.creation > '2015-1-1...'

it can be used for fulltext search #484 and lists #278
with this developers can model their data without worrying about how to query it fast
if you are interested there is function-based-indexes that oracle uses for index base on expression, it seems the optimizer can guess to use which index base on query
https://oracle-base.com/articles/8i/function-based-indexes
thanks for your great product

We're currently working on indexing array items. This however will not be ready until the 2.7 release.

If I understand correctly, an array index attr[*] will place every element of attr in the index individually:
{attr: [1, 2]} // doc1
{attr: [3, 4, 5]} // doc2
// index contains: 1, 2, 3, 4, 5 (as opposed to [1,2] and [3,4,5])

It gets more interesting however, if the indexed array contains objects. An array index attr[*].subattr would index the subattr values of every element in attr individually:
{attr: {subattr: 1, other: "foo", yesno: true}}
{attr: {subattr: 2, other: "bar", yesno: false}}
// index contains: 1, 2

I wonder what would happen for the following two indexes however:

attr[*] on above documents - will it ignore the nested objects, or will it index all their attribute values? (index: 1, foo, true, 2, bar, false)
Will it be supported to create combined array indexes à la attr[*].subattr, attr[*].other, so on a subset of the nested objects' attributes? (index: 1, foo, 2, bar)

Re 1: an index on attr[*] should ignore this document {attr: {subattr: 1, other: "foo", yesno: true}} because the [*] will ignore all attributes that are not arrays. However, it should be possible to create an index on nested properties, e.g. attr[*].subattr.
Re 2: the plan is to support this.
Please note that work on the array indexes is still ongoing and not yet finished. The 2.7 release will not contain them, because there is already the 2.7 branch and the feature is "too big" to merge it back into a stable branch when implementation is finished.

Correction: above documents should had looked like the following:
{ attr: [ {subattr: 1, other: "foo", yesno: true}, {subattr: 2, other: "bar"} ] }
{ attr: [ {subattr: 3, other: "baz", yesno: false} ] }
// array index attr[*]: 1, foo, true, 2, bar, 3, baz, false
// array index attr[*].subattr, attr[*].other: 1, foo, 2, other, 3, baz

so objects nested in arrays. Nonetheless, combined indexes on object attributes without surrounding array are just as useful.

👍 for the expression / function based index creation. I think it doesn't need another index to perform the value modification before the value is indexed.

Related: https://stackoverflow.com/questions/44731372/computed-field-in-arangodb

With ArangoDB 3.10 we relaesed (Computed values](https://www.arangodb.com/docs/stable/data-modeling-documents-computed-values.html] which can as well be indexed.
So this implements this feature request.
Sorry for putting together this issue and that feature so late in the release cycle ;)


Feature  fix cdn

⚠ 🔴 WARNING: This PR is too large.
Consider breaking it down into smaller ones for faster and easier review next time.
Make sure your code has tests and you have done the necessary QA.


[Go Live][May 17]

Push to live

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

File
Status
Preview URL
Details

msteams-platform/concepts/build-and-test/deep-links.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Bugs/as0105

Summary
removes unnecessary pragma's
Work Item(s)
Fixes AB#496666

This PR shouldn't get merged until the corresponding PR in ado is ready...


[Feature Request] Make MERGE operation return useful metrics

Feature request
Overview
Currently, the MERGE command returns an empty result. It would be more useful if it returned

number of affected rows (Long)
number of updated rows (Long)
number of deleted rows (Long)
number of inserted rows (Long)

Motivation
These are obvious metrics that users would expect from this operation.
Further details
Implementation wise, this should be pretty straight forward. We already have access to

metrics("numTargetRowsUpdated")
metrics("numTargetRowsDeleted")
metrics("numTargetRowsInserted")
num_affected_rows should just be the sum of the 3 above metrics

Remember to add tests!

@scottsand-db can you assign it to me ?

@sherlockbeard - for sure!


Help with solving repeat compile search on custom MIBs

Folks,
I like this package, sorry to the developer is in bad health.  Very close to using it on a project, it requires custom MIBs and it's just too slow...  I think I'm missing something obvious....
I really like the package.  I've spent days reviewing documentation, posts on Google.  I think I understand what to do, tried several different things, but can't make headway.  I'm downloaded the files for 2.6 and am running on RedHat 6.9, python 2.6. I've tried to simplify the issue below:
     If I use snmpget.py  to retrieve a standard SNMPv2-MIB, the request completes very quickly:

$:~/jm1/python$ time snmpget.py -v 2c -c public  <IP_ADDRESS> SNMPv2-MIB::sysDescr.0
SNMPv2-MIB::sysDescr.0 = DisplayString: BIG-IP Virtual Edition : Linux 3.10.0-862.14.4.el7.ve.x86_64 : BIG-IP software release <IP_ADDRESS>, build 0.51.8
real    0m0.439s
user    0m0.411s
sys     0m0.026s
   When used to retrieve a vendor specific MIB, it is quite slow, about 10 times slower...

$:~/jm1/python$ time snmpget.py -v 2c -c public  <IP_ADDRESS> F5-BIGIP-SYSTEM-MIB::sysStatClientPktsIn.0
F5-BIGIP-SYSTEM-MIB::sysStatClientPktsIn.0 = Counter64: 162
real    0m5.622s
user    0m5.576s
sys     0m0.032s
   In both cases, I also get quite a few 'compiler' message lines, and if I don't have ply available the request fails in both cases.   I don't understand why it still wants the compiler?

    I need to load unique MIBS for F5 equipment.  I believe I have compiled them properly using mibdump.py and they are located here:

mibdump.py --rebuild --mib-source /home/oam/jm1/python/f5_mibs F5-BIGIP-COMMON-MIB F5-BIGIP-LOCAL-MIB F5-BIGIP-SYSTEM-MIB

$:~/jm1/python$  find . -name "F5-*.py*" -ls
  2467   76 -rw-------   1 oam      oam         77022 Jan 12 19:30 ./pysnmp/smi/mibs/F5-BIGIP-COMMON-MIB.py
  2471  864 -rw-------   1 oam      oam        881102 Jan 12 19:25 ./pysnmp/smi/mibs/F5-BIGIP-SYSTEM-MIB.py
  2469 1388 -rw-------   1 oam      oam       1418351 Jan 12 19:30 ./pysnmp/smi/mibs/F5-BIGIP-LOCAL-MIB.py
  2472  440 -rw-rw-r--   1 oam      oam        449902 Jan 12 19:25 ./pysnmp/smi/mibs/F5-BIGIP-SYSTEM-MIB.pyc
  2468   36 -rw-rw-r--   1 oam      oam         36575 Jan 12 19:30 ./pysnmp/smi/mibs/F5-BIGIP-COMMON-MIB.pyc
  2470  676 -rw-rw-r--   1 oam      oam        690780 Jan 12 19:30 ./pysnmp/smi/mibs/F5-BIGIP-LOCAL-MIB.pyc
  2474   76 -rw-------   1 oam      oam         77022 Jan 12 19:30 ./f5_py_mibs/F5-BIGIP-COMMON-MIB.py
  2478  864 -rw-------   1 oam      oam        881102 Jan 12 19:25 ./f5_py_mibs/F5-BIGIP-SYSTEM-MIB.py
  2476 1388 -rw-------   1 oam      oam       1418351 Jan 12 19:30 ./f5_py_mibs/F5-BIGIP-LOCAL-MIB.py
  2479  440 -rw-rw-r--   1 oam      oam        449902 Jan 12 19:25 ./f5_py_mibs/F5-BIGIP-SYSTEM-MIB.pyc
  2475   36 -rw-rw-r--   1 oam      oam         36575 Jan 12 19:30 ./f5_py_mibs/F5-BIGIP-COMMON-MIB.pyc
  2477  676 -rw-rw-r--   1 oam      oam        690780 Jan 12 19:30 ./f5_py_mibs/F5-BIGIP-LOCAL-MIB.pyc
  2480   76 -rw-------   1 oam      oam         77022 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-COMMON-MIB.py
  2484  864 -rw-------   1 oam      oam        881102 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-SYSTEM-MIB.py
  2482 1388 -rw-------   1 oam      oam       1418351 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-LOCAL-MIB.py
  2485  440 -rw-rw-r--   1 oam      oam        449902 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-SYSTEM-MIB.pyc
  2481   36 -rw-rw-r--   1 oam      oam         36575 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-COMMON-MIB.pyc
  2483  676 -rw-rw-r--   1 oam      oam        690780 Jan 12 20:14 ./pysnmp_mibs/F5-BIGIP-LOCAL-MIB.pyc

$:~/jm1/python$ ls -l ~/.pysnmp/mibs
total 3480
-rw------- 1 oam oam   77022 Jan 14 15:37 F5-BIGIP-COMMON-MIB.py
-rw-rw-r-- 1 oam oam   36575 Jan 14 15:37 F5-BIGIP-COMMON-MIB.pyc
-rw------- 1 oam oam 1418351 Jan 14 15:37 F5-BIGIP-LOCAL-MIB.py
-rw-rw-r-- 1 oam oam  690780 Jan 14 15:37 F5-BIGIP-LOCAL-MIB.pyc
-rw------- 1 oam oam  881102 Jan 14 15:37 F5-BIGIP-SYSTEM-MIB.py
-rw-rw-r-- 1 oam oam  449902 Jan 14 15:37 F5-BIGIP-SYSTEM-MIB.pyc

 I feel I'm just missing something obvious!  Thanks for any help.

Best regards!
John

Recent releases have dropped Python 2.x support, so no investigation will be done unless the environment is upgraded to a supported Python version, 3.8+ right now.
Besides, you might read GitHub Markdown guide to learn more about code formatting. The current formatting is problematic and not easy to understand what you wrote.


Can I import parameters from templates?

Hi there,
Is it possible to do like
parameters:
    - template: ./template.yml

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

ID: 790318bb-8220-3241-4ca7-73351074492f
Version Independent ID: db1da9db-3694-779b-17aa-1ed67fcecf86
Content: Use runtime and type-safe parameters - Azure Pipelines
Content Source: docs/pipelines/process/runtime-parameters.md
Product: devops
Technology: devops-cicd-process
GitHub Login: @juliakm
Microsoft Alias: jukullam

@anton-dealmeida Thanks for your question. Consider the following resources for product information:

Azure DevOps Services
Azure DevOps on Stack Overflow

Hi Tim,
I wouldn't have come here otherwise, I've checked everywhere. The document
page says I can use parameters in templates but that is ambiguous...
On Tue, Aug 24, 2021, 17:16 Tim Sherer @.***> wrote:

@anton-dealmeida https://github.com/anton-dealmeida Thanks for your
question. Consider the following resources for product information:

Azure DevOps Services https://azure.microsoft.com/support/devops/
Azure DevOps on Stack Overflow
https://stackoverflow.com/questions/tagged/azure-devops

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-devops-docs/issues/11244#issuecomment-904733981,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEOAMRHRZ5JR3KPQDPKZXEDT6OZV3ANCNFSM5CWRMZNA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
.

Apologies for any inconveniences, I'm just wondering because I've tried doing the code example above based on the below paragraph:
You can specify parameters in templates and in the pipeline. Parameters have data types such as number and string, and they can be restricted to a subset of values. The parameters section in a YAML defines what parameters are available.
Parameters are only available at template parsing time. Parameters are expanded just before the pipeline runs so that values surrounded by ${{ }} are replaced with parameter values. Use variables if you need your values to be more widely available during your pipeline run.
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&tabs=script

@anton-dealmeida I don't think this is possible but will double-check with the product team. Can you use variables instead using the format in this variable reuse example?

Hi @juliakm, well, variables aren't supported for the ${{each ...}} expression to my knowledge.
So, my hope here is to be able to use parameters that are imported from a parameters.yaml file that I can manipulate pre-commit using a YAML parser to take the list of apps in my Nx mono repo or my framework-less monorepo and ideally repeat the same build steps across the sub components and publish them all up to Docker.

I'm looking for a clean way to repeat the same build task in different directories...

@anton-dealmeida in the end, did you solve this ?
Thanks


fixing the babel rc aliases

I know 2.0 is on its way but this would fix the babelrc aliases for now.

Closing this PR, as there has been no response for awhile. And any active maintainer is clueless about this.
Please reply here anyone if you can answer any questions above.


Optional chaining for arrays giving wrong type

🔎 Search Terms
"Optional Chaining", "arrays",
🕗 Version & Regression Information

Happens on version 5.4.3

⏯ Playground Link
https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgMpgPZRQbwFDKHIAOUGAJgK4JgDOAXMjssOY7WFKAOYDcJXJIxCUAtgCNoyAL4BtALq880vHgQYQHZDAwZkAXmQAKWhlEQOWCI3RWAlAYB8TAkXWawLcgHkYAMWAoDgAFMioaA2RTc0tsADpSCmo6AH442QAGeTjWJSIWACUIJGAANwh0LhBuWiNWXwCgsFCkmjslaSU1DS1gIpLyyp5aSJMzC052Th4HfWd8fPdTABsIOOWMbjGYznblLqXPUQBPW2x6M5RDHETwunoFFTwdDCMTy7tVQiA
💻 Code
interface Store {
    products: { id: string; price: number }[];
}

const foo = (somestore: Store) => {
    const idOfFirstProduct = somestore.products?.[0].id;  //<- idOfFirstProduct SHOULD be string | undefined
    iReceiveStrings(idOfFirstProduct);
};

const iReceiveStrings = (somestr: string) => {
    console.log(somestr);
};

const myStore:Store = {products:[]}

foo(myStore) // <-- error not caught by typescript!

🙁 Actual behavior
Typescript does not infer the type should be possibly undefined when using optional chaining on arrays
🙂 Expected behavior
Typescript should infer the type should be possibly undefined when using optional chaining on arrays
Additional information about the issue
No response

This is working as intended. According to your types products can't ever be nullish, so you won't get undefined here.

Enabling noUncheckedIndexedAccess produces the expected error for undefined for your array access.
Argument of type 'string | undefined' is not assignable to parameter of type 'string'.
Type 'undefined' is not assignable to type 'string'.(2345)


[Anomaly detector] Fix readme links and changelog release date for preview-2

/azp run net - core - ci


add Python version to name

this might cause some issues with required checks in repository branch protection settings (which look for an exact name match) so perhaps should be cause for a bump to @v2

Yeah, this would require changes to required checks. I'd want to think about this more before bumping the major version for an (arguably) cosmetic change. I think most users wouldn't need the Python version displayed here because it's either already part of the tox environment name or they manually set how their tox environments are displayed by this workflow. And for other jobs, such as linting, it is less important to know the Python version.
In tox you can prefix environment names with e.g. py310- to specify the Python version (for the top level [testenv] section tests). The links above show examples of this. Are you intending to use this for https://github.com/spacetelescope/jwst/pull/7498? You could configure it as:
      envs: |
        - linux: py38-test-oldestdeps-xdist-cov
        - linux: py38-test-xdist
        - linux: py39-test-xdist
        - linux: py39-test-sdpdeps-xdist
        - linux: py310-test-xdist
        - linux: py310-test-opencv-xdist
        - linux: py311-test-xdist
        - macos: py311-test-xdist
        - linux: test-xdist-cov
          coverage: codecov

This workflow will then determine the python version to setup based on the environment name. That should work without any modifications to tox.ini.

ah, that is a good point, thank you! I will close this PR then


Unfocussed textarea label no longer has faded drop shadow

The WYSIWYG label used to have a soft faded drop shadow in white (or something like that), so it looked okay over the top of the content. It doesn't any more, and now looks weird with the content in the textarea.

Actually I think the label isn't detecting that the field has a value, like it does when text fields have a value:

I can't reproduce this issue with these description WYIWYGs. Where did this come up?

The product edit screen in the dashboard

I can't reproduce it any more, let's close it :)


Null response when try to create a replicationController

It was successful when I tried to create service, but I found the function of create service does not check the http status code = 201 so that it exposed exception: 'Failed: Created'. I fixed this.
When I tried to create or update a replicationControllers, a kubernetesClientException exposed :
SEVERE: Replication Controller [wildfly11-rc] creation failed. Null response received.
com.github.kubernetes.java.client.exceptions.KubernetesClientException: Replication Controller [wildfly11-rc] creation failed.
at com.github.kubernetes.java.client.KubernetesApiClient.handleNullResponse(KubernetesApiClient.java:459)
at com.github.kubernetes.java.client.KubernetesApiClient.createReplicationController(KubernetesApiClient.java:221)
at com.sipm.bcf.ac.server.action.StartAppAction.createReplicationController(StartAppAction.java:62)
at com.sipm.bcf.ac.server.action.StartAppAction.start(StartAppAction.java:28)
at com.sipm.bcf.ac.server.action.StartAppAction.main(StartAppAction.java:93)
The method of createController:
protected boolean createReplicationController(){
rc = new ReplicationController();
State desiredState = new State();
rc.setId(imageName+"-rc");
desiredState = new State();
desiredState.setReplicas(replicas);
Selector selector = new Selector();
selector.setName(imageName+"-sc");
desiredState.setReplicaSelector(selector);
//----------------------------------
Pod podTemplate = new Pod();
State podState = new State();
Manifest manifest = new Manifest();
manifest.setId(imageName+"-rc");
Container container = new Container();
container.setName(imageName);
container.setImage(registryUrl+"/"+imageName);
Port p = new Port();
p.setContainerPort(containerPort);
container.setPorts(Collections.singletonList(p));
manifest.setContainers(Collections.singletonList(container));
podState.setManifest(manifest);
podTemplate.setDesiredState(podState);
podTemplate.setLabels(new Label(imageName+"-sc"));
//-----------------------------------
desiredState.setPodTemplate(podTemplate);
rc.setDesiredState(desiredState);
rc.setLabels(new Label(imageName+"-sc"));
try {
client.createReplicationController(rc);
} catch (KubernetesClientException e) {
e.printStackTrace();
return false;
}
return true;
}
I used api v1beta1 (endpointurl="http://<IP_ADDRESS>:8080/api/v1beta1/"). The version of kubernetes is v0.15.0.
I guess it's caused by the kube-api changed some attributes of creating RC since it was failed when I tried to create RC by creating a json file with v1beta1 schema on master and create it by command which was successful in v0.6.

@bengong2015 thanks for reporting the issue. Could you send a fix as a PR? I don't have time to spend on this right now :-(


Update node added operator event

See https://github.com/river-build/river/pull/1094 for proposed stream node change


Create new branch for pull requests from external contributors

A new branch is needed so external contributors may submit pull requests. This is so repository maintainers have a single branch to use for reviewing all external contributions.

Branch name will be titled external_requests.

Using git-feature workflow, so additional branch no needed.


(WIP) TRX integration to Scilpy

In order to actually be useful in real-life, I had to include a system to indicate how to change datatype.
An example of this in scilpy is tracking when using LazyTractogram, we are also saving the initial seed position (N, 3) in the data_per_streamline.
The problem was that Nibabel was storing everything in float64, at save time everything is saved as float32 (in TRK/TCK)
But then the TRX was just saving it as it was stored (float64) so I had to include a way "for the user" to say what should be saved how.
This was already ok when creating a TRX from scratch, but when converting from StatefulTractogram in Dipy, or Tractogram in Nibabel to TrxFile it was not trivial to do .astype() on everything easily.
This comes with a big PR in Scilpy since we have like 150 scripts, but also it comes with a tiny change in Dipy so StatefulTractogram could hide a record of the dtype by itself.
This is evolving:

[x] Make a command line script that will take a TRX as input and a TRX as output and a bunch of tag to change the dtype of any specific file inside the TRX (easier than extracting it, loading and saving every array manually and re-generating from scratch again)
[ ] Double check all scripts involving streamlines in Scilpy to make sure they keep the right dtype (if possible)
[ ] Check the performance of using TRX on a script using QBx or Recobundles on a whole brain
[ ] Doing a PR in Dipy (so one day we can do a clean Dipy install of the next tag)
[ ] Doing a PR in Scilpy for basic support of TRX (no crazy memmapping, just load/save without loosing info)
[ ] Add test for load/save with a mix of to_* and from_* function (sft, memory, tractogram, etc.)

https://github.com/frheault/dipy/tree/trx_integration
https://github.com/frheault/scilpy/tree/trx_integration

@arokem Here are the relevant PR
https://github.com/scilus/scilpy/pull/675
https://github.com/dipy/dipy/pull/2723


initialSlide set as "0" or "1" (String) breaks slider navigation

====================================================================
[  http://jsfiddle.net/t2hrte78/1/  ]
====================================================================
Steps to reproduce the problem

Set initialSlide to "0" or "1" (String type).
Click on right arrow or wait for autoplay.
Slick goes to the 12-th slide after 2-nd (from 1 to 11).

====================================================================
What is the expected behaviour?
Slick goes to 3-rd slide after 2-nd.
====================================================================
What is observed behaviour?
Slick goes to the 12-th slide after 2-nd (from 1 to 11).
====================================================================
Simple solution
Please use parseInt function for must-be-numeric variables sent by the user.
====================================================================
Thanks for great carousel!

Hi @eugene-lazarev ! In the Slick documentation (http://kenwheeler.github.io/slick/), the "settings" part specifies that the initialSlide setting must be of type integer, so I'm not sure that converting strings to integers is the best solution (a.k.a the user should be responsible for that). However, perhaps type checking should be put in place to give the user an informative error if they fail to provide the right type - right now it fails silently, and the user might not know what they've done wrong.
I'd be willing to take this on, but I need the blessing of the maintainers @kenwheeler @simeydotme

Thanks @DHDaniel,
But I'm pretty sure the best way to do something in IT is to predict user's mistakes and fix it 'under the hook' without any notice.
Because this is Javascript, you know, here is the difference between 1 and "1" is extremely small.
It's obviously that user wants to set initialSlide on 1, not "1". I can't see any reasons why don't help him without any noise :)
Anyway, I respect any of your decision here. Thanks again.


Russian translation

Hi Spyder Team,
First, let me thank you for such a great tool! I am a happy Spyder user who got it as part of WinPython distribution. While I feel comfortable with English UI, I can think of other Russian-speaking users who would like to see localized interface.
So I wonder if you accept alternative localizations? If that is the case I will be happy to contribute.

Yes, of course we accept them :-) You need to load the file called spyderlib.pot, located in spyderlib/locale and load it in a program to do translations (like poedit on Linux).
Currently we have translations for Spanish, French and Portuguese.

That's great! Thank you for pointing to the spyderlib.pot file. I examined existing .po files in spyderlib/locale/[es|fr|pt_BR] but didn't notice the template. I was thinking about using pygettext.py to generate it from source.

I partially translated spyderlib to Russian.
But I'm not professional translator, so:
https://drive.google.com/open?id=0B2MlVBZIcddKUS03NmpMb3kzNzg

@burrbull, please create a translation file and a pull request to add it to our source tree

This is already done. Closing.


Handle wildcard objectIds in access checks

Currently, wildcards warrants are required to resolve to at least one existing warrant with an explicit objectId specified. This approach was initially favored to provide additional protections / integrity (especially when dealing with context). However, in scenarios where wildcard warrants indirectly reference warrants having an explicit objectId, the wildcard warrant doesn't have a warrant (directly related to itself) to resolve to, so any dependent access checks incorrectly return an unauthorized response.
This PR does two things:
(1) Fixes the issue described above by allowing wildcard objectIds in warrants to resolve to any objectId rather than looking to resolve them to an existing objectId (with matching context). This approach no longer provides protections / integrity on the actual objectId being resolved to because that additional check is seen as something the user should either (1) create a separate warrant to enforce or (2) enforce within their own database/application.
(2) Fixes a bug in the access check method that was incorrectly fetching indirect warrants to expand the search upon.

Can you also add a test case covering the bug fix? (i.e. ensuring that indirect warrants are correctly fetched during the access check)


Generic parameter of function is inferred to be {} when argument of conditional type is passed in

TypeScript Version:
2.8.1, 2.9.2, 3.0.0-dev.20180628

Search Terms:
conditional type inference
Code
// very contrived code to demonstrate the issue

// this conditional type trips type inference
type Action<P> = P extends void
    ? { type: string }
    : { type: string, payload: P }

interface Dispatch {
    // this conditional type seems to have no negative impact on type inference
    <P>(action: Action<P>): P extends void ? undefined : P
}

declare const dispatch: Dispatch

const numberAction: Action<number> = {
        type: 'dummy',
        payload: 0,
    }
    // infered result type is {}, expected one is number
    , numberResult: number = dispatch(numberAction)

const voidAction: Action<void> = {
        type: 'dummy',
    }
    // seems infered P is {}, so it is not allowed to pass voidAction to dispatch
    , voidResult: undefined = dispatch(voidAction)

Expected behavior:
Type checking succeedes
Actual behavior:
Type checking fails for two places:

numberResult: number = dispatch(numberAction)
voidResult: undefined = dispatch(voidAction)

Playground Link:
Playground
I believe this sample captures the issue but just in case there is a more verbose sample with original types
Related Issues:
Not sure #25299 #24784

@mhegazy Thanks for overloads direction. It really helped.
type NonVoidAction<P> = { type: string, payload: P }
type VoidAction = { type: string }

interface Dispatch {
    <P>(action: NonVoidAction<P>): P
    (action: VoidAction): undefined
}