How to properly inject parent(s) into validators

I've seen several examples of how to access the parent instance by using a Custom rule and casting the ParentContext.InstanceToValidate property.
However, this approach seems fragile to me.
Therefore, you being the architect of this excellent framework might have some advice on how to better approach this issue.
We have for instance a validator that works stand-alone. But if it's supplied with another object in the constructor we add some more rules specific for this object.
This approach does not work very well, since we use DI - we inject the other validators that are needed by the validator into the constructor. We do not new up validators in SetValidator(). This means we'll have to register the additional optional dependencies prior to creating the parent validator.
This does not smell good at all, therefore I'm asking your advice on this.
I have some thoughts on the matter, but I'm not sure how to do it in FluentValidation.
Would it be possible to create something like this (this does not compile btw)?
public static IRuleBuilderOptions<T, TElement> Must<T, TParent, TElement>(this IRuleBuilder<T, TElement> initial, Func<TElement, TParent, bool> predicate)
	{
		return initial
			.Custom((x, ctx) =>
			{
				// Recursively get a parent of type TParent
				var parent = default(TParent);

				// Execute the predicate
				predicate(x, parent);
			});
	}

However, this approach seems fragile to me.

Why do you think that? If the validator is for a specific type, T, then casting the InstanceToValidate to T will always succeed.

We have for instance a validator that works stand-alone. But if it's supplied with another object in the constructor we add some more rules specific for this object.

Any reason you're not using rulesets for this? Typically validators are always constructed in the same way, regardless of what you pass in to them and then rules can be included/excluded using rulesets. I wouldn't really recommend conditionally adding rules to a validator.

Would it be possible to create something like this?

I don't understand the purpose of the method you've given. Can you elaborate?

Why do you think that? If the validator is for a specific type, T, then casting the InstanceToValidate to T will always succeed.

The parent isn't always of the same type. Take an address for instance. This validator can be assigned to any number of entities (validators).

Any reason you're not using rulesets for this? Typically validators are always constructed in the same way, regardless of what you pass in to them and then rules can be included/excluded using rulesets. I wouldn't really recommend conditionally adding rules to a validator.

We are using rulesets and When's for this. I'm not good at explaining myself. My point was that injecting the dependency into the constructor is a poor design for us, since it limits us to only one instance of a given type for the entire object-graph (we dont new validators inside the constructor).

I don't understand the purpose of the method you've given. Can you elaborate?

Given an poorly selected example of an object graph of Customer -> Order -> OrderLine where the OrderLine requires some rules to evaluate the customer, our current construct with DI would not let us validate a collection of Customers for instance (using a CustomerCollectionValidator) since the Customer vould need to be registered and injected already at the time of the creation of the CustomerCollectionValidator.
My thoughts with the non-compilable code was to recursively traverse the parent validators until an instance of the specified type was found and then evaluate using that instance.
I'm aware that this might be an incorrect approach as it could mistakenly return e.g. a Customer in cases where it shouldn't given another validator configuration.
Anyways, I am unsure how best to proceed on this. It might be our internal design is flawed, but the fact remains that we need to validate an entity using properties of a parent object N levels up in the graph.
Eagerly awaiting your thoughts on the matter.

So, if we proceed with out Customer -> Orders -> OrderLines scenario, what you're saying given that we want to validate that an orderline's delivery date isn't earlier than an orders delivery date, you would add these rules in the order validator?

Yes, that's correct

And if the orderlines are just exposed as a collection of OrderLine objects, then I think you could just use RuleForEach for that without having to resort to somethign too custom, eg:
RuleForEach(x => x.OrderLines).Must((orderline, order) => return orderLine.DeliveryDate > order.DeliveryDate)

What if the properties are two collections down? E.g an orderline being validated against something in the customer?
The customer validator would have to go through order validators first.

In that case you'd have to do something custom in the customer validator.

Do you have any suggestions as to how best to do this? I do not wish to loose the property property name indexes.

Not really I'm afraid....you're probably going to have to keep track of indexes manually if you want that. Honestly, if you're not able to refactor into a flatter model then I'd seriously consider reevaluating if FluentValidation is the right choice for doing this task.

I'm sorry, but I'm not quite ready to let the issue rest, because I've experienced the framework being very flexible.
If we return to the Custom() method where one has access to the ParentContext, isn't it possible to get the parent context of the parent as well?

Parent contexts are not recursively preserved when using SetValidator. I think you would need to create your own implementation of ChildValidatorAdaptor (which is used internally by SetValidator) if you wanted to implement that.

Ok, i'll have a look at your code and see if it's within my abilities to do what you suggest. Is this adaptor replacable or do I have to modify your code?

Internally, the context’s CloneForChildValidator method does have an argument that allows for preservation of parent context - this is used by RuleForEach.
If you had your own implementation of ChildValidatorAdaptor you could call this method, causing the parent context to be preserved. I’m not sure what side effects this would have though. I have a suspicion it’ll end up generating the wrong property names.

It’s not replaceable, it’d be a case of copying it and modifying it to suit what you’re trying to do. This is the class: https://github.com/JeremySkinner/FluentValidation/blob/master/src/FluentValidation/Validators/ChildValidatorAdaptor.cs

In your copy I’d first suggest seeing if setting PassThroughParentContext to true works without messing up properly name generation (this is an internal property as
It was a hack/workaround that was never finalised or intended for use with the public api, but may help for your case)
If that doesn’t work, you could potentially cache the hierarchy of contexts in the RootContextData dictionary (this is shared amongst all contexts)

I've had a quick look, and it already seems quite a task for someone without deep knowledge of your framework.
However, if I get around and manage to do what you suggest, would this be something you might consider including in your code?
To be honest, I'm not a fan of overwriting work by others - not to mention the maintenence effort this would require when updating etc.

Yes, if you managed to get a working solution and wanted to submit a pull request I’d be happy to review it and see whether it’s something that would benefit being in the core project.

@StefanHaug  This seems like the wrong way to solve your problem. That said, I think @JeremySkinner  gave you a clue on how to solve it: Flatten your model, inside of your Rule.
For example, here is the skeleton structure of what you need, prior to adding any extension methods to clean up the code (ReSharper is excellent at doing this for you once you build the right skeleton).
RuleFor(x => x)
.Must(x => {
var customerId = x.Id;
var flattenedOrderLines = x.Orders.SelectMany(x => x.Lines);
return flattenedOrderLines.Where(x => {
/* do your logic here */
});
})
.WithMessage();
And, to elaborate on what @JeremySkinner  is saying: FluentValidation doesn't support a "state accumulator" pattern.  You might want to look into a Maybe abstraction for that.

Nice tip! We're not in a mode to flatten our models at the moment, but we definitely are going to remove this dependency in the validators.
But I like your example - we could project a combination of customer/order/orderline into a flattened model and validate on that, while keeping our existing models.


Add hack to make it work with Auto Layout

Just added a couple of lines to make it compatible with Auto Layout. The finishing rect is calculated before loading the correct frame size of the Detail Controller, so it is necessary to layout its view with a little hack.
By the way, thanks for sharing your code!

Hmm, I rather not have to do this hack. It's possible that the view just needs to be loaded first. Could you try this and let me know if it works?
ZODetailViewController *detailController = (ZODetailViewController *)toViewController;
(void)[detailController view];
return [detailController.imageView convertRect:detailController.imageView.bounds toView:relativeView];

If this works, I'll update the library to do this internally such that they'll be no changes/hacks required for anyone using this.

I tried your suggestion, but it didn't work.
My code to force the layout (calling setNeedsLayout and layoutIfNeeded) comes from this article: https://www.objc.io/issues/3-views/advanced-auto-layout-toolbox/
You are right and the library should do this internally, so I moved these two lines of code to animateTransition: method and it works fine.

Great, thanks for fixing this. I'm going to merge and then update since this should only be an issue when presenting.

Go ahead and pull master and let me know if all looks good for you.

It works perfectly. Thanks!


Added faq page

#Pull Request Description
#404 Added Faqs page
Summary
This pull request adds a new FAQ page to the website and includes a link to it in the footer for easy navigation. The FAQ page contains commonly asked questions that provide helpful information for users.
Changes Made

Added a new FAQ page: A dedicated FAQ page has been created to address common questions about the website, its features, and usage.
Updated the footer: A link to the new FAQ page has been added to the footer section of the website, allowing users to easily access the FAQ page.

How to Test

Navigate to the homepage of the website.
Scroll to the footer and locate the FAQ link.
Click the FAQ link to verify that it directs to the new FAQ page.
Review the content on the FAQ page to ensure it displays correctly.

Screenshots

Homepage Footer:- FAQ Page:

Additional Information

The FAQ page is built using the existing design components to ensure consistency with the rest of the website.
Future updates to the FAQ section can be made directly on the FAQ page.

Related Issues

Closes #404  (Add FAQ page feature)

This is looking like blind copy and paste @ShivanshPlays, Please change the content according to our website.

@Anuj3553 okay, I took sample faqs as reference, I will study the website and curate the faqs accordingly.

okay will push the changes soon

Hyy @ShivanshPlays, Can you create FAQ page better than @Pushpa472 #398 work. I think she makes better FAQ page. You can take reference from it.

okay will do

@Anuj3553 In this issue i should make FQA page

hey i have redone the work, you can recheck it

@Anuj3553 now UI design not visible please see it

@Pushpa472  @Anuj3553  there was a react version mismatch , having some breaking dependencies, resolved them right now, have a look
https://github.com/user-attachments/assets/4fab0bb7-f823-46dc-91cf-23f487924fd3

@ShivanshPlays which dependencies, I checked many times, and there is a lost of error in the console i solve then also not work
if you known this plz tell me.. i am also working on frontend

@Anuj3553 please check

@Anuj3553 conflict resolved

@Anuj3553  please merge

@Anuj3553  @Pushpa472 hey can you review it and merge the branch


GA-2: initial addition of new base type

DO NOT MERGE
JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/GA-2
Change description
Add new GroupAccess base type
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[ ] No

Overtaken by https://github.com/hmcts/ccd-data-store-api/pull/2338


SW-4649 Add batch ID to withdrawal when a nursery transfer is created

Current dependencies on/for this PR:

main

PR #1632   👈

This stack of pull requests is managed by Graphite.


Implement Quality Focal Loss (QFL) in YOLOX

In the original implementation of QFL, it's calculate per scale level
        losses_cls, losses_bbox, losses_dfl,\
            avg_factor = multi_apply(
                self.loss_single,
                anchor_list,
                cls_scores,
                bbox_preds,
                labels_list,
                label_weights_list,
                bbox_targets_list,
                self.prior_generator.strides,
                num_total_samples=num_total_samples)

But in YOLOX, the loss are calculate as a whole without using multi_apply
        (pos_masks, cls_targets, obj_targets, bbox_targets, l1_targets,
         num_fg_imgs) = multi_apply(
             self._get_target_single, flatten_cls_preds.detach(),
             flatten_objectness.detach(),
             flatten_priors.unsqueeze(0).repeat(num_imgs, 1, 1),
             flatten_bboxes.detach(), gt_bboxes, gt_labels)

        # The experimental results show that ‘reduce_mean’ can improve
        # performance on the COCO dataset.
        num_pos = torch.tensor(
            sum(num_fg_imgs),
            dtype=torch.float,
            device=flatten_cls_preds.device)
        num_total_samples = max(reduce_mean(num_pos), 1.0)

        pos_masks = torch.cat(pos_masks, 0)
        cls_targets = torch.cat(cls_targets, 0)
        obj_targets = torch.cat(obj_targets, 0)
        bbox_targets = torch.cat(bbox_targets, 0)
        if self.use_l1:
            l1_targets = torch.cat(l1_targets, 0)

        loss_bbox = self.loss_bbox(
            flatten_bboxes.view(-1, 4)[pos_masks],
            bbox_targets) / num_total_samples
        loss_obj = self.loss_obj(flatten_objectness.view(-1, 1),
                                 obj_targets) / num_total_samples
        loss_cls = self.loss_cls(
            flatten_cls_preds.view(-1, self.num_classes)[pos_masks],
            cls_targets) / num_total_samples

Can I calculate QFL target, then pass all of the concat prediction and target to QFL without using multi_apply
        loss_cls = self.loss_cls(
            flatten_cls_preds.view(-1, self.num_classes), (joint_labels, joint_scores),
            weight=1.0,
            avg_factor=num_total_cls_samples)

Can I calculate QFL target, then pass all of the concat prediction and target to QFL without using multi_apply

Of course, you can.


sharedIndex use Too Much Memory. Add option to let runtime use a standalone index.

Is your feature request related to a problem? Please describe.
I have large amount of cue file which should be paesed and decoded to struct when program starting.
I found allocated memory does not decrease after my instance set to nil, and many objects still used by core/runtime.sharedIndex
In my case, I do not need cue to hold config information after program loaded.
I hope memory freed after instance destroyed.
Describe the solution you'd like
Add option to core/runtime.New or core/runtime.Init, to let runtime use a clone of sharedIndex. e.g.
// internal/core/runtime/runtime.go

func (r *Runtime) Init() {
	if r.index != nil {
		return
	}
	// r.index = sharedIndex
	r.index = sharedIndex.Clone()
	r.loaded = map[*build.Instance]interface{}{}
}

// internal/core/runtime/imports.go

func (x *index) Clone() *index {
    var n = newIndex()
    // clone data from x ......
    return n
}

Describe alternatives you've considered
Maybe we have some way for user to clear sharedIndex ?
Additional context

duplicate to #1424


Stop proxy while stop VNCHelper

Codecov Report

Merging #258 into master will increase coverage by 0.03%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master    #258      +/-   ##
=========================================
+ Coverage   59.27%   59.3%   +0.03%
=========================================
  Files          40      40
  Lines        3256    3256
  Branches      391     391
=========================================
+ Hits         1930    1931       +1
+ Misses       1222    1221       -1
  Partials      104     104

Impacted Files
Coverage Δ

core/video.py
36.84% <0%> (ø)
:arrow_up:

core/auth/custom_auth.py
65.21% <0%> (-2.18%)
:arrow_down:

vmpool/virtual_machines_pool.py
64.67% <0%> (+1.08%)
:arrow_up:

Continue to review full report at Codecov.

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

!test


Base64 image doesn't show in IonicView (iOS v10.0)

Hi
I have a small issue with Ionic View and the use of the camera with Ionic2, when I upload my app on Ionic View and try to use to picture I just took it works just fine with an Android device but not on iOS. Strangely when I build on my device with Xcode then the picture is rendered perfectly.
then((imageData) => {       this.base64image = "data:image/jpeg;base64," + imageData;
 <ion-card-content>       <img [src]="base64image" *ngIf="base64image" />     </ion-card-content>

This issue was moved to driftyco/ionic-view-issues#192

Hello, thanks for opening an issue with us! Since this is an Ionic View issue I have moved this issue to the ionic view repo.


Custom RPC

Hi, may i know if there is a way to set and use my own custom RPC ?

Yes, set up an enviromental variable called VUE_APP_MAINNET_URL equals to the http endpoint of your cluster.
You can check out at src/composables/clusters.ts

thank you so much for your help


fix: initialize cio sdk in appdelegate

closes https://github.com/customerio/issues/issues/10611
This pull request adds the initialization of the Customer.io SDK in the didFinishLaunchingWithOptions method of AppDelegate. This resolves an issue where push notification metric tracking was failing because the SDK was not properly initialized.
DO NOT MERGE THIS PR. STILL IN QA.

@Shahroz16  It was decided that we make this release and once when spike is done & we release the spiked feature then we can make the changes in the plugin. We do not want to hold the ticket until spiked feature is out.

Closing this PR as it resolved the initial issue, but it also brought to light additional concerns, such as duplicate push metrics for Expo users.
Another feature would cover this case and is planned to be done soon.
Hence closing this PR and not merging it.


Name of Visual Studio Team Services not changed to Azure DevOps

Name from VSTS has not been changed to Azure DevOps in the architecture diagram

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

ID: 20546dde-32a4-9fa5-899e-eb6e60f5cbf9
Version Independent ID: 55a03d85-415e-4b93-1082-fbbf92712801
Content: Hybrid CI/CD - Azure Solution Ideas
Content Source: docs/solution-ideas/articles/hybrid-ci-cd.md
Service: architecture-center
GitHub Login: @adamboeglin
Microsoft Alias: pnp

Thanks for reporting - this issue is under review.  This is a Microsoft Internal DevOps Bug ID AB#178078

@chilleregeravi There is already an internal work item created for this. So for now I will proceed with closure of this and If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Fix minor bug in Utils.is{c,f}contiguous

PythonCall.jl is awesome!
I was curious if NumPy arrays passed to Julia were C-contiguous or Fortran-contiguous, and ran into a minor bug in Utils.isccontiguous and Utils.isfcontiguous. Fixed it, added some tests.

Thank you, but those are internal functions and were not being used anywhere, so I have just deleted them.


Cannot find module 'metalsmith-placeholder'

Gotta build index.js!

man, and here I thought npm was gonna do that for me. thanks!

It's supposed to. Looks like you have it right. Maybe update your npm and try again? There were some versions where it didn't work right apparently

ok, fixed and published, grab 0.1.1.  Seems the precompile has to be done with babel not babel-node.

Speedy. Thanks! :)


Using mailsluper email ID

Can we use mailslurpers generated email ID to trigger emails from web application ??

what?

How can I configured mail id in mailsulper ?
How can I send an email from my gmail id to my local mailsulper account?


Upkeep/add oldest missing period age to api

Fixes #45

Codecov Report

Merging #47 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   96.59%   96.60%
=======================================
  Files          18       19    +1
  Lines         441      442    +1
  Branches       19       16    -3
=======================================
+ Hits          426      427    +1
  Misses         15       15

Impacted Files
Coverage Δ

src/main/scala/models/JobStatusSummary.scala
100.00% <ø> (ø)

src/main/scala/checker/CommandRunner.scala
100.00% <100.00%> (ø)

src/main/scala/checker/StatusChecker.scala
100.00% <100.00%> (ø)

src/main/scala/checker/checker.scala
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


NCCL setting problem

`# export NCCL_IB_HCA=mlx5_0:1,mlx5_1:1,mlx5_2:1,mlx5_3:1,mlx5_4:1,mlx5_7:1,mlx5_8:1,mlx5_9:1
export NCCL_IB_DISABLE=0
export NCCL_SOCKET_IFNAME=bond0
export NCCL_DEBUG=INFO
export NCCL_NVLS_ENABLE=0`
How to make adjustment for these settings? Unluckily I met with the error:
File "../miniconda3/envs/rdt/lib/python3.10/site-packages/torch/distributed/distributed_c10d.py", line 1910, in broadcast     work = group.broadcast([tensor], opts) RuntimeError: [1] is setting up NCCL communicator and retrieving ncclUniqueId from [0] via c10d key-value store by key '0', but store->get('0') got error: Connection reset by peer. This may indicate a possible application crash on rank 0 or a network set up issue.

you can try to change
"export NCCL_SOCKET_IFNAME=bond0"
input the results network of "ifconfig"

The NCCL settings in the provided script are designed for a multi-node setup. If you are training on a single node, you can simply comment out the multi-node communication settings. However, if you’re working with multiple nodes, you should adjust these settings based on your infrastructure to ensure proper communication between the nodes.

you can try to change "export NCCL_SOCKET_IFNAME=bond0" input the results network of "ifconfig"
Thanks all!


wb-mqtt-serial metrics page improvements

Total bus load
Sorting by clicking on appropriate column's header is added

Убрал

Rebase https://github.com/wirenboard/homeui/pull/276


Enable doc related lints

Currently we do not enforce documentation on public functions neither do we enforce documentation on errors.
We should have both!

[x] enable clippy::missing_errors_doc
[x] enable #![deny(missing_docs)]

This was done a while ago


Create GitHub App called "ImagingDataCommons App"

To support creating authoring commits and pull-requests from GitHub workflow like bump-idc-index-data-version.yml discussed in https://github.com/ImagingDataCommons/idc-index-data/pull/5, consider the following:

Go to https://github.com/organizations/ImagingDataCommons/settings/apps

Click New GitHub App

Enter the following details:

GitHub App Name
ImagingDataCommons App

Description
This ImagingDataCommons GitHub App supports the automation of commits and pull requests creation in GitHub workflow.

Homepage URL
https://portal.imaging.datacommons.cancer.gov/

Webhook
Disable

Where can this GitHub App be installed?
Only on this account (default)

Repository  permmissions
Contents set to "Read And Write", Metadata set to "Read-only", Pull requests set to "Read And Write"

Organization permissions
Members set to "Read only"

Account permissions
None

This will allow to leverage the actions/create-github-app-token^1 along with peter-evans/create-pull-request. For a similar example, see the workflow^3 we created in NA-MIC/ProjectWeek (it using tibdex/github-app-token now superseded by actions/create-github-app-token but that should be enough to move forward)

Once the app is created:

generate client secret (keep track of the value in your password manager/secure notes)
create a private key (a file will be downloaded, also keep track of it in your password manager/secure notes)
install the app following these instruction. See https://docs.github.com/en/apps/using-github-apps/installing-your-own-github-app#installing-your-own-github-app
Add organization level secrets and variables (https://github.com/organizations/ImagingDataCommons/settings/secrets/actions)

IDC_APP_ID as a regular variable

IDC_APP_PRIVATE_KEY as a secret variable available only to idc-index-data

install it following these instricon


homebrew Error: stack level too deep

[x] are reporting a bug others will be able to reproduce and not asking a question.
[x] ran a brew command and reproduced the problem with multiple formulae?
[x] ran brew update and can still reproduce the problem?
[x] ran brew doctor, fixed all issues and can still reproduce the problem?
[x] ran brew config and brew doctor and included their output with your issue?

brew doctor and brew config output: https://gist.github.com/rwv/7de202f4644f56f9943b9c8942819ddb
To help us debug your issue please explain:

What you were trying to do (and why)
Nearly all homebrew commands fail expect brew update works properly.
What happened (include command output)

$ brew outdated # other commands have the same issue
Error: stack level too deep
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/tap.rb:24:in `any?'
/usr/local/Homebrew/Library/Homebrew/tap.rb:24:in `fetch'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:189:in `formula_name_path'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:209:in `formula_name_path'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:209:in `formula_name_path'
......

What you expected to happen
commands work properly

Core tap ORIGIN: https://mirrors.ustc.edu.cn/homebrew-cask.git

This needs to be homebrew-core.

Note we do not support using custom GitHub mirrors. You'll need to figure out any issues you have when using them yourself, sorry.


can't access ag output via perl

I am trying to use ag in a simple perl search function on a little community website I help with...
I can't seem to do something like...
my @files = `/usr/bin/ag -il0 --nocolor "AGM" /home/cavendish-allotments/src/cavendish-allotments/_posts/`;
and get a list of files like grep (e.g /bin/grep -iIRl "$_[0]" /home/cavendish-allotments/src/cavendish-allotments/_posts/*) might provide.
I have tried piping to sponge, echo, 2>&1 as well as things like qx//, but nothing seems to work.
I realise this might appear to be support, not a bug, but I can't seem to find a better place to ask.

It seems to work for me:
proserpina:/tmp % cat ./test.pl
#!/usr/bin/env perl
#findme
my @files = `/usr/local/bin/ag -il0 --nocolor 'findme' /tmp`;
print @files, "\n";

proserpina:/tmp % /usr/local/bin/ag -il0 --nocolor 'findme' /tmp
/tmp/test.pl

proserpina:/tmp % ./test.pl
/tmp/test.pl

Try running it with --debug and see what it says?

Thanks for the quick response @okdana... the last few log lines, of a very long list of them, are:
 DEBUG: Worker 0 finished.: /home/cavendish-allotments/cgi-bin/search.cgi
 Can't open DEBUG: Worker 0 finished.: /home/cavendish-allotments/cgi-bin/search.cgi
End of script output before headers: search.cgi```

So it does run, it just dies ?

End of script output before headers: search.cgi

Oh, i missed that you said this a CGI script. Does it work if you run it directly from the command line?

@okdana , yes, it works perfectly from the command line

$agcommand = qq ~/usr/bin/ag -il0 --debug --nocolor "AGM" /home/cavendish-allotments/src/cavendish-allotments/_posts/~;

print STDERR $agcommand;
print STDERR `$agcommand`;```

and I get all the output and it finishes

The most common reason i can think of for you to get End of script output before headers is that you're not emitting the HTTP headers that Apache expects. Try adding this before you try to print anything:
print 'Content-Type: text/plain; charset=utf-8', "\r\n\r\n";

the script works with grep, perhaps the script doesn't know the command is
still running and doesn't wait?
On 10 October 2016 at 22:49, dana<EMAIL_ADDRESS>wrote:

The most common reason i can think of for you to get End of script
output before headers is that you're not emitting the HTTP headers that
Apache expects. Try adding this before you try to print anything:
print 'Content-Type: text/plain; charset=utf-8', "\r\n\r\n";
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ggreer/the_silver_searcher/issues/986#issuecomment-252755389,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa7gR_jS0AGYG5arQsEYlVj86zRMCHcks5qyrLTgaJpZM4KS-Uz
.

--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>

Oh. Hmm, that could be too. If that's the case i'd think it'd say something about a time-out in your log though. Does the Apache error log say anything?

nothing about a time-out in the logs
I tried running it as a file, and that didn't work either
open (AG, "$agcommand |") || die "can't run ag command\n";
while (<AG>) {
    print STDERR "MATCH $_\n";
}
close(AG);

On 10 October 2016 at 23:27, dana<EMAIL_ADDRESS>wrote:

Oh. Hmm, that could be too. If that's the case i'd think it'd say
something about a time-out in your log though. Does the Apache error log
say anything?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ggreer/the_silver_searcher/issues/986#issuecomment-252762792,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa7gSSGqUN3KzJWI1Yyv45zvaiuFF3rks5qyrvLgaJpZM4KS-Uz
.

--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>

here is the whole file... if you want to look -
http://pastebin.ubuntu.com/23305433/
On 10 October 2016 at 23:36, Peter Mahnke<EMAIL_ADDRESS>wrote:

nothing about a time-out in the logs
I tried running it as a file, and that didn't work either
open (AG, "$agcommand |") || die "can't run ag command\n";
while (<AG>) {
    print STDERR "MATCH $_\n";
}
close(AG);

On 10 October 2016 at 23:27, dana<EMAIL_ADDRESS>wrote:

Oh. Hmm, that could be too. If that's the case i'd think it'd say
something about a time-out in your log though. Does the Apache error log
say anything?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ggreer/the_silver_searcher/issues/986#issuecomment-252762792,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa7gSSGqUN3KzJWI1Yyv45zvaiuFF3rks5qyrvLgaJpZM4KS-Uz
.

--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>
--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>

Oh.
proserpina:/tmp % CONTENT_LENGTH=x QUERY_STRING=x /var/cgi-bin/search.cgi
[ Reading query from standard input. Press ^D to stop! ]
Undefined subroutine &main::printOuput called at /var/cgi-bin/search.cgi line 32.

Should be printOutput with a t

yes, I think I fat fingered that paste; however, it still doesn't work for
me...
On 11 October 2016 at 00:12, dana<EMAIL_ADDRESS>wrote:

Oh.
proserpina:/tmp % CONTENT_LENGTH=x QUERY_STRING=x /var/cgi-bin/search.cgi
[ Reading query from standard input. Press ^D to stop! ]
Undefined subroutine &main::printOuput called at /var/cgi-bin/search.cgi line 32.
Should be printOutput with a t
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ggreer/the_silver_searcher/issues/986#issuecomment-252770369,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa7gbOogIu-0nKGfB2cb3Q78Um-FTIdks5qysZVgaJpZM4KS-Uz
.

--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>

Hm, i'm not sure what to say. After fixing that sub name it seems to work for me:

(The output doesn't make much sense but i assume the files on your machine have some kind of structured data that mine don't)

ok, well, thank you for taking so much time helping...
if I find it, I will pass it along.
On 11 October 2016 at 07:12, dana<EMAIL_ADDRESS>wrote:

Hm, i'm not sure what to say. After fixing that sub name it seems to work
for me:
[image: screen shot 2016-10-11 at 01 08 33]
https://cloud.githubusercontent.com/assets/122095/19260467/6c1a25ce-8f4f-11e6-970b-d96bcc5537c7.png
(The output doesn't make much sense but i assume the files on your machine
have some kind of structured data that mine don't)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ggreer/the_silver_searcher/issues/986#issuecomment-252822816,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAa7gcL8PUUvU53mryl7RPjqxLKKif-yks5qyyi3gaJpZM4KS-Uz
.

--
Peter Mahnke
Head of Web development
Canonical
0796 108 4362
<EMAIL_ADDRESS>


Fixup Python 3 compat and workaround TCP over NetBIOS being disabled

For the non-default "SERVER" mode imports are missing and some Python 3 compatibility tweaks weren't caught yet (fd.read() returns String and the commandparser seems to have changed).
Also, if TCP over NetBIOS isn't enabled, resolution of network shares in UNC paths through IP won't work:
https://superuser.com/a/1241871
This will then trigger commands for creating files not being executed properly, resulting in object not found errors.  This PR fixes https://github.com/3ndG4me/AutoBlue-MS17-010/issues/38

Awesome contribution, thank you for digging into this!


Wayland's eventloop 2.0

This is the port of the wayland backend to events loop 2.0.
Notably:

the X11-specific code in platform_impl / platform has been commented-out
it also updates the wayland dependencies:

wayland-client to 0.22
SCTK to 0.5

No sure who'd be best to review this ? It's honestly a pretty boring diff, as the port to the new eventloop setup didn't require any deep refactor of the wayland code.
Most of the diff is:

the changes in wayland/event_loop.rs, which are needed to match the new API, this includes the use of calloop to drive the events loop
a lot of search&replace to match the new types of wayand-client 0.22
the resolution of what I believe to be forgotten merge conflicts in #638

I read over the diff, and nothing in particular stood out to me as erroneous in your code (for what that's worth, as someone without much knowledge of the Linux backend).
However, there was one thing I noticed in the public cross-platform API that seems a bit misleading, but not technically unsafe - the T in EventLoopProxy<T> isn't marked as 'static. It's impossible to create an EventLoopProxy where T isn't 'static, but I must have looked over adding the trait bound when I created it so we should probably add that in.

Do you want it hadded to this PR, or can we merge it and do it in a second time?

Could you change the API here and add in the bounds on Linux? I'll push another commit that gets it working on Windows after this has been merged.

Alright, will do that

This should do it, I also added the bounds in the windows code, it seemed simple enough.

It looks like one of the tests was broken, but that should be fixed now. Once the CI finishes this should be ready to merge.

Actually, I went ahead and tested this on my Linux machine and a couple of points came up:

I pulled in some of the work from #780 to my own branch to do tests, but even with that code a window didn't appear. I needed to make some modifications to the helper script to get it working so this may be an issue on my end, but you should check the code here to make sure this isn't an issue with the backend.
There's some special-casing of the RedrawRequested event that I'm not sure is being handled - in some cases, it can be sent after EventsCleared but before NewEvents (see here). Is that behavior implemented? I didn't notice it, but I could also just be blind.

I added the proper code to handle RedrawRequested special cases.
However I'm not clear on what you did actually change to make the window appear? I does display a window with transparent contents for me.

This should be good now, are you ok with that @Osspial ?

@vberger  :+1:

Alright, so I'll merge this into the eventloop-2.0 branch, so that the x11 work can be done on top of it.


chore(ci): update artifact actions

Obviates https://github.com/wasmCloud/wasmCloud/pull/1181 and https://github.com/wasmCloud/wasmCloud/pull/1182
This also groups the upload and download actions in the dependabot config, so future automated bumps should work

@rvolosatovs pushed host and wash tags to my fork, LGTY?

https://github.com/connorsmith256/wasmCloud/actions/runs/7547250849
https://github.com/connorsmith256/wasmCloud/actions/runs/7547253562


Pick-up lines are back

A new, and much more vast pickup line library!
https://www.pickuplinesgalore.com/
Lightly Tested, has a 5% fail rate that I'm unable to fix

approved 👍


Rollback support

https://strangeloveventures.slack.com/archives/C05UHA0NGQY/p1700775826667649
would be nice if this was as simple as
spec:
  chain:
    rollback: 1804999
    versions:
      - height: 0
        image: ghcr.io/strangelove-ventures/heighliner/dydx:protocol-v1.0.1
      - height: 1805000
        image: ghcr.io/strangelove-ventures/heighliner/dydx:protocol-v2.0.0

perhaps documenting runbooks for performing rollbacks would be a sensible alternative


OpenMetadata profiler throws error when managing profiling for data of type array or json

Affected module
The impact is an error when profiling so that the profiling process always ends in the middle of the process
Describe the bug
When we pull data from google bigquery there is a problem that causes the profiler process to issue an error status, the problem is because in our data there are several tables containing ARRAY/JSON data types, so that every profile table containing that data type is ingested, it issues an error status.
To Reproduce

Expected behavior
A clear and concise description of what you expected to happen.
Version:

OS:  Windows
Python version: 3.8
OpenMetadata version: 0.11.3
OpenMetadata Ingestion package version: openmetadata-ingestion[bigquery]==0.11.3`]

check if the community will work on this https://openmetadata.slack.com/archives/C02B6955S4S/p1659434355092819
Otherwise, we'll need to start planning on picking this up to deliver the fix for 0.12

https://openmetadata.slack.com/archives/C02B6955S4S/p1659636703811829
The orm profiler is failing for one table for me:
TypeError: init() missing 1 required positional argument: 'item_type'
File "site-packages/metadata/orm_profiler/api/workflow.py", line 221, in execute
profile_and_tests: ProfilerResponse = self.processor.process(
File "site-packages/metadata/orm_profiler/processor/orm_profiler.py", line 588, in process
orm_table = ometa_to_orm(table=record, metadata=self.metadata)
File "site-packages/metadata/orm_profiler/orm/converter.py", line 120, in ometa_to_orm
cols = {
File "site-packages/metadata/orm_profiler/orm/converter.py", line 121, in
str(col.name.root): build_orm_col(idx, col, table.serviceType)
The table it is presumably failing for has the following structure:
create table person_scd2
(
string_arraya             text[],
string_arrayb             text[],
id                       text,
valid_from               date,
valid_to                 date,
int_array                bigint[],
__load_ts                timestamp,
__run_id                 text
);
Many tables are profiled correctly. This one fails.


Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:
https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/soef/ioBroker.find-my-iphone

[ ] [E019] Invalid repository URL: https://github.com/soef/iobroker.find-my-iphone. Expected: git+https://github.com/soef/ioBroker.find-my-iphone.git
[ ] [E114] No adapter are allowed in the repo without admin3 support
[ ] [E115] No license found in io-package.json
[ ] [E802] No topics found in the repository. Please go to "https://github.com/soef/ioBroker.find-my-iphone" and press "Manage topics"
[ ] [E603] NO "## Changelog" found in README.md
[ ] [E605] No actual year found in copyright. Please add "Copyright (c) 2016-2020 soef<EMAIL_ADDRESS>at the end of README.md
[ ] [E701] No actual year found in LICENSE. Please add "Copyright (c) 2015-2020 soef<EMAIL_ADDRESS>at the start of LICENSE

I have also found warnings that may be fixed if possible.

[ ] [W113] Adapter should support compact mode

Thanks,
your automatic adapter checker.
P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

This issue was moved to iobroker-community-adapters/ioBroker.find-my-iphone-community#9

Do you need help fixing the bugs?

Thanks, that all bugs have been fixed.


First-party plugins should use e2e plugin for integration testing

Right now some first-party plugins are using the Flutter driver extension, e.g. Google Maps:
https://github.com/flutter/plugins/blob/abb77340fcff49cffd1e48985e87fd7b4eaf5b84/packages/google_maps_flutter/example/test_driver/google_maps_test.dart
We should upgrade all of them to use e2e plugin for Dart integration tests.

Push the milestone back as it is not as high priority.

@collinjackson are there any plugins with e2e tests that are more extensive? The google maps test you linked doesn't give much of an example to work off of. I'm interested in learning more about e2e testing using the flutter driver so I can use it in my project. Once I'm more comfortable with it, I could be interested in making some e2e tests for the first party plugins.

I think this is done. Closing the issue.


[BUG] Account creation docs are not accurate

What happened
Example imports:
from starknet_py.net.signer.stark_curve_signer import KeyPair

The correct import should be:
from starknet_py.net.signer.key_pair import KeyPair

Stack trace
docs issue
Steps to reproduce

SDK Version
0.24.3
Python version
3.9
What operating system are you using?
Linux
Is there an existing issue for this?

[ ] I have searched the existing issues and verified no issue exits for this problem.

Thanks for reporting @amanusk 👍


python web_demo.py ImportError: This modeling file requires the following packages that were not found in your environment: configuration_chatglm. Run pip install configuration_chatglm

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "web_demo.py", line 5, in
model = AutoModel.from_pretrained("/mnt1/wcp/chatglm-6b/model/CHATGLM6.2B", trust_remote_code=True).half().cuda()
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 455, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 363, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 237, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 134, in check_imports
raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: configuration_chatglm. Run pip install configuration_chatglm
Expected Behavior
本地下载的模型里面含有 configuration_chatglm.py文件 为什么找不到此文件
Steps To Reproduce
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Traceback (most recent call last):
File "web_demo.py", line 5, in
model = AutoModel.from_pretrained("/mnt1/wcp/chatglm-6b/model/CHATGLM6.2B", trust_remote_code=True).half().cuda()
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 455, in from_pretrained
model_class = get_class_from_dynamic_module(
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 363, in get_class_from_dynamic_module
final_module = get_cached_module_file(
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 237, in get_cached_module_file
modules_needed = check_imports(resolved_module_file)
File "/home/appuser/miniconda3/envs/wcp/lib/python3.8/site-packages/transformers/dynamic_module_utils.py", line 134, in check_imports
raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: configuration_chatglm. Run pip install configuration_chatglm
Environment
- OS:Ubuntu 20.04

- Python:3.8
- Transformers:4.26.1
- PyTorch:2.0.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :

Anything else?
No response

I thin 2 points:

the from_pretrained(model_path...) function need the model_path in sys.path, transformers lib load configuration_chatglm from sys.path's configuration_chatglm.py.  So, try this:

modelpath = os.path.dirname(os.path.abspath(__file__))+"/chatglm-6b"
sys.path.append(modelpath)

tokenizer = AutoTokenizer.from_pretrained(modelpath, trust_remote_code=True)
model = AutoModel.from_pretrained(modelpath, trust_remote_code=True).half().cuda()

the model path can not has '.' symble, because transformers import will think about '.' is a python model seperater. So, if you rename the modelpath is hf.chatglm-6b in up code, it will error too.

Have you solved this problem yet？

同问


[Bug] Please use github actions to update client in Linux branch to 2023.12.24

it is well known that there are issues running VRCX under wine the last update was done in actions 2 months ago if someone could update VRCX to 2023.12.24 on the Linux branch that would be great
Sincerely Ozzy

Give this build a try and let me know how it goes. https://github.com/vrcx-team/VRCX/actions/runs/7381921537

this is the error I get when trying to run it

That is due to a missing API in Wine, the first version to have any kind of support is 9.0-rc1

I'm running Wine 7 due to some glitching with the UI I can try upgrading

ok after installing wine 9.0 rc3 it works

wine 9 is a requirement for VRCX I guess but at least it works on Linux closing as complete

@Natsumi-sama could you update this using github actions to the new latest version?

I reopened the issue because of the update

Apparently latest stable release will work under Linux but requires Wine 9.3 and corefonts

https://github.com/vrcx-team/VRCX/tree/master/Linux


Page number form in filterable list pagination molecule drops parameters

Current behavior

The page number field in the pagination molecule has a Go button next to it to go to the page specified in the input. The issue is here, where the parameters from the filter are made into hidden input fields. If you select multiple options of the same vein, say "Category", then only the last parameter in the URL will be used.
Much less worrisome but still a bug, the last page visited number is maintained in the URL if using that "Go" form.

Expected behavior

All parameters should be maintained when going to different pages using the "Go" form.
The page parameter in the URL should be singular and be the current page visited.

Steps to replicate behavior

Select two or more "Categories" on Blog and filter the results.
Scroll to the bottom where the pagination molecule is and increment the number and hit "Go"
Note that the URL only contains the last category selected, it's not selected in the filter anymore, and there are 2 page parameters in the URL

@anselmbradford was the one that first reported the duplicated page parameter.

Reproduced in https://[GHE]/CFGOV/platform/issues/2681


Release v1.0.0 (Take 2!)

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Updates to Analysis dashboards

Make the dashboards adaptive to the Google Pipelines API v2:

In Google Pipelines API v2, they have changed the prefixes for worker VMs from ggp- to google-pipelines-worker-

I have tested this PR by uploading it to Grafana, will merge it.


Allow configuration of SQL Server by providing the name of a connecti…

Allow configuration of SQL Server by providing the name of a connection in the connectionStrings section of web.config. This is similiar to how EntityFramework operates. Plus this can eliminate duplicate connection strings in the web.config file. Finally, this feature allows the use of Azure web applications which pull database connections from a secure storage instead of the web.config directly.
Current methodology, still supported
<add key="serilog:write-to:MSSqlServer.connectionString" value="Data Source=(LocalDb)\v11.0;Initial Catalog=SerilogCatalog;Integrated Security=True" />
New naming convention
<add key="serilog:write-to:MSSqlServer.connectionString" value="name=SerilogDB" />
Assumes the following exists
<connectionStrings>     <add name="SerilogDB" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=SerilogCatalog;Integrated Security=True" providerName="System.Data.SqlClient" />   </connectionStrings>
Alternative syntax for above connectionString
<add key="serilog:write-to:MSSqlServer.connectionString" value="SerilogDB" />

Thanks for the PR Ian, looks good.
I wonder if just the "alternative syntax" might be enough to satisfy the use case? It'd bring the LOC down quite a lot (at the expense of some coolness :-)) so may be a good place to start.
What do you think?

@nblumhardt I agree, I'm not a fan of the option to prefix with name=. The idea was not to confuse those who are used to EF with this prefix. But it's very rare to see this done in EF. I'll make the changes and resubmit it.

Thanks @iangriffin - I think the name= approach might be worth reconsidering down the track. The simplified code's definitely leaner though, great stuff :-)

clicks wrong button...


Not really an issue...

Hey I just wanted to thank you here because I want to control my leds from my pc and after all troubles decided to search up the name of the leds and this came up, although i havent tried it yet and im getting docker ready, wish me luck.

Thanks @Ondry4K - if you're new to home assistant, then you have quite a journey ahead of you.
If you're familiar with Python then you could use the bytearray byte sequences to control them without all of Home Assistant.

hey man, do you have discord? if yes add me = ondry4k im having some problems and need dicussion

hey man, my discord is @ondry4k add me pls i need help (kinda)

ondry4k (case sensitive)

I'm afraid I don't offer support, only bug reports.


wip: use crdt as an optional database

Description
Use crdt as an optional database
Motivation and Context
Closes #4
How to test this PR?
make sure DSType is set to  DSTypeCrdt in TEMX, such as in s3x_test.go, then run test.
func getTestGateway(t *testing.T) *testGateway {
	...
	temx := &TEMX{
		...
		DSType:   DSTypeCrdt,

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)

Checklist:

[ ] Fixes a regression (If yes, please add commit-id or PR # here)
[ ] Documentation needed
[ ] Unit tests needed
[ ] Functional tests needed (If yes, add mint PR # here: )

So one thing this got me thinking about, is in a future PR we should have some sort of background job that takes newly added CIDs and adds it for for replication. CRDT database + auto replication would make it stupidly easily to have highly available s3x instances

@bonedaddy is it just me, or CI isn't running?

start of s3x test logs:
linux: https://travis-ci.com/github/RTradeLtd/s3x/jobs/314489550#L2356
windows: https://travis-ci.com/github/RTradeLtd/s3x/jobs/314489551#L1086

@xiegeo i found this log on the temporalx server:
{"level":"info","ts":1586126895.1857233,"logger":"grpc.middleware.unary","caller":"zap/server_interceptors.go:39","msg":"finished unary call with code OK","grpc.start_time":"2020-04-05T22:43:15Z","grpc.request.deadline":"2020-04-05T22:48:15Z","system":"grpc","span.kind":"server","grpc.service":"pb.NodeAPI","grpc.method":"Persist","peer.address":"<IP_ADDRESS>:40442","grpc.code":"OK","grpc.time_ms":299864.0625}
{"level":"error","ts":1586126895.1931295,"logger":"grpc.middleware.stream","caller":"zap/server_interceptors.go:66","msg":"finished streaming call with code Internal","grpc.start_time":"2020-04-05T22:38:15Z","system":"grpc","span.kind":"server","grpc.service":"pb.PubSubAPI","grpc.method":"PubSub","peer.address":"<IP_ADDRESS>:40442","error":"rpc error: code = Internal desc = rpc error: code = Canceled desc = context canceled","grpc.code":"Internal","grpc.time_ms":600001.375,"stacktrace":"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/server_interceptors.go:66\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:49\ngithub.com/grpc-ecosystem/go-grpc-middleware/tags.StreamServerInterceptor.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go:36\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:49\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:58\ngoogle.golang.org/grpc.(*Server).processStreamingRPC\n\t/BUILD/vendor/google.golang.org/grpc/server.go:1336\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/BUILD/vendor/google.golang.org/grpc/server.go:1409\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1\n\t/BUILD/vendor/google.golang.org/grpc/server.go:746"}
{"level":"info","ts":1586126895.4044416,"logger":"grpc.middleware.unary","caller":"zap/server_interceptors.go:39","msg":"finished unary call with code OK","grpc.start_time":"2020-04-05T22:48:15Z","system":"grpc","span.kind":"server","grpc.service":"pb.NodeAPI","grpc.method":"Dag","peer.address":"<IP_ADDRESS>:40502","grpc.code":"OK","grpc.time_ms":0.1940000057220459}
{"level":"info","ts":1586126895.4853797,"logger":"grpc.middleware.unary","caller":"zap/server_interceptors.go:39","msg":"finished unary call with code OK","grpc.start_time":"2020-04-05T22:48:15Z","system":"grpc","span.kind":"server","grpc.service":"pb.NodeAPI","grpc.method":"Dag","peer.address":"<IP_ADDRESS>:40502","grpc.code":"OK","grpc.time_ms":0.1469999998807907}
{"level":"error","ts":1586126895.5671544,"logger":"grpc.middleware.stream","caller":"zap/server_interceptors.go:66","msg":"finished streaming call with code Internal","grpc.start_time":"2020-04-05T22:48:15Z","system":"grpc","span.kind":"server","grpc.service":"pb.PubSubAPI","grpc.method":"PubSub","peer.address":"<IP_ADDRESS>:40502","error":"rpc error: code = Internal desc = rpc error: code = Canceled desc = context canceled","grpc.code":"Internal","grpc.time_ms":167.91099548339844,"stacktrace":"github.com/grpc-ecosystem/go-grpc-middleware/logging/zap.StreamServerInterceptor.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/zap/server_interceptors.go:66\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:49\ngithub.com/grpc-ecosystem/go-grpc-middleware/tags.StreamServerInterceptor.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/tags/interceptors.go:36\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1.1.1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:49\ngithub.com/grpc-ecosystem/go-grpc-middleware.ChainStreamServer.func1\n\t/BUILD/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:58\ngoogle.golang.org/grpc.(*Server).processStreamingRPC\n\t/BUILD/vendor/google.golang.org/grpc/server.go:1336\ngoogle.golang.org/grpc.(*Server).handleStream\n\t/BUILD/vendor/google.golang.org/grpc/server.go:1409\ngoogle.golang.org/grpc.(*Server).serveStreams.func1.1\n\t/BUILD/vendor/google.golang.org/grpc/server.go:746"}

@bonedaddy Can you take a look at this
https://travis-ci.com/github/RTradeLtd/s3x/jobs/318417971#L2610
=== RUN   TestS3XG_Object_Crdt/DeleteObjects/Fail-No-Bucket

--- FAIL: TestS3XG_Object_Crdt (1.85s)

    --- PASS: TestS3XG_Object_Crdt/PutObject (0.40s)

        --- PASS: TestS3XG_Object_Crdt/PutObject/OK-Bucket-Exists (0.40s)

        --- PASS: TestS3XG_Object_Crdt/PutObject/Fail-No-Bucket (0.00s)

    --- PASS: TestS3XG_Object_Crdt/GetObject (0.24s)

    --- FAIL: TestS3XG_Object_Crdt/GetObject_from_datastore (0.00s)

        s3x_test.go:30: Cannot acquire directory lock on "/tmp/s3x-test-crdt841569023".  Another process is using this Badger database.: resource temporarily unavailable

    --- PASS: TestS3XG_Object_Crdt/ListObjects (0.16s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/Fail-BucketNotExist (0.00s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/V2/Fail-BucketNotExist (0.00s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/V2/startsAfter/Fail-BucketNotExist (0.00s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/Success (0.08s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/V2/Success (0.08s)

        --- PASS: TestS3XG_Object_Crdt/ListObjects/V2/startsAfter/Success (0.00s)

    --- PASS: TestS3XG_Object_Crdt/GetObjectInfo (0.08s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectInfo/Ok (0.08s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectInfo/Fail-Bad-Object (0.00s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectInfo/Fail-Bad-Bucket (0.00s)

    --- SKIP: TestS3XG_Object_Crdt/ListObjectsV2 (0.00s)

        gateway-s3x-object_test.go:194:

    --- PASS: TestS3XG_Object_Crdt/GetObjectNInfo (0.08s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectNInfo/Ok (0.08s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectNInfo/Fail-Bad-Object (0.00s)

        --- PASS: TestS3XG_Object_Crdt/GetObjectNInfo/Fail-Bad-Bucket (0.00s)

    --- FAIL: TestS3XG_Object_Crdt/CopyObject (0.08s)

        gateway-s3x-object_test.go:241: error writing new block QmZgBJuAssHREdxGC54v7FVdjFtLfjVB4KjxRqD5TbYX1S: error decoding returned cid: dag client error in ipfsSaveProtoNode: rpc error: code = Canceled desc = context canceled

    --- FAIL: TestS3XG_Object_Crdt/DeleteObject (0.08s)

        gateway-s3x-object_test.go:257: error writing new block QmTiLCxGbQPdKYiqdHKJkczo2PfrACMQXNAFFFnGF4TKom: error decoding returned cid: dag client error in ipfsSaveProtoNode: rpc error: code = Canceled desc = context canceled

    --- FAIL: TestS3XG_Object_Crdt/DeleteObjects (0.32s)

        --- FAIL: TestS3XG_Object_Crdt/DeleteObjects/OK-Bucket-Exists (0.24s)

            gateway-s3x-object_test.go:39: PutObject() err error writing new block QmfFk8dEYiQTh53vDtWsyPDxTofoz66PC5DNQgio3eLneg: error decoding returned cid: dag client error in ipfsSaveProtoNode: rpc error: code = Canceled desc = context canceled, wantErr false

        --- PASS: TestS3XG_Object_Crdt/DeleteObjects/Fail-No-Bucket (0.00s)

        gateway-s3x-object_test.go:275: error writing new block QmTiLCxGbQPdKYiqdHKJkczo2PfrACMQXNAFFFnGF4TKom: error decoding returned cid: dag client error in ipfsSaveProtoNode: rpc error: code = Canceled desc = context canceled

Some how the context is getting canceled early.

Some how the context is getting canceled early.

yep ill look into it

One error I'm noticing is this:
=== RUN   TestS3X_Multipart_Crdt/add_parts
    TestS3X_Multipart_Crdt: s3x_test.go:30: Cannot acquire directory lock on "/tmp/s3x-test-crdt542963038".  Another process is using this Badger database.: resource temporarily unavailable
--- FAIL: TestS3X_Multipart_Crdt (1.49s)

This seems like something that might be causing the early context cancellation.  But I'll keep looking

@xiegeo Found it!!!
While digging through the tests, I noticed that gateway.restart() is called. Commenting out gateway.restart() lead to all tests passing. It seems like the way we handle a gateway restart test is strange, and while restarting, it cancels the context.
I think its a good idea that we have a test to ensure that after restarting the gateway data still exists, however I think the restart procedure either needs to be refactored, or after a restart we do a full re-instantiation of the gateway.
It sort of makes sense why this error happens I guess, because the restart process would also cancel the crdt syncer, broadcaster, and existing pubsub subscriptions.
 Some fire as fuck code you've written :rocket:

@bonedaddy I think this is a good cut off point to merge this pull request

agreed, I think the change i made removing references to upstream caused an error so i will revert that change and we can do it via a PR as it should be done


Return the query id assigned to a statement when running a query

The query id gets returned inside of the Influxdb-Query-Id header as a
normal integer that can then be read by a client if it wants a way to
kill the query remotely or report the query it just created.

Not sure how overall useful this is, but it might be useful since there is otherwise no way to know what the query id of a created query is. To interrupt a currently running query, it's still possible to just close the HTTP connection abruptly.

This could be useful for long-running queries. We also currently set a request ID for each request. It might be worthwhile to combine the request ID with the query ID since I don't think we really use the request ID anywhere.

Hm, I wonder if we should try to find a way to use the request ID for the timestamp. We're going to have a problem in the future regarding the query ID for clustering since they will have to be somehow clustered and we likely don't want to send that information through Raft if we can avoid it.

Closing this for now since it's not nearly as useful as I thought it was.  Since the client is the only one who would be able to use this information, it's kind of useless information. If someone can think of a workflow where this would be useful, I'll rebase and we'll try to get this merged.


Make sure we can update fragments/fragment arrays after they are initially set to null

This is a failing test which mimics the bug in https://github.com/lytics/ember-data-model-fragments/issues/375. This worked before the 5.0.0 beta.
I originally commented most of this in https://github.com/adopted-ember-addons/ember-data-model-fragments/issues/375#issuecomment-940076666. Essentially if you have a model/fragment which has a fragment array/fragment property set to null it will never update when a http response has those properties updated. I have confirmed running these failing tests on a v4 branch pass just fine.
I've tracked the bug down to the following lines of code in the FragmentRecordData#didCommit hook:
https://github.com/adopted-ember-addons/ember-data-model-fragments/blob/4f77b2d5ea08685230ec60b5a3ddd2b3d3a7ec6c/addon/record-data.js#L426-L433
Basically because the existing property is set to null the fragment = this.serverFragments[key]; evaluates to null. This means the if (fragment) check fails and we don't commit the new data to the fragment with fragment._didCommit(attributes[key]);.
So I've spiked out a potential solution but I'm unsure if this should be the direction I should be taking. I don't have as much context how Model Fragments/RecordData works so any pointers would be appreciated. Essentially we need to recreate the fragment or fragmentArray if it is null on the record and then re-set it on the record. The API of createFragment, for example, is createFragment(store, declaredModelName, record, key, options, data) but I can't find any possible way to get access to the record at this point in the stacktrace so I need to do some hacky stuff to get access to the host record, i.e. setting the this._record class property which, to be honest, seems a bit janky.

It's also worth pointing out that I've ran this particular change against the Intercom test suite which has thousands of model fragment related tests and it works.
I've peppered comments throughout the source but this is more for comprehension for the reader. If I get an approval I'll remove any comments I don't think are necessary.

@knownasilya @ro0gr any thoughts on this? It's another null related bug where if a fragment/fragment array is null and a non-null server response comes in, it never gets updated.

Released in https://github.com/adopted-ember-addons/ember-data-model-fragments/releases/tag/v5.0.0-beta.3


Spam everyday, another way to filter than Akismet?

Hi, I want to know what method is recommended to avoid spammers... My site is in Spanish, and everyday I receive a comment for polish people, and no related to my post... I have the honey pot (hope correctly), and Akismet it's no avalaible to my blog... Is another system to filter spam?

You can use Recaptcha:
*https://recaptcha-demo.staticman.net/
*https://github.com/eduardoboucas/staticman-recaptcha
I have not been able to use it, but it seems really good.

Thanks, I used it, but sometimes was a problem of loading... I simply eliminate the url field... No problem for a week, I hope this continue


cornerstoneTools.mouseInput.enable() should check to make sure it isn't already enabled

See this thread:
https://groups.google.com/forum/#!topic/cornerstone-platform/lcvUVzikNsE
We should handle this better - perhaps by preventing the handlers from being added if they are already on there, or at least a console warning.  Should also consider this for other enable()/disable() pairs too

Perhaps it's easiest to just do what we do for all the other enable / disable pairs? (Disable everything first, then enable the handlers again.)

Closing this, turns out I added a
disable(element)

call to mouseinput.enable already.
See:
https://github.com/chafey/cornerstoneTools/blob/master/src/inputSources/mouseInput.js#L204


Explore solutions for streaming with can-zone, can-compute, and can-view-live

Proposed solution

computes and maps have a well defined way of traversing their stateful object/event dependency graph.

this already "sort of" exists as newObserved on an Observation. However, maps don't flow through correctly. Given some object/event, we need to be able to see what it depends on.

Some zone / observation module is able to keep a registry of object/event pairs whose state is remaining to be changed.  At its lowest level, it should return a function that unregisters that object/event.  For example: Zone.waitFor( c, "change" ) -> unregister().  Apis specific to the type that also set the value can be created for each type.

can-view-live is able to walk through a computes dependency graph, looking for registered object/event pairs, waiting until all object/event pairs for its compute have been removed.

The final result might look like:
var map = new DefineMap({prop: "A"});

// Registers this dep as something to wait for.
// This has to happen before `can-view-live` gets it.
// This might be tricky to produce.
// One issue will be connected view-bindings.
var doneSettingMapProp = Zone.waitFor(map, "prop");

// in can-view-live
live.text = function(textNode, compute) {
    var deps = compute.getDependencies()
    var allWaiting = Zone.getWaitObjectEvents()
    // COMPARE returns a promise that resolves when the deps within
    // all waiting have been resolved back
    var depsInAllWaitingHaveResolved = COMPARE( deps, allWaiting);
    textNode[asyncSymbol] = depsInAllWaitingHaveResolved;
}

setTimeout(function(){
    map.prop = "B"
    // this will reduce the count for setting this property by one
    // if it gets to 0, it will be able to fire off a depsInAllWaitingHaveResolved
    doneSettingMapProp();
},1)

Specific set state helpers
c = compute(0);

// registers a c/"change"
// returns a function that calls c(newVal) and unregisters
setC = Zone.waitForCompute(c);

setTimeout(function(){
  setC(1);
})

Problem A: async getters
Say there's a template like:
{{todos.completed.length}}

{{todos.length}}

With a viewModel like:
{
    todosPromise: {
        value: Todo.getList.bind(Todo,{})
    },
    todos: {
        get: function(lastSet, resolve){
            this.todosPromise.then(resolve);
        }
    }
}

And Todo.List has:
Todo.List = DefineList.extend({
    "#": Todo,
    get completed(){
        var arr = [];
        for(var i = 0; i < this.length; i++) {

        }
        return arr;
    }
});

The problem is that if can-view-live.text passed the compute for {{todos.completed.length}} will see there is async behavior.  However, {{todos.length}} will not.  This is because async computes will only call a bound async getter once.  The {{todos.length}} will simply read vm.todos.
Solutions
Computes are run within a zone and are able to communicate to their parent compute's zone.
This will be similar to Observation.add, except with Zone information.  Say there is an async compute like:
var todos = compute.async(function(lastSet, resolve){
    Todo.getList({}).then(resolve);
});

This is going to be read by two other comptues:
var todosLength = compute(function(){
  return todos().length
})

var completedLength = compute(function(){
  return todos().completed.length
});

When todosLength() or completedLength() are read ... they will Zone.waitFor() their dependencies to finish.
Considerations:

It's possible to walk through a compute's dependencies.  This might be faster.  However, the compute might bind on async-observable properties.  This must be walked-through.
This might be slow to make each compute zone-aware.
What if the dependencies change and there's nothing to .waitFor?

Problem B: computes are bound before being passed to can-view-live.
Computes are bound here: https://github.com/canjs/can-stache/blob/master/src/mustache_core.js#L339
This is when the computeFunction is first read.
Solutions
Always zone
Con:

slow

Solution 2 - only  'zone' can-view-live computes

what if someone binds a compute somewhere else?  Would we pick up on it?

Random thoughts to be integrated into above:
At it's core ... the problem is the "async" is memoized away.
This doesn't exist for SSR today because we wait on all async behavior and just take the template.
This is really ... what async thing might happen that this depends on ...
The computes above ... depend on another compute that does change as a result of async stuff.
What about other types?

I guess EVERYTHING currently has to be a compute or a list for live binding to work.
what if we supported streams or other types?  Would they have to be wrapped in a compute?  How could they declare their "async" dependencies so they "rise to the top"?

I think follow what you are going for here. You want to create wait promises for events, right? Let's not use waitFor, even for examples, since that already exists for something else. I think what we want is something like:
var registration = Zone.notifyWhen(thing, "event");
registration; // -> { promise, unregister }

Then something else will attach this registration object to the compute/observation. Then in can-view-live we can do something like:
live.text = function(textNode, compute) {
  // is deps an array of these registration objects?
  var deps = compute.getDependencies();
  var allResolved = Promise.all(deps.map(dep => dep.promise));

  textNode[asyncSymbol] = Zone.waitFor(allResolved);
};

Something like that?

I suppose we could overload waitFor to have multiple signatures:
// Waits for a function to be called
var fn = Zone.waitFor(fn);

// Waits for a Promise to resolve
var promise = Zone.waitFor(promise);

// Waits for an event
var registration = Zone.waitFor(object, "event");

It feels a little odd to me that the same API would return different things based on overloading though.

stickying with notifyWhen just for the example:
var registration = Zone.notifyWhen(thing, "event");

Should this actually wait on the "event"? Or do we just want to set it up so that others can wait on the event?

I think this can be its own package that works with can-zone.  I'm not sure what it should be called.  It does not wait on the event, instead it waits on the unregister which will typically be associated with a set of the state.


Hooks

Resolving #1

Coverage remained the same at 100.0% when pulling 8f73b13023ad6a28428f7b32d9ceb27bbd348768 on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling e4d3dc3934e6edf43ed1278c9963b70808cda7db on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.

Coverage remained the same at 100.0% when pulling 70fcf0da4af16b32c33e22d8b10394b9eed1549e on feature/hooks into 5c015a0ed47e8399aa5f052c1c052564f730c995 on master.


Update deviance calculation as well as optimizer code

This pull request contains updates to the deviance calculation used to generalize variance explained to the GLM setting. It also has other updates such as:

Modifying the default optimizer to be L-BFGS with tweaks to algorithm inputs that better align with GP optimization (this includes adding a learning decay for the Adam optimizer and expanding the number of latent dimensions for the L-BFGS option)
Adding in code to modularize the parallel processing (this still needs work for the run_penalized_search() method!!!)
Expanding on the marine microbiome data analysis (this needs to be looked at because there is a lot of missing data in the output [counts] that is making this challenging!)

Checks were done on the waveome_overview.ipynb notebook to make sure the updates don't crash the functionality of the package.

Looks good.


iPadOS: Workbench loses focus when switching tabs

I would be happy to help with this if given some guidance on where to start.

VSCode Version: 1.53.0-insider
OS Version: iPad 14.1 (18A8395)
Commit: 01089c0a5052432594a177f90ad9f3148ec2a6a2
Date: 2021-01-07T05:25:51.740Z
Browser: Mozilla/5.0 (iPad; CPU OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1

Steps to Reproduce:

On iPad, open Codespaces in Chrome
Open a file in the Workbench and type in file
Switch to a new tab
Switch back to Codespaces

Expected
Cursor should be in same place in file and Workbench should be focused
Actual
Workbench is not focused
See video:
https://user-images.githubusercontent.com/3806031/103953627-b7796180-50ff-11eb-8aca-a612c0aa4ca3.MP4

Does this issue occur when all extensions are disabled?: Yes

@vscodebot not a duplicate!

@vscodebot not a duplicate!

Sorry for the slow response, this somehow slipped through my fingers.
Potential solution would be to introduce a super simple workbench contribution to use the IHostService.onDidChangeFocus and than react and focus the editor.
It would also be interesting to see if this event is fired at all in this case.

Actually I can not reproduce this with latest insiders and latest iPad OS. Thus closing.
Please let me know if you still see this and we can reopen


do not merge, ci testing

(4.9 ci testing only)

retest-4.9

Coverage increased (+0.009%) to 37.011% when pulling 2d70a9d75a685ce6aa0f9a0cb0259c107bac43e0 on pr/bpf-follow-ups-test into 651a3a8a39c580cd7a54b5c4c2370ef36631af8f on master.

(K8s-1.18-kernel-4.9 — Build finished. - green)

retest-4.9

(K8s-1.18-kernel-4.9 — Build finished. - green)

retest-4.9

(now Kubernetes DNS did not become ready in time)

retest-4.9

retest-4.9

retest-4.9

retest-4.9

retest-4.9


DSD-653: Blogs color variant for Breadcrumbs

Fixes JIRA ticket DSD-653
This PR does the following:

Add Blogs color variant to Breadcrumbs component.

How has this been tested?

local build of DS

Accessibility concerns or updates

color choices are compliant with WCAG AA Standard

Checklist:

[x] I have updated the Storybook documentation accordingly.
[x] I have added relevant accessibility documentation for this pull request.
[x] All new and existing tests passed.

Front End Review:

[ ] View the example in Storybook

Tugboat has finished building the preview for this pull request!
Link:

https://pr806-3ufddfnq4asp4ubgcnaw3et0xqjdler0.tugboat.qa

Dashboard:

https://dashboard.tugboat.qa/61b7637ddc579fc65dde4f3b

Tugboat has finished building the preview for this pull request!
Link:

https://pr806-3ufddfnq4asp4ubgcnaw3et0xqjdler0.tugboat.qa

Dashboard:

https://dashboard.tugboat.qa/61b7637ddc579fc65dde4f3b


Editing comments on issues should be possible

What is happening? How to reproduce?

Open an issue you commented on
Try to edit your comment
Editing a comment is not possible since there is no control to do so

What would I expect to happen?
3. A control to edit own comments should be shown.
4. Editing the issue should be possible
Additional info:
The issue was created by myself. I could edit the issue.

Editing of comments is possible, this was never closed.


is_a() is deprecated, use instanceof instead !

There are 5 matches in Consumer.php and 9 matches in Server.php. 1 match in AX.php.
They should all be replaced by instanceof operator as of PHP 5.
This currently results in strict errors.

This repo is being archived. Closing issue.


[release-1.8] Upgrade to latest dependencies

bumping 1.8 -dprotaso
/cc knative-sandbox/client-writers
/assign knative-sandbox/client-writers
Produced by: knative-sandbox/knobots/actions/update-deps

/retest

This release version is out of support now.
/close


feat: expose label to create scores API

Changes:

expose label to create_scores API

To test:

create an experiment from Python:

experiment = dataset.create_experiment(
    name="Next 1",
    params=[{ "type": "Mon expérience", "top_k": 2 }]
)

for index in range(2):
    scores = [{
        "name": "Sentiment",
        "type": "AI",
        "label": f"happy-{index}", # HERE IS THE LINE TO ADD COMPARED TO CLASSIC EXPERIMENT
        "value": 55
    }]

    experiment_item = {
        "datasetItemId": # Put the ID of a dataset item
        "scores": scores,
        "input": { "question": "kesako?" },
        "output": { "contexts": ["rien"] }
    }

    experiment.log(experiment_item)

If you have a platform version greater or equal to 0.0.627-beta, you should see the label instead of the score value in the experiment details:

FYI label is not defined in ScoreDict but it should. Also it does not seem to be part of any signatures so it's hard to tell if this is intended.

Added. label is not very discoverable indeed. DatasetExperiment.log will now have it, but it's hidden behind DatasetExperimentItemDict.scores. We need to find a way that logs an experiment item in an easier way: having to pass scores in the experiment item dict is cumbersome.


[Feature request] css-x-fire

Hello.
There is an awesome plugin here https://plugins.jetbrains.com/plugin/5348?pr=
Unfortunately author currently doesn't support  this plugin.
The description of plugin says: Connects Firebug CSS editor with any IDE with CSS capabilities (IntelliJ IDEA Ultimate, PhpStorm, WebStorm, PyCharm, RubyMine).
It really cool stuff, because it make possible to save changes, that were made in css firebug editor, directly in css file, right on fly. So maybe you would like to take maintenance over it. Or even make it like built-in component of firebug, so developers can easily edit their css files, using just firebug css editor.
thanks

We are looking into this, it's definitely great feature, but hard to implement (and even harder when SAAS and LESS are in place). If implemented, we'd rather think about an extra extension though.
Honza


many duplicate pairs were not actually similar using minhash_spark.py

minhash_spark.py
When I used this code to process English CC data, I found that many duplicate pairs were not actually similar, but similar pairs could indeed be captured. Why is this? I have tried many sets of parameters (ngram_size, B, R) and the same is true. Is there any optimal parameter recommendation?
In addition, when I processed Chinese CC data, I did not encounter such a situation.

Thanks for the question!
Typically, if you are concerned with false positives, you can add a false positive check in the clustering stage. This should check the Jaccard similarity within each cluster between all pairs.
This is not added here because it will slow down the processing and show no benefits in BigCode experiments when the dataset is large.


Switch code block focus from box-shadow to border

Fixes https://github.com/alphagov/govuk-design-system/issues/1356
Before

After

@hannalaakso @36degrees I've done this as a WIP fix, but wasn't sure if there was a reason we tend to use box-shadow for our focus states? Happy to change the approach if needed.

You can preview this change here:
Built with commit b7e3421bbdc4993b95a1afbeaf53594ace341e78
https://deploy-preview-1357--govuk-design-system-preview.netlify.app

We tend to use box shadows to avoid the jump in size that you get unless you add the transparent border to the unfocused control (border: $govuk-focus-width solid transparent;).
The (minor?) issue with adding a transparent border is that in high contrast mode (or if a user has overridden the colours in their browser) the transparent border will become solid, which means code blocks end up with really thick borders even when unfocused.
In this case, because the yellow border is done with an outline, the focus state is still visible in high contrast mode. If the yellow border was done with a box shadow (which we do in some other components) then the focus state would not be visible, because box shadows are removed and the border is always solid so doesn't change when focused.
So, overall, I think this is probably fine for now, but maybe something to revisit when we look at https://github.com/alphagov/govuk-frontend/issues/1911?


Can't authenticate @live.com user

Hi,
I followed the steps, registered a new app and changed the client id in the code. When I login with my work account it works fine and I'm authenticated. But when I try to login with my personal Microsoft account there's an error after I write my email and click Next:
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
Why is that?

You need to register the all with your Live provider.

Please download the latest sample code and try again with the @live account.


upgrade to CSI spec v1.4.x

:tada: This issue has been resolved in version 3.1.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Incorrect warning or dependency loading...

When this plugin cannot find Vulcanize it throws the message
[Error: Install Polymer/vulcanize via `jspm install npm:vulcanize` for HTML build support.
Set System.buildHTML = false to skip HTML builds.]

This was despite the fact that I had installed Vulcanize using JSPM.
On a little digging I found that the plugin code in html-builder.js uses var Vulcan = System._nodeRequire('vulcanize');. This would mean that dependency must be pulled in from npm as of now.
So either this should change to import 'vulcanize' or require('vulcanize'), so that dep is changed to JSPM one or the warning message should change!

I was having some difficult with the vulcanizing during build.  I think I have it working now and the correct message show (should be npm install vulcanize).  Thank you for reporting.


Added docstring for the endpoints scripts

Good job, however I'd not include parameters in the docstrings. Type hints render those useless. You already see what are the parameters and their type from the signature of the class/method.
So it doesn't really bring any value, but on the other hand you will see yourself catching up with docstrings whenever you change the signature.

Thank you, actually it's for generating a document in pydoc format, and that way it kinda explains what each parameter stands for, that's why i did it like that, i thought it'd be helpful.

Actually, I have submitted another pull request for an updated version of the documentation of thehive4py, based on the current one. The updated documentation includes proper usage examples of the API. Initially, I felt the need for a docstring, which is why I wrote it and thought it would be beneficial for clarity. Hence, I submitted the pull request. However, if you believe it is unnecessary, I can always close this pull request.

Don't get me wrong.Docstrings are good. Relisting parameters are not. If we really want to generate API docs using some tool, I'd expect the tool to work out signature definitions using the type hint annotations, as those are the source of truth nowadays, not some free text description.So to clarify, I think it makes sense to describe what a method does, also please consult PEP257 to create standard docstrings.Then good to go.On 19 Jun 2023 12:08, Black-Pearl25 @.***> wrote:
Actually, I have submitted another pull request for an updated version of the documentation of thehive4py, based on the current one. The updated documentation includes proper usage examples of the API. Initially, I felt the need for a docstring, which is why I wrote it and thought it would be beneficial for clarity. Hence, I submitted the pull request. However, if you believe it is unnecessary, I can always close this pull request.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

@Kamforka is this going to be considered or should be closed as status:invalid ?

We could do this as part of  #301

Will be done in #301


Mono/C#: WebAssembly and initial AOT support

WebAssembly for C# is now working, although we only support the interpreter right now, which is much slower than AOT.
Initial AOT compilation support was added for other platforms. There's still more work to do here. We do not support LLVM yet (although you may experiment with that using the "Extra Aot Options" setting).
More info will come once I update the Compiling with Mono docs.
Bugsquad edit: Fixes #20270.

Woah! Does this mean we can expect C# -> WebGL soon?

@CaptainStack That's what this pull request implements :slightly_smiling_face:

As discussed with @neikeq, this should hopefully not introduce regressions for existing desktop and Android builds, so let's merge.
We likely won't ship 3.2 with AOT, but I might manage to get the WebAssembly templates in time (worked on it the past few days). AOT will be refined in master and we'll cherrypick relevant changes for a later 3.2.x release when it's ready.

Thanks!

Great work, I was super interested in how this was going to be done. I also really enjoyed the branch name :P.


Add RtwithoutRenewalTestPipeline type with updated pipeline tests

This small PR follows on from f2f discussion and adds a test mode pipeline type to differentiate between sampling done running tests vs full pipeline runs.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.76%. Comparing base (919b8a8) to head (33490aa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #236   +/-   ##
=======================================
  Coverage   92.76%   92.76%
=======================================
  Files          43       43
  Lines         401      401
=======================================
  Hits          372      372
  Misses         29       29

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

Stochastic failure is negative binomial which is an epiaware issue. Aside from updating the name this is good to go.


[css] Order suggested CSS properties based on usage not alphabetically

For example: for b the first suggested property is backface-visibility: which is rarely used compared to background:

To find the most popular CSS properties we ca use GitHub data on Google Big Query. For example:
SELECT
  COUNT(path), content
FROM [bigquery-public-data:github_repos.files] files
JOIN [bigquery-public-data:github_repos.contents] contents
  ON contents.id = files.id
WHERE
  path LIKE '%.css'
  OR path LIKE '%.scss'
  OR path LIKE '%.less'
  OR path LIKE '%.sass'
AND content CONTAINS 'background-color'

Where can I find a table of all CSS properties so I can build the popularity table based on GitHub data?

You find the table in https://github.com/Microsoft/vscode-css-languageservice/blob/master/src/data/browsers.js

+1 I came here to ask for the same thing. There are some selectors which really are never used and should never be pushed to the top of the auto-suggest. For example, if you type "wid", the first suggestion is "widows", a property I didn't even know existed until VS Code tried to autocomplete it for me.

+1
Same here. I usually type 'wid' and press enter expecting to get 'width', but it prints 'widows'.

There's a big discussion thread about this on reddit https://www.reddit.com/r/webdev/comments/c6pfay/the_most_stupid_autocompletion_in_the_entire_world/

Chrome publishes its stats: https://www.chromestatus.com/metrics/css/popularity
We could its ordering to assign a ranking order to CSS properties.


How to use local bootstrap?

Of course, I can override css_url with hardcoded URL. But how to use static tag to get css file url without overriding whole bootstrap3.html template?

You can override the css_url on the settings.pyfile of your project without any hardcode.

@ikcam I think @cl0ne tries to ask how to get an url to the location of a static file in the css_url, which could be hard-coded.
You might succeed in doing it automatically, but you'll need some lazy approach: generating the url will require some settings to be defined so it cannot be returned as a string from a function ran in settings.py if that makes sense...

It's not possible to use static within settings.py. How can I get something equivalent to
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}" />

@jieter You're right. Probably some wrapper with __str__ method will be sufficient, going to try this approach.

Thanks @jieter for idea! Came up with the following approach:
class StaticWrapper:
    def __init__(self, path):
        self.path = path

    def __str__(self):
        return static(self.path)

BOOTSTRAP3 = {
    'css_url': StaticWrapper('bootstrap/dist/css/bootstrap.min.css')
}

Good solution @jieter. But this could use a better fix, I'll look at examples form Django static urls to see if we could just apply static to the url.

@cl0ne did you define your class in your settings.py or another file?
@dyve Sorry I'm new to django would using staticfile prefixes work?

@gaelanadams I define it in separate file and then import in settings.py (even though it's only used there, but don't think it's good idea to not put it in separate file).

May be simply:
BOOTSTRAP3 = {
    'base_url': '%sbootstrap/' % STATIC_URL,
...
}

The most elegant solution would be if I ran the resulting url through static.
from django.contrib.staticfiles.templatetags.staticfiles import static
# Assume static path = '/static/'

url = static('bootstrap.css')
# url is now '/static/bootstrap.css'

url = static('https://example.com/bootstrap.css')
# url is now 'https://example.com/bootstrap.css'

url = static('/bootstrap.css')
# url is now '/bootstrap.css' -- so mind the starting slash

I don't see the upside to loading a template tag for this.
What use case is there, where this does not resolve to STATIC_URL + path?
And STATIC_URL should be right there in settings.py.

The original reason for a template tag was to make it easy to use the same settings (JS, CSS, theme) in different templates. I agree that it's not a super big advantage, but it makes getting started easier.

It's a documentation issue. People perceive the static template tag as magical, yet all it does is put STATIC_URL before the argument.
This:
BOOTSTRAP3 = {
    'css_url': StaticWrapper('bootstrap/dist/css/bootstrap.min.css'),
    'jquery_url': StaticWrapper('jquery/dist/jquery.min.js'),
    'javascript_url': StaticWrapper('bootstrap/dist/js/bootstrap.min.js'),
}

and this:
BOOTSTRAP3 = {
    'jquery_url': STATIC_URL + 'js/jquery.min.js',
    'css_url': STATIC_URL + 'css/bootstrap.min.css',
    'javascript_url': STATIC_URL + 'js/bootstrap.min.js',
}

is no different to the end user, except that the first creates a circular dependency in the boot cycle of Django and loads a bunch of code. Solve this in the documentation, not the code.
Now, if you want to make things easy on end users, then support something like:
BOOTSTRAP3 = {
    'css_url': 'css/bootstrap.min.css',
    # ....
    'urls_static': True,
}

This avoids the circular dependency as you'd only have to transform them once one of the template tags is called and can simply defer to the static tag.

People perceive the static template tag as magical, yet all it does is put STATIC_URL before the argument.

The builtin template tag static which takes a path and urljoins it with the static prefix STATIC_URL.
If django.contrib.staticfiles is installed, the tag uses the url() method of the STATICFILES_STORAGE instead.