Update fetch TSA certs script for Tink

Update script to support decrypting Tink key
Fix missing subject key ID from leaf cert (automatically populated for CA certs)

Signed-off-by: Hayden Blauzvern<EMAIL_ADDRESS>
Summary

Release Note

Documentation

Codecov Report

Merging #111 (1a74de4) into main (0faebbe) will decrease coverage by 0.07%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
- Coverage   50.29%   50.21%   -0.08%
==========================================
  Files          14       14
  Lines         682      687       +5
==========================================
+ Hits          343      345       +2
- Misses        305      307       +2
- Partials       34       35       +1

Impacted Files
Coverage Δ

pkg/signer/memory.go
62.50% <66.66%> (-1.50%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Transforms.v2 significantly slower than v1.

🐛 Describe the bug
Usage of v2 transformations in data preprocessing is roughly three times slower compared to the original v1's transforms.
I benchmarked the dataloader with different workers using following code.
import time

train_dataset = ImageFolder(os.path.join(dataset_path, 'train'), transform=transform)
for i in range(0, 16+2, 2):
    _loader = DataLoader(train_dataset, batch_size=256, pin_memory=True, shuffle=True, num_workers=i)
    start = time.time()
    for _ in range(3):
        for _ in _loader:
            pass
    end = time.time()
    print('Um:', i, 'used up to', end-start, 's')  # 'i' is worker count.

For instance, the following transform composition.
import torchvision
import torchvision.transforms as T
import torchvision.transforms.v2 as T2

transform = T2.Compose([
    T2.RandomResizedCrop(size=(224, 224), scale=(0.45, 1.0), ratio=(0.3, 1.7), interpolation=T.InterpolationMode.BICUBIC),
    T2.ToImage(),
    T2.RandomRotation((0, 90), fill=0, interpolation=T.InterpolationMode.BILINEAR),
    T2.RandomHorizontalFlip(p=0.5),
    T2.RandomVerticalFlip(p=0.5),
    T2.RandomPerspective(distortion_scale=0.7, p=0.7, interpolation=T.InterpolationMode.BILINEAR),
    # T.ElasticTransform(alpha=50.0, interpolation=T.InterpolationMode.BILINEAR),
    # T.ColorJitter(brightness=(0.8, 1.2), contrast=(0.8, 1.2), saturation=(0.8, 1.2)),
    T2.ToDtype(torch.float32, scale=True),
    T2.Normalize(mean=[0.4850, 0.4560, 0.4060], std=[0.2290, 0.2240, 0.2250])
    # T.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])
])

Resulted in
Um: 0 used up to<PHONE_NUMBER>2035217 s
Um: 2 used up to 52.07573485374451 s
Um: 4 used up to 30.727416515350342 s
Um: 6 used up to 30.47186279296875 s
Um: 8 used up to 30.879201412200928 s
Um: 10 used up to 32.75243401527405 s
Um: 12 used up to 30.88376259803772 s
Um: 14 used up to 31.688957929611206 s
Um: 16 used up to 31.99822759628296 s
While transforms v1 yielded only around 9s having workers > 4.
My routinely used CNN training pipeline which usually takes only half an hour, also shot up to 5 hours after switching to transforms.v2.
In addition, all v1 composition with just an addition of following augmix and mixup took 5 hours as well.
mixup = T2.MixUp(num_classes=NUM_FINETUNE_CLASSES)
cutmix = T2.CutMix(num_classes=NUM_FINETUNE_CLASSES)
mixer = T2.RandomChoice([mixup, cutmix])
.
.
.
    f1_metric = MulticlassF1Score(num_classes=NUM_FINETUNE_CLASSES, average='macro', device=device)
    model.train()
    for image, label in train_loader:
        image, label = image.to(device), label.to(device)
        image, label = mixer(image, label)

I've experimented several other transform compositions; such as using T2.ToTensor() instead of T2.ToImage() and T2.ToDtype(), different orders, and different combinations. All of them have the same performance problem.
PS.
The code is hosted on a jupyter notebook running on a 16 cores AMD EPYC™ 7713 and a Nvidia A100.
The env information below is collected on the frontend node, there actually is cuda in GPU node I'm using. With Driver Version: 515.65.01 and CUDA Version: 11.7.
Versions
PyTorch version: 2.2.0.dev20231001+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A
OS: SUSE Linux Enterprise Server 15 SP4 (x86_64)
GCC version: (SUSE Linux) 7.5.0
Clang version: 15.0.1  (66f7391d6a03cf932f321b9f6b1d8612ef5f362c)
CMake version: version 3.20.4
Libc version: glibc-2.31
Python version: 3.10.12 (main, Jul  5 2023, 18:54:27) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.14.21-150400.24.11_12.0.57-cray_shasta_c-x86_64-with-glibc2.31
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   48 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          128
On-line CPU(s) list:             0-127
Vendor ID:                       AuthenticAMD
Model name:                      AMD EPYC 7543 32-Core Processor
CPU family:                      25
Model:                           1
Thread(s) per core:              2
Core(s) per socket:              32
Socket(s):                       2
Stepping:                        1
Frequency boost:                 enabled
CPU max MHz:                     2800.0000
CPU min MHz:                     1500.0000
BogoMIPS:                        5589.64
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca
Virtualization:                  AMD-V
L1d cache:                       2 MiB (64 instances)
L1i cache:                       2 MiB (64 instances)
L2 cache:                        32 MiB (64 instances)
L3 cache:                        512 MiB (16 instances)
NUMA node(s):                    2
NUMA node0 CPU(s):               0-31,64-95
NUMA node1 CPU(s):               32-63,96-127
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Mmio stale data:   Not affected
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.25.0
[pip3] pytorch-triton==2.1.0+6e4932cda8
[pip3] torch==2.2.0.dev20231001+cu121
[pip3] torchaudio==2.0.2
[pip3] torcheval==0.0.6
[pip3] torchinfo==1.8.0
[pip3] torchtnt==0.2.0
[pip3] torchvision==0.17.0.dev20231001+cu121
[pip3] torchviz==0.0.2
[pip3] triton==2.0.0
[conda] blas                      1.0                         mkl
[conda] mkl                       2023.1.0         h213fc3f_46343
[conda] mkl-service               2.4.0           py310h5eee18b_1
[conda] mkl_fft                   1.3.8           py310h5eee18b_0
[conda] mkl_random                1.2.4           py310hdb19cb5_0
[conda] numpy                     1.25.0          py310h5f9d8c6_0
[conda] numpy-base                1.25.0          py310hb5e798b_0
[conda] pytorch-cuda              11.8                 h7e8668a_5    pytorch
[conda] pytorch-mutex             1.0                        cuda    pytorch
[conda] pytorch-triton            2.1.0+6e4932cda8          pypi_0    pypi
[conda] torch                     2.2.0.dev20231001+cu121          pypi_0    pypi
[conda] torchaudio                2.0.2               py310_cu118    pytorch
[conda] torcheval                 0.0.6                    pypi_0    pypi
[conda] torchinfo                 1.8.0                    pypi_0    pypi
[conda] torchtnt                  0.2.0                    pypi_0    pypi
[conda] torchtriton               2.0.0                     py310    pytorch
[conda] torchvision               0.17.0.dev20231001+cu121          pypi_0    pypi
[conda] torchviz                  0.0.2                    pypi_0    pypi

Thanks for the report @yophis
Could you please provide a minimal reproducing example so that we can easily re-run your experiments? The transforms you provided above only work for V2, not for V1 (typically ToImage() or ToDtype). So it's hard to understand what got compared to what, exactly.
Note that I tried to port your example above the the following below, and I cannot observe any slow-down in V2:
#%%
import torch

import torchvision
import torchvision.transforms.v2 as T2
import torchvision.transforms as T1

def get_transforms(use_v2):
    T = T2 if use_v2 else T1
    transforms = []

    transforms += [
        T.RandomResizedCrop(size=(224, 224), scale=(0.45, 1.0), ratio=(0.3, 1.7), interpolation=T.InterpolationMode.BICUBIC, antialias=True),
        T.RandomRotation((0, 90), fill=0, interpolation=T.InterpolationMode.BILINEAR),
        T.RandomHorizontalFlip(p=0.5),
        T.RandomVerticalFlip(p=0.5),
        T.RandomPerspective(distortion_scale=0.7, p=0.7, interpolation=T.InterpolationMode.BILINEAR),
    ]

    if use_v2:
        transforms += [T.ToDtype(torch.float32, scale=True)]
    else:
        transforms += [T.ConvertImageDtype(torch.float32)]

    transforms += [T.Normalize(mean=[0.4850, 0.4560, 0.4060], std=[0.2290, 0.2240, 0.2250])]

    transforms = T.Compose(transforms)
    return transforms

# %%
img = torch.randint(0, 256, size=(3, 256, 256), dtype=torch.uint8)

t1 = get_transforms(use_v2=False)
t2 = get_transforms(use_v2=True)

# %%
%timeit t1(img)
# %%
%timeit t2(img)

# %%

class DS:
    def __init__(self, transforms):
        self.transforms = transforms
    def __getitem__(self, _):
        return self.transforms(torch.randint(0, 256, size=(3, 256, 256), dtype=torch.uint8))
    def __len__(self):
        return 128

from torch.utils.data import DataLoader

dl1 = DataLoader(DS(t1), batch_size=32, num_workers=4)
dl2 = DataLoader(DS(t2), batch_size=32, num_workers=4)
# %%
%timeit list(dl1)
# %%
%timeit list(dl2)

Also, make sure to follow https://pytorch.org/vision/main/transforms.html#performance-considerations in particular convert to tensor before doing any resizing operation

#%%
import torch

import torchvision
import torchvision.transforms.v2 as T2
import torchvision.transforms as T1

# Add ToImage() and switch ConvertImageDtype() to ToTensor()
def get_transforms(use_v2):
    T = T2 if use_v2 else T1
    transforms = [T.RandomResizedCrop(size=(224, 224), scale=(0.45, 1.0), ratio=(0.3, 1.7), interpolation=T.InterpolationMode.BICUBIC, antialias=True)]
    if use_v2:
        transforms += [T.ToImage()]

    transforms += [
        T.RandomRotation((0, 90), fill=0, interpolation=T.InterpolationMode.BILINEAR),
        T.RandomHorizontalFlip(p=0.5),
        T.RandomVerticalFlip(p=0.5),
        T.RandomPerspective(distortion_scale=0.7, p=0.7, interpolation=T.InterpolationMode.BILINEAR),
    ]

    if use_v2:
        transforms += [T.ToDtype(torch.float32, scale=True)]
    else:
        transforms += [T.ToTensor()]

    transforms += [T.Normalize(mean=[0.4850, 0.4560, 0.4060], std=[0.2290, 0.2240, 0.2250])]

    transforms = T.Compose(transforms)
    return transforms

# %%
# Use PIL's Image
img = np.random.randint(0, 256, size=(256, 256, 3), dtype=np.uint8)
img = Image.fromarray(img)

t1 = get_transforms(use_v2=False)
t2 = get_transforms(use_v2=True)

# %%
%timeit t1(img)
# %%
%timeit t2(img)

# %%

# Load a image from disk
class DS:
    def __init__(self, transforms):
        self.transforms = transforms
    def __getitem__(self, _):
        # _img = Image.fromarray(np.random.randint(0, 256, size=(256, 256, 3), dtype=np.uint8))
        _img = Image.open('path_to_a_png').convert('RGB')
        return self.transforms(_img)
    def __len__(self):
        return 128

from torch.utils.data import DataLoader

# Enable pin_memory and shuffle
dl1 = DataLoader(DS(t1), batch_size=256, pin_memory=True, shuffle=True, num_workers=4)
dl2 = DataLoader(DS(t2), batch_size=256, pin_memory=True, shuffle=True, num_workers=4)
# %%
%timeit for _ in range(3): list(dl1)
# %%
%timeit for _ in range(3): list(dl2)

With a little modification to your code, the timeit result is:
The slowest run took 446.35 times longer than the fastest. This could mean that an intermediate result is being cached.
164 ms ± 393 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
5.44 ms ± 88.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
4.33 s ± 13.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
4.94 s ± 41 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Thanks a lot for your helps.


Trial issue

Issue/Feature Description:
Why this issue to fixed / feature is needed(give scenarios or use cases):
How to reproduce, in case of a bug:
Other Notes /  Environment Information: (Please give the env information, log link or any useful information for this issue)
This is a new issue raised

Closing


Implement draft Xenium RFC in data model

@PozhidayevaDarya wanted to check in and see if you thought you were in a place to do this?


[tests][python-package] remove remaining tests using load_boston (fixes #4793)

Fixes #4793.

I'm going to merge this to unblock CI, now that scikit-learn 1.2 is out.
Thanks again @jmoralez !
cc @shiyu1994


no config file scout

I've just downloaded Scout.app and I've just began to compile with this application instead than with the terminal. Its much more simple and more organized. But I some doubts.

I have the option to place my config file with my Scout. The issue is that if I press this button nothing happens. So I cannot place a config file. Any ideas why not?

I want to have a config file for sharing purposes. Do I need a config file for sharing purposes? What is the course to follow? As I think if I don't have this config file I cannot share it, or am I wrong?

Thanks!

Issue resolved. Closing issue.

Scout-App Classic (2012)
Scout-App 2 (2016)


Use if var

The if var expression stays in Swift, so let's use it :smiley:

@mxcl  @ddunbar Hi guys. I see there wasn't any activity here for some time.
How it's going with swiftPM, is there any work in progress that we don't see?
Is it possible to merge this PR?

Sorry for the delay, it's because I was doing too much refactoring. This still applies so I can merge.


VHOST provision_failed status copy could be improved

The copy says "... is provision_failed...", which might not be intentional.
cc @blakepettersson

@krallin Do you mean improved in the sense of just removing the underscore? Or do we actually have more information available to communicate to the user? I'm happy to grab this in either case.

@sandersonet really just the copy change. Something like "failed to provision, please contact support" would — I think — work a little better.


Add promos for Migration Advisor

DO NOT MERGE TILL DECEMBER 13th
Description / Motivation
Add Migration Advisor promotional content to the developer portal.
How Has This Been Tested?
Manual Testing
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Documentation update (non-breaking change; modified files are limited to the /data directory or other markdown files)

Checklist:

[X] I have read the Contributing guide.
[X] My code/comments/docs fully adhere to the Code of Conduct.
[X] My change is a code change.
[ ] My change is a documentation change and there are NO other updates required.
[X] My change has new or updated images which are stored in the /public/images folder that need to be migrated to Sitecore DAM

I stored the image in public/images because the original stored in DAM is too large and does not work well with the <Promo> component.

Looking good!

I assume that's permission to merge on the 13th but technically the "approved" checkbox wasn't hit.


[BUG] Daily Set Quiz Skipped with Answers ABC and 7 Total Questions

Yesterday The script was skipping over the "Daily Set Quiz" (the second or middle card). I am not sure why. The answers were A B C with 7 total questions. I disabled Headless mode and watched the script answer the first question in the quiz then reload back to the dashboard. I am guessing that was the script skipping the quiz and continuing on with the script?
Anyone know a proper fix to the completeDailySetQuiz function?
I tried to copy and paste what was already in the completeDailySetQuiz funtion to make this work by changing a few numbers as so but it did not work. My addition to the code is below.
Line 396
elif numberOfOptions == 3:
correctOption = browser.execute_script("return _w.rewardsQuizRenderInfo.correctAnswer")
for i in range(3):
if browser.find_element(By.ID, "rqAnswerOption" + str(i)).get_attribute("data-option") == correctOption:
browser.find_element(By.ID, "rqAnswerOption" + str(i)).click()
time.sleep(5)
if not waitUntilQuestionRefresh(browser):
return
break
time.sleep(5)

have u fixed it yet also srry for posting an alternative

No the script seems to always skip the second daily set pannel Quiz.
Today there is a quiz that has 3 questions and 3 answers per question. (ABC)
The script trys to run the function completeDailySetVariableActivity but fails to complete the pannel.
I am trying to figure out a soultion but nothing has worked so far.

The solution posted above did not work the very next day. I am going to look at it again to try to figure out why.
If anyone has a solution please post it here.

I forked this project and uploaded my current working version that will complete all searches and punch cards. Also made the README even more simple to understand.
https://github.com/AlexyGalaxy/Microsoft-Rewards-Farmer

The hard code above will not work with today's daily quiz because it has 7 questions. Looking into a solution. I will post an update here and update my github when found and working.

Fixed with v3.0 #188


[rules] Expose load_rules at the parent module

I'd like the import to look like this:
from rubrix.labeling.text_classification import load_rules
Currently is: from rubrix.labeling.text_classification.rule import load_rules

Now this is fixed, should we update the weak supervision guide https://rubrix.readthedocs.io/en/releases-0.x/guides/weak-supervision.html#3.-Building-and-analizing-weak-labels @dvsrepo ??

Yes , @dcfidalgo can you update the guide and the tutorial please?


NETOBSERV-740: Metrics integration - console plugin frontend

Description
Add data source to query option dropdown
Dependencies
Based on https://github.com/netobserv/network-observability-console-plugin/pull/513

Operator: https://github.com/netobserv/network-observability-operator/pull/613

Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.

[x] Is this PR backed with a JIRA ticket? If so, make sure it is written as a title prefix (in general, PRs affecting the NetObserv/Network Observability product should be backed with a JIRA ticket - especially if they bring user facing changes).
[ ] Does this PR require product documentation?

[ ] If so, make sure the JIRA epic is labelled with "documentation" and provides a description relevant for doc writers, such as use cases or scenarios. Any required step to activate or configure the feature should be documented there, such as new CRD knobs.

[ ] Does this PR require a product release notes entry?

[ ] If so, fill in "Release Note Text" in the JIRA.

[ ] Is there anything else the QE team should know before testing? E.g: configuration changes, environment setup, etc.

[ ] If so, make sure it is described in the JIRA ticket.

QE requirements (check 1 from the list):

[x] Standard QE validation, with pre-merge tests unless stated otherwise.
[ ] Regression tests only (e.g. refactoring with no user-facing change).
[ ] No QE (e.g. trivial change with high reviewer's confidence, or per agreement with the QE team).

Added 2 commits:

one to avoid requiring a new config that binds filters to fields (mainly because such a binding already exists although it's done more implicitly - in fact, at first I was having errors with this PR, as selecting Prometheus as a datasource was breaking the display; it turned out it was because these fields-filters bindings were missing; I guess the intent was to create a new PR on the operator to add them; but after all I preferred to remove the requirement for these explicit bindings as we have another way to find them, and IMO it's better to not define them in two places, that could be error prone.
second is just to adapt the display of the available groups to the scopes allowed

A few thoughts, IMO no blockers, perhaps that's for the next release, if we don't find time here:

New JIRA https://issues.redhat.com/browse/NETOBSERV-1643 to improve error handling & UX
Detection of invalid queries could be improved (perhaps on both backend+frontend) to tell things like: "given the desired filters, it's not possible to group by X" (e.g. if a user filters on a given namespace then we have no metric to group by node)
The metrics eligible for use are currently limited to the predefined metrics. E.g. there's no zone-based topology possible, because of that. We might open eligible metrics to custom ones.

Codecov Report
Attention: Patch coverage is 58.02469% with 34 lines in your changes are missing coverage. Please review.

Project coverage is 57.84%. Comparing base (994ed1e) to head (8889828).

Files
Patch %
Lines

web/src/components/netflow-traffic.tsx
36.95%
25 Missing and 4 partials :warning:

...rc/components/dropdowns/query-options-dropdown.tsx
60.00%
1 Missing and 1 partial :warning:

web/src/components/scope-slider/scope-slider.tsx
33.33%
2 Missing :warning:

web/src/components/dropdowns/scope-dropdown.tsx
50.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
+ Coverage   57.27%   57.84%   +0.56%
==========================================
  Files         169      137      -32
  Lines        8487     6654    -1833
  Branches     1160     1176      +16
==========================================
- Hits         4861     3849    -1012
+ Misses       3299     2596     -703
+ Partials      327      209     -118

Flag
Coverage Δ

uitests
57.84% <58.02%> (-0.09%)
:arrow_down:

unittests
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@msherif1234 most comments are addressed (or answered); I also fixed a few little things in last commit

Thanks @jotak I think @memodi can u pls start testing while I will do another pass focusing on javascript bits ?

Hi @jotak  - Couple of findings from early testing:

filtering seems to have broken with this feature, sharing recording. I have Src_NS=test-server filter but in table view you can see it switches to source NS as test_client. I tried disabling the prometheus datasource but that did not help.
Also after disabling the prometheus, should Plugin adapt to not show DataSource options?

Hi @jotak - Couple of findings from early testing:
1. filtering seems to have broken with this feature, sharing [recording](https://drive.google.com/file/d/10lvmQgilSFfFYF2BLc2C5mlVGx-1ft7J/view?usp=drive_link). I have Src_NS=test-server filter but in table view you can see it switches to source NS as test_client. I tried disabling the prometheus datasource but that did not help.

Isn't it just because you have "back & forth" selected?

2. Also after disabling the prometheus, should Plugin adapt to not show DataSource options?

The datasources are adapted to show disabled prometheus but we decided to not entirely hide it, so users are aware that it's possible to configure it. I guess we want to recommend enabling prometheus, because of the better performances, that's why it's not hidden. For sure we don't want either to have the UI bloated with disabled settings, perhaps we can find another way to convey the information we want...

Isn't it just because you have "back & forth" selected?

you're right, my bad, I probably clicked bnf by accident and did not realize. I checked again it applies filters correctly.

The datasources are adapted to show disabled prometheus but we decided to not entirely hide it, so users are aware that it's possible to configure it. I guess we want to recommend enabling prometheus, because of the better performances, that's why it's not hidden. For sure we don't want either to have the UI bloated with disabled settings, perhaps we can find another way to convey the information we want...

makes sense.

/ok-to-test

@jotak I am hitting this one-off odd metric value where one data point is double the amount of rest when Queried with Prometheus, they all should be approximately same since they're for same fixed requests.  I have same filters as in previous recording
When queried with Prometheus:

When queried with Loki:

It doesn't happen often and not sure under what conditions it happens but it appears to be doubling the value in that particular instance.

@memodi do you have a cluster up that I can use to investigate?

@memodi do you have a cluster up that I can use to investigate?

unfortunately, no. But I did manage to capture the API Response to prometheus query, it's a datapoint with timestamp:<PHONE_NUMBER>.586. Like I said, I only observed in this one off instance when I let it run over a long period and I am not sure if its reproducible if I did same test again, however I would like to understand why it happens and if there's a chance of this getting augmented in large workloads.

unfortunately, no. But I did manage to capture the API Response to prometheus query, it's a datapoint with timestamp:<PHONE_NUMBER>.586. Like I said, I only observed in this one off instance when I let it run over a long period and I am not sure if its reproducible if I did same test again, however I would like to understand why it happens and if there's a chance of this getting augmented in large workloads.

@memodi I don't have much idea on what could cause that :( We've seen doubled rates before, when there was a double-configured prometheus (user workload + cluster monitoring) .. any chance it could be that? (like, having set both of them for a short period of time, before removing one)

any chance it could be that

ah, there's definitely that chance, because we use this script: https://gitlab.cee.redhat.com/netobserv-qe/netobserv-qe-scripts/-/blob/main/netobserv.sh?ref_type=heads#L309 which enables user workload monitoring but I think I didn't see metrics being populated (probably fast enough) so patched CSV with DOWNSTREAM=true

/ok-to-test

@memodi new build fixes an issue with percentiles (stats on RTT or DNS latency)

@jotak - it doesn't look like NETOBSERV-1652 is fixed and I see other issue with topology view where filters are not remembered take a look at recording

@jotak - it doesn't look like NETOBSERV-1652 is fixed and I see other issue with topology view where filters are not remembered take a look at recording . Environment I was using:

Oh sure, that's because I didn't implement datasource memorization, I fixed NETOBSERV-1652 the other way around ie. re-playing the query to Loki when I get a 401 or 403 error from Prometheus, which should be good to fix the UX issue.
That said, I agree we could also have the setting memorized on top of that

/lgtm

@jotak - it doesn't look like NETOBSERV-1652 is fixed and I see other issue with topology view where filters are not remembered take a look at recording . Environment I was using:

Oh sure, that's because I didn't implement datasource memorization, I fixed NETOBSERV-1652 the other way around ie. re-playing the query to Loki when I get a 401 or 403 error from Prometheus, which should be good to fix the UX issue.
What's the other settings that are not memorized? I'm not sure if every settings have to be memorized I think it's on purpose to keep only the one we consider more important... perhaps that will be something to check with @jpinsonneau when he's back

it's the filters, in recording at 0:19 seconds, when I come back to the page , the topology view shows all traffic including the infra traffic whereas there's already "app" filter added. I didn't mean to suggest to cache everything, but this seems like a regression bug. I think it only happens when Datasource is Loki or prometheus query returns 401/403 and loki is used as fallback.

What's the other settings that are not memorized?

/retest

it's the filters, in recording at 0:19 seconds, when I come back to the page , the topology view shows all traffic including the infra traffic whereas there's already "app" filter added. I didn't mean to suggest to cache everything, but this seems like a regression bug. I think it only happens when Datasource is Loki or prometheus query returns 401/403 and loki is used as fallback.

I don't think this is related to this PR, I think this is because, when opening the topology (after refreshing or coming from another page), there's first a query made with no filters and that's immediately replaced with another query with filters, cf screenshot (two subsequent queries on metrics endpoint):

And that's not from this PR, this is the same on main. The second query is the one with correct filters and is supposed to hide results of the first one but I guess in some rare cases the first arrives too late and hides the correct one. I would say this is a bug to open on main but not for this PR. Ideally we should only run a single query, not two.
I think this bug is also what makes the topology sort of "blinking" on first load, I've noticed that.
BTW is that something you can frequently reproduce? On my side I don't reproduce, even though I think I get the root cause

And that's not from this PR, this is the same on main.

you're right, I confirm issue exists on main too. I filed a bug: https://issues.redhat.com/browse/NETOBSERV-1661 and I think this is good to go.
/label qe-approved

/approve


Upload multiple files in single request

Is ngx-uploader support this feature?
I follow the drag&drop example. There was 2 post requests when i try to upload 2 files.

I don't thinks that's possible, at least on the client side.


Some minor cleanups to Move IR

Prepare for the addition of bytecode functions to the IR.

Looks good to me. The failed test is likely flaky. I've seen it timing out a few times myself.

@bors-libra r=vgao1996

It seems like I've been unable to build consensus on this.


--stdin doesn't read stdin

I'm not sure if I'm just missing something here, but it seems that the --stdin flag requires an argument, which is supposed to be a literal nushell script. That's not what standard input means, and limits the size of the script to the system's maximum command size length.
I would expect the --stdin flag to make the formatter... read from stdin.

yeah, should probably allow
open foo.nu | nufmt --stdin

instead of
nufmt --stdin (open foo.nu)

, right?

I think taking a literal nushell script as a command line argument doesn't make any sense. Positional arguments and flags are not intended for such long input.

Hi! you are correct, stdin requires an argument, I started working a bit mindless-ly and thought:
Well, if it doesn't require a flag to format, should nufmt format all files in the folder or format the upcoming input stream?
Maybe it can follow this logic

for the only nufmt command format all files, like cargo fmt or black does
for nufmt --stdin may take an input
2.1. if something comes from an input, format that, soopen foo.nu | nufmt --stdin

would work
2.2 if nothing comes from stdin, then you can pass a string as an argument "let my_var = 3;"
2.3 if nothing comes from stdin or there is no argument, error out and show the help "I need some input with the --stdin flag"

Passing a value to a flag named "stdin" doesn't make any sense—in this case, it's not standard input, it's just a positional argument.
But moreover, I don't think positional arguments of any kind make any sense. There's a limit of 4k for an exec; passing anything but the most trivial of scripts is going to fail.

I'm not sure if I follow you.
What could solve this issue, or what is the expected behavior you would like to see?

@AucaCoyan
i think this is the expected behaviour, i.e.
open foo.nu | nufmt --stdin

Thanks! I will head towards it

Since this is taking a while, here is a very temporary workaround:
#!/usr/bin/env -S nu --stdin
nufmt --stdin $in

I'd like to help myself to speed up, but I'm not sure I will have enough time soon. I just thought that since this is enough for me, to use nufmt inside Neovim, it could be beneficial even for anyone else arriving here.

@alecandido
help would be much apreciated :pray:
are you using nufmt for real in projects? :open_mouth:

help would be much apreciated 🙏

I'd be glad to give it, I'm just short of time. But I'll definitely take it into account.

are you using nufmt for real in projects? 😮

I'm just addicted to formatters.
As soon as I started writing scripts (in particular, just config.nu, and some trials) I started looking for something saving me the burden of thinking about irrelevant style.
The result of nufmt is not great, but still usable.
I could wish something better, but if I'll desire it enough I might be motivated to contribute :)

We would love to have more contributors to this repository. We'd all love to have a good nushell script formatter.

#61 solves the bug, it correctly reads from stdin with the flag
"let one = 1;" | nufmt --stdin

Is it okay to close this issue?


Add division by 0 rules in the expression simplification

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
❯ create table t as select 1 as a;

❯ explain select a / 0 from t;
+---------------+--------------------------------------------------+
| plan_type     | plan                                             |
+---------------+--------------------------------------------------+
| logical_plan  | Projection: #t.a / Int64(0)                      |
|               |   TableScan: t projection=[a]                    |
| physical_plan | ProjectionExec: expr=[a@0 / 0 as t.a / Int64(0)] |
|               |   MemoryExec: partitions=1, partition_sizes=[1]  |
|               |                                                  |
+---------------+--------------------------------------------------+

❯ select a / 0 from t;
ArrowError(DivideByZero)

❯ explain select 1 / 0 from t;
+---------------+----------------------------------------------------+
| plan_type     | plan                                               |
+---------------+----------------------------------------------------+
| logical_plan  | Projection: Int64(NULL) AS Int64(1) / Int64(0)     |
|               |   TableScan: t projection=[a]                      |
| physical_plan | ProjectionExec: expr=[NULL as Int64(1) / Int64(0)] |
|               |   MemoryExec: partitions=1, partition_sizes=[1]    |
|               |                                                    |
+---------------+----------------------------------------------------+
2 rows in set. Query took 0.004 seconds.

Describe the solution you'd like
A clear and concise description of what you want to happen.
When the divisor is the scalar zero, We could one of these:

Simplify the expression to null -> A / 0 -> NULL
Give the DivideByZero error: A / 0 -> Err(DivideByZero)

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Per the below comment, we should not simplify errors as it might be unreachable during execution.
https://github.com/apache/arrow-datafusion/pull/3669#discussion_r985226627
cc: @alamb

Update here is that postgres errors too so we will keep the erroring behavior. Thanks @askoa

Didn't #3824 close this or am I missing something?


Add Automatic Responsiveness.

Flutter is awesome as it is true cross platform for android, ios and web.
Wouldn't it be more awesome if programmers don't have to bother about responsiveness across different size of screens?
I think flutter dev team is smart enough to implement AI, ML, DL  techniques to add automatic responsiveness on flutter apps.
Flutter has awesome responsive apps and thousands of responsive open source projects.
It's time to look at automatic responsiveness and build model of responsiveness coding which would help the AI, ML, DL algorithms to be trained fast and we get the automatic responsiveness feature as soon as possible.

Hi @1abir
with automatic do you mean code_gen?
An app can respond very differently to different screen sizes,
are you suggesting a "default" reaction?
Could you please detail how ML should be involved in the process?
Thank you

Hi @iapicca
Thanks for your response.
With automatic I meant "not explicit coding". It may be foreground code_gen or background code_gen. More precisely, I meant an algorithm that can differentiate between main view and side bar, that can calculate which font size is appropriate for a paragraph or subparagraph for a given screen size.
In a nutshell -

I want to code for only mobile app and want a good looking responsive page in web.
I want to code for only web and want a good looking responsive page in ios or android.

Let's come to the  Machine Learning process. We can design an algorithm that learns from existing responsive apps to recognize which portion of a desktop webpage goes to the bottom, which portions would remain pinned, how the font size changes with respect to sizes or rotation, how spaces between widgets changes across screen sizes or screen rotation.
So when it gets a code for web - it converts it for mobile screen.
Hope it is clear.
For any further query please let me know.
Thanks again.

I believe it would make more sense to have some specific widget to do it, instead of automatically handling it.
It's common for Flutter projects that target more than one platform to have pieces of code like the below, which I extracted from Very Good Ventures Slide Puzzle
import 'package:flutter/widgets.dart';
import 'package:very_good_slide_puzzle/layout/layout.dart';

/// Represents the layout size passed to [ResponsiveLayoutBuilder.child].
enum ResponsiveLayoutSize {
  /// Small layout
  small,

  /// Medium layout
  medium,

  /// Large layout
  large
}

/// Signature for the individual builders (`small`, `medium`, `large`).
typedef ResponsiveLayoutWidgetBuilder = Widget Function(BuildContext, Widget?);

/// {@template responsive_layout_builder}
/// A wrapper around [LayoutBuilder] which exposes builders for
/// various responsive breakpoints.
/// {@endtemplate}
class ResponsiveLayoutBuilder extends StatelessWidget {
  /// {@macro responsive_layout_builder}
  const ResponsiveLayoutBuilder({
    Key? key,
    required this.small,
    required this.medium,
    required this.large,
    this.child,
  }) : super(key: key);

  /// [ResponsiveLayoutWidgetBuilder] for small layout.
  final ResponsiveLayoutWidgetBuilder small;

  /// [ResponsiveLayoutWidgetBuilder] for medium layout.
  final ResponsiveLayoutWidgetBuilder medium;

  /// [ResponsiveLayoutWidgetBuilder] for large layout.
  final ResponsiveLayoutWidgetBuilder large;

  /// Optional child widget builder based on the current layout size
  /// which will be passed to the `small`, `medium` and `large` builders
  /// as a way to share/optimize shared layout.
  final Widget Function(ResponsiveLayoutSize currentSize)? child;

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
      builder: (context, constraints) {
        final screenWidth = MediaQuery.of(context).size.width;

        if (screenWidth <= PuzzleBreakpoints.small) {
          return small(context, child?.call(ResponsiveLayoutSize.small));
        }
        if (screenWidth <= PuzzleBreakpoints.medium) {
          return medium(context, child?.call(ResponsiveLayoutSize.medium));
        }
        if (screenWidth <= PuzzleBreakpoints.large) {
          return large(context, child?.call(ResponsiveLayoutSize.large));
        }

        return large(context, child?.call(ResponsiveLayoutSize.large));
      },
    );
  }
}

I believe that Flutter could have default breakpoints like bootstrap that developers could manually change in a Theme property or directly into a ResponsiveLayoutBuilder. Of course, we could just abstract it to lib or define in each project, but seems more reasonable to have it inside the framework itself.

cc @gspencergoog

You might want to take a look at the following pull requests regarding "[adaptive_scaffold]". It is possible that once https://github.com/flutter/packages/pull/2455 lands it will solve your pain point.


Help with understanding route file style vs John Papa style

I asked this question on SO (Stack Overflow), but no answers. The john Papa guide shows a route helper provider, but doesn't explain why. Both the way it is set with this generator and using a route helper provider seem to work. The way this generator does it seems more straightforward. I am totally new to angular, can anyone eli5 this for me?

Sorry, I'm not familiar with the route helper provider usage. I've been out of the loop on recent Angular ideas.

Closing as this isn't an issue with ng-poly, but please feel free to reopen if there's anything we can do to help.


SS4 Compatability

First pass at making the toolbar ss4 compatible.

It's also a bit of a shame to lose the Git history on those migrated classes. Any chance you wouldn't mind re-doing it so they're retained in separate commits?

@unclecheese everything looks great! I've just PRd a couple of changes - one for an updated Versioned API requirement, a commit for PSR-2 linting and a commit for updating a couple of ClassName values in the templates, and adding $ for function calls. They're all in #43
I've tested this on a local copy of ss.org and haven't noticed any regressions, so 👍  from me once #43 is in.

Noted:
There are references in the templates to BlogHolder which is a deprecated compatibility class in the blog and is removed in the SS4 compatible version - do we need to update this to look directly at Blog instead? I'm not sure of the context here.


Upgrade to jwalk 0.5

Also see if the new feature, client state, can be leveraged.
see https://github.com/jessegrosjean/jwalk/issues/7#issuecomment-598876634

There seems to be a performance regression. To reproduce, do the following:
git clone https://github.com/Byron/dua-cli && \
cd dua-cli && \
git checkout 4990fa4202f2b687ee2476efe0a406fdfe23fd96 && \
cargo run --release -- i ~/

Watch the CPU usage - it starts out using many cores, but quickly degrades to just a single core, as if work stealing doesn't work anymore or works differently.
Compare that to the latest master, which uses jwalk 0.4.0.


TypeError: Got unknown type 'ToolMessage'.

Issue with current documentation:
when use the ChatZhipuAi in langchain_community with langgraph to build a agent, the class ChatZhipuAi unkown the ToolMessage, this make the zhipuai can not use in langgraph.
Idea or request for content:
to add the ToolMessage in ChatZhipuAI, I think this can solve this problem.

@Liberation-happy  Can you paste your running code?


V2.10.1 dev

Ensures that source_type and destination_type can be set directly in nsg configuration, making your module more flexible and easier to configure.

LGTM 👍


Preserve file state on app quit and restore it on startup

When a user quits the app, it should preserve the open file state and restore it on startup.
Persisting the file state will allow the app to feel more natural. This behaviour is common and should improve the UX.

Electron doesn't offer a simple way to set and restore an app's session very easily. The common approaches I've found so far are either cookies or localStorage for session handling.
Ideally something similar to Chrome's "continue where you left off" setting would be nice.
I used my own JSON persistence implementation for the settings and found that it worked well. I most likely will use this persistence method for the session handling.
While I could use one of the common approaches above, I don't think it will play nicely. Looking at the API for cookies and localStorage, they seem a little overkill for what I want to do since I'm not doing anything terribly complex. Iris works best with native implementations, so I'll stick to that for now.
I need to figure what data will be part of the session and how I'll apply the saved session on startup without disrupting the app logic.


Feature #18 -- Support for polymorphinc instance "File" for POST/PUT methods

Addition of a private method "Asset_IsFile.vi"
"HTTP Request.vi" implements check for body = file

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Francois Normandin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Connection error

Following the directions in the Readme, and with Metamask switch to rpc http://localhost:8545, the app loads up and displays Organization not found. Looking in the dev console, there is a connection error:
WebSocket connection to 'ws://localhost:7545/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

Hmm, this seems quite weird; did it say it was trying to connect to localhost:7545 (not 8545)?

yes, but why? everywhere is referencing port 8545: truffle.js, the console.
 ℹ This is the configuration for your development deployment:
    Ethereum Node: ws://localhost:8545
    ENS registry: 0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1
    APM registry: aragonpm.eth
    DAO address: 0x5b6a3301a67A4bfda9D3a528CaD34cac6e7F8070

    Opening http://localhost:3000/#/0x5b6a3301a67A4bfda9D3a528CaD34cac6e7F8070 to view your DAO

I had the REACT_APP_DEFAULT_ETH_NODE environment variable set (in my .bashrc) to ws://localhost:7545, probably from a time looking into Aragon a while back. Completely forgot about it!


Initialize detecting raise values

I am not sure if this is intended but if I have properties that are conditionally set I want to raise if none of the inputs into the initializer is correct.  example: https://play.crystal-lang.org/#/r/6s5b
I dont think the compiler knows that I just want it to raise and the properties shouldn't matter in that case.  This could be complicated if there is a rescue and the varible is accessed.  I just wanted to get peoples thoughts.

First of all bar = ... here just sets a local variable so that's a no-op

And if you change it to @bar = ... everything just works

The compiler is not tracking instance variable assignments inside methods called from an initializer. For now this is an intentional limitation to keep the compiler more performant and simple.
As already said, you're just assigning local variables here, not even touching the instance variables. Adding self. in front of your assignments would reference the setters defined by the property macro, but given those are just normal methods, the above limitation applies. As also already said you can fix your example but just assigning the instance variables directly: https://play.crystal-lang.org/#/r/6s7f


Max/Min attributes not updating

I have hit over 100F in the last few days but:
attribution: Powered by WeatherFlow2MQTT
brand: WeatherFlow
max_day: '98.8'
max_day_time: '2021-06-26T22:40:23+00:00'
max_month: '83.3'
max_month_time: '2021-06-26T01:28:46+00:00'
max_all: '83.3'
max_all_time: '2021-06-26T01:28:46+00:00'
min_day: '63.2'
min_day_time: '2021-06-26T12:36:55+00:00'
min_month: '52.0'
min_month_time: '2021-06-24T12:41:06+00:00'
min_all: '47.9'
min_all_time: '2021-06-19T12:19:07+00:00'
unit_of_measurement: ˚F
friendly_name: WF Temperature
device_class: temperature

Max all time and max month are less than max day, and max day is not updating.
Looks like the actual max for yesterday was 108.1F
Min does not match either

I will need to investigate a bit more.

I have been monitoring this for a while, and I believe I have to re-think how I do this. With the current approach I run some periodic updates, and if one of them does not run (For whatever reason), data can too easy get out of sync, and subsequent updates are no longer accurate.
So I will work on a new approach - which might be a BREAKING CHANGE - but as it is now, data are not correct for a few of us, including myself.

Weird, the Min and Max were spot on yesterday.  Today they are still yesterday's values and off.

If the Midnight Process is not running at the correct time (For whatever reason) this will be off. So I need to figure out a more robust way of ensuring this is done.

I check for updates to the docker images I have regularly, so I updated yesterday to the latest release.
When I updated, it stopped sending anything to MQTT; I restarted a few times with no results.
I had to completely clear all files in the config directory and then it worked.
I don't know if you intended the last update to be for public consumption or not.  I also, don't know if it had breaking changes (at least for some).
I did see my new temporary high and low at 999 and -999; they appear to be tracking now.

@titilambert refactored the structure and it took a few iterations for me to ensure that it worked. My tests show that everything is working now. I also tried to build the image for different platforms, so that people using ARM also can pull it directly. The images are pushed to Docker Hub instead of Github. Could I get you to try and pull the latest image from there? Use briis/weatherflow2mqtt:latest instead of ghcr.io/briis/hass-weatherflow2mqtt:latest. Remember to delete the current image, before you do it.

Pulled new image from docker hub.  Everything appears to be working but it is just after midnight here.  I will monitor and let you know.  I also modified my docker pull script to pull from the new repo.

Thanks Glenn. Just tested it on my Synology, a PI3 and Intel NUC, and I also get it working. Let me know how it goes.

Min Max daily appear to be working well.  They match the app history and the 24hr graph in HA.

Ok, new observation.  The max and min are now max and min for the last 24hr and not reset at midnight as far as I can tell.
Is this what you indended?  I actually like the last 24hr period over reset at midnight.

Closing issue, since everything appears to be resolved now.


Bugfix with disable compaction root column may lost in obj…

…ect leaves
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

run buildall


CSS Not loading shadow dom when module exported as web component

I'm unable to get the css to display when I wrap my vue app as a web component. Do you have any advice on how to fix this

https://medium.com/@royprins/get-started-with-vue-web-components-593b3d5b3200

Got the Css to load but i'm still struggling to get the css selectors to bind to the shadow dom. Any thoughts?

I figured out what's going on here you can't preform a document.querySelector on shadow elements I propose adding a shadowTarget option will create a new issue and pull request.


Remove span elements when pasting content to ckeditor

MS-Word adds spans to content which causes CKeditor to show the language tag in editor.
What was done
Added paste filter to ckeditor which removes the span around pasted content.
Removed permission configs that doesn't exist anymore.
Updated node_type from config, it doesn't exist anymore.
How to install

Make sure your instance is up and running on correct branch.

git checkout UHF-X_ckeditor_pastefilter
make fresh

Run make drush-cr

How to test

Go to edit any content
Create a span element and paste it in the ckeditor source-view, for example

  this is my test text

Leave the source-view.
In the content-view you should see the test-text surrounded by blue outline
Copy the whole blue-outlined box
Remove the blue outlined box if you wish
Paste the copied text to the editor
The text should appear without the blue outline
Go check the source again

In the source you should see your test-text surrounded by p-tag. span should have been filtered out.

I don't have time for local testing, but I think this is good to go for dev.
I noticed the changes related to PTV - I had already done these, maybe I missed something, hopefully no conflicts.


bridge: Allow configuring port isolation

Hello,
podman version 5.0.3
alpine 3.20

I am trying to create podman networks where containers cannot:

communicate with each other inside their own bridge (L2)
communicate with containers on other bridges (L3)

Setting the bridge option isolate: true solves the second item (L3).
For the first item, I am able to disallow L2 communication by setting the isolated on (BR_ISOLATED flag) option on all the bridge ports manually, e.g.:
bridge link set dev veth0 isolated on
bridge link set dev veth1 isolated on

Is there a way to do this automatically, with netavark, as the bridge ports are created? Alternatively, if I am approaching this issue from the wrong end, is there a better way to achieve what I am looking for?
Also, the bridge driver source code references a possible strict value for the isolate option, however I am unable to find any documentation as to what this does, exactly. EDIT: It appears to also restrict access to bridges without any isolation set.

I think docker calls this inter container connectivity (icc) so this is definitely something we want to support in order to allow better compatibility.
There isn't really anything pluggable which would allow you to set this automatically right now. So this would need to be implemented first. My thinking is to add a new icc option and the set the proper netlink attribute to block the connectivity between containers. PRs welcome.
cc @mheon

Thanks for the response!
Is there a way to hook into the network creation lifecycle with a shell script or something similar?
I quickly tried looking at the plugin API, and tried putting a tiny shell script in /usr/local/lib/netavark that just dumps stdin to a file, but I'm not seeing this script being run after setting netavark_plugin_dirs = ["/usr/local/lib/netavark"] in /etc/containers/containers.conf.

netavark plugin are specified in https://github.com/containers/netavark/blob/main/plugin-API.md but this isn't really what you want. You would need to completely reimplement the entire bridge code basically and then add your extra change.
There are oci hooks which would be more what you are looking for I think but there you have no relation between interface <-> container so you do not know which veth interface to pick.
That is why I said it is a new feature that has to be implemented first.

Concur with @Luap99 - seems like an eminently reasonable feature request, and not hard to implement, but will have to be in the existing bridge code.

@eirikrye Were you able to get behavior equivalent to com.docker.network.bridge.enable_icc using either a netavark plugin or an OCI hook? If yes, could you please share your code?

Adding the following to my unit files does the job for me.
ExecStartPost=bash -c 'bridge link show master bridgename | cut -d: -f2 | cut -d@ -f1 | xargs -t -i bridge link set dev {} isolated on'
You can set the bridge name using the --interface-name option of podman network create


updating vscode settings to apply schema validation

This PR is to update vscode settings, so when opening the repo in VS Code, schema validation is applied to the specs.

No modification for AutorestCI/azure-sdk-for-node

No modification for AutorestCI/azure-sdk-for-ruby

No modification for AutorestCI/azure-sdk-for-python


Make frontmatter naming consistent

Fixes #103

Thanks but obsidian.d.ts is generated automatically so PRs to it are generally not accepted. I can however update this in code and have it reflect in the file once it gets built in the next release cycle.


Integer partial slicing on multiindex bug

similar to one encountered in @wesm pydata 2013 tutorial
In [9]: import pandas as pd

In [10]: idx = pd.MultiIndex.from_arrays([[2011,2011,2012,2012,2013], [1,2,1,2,1]])

In [11]: ser = pd.Series(randn(len(idx)), idx)

In [12]: ser
Out[12]:
2011  1   -0.485310
      2   -0.679528
2012  1    1.089995
      2   -0.174895
2013  1   -1.219255
dtype: float64

In [13]: ser.ix[2011:2012]
Out[13]:
2011  1   -0.485310
      2   -0.679528
2012  1    1.089995
      2   -0.174895
dtype: float64

In [14]: ser[2011:2012]
Out[14]: Series([], dtype: float64)

closing this. we have a couple of other issues open to improve the docs of .ix and discourage its use with integers like this anyhow.


chore: set up issue templates

[x] #11

Fixes #2

Are these alright for all rdmo and plugins projects?

Then I will ping the people at rdmo-catalog, that they should add their own template to override.

These are the same issue templates as in rdmo. So I suggest removing those and have a single source of truth in this repo.


consistent names for xaml type converters

fixes #139

LGTM, thanks @shahid-pk !

@grokys thank u too


Add setTag/withTag overloads that accept io.opentracing.tag types

To use the fluent syntax with Span/SpanBuilder and the tag types, one currently has to write span.setTag(Tags.HTTP_STATUS.getKey(), 200). This has two issues:

It loses the type restrictions, offered by the tag types. People could call e.g. span.setTag(Tags.HTTP_STATUS.getKey(), "foo")
Having to add .getKey() is an unnecessary inconvenience.

Proposed solution
Add overloads on Span and SpanBuilder that accept Tag types so that people can write span.setTag(Tags.HTTP_STATUS, 200).
We've been discussing this in https://github.com/opentracing/opentracing-csharp/pull/72 and compared a few options - I'll copy my latest comment for your convenience:

I created a similar perf test with BenchmarkDotNet.
I've been testing the following signatures with MockTracer (calling SetObjectTag()) and NoopTracer (doing a no-op):
ISpan SetTag_Int(string key, int value);

ISpan SetTag_AbstractGeneric<TTagValue>(AbstractTag<TTagValue> tag, TTagValue value);

ISpan SetTag_AbstractTyped(AbstractTag<int> tag, int value);

ISpan SetTag_IntTag(IntTag tag, int value);

Result:

BenchmarkDotNet=v0.10.13, OS=Windows 10 Redstone 3 [1709, Fall Creators Update] (10.0.16299.248)
Intel Core i5-4300U CPU 1.90GHz (Haswell), 1 CPU, 4 logical cores and 2 physical cores
Frequency=2435765 Hz, Resolution=410.5486 ns, Timer=TSC
.NET Core SDK=2.1.4
 [Host]     : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT
 DefaultJob : .NET Core 2.0.5 (CoreCLR 4.6.26020.03, CoreFX 4.6.26018.01), 64bit RyuJIT

Method
Mean
Error
StdDev

MockSpan_IntTag
77.927 ns
1.5573 ns
1.5992 ns

MockSpan_AbstractTag_Generic
90.484 ns
1.5414 ns
1.4418 ns

MockSpan_AbstractTag_Typed
77.102 ns
1.5754 ns
1.6178 ns

MockSpan_IntTag_Key
80.962 ns
1.5437 ns
1.4440 ns

MockSpan_Const
76.666 ns
1.5525 ns
1.5943 ns

MockSpan_Const_Overload
77.437 ns
1.5908 ns
1.4880 ns

NoopSpan_IntTag
4.040 ns
0.1024 ns
0.0958 ns

NoopSpan_AbstractTag_Generic
13.419 ns
0.2553 ns
0.2263 ns

NoopSpan_AbstractTag_Typed
4.625 ns
0.1388 ns
0.2573 ns

NoopSpan_IntTag_Key
5.052 ns
0.1431 ns
0.1757 ns

NoopSpan_Const
3.021 ns
0.0989 ns
0.0925 ns

NoopSpan_Const_Overload
3.068 ns
0.0985 ns
0.1054 ns

Using one SetTag<T>(AbstractTag<T> tag, T value) method is considerably slower so I would rule that out. It's a little bit more future-proof but it doesn't properly support the existing IntOrStringTag and adding new types is a breaking change anyway, as we also have to add a regular SetTag(string key, NewType value).
It's surprising to me that using AbstractTag<int> is sometimes faster than using IntTag directly (I ran it a few times). I would still rule that out though as this method still doesn't properly support IntOrStringTag.
I would therefore prefer using the actual Tag-types directly! This would ensure, all existing Tag types are supported and it also looks better in IntelliSense IMO. Adding a new Tag type is a breaking change but as I've said before, this is breaking anyway.
To sum it up, I would prefer the following additions to our interfaces:
// ISpan
ISpan SetTag(BooleanTag tag, bool value);
ISpan SetTag(IntOrStringTag tag, string value);
ISpan SetTag(IntTag tag, int value);
ISpan SetTag(StringTag tag, string value);

// ISpanBuilder
ISpanBuilder WithTag(BooleanTag tag, bool value);
ISpanBuilder WithTag(IntOrStringTag tag, string value);
ISpanBuilder WithTag(IntTag tag, int value);
ISpanBuilder WithTag(StringTag tag, string value);

Java might have different performance characteristics of course!
Adding overloads should be non-breaking for instrumentation code but it obviously is a breaking change for tracers.
Note that we could add this in a non-breaking way in C# by making them "extension methods" (see comment) but this gives tracers less flexibility and it would make the NoopTracer a little less efficient (because the extension method will still be executed and the no-op will happen later). Not sure if there's something similar in Java?

Marking it as an enhancement for the time being ;)

@tedsuo @carlosalberto can we consider getting this included into 0.32.0?


ability to override headers upon construction

Added the ability to pass headers during the construction of a BigCommerce classed object instance.  This not only allows the ability to override GZipped request/responses for development purposes, but any other thing that may want to be added to the headers of the request to the BC API.
note: I'm not sure my test is in the best place for this... Please let me know if you'd like me to make any modifications and resubmit.  Or maybe an additional test to make sure custom headers are getting tacked on within the BigCommerce classed object instance.

@jmnsf No problem.  I have removed the package.lock file. 👍

This is awesome, will the npm package be updated soon?


Delete downloaded chapters

Describe your suggested feature
Can you add the possibility to delete downloaded chapters? It make the backup file bigger and bigger because the downloaded chapters also got backed up too.
Other details

Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] If this is an issue with an extension, I should be opening an issue in the extensions repository.
[X] I have updated the app to version 0.1.28.
[X] I will fill out all of the requested information in this form.

if chapters were deleted then because it has releation with history table in database then both of them would be deleted,
what do you think of just deleting the content of selected chapter instead of deleting whole chapter?


GHA: use llvm-mt instead of mt

Now that we build with libxml2, use the LLVM manifest tool over the Microsoft one.

CI run at https://github.com/thebrowsercompany/swift-build/actions/runs/12361117119


Link does not work in configuration page for methods

Expected behavior
I expect links to work in the backoffice configuration page.
Actual behavior
Links are escaped and not clickable.

Steps to reproduce the behavior

Install PrestaShop
Install mollie
go to config page, part of method options and open a method

Environment

PrestaShop version: <IP_ADDRESS>
Mollie module version: 4.5.2
PHP version: 7.1.32

Hey there, @muyncky!
Thank you for raising this request!
We will overview everything, and get back to you!
Best Regards,
Invertus Support team.

Hello there @muyncky!
Our team has fixed the issue, you will be able to see everything in the next release, which should be done around the middle of September.
If you have any other questions, let us know!
Best Regards,
Invertus Support team.


Type guard "in" for undefined not working when using strictNullChecks + noUncheckedIndexedAccess

Bug Report
type guard in undefined array indexed access
🔎 Search Terms

🕗 Version & Regression Information

This changed from version 4 with the introduction of noUncheckedIndexedAccess
This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
I was unable to test this on prior versions because _______

⏯ Playground Link
https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&filetype=ts#code/FAYw9gdgzgLgBAQwEYgFxwEoFNwCcAmAPLLgJYQDmANCeRQHxwC8cA3gL4DcwwAZgK4QQMUpDhIEuABSJcFdLUpwAlG2BwNcUrzgzJFLREQoVazebjho8fAhgJmxkAG1ZBgLrdz7YD6A
💻 Code
const abc: Record<string,string> = {};

function bar( arg: string ) {
    if ( arg in abc ) {
        const data = abc[ arg ];
    }
}

🙁 Actual behavior
data is string|undefined despite it being typeguarded with "in" on a Record<string, string> which means that it cannot be undefined
🙂 Expected behavior
data should be string
The current bug causes either lots of redundant code (as we have to typeguard for undefined again separately) or disabling noUncheckedIndexAccess which would snooze tons of potential bugs though.

Being tracked at #10530.  The issue is that arg is of type string and not a string literal type.  Observe the difference:
const abc: Record<string, string> = {};
function bar() {
    const arg = "k"
    if (arg in abc) {
        const data = abc[arg];
        // const data: string
    }
}

Until and unless #10530 is fully resolved, the most ergonomic way to do what you're doing is to give up on in and just check for undefined:
function baz(arg: string) {
    const data = abc[arg];
    if (data !== undefined) {
        data;
        // const data: string
    }
}

Playground link to code

Sigh, no it's the right issue, it's just that the description isn't quite specific enough anymore.  See #53454 for example.

This was the entire concern of the feature in the first place when we implemented it. People wanted a sound and convenient method to check for array bounds or key inclusion automatically. And we said, "We don't have any way to do that since both index and map array mutation can happen at almost any time," and everyone said, "No, that's fine. We can deal with the inconvenient but sound version, having anything is better than nothing for sure." So that's what we have, and indeed it is inconvenient in some cases.

@RyanCavanaugh I suppose there's an argument to be made that naming a feature "no unchecked indexed access" was misleading when it errors even in cases where the index is checked (via in, e.g.), and the enforced contract is actually that you check the value you receive, not the indexed access itself (which can remain unguarded).
But yeah, this is a good case-in-point for why noUncheckedIndexedAccess isn't the default.


Don't register SIGTERM handler on Windows

(Maybe) Fixes #151
Registering a SIGTERM handler on Windows raises an exception.
@kevmoo PTAL. Things to consider: this explicitly checks for Windows, but it might be better to just try to catch the exception and then log that the SIGTERM handler couldn't be registered for the host OS.
Before merging this, we should get someone with Windows expertise to weigh in. I left this comment in the issue, copied here for convenience:

While the exception would seem to indicate that SIGTERM isn't supported, I found this old Microsoft doc that seems to indicate that SIGTERM is supported. 🤷🏻♂

This might or might not be the appropriate fix. There might be an issue with Dart? According to this Microsoft doc, Windows includes SIGTERM for ANSI compatibility:

The SIGILL and SIGTERM signals are not generated under Windows. They are included for ANSI compatibility.

@YazeedAlKhalaf Thanks for confirming. I'd still like to get at least one more review from either @kevmoo or @grant just to make sure they also think this is the "right" fix.

We should do a follow-up to at least run a sanity check of all tests on windows

We should be able to do this with a GitHub CI build ... a dedicated job that only runs a set of dart tests without the bash dependencies we've got (like tool/ci.sh).


Update API reference

This PR will update the API reference to align with the new code.

Duplicate of #1088


Links are not working for more than one support

The current test where we have links has only one support.
We should add another test with supports on both bearings to evaluate if the implementation is correct.

I have tried this simple example below and it doesn't work:
def rotor_example():
    i_d = 0
    o_d = 0.05
    n = 6
    L = [0.25 for _ in range(n)]

    shaft_elem = [
        ShaftElement(
            l, i_d, o_d, steel, shear_effects=True, rotary_inertia=True, gyroscopic=True
        )
        for l in L
    ]

    disk0 = DiskElement.from_geometry(
        n=2, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )
    disk1 = DiskElement.from_geometry(
        n=4, material=steel, width=0.07, i_d=0.05, o_d=0.28
    )

    stfx = 1e6
    stfy = 0.8e6
    bearing0 = BearingElement(0, n_link=7, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support0 = BearingElement(7, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)
    bearing1 = BearingElement(6, n_link=8, kxx=stfx, kyy=stfy, cxx=0, scale_factor=1)
    support1 = BearingElement(8, kxx=stfx, kyy=stfy, cxx=0, tag="Support", scale_factor=1)

    point_mass0 = PointMass(7, m=1.0)
    point_mass1 = PointMass(8, m=1.0)

    return Rotor(shaft_elem, [disk0, disk1], [bearing0, support0, support1, bearing1],
                 [point_mass0, point_mass1])

rotor = rotor_example()
rotor.M().shape

Traceback (most recent call last):

  File "<ipython-input-41-d8ae27a43e7d>", line 1, in <module>
    rotor.M().shape

  File "C:/Users/USER/Google Drive/Backup notebook/Lavi/ross-master/ross/rotor_assembly.py", line 678, in M
    M0[np.ix_(dofs, dofs)] += elm.M()

IndexError: index 32 is out of bounds for axis 0 with size 32

The size of the mass matrix is correct (32 x 32), however when we come to observe the elements' indexes we can notice a bug on the last line (shown in the print below). The Global Index should be GlobalIndex(x_8=30, y_8=31)
GlobalIndex(x_0=0, y_0=1, alpha_0=2, beta_0=3, x_1=4, y_1=5, alpha_1=6, beta_1=7)
GlobalIndex(x_1=4, y_1=5, alpha_1=6, beta_1=7, x_2=8, y_2=9, alpha_2=10, beta_2=11)
GlobalIndex(x_2=8, y_2=9, alpha_2=10, beta_2=11, x_3=12, y_3=13, alpha_3=14, beta_3=15)
GlobalIndex(x_3=12, y_3=13, alpha_3=14, beta_3=15, x_4=16, y_4=17, alpha_4=18, beta_4=19)
GlobalIndex(x_4=16, y_4=17, alpha_4=18, beta_4=19, x_5=20, y_5=21, alpha_5=22, beta_5=23)
GlobalIndex(x_5=20, y_5=21, alpha_5=22, beta_5=23, x_6=24, y_6=25, alpha_6=26, beta_6=27)
GlobalIndex(x_2=8, y_2=9, alpha_2=10, beta_2=11)
GlobalIndex(x_4=16, y_4=17, alpha_4=18, beta_4=19)
GlobalIndex(x_0=0, y_0=1, x_7=28, y_7=29)
GlobalIndex(x_7=28, y_7=29)
GlobalIndex(x_8=32, y_8=33)

I'm debugging some methods like .dof_global_index() and .dof_local_index() from class Element and I've noticed something strange.
I added a simple print in both methods, just to check whenever they're called and the code starting running their routines respectively. Look what I did:
    def dof_local_index(self):

        print("running dof_local_index")

        dof_mapping = self.dof_mapping()
        dof_tuple = namedtuple("LocalIndex", dof_mapping)
        local_index = dof_tuple(**dof_mapping)

        return local_index

and
    def dof_global_index(self):

        print("running dof_global_index")

       dof_mapping = self.dof_mapping()
        global_dof_mapping = {}
        for k, v in dof_mapping.items():
            dof_letter, dof_number = k.split("_")
            global_dof_mapping[dof_letter + "_" + str(int(dof_number) + self.n)] = v
        dof_tuple = namedtuple("GlobalIndex", global_dof_mapping)

        for k, v in global_dof_mapping.items():
            global_dof_mapping[k] = 4 * self.n + v

        global_index = dof_tuple(**global_dof_mapping)

        return global_index

When I run an example for a single shaft element, calling both method this is what happens:
>>> shaft = ShaftElement(1, 0, 1, steel, 2)
>>> shaft.dof_global_index()
running dof_global_index
Out[1]: GlobalIndex(x_2=8, y_2=9, alpha_2=10, beta_2=11, x_3=12, y_3=13, alpha_3=14, beta_3=15)

>>> shaft.dof_local_index()
running dof_local_index
Out[2]: LocalIndex(x_0=0, y_0=1, alpha_0=2, beta_0=3, x_1=4, y_1=5, alpha_1=6, beta_1=7)

So, we can see that everything is running fine, as expected.
But now, let's run and example for point mass element (the same behaviour occurs for disk, bearings and seals):
>>> pointmass = point_mass_example()
>>> pointmass.dof_global_index()
Out[3]: GlobalIndex(x_0=0, y_0=1)

>>> pointmass.dof_local_index()
Out[4]: LocalIndex(x_0=0, y_0=1)

Although the outputs are correct, the print tests are not being printed when running elements but shaft elements.
let's see another example to get a wider view:
Using the .rotor_example(), we'll return the rotor's mass matrix, checking every element degree of freedom (notice the two prints added inside .M())
    def M(self):

        M0 = np.zeros((self.ndof, self.ndof))

        for elm in self.elements:
            print("element type: ", elm.type)
            dofs = elm.dof_global_index()
            print("dof ", dofs)
            M0[np.ix_(dofs, dofs)] += elm.M()

        return M0

>>> rotor1 = rotor_example()
>>> rotor1.M().shape
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_0=0, y_0=1, alpha_0=2, beta_0=3, x_1=4, y_1=5, alpha_1=6, beta_1=7)
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_1=4, y_1=5, alpha_1=6, beta_1=7, x_2=8, y_2=9, alpha_2=10, beta_2=11)
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_2=8, y_2=9, alpha_2=10, beta_2=11, x_3=12, y_3=13, alpha_3=14, beta_3=15)
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_3=12, y_3=13, alpha_3=14, beta_3=15, x_4=16, y_4=17, alpha_4=18, beta_4=19)
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_4=16, y_4=17, alpha_4=18, beta_4=19, x_5=20, y_5=21, alpha_5=22, beta_5=23)
element type:  ShaftElement
running dof_global_index
dof  GlobalIndex(x_5=20, y_5=21, alpha_5=22, beta_5=23, x_6=24, y_6=25, alpha_6=26, beta_6=27)
element type:  DiskElement
dof  GlobalIndex(x_2=8, y_2=9, alpha_2=10, beta_2=11)
element type:  DiskElement
dof  GlobalIndex(x_4=16, y_4=17, alpha_4=18, beta_4=19)
element type:  BearingElement
dof  GlobalIndex(x_0=0, y_0=1)
element type:  BearingElement
dof  GlobalIndex(x_6=24, y_6=25)
Out[5]: (28, 28)

As we can see, when the loop reaches elements different than shaft elements, the prints do not return. I don't know if this kind of behaviour was supposed to happen, but this hinders the changes to fix the link bug.

Nevermind, I've found the problem. Some elements were importing .element.py from another file.

I found a solution for this problem, but I don't know if it's the best way to solve it.
Here, we have the attribute that indicates de number of degrees of freedom.
        # number of dofs
        self.ndof = (
            4 * max([el.n for el in shaft_elements])
            + 8
            + 2 * len([el for el in point_mass_elements])
        )

This equation won't match the .dof_global_index() method to return the global dof's for each element when instantiating more than one support, for example. Then, the code will break at some point when running the mass / stiffness / damping matrices.
We could change it to + 4 * len([el for el in point_mass_elements]) and turn the PointMass mass matrix a 4x4, considering inertias equal zero. This creates another problem: we would have singular matrices when calculating global matrices. So I solved this by adding these two lines to .M(), .C(), .G() and .K() methods in rotor_assembly.py:
    def M(self):
        M0 = np.zeros((self.ndof, self.ndof))

        for elm in self.elements:e)
            dofs = elm.dof_global_index()
            M0[np.ix_(dofs, dofs)] += elm.M()

        M0 = M0[~np.all(M0 == 0, axis=1)]
        M0 = M0[:, ~np.all(M0 == 0, axis=0)]

        return M0

These 2 lines remove rows and columns filled with zeros in a given matrix avoiding, then, getting a singular matrix.
        M0 = M0[~np.all(M0 == 0, axis=1)]
        M0 = M0[:, ~np.all(M0 == 0, axis=0)]

The problem is: the attribute ndof won't match the actual matrices shape. We could assign a new value for ndof when running the matrices methods.
@raphaeltimbo, @GabrielBachmann any ideas?

I believe we have a problem on how we are calculating the global index for the PointMass.
For example:
>>> for p in (rotor.point_mass_elements):
>>>    print(f'{p.tag}: {p.dof_global_index()}')
Point Mass 0: GlobalIndex(x_7=28, y_7=29)
Point Mass 1: GlobalIndex(x_8=32, y_8=33)

I think the correct result here should be:
Point Mass 0: GlobalIndex(x_7=28, y_7=29)
Point Mass 1: GlobalIndex(x_8=32, y_8=33)

Totally agree with you, because the .dof_global_index() method always multiplies the elements' n value by 4. But for point masses, it should be multiplied by 2.
        for k, v in global_dof_mapping.items():
            global_dof_mapping[k] = 4 * self.n + v

Hi there!
I have marked this issue as stale because it has not had activity for 45 days.
Consider the following options:

If the issue refers to a large task, break it in smaller issues that can be solved in
less than 45 days;
Label the issue as wontfix or wontfix for now and close it.

PR #407 has been merged and closes this issue.


support for nvim LSP diagnostics without ALE

Add support for buffer diagnostics reported by a LSP (language server protocol) server like python-lsp-server. Neovim 0.8+ only. See :lua print(vim.inspect(vim.diagnostic.get())), that's what the LSP diagnostic response looks like, I guess we need a lua function to count the entries of the lua table. See :h vim.diagnostic.get and related stuff for more, there seems to be an argument to restrict the "severity" of the diagnostics in the returned table, so we could probably mimic ALE's statusbar interface then and count "errors" and "warnings" separately.

Have removed ALE from my config. Now I use these mappings to jump between LSP diagnostics or open them on the loclist (see :h lopen). Will retain ALE support for Vim8 compatibility, LSP is neovim exclusive:
" Mappings for LSP and lspconfig.
nnoremap <silent> gl <Cmd>lua vim.diagnostic.setloclist()<Cr>
nnoremap <silent> ]d <Cmd>lua vim.diagnostic.goto_next()<Cr>
nnoremap <silent> [d <Cmd>lua vim.diagnostic.goto_prev()<Cr>


Device Strings

Description
This pull request adds a new string representation, device_string, which is intended to be a GPU-friendly alternative to OIIO::ustring. A device_string is essentially a struct consisting of an integer ID and a pointer to a C-style string:
    struct device_string {
        uint64_t m_tag;
        const char* m_chars;
    };

The ID can be used to perform fast comparison between two device_string values, similar to how pointer comparisons are used with ustring. The char* is available for cases where the string contents are needed (mainly printf).
device_string only supports a limited sub-set of string functionality. No dynamic operations are supported.
IMPORTANT NOTE
The minimum version of OptiX has been increased to 5.1, to accommodate device_string initializers in compiled C++/CUDA code.
Assigning IDs
For comparisons between compiled and user-supplied strings to be valid, all parties (especially liboslexec and the renderer) must agree on their IDs. This approach involves assigning fixed IDs to some subset of "important" strings (closure parameters, texture options, etc.), while allowing the user to assign additional tags via the OSL ShadingSystem. Shader compile-time strings that do not have a pre-defined tag fall back to the ustring hash.
The tags for important, common strings are defined in a shared header file (OSL/device_string.h):
    enum StringTags: uint64_t {
        EMPTY_STRING = 0,
        PERLIN,
        UPERLIN,
        ...
        UNKNOWN_STRING = ~0u
    };

Additional string tags can be registered int the renderer setup code (a more detailed example is in testoptix/shading.cpp):
    // this call will fail if "test string" has been registered with a different tag
    shadingsystem->register_string_tag ("test", 1234u);
    // the renderer can query the ShadingSystem for registered strings
    uint64_t tag = shadingsystem->lookup_string_tag ("perlin");

It should be noted that no attempt is made to guarantee the uniqueness of device_string IDs, as that implies a central run-time registry, which is a mechanism we are trying to avoid. This places some burden on the renderer to ensure that tag values are used consistently.
Tests
We have added a printf test to the testsuite. More tests will be forthcoming in subsequent pull requests that exercise string functionality more thoroughly.
Checklist:

[x] I have read the contribution guidelines.
[x] I have previously submitted a Contributor License Agreement.
[x] I have updated the documentation, if applicable.
[x] I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
[x] My code follows the prevailing code style of this project.

And any not in the table will just use the ustring hash?
Why not use the ustring hash for all of them? Is there advantage to having the pre-registered ones?

OK, dumb question:
If we rigged ustring to have a (build time? run time?) option to allocate all of its unique string character memory using cudaMallocManaged(), could we then just pass plain old ustrings and call it a day, because it could use the pointer address for the assignments and comparisons, and when it needs the characters, they would simply be available through the magic of unified memory?

Using the hash in all cases would definitely be more convenient. The main problem that I ran into is statically computing the ustring hash for arbitrary strings in compiled code. There is probably some combination of macro/template/constexpr wizardy to make that work, but I was not successful in my attempts.

Using the hash alone would still run the risk of collisions right?
Remind us why the pointer itself is not good enough? Why do you need statically known integers for the strings given that you are making all the ptx at runtime anyway?

Chris: yes, the hash could in theory collide. The character addresses cannot, they are necessarily unique 64 bit values.
In normal ustring use, it's not the hash we use to compare strings, but the address of the unique representation of characters. This is runtime-dependent, but we don't care.
The hashes are certainly deterministic, they ought to be able to be precomputed for strings we care about. But like Chris says, using the addresses instead of the hashes is preferred, and safer.
What's the circumstance in which the hash value needs to be known at compile time? Is it strictly for the named closure parameter names, which must be pre-compiled to PTX?
I'm sure you've probably been down these roads already, but of course I have to chase it down myself to be confident that this is the least-awkward design we can come up with.
Can the fact that all closures need to be registered (ShadingSystem::register_closure) in a way that communicates the names of the params, somehow be used to communicate the string addresses (though they be runtime determined) in time for the PTX compilation?

Yeah, we should have updated the ticket... Tim and I (and some others) have had some email and videoconf follow-ups on this PR and we're looking into variants of the strategy presented here. So take the code here with a grain of salt, it may not be the final stab at this.

Were just some simple notes while I was reading through, as this does relate to some issues I'm also hitting.  Good to know a bit of the larger context, and hope the following doesn't inject into an already complicated affair, but should be easy enough to discard if the need arrises.

Would it be advantageous for these methods to be a part of RendererServices?
One could then do the following without requiring a back pointer to the owning ShadingSystem.
RendererServices::TextureHandle* RendererServices::get_texture_handle(ustring file) {
  uint64_t texTag = this->lookup_string_tag(file);
  if (texTag == StringTags::UNKNOWN_STRING) {
    texTag = this->bindTexture(file);
    this->register_string_tag(file, texTag);
  }
  return (RendererServices::TextureHandle*) texTag;
}

Are other execution models that might have even less string manipulation available being considered?
Is having device_string as a simple an index into buffers the renderer provides a possibility?
For example the const char* inside device_string is not valid in OpenCL-1.x.

Furthermore, how much string manipulation is available through Optix? Do/will patterns like this work?
string CdTex;
getattribute("", CdTex);
texture(concat("/path/to/", CdTex, ".exr"), u, v);

I've done some work const-folding string formatting & concatenation, but it does so on the llvm::Module.  Is it a path worth going down to handle as an LLVM optimization-pass or preferable to do so in OSL::RuntimeOptimizer?

As Larry said, Tim explored putting the ustring table in Unified Memory where it would be accessible to both CPU and GPU, using cudaMallocManaged().  This might work someday, but at present, there are enough subtle interactions with the CUDA memory manager that it doesn't seem prudent to use in a library like this.  (What if the CUDA context is destroyed, what if some other plugin is running a GPU kernel while the table is being updated, etc.)
Meanwhile, the discussion here inspired Tim to write a simplified DeviceString class.  We are in the process of withdrawing this PR, and posting a new PR, with "device strings Take 2".


Use a tape for reading in simdnbt::borrow and probably introduce even more UB

This was all inspired by Jannis's work for Brokkr NBT and also simdjson. It's currently not as optimal as it could be as Jannis has demonstrated, so I'll probably end up optimizing this more later.
Now, reading is about twice as fast (~2GiB/s -> ~4.1GiB/s), though it's only implemented for simdnbt::borrow.
This change makes it so when reading, we push to a Vec<u64> that encodes every encountered tag. The encoding is 1 byte for the tag kind (which counts each type of array as its own type), and the other 7 bytes depend on the value. A lot of the values contain a pointer to the data as a u56, which is possible because CPUs don't actually use the top bits for anything.
Compounds, lists of compounds, and lists of lists include a u32 with a skip offset for the tape that tells us how big the contents of this tag in the tape are (measured in u64s), so we can skip over the tag (this is necessary whenever we're iterating so we don't have to parse things we don't care about). Also, compounds, lists of compounds, and lists of lists also include a u24 that contains the actual len so we can avoid iterating to calculate that (though, if the tag has more than 2^24 items we are actually forced to iterate).
 Miri warns about the integer-to-pointer casts but as far as I know there's no way around those without sacrificing performance. Due to all the unsafe code, this is gonna need a bunch of testing before I'm ok with merging this. I should probably add a fuzzer.

i got it working in azalea, so i think it's actually ready to merge and publish now :)


Fix xcodebuild action specs

As of 2016-12-7, CircleCI has started setting the FL_BUILDLOG_PATH environment variable, which changes the output location for build logs.
Many specs were assuming that the generated commands would include the default log path, rather than using the buildlog_path helper function that takes into account the environment variable.
This fixes those specs to use the helper and get the right path.

@mfurtak Looks good to me as a change.
One potentially unintended side effect is that you'll now be sending the test test logs to CI artefacts tho.

@DanToml Because this path that Circle sets is collected as artifacts automatically? Would you suggest that we set FL_BUILDLOG_PATH for our project env vars to be somewhere else if we don't want this?

@mfurtak Yeah. We pointed it at artifacts to help with debugging builds. - For the case of fastlane/fastlane, you probably want to override it in your circle.yml

Thanks for the review!


Need doc on how to access webdriver driver from jasmine test

I'm using Karma with Jasmine, and it is unclear how to access the driver that is created by the karma-selenium-webdriver-launcher from within the Jasmine test.  As an example, in the below jasmine test, how do I obtain the driver?   The readme.md directions for configuring the karma.conf.js were clear, so I just need the missing piece as to how to access the resulting driver from within the jasmine tests.
describe('basic test', function () {
  var driver = getDriver();  // Bombs!  How do I get a handle to the webdriver?

	it('should be on correct page', function (done) {
		driver.get('http://www.wingify.com');
		driver.getTitle().then(function(title) {
			expect(title).toBe('Wingify');
			done();
		});
	});
});

And thanks for writing this!  If this doesn't work, I'm off to try Protractor, which seems like overkill for my non-AngularJS app.

TL;DR: I didn't write that part yet :frowning: Sorry
I would have used Protractor from the beginning, but it doesn't allow low-level access to the browser (say, to load an extension).
Now that I look again, it turns out Karma (understandably) loads the tests via a special Kama-HTML page in the browser. A simple test, like driver.get(...) would change the page and disrupt the CLI Karma from the webpage Karma (test fail?). So now I'm pretty sure using Karma is a dead-end. :frowning:
Ideally, I want to be able to use Protractor tests, but the browser object would have further controls. Perhaps all of these should be features for Protractor, instead of a separate project?

Thanks Nick - I had a hunch that Karma+Selenium-webdriver might be
incompatible (both want to drive the browser), but nice to see it
confirmed.
On to Protractor, which has (some) support for non-AngularJS apps (or
maybe more accurately, has additional features for AngularJS apps that I
just won't use).
Thanks again,
Brad
From:   Nick Oliver<EMAIL_ADDRESS>To:     PixnBits/karma-selenium-webdriver-launcher
<EMAIL_ADDRESS>Cc:     ilbmiller<EMAIL_ADDRESS>Date:   02/24/2015 09:18 PM
Subject:        Re: [karma-selenium-webdriver-launcher] Need doc on how to
access webdriver driver from jasmine test (#1)
TL;DR: I didn't write that part yet Sorry
I would have used Protractor from the beginning, but it doesn't allow
low-level access to the browser (say, to load an extension).
Now that I look again, it turns out Karma (understandably) loads the tests
via a special Kama-HTML page in the browser. A simple test, like
driver.get(...) would change the page and disrupt the CLI Karma from the
webpage Karma (test fail?). So now I'm pretty sure using Karma is a
dead-end.
Ideally, I want to be able to use Protractor tests, but the browser object
would have further controls. Perhaps all of these should be features for
Protractor, instead of a separate project?
—
Reply to this email directly or view it on GitHub.
NOTICE from Ab Initio: This email (including any attachments) may contain
information that is subject to confidentiality obligations or is legally
privileged, and sender does not waive confidentiality or privilege. If
received in error, please notify the sender, delete this email, and make
no further use, disclosure, or distribution.

Not that it helps @ilbmiller :frowning: but as a note
FWIW Protractor may give access to the browser instance in a test https://github.com/angular/protractor/blob/master/lib/protractor.js#L118
and
https://github.com/angular/protractor/blob/master/lib/runner.js#L154

Thanks Nick.
Protractor does give access directly to the webdriver via the
'browser.driver' variable in global scope (but you can also use 'browser'
directly).  Only tricky part is making sure that you invoke '
browser.ignoreSynchronization = true' so that it doesn't wait (forever)
for angular js app to initialize.
Below is a simple protractor example that worked for me (this is the
javascript produced by the typescript compiler).  A helpful link that got
me going was:
http://ng-learn.org/2014/02/Protractor_Testing_With_Angular_And_Non_Angular_Sites/
Note that 'browser', by/By, and 'element' variables are automagically put
in the test scope by protractor (and there are more).
cheers,
Brad
*********************************** EchoSpec.js **************************
///
///
"use strict";
describe('basic echo test', function () {
var echoInputEl;
var echoResultEl;
var echoBtnEl;
beforeAll(function () {
// Otherwise waits for angular js app to fully initialize, which
never happens as my app isn't angular...
browser.ignoreSynchronization = true;
});
beforeEach(function () {
// Best practice: isolate page-specific html bindings needed by
tests (aka page object)
browser.get('http://localhost:8080/cc/js/cv4/cv4.html#/mainTab/3'
);
echoInputEl = element(by.id('echoInput'));
echoInputEl.clear();
echoResultEl = element(by.id('echoResult'));
echoBtnEl = element(by.id('echoBtn'));
});
it('verify echo submit button', function (done) {
var msg = 'foo';
echoInputEl.sendKeys(msg);
echoBtnEl.click();
// Now wait for response, and check echoResult field
echoResultEl.getText().then(function (txt) {
expect(txt).toBe(msg);
done();
});
});
it('verify enter will submit echo request', function (done) {
// This will enter 'bar' and hit enter, thereby causing page to
async submit
var msg = 'bar';
echoInputEl.sendKeys(msg + '\n');
// Now wait for response, and check echoResult field
echoResultEl.getText().then(function (txt) {
expect(txt).toBe(msg);
done();
});
});
});
From:   Nick Oliver<EMAIL_ADDRESS>To:     PixnBits/karma-selenium-webdriver-launcher
<EMAIL_ADDRESS>Cc:     ilbmiller<EMAIL_ADDRESS>Date:   02/25/2015 11:59 AM
Subject:        Re: [karma-selenium-webdriver-launcher] Need doc on how to
access webdriver driver from jasmine test (#1)
Not that it helps @ilbmiller but as a note
FWIW Protractor may give access to the browser instance in a test
https://github.com/angular/protractor/blob/master/lib/protractor.js#L118
and
https://github.com/angular/protractor/blob/master/lib/runner.js#L154
—
Reply to this email directly or view it on GitHub.
NOTICE from Ab Initio: This email (including any attachments) may contain
information that is subject to confidentiality obligations or is legally
privileged, and sender does not waive confidentiality or privilege. If
received in error, please notify the sender, delete this email, and make
no further use, disclosure, or distribution.


[BUG] Beast models missing inheritance from DataclassJsonMixIn

Describe the bug
Doing JobSocket.from_dict(...) causes a pylint error because base class from dataclass json is not used. Annotation adds the method, so no runtime failure will happen, but linter doesn't like this.

Fixed in v3 connector


Added data generation to the utils package

This PR adds a utility function to generate simple clustered data.

Current coverage is 90.46% (diff: 100%)

Merging #16 into master will increase coverage by 0.32%

@@             master        #16   diff @@
==========================================
  Files            11         12     +1
  Lines           619        640    +21
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            558        579    +21
  Misses           39         39
  Partials         22         22

Powered by Codecov. Last update 16c69f8...00a2aa3


Create issue with belongsToMany if no option selected

There is an error, when trying to create or update resource. It appears when you dont select an option.

code example:
Multiselect::make('Country', 'countries')
->hideFromIndex()
->nullable()
->belongsToMany(Country::class, false),
error:

Heya! Fixed in version 4.4.1. Sorry about that.


Backup Wallet remove other wallet's backup in same backup folder.

Should the remove process only remove the same wallet file the wallet is trying to use ?
cut from debug.log:
==> C:\TestNetData\testnet3\debug.log: file truncated <==
2015-08-11 04:02:25 Creating backup of "C:\TestNetData\testnet3\wallet.dat" -> "C:\TestNetData\testnet3\backups\wallet.dat.2015-08-11-04.02"
2015-08-11 04:02:25 Old backup deleted: "C:\testnet3\backups\mn-wallet.dat.2015-08-11-03.34"
2015-08-11 04:02:25 Old backup deleted: "C:\testnet3\backups\mn-wallet.dat.2015-08-08-01.52"
2015-08-11 04:02:25 Old backup deleted: "C:\testnet3\backups\mn-wallet.dat.2015-08-07-19.16"
2015-08-11 04:02:25 Old backup deleted: "C:\testnet3\backups\mn-wallet.dat.2015-08-07-19.00"
2015-08-11 04:02:25 Using wallet wallet.dat
2015-08-11 04:02:25 init message: Verifying wallet...

So, my rarely used masternode wallet's backup will be removed while using regular wallet.
BTW,I think this is normal to use same data folder to share same blockchain's database.

Did you change the default number of backups in dash.conf?
Or did you use a different dash.conf (with a different settings) within the same folder?
How many mn-wallet.dat.* are still there?

Nope, I don't change the default number of backups
Yep, I use different config.
I started MN-wallet 4 times before run this regular wallet so 4 files are removed.

Should be fixed now.