CNV prediction failed

Hi,
I've encountered a sample where the CNV prediction throws an error. All other samples were processed fine. I couldn't find any (obvious) problems within the counts or the VCF file. The R-output is attached below, maybe this gives already a clue ...
Thanks,
Mathias
[1] "Normalization for sample: test_fail completed"
[1] "Preparing file with snv information for: test_fail"
Reading in vcf file..
Extracting depth..
Extracting reference allele and alternative allele depths..
Needed information from vcf extracted
Finished reading vcf
[1] "Estimating chromosome arm CNV: test_fail"
Error in seq.default(from = 1, to = floor(yAxisMax)) :
'to' must be a finite number
In addition: Warning messages:
1: In dir.create(path = chr_dir) : 'test_output/test_pass' already exists
2: Removed 10 rows containing missing values (geom_smooth).
3: Removed 4 rows containing missing values (geom_smooth).
4: In dir.create(path = chr_dir) : 'test_output/test_fail' already exists
5: In max(.) : no non-missing arguments to max; returning -Inf

Hi Mathias,
thank you for forwarding the error! It is very likely, that there is an issue with the specific VCF file. Specifically, I think there is a low number of valid SNPs for the analysis on a certain chromosome.
To test this hypothesis, you could try to list the number of SNPs for each chromosome in that VCF file and compare the number of SNPs with a working VCF file. This way we would know, that there are fewer SNPs than expected.
You could also forward the VCF file to me if you would feel comfortable with that.
To give you some context: In RNAseqCNV, there is a filter for low coverage of SNPs on all chromosomes combined, but it is missing for each chromosome separately. If this would cause issues, I would look into it.
Best,
Jan

Hi Jan,
thanks for the immediate support :)
I've listed the number of variants of the "failed" and a "passed" vcf
(numbers.csv), but you can also download the more interesting vcf file
(test_fail.vcf.gz) from:
https://ct1130.pm11-host.1awww.com/s/qmkqWpMco7fmFmn (my personal
NextCloudHub).
Both samples were prepared, sequenced and analyzed in the same batch and
the quality tests were good for both of them.
When your assumption about too few variants for critical genomic regions
is true, it might not help to recalibrate the gene weights, right? Or
does the number of variants used to predict the CNV status depend on the
genes used to generate gene weights?
best,
Mathias
Am 2022-04-07 20:27, schrieb honzee:

Hi Mathias,
thank you for forwarding the error! It is very likely, that there is
an issue with the specific VCF file. Specifically, I think there is a
low number of valid SNPs for the analysis on a certain chromosome.
To test this hypothesis, you could try to list the number of SNPs for
each chromosome in that VCF file and compare the number of SNPs with a
working VCF file. This way we would know, that there are fewer SNPs
than expected.
You could also forward the VCF file to me if you would feel
comfortable with that.
To give you some context: In RNAseqCNV, there is a filter for low
coverage of SNPs on all chromosomes combined, but it is missing for
each chromosome separately. If this would cause issues, I would look
into it.
Best,
Jan
--
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you authored the thread.Message ID:
@.***>
Links:
[1]
https://github.com/honzee/RNAseqCNV/issues/12#issuecomment-1092070022
[2]
https://github.com/notifications/unsubscribe-auth/AEMPXPXJ4ZR7Q4CVZ6CRO5LVD4SJJANCNFSM5SZX6K5A
variants	test_fail	test_pass
total	387361	356064
1	40137	32418
2	26136	25694
3	23742	19585
4	14834	12848
5	17053	15724
6	19173	17163
7	23887	18911
8	14561	12501
9	15396	13884
10	13597	15442
11	15867	19560
12	20555	20469
13	11157	6642
14	11233	11028
15	12030	9682
16	17153	16447
17	18415	20964
18	6540	6027
19	27966	26011
20	11718	10281
21	6039	4771
22	9177	10161
X	10751	9444
Y	149	393
M	49	36

Hi Mathias,
so the number of SNPs you showed looked completely fine, so I downloaded the vcf file and looked into it.
The issue is, that too many of these SNPs get filtered out. There are multiple SNP filters we use - sequencing depth, MAF range or dbSNP database. The main issue seems to lie within the dbSNP database filter after comparing the results with a validated vcf file. We use the filter to ensure the reliability of the detected variants.
So first, I would recommend checking if there is something out of ordinary for this sample compared to the others. I am not sure what might be causing the significantly lower overlap with the dbSNP database.
Second, I would like to make this part of the analysis more transparent. Such as: putting out warning/error messages and allowing to set the minimum number of SNPs to move forward with the analysis.
Best,
Jan


Custom TorchServe service does not work

I have a yaml-file:
apiVersion: "serving.kubeflow.org/v1beta1"
kind: "InferenceService"
metadata:
  name: "my-service"
spec:
  predictor:
    containers:
    - image: pytorch/torchserve-kfs:0.4.1-gpu
      name: kfserving-container
      env:
          - name: STORAGE_URI
            value: "pvc://my-claim/"
      resources:
        limits:
          cpu: 2
          memory: 16Gi
          nvidia.com/gpu: 1
        requests:
          cpu: 1
          memory: 8Gi
          nvidia.com/gpu: 1

I'm trying to run it, but the containers in the pod produces the following:
!kubectl logs -n default {POD} -c storage-initializer
[I 210922 14:59:02 initializer-entrypoint:13] Initializing, args: src_uri [/mnt/pvc/] dest_path[ [/mnt/models]
[I 210922 14:59:02 storage:45] Copying contents of /mnt/pvc/ to local
[I 210922 14:59:02 storage:223] Linking: /mnt/pvc/model-store_ to /mnt/models/model-store_
[I 210922 14:59:02 storage:223] Linking: /mnt/pvc/config to /mnt/models/config
[I 210922 14:59:02 storage:223] Linking: /mnt/pvc/model-store to /mnt/models/model-store

!kubectl logs -n default {POD} -c kfserving-container
/usr/local/lib/python3.6/dist-packages/ray/autoscaler/_private/cli_logger.py:61: FutureWarning: Not all Ray CLI dependencies were found. In Ray 1.4+, the Ray CLI, autoscaler, and dashboard will only be usable via pip install 'ray[default]'. Please update your install command.
"update your install command.", FutureWarning)
[I 210922 14:59:03 __main__:68] Wrapper : Model names ['my-model'], inference address http//<IP_ADDRESS>:8085, management address http://<IP_ADDRESS>:8081, model store /mnt/models/model-store
[I 210922 14:59:03 TorchserveModel:48] kfmodel Predict URL set to <IP_ADDRESS>:8085
[I 210922 14:59:03 TorchserveModel:50] kfmodel Explain URL set to <IP_ADDRESS>:8085
[I 210922 14:59:03 TSModelRepository:26] TSModelRepo is initialized
[I 210922 14:59:03 kfserver:151] Registering model: my-model
[I 210922 14:59:03 kfserver:121] Setting asyncio max_workers as 6
[I 210922 14:59:03 kfserver:128] Listening on port 8080
[I 210922 14:59:03 kfserver:130] Will fork 1 workers

My config-file:
inference_address=http://<IP_ADDRESS>:8085
management_address=http://<IP_ADDRESS>:8081
metrics_address=http://<IP_ADDRESS>:8082
grpc_inference_port=7070
grpc_management_port=7071
max_request_size=1073741824
max_response_size=1073741824
install_py_dep_per_model=true
NUM_WORKERS=1
number_of_gpu=1
number_of_netty_threads=32
job_queue_size=1000
model_store=/mnt/models/model-store
model_snapshot={"name":"startup.cfg","modelCount":1,"models":{"my-model":{"1.0":{"defaultVersion":true,"marName":"roberta_base.mar","minWorkers":1,"maxWorkers":5,"batchSize":1,"maxBatchDelay":5000,"responseTimeout":5000}}}}

I try prediction:
PREDICTION = !curl -H "Host: {SERVICE_HOSTNAME}" -H "Cookie: authservice_session={SESSION}" http://{INGRESS_HOST}:{INGRESS_PORT}/predictions/{MODEL_NAME} -d {INPUT_PATH}

['  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current',
 '                                 Dload  Upload   Total   Spent    Left  Speed',
 '',
 '  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0',
 '100   267  100    69  100   198   7666  22000 --:--:-- --:--:-- --:--:-- 33375',
 '<title>404: Not Found</title>404: Not Found']

As a result, the service does not work.

I'm sorry. I solved this problem I needed to use the image pytorch/torchserve:0.4.1-gpu.
But I got another problem. If I build my docker image from the TorchServe repository and specify it, then everything works: the GPU is allocated, the model is initialized.
2021-09-23 10:48:09,182 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager - Initializing plugins manager...
2021-09-23 10:48:09,324 [INFO ] main org.pytorch.serve.ModelServer -
Torchserve version: 0.4.1
TS Home: /opt/conda/lib/python3.8/site-packages
Current directory: /home/model-server
Temp directory: /home/model-server/tmp
**Number of GPUs: 1**
Number of CPUs: 2
Max heap size: 4096 M
Python executable: /opt/conda/bin/python3.8
Config file: /mnt/models/config/config.properties
Inference address: http://<IP_ADDRESS>:8085
Management address: http://<IP_ADDRESS>:8081
Metrics address: http://<IP_ADDRESS>:8082
Model Store: /mnt/models/model-store
Initial Models: N/A
Log dir: /home/model-server/logs
Metrics dir: /home/model-server/logs
Netty threads: 32
Netty client threads: 0
Default workers per model: 1
Blacklist Regex: N/A
Maximum Response Size:<PHONE_NUMBER>
Maximum Request Size:<PHONE_NUMBER>
Prefer direct buffer: false
Allowed Urls: [file://.*|http(s)?://.*]
Custom python dependency for model allowed: true
Metrics report format: prometheus
Enable metrics API: true
Workflow Store: /mnt/models/model-store
Model config: N/A
2021-09-23 10:48:09,335 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager -  Loading snapshot serializer plugin...
2021-09-23 10:48:09,361 [INFO ] main org.pytorch.serve.snapshot.SnapshotManager - Started restoring models from snapshot {"name":"startup.cfg","modelCount":1,"models":{"my-model":{"1.0":{"defaultVersion":true,"marName":"roberta_base.mar","minWorkers":1,"maxWorkers":5,"batchSize":1,"maxBatchDelay":5000,"responseTimeout":5000}}}}
2021-09-23 10:48:09,368 [INFO ] main org.pytorch.serve.snapshot.SnapshotManager - Validating snapshot startup.cfg
2021-09-23 10:48:09,369 [INFO ] main org.pytorch.serve.snapshot.SnapshotManager - Snapshot startup.cfg validated successfully
2021-09-23 10:48:14,867 [DEBUG] main org.pytorch.serve.wlm.ModelVersionedRefs - Adding new version 1.0 for model my-model
2021-09-23 10:48:14,868 [DEBUG] main org.pytorch.serve.wlm.ModelVersionedRefs - Setting default version to 1.0 for model my-model
2021-09-23 10:48:36,053 [DEBUG] main org.pytorch.serve.wlm.ModelVersionedRefs - Setting default version to 1.0 for model my-model
2021-09-23 10:48:36,053 [INFO ] main org.pytorch.serve.wlm.ModelManager - Model my-model loaded.
2021-09-23 10:48:36,054 [DEBUG] main org.pytorch.serve.wlm.ModelManager - updateModel: my-model, count: 1
2021-09-23 10:48:36,063 [INFO ] main org.pytorch.serve.ModelServer - Initialize Inference server with: EpollServerSocketChannel.
2021-09-23 10:48:36,157 [INFO ] main org.pytorch.serve.ModelServer - Inference API bind to: http://<IP_ADDRESS>:8085
2021-09-23 10:48:36,157 [INFO ] main org.pytorch.serve.ModelServer - Initialize Management server with: EpollServerSocketChannel.
2021-09-23 10:48:36,158 [INFO ] main org.pytorch.serve.ModelServer - Management API bind to: http://<IP_ADDRESS>:8081
2021-09-23 10:48:36,159 [INFO ] main org.pytorch.serve.ModelServer - Initialize Metrics server with: EpollServerSocketChannel.
2021-09-23 10:48:36,160 [INFO ] main org.pytorch.serve.ModelServer - Metrics API bind to: http://<IP_ADDRESS>:8082
Model server started.
2021-09-23 10:48:36,357 [WARN ] pool-2-thread-1 org.pytorch.serve.metrics.MetricCollector - worker pid is not available yet.
2021-09-23 10:48:36,454 [INFO ] pool-2-thread-1 TS_METRICS - CPUUtilization.Percent:0.0|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,455 [INFO ] pool-2-thread-1 TS_METRICS - DiskAvailable.Gigabytes:238.34677124023438|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,456 [INFO ] pool-2-thread-1 TS_METRICS - DiskUsage.Gigabytes:194.8613624572754|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,456 [INFO ] pool-2-thread-1 TS_METRICS - DiskUtilization.Percent:45.0|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,457 [INFO ] pool-2-thread-1 TS_METRICS - MemoryAvailable.Megabytes:119592.2109375|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,457 [INFO ] pool-2-thread-1 TS_METRICS - MemoryUsed.Megabytes:8975.46875|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,458 [INFO ] pool-2-thread-1 TS_METRICS - MemoryUtilization.Percent:6.9|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394116
2021-09-23 10:48:36,871 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Listening on port: /home/model-server/tmp/.ts.sock.9000
2021-09-23 10:48:36,872 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - [PID]57
2021-09-23 10:48:36,873 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Torch worker started.
2021-09-23 10:48:36,873 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Python runtime: 3.8.10
2021-09-23 10:48:36,874 [DEBUG] W-9000-my-model_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-my-model_1.0 State change null -> WORKER_STARTED
2021-09-23 10:48:36,883 [INFO ] W-9000-my-model_1.0 org.pytorch.serve.wlm.WorkerThread - Connecting to: /home/model-server/tmp/.ts.sock.9000
2021-09-23 10:48:36,899 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Connection accepted: /home/model-server/tmp/.ts.sock.9000.
2021-09-23 10:48:36,938 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - model_name: my-model, batchSize: 1
2021-09-23 10:48:38,424 [WARN ] W-9000-my-model_1.0-stderr MODEL_LOG - Some weights of RobertaModel were not initialized from the model checkpoint at /home/model-server/tmp/models/61bdb226c08e4ebdb5c5821b39d7bc64 and are newly initialized: ['pooler.dense.weight', 'pooler.dense.bias']
2021-09-23 10:48:38,425 [WARN ] W-9000-my-model_1.0-stderr MODEL_LOG - You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
2021-09-23 10:48:40,259 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Transformer model from path /home/model-server/tmp/models/61bdb226c08e4ebdb5c5821b39d7bc64 loaded successfully
2021-09-23 10:48:40,259 [INFO ] W-9000-my-model_1.0-stdout MODEL_LOG - Transformer model started on cuda device
2021-09-23 10:48:40,278 [INFO ] W-9000-my-model_1.0 org.pytorch.serve.wlm.WorkerThread - Backend response time: 3341
2021-09-23 10:48:40,279 [DEBUG] W-9000-my-model_1.0 org.pytorch.serve.wlm.WorkerThread - W-9000-my-model_1.0 State change WORKER_STARTED -> WORKER_MODEL_LOADED
2021-09-23 10:48:40,279 [INFO ] W-9000-my-model_1.0 TS_METRICS - W-9000-my-model_1.0.ms:4220|#Level:Host|#hostname:756c5e83aeeb,timestamp:1632394120
2021-09-23 10:48:40,280 [INFO ] W-9000-my-model_1.0 TS_METRICS - WorkerThreadTime.ms:34|#Level:Host|#hostname:756c5e83aeeb,timestamp:null

However, if I create an image based on the Dockerfile of the NeMo repository with the addition of TorchServe, then the GPU is not allocated:
2021-09-23 10:48:09,182 [INFO ] main org.pytorch.serve.servingsdk.impl.PluginsManager - Initializing plugins manager...
2021-09-23 10:48:09,324 [INFO ] main org.pytorch.serve.ModelServer -
Torchserve version: 0.4.1
TS Home: /opt/conda/lib/python3.8/site-packages
Current directory: /home/model-server
Temp directory: /home/model-server/tmp
**Number of GPUs: 0**
Number of CPUs: 2
Max heap size: 4096 M
Python executable: /opt/conda/bin/python3.8
Config file: /mnt/models/config/config.properties
Inference address: http://<IP_ADDRESS>:8085
Management address: http://<IP_ADDRESS>:8081
Metrics address: http://<IP_ADDRESS>:8082
Model Store: /mnt/models/model-store
Initial Models: N/A
Log dir: /home/model-server/logs
Metrics dir: /home/model-server/logs
Netty threads: 32
Netty client threads: 0
Default workers per model: 1
Blacklist Regex: N/A

Note: I added the following lines to the file NeMo/requirements/requirements_nlp.txt:
captum
torchserve==0.4.1
torch-model-archiver

In this case, if you run the image locally, then it works and the GPU is allocated again.
docker run --rm -it --gpus '"device=0"' -p 8085:8085 -p 8081:8081 -p 8082:8082 -p 7070:7070 -p 7071:7071 --name container_name -v /home/rtx3070/torchserve/:/mnt/models yurkoff/nemo-torchserve:0.3-gpu
What could be the problem?

Closing this issue as it is too old


Vulkan: Changing Half Resolution doesn't update immediately

Godot version:
v4.0.dev.custom_build.b6f381475
OS/device including version:
Windows 10
Vulkan
Issue description:
Changing Half Resolution doesn't immediately update. It only updates when you change a different setting such as anti aliasing.
Steps to reproduce:
Enable or disable Half Resolution, it won't do anything, but if you enter project settings and change anti aliasing, it will update the Half Resolution to what you had selected
https://user-images.githubusercontent.com/12120644/119565124-8ed4ca00-bd77-11eb-958f-ecdcf3e2fcc8.mp4
Minimal reproduction project:
any project

Was looking at this and found out more about this bug, for some reason if you open up a scene it resets Half Resolution back to what it was previously. It seems like changing Half Resolution doesn't even save at all, the only way to for it to save is to change anti aliasing (or some other rendering setting)
https://user-images.githubusercontent.com/12120644/126399757-b8a89136-1bea-4ff2-accc-8418e0895acc.mp4


Categorical values

Xgboost supports categorical values directly, without going through a one-hot sparse array.
In the example below, I specify the a series to be a categorical int type. Then I pass the enable_categorical argument to xgboost's DMatrix data wrapper, and xgboost fits accordingly.
With xgboost-distribution, this doesn't work, since one passes the series/array directly to the sklearn-style .fit method. I think that under-the-hood, the series/array is passed to a DMatrix function, but here enable_categorical isn't set.
I can see two solutions:

Create an api that allows .train in the same vein as xgboost
Add enable_categorical as a kwarg to either XGBDistribution() or .fit(), which is passed under-the-hood.

Example of it failing, with error, below:
import pandas as pd
import numpy as np

df = pd.DataFrame({"a":np.random.randint(1,5, size=20), "b":np.random.random(size=20), "y":np.random.random(size=20)})
df.a = df.a.astype("category")

X = df.drop(columns="y")
y = df.y

import xgboost as xgb
dtrain = xgb.DMatrix(X, label=y, enable_categorical=True)

bst = xgb.train({}, dtrain) # works
# bst.predict(dtrain)

model = XGBDistribution()
model.fit(X, y) # fails

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/tmp/ipykernel_68/367534232.py in <module>
     15
     16 model = XGBDistribution()
---> 17 model.fit(X, y) # fails

/usr/local/lib/python3.9/site-packages/xgboost_distribution/model.py in fit(self, X, y, sample_weight, eval_set, early_stopping_rounds, verbose, xgb_model, sample_weight_eval_set, feature_weights, callbacks)
    117             base_margin_eval_set = None
    118
--> 119         train_dmatrix, evals = _wrap_evaluation_matrices(
    120             missing=self.missing,
    121             X=X,

/usr/local/lib/python3.9/site-packages/xgboost/sklearn.py in _wrap_evaluation_matrices(missing, X, y, group, qid, sample_weight, base_margin, feature_weights, eval_set, sample_weight_eval_set, base_margin_eval_set, eval_group, eval_qid, create_dmatrix, label_transform)
    234
    235     """
--> 236     train_dmatrix = create_dmatrix(
    237         data=X,
    238         label=label_transform(y),

/usr/local/lib/python3.9/site-packages/xgboost_distribution/model.py in <lambda>(**kwargs)
    131             eval_group=None,
    132             eval_qid=None,
--> 133             create_dmatrix=lambda **kwargs: DMatrix(nthread=self.n_jobs, **kwargs),
    134             label_transform=lambda x: x,
    135         )

/usr/local/lib/python3.9/site-packages/xgboost/core.py in inner_f(*args, **kwargs)
    434         for k, arg in zip(sig.parameters, args):
    435             kwargs[k] = arg
--> 436         return f(**kwargs)
    437
    438     return inner_f

/usr/local/lib/python3.9/site-packages/xgboost/core.py in __init__(self, data, label, weight, base_margin, missing, silent, feature_names, feature_types, nthread, group, qid, label_lower_bound, label_upper_bound, feature_weights, enable_categorical)
    539         from .data import dispatch_data_backend
    540
--> 541         handle, feature_names, feature_types = dispatch_data_backend(
    542             data,
    543             missing=self.missing,

/usr/local/lib/python3.9/site-packages/xgboost/data.py in dispatch_data_backend(data, missing, threads, feature_names, feature_types, enable_categorical)
    571         return _from_tuple(data, missing, feature_names, feature_types)
    572     if _is_pandas_df(data):
--> 573         return _from_pandas_df(data, enable_categorical, missing, threads,
    574                                feature_names, feature_types)
    575     if _is_pandas_series(data):

/usr/local/lib/python3.9/site-packages/xgboost/data.py in _from_pandas_df(data, enable_categorical, missing, nthread, feature_names, feature_types)
    256 def _from_pandas_df(data, enable_categorical, missing, nthread,
    257                     feature_names, feature_types):
--> 258     data, feature_names, feature_types = _transform_pandas_df(
    259         data, enable_categorical, feature_names, feature_types)
    260     return _from_numpy_array(data, missing, nthread, feature_names,

/usr/local/lib/python3.9/site-packages/xgboost/data.py in _transform_pandas_df(data, enable_categorical, feature_names, feature_types, meta, meta_type)
    221                 categorical type is supplied, DMatrix parameter
    222                 `enable_categorical` must be set to `True`."""
--> 223         raise ValueError(msg + ', '.join(bad_fields))
    224
    225     if feature_names is None and meta is None:

ValueError: DataFrame.dtypes for data must be int, float, bool or categorical.  When
                categorical type is supplied, DMatrix parameter
                `enable_categorical` must be set to `True`.a

This looks like it will be fixed automatically in the next version of xgboost. Current master takes a enable_categorical: bool argument to XGBModel, which is inherited by XGBDistribution. So in the future one can do, e.g.:
model = XGBDistribution(enable_categorical=True)
model.fit(...)

For now, I've fixed it locally in this manner. (I'm in a container environment and just needed a quick fix)


[BUG] System.InvalidOperationException: No subscriptions found for the given credentials

Library name and version
Azure.ResourceManager.Resources 1.0.0-beta.5
Describe the bug
My program reports an error saying that I don't have subscriptions, but I do have a subscription.
Expected behavior
My program should print the Id of my subscription.
Actual behavior
It reports an error saying that I don't have subscriptions, but I do have a subscription.
Unhandled exception. System.InvalidOperationException: No subscriptions found for the given credentials
   at Azure.ResourceManager.ArmClient.GetDefaultSubscriptionAsync(CancellationToken cancellationToken)
   at Program.<Main>$(String[] args) in /home/adrian/temp/AZ-204/consoleApp/Program.cs:line 6
   at Program.<Main>(String[] args)

Reproduction Steps

Create a new console project with dotnet new console
Add the following NuGet packages:

Azure.Identity
Azure.ResourceManager
Azure.ResourceManager.Resources

Copy and paste this code:

using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;

var armClient = new ArmClient(new InteractiveBrowserCredential());
Subscription subscription = await armClient.GetDefaultSubscriptionAsync();
Console.WriteLine(subscription.Id);

This command demonstrates that I have multiple subscriptions:
$ az account list --all --query '[].{isDefault: isDefault, name: name, state: state}'
[
  {
    "isDefault": false,
    "name": "Pase para Azure: patrocinio",
    "state": "Disabled"
  },
  {
    "isDefault": true,
    "name": "Pase para Azure: patrocinio",
    "state": "Enabled"
  }
]

I think the problem must be with InteractiveBrowserCredential, because when I use DefaultAzureCredential instead and I execute dotnet run in the same terminal I executed az login I get the subscription id without problems.
Environment
$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.101/

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  6.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

I am using WSL.
VSCode version: 1.63.2

Thank you for your feedback.  Tagging and routing to the team member best able to assist.

@adriancuadrado did you get browser popup and say 'Authentication complete. You can return to the application. Feel free to close this browser tab.' ?
I can't repo this issue in my machine which I also have multiple subscriptions.

@ArthurMa1978 Yes I got that from the web browser. Is there a way to securely provide temporal access to someone in your team to see if the error can be reproduced with my account?

I did some research capturing the requests and responses of my program using the Postman "Capturing requests via proxy" feature, but only some POST requests to https://vortex.data.microsoft.com/collect/v1 and a POST request to https://clients4.google.com/chrome-sync/command/?client=Google+Chrome&client_id=... were captured. The clients4.google.com request had some unintelligible data in the POST body.

I can't reproduce this on Windows - is it specific to WSL?

I just checked now and apparently this also happens in Windows, not only inside WSL.

I was having this same issue and couldn't figure out why even when I see the tenant with GetTenants(), doing a tenant.GetSubscriptions() it doesn't refer to the subscriptions of THAT TENANT which one would logically assume.  I had to specify:
new ArmClient(new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions() { TenantId = "<<home tenant ID returned by az login>>" }))
And then I got to see those subscriptions.

Thanks @djarvis - @adriancuadrado , does specifying the tenantId work for you as well?

@christothes Yes it does. But specifying the tenant id should not be mandatory, right?

@christothes Yes it does. But specifying the tenant id should not be mandatory, right?

I think it depends on what your default tenant is for the account, Is the home tenant of the user that you authenticated with the same as the one you specified?
I'm also curious if the following code produces the expected tenant Id:
var tenants = armClient.GetTenants();
foreach (var t in tenants)
{
	Console.WriteLine($"{t.Data.DisplayName} - {t.Data.TenantId}");
}

And one last thing, the Azure.ResourceManager package released version 1.0.0 recently - do you get any different results with it?

@christothes

Is the home tenant of the user that you authenticated with the same as the one you specified?

Yes

I'm also curious if the following code produces the expected tenant Id:
var tenants = armClient.GetTenants();
foreach (var t in tenants)
{
    Console.WriteLine($"{t.Data.DisplayName} - {t.Data.TenantId}");
}

using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;

var armClient = new ArmClient(new InteractiveBrowserCredential());
var tenants = armClient.GetTenants();
foreach (var t in tenants)
{
    Console.WriteLine($"{t.Data.DisplayName} - {t.Data.TenantId}");
}

$ dotnet run
Default Directory - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Contoso Marketing Company - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

I censored the ids just in case, but they are a bunch of numbers and characters. The same ones that show up in Azure Portal.

And one last thing, the Azure.ResourceManager package released version 1.0.0 recently - do you get any different results with it?

Nope

Wait, I forgot to mention the azure subscription that I had enabled had become disabled:
$ az account list --all --query '[].{isDefault: isDefault, name: name, state: state}'
[
  {
    "isDefault": true,
    "name": "Pase para Azure: patrocinio",
    "state": "Disabled"
  }
]

But it is marked as default anyways so it shouldn't matter. Besides, I had this error even when the state was "Enabled" as I show in the reproduction steps of this issue.

Could you reproduce with the following changes?
using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();
var options = new InteractiveBrowserCredentialOptions();
options.Diagnostics.IsAccountIdentifierLoggingEnabled = true;
var armClient = new ArmClient(new InteractiveBrowserCredential(options));

This should produce a log output like this:
[Informational] Azure-Identity: AzureCliCredential.GetToken invoked. Scopes: [ https://management.azure.com//.default ] ParentRequestId: 9e5d8def-f810-4a28-ae93-da32d0b80222
[Informational] Azure-Identity: Client ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Tenant ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. User Principal Name: <your username> Object ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Is the tenantId there the one you expected that contains the subscriptions?

@christothes
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Resources;
using Azure.Core.Diagnostics;

using AzureEventSourceListener listener = AzureEventSourceListener.CreateConsoleLogger();
var options = new InteractiveBrowserCredentialOptions();
options.Diagnostics.IsAccountIdentifierLoggingEnabled = true;
var armClient = new ArmClient(new InteractiveBrowserCredential(options));

I executed dotnet run but got no output at all.

oh - sorry, you should also include the part that gathers the Subscription 😄
var subscription = await armClient.GetDefaultSubscriptionAsync();
Console.WriteLine(subscription.Id);

@christothes I got lots of output. I did Ctrl+F and searched the id of my subscription id and found nothing. Same with the tenant id.

Is there a line that contains: Azure-Identity: Client ID: ? It should look like my example, but with different guid values.
One other thing to note, this logging requires Azure.Identity version 1.6.0

@christothes Yes, but for some reason the ids are not the ones I expected them to be.

@christothes It's late here and I'm going to bed. I won't be available until tomorrow 9/April/2022 at 19:00 CEST aprox. Send me messages if you want but don't expect them to be answered until then. Bye.

Hi @adriancuadrado  - It seems that you are using a Live account, if the tenantId is F8CDEF31-A31E-4B4A-93E4-5F571E91255A (live.com tenant id).
Are you logging into an AAD tenant in which this live account is guested? If so, the issue is that AAD is defaulting to this live account tenant, and you'll need to tell it which tenantId you intend to target. If this account were a native AAD account to the target tenant, I believe you would not need to specify the tenantId.

@christothes I think I am having trouble understanding what you say. The only tenant that I have is "Default Directory". I used to have another, but I removed it yesterday. The 2 subscriptions that I get running az account list --all are from the "Default Directory" anyways.

Is the account you are logging into the browser prompt with a Live account or a native AAD account?

@christothes It's a GitHub account actually.

@christothes It's a GitHub account actually.

Because the home tenant of the account (the live.com tenant) is different than the target tenant that you intend to list subscriptions for, the target tenantId must be specified in the credential. This is unfortunately a quirk with live accounts.

Should be Authorized

@christothes If by saying "the target tenantId must be specified in the credential" you meant that I have to specify the --tenant parameter when running az login then it didn't work. I ran az login --tenant 5c41... and then dotnet run, but I am still having trouble. If you meant that I have to specify the tenant in the code like this:
new ArmClient(new InteractiveBrowserCredential(new InteractiveBrowserCredentialOptions() { TenantId = "<<home tenant ID returned by az login>>" }))

then I think this kind of behaviour should be documented. Also I don't understand what exactly should be authorized accourding to @Stordlord.

Yes, the latter. Thanks for the feedback! We'll look at improving the documentation for this scenario.

From reading through this issue, it seems that InteractiveBrowserCredential DOES NOT WORK for non-AAD accounts. Is this correct? If so, is there a known workaround? Long story short I don't want to depend on the Azure CLI

From reading through this issue, it seems that InteractiveBrowserCredential DOES NOT WORK for non-AAD accounts. Is this correct? If so, is there a known workaround? Long story short I don't want to depend on the Azure CLI

No, that's not correct. But you would need to specify the AAD tenantId of the Azure resource you are authenticating to in the credential options.

Am I able to get the tenant ID based on the browser context?

Am I able to get the tenant ID based on the browser context?

Could you explain what you mean by the browser context?
Some Azure services advertise the correct tenantId as an Oauth challenge and will do the right thing, assuming your user account has access to the resource in question. However, only a handful of them do this today (Storage, KeyVault, Tables)

Without hardcoding it, how do I get the tenant ID? Is there a call I can make?

@christothes I see there is a GetTenants() method but I need an ArmClient to do that. I am seeing if I try to get a list of subs from a picked tenant none get returned. Do I need to set something on ArmClient? Here is some sample code
var _credential = new InteractiveBrowserCredential();
var _armClient = new ArmClient(_credential);
var tenants = _armClient.GetTenants().ToList();

var subs = tenants.FirstOrDefault().GetSubscriptions().ToList();

// subs is empty here

@isaacrlevin If you are still having issues with this, I posted a workaround to Stackoverflow: https://stackoverflow.com/a/72699716/50151

@christothes I think the issue here is that, when we're designing applications for distribution to client users, we don't know in advance whether a) they'll be using a MS (or other federation provider) account and b) what the correct tenant ID would be. There doesn't seem to be any way within the SDK to list all the AAD tenant IDs associated with a user.

@christothes Thanks for the reply. I think the problem arises when we don't/can't know the correct tenant ID ahead of time.  There is no way of interrogating for resources in other tenants, which would be a precursor to identifying which tenant to specify.
To paint a picture for you, my scenarios is an installer application, where the first step is to allow the user to select a subscription in which to create some resources. I can send them to log in interactively, but if they are have a Live/MS account, they'll have a different tenant ID to any of their subscriptions, which means I hit a wall.
Frankly, I think the behaviour is already correct in most cases - normally I probably wouldn't want to see a bunch of tenant IDs for each directory a user is a guest in. I think, though, that the way Live/MS accounts are handled is a problematic exception to this. It's a non-intuitive hurdle that will disproportionally affect users who have least experience with AD.

Thanks @christothes - you've nailed the use case I'm aiming for.
One issue I have is with the last line of your reply - how do I use the tenant ID to list the subs, or do anything else with it? It feels like I need to create a new ArmClient. What's the easiest way of doing this without prompting the user to login again? (I can see that there are some tenant ID related properties in the DefaultAzureCredentialOptions class, but it's not obvious which to use...

@christothes That works, but means I'm triggering an interactive login twice. Is there some way to do the same thing more "quietly"?
I've tried using the DefaultAzureCredential as below....
var armclient2 = new armclient(new defaultazurecredential(new defaultazurecredentialoptions
{
    interactivebrowsertenantid = tenantid,
    sharedtokencachetenantid = tenantid,
    excludevisualstudiocodecredential = true,
    excludevisualstudiocredential = true
}));

But I get an error about the grant having expired.
Is there some way of recycling the token from the first time I call InteractiveBrowserCredential, whilst specifying a tenant ID?

Unfortunately, they are two different tokens.

I see. This sort of loops back to my earlier point that this behavior is sort of broken for users who are guests in their the tenant that holds their subscription(s) - e.g. those who sign in with an MS / Live account.
This probably isn't the place to make these suggestions (please feel free to point me to somewhere more appropriate), but the following feel like sensible improvements:

When the user has zero subscriptions in their default tenant, but has exactly one other tenant containing some subscriptions, select this one automatically. This would solve the (I would guess pretty common) situation of MS / Live accounts owning subscriptions.
Have some mechanism on the login screen to allow the user to specify which tenant to use, when doing an interactive login.
Provide some mechanism of hopping from one tenant to another after the user has authenticated. My question about re-using a token was aiming towards this, but clearly wasn't quite right. Since I can move between tenants in the portal, it feels like it should be possible to do something similar using the SDK.

Is there a proper place to make suggestions? I feel like original "bug" is working as designed, but there's still some options for making the experience more seamless.

@christothes I'm reading the thread and if my understanding is correct you added the needs-author-feedback label because you needed more feedback from @tdwright. If that's the case then I'd like to remember you that the label won't go away until not @tdwright, but the original author of the issue answers. I think you have to ask @tdwright to create a separate issue to keep discussing with him his problems.


ClrMD is moving to dotnet/diagnostics

The ClrMD repo is moving to be part of https://github.com/dotnet/diagnostics.  I plan to complete the move some time in April.
This move is being made purely to reduce my development overhead.  I spend a LOT of time behind the scenes just maintaining this repo and fixing weird issues with our CI system.  Moving the code into dotnet/diagnostics will let me spend more time actually working on ClrMD instead of just keeping the lights on.
If you have any questions about this, please let me know.  Here's some quick answers to things that may come up:

The license will not change (still MIT).
I will still be working on the project.  If anything it gives me more time to work in diagnostics.
I will be manually porting any actionable issues from this repo to there.
New bugs and pull requests go to the diagnostics repo.

Please let me know if anyone has any questions.  Thanks!

We are abandoning this effort.  ClrMD will remain here.


⚠ Bofrost.de has degraded performance

In ab1529f, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1502 ms

Resolved: Bofrost.de performance has improved in 42e9fab.


Update Docs on Security Context and Policy

This is a...

[x] Feature Request
[ ] Bug Report

Look at the overall body of topics related to security context and policy. Do we have the right set of topics? Have we covered all the important points?. Is there overlap that could be reduced? Here are some of the existing topics:
Pod Security Policies
Securing a Cluster
Using Admission Controllers
Security Context Design Document
Ownership Management Design Doc
Configure a Security Context for a Pod or Container
After choosing a set of topics, apply the appropriate template: Concept or Task. Edit the topics to comply with our style guide. Check for accuracy.

/remove-lifecycle rotten
/lifecycle frozen
/reopen

/language en

/priority important-longterm
Is that OK?

I'm going to close this in favor of issue #25119.
/close


pipeline remove unuseful scanner scheduling

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


Bring back support for mass assignment using accessors?

Hey folks, we are trying to upgrade virtus from 0.0.9 to 0.2.0 and because of the changes made to mass assignment it actually broke some of our specs as we didn't have some of our attributes declared as a virtus attribute, we have our own logic on getters and setters that we think would not fit into an attribute type kinda thing.
To give you some context, we are using virtus for dealing with API resources and we use attributes= to build the object from a JSON response. The reason we believe those accessors wouldn't fit into a attribute type / class is that they are like "virtual properties", used to extract and reconstruct values based on the API data.
The code would be something like this:
class Movie
  # ... a bunch of virtus attributes ...
  attribute :main_category, String
  attribute :subcategory, String

  def categories
    [self.main_category, self.subcategory]
  end

  def categories=(all_categories)
    self.main_category = all_categories.first
    self.subcategory = all_categories.last
  end
end

With that we can get extract the "composite" attribute when fetching from the API and simplify our use on the context of our application and rebuild the values when sending data back to the API.
Does it make sense to you guys? If it does, what do you think about it?
Keep up with the good work!
Cheers!

@solnic I don't have a problem with it. I think the main reason we didn't do that from the start is that we couldn't think of a use case where it was needed, and decided to go with the simpler implementation.
Now that we have something reasonable as a use case, I think we could change the API to allow all public mutators to be accessible via #attributes=. We could use a similar implementation to what we do in dm-core, so that we avoid creating Symbol objects in #respond_to? or #public_method_defined?.

@solnic Also IMHO we should probably bump to 0.3.x after this change.

@dkubb yes we should esp. that I already merged a pull request from @mbj which breaks the api of EV heh

@solnic "breaks" ?

And if I'd not be 24h up, I'd not commented here, since my neurons are to slow to catch the "API"... Thought about a differend break... sorry.

Ahh yeah, breaks from the pov of the user, but really it's an intentional change. Most changes we make now are intentional.

@mbj nothing to worry about :)

@dkubb for our use case and for what I've read of Virtus code, it seems that it would be enough to change #set_attributes to do want we want as we have a separate way of defining what gets posted back to the API (we don't rely on Virtus::InstanceMethods#attributes). Also, from what I could see from having a quick look on dm-core code and by doing a little spike, I found out that DataMapper::Resource#attributes returns only properties defined on the resource and not all "getter-like" methods (which actually makes sense :-)
BTW, I was also thinking that another use case for this would be a plugin to support something like ActiveRecord's accepts_nested_attributes_for that could not only do the required type coercion but also hook in some persistence logic like AR does (without having to override Virtus::InstanceMethods#set_attributes on the plugin).
What do you guys think?
I actually have a somewhat working code on my fork already (check out the accessors-mass-assignment branch), tomorrow I'll try that with our app code and see what happens.
Cheers!

@fgrehm I'm not sure if we need something like accepts_nested_attributes_for give that Virtus supports EmbeddedValue (or maybe I'm missing something?)

How about allow a some DSL to create virtual attributes instead?
E.g.
class Movie
  # ... a bunch of virtus attributes ...
  attribute :main_category, String
  attribute :subcategory, String

  # virtual attribute
  attribute :categories, Virtual,
               :getter => lambda{ [self.main_category, self.subcategory] },
               :setter => lambda{|v| self.main_category = all_categories.first
                                              self.subcategory = all_categories.last }
end

This way no change to #set_attributes is needed?

@aq1018 I think there's diminishing returns with any DSL approach. Once you start putting procs or other logic inline you're probably better off just providing ways to do something using plain ruby classes/methods/etc.

@fgrehm Are you willing to send a pull request? We could discuss the changes there :)

@solnic yup! i was on holidays for the last week and went missing for a while :-) I'll clean up the code right now and send the pull request after that

@fgrehm awesome, welcome back to the business haha :)


datepicked popup has inline styles

The template for datepicker popup has a hardcoded style attr (padding)

A short term workaround is to override the template and add a class - we will also be adding datepicker-popup-template-url support shortly for allowing to override this on an instance by instance basis.
This is obviously not ideal though, and we will want to move this out.

I am closing this, as overriding the template will be your best option here.


Dialogic dialog can be activated multiple times when hitting different activation buttons in quick succession, making variable count tracking for events difficult.

Godot 3.5.1 Dialogic 1.4.5
Dialogic dialog can be activated multiple times when hitting different activation buttons in quick succession, making variable count tracking for events within plug-in difficult.
Scenario:
I have a godot scene with four different dialogic dialog conversations within.  You need to activate all four to move forward.
I count each conversation at the end of each dialogic dialog, with a variable counter to see how many times the conversation happens.  After a count of 4 conversations, it calls a custom function in my autoloader to clear the .tscn and jump into the next .tscn.
But players can hit the mouse button, then players can hit return or spacebar to speed up dialog, which is what I do when I have already read a scene.  But you can active a dialogic dialog multiple times if it is done before the dialog is finished launching...
This particular situation, my scene skips all other dialogs if a player spams multiple activation buttons.
Dialogic Default Action has return, spacebar, x, left mouse, x, and controller as default activate button.
One could just have one activate button to get around this problem, but the quality of experience will suffer.
Players can inadvertently or intentionally spam this on second play throughs.
The dialogic dialog should only fire once.

I'm a bit confused of what you want. If you don't want to spawn another dialog if one is already playing, then add a check before adding it.
E.g.:

func _on_something_happened():
    if !Dialogic.has_current_dialog_node(): # make sure only one dialog can exist
        var dialog = Dialogic.start('mytimeline')
        add_child(dialog)

Does that help? Maybe I misunderstood. Also please, shorter titles :laughing:. Maybe "Quickly activating dialog multiple times makes counting hard" or something similar, but not a big problem, just for next time. Information can go in the initial comment.

Yep, just what I needed.  Thank you!
Can do on shortening long titles.  👍🏼
Being concise will be a WIP. ;P
Cheers!

Worked like a charm.
For prosterity if others look this up...
Had to "Extend Dialogic" on top of my script to have access to the function ( # I had "Extends Node" instead )
Thanks again Jowan!


STYLE: Remove unnecessary iterator GoToBegin() calls from filters

When an iterator is just constructed, it is usually already at its begin position.

Looks good on a glance.
Was this operation completely manual?

Thanks @dzenanz For this PR I looked for the regular expression ^  \w+\.GoToBegin\(\); in .hxx files in ITK\Modules\Filtering. For each <iterator>.GoToBegin() call, I checked "manually" if that specific iterator was just constructor (to ensure that it was still at its begin).


Why the 0.24 release has ben retagged ?

I've just noticed that the 0.24 release has been recreated starting from the current main.
Is there a specific reason why a 0.25 release is not being produced?
Thanks!

The official version appears here:

and should be the reference to the docker.
work against that.
There was a pre-release of 0.24 in the past. This week was the official release, and now the docker version is locked


services/*: Add ReadCallbackFunc for WriteSegment

Signed-off-by: Xuanwo<EMAIL_ADDRESS>

 Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ internal/cmd/service/meta.go  -2

Clones removed
==============
+ services/qingstor/storager.go  -1

See the complete overview on Codacy


Version 1.0.0

What's required to get the first major version released?

[] Work out an approach for no-release versions.

Should it error?
Return the current version? What rule would that return?
Does it need configuration options?

[] Work out an approach for testing git specifics (PlainOpen, Tags etc)

Current no-release version behavior (v0.0.1):
Shows the current semver version
$ git-semver
0.0.1

Shows a bump rule of nothing
$ git-semver --rule

This is actually desired behaviour for tools like poetry.
poetry version ""

The above will output the current version without bumping. Allowing this to be used in CI without generating a new version for these types of releases and without erroring.


Update to 4.1

and noarch.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Component arrays rendered alongside siblings render as [object Object]

If I wrap the array in a parent element (e.g., as the only child inside a div) everything renders fine
import * as forgo from "forgo";

function Component() {
  return {
    render() {
      const vals = [1, 2, 3];
      return (

          Header
          {vals.map((val) => (

{val}

          ))}

      );
    }
  };
}

function ready(fn: any) {
  if (document.readyState !== "loading") {
    fn();
  } else {
    document.addEventListener("DOMContentLoaded", fn);
  }
}
ready(() => {
  forgo.mount(<Component />, document.getElementById("root"));
});

Sandbox

Hmm. So what's happening here is, the children is an array containing [, [...]].
Forgo right now doesn't know how to render this. I'll fix it right away.

Hmm. So what's happening here is, the children is an array containing [, [...]].
Forgo right now doesn't know how to render this. I'll fix it right away.

Fixed in v0.0.32.
The children array is flattened before rendering, so there aren't nested arrays (1 level deep) anymore.

Fixed in v0.0.32.
The children array is flattened before rendering, so there aren't nested arrays (1 level deep) anymore.

Perfect, thanks! Confirmed working in my project.

Perfect, thanks! Confirmed working in my project.


Error , not playing.

Hello, i am trying to use the plugin to play some videos, but i get the following error;
vue-canvasvideo.js?e6d8:1850 Uncaught TypeError: Cannot read property 'currentTime' of undefined
second question what are the video supported formats? i tried m3u8 and mp4, did not work , error mentioned.
Thank you.

重新启动一下项目就好了

I have the same errors and also this one:
Uncaught TypeError: Cannot read property 'offsetWidth' of null
Uncaught TypeError: Cannot read property 'currentTime' of undefined
How can we fix these errors?
Thanks


Log sink not sending to syslog server

I put in place a log-sink, which functioned for about 36 hours before it stopped sending.
This is a cluster with 3 hosts running v20170116.0p2. The destination is a LogDNA (syslog, non-SSL) endpoint, and we have another cluster sending to the same syslog URL, and it is working correctly. The other cluster is running v20170207.0.
There are 2 logaggregator processes running. Nothing in their respective logs (in /var/log/flynn/<logaggregator appid>.log on each of the hosts) seems to be out of the ordinary.
In the sinks table, I have about 10 sinks that are deleted (have non-null deleted_at values) from my attempts at setting up a working sink previously.
I've removed the existing sink, restarted the logaggregator processes, and added a new sink.
When I did this, a small handful of outdated log entries were sent to the destination. It seems like a random assortment of entries from a couple of apps (~200), plus about 5 from the router and 100 or so from logaggregator. All of the entries except the very last one from logaggregator have timestamps from before the log entries stopped coming in several days ago. After this batch, there are no more log entries sent.
In /var/log/flynn/flynn-host.log, I see the following entries with similar time codes on each host:
t=2017-02-09T15:25:19+0000 lvl=info msg="connecting to sink" app=host pid=20604 host.id=flynn05.example.com component=logmux fn=addSink
t=2017-02-09T15:25:19+0000 lvl=info msg="got cursor" app=host pid=20604 host.id=flynn05.example.com component=logmux fn=addSink cursor.timestamp=2017-02-09T15:23:
37+0000 cursor.seq=2292264

But that's the last mention of logmux in those logs.
Any more information I can gather? Ideas on how to troubleshoot further?

@RobinDaugherty All of the external sync sending is done directly from flynn-host, so the logs from each host would be useful. flynn-host collect-debug-info would grab that, you can also grab /var/log/flynn/flynn-host.log directly.

I was just coming to search for this same issue.  I am seeing the same thing?  Is this closed due to lack of context or is it fixed?

@landonclark we closed this due to lack of information. As previously mentioned, the logs from your cluster would be useful in debugging this.

What's the preferred way to send things to you that are too large for gist and attachment?  my collect-debug-log is about 58MB?


Fix save vCenter credentials functionality

This PR fixes an issue where vCenter credentials are not saved unless the create VM wizard is completed, regardless of success or failure. These changes cause the kubevirt.io/temporary label to be removed from the secret if the "Remember vCenter credentials" box is checked and adds the label with a value of true if the "Remember vCenter credentials" box is unchecked; however, these changes are only made if the connection check is successful.
Bug: https://bugzilla.redhat.com/1714004
Depends on: kubevirt/web-ui#399
Original PR: https://github.com/kubevirt/web-ui-components/pull/489

Pull Request Test Coverage Report for Build 2037

26 of 44 (59.09%)  changed or added relevant lines in 7 files are covered.
53 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-1.3%) to 81.434%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/k8s/requests/v2v/createV2VvmwareObject.js
0
1
0.0%

src/k8s/requests/v2v/importVmware.js
0
4
0.0%

src/components/Wizard/CreateVmWizard/stateUpdate/providers/vmWareStateUpdate.js
9
22
40.91%

Files with Coverage Reduction
New Missed Lines
%

src/k8s/util/utils.js
2
60.0%

src/k8s/objects/v2v/vmware/vmWareSecret.js
4
9.09%

src/k8s/request.js
5
80.97%

src/k8s/requests/v2v/utils.js
8
5.0%

src/k8s/requests/v2v/importVmware.js
34
9.59%

Totals

Change from base Build 2027:
-1.3%

Covered Lines:
3882

Relevant Lines:
4559

💛  - Coveralls

This backport comes without snapshots from #489.
As activity on the stable branch is getting lower and lower and bug-fix release is requested to be asap, let's accept that.


Additions to the Debugging Suite

Groundings per rule
Average dissatisfaction per rule

The ability to output ground rules in the CLI was added recently (see #180).


IsMouseButtonPressed returns true even if the button is not pressed

[x] I tested it on latest raylib version from master branch
[x] I checked there is no similar issue already reported
[x] My code has no errors or misuse of raylib

Issue description
When only the left mouse button is pressed, the IsMouseButtonPressed function returns true for both MOUSE_LEFT_BUTTON and MOUSE_RIGHT_BUTTON for some reason, but after releasing it IsMouseButtonReleased returns true for MOUSE_LEFT_BUTTON and false for MOUSE_RIGHT_BUTTON as expected.
This issue exists for me on raylib 2.6 from releases page and on latest version from master branch, but version 2.5 from releases works correctly.
Is there something wrong with my code or is this a bug?
Environment
uname -a
Linux krot 5.4.18-1-MANJARO #1 SMP PREEMPT Thu Feb 6 11:41:30 UTC 2020 x86_64 GNU/Linux
Also tested on Arch machine with raylib 2.6 installed from Arch repository and I get same output.
Code Example
#include <raylib.h>
#include <stdio.h>

int main() {
    InitWindow(800, 450, "");
    SetTargetFPS(60);

    while (!WindowShouldClose()) {
        BeginDrawing();

        ClearBackground(WHITE);

        bool pressed_l = IsMouseButtonPressed(MOUSE_LEFT_BUTTON);
        bool pressed_r = IsMouseButtonPressed(MOUSE_RIGHT_BUTTON);
        bool released_l = IsMouseButtonReleased(MOUSE_LEFT_BUTTON);
        bool released_r = IsMouseButtonReleased(MOUSE_RIGHT_BUTTON);

        if (pressed_l || pressed_r || released_l || released_r) {
            printf("%d %d %d %d\n",
                    pressed_l,
                    pressed_r,
                    released_l,
                    released_r);
        }

        EndDrawing();
    }

    CloseWindow();

    return 0;
}

Output:
1 1 0 0        // LMB pressed
0 0 1 0        // LMB released

Expected output is:
1 0 0 0        // LMB pressed
0 0 1 0        // LMB released

I also had an issue similar to this. On the first frame after pressing the left mouse button, IsMouseDown returns true for the left button, and the expected values for the right and middle buttons. From the next frame onwards, until the left mouse button is released, IsMouseDown returns true for left, right, and middle mouse buttons, regardless of whether the right/middle buttons are pressed.

@codekrot @WonkySpecs yes, I messed it up lately when trying to map touch inputs with mouse inputs... because touch inputs are already mapped to mouse inputs in another side of the code...
Reverted changes in commit https://github.com/raysan5/raylib/commit/946a6cb2809883f9b287ac889beb835deca0f571. Please, could you verify it works as expected now?

Yep, everything works as expected for me. Thank you for fixing it.

Same here, thanks :+1:


labels: eliminate most allocations and improve perf by 15-65%

This commit changes the labels functions to step through labels section-by-section instead of splitting them and thus allocating a slice.
Where possible allocations are reduced to 0.
benchmark                         old ns/op     new ns/op     delta
BenchmarkSplitLabels-12           41.4          34.9          -15.70%
BenchmarkLenLabels-12             25.8          15.5          -39.92%
BenchmarkCompareDomainName-12     107           39.3          -63.27%
BenchmarkIsSubDomain-12           348           120           -65.52%

benchmark                         old allocs     new allocs     delta
BenchmarkSplitLabels-12           1              1              +0.00%
BenchmarkLenLabels-12             0              0              +0.00%
BenchmarkCompareDomainName-12     2              0              -100.00%
BenchmarkIsSubDomain-12           6              0              -100.00%

benchmark                         old bytes     new bytes     delta
BenchmarkSplitLabels-12           32            32            +0.00%
BenchmarkLenLabels-12             0             0             +0.00%
BenchmarkCompareDomainName-12     64            0             -100.00%
BenchmarkIsSubDomain-12           192           0             -100.00%

Codecov Report

Merging #1007 into master will increase coverage by 0.08%.
The diff coverage is 97.4%.

@@            Coverage Diff             @@
##           master    #1007      +/-   ##
==========================================
+ Coverage   54.63%   54.72%   +0.08%
==========================================
  Files          41       41
  Lines        9842     9857      +15
==========================================
+ Hits         5377     5394      +17
+ Misses       3438     3437       -1
+ Partials     1027     1026       -1

Impacted Files
Coverage Δ

labels.go
96.61% <97.4%> (+3.4%)
:arrow_up:

server.go
67.67% <0%> (-0.28%)
:arrow_down:

Continue to review full report at Codecov.

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


updating setup.py to include mphys module

current setup.py is missing include for mphys module (when installing using $pip install .)
Also adding optional dependencies for docs, testing and mphys modules

Right now, the top-level init file is empty for pyfuntofem; so using pyfuntofem* might not work/be best practice.

Right now, the top-level init file is empty for pyfuntofem; so using pyfuntofem* might not work/be best practice.

Do you mean funtofem*? `pyfuntofem's init doesn't appear to be empty

@bburke38 what were you thinking should be added to the init.py? Both import funtofem.mphys and from funtofem import mphys appear to work on my end

Right now, the top-level init file is empty for pyfuntofem; so using pyfuntofem* might not work/be best practice.

Do you mean funtofem*? `pyfuntofem's init doesn't appear to be empty

Yes, I meant funtofem*.

@bburke38 what were you thinking should be added to the init.py? Both import funtofem.mphys and from funtofem import mphys appear to work on my end

I may be mistaken, if it seems to be working on your end and it's passing the tests then we should be set.


PHPUnit 8.x requires that setUp() and tearDown() be declared as void

Errors when running PHPUnit 8.0.1:
PHP Fatal error:  Declaration of Illuminate\Foundation\Testing\TestCase::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /[path]/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php on line 12
PHP Fatal error:  Declaration of Illuminate\Foundation\Testing\TestCase::tearDown() must be compatible with PHPUnit\Framework\TestCase::tearDown(): void in /[path]/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php on line 12

Closing due to @driesvints much more comprehensive PR.


Anisotropic refinement in MFEM

Hello,
I'd like to ask how one should do a anisotropic refinement in MFEM.
I've found Mesh::GeneralRefinement() but I didn't find a function argument anywhere nearby so that I can set something different from the default type = 7 which is isotropic refinement.
It seems that all refinement types are drawn from the refinement flag for the first mesh element which is set to be isotropic by default.
Am I missing something? Certainly I can add a method similar to Mesh::GeneralRefinement() with additional parameter, but I don't want to add redundant routines if there exists already.
Thanks,
Kirill

Hi Kirill,
You can refine a mesh anisotropically for example like this (I'm refining
elements 0-6):
Array refs;
refs.Append(Refinement(0, 1)); // X split
refs.Append(Refinement(1, 2)); // Y split
refs.Append(Refinement(2, 4)); // Z split
refs.Append(Refinement(3, 3)); // XY split
refs.Append(Refinement(4, 5)); // XZ split
refs.Append(Refinement(5, 6)); // YZ split
refs.Append(Refinement(6, 7)); // isotropic split (default)
mesh.GeneralRefinement(refs);
Note that anisotropic refinement in parallel is not finished yet. You
should be able to initialize a ParMesh with an anisotropic serial mesh but
you won't be able to refine it further.
Hope that helps,
Jakub
On Thu, Aug 24, 2017 at 7:31 PM, kvoronin<EMAIL_ADDRESS>wrote:

Hello,
I'd like to ask how one should do a anisotropic refinement in MFEM.
I've found Mesh::GeneralRefinement() but I didn't find a function argument
anywhere nearby so that I can set something different from the default type
= 7 which is isotropic refinement.
It seems that all refinement types are drawn from the refinement flag for
the first mesh element which is set to be isotropic by default.
Am I missing something? Certainly I can add a method similar to
Mesh::GeneralRefinement() with additional parameter, but I don't want to
add redundant routines if there exists already.
Thanks,
Kirill
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mfem/mfem/issues/257, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABSW-_VquHctv0zt9PRzNUEPHzCH6X-Yks5sbbOMgaJpZM4PBshl
.

@jakubcerveny,
Thanks for the reply!
May I also follow up with the question if this works with hexahedral meshes? As far as I see, GeneralRefinement() calls LocalRefinement which is using Bisection() in 3D which works for  tetrahedrons (and triangles). Am I right?
Thanks,
Kirill

No problem. The answer is yes. For hexahedra and quads there is a separate
code path that goes into the class NCMesh, which supports nonconforming
refinement with hanging nodes. This is completely different from the
bisection of triangles and tets.
Jakub
On Thu, Aug 24, 2017 at 9:42 PM, kvoronin<EMAIL_ADDRESS>wrote:

@jakubcerveny https://github.com/jakubcerveny,
Thanks for the reply!
May I also follow up with the question if this works with hexahedral
meshes? As far as I see, GeneralRefinement() calls LocalRefinement which is
using Bisection() in 3D which works for tetrahedrons (and triangles). Am I
right?
Thanks,
Kirill
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mfem/mfem/issues/257#issuecomment-324736872, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABSW-_jSLVWwiN5-An3FsWdtG9xckfXXks5sbdI_gaJpZM4PBshl
.


IconRegistry: Add api for listing available icons

Feature Description
You should be able to list available icons using the MatIconRegistry. Currently this is not exposed or really tracked besides for elements currently in the dom.
Use Case
Creating an icon picker from all available icons without passing in predefined lists or loading config files which generated your icon sets again.

I think that this feature is a bit too niche to warrant adding an API. Since the application controls the icons that are going into the icon registry, it does have the ability to know the icons available.


[Bug] optional chaining typescript error

Describe the bug
' const renderTitle = (title?.length > 0) || (subTitle?.length > 0);'
In the above grammar, the type script error "Object is passively 'undefined'"
To Reproduce
Steps to reproduce the behavior:

vscode open
main/Card/index.tsx open
Look at the 99th line.

Screenshots

Desktop (please complete the following information):

OS: max os
Browser chome

const renderTitle = (title?.length ?? 0) > 0 || (subTitle?.length ?? 0) > 0;


Update s3, s3-transfer-manager to 2.20.77

About this PR
📦 Updates

software.amazon.awssdk:s3
software.amazon.awssdk:s3-transfer-manager

from 2.20.67 to 2.20.77
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "software.amazon.awssdk" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "software.amazon.awssdk" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #902.


add new icons for social media so they are all the same size

Fix the size of the icons as the slack icon was a different size
The svgs needed being re uploaded as there canvas sizes e.t.c where different

👍 :shipit:


Clean the repo before storing circleci artifacts

This comes from #97 and some of the related discussion in #99.  Specifically, https://github.com/spacetelescope/notebooks/issues/97#issue-442833535 is relevant here - now that #99 is merged we may want to do what @obviousrebel suggests there of cleaning before storing the artifacts.
My primary concern with that is mainly https://github.com/spacetelescope/notebooks/pull/99#pullrequestreview-245622676 - that is, that maybe we want those artifacts to help debug when something goes wrong.  But maybe I'm worrying too much?  Or we could do this provisionally but if we run into issues later we can roll it back?
cc @laurenmarietta (and @obviousrebel if you have any residual opinion on this)

I do see the value of keeping all artifacts, they were helpful in finding an issue found in PR#77 but they do add significant time to the build.
Perhaps creating an environment variable called CLEAN in circleCI that would determine if the repo should be cleaned or not cleaned prior to storing artifacts? That way, if the need arises to debug or view artifacts this environment variable could easily be switched to not clean and store all artifacts to help view useful logs and such.


Relicense as Apache 2.0

A recent revelation that significant portions of this code base had been quietly copied into https://github.com/pinterest/pymemcache via https://github.com/pinterest/pymemcache/commit/cff5abfad59baa593996fe7e240fd3944e2c4af2 has lead me to make a decision to relicense this project under Apache 2.0, adding a NOTICE file per clause 4(d) of the Apache 2.0 license.
This issue will serve as a formal request to @sontek and @chriso for permission to do so, in light of their contributions.
@sontek and @chriso, please reply with either a confirmation or any objections.

:star:

:+1:

Thank you both for quick replies.


Improve search of AOO

We noticed that it's not easy to locate a PEC address linked to an office (AOO) because of a few issues that break the experience:

PEC addresses are indexed only as keywords but they should be also searchable as full-text strings (this way<EMAIL_ADDRESS>would be listed also when searching "torvergata");
office codes are case sensitive ("dicii" != "DICII") but they should be searchable as case-insensitive;
The name of the root entity (for example "Universita' degli Studi di Roma 'Tor Vergata'") is not displayed along with its offices' names (for example "Dipartimento..") and it's not used as a search field. So if I search for "Tor Vergata" I don't see its departments listed because of course there's no "Tor Vergata" string in their names. We should search both in the office names and in the root entity names.
The office names are apparently indexed as keywords and not as full-text; this might because by the fact that I didn't recreate the mapping after implementing #47).

If impleenting these things we should consider ditching the nested mapping and using a flat list that we can import from this file:
https://www.indicepa.gov.it/public-services/opendata-read-service.php?dstype=FS&filename=pec.txt
Apparently, that file contains everything we need except for "tipo_amm" which the crawler could easily join from the other CSV files.

It might have more sense to use a "flattened" version since it matches all of our use cases. We could lose office_code which is not a big deal perhaps.
Ex:
PCM	Commissario straordinario per l'attuazione dell'Agenda digitale	UO	Presidenza del Consiglio dei Ministri, Ministeri e Avvocatura dello Stato	Lazio	RM	Roma<EMAIL_ADDRESS>pec

As discussed, share the new Elasticsearch mapping with me and I'll have it populated by the crawler.

Also, let's include the fiscal code since we can get it easily.

And let's include sito_istituzionale needed by https://github.com/italia/developers-italia-backend/issues/91

New mapping by @sebbalex:
{
    "settings": {
      "index": {
        "analysis": {
          "filter": {},
          "analyzer": {
            "autocomplete": {
              "tokenizer": "autocomplete",
              "filter": "lowercase"
            },
            "autocomplete_search": {
              "tokenizer": "lowercase"
            }
          },
          "tokenizer": {
            "autocomplete": {
              "type": "edge_ngram",
              "min_gram": 2,
              "max_gram": 20,
              "token_chars": [
                "letter"
              ]
            }
          }
        }
      }
    },
    "mappings": {
      "pa": {
        "dynamic": "strict",
        "properties": {
          "ipa": {
            "type": "text",
            "analyzer": "autocomplete",
            "search_analyzer": "autocomplete_search"
          },
          "description": {
            "type": "text",
            "analyzer": "autocomplete",
            "search_analyzer": "autocomplete_search"
          },
          "pec": {
            "type": "text",
            "analyzer": "autocomplete",
            "search_analyzer": "autocomplete_search"
          },
          "type": {
            "type": "keyword"
          },
          "cf": {
            "type": "keyword"
          }
        }
      }
    }
  }

Implemented in https://github.com/italia/developers-italia-backend/pull/98
I already populated a indicepa_pec index with this new logic so that we can test that the new structure works well for us. I'll merge that PR after we are sure that we want to switch.


Resolve Package Not Found

Hi,
Thanks for the code! I am getting this issue whilst trying to install the dependencies when using this line conda env create --file env.yml is there any solution to this. I have tried adding them to pip section.
Thanks in advance
`Solving environment: failed
ResolvePackageNotFound:

libpng==1.6.37=hbc83047_0
tk==8.6.8=hbc83047_0
xz==5.2.4=h14c3975_4
dbus==1.13.12=h746ee38_0
cython==0.29.15=py37he6710b0_0
pyqt==5.9.2=py37h05f1152_2
sqlite==3.31.1=h7b6447c_0
libtiff==4.1.0=h2733197_0
openssl==1.1.1d=h516909a_0
libedit==3.1.20181209=hc058e9b_0
ncurses==6.1=he6710b0_1
kiwisolver==1.1.0=py37he6710b0_0
cudatoolkit==10.1.243=h6bb024c_0
zlib==1.2.11=h7b6447c_3
libxml2==2.9.9=hea5a465_1
freetype==2.9.1=h8a8886c_1
libstdcxx-ng==9.1.0=hdf63c60_0
qt==5.9.7=h5867ecd_1
numpy==1.18.1=py37h4f9e942_0
python==3.7.6=h0371630_2
ld_impl_linux-64==2.33.1=h53a641e_7
glib==2.63.1=h5a9c865_0
libgcc-ng==9.1.0=hdf63c60_0
sip==4.19.8=py37hf484d3e_0
libuuid==1.0.3=h1bed415_2
fontconfig==2.13.0=h9420a91_0
libgfortran-ng==7.3.0=hdf63c60_0
scipy==1.4.1=py37h0b6359f_0
jpeg==9b=h024ee3a_2
expat==2.2.6=he6710b0_0
gst-plugins-base==1.14.0=hbbd80ab_1
ninja==1.9.0=py37hfd86e86_0
ptyprocess==0.6.0=py37_0
matplotlib-base==3.1.3=py37hef1b27d_0
gstreamer==1.14.0=hb453b48_1
libffi==3.2.1=hd88cf55_4
pcre==8.43=he6710b0_0
zstd==1.3.7=h0b5b093_0
readline==7.0=h7b6447c_5
mkl_fft==1.0.15=py37ha843d7b_0
mkl-service==2.3.0=py37he904b0f_0
tornado==6.0.3=py37h7b6447c_3
cytoolz==0.10.1=py37h7b6447c_0
icu==58.2=h9c2bf20_1
pywavelets==1.1.1=py37h7b6447c_0
numpy-base==1.18.1=py37hde5b4d6_1
mkl_random==1.1.0=py37hd6b4f25_0
pillow==7.0.0=py37hb39fc2d_0
scikit-learn==0.22.1=py37hd81dba3_0
libxcb==1.13=h1bed415_1
scikit-image==0.16.2=py37h0573a6f_0`

What OS do you use? I just test this conda environment file on my ubuntu machine, it works well.

I am using Windows 10

Win10 here, I solved some dependencies by removing version and package requirement, but following packages are only available on Linux, as far as I believe:

libgcc-ng
readline
ld_impl_linux-64
dbus
libuuid
libedit
ncurses
libstdcxx-ng
libgfortran-ng


New Option to Stop on Off

Changes to two files in this PR:

config.schema.json
index.js

Today's Behavior
Today when you turn off the device in homekit the plugin pauses the job and sends the robot home. For some users this behavior is not ideal. Perhaps they are stopping it to make things quiet for a minute, and the command to dock turns it back on.
Changes in PR
This PR gives a new config option "Do not send home on stop."

The default value is set as false, which will allow the plugin to operate at status quo.

If set to true, when the device is turned off in HomeKit, the Roomba job will stop and then end. The 'end' seems necessary to keep the robot from immediately turning back on at the next poll.

N.B.: The reason I chose the command 'stop' instead of 'pause' is because I could not find a way to properly implement a 'resume' command. We would need to identify that the robot is in a paused state and choose to send a 'resume' command instead of 'clean,' when turned back on, as sending clean command on a paused job results in an error. This way we are ending the job, which is not ideal, but allows the controls in HomeKit to be more consistently.
Let me know if you have any questions on this.

@rcoletti116 thank you, I have exactly this issue too. I wonder if we could also add an integration to empty the bin...

@rcoletti116 I've reviewed your changes and I'm excited about these changes.
Firstly, I could merge the manufacturer change immediately, and the serial number change—I was just looking at that in the code, to discover that it seems someone got halfway with it! Are you able to open a separate PR for those two so we can get them out of the way while we tackle this new feature? They're not related to the feature, so it will be better practice to separate them anyway!
On to the feature!
I've posted some review feedback; a few things that need tidying up. I can tidy that sort of thing up if you don't have time, but if you're keen to stay the course that's great!
I hoped that there would be something in the status we get back from Roomba to tell us whether it's paused or not, so we would know to send a resume. Did you investigate what comes back from dorita980 to determine that there wasn't anything? Alternatively, I'd be happy for us to send "clean", receive the error, understand it, and then send a "resume" instead. Actually, that sounds like it will be more efficient than waiting for a status before commanding our Roombas.
If you're happy to try that, please let me know how you get on, otherwise I am happy to take a look.
Thanks again!

I'll get on the code cleanup and separate PR.
I have been looking at dorita980 to get familiar with the functions, reading old issues and what documentation exists.  I've actually opened a PR there so we can finish the identify feature. There are more commands available that could be added, if they prove useful.
I've been trying to see how we can tell if the robot is in a paused state and so far have had no success. I'm happy for you to look at that too.
As for ideal functionality, I agree a separate "button" or stateless switch to send home is probably a good idea.

@karlvr for further interest; I wasn't sure where to comment this. I've found that the there is a field "lastCommand" in the "getRobotState" which will show as 'pause' after a pause command is given. Maybe this could be used to key a Clean vs. Resume.
lastCommand: {
command: "pause",
time:<PHONE_NUMBER>,
initiator: "manual"
},
I'm testing with the rest980 library which provides simple APIs for dorita980.

@rcoletti116 OK... I am making some major changes to the plugin today to improve a variety of things. I have discovered how we can tell whether we should clean or result. The cycle property in the cleanMissionStatus is "clean" and the phase is "stop" when it is paused while cleaning, while the cycle property is "none" when it's properly stopped.
I will make that information available for you to use...

Also, and I apologise, I have just completed the port of the code to TypeScript.

That was a fast overhaul. It may tap me out for a while. I'll need to get my fork back in sync without losing the things I've been working on and then start navigating the new code.
Sounds good on the phase and cycle. I was testing and looking there expecting to find something but didn't see that pattern. Good catch.

I'll adapt your PR in a branch. I know it's a massive change to the code… and I hope I'm right about this new polling approach being better. It just seems silly to me to be constantly asking Roomba's status all day every day every 30s or 5s when no one is looking at the Home app!

@rcoletti116 here's your branch adapted and slightly modified (to use a pause instead):
https://github.com/karlvr/homebridge-roomba2/tree/rcoletti116-main

@rcoletti116 I've added a contact sensor to show whether Roomba is in Docking mode... I wonder if it should be a switch instead, so we can activate that mode. Perhaps similarly the Running contact sensor could be a switch.

I believe the reason the 'running' is set as a sensor is because sensors can generate notifications, whereas switches cannot. I think that should stay a sensor.
A switch to 'dock' makes sense. It would need to be stateless I think to run the dock command and turn back off.

This is ready for review again. Changes pushed through to my main branch are updated here.

@rcoletti116 thank you; I've merged this in. I'm making quite a few changes at the moment, and of course a few of those from today weren't compatible. I'm going to knock this into shape now... please take a look at what I've done... I think perhaps we could consider using a stop() sometimes as well as a pause. More experimentation needed!

Got the beta installed. Thanks for cutting a beta release. So good news is the new functionality for noDockOnStop works correctly.
The "bad" news is the connections seem unstable. I get a lot of no responses and commands that don't go through.

@rcoletti116 thank you. Yes, I'm getting a similar experience. I've created an issue for it… I'll tag you in.


Change the translated [KO] docs to be clearer.

This PR change the translated [KO] docs to be clearer.

Translate into more understandable sentences
Remove unnecessary dart code files in the "KO" folder

Thanks

LGTM thanks!


Improve protocol settings + use requestMaxSize for all protocols

Since the merge of ports for all 3 core protocols, it's better now to setup the host and port settings in the config's root instead of the HTTP related config.
Also move maxRequestSize to root config and use it within websocket and socketio protocols

Codecov Report

Merging #55 into develop will increase coverage by <.01%.

@@             Coverage Diff             @@
##           develop      #55      +/-   ##
===========================================
+ Coverage    98.97%   98.98%   +<.01%
===========================================
  Files           16       16
  Lines          684      690       +6
===========================================
+ Hits           677      683       +6
  Misses           7        7

Impacted Files
Coverage Δ

var/app/lib/service/protocol/Websocket.js
99.09% <ø> (+0.02%)
:white_check_mark:

var/app/lib/service/protocol/SocketIo.js
98.7% <ø> (+0.05%)
:white_check_mark:

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 094eab4...29b41be. Read the comment docs.


Update for conversation support

Refs:

https://github.com/simonw/llm/issues/95

Docs for the chat() function I'm using: https://github.com/google/generative-ai-python/blob/62671ec8cfcf5e655e50c8baf42a33c773e0d620/google/generativeai/discuss.py#L248
Relevant types:
MessageOptions = Union[str, MessageDict, glm.Message]
MESSAGE_OPTIONS = (str, dict, glm.Message)

MessagesOptions = Union[
    MessageOptions,
    Iterable[MessageOptions],
]
MESSAGES_OPTIONS = (MESSAGE_OPTIONS, Iterable)

def chat(
    *,
    model: Optional[model_types.ModelNameOptions] = "models/chat-bison-001",
    context: Optional[str] = None,
    examples: Optional[discuss_types.ExamplesOptions] = None,
    messages: Optional[discuss_types.MessagesOptions] = None,
    temperature: Optional[float] = None,
    candidate_count: Optional[int] = None,
    top_p: Optional[float] = None,
    top_k: Optional[float] = None,
    prompt: Optional[discuss_types.MessagePromptOptions] = None,
    client: Optional[glm.DiscussServiceClient] = None,
) -> discuss_types.ChatResponse:

And docs:
        messages: A snapshot of the conversation history sorted chronologically.

            Turns alternate between two authors.

            If the total input size exceeds the model's `input_token_limit` the input
            will be truncated: The oldest items will be dropped from `messages`.

Got this to work:
llm -m palm 'What is the capital of France?'

The capital of France is Paris. It is the most populous city in France and the second most populous city in the European Union. Paris is a major center for business, finance, fashion, gastronomy, science, and arts. The city is home to many world-famous landmarks, including the Eiffel Tower, the Louvre Museum, and the Notre Dame Cathedral.

llm -c 'What do they like to eat there?'

French cuisine is known for its rich flavors, delicate textures, and beautiful presentation. Some of the most popular French dishes include:

Escargots: Snails cooked in garlic butter and herbs.
Coq au vin: Chicken stewed in red wine with mushrooms and bacon.
Boeuf bourguignon: Beef stewed in red wine with onions, carrots, and mushrooms.
Ratatouille: A Provençal dish of eggplant, zucchini, tomatoes, and other vegetables cooked in olive oil.
Soufflé: A light, airy dish made with eggs, flour, and milk.
Crêpes: Thin pancakes made from wheat flour, eggs, and milk.
Tarte Tatin: An upside-down apple tart.
Macarons: Small, round cookies made from almond flour, egg whites, and sugar.
Chocolate mousse: A light, airy dessert made from chocolate, eggs, and cream.
Île flottante: A dessert made from poached meringue floating in a custard sauce.
Profiteroles: Cream puffs filled with whipped cream or ice cream.
Crème brûlée: A custard dessert topped with a layer of caramelized sugar.

French cuisine is also known for its use of fresh ingredients, such as fruits, vegetables, and herbs. Many French dishes are made with seasonal ingredients, which means that the flavors of the food change throughout the year.
French cuisine is a complex and sophisticated cuisine that has been influenced by many different cultures over the years. It is a cuisine that is constantly evolving, and there are always new and innovative dishes being created.

llm -c 'Describe their flag'

The flag of France is a tricolor flag with three vertical bands of equal width, blue, white, and red. The blue band is on the hoist side (the side closest to the flagpole). The flag was adopted on February 15, 1794, during the French Revolution.
The colors of the French flag have a long and complex history. The blue and red colors were first used in the flag of the city of Paris in the 13th century. The white color was added to the flag in the 17th century to represent the House of Bourbon, the ruling dynasty of France at the time.
The colors of the French flag have been interpreted in many different ways. Some people believe that the blue represents the sky, the white represents the snow, and the red represents the blood of the French people who died in the French Revolution. Others believe that the colors represent the three estates of the French monarchy: the clergy (blue), the nobility (white), and the commoners (red).
The French flag is a symbol of French patriotism and national pride. It is flown at government buildings, schools, and other public places. The flag is also flown at sporting events and other occasions when France is represented.
The French flag is one of the most recognizable flags in the world. It is a symbol of France's rich history and culture. The flag is a source of pride for the French people and a reminder of the country's commitment to liberty, equality, and fraternity.

PaLM is pretty slow:
sqlite-utils "$(llm logs path)" 'select substr(response, 0, 20), duration_ms from responses order by id desc limit 3'

[{"substr(response, 0, 20)": "The flag of France ", "duration_ms": 6761},
 {"substr(response, 0, 20)": "French cuisine is k", "duration_ms": 17956},
 {"substr(response, 0, 20)": "The capital of Fran", "duration_ms": 4851},

So those prompts took 4.8s, 18s and 6.7s.


⚠ Make ip-address-manager an IPAM provider for CAPI

This commit makes it possible to:

Deploy IPAM with clusterctl
Reconsile CAPI's ipaddressclaims with this managers ippools

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

/test metal3-ubuntu-e2e-integration-test-main
/test metal3-centos-e2e-integration-test-main

/hold
Feel free to review it and approve it but this feature will be merged after 1.9 release and will target 1.10 release.

I think this is pretty much done, so let's merge it when 1.9 is cut to get maximum amount of testing in 1.10 cycle.


xsnow: 3.3.0 -> 3.3.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/xsnow/versions.
meta.description for xsnow is: "An X-windows application that will let it snow on the root, in between and on windows"
meta.homepage for xsnow is: "https://ratrabbit.nl/ratrabbit/xsnow/"
meta.changelog for xsnow is: ""
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1/bin/xsnow passed the binary check.

1 of 1 passed binary check by having a zero exit code.

1 of 1 passed binary check by having the new version present in output.

found 3.3.1 with grep in /nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1

found 3.3.1 in filename of file in /nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1

directory tree listing: https://gist.github.com/72e0fb280120c8aa11d44e1973219fa7

du listing: https://gist.github.com/9eee8f7a15eace57c8d642cd34be05ea

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

4 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
xsnow

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

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

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1
ls -la /nix/store/749rmmykvfcavkipkigsjyl8wfny25ix-xsnow-3.3.1/bin

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

1 package built:

xsnow

Maintainer pings
cc @robberer for testing.

Result of nixpkgs-review pr 136739 run on x86_64-linux 1

1 package built:

xsnow


Typo fixes

Just two small typo fixes, removed an extra space and an extra letter.

Docs Build status updates of commit 6e53a79:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/Xamarin.Forms/Page.xml
:white_check_mark:Succeeded

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


Fix Broken Redirect for Blueprints

Describe the bug
blueprints.liferay.design used to redirect to liferay.design/blueprints — find out why this is not the case, and fix it

Netlify's redirects need to be configured in a counterintuitive way (at least for a DNS noob)
I had to set the Alias in the domain area:

and then in the DNS settings I had to set the CNAME:

In hindsight, this is really clear (and I'm an idiot) — but what would have been helpful, is for the "custom domains" to immediately suggest that the CNAME needs to be in place.


Add Libevent package.

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.2366
https://travis-ci.org/ingenue/hunter/builds/275019751?utm_source=github_status&utm_medium=notification

Seems like mobile platforms could not find OpenSSL package.

CMake can't use try_run while cross-compiling:
CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:

   EVENT__HAVE_WAITPID_WITH_WNOWAIT_EXITCODE (advanced)

Workaround for this can be explicitly setting try_run output variables, like this:

https://github.com/hunter-packages/jpeg/blob/17c8acbd717fb9134f0f14e014bee4923d59826b/CMakeLists.txt#L70-L74

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.2421
https://travis-ci.org/ingenue/hunter/builds/276923018?utm_source=github_status&utm_medium=notification

OSX builds failing because somewhere inside CMakeLists.txt variable with name 0 set to value inline :) Meaning condition if(A EQUAL 0) now is equivalent to if(A EQUAL inline). Problem similar to:

http://cgold.readthedocs.io/en/latest/tutorials/control-structures.html#cmp0054

I can introduce protection with this improvement:

https://github.com/ruslo/hunter/issues/558

For now as a workaround please remove code in libevent that sets 0 to inline.
I've added documentation about testing packages on CI servers:

https://docs.hunter.sh/en/latest/creating-new/create/cmake.html#ci-testing

Please test it before sending new commits.

Got it! https://github.com/hunter-packages/libevent/pull/3

OK just updated to p2.

I've added documentation about testing packages on CI servers

OK just updated to p2

Have you tested it?

Oh right. I just set up Travis for my fork yesterday, but still not sure how to use the testing table on my branch. I'll try merging it and building on temporary branch.

not sure how to use the testing table on my branch

Docs are here:

https://docs.hunter.sh/en/latest/creating-new/create/cmake.html#branches-structure

Awaiting macOS builds: https://travis-ci.org/isaachier/hunter/builds/277907067.

Should be ready to accept.

Should be ready to accept

Please send CI configs first:

https://docs.hunter.sh/en/latest/creating-new/create/cmake.html#pull-requests-tests

Sorry forgot to do that. Did it now: https://github.com/ingenue/hunter/pull/134.

Testing:

https://travis-ci.org/ingenue/hunter/builds/279583790?utm_source=github_status&utm_medium=notification

Uploading:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.2458
https://travis-ci.org/ingenue/hunter/builds/279604388?utm_source=github_status&utm_medium=notification

Released: https://github.com/ruslo/hunter/releases/tag/v0.19.110