common: support setting pg autoscaler to off

The current implementation doesn't allow to disable the pg autoscaler
on created pools. This allows only 'on' or 'warn'.
With this commit, this is now possible to disable it.
Valid values would be ['on', 'yes', 'true', 'off', 'no', 'false']
openstack_glance_pool:
  name: "images"
  pg_num: 128
  pgp_num: 128
  rule_name: "replicated_rule"
  type: 1
  application: "rbd"
  size: 3
  pg_autoscale_mode: off

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2062621
Signed-off-by: Guillaume Abrioux<EMAIL_ADDRESS>

jenkins test centos-non_container-all_daemons

jenkins test centos-container-all_daemons


Revisit @foo Application.get_env(…) pattern

Gets env at compile-time, so maybe not a good choice in some cases, e.g. for API keys. If we e.g. change the Heroku API key, I believe it wouldn't actually change until the next deploy.

https://github.com/Nebo15/confex might help with this

This happened – we changed the API key and were confused by it not having effect: https://auctionet.slack.com/archives/CF9SAN79V/p1624961767148600


The remote server returned an error: (403) Forbidden.

This happens every time i run RobloxStudioManager and click on Launch studio.
System.Net.WebException: The remote server returned an error: (403) Forbidden.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RobloxStudioModManager.PackageManifest.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at RobloxStudioModManager.StudioBootstrapper.d__102.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RobloxStudioModManager.BootstrapperForm.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RobloxStudioModManager.Launcher.<launchStudio_Click>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)

It just happened again on 11/29/2022 @ 7:07 PM.
************** Exception Text **************
System.Net.WebException: The remote server returned an error: (403) Forbidden.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxStudioModManager.PackageManifest.<Get>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at RobloxStudioModManager.StudioBootstrapper.<Bootstrap>d__107.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxStudioModManager.BootstrapperForm.<Bootstrap>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxStudioModManager.Launcher.<launchStudio_Click>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)

It just happened again, but this time its a 401 instead of a 403.
************** Exception Text **************
System.Net.WebException: The remote server returned an error: (401) Unauthorized.
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxDeployHistory.ClientVersionInfo.<Get>d__16.MoveNext() in C:\Users\clone\Documents\GitHub\Roblox-Deploy-History\History\ClientVersionInfo.cs:line 46
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxDeployHistory.StudioDeployLogs.<GetLiveLog>d__23.MoveNext() in C:\Users\clone\Documents\GitHub\Roblox-Deploy-History\History\StudioDeployLogs.cs:line 62
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxDeployHistory.StudioDeployLogs.<UpdateLogs>d__24.MoveNext() in C:\Users\clone\Documents\GitHub\Roblox-Deploy-History\History\StudioDeployLogs.cs:line 92
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxDeployHistory.StudioDeployLogs.<Get>d__25.MoveNext() in C:\Users\clone\Documents\GitHub\Roblox-Deploy-History\History\StudioDeployLogs.cs:line 170
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at RobloxStudioModManager.Launcher.<channelSelect_SelectedIndexChanged>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)


rofimoji: 4.3.0 -> 5.1.0

pyxdg dependency was removed in 5.0, so I've removed it.
Tested only on X11, but I don't expect any problems on Wayland if it was working before.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Added a release notes entry if the change is major or breaking
[x] Fits CONTRIBUTING.md.

passed nixpkgsreview


Can Class, ion-content is .js Instead of .css by Angular

Can create a class for...
class list could be like for ion-content, class content. Used a p tag and it worked to fixed the HTML layout.

Wrong repository again.


Revert "chore(deps): Bump org.apache.maven.plugins:maven-gpg-plugin from 3.1.0 to 3.2.1"

Reverts jakartaee/data#581
This is preventing the M4 release.

I think we can fix this on the build side.  Let's hold off on reverting until I can test this.

Fixed the build no need to revert.

I figured that was probably the case, but didn't want to hold anything up. Thanks for getting it fixed on the build side

Thanks @KyleAure


add doc about helm install Kmesh

add doc about helm install Kmesh

https://github.com/kmesh-net/website/pull/16 already contains the description of the helm install. This PR will be closed.

/close


minutes read

Hi @humboldtux, Adds to the header of post pages the read time, subject to config containing
under [params], showReadTime = true

When showReadTime = true:

Post Title
Description
A 1 minute read, Posted by Dan on Sat, Jan 14, 2017
In General
Tags blog

When showReadTime = false:

Post Title
Description
Posted by Dan on Sat, Jan 14, 2017
In General
Tags blog

This could also be added to the home page, via another pr.

Great feature. I think we need it too on the home page. Can you include it in the summary.html, to be easily reused in layouts/post/single.html and layouts/index.html?
Before re-working in this branch, don't forget to rebase from master, after having updating master with the PR i just merged:
git co master
git pull
git co Minutes-read
git rebase master

You may have to do manual changes during rebasing (you changed README.md in both commit/PR).
Then you can continue to work, commit, create PR,...

@humboldtux, updated to include homepage summaries and recent changes to readme.

Updated as per above conversation, with addition of meta.html

Thanks


the Switch component with the fastclik is not compatible

when
Fastclick.attach(document.body)
Vue.use(Mint)
the Switch component didn't change when i click
if i remove the Fastclik
the Switch work well
how to fix it?

fixed in #592


Computing the bounding box of an element

Hey,
I have hopefully what's a pretty simple question.  I'm interested in computing the bounding box of a (potentially higher-order) element.  What's the best way to do that in MFEM?
Thanks!

For high-order elements computing the bounding box is actually not trivial.
One approach is to compute the bounding box on a lattice of points in reference space that is transformed with the element transformation. For very curved elements this may not be exact, but the accuracy approves with the lattice refinement level. See https://github.com/mfem/mfem/blob/903d51e78fab387f2d6c72bb3eed108bc0fd9d1f/mesh/mesh.cpp#L164-L174 in Mesh::GetBoundingBox.
A method that guarantees correct (but maybe pessimistic) bounding box is to switch to Bernstein basis for the nodes. @kennyweiss has some experience with that.

Does it need to be a box? Is the box aligned with (x,y,z) coord system? Depending upon the application a bounding sphere may work, center of sphere is center of the element, radius of sphere is determined by evaluating the physical coordinates of the vertices and taking the one which is farthest away. If you then really need a box, tyou

Ug wasn't finished typing.....
Can then find a box that fits the sphere

Elaborating a bit on the second part of @tzanio's answer: The element is contained within the convex hull of its nodes (control points) in the Bernstein basis.  These bases are referred to as Positive bases in mfem.
So, one approach would be to project the element into a Bernstein basis and then process the element's nodes.  By taking the min and max coordinates of an element's nodes, you can easily find the element's bounding box in physical space.  Following @Dan2997925's answer, one can also fit a sphere or oriented bounding box to these nodes.
As @tzanio mentioned, this is a conservative estimate of the element's true bounding box.  If necessary, tighter bounds can be obtained by subdividing the element (h-refinement) or increasing its polynomial order (p-refinement).
If you need this for all elements in the mesh, you can use mfem's GridFunction::ProjectGridFunction() to project its nodal grid function.

@junkudo: was this useful? do you have any follow-on questions?

Yeah this was helpful. Thanks!
On Wed, Dec 12, 2018, 8:06 AM Tzanio Kolev<EMAIL_ADDRESS>wrote:

@junkudo https://github.com/junkudo: was this useful? do you have any
follow-on questions?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mfem/mfem/issues/695#issuecomment-446642328, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABP1ZmYwQAOWZqe32KyJglE3hVG9gNHSks5u4SmIgaJpZM4ZFr2D
.

Great!
I'll close this now, but please let us know if you have additional questions.
Also, feel free to suggest a PR if you write something that could be of general interest (e.g. bounding sphere or convex set).


Add authentication/authorization/audit support

Incorporating Passport.js for authentication.
A custom role-based access control middleware for authorization
And using the JSON logger (Bunyan) for access audit.
See /ui/src/auth/README.md for a detailed explanation of the feature.
Some screenshots:

Also, fixed some styling issues:

left-menu layout
missing sourcesanspro font (converted to woff2)

WDYT?

Pull Request Test Coverage Report for Build 4242

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 69.44%

Totals

Change from base Build 4234:
0.0%

Covered Lines:
12402

Relevant Lines:
17860

💛  - Coveralls

Hey @elisherer, sorry for the delays. We'll work with our partner UI engineer to get this reviewed sometime this week.

Hi @kishorebanala, any update on the review?

Hi @kishorebanala, any update on the review?

Thanks for the contribution.


Privacy and data

Yo!
I think you should include an additional disclaimer about the data included within the CV (for example, it would be preferable to have a CV uploaded without personal data such as phone, email, address or other relevant information).
Where does the data go? This is important information in my opinion that needs to be made explicit!

Thanks for pointing that out! I’ve released an update with a disclaimer and a Privacy Policy. When users click "Scegli file", a modal pops up where they can either accept or cancel. If they accept, the process continues. Hope that's okay!
As always, feedback is welcome!


SkBuffContext and IPv6

Hi,
I am writing a socket filter (will be open sourced once working). I use this as a basis: https://github.com/aya-rs/book/tree/main/examples/cgroup-skb-egress, but it is not for cgroups_skb, but for socket filter.
I have made it working for IPv4 and IPv6. However, in the eBPF program itself I am only able to get properly the IPv4 address. In case of IPv6 sockets, I somehow get no proper IP address.
I extract the IPv4 address similarly to here:
https://github.com/aya-rs/book/blob/main/examples/cgroup-skb-egress/cgroup-skb-egress-ebpf/src/main.rs#L46
This is  my code to extract the IPv6 address:
 u128::from_be(ctx.load(offset_of!(ipv6hdr, saddr)).unwrap())

It is obvious that this is not an IP address as this is changing all the time. This is ipv6hdr:
pub struct ipv6hdr {
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
    pub flow_lbl: [__u8; 3usize],
    pub payload_len: __be16,
    pub nexthdr: __u8,
    pub hop_limit: __u8,
    pub saddr: [__be32; 4usize],
    pub daddr: [__be32; 4usize],
}

I am not sure if case of IPv6 the ipv6hdr is at a different offset and I need to add sth.
Any idea?
Thanks a lot.

Are you taking into account the ethernet header offset?
ETH_HDR_LEN + offset_of!(iphdr, saddr)

Thanks for the quick answer.
For IPv4 for sock_filter (not TC) it is not needed and it works there perfectly without ETH_HDR. For IPv6 with or without it makes no difference - Maybe I do not correctly understand what is in SkBuffContext when an AF_INET6 socket is used...

Maybe some more context. This is my ebpf program
[..]

#[socket_filter(name = "sock_egress")]
pub fn sock_egress(ctx: SkBuffContext) -> i64 {
  match try_sock_egress(ctx) {
        Ok(ret) => ret,
        Err(_) => 0,
    }

}
[..]
n try_sock_egress(ctx: SkBuffContext) -> Result<i64, i64> {

    // determine protocol
    // only process ipv4 and ipv6 packet
        // determine protocol
        let h_proto = unsafe { (*ctx.skb.skb).protocol };

        // only process ipv4 and ipv6 packages
        let ip_version: u32 = match h_proto {
            ETH_P_IP => 4,
            ETH_P_IPV6 => 6,
            _ => return Ok(0), // drop packet
        };
    // determine destination of the packet
    let destination: u128 = 0;
    let destination: u128 = match ip_version {
        4 =>
        u32::from_be(ctx.load(offset_of!(iphdr, saddr)).unwrap()) as u128,
        6 => {

            u128::from_be(ctx.load(offset_of!(ipv6hdr, saddr)).unwrap())

        },
        _ => 0,
    };
 [..]

As said - the IPv4 part works correctly (correct IP etc.), the IPv6 part - I think I am missing something.

Ahh I see, if the protocol is IPv6 then I do not get the IP header in the data of skbuff, but only the TCP header... So this part is consistent with the raw socket API for IPv6.
Any idea on how to get somehow the IP address then in the eBPF program?

Or if this is feasible at all? I just want to explore what is possible with a socket filter, I am aware that I can also use XDP or TC.

Ahh I see, if the protocol is IPv6 then I do not get the IP header in the data of skbuff, but only the TCP header... So this part is consistent with the raw socket API for IPv6.

Oh, I've never used skb before. Had no idea it was any different.
Sorry if I'm not following. Are you saying https://docs.aya-rs.dev/bpf/aya_bpf/bindings/struct.__sk_buff.html has protocol but the ip address fields aren't filled out?

Well the ip address fields are only filled out for BPF type: BPF_PROG_TYPE_SK_SKB (see: https://blogs.oracle.com/linux/post/bpf-a-tour-of-program-types).
It seems - the only way to access ancialliary data (ie the ipv6 header) is to load it from a negative offset:
https://github.com/torvalds/linux/blob/6f0d349d922ba44e4348a17a78ea51b7135965b1/include/uapi/linux/filter.h#L60
It seems that aya only allows unsigned (positive) offsets. Can anyone confirm this assumption?

Hmm, interesting. It seems like aya will only load with an offset usize so only positive.

Ahh I see, if the protocol is IPv6 then I do not get the IP header in the data of skbuff, but only the TCP header

What makes you think this? Here's an example of a socket filter parsing IP headers https://github.com/torvalds/linux/blob/03421a92f5627430d23ed95df55958e04848f184/samples/bpf/sockex2_kern.c#L100

Well the ip address fields are only filled out for BPF type: BPF_PROG_TYPE_SK_SKB (see: https://blogs.oracle.com/linux/post/bpf-a-tour-of-program-types) - not for BPF_PROG_TYPE_SOCKET_FILTER

I haven't written a socket filter in a long time but from what I can see in the kernel source, this doesn't seem to be true either?

thanks a lot.

Ahh I see, if the protocol is IPv6 then I do not get the IP header in the data of skbuff, but only the TCP header

What makes you think this? Here's an example of a socket filter parsing IP headers https://github.com/torvalds/linux/blob/03421a92f5627430d23ed95df55958e04848f184/samples/bpf/sockex2_kern.c#L100

Because the data starts with the TCP header - I can parse port etc. successfully. It could be the different ways on how the raw socket is opened. I use:
let fd: i32 = unsafe { libc::socket(libc::AF_INET6, libc::SOCK_RAW, libc::IPPROTO_TCP) };

In this way - even without eBPF - I receive in the user space program only the TCP header, which is normal (cf. e.g.https://schoenitzer.de/blog/2018/Linux Raw Sockets.html).
Will try with
let fd: i32 = unsafe { libc::socket(libc::AF_PACKET, libc::SOCK_DGRAM, libc::ETHERTYPE_IPV6) };

Well the ip address fields are only filled out for BPF type: BPF_PROG_TYPE_SK_SKB (see: https://blogs.oracle.com/linux/post/bpf-a-tour-of-program-types) - not for BPF_PROG_TYPE_SOCKET_FILTER

I haven't written a socket filter in a long time but from what I can see in the kernel source, this doesn't seem to be true either?

Well I just quoted the blog - this can have changed in different kernel versions, but contrary to see BPF functions to see which one are allowed and which one are not, finding out which fields are filled out in the view __sk_buff by the kernel is not so obvious (or I look in the wrong place). Where do you see this in the kernel source? Just for clarification - some of the fields in the view __sk_buff are filled, but not all - especially not the ip address ones if i use sock_filter.
It seems according to the tests the blog is correct: https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/verifier/ctx_skb.c
Nevertheless, I could also overlook sth. here.
Maybe the confusion comes from the different types of raw sockets used (I used an AF_INET6 one, the example you reference seems to be at a lower level, possibly AF_PACKET).

Somehow, I have issues with Rust and a raw socket with AF_PACKET. For example, this  quick and dirty C program works
#include<errno.h>
#include<stdio.h>
#include<stdlib.h>
#include<netinet/if_ether.h>
#include<sys/socket.h>

int main()
{

	unsigned char *buffer = (unsigned char *) malloc(65536); //Its Big!

	int data_size;
	int sock_raw = socket( AF_PACKET , SOCK_RAW , htons(ETH_P_ALL)) ;

	if(sock_raw < 0)
	{
		//Print the error with proper message
		perror("Socket Error");
		return 1;
	}
	while(1)
	{
        printf("Receiving");
		//Receive a packet
		data_size = recv(sock_raw , buffer , 65536 , 0);
		if(data_size <0 )
		{
			printf("Recv error , failed to get packets\n");
			return 1;
		}
        printf("%d",data_size);
	}
	pclose(sock_raw);
	printf("Finished");
	return 0;
}

It shows packages are received over the raw socket with AF_PACKET.
However the equivalent quick and dirty Rust program does not show anything:
fn main() {

        // create raw socket
        let fd: i32 = unsafe { libc::socket(libc::AF_PACKET, libc::SOCK_RAW, libc::ETH_P_ALL) };
        if fd < 0 {
            println!("Error socket");
            return;
        }

        let mut buffer = vec![0u8; 4096].into_boxed_slice();
        while (true) {
            println!("Enter loop");

       let result=unsafe{libc::recv(fd, buffer.as_mut_ptr() as *mut libc::c_void, buffer.len(),0)};
        if result < 0 {

            println!("Error read");
        } else {
            println!("Size: {}",result);
        }
    }
}

It works though with AF_INET,AF_INET6

Ok, found the issue in the Rust program (had to simulate htons(ETH_P_ALL)
n main() {

        // create raw socket
          let fd: i32 = unsafe { libc::socket(libc::AF_PACKET, libc::SOCK_RAW, (libc::ETH_P_ALL as u16).to_be() as i32) };
        if fd < 0 {
            println!("Error socket");
            return;
        }

        let mut buffer = vec![0u8; 4096].into_boxed_slice();
        while (true) {
            println!("Enter loop");

       let result=unsafe{libc::recv(fd, buffer.as_mut_ptr() as *mut libc::c_void, buffer.len(),0)};
        if result < 0 {

            println!("Error read");
        } else {
            println!("Size: {}",result);
        }
    }
}

Will for now with the raw packets, I just wonder if the following makes in aya sense (or if I misunderstood how it works)?

It seems - the only way to access ancialliary data (ie the ipv6 header) is to load it from a negative offset:
https://github.com/torvalds/linux/blob/6f0d349d922ba44e4348a17a78ea51b7135965b1/include/uapi/linux/filter.h#L60

If it makes sense then I can close this issue and create a new issue for aya on this, if not then I simply close this issue.
Please let me know.

It seems according to the tests the blog is correct: https://github.com/torvalds/linux/blob/master/tools/testing/selftests/bpf/verifier/ctx_skb.c

Correction, it seems you where right, I looked now in more tests. Well anyway... will investigate this later

It seems - the only way to access ancialliary data (ie the ipv6 header) is to load it from a negative offset:
https://github.com/torvalds/linux/blob/6f0d349d922ba44e4348a17a78ea51b7135965b1/include/uapi/linux/filter.h#L60

If it makes sense then I can close this issue and create a new issue for aya on this, if not then I simply close this issue.

https://github.com/torvalds/linux/blob/150aae354b817f540848476bace2b2ba9931b197/net/core/filter.c#L340
It seems to me that that stuff is only for (classic) BPF and is mapped to just accessing ctx->$field in eBPF?

Good question, I will investigate. I can confirm so that with an aya socket filter I did not had access to remote_ip etc. only to protocol (essentially that were allowed by the tests shown in the Linux kernel). I do not think this was related to aya.


STL Viewer zoomed out.

Describe what the problem is?
When loading a STL into the viewer, it starts completely zoomed out so it might look like it's not loaded until it rotates into zoom
What should be the expected behavior?
Item displays centered at relative zoom to screen size.
Are you willing to work on it yourself?
Yes.

Fixed with latest commit.


Fix error message generation

Overview
When trying to execute a Zoo-project service with an unknow identifier, the server returns an HTTP 500 error and produces a Core Dump.
The same issue appears when on execution on a Python service when a module is missing.
Contributions and Licensing
(as per https://zoo-project.github.io/docs/contribute/howto.html#licensing)

[x] I'd like to contribute [feature X|bugfix Y|docs|something else] to ZOO-Project. I confirm that my contributions to ZOO-Project will be compatible with the ZOO-Project license guidelines at the time of contribution.
[x] I have already previously agreed to the ZOO-Project Contributions and Licensing Guidelines

You're welcome!


java.lang.NoSuchMethodException: org.glassfish.jersey.message.DeflateEncoder when init v1 API

Describe the bug
Got java.lang.NoSuchMethodException: org.glassfish.jersey.message.DeflateEncoder.() when initializing v1 API
BTW, the error is understandable because the DeflateEncoder class has no default constructor, but I'm probably missing something else a lot of people should have report for the same.
The initialization code is as follows:
// Configure authorization
Map<String, String> secrets = new HashMap<>();
secrets.put("apiKeyAuth", System.getenv("DD_API_KEY"));
secrets.put("appKeyAuth", System.getenv("DD_API_KEY"));
// initialize V1 API
v1Client = com.datadog.api.v1.client.Configuration.getDefaultApiClient().configureApiKeys(secrets);

To Reproduce
It occurs all the time in my application.
Expected behavior
API must be initialized correctly.
Screenshots
Caused by: java.lang.RuntimeException: java.lang.InstantiationException: org.glassfish.jersey.message.DeflateEncoder
	at org.apache.cxf.jaxrs.impl.ConfigurationImpl.createProvider(ConfigurationImpl.java:240)
	at org.apache.cxf.jaxrs.impl.ConfigurationImpl.<init>(ConfigurationImpl.java:66)
	at org.apache.cxf.jaxrs.client.spec.ClientConfigurableImpl.<init>(ClientConfigurableImpl.java:37)
	at org.apache.cxf.jaxrs.client.spec.ClientBuilderImpl.withConfig(ClientBuilderImpl.java:160)
	at com.datadog.api.v1.client.ApiClient.buildHttpClient(ApiClient.java:1521)
	at com.datadog.api.v1.client.ApiClient.<init>(ApiClient.java:321)
	at com.datadog.api.v1.client.ApiClient.<init>(ApiClient.java:311)
	at com.datadog.api.v1.client.Configuration.getDefaultApiClient(Configuration.java:29)
	at com.algosec.shared.issuescenter.client.IssuesCenterClient.<init>(IssuesCenterClient.java:35)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204)
	... 215 common frames omitted
Caused by: java.lang.InstantiationException: org.glassfish.jersey.message.DeflateEncoder
	at java.base/java.lang.Class.newInstance(Class.java:571)
	at org.apache.cxf.jaxrs.impl.ConfigurationImpl.createProvider(ConfigurationImpl.java:238)
	... 228 common frames omitted
Caused by: java.lang.NoSuchMethodException: org.glassfish.jersey.message.DeflateEncoder.<init>()
	at java.base/java.lang.Class.getConstructor0(Class.java:3349)
	at java.base/java.lang.Class.newInstance(Class.java:556)
	... 229 common frames omitted

Environment and Versions (please complete the following information):
A clear and precise description of your setup:

java 11
datadog-api-client v1.5.0.

Additional context
Application is deployed in apache tomcat 9.0.54 on linux.

AFAIU the inject decorator should tell Apache CXF to pass the parameter: https://github.com/eclipse-ee4j/jersey/blob/c5e71d03a02f0f79a3df451c4d325d90a5953542/core-common/src/main/java/org/glassfish/jersey/message/DeflateEncoder.java#L55. Maybe some configuration is telling it to not take that into account? I'll try to reproduce it.

@therve in the meantime I also tried to isolate the issue in a sample test, and failed to reproduce it.
Also, looked at the pom.xml, and saw that the jersey version is 2.27, but in my project we are using 2.31.
Do you think it may be the root cause of my issue ? BTW, 2.27 is quite old (04/2018), with vulnerabilities (see https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client/2.27)

The vulnerability is in JUnit so I don't think it's very important, but we should upgrade anyway. I doubt that's the source though.

How do we configure custom endpoint other datadoghq.* in Datadog agent submit metrics api in java?
Any reference would be appreciated.

We upgraded the deps and have a shaded jar now which could help. Let us know if you're still getting the issue, thanks.


Build Failing on OSX with Homebrew

Not too sure whether this is something that needs to be updated, but homebrew is now dishing out vte version 2.91 rather than 2.90.
I get this error when trying to build:
thread '<main>' panicked at '`"pkg-config" "--libs" "--cflags" "vte-2.90"` did not exit successfully: exit code: 1
--- stderr
Package vte-2.90 was not found in the pkg-config search path.
Perhaps you should add the directory containing `vte-2.90.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vte-2.90' found
', /Users/cetra/.cargo/git/checkouts/gtk-61164953be1831c6/master/gtk-sys/build.rs:45

Correct, you need to uninstall vte3 and use the formula that is in this repo by going to the root of the project and running brew install vte3.rb. My code does not currently work for the latest version of libvte. I hope to get it working for it eventually, but I'm currently stuck on a technical issue with it.

Ok. I was blindly following the instructions on the README, I'll give your suggestion a shot.

The README actually did mention vte.rb but I just edited it to make it more clear. Let me know if you still have issues.

Hi @oakes,
It appears to be stuck on neovim-rs after resolving this issue.  While neovim compiles correctly, It looks like it's not running the build script so it is not adding the right -L params.  If I run cargo build within the neovim-rs directory it works fine, but not within SolidOak.
Should I raise a seperate ticket for this?
Here's the error message I get:
#cargo build --verbose
    Updating git repository `https://github.com/oakes/neovim-rs`

       Fresh gcc v0.3.21
       Fresh libc v0.1.12
       Fresh pkg-config v0.3.6
       Fresh bitflags v0.3.3
       Fresh rustc-serialize v0.3.16
       Fresh c_vec v1.0.12
   Compiling neovim-rs v0.1.0 (https://github.com/oakes/neovim-rs#f7eb2151)
     Running `rustc /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/src/lib.rs --crate-name neovim --crate-type rlib -g -C metadata=6bdf0afeabbce483 -C extra-filename=-6bdf0afeabbce483 --out-dir /Users/cetra/git/SolidOak/target/debug/deps --emit=dep-info,link -L dependency=/Users/cetra/git/SolidOak/target/debug/deps -L dependency=/Users/cetra/git/SolidOak/target/debug/deps --extern libc=/Users/cetra/git/SolidOak/target/debug/deps/liblibc-29adb837ec836726.rlib --cap-lints allow -L /usr/local/opt/gettext/lib/`
       Fresh cairo-sys-rs v0.2.1
       Fresh glib-sys v0.2.1
       Fresh gobject-sys v0.2.1
       Fresh atk-sys v0.2.1
       Fresh gio-sys v0.2.1
       Fresh pango-sys v0.2.1
       Fresh gdk-pixbuf-sys v0.2.1
       Fresh glib v0.0.7
       Fresh gdk-sys v0.2.1
       Fresh pango v0.0.6
       Fresh cairo-rs v0.0.7
       Fresh gtk-sys v0.2.1 (https://github.com/oakes/gtk#3064a74b)
       Fresh gdk v0.2.0
       Fresh gtk v0.0.6 (https://github.com/oakes/gtk#3064a74b)
error: could not find native static library `nvim`, perhaps an -L flag is missing?
Could not compile `neovim-rs`.

Caused by:
  Process didn't exit successfully: `rustc /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/src/lib.rs --crate-name neovim --crate-type rlib -g -C metadata=6bdf0afeabbce483 -C extra-filename=-6bdf0afeabbce483 --out-dir /Users/cetra/git/SolidOak/target/debug/deps --emit=dep-info,link -L dependency=/Users/cetra/git/SolidOak/target/debug/deps -L dependency=/Users/cetra/git/SolidOak/target/debug/deps --extern libc=/Users/cetra/git/SolidOak/target/debug/deps/liblibc-29adb837ec836726.rlib --cap-lints allow -L /usr/local/opt/gettext/lib/` (exit code: 101)

If I manually run cargo build from the neovim-rs dir, it works fine:
cd /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master && cargo build --verbose

    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling neovim-rs v0.1.0 (file:///Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master)
     Running `rustc build.rs --crate-name build_script_build --crate-type bin -g --out-dir /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/build/neovim-rs-28a6c9f8f25bdd70 --emit=dep-info,link -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps`
   Compiling libc v0.1.12
     Running `rustc /Users/cetra/.cargo/registry/src/github.com-0a35038f75765ae4/libc-0.1.12/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature=\"default\" --cfg feature=\"cargo-build\" -C metadata=29adb837ec836726 -C extra-filename=-29adb837ec836726 --out-dir /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps --emit=dep-info,link -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps --cap-lints allow`
     Running `/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/build/neovim-rs-28a6c9f8f25bdd70/build-script-build`
     Running `rustc src/lib.rs --crate-name neovim --crate-type rlib -g --out-dir /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug --emit=dep-info,link -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug -L dependency=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps --extern libc=/Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/target/debug/deps/liblibc-29adb837ec836726.rlib -L /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/neovim/build/lib -L /Users/cetra/.cargo/git/checkouts/neovim-rs-a70c241027c677cc/master/neovim/.deps/usr/lib -L /usr/local/opt/gettext/lib/ -l nvim`
src/ffi.rs:157:43: 157:55 warning: found non-foreign-function-safe member in struct marked #[repr(C)]: found zero-size struct in foreign module, consider adding a member to this struct, #[warn(improper_ctypes)] on by default
src/ffi.rs:157     pub fn vim_array_add_dictionary (val: C_Dictionary, arr: *mut C_Array);

I've seen this error before but I can't seem to replicate it right now. I deleted neovim-rs from my ~/.cargo/git/checkouts folder to force it to redownload and rebuild it, and it did so. I made a small change to the neovim-rs build script so maybe it will help (just do a git pull && cargo update and try building again). Feel free to make a new issue about this if the problem persists.

Seems to build with your most recent changes!


2D Screen element loses set ScaleMode after Copy/Paste operation

If you copy and paste a hierarchy from one scene to another within a project, the ScaleMode parameter is reset to Blend if it was previously set to None.

Apologies for putting this in the wrong place, and I can't reproduce it again now either. Closing.


fix(reporter: report5): FnmatchMatcher now require name argument

in new version of python-coverage (ex. 6.1.1) name argument is required, so it's not possible to run the coveralls:
$ COVERALLS_REPO_TOKEN=foo coveralls
Submitting coverage to coveralls.io...
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/coveralls/reporter.py", line 122, in report
    from coverage.report import Reporter  # pylint: disable=import-outside-toplevel
ImportError: cannot import name 'Reporter' from 'coverage.report' (/usr/lib/python3.10/site-packages/coverage/report.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/coveralls", line 33, in <module>
    sys.exit(load_entry_point('coveralls==3.3.0', 'console_scripts', 'coveralls')())
  File "/usr/lib/python3.10/site-packages/coveralls/cli.py", line 95, in main
    result = coverallz.wear()
  File "/usr/lib/python3.10/site-packages/coveralls/api.py", line 252, in wear
    json_string = self.create_report()
  File "/usr/lib/python3.10/site-packages/coveralls/api.py", line 330, in create_report
    data = self.create_data()
  File "/usr/lib/python3.10/site-packages/coveralls/api.py", line 384, in create_data
    self._data = {'source_files': self.get_coverage()}
  File "/usr/lib/python3.10/site-packages/coveralls/api.py", line 404, in get_coverage
    return CoverallReporter(workman, workman.config, base_dir,
  File "/usr/lib/python3.10/site-packages/coveralls/reporter.py", line 23, in __init__
    self.report(cov, conf)
  File "/usr/lib/python3.10/site-packages/coveralls/reporter.py", line 125, in report
    return self.report5(cov)
  File "/usr/lib/python3.10/site-packages/coveralls/reporter.py", line 76, in report5
    matcher = FnmatchMatcher(prep_patterns(config.report_omit))
TypeError: FnmatchMatcher.__init__() missing 1 required positional argument: 'name'

hm, i see even after fixing this, another test is still failing with Coverage 6.1.1 - i was looking into it for some time, but didnt figured out what's happening - but seems like some behavior change or bug in Coverage lib itself

newest version of coverage/coveralls packages' combo works for me: https://github.com/actionless/pikaur/actions/runs/7382396252
so closing this incomplete PR then


[Doc] How to Optimize a Language Model

This tutorial demonstrates how to optimize a language model using TVM.

preview at http://<IP_ADDRESS>:58000/opt_llm/how_to/tutorials/optimize_llm.html


Update: Add support for BooleanLiteralType

Both Flow and TypeScript (2.0) support boolean literals as types.
These are mostly used with unions as in:
type Result = {
  ok: true,
  value: string,
} | {
  ok: false,
}

I signed the CLA yesterday...

I'm sorry, I don't understand. How does this relate to JSDoc syntax?

It is related to the type expression language that jsdoc uses. For example:
/**
 * @return {true}
 */
function alwaysTrue() {
  return true;
}

Silly example but when you combine it with @typedef and more complex types it is useful.
For some background:
https://flowtype.org/docs/dynamic-type-tests.html#tagged-unions
https://blogs.msdn.microsoft.com/typescript/2016/08/30/announcing-typescript-2-0-rc/

I'm sorry, I'm having a hard time understanding. Why wouldn't you use boolean there? I don't see anything in those links that talks about JSDoc supporting this.
This utility is used by a lot of people, and I'm afraid can't stray from JSDoc expectations without some good justification or evidence that JSDoc supports what you're proposing here.

Let me try to justify this:

The type system for JSDoc should be able to express the type systems of Closure Compiler, TypeScript and Flow.
Both TypeScript and Flow supports boolean literal types.
Doctrine already support NumericLiteralType and StringLiteralType... it is just missing the boolean equivalent. #172 added support for numeric and string literal types. You (@nzakas) then closed #156 without boolean support. This PR adds the missing boolean support.

@arv https://github.com/eslint/doctrine/issues/156 explained the use case and how JSDoc supports the syntax they were proposing. In my last comment, I asked for information showing how JSDoc works with this change. This is a JSDoc parsing tool, so the justification needs to be about JSDoc, not Flow or TypeScript.
If you'd like to provide an example JSDoc comment that makes use of this change, and explain how JSDoc handles using boolean literals instead of boolean, I'll be happy to evaluate this further.

Ok. Here is is a less contrived example:
/**
 * @param {{ok: true, data: string} | {ok: false, error: Error}} result
 */
function handleResult(result) {
  if (result.ok) {
    print(result.data);
  } else {
    throw result.error;
  }
}

And does that work with JSDoc without error?
If yes, please add that code in a unit test.

@nzakas Thanks for getting back to me on this. I've updated the PR with a unit test that uses that complex type.

What is the next step here?

Sorry, lost track of this. It looks good. I'll merge it and cut a new release.

Thanks @nzakas


Add examples of routes with database interactions

At the moment there are no database interactions besides the connecting and disconnecting of prisma at startup/shutdown.
I can do this issue if I'm assigned it.

Sounds good! We should include some sample endpoints for the initial user model as well as the pydantic models for the User model in prisma.

Thanks


Could not determine MIME type of '{self.filename}' with tempfile.NamedTemporaryFile

Prerequisites
Mindee library raises raise MimeTypeError(f"Could not determine MIME type of '{self.filename}'") when being used with tempfile.NamedTemporaryFile.
f = tempfile.NamedTemporaryFile()

# Some TMP file magic happens here

mindee_client = Client(api_key=self.config.MINDEE_API_KEY.get_secret_value())
input_doc = mindee_client.doc_from_bytes(f.read(), f.name)

Description
The problem is caused by the usage of library mimetypes which relies on file extensions when trying to guess MIME of file. However, temporary name, available in NamedTemporaryFile  doesn't contain the file extension, hence, mimetypes can't guess MIME.
Solution
There are two solutions:

To create an additional optional argument in doc_from_bytes() function accepting MIME types sent there manually.
To switch to magic library, based on libmagic. It can guess MIME pretty well using binary signatures of different types of files. It creates extra dependencies for developers since it requires libmagic to be installed on the computer.

However, guessing MIME from the file extension is not an optimal way to define correct MIME since sometimes users upload, for example, PNG files with .jpg extension and it will cause errors.

I'll look into doing this the proper way, without relying on the extension.
As a quick and dirty workaround, you can do something like f.name + ".pdf".
The server does a in-depth check of the file (without relying on the extension).
In the library we are mainly trying to avoid you the pain of having to wait for the server's response for something that can be easily avoided.

Thank you for your response, @ianardee, that's what I've indeed done, but was thinking that sharing this case may help to come up with some new good ideas for Mindee lib ✌

Since the detection of mime types is notoriously unreliable when only reading a file's content, and since most python mime type libraries rely on the name of the given files, we don't consider this to be an active issue.
That said, anonymous files containing a valid PDF tag should be properly identified when using the fix_pdf parameter during input creation (see #190).


fn start gives two mount warnings

❯ fn start
mount: permission denied (are you root?)
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
mount: permission denied (are you root?)

time="2017-08-14T18:11:34Z" level=info msg="datastore dialed" datastore=sqlite3 max_idle_connections=256

      ______
     / ____/___
    / /_  / __ \
   / __/ / / / /
  /_/   /_/ /_/

time="2017-08-14T18:11:34Z" level=info msg="Serving Functions API on address `:8080`"

Things still work, but the two (duplicate) warnings are jarring...

@carimura Can you clarify which docker you tested this with on mac? Using the current docker on mac (with xhyve), I don't get these errors. I'm curious if this was fixed or if you're running boot2docker or something like that. I see:
mattstep-mba:fn mattstep$ ~/go/bin/fn start
INFO[0000] datastore dialed                              datastore=sqlite3 max_idle_connections=256
INFO[0000] no docker auths from config files found (this is fine)  error="open

/Users/mattstep/.dockercfg: no such file or directory"
INFO[0000] available memory                              ram=2147483648
        ______
       / ____/___
      / /_  / __ \
     / __/ / / / /
    /_/   /_/ /_/
        v0.3.153

INFO[0000] Serving Functions API on address `:8080`

hmm... @mattstep
/tmp
❯ docker --version
Docker version 17.09.0-ce, build afdb6d4

/tmp
❯ fn start
mount: permission denied (are you root?)
Could not mount /sys/kernel/security.
AppArmor detection and --privileged mode might break.
mount: permission denied (are you root?)
time="2017-10-13T05:45:02Z" level=info msg="datastore dialed" datastore=sqlite3 max_idle_connections=256
time="2017-10-13T05:45:02Z" level=info msg="no docker auths from config files found (this is fine)" error="open /root/.dockercfg: no such file or directory"
time="2017-10-13T05:45:02Z" level=info msg="available memory" ram=1601916928

        ______
       / ____/___
      / /_  / __ \
     / __/ / / / /
    /_/   /_/ /_/
        v0.3.153

time="2017-10-13T05:45:02Z" level=info msg="Serving Functions API on address `:8080`"

@mattstep looks like you're running the binary directly, not the docker container.

@treeder That makes a difference. Alright, I can reproduce this now.

because dind image is run without --privileged flag, so mounting /sys/kernel/security fails?
cli start.go still refers to funcy/functions (should that be fnproject/functions?), which possibly has a script somewhere like below?
https://github.com/moby/moby/blob/master/hack/dind

No longer the issue on Mac with Fn CLI version 0.4.30:
fn start
time="2017-12-18T11:09:37Z" level=info msg="started tracer" url=
time="2017-12-18T11:09:37Z" level=info msg="datastore dialed" datastore=sqlite3 max_idle_connections=256
time="2017-12-18T11:09:37Z" level=info msg="no docker auths from config files found (this is fine)" error="open /root/.dockercfg: no such file or directory"
time="2017-12-18T11:09:37Z" level=info msg="available memory" availMemory=10844198093 cgroupLimit=9223372036854771712 headRoom=1204910899 totalMemory=12049108992
time="2017-12-18T11:09:37Z" level=info msg="sync and async reservations" ramAsync=8675358475 ramAsyncHWMark=6940286780 ramSync=2168839618
time="2017-12-18T11:09:37Z" level=info msg="Fn serving on `:8080`" type=full

        ______
       / ____/___
      / /_  / __ \
     / __/ / / / /
    /_/   /_/ /_/
        v0.3.243

confirmed, those errors are gone. there are some new Docker ones that I think someone pointed out:
❯ fn start
can't create unix socket /var/run/docker.sock: device or resource busy
time="2017-12-18T16:35:50Z" level=info msg="started tracer" url=
time="2017-12-18T16:35:50Z" level=info msg="datastore dialed" datastore=sqlite3 max_idle_connections=256
time="2017-12-18T16:35:50Z" level=info msg="no docker auths from config files found (this is fine)" error="open /root/.dockercfg: no such file or directory"
time="2017-12-18T16:35:50Z" level=info msg="available memory" availMemory=1509670912 cgroupLimit=9223372036854771712 headRoom=268435456 totalMemory=1778106368
time="2017-12-18T16:35:50Z" level=info msg="sync and async reservations" ramAsync=1207736730 ramAsyncHWMark=966189384 ramSync=301934182

        ______
       / ____/___
      / /_  / __ \
     / __/ / / / /
    /_/   /_/ /_/
        v0.3.243

time="2017-12-18T16:35:50Z" level=info msg="Fn serving on `:8080`" type=full

there are no more warnings, only info log lines, this issue is closed


scripts: Add dt_compat_any_has_prop_val function

Add dt_compat_any_has_prop_val kconfig preprocessor function.

hi @tejlmand thanks for your interest in this PR, I haven't had a chance to return to it yet, I will eventually, but it's a lowest priority type of thing for me

but it's a lowest priority type of thing for me

No problem, just pinged because it would not be the first time I experienced people forgetting to do a push after making the changes locally :smile:

@tejlmand can you revisit


Statistics with Julia from the ground up | Workshop | JuliaCon 2021

---
Title: Statistics with Julia from the ground up | Workshop | JuliaCon 2021
Speaker: Yoni Nazarathy
Link: https://youtu.be/IlPoU5Yr2QI
Code_Repo: https://github.com/yoninazarathy/JuliaCon2021-StatisticsWithJuliaFromTheGroundUp
Related:
  - Title: Introduction to Julia with a focus on statistics (in Hebrew) | Yoni Nazarathy | JuliaCon 2022
    Link: https://youtu.be/2Dn9XbqKfGo
---

0:00 Intro Music
0:23 Welcome!
0:52 Housekeeping and Installation Instructions
4:10 Starting a Notebook
7:14 Related Resources
8:48 TOC and Workshop Setup
17:14 Interlude for Questions
18:06 Using the REPL
21:44 Interlude for Questions
22:17 Why Julia?
24:29 Ways to Run Julia - Pluto, IDE...
26:33 Key Resources
30:50 Interlude for Questions
34:43 What Do You mean? with Multiple Dispatch
1:05:22 Interlude for Questions
1:12:00 What Do You mean? with Broadcasting and Data Structures
1:34:12 Interlude for Questions
1:39:29 Something rand - The Monty Hall Problem
2:01:23 Interlude for Questions
2:07:38 Do You Still Miss R? So Just RCall
2:13:24 Some Plots
2:34:48 Interlude for Questions
2:40:53 Examples - Union Types, Basic Inference...
2:57:57 Conclusion and Final Questions
2:59:43 Outro Music

:warning: "Your favourite Distribution", "We love DataFrames", "Basic Machine learning" were not covered; sections 8 and 9 were briefly shown in the examples near the end

Added, thank you!


Mitigate parallel pull issues

Attempting to find a solution for the errors people keep getting during parallel pulls.
The fix itself is probably bit controversial. I'm fine of doing this with another layer of synchronization around image extraction or moving the current lock mechanism outside of Register function.
What I think is going on:

layer is downloaded
download is over, pool is released but layer is not in the graph but waits its parent layers to finish.
another pull downloads the same layer
layer is added to the graph
now the parents of the first download finish. first layer is added to the graph but fails because it is already there.

pre-1.7.1 did not have locks in graph.Register so these calls could have happened in very unpredictable way, most likely failing in a driver call. After 1.7.1 there is a layer ID based lock in graph.Register but you still get an error if you attempt to run it twice for same ID.
As a bonus, there is a defer check in graph.Register that removes the image in case of an error. So when this multiple insert happens the second image actually removes the first one, possibly breaking a pull that was already successful?
All this is just an assumption from looking at the code and error logs from other people. Haven't been able to reproduce the bug nor validate the fix.
cc @stevvooe
Signed-off-by: Tonis Tiigi<EMAIL_ADDRESS>

Other way to look at this is that the download return channel is buffered. It probably shouldn't but it has a comment that it fixes some issue.

cc @docker/distribution-maintainers

I moved the ReadCloser change to #15735 to keep this on topic. Also added locking to graph.GetDigest.
Please note that this is far from perfect. Layers can be still downloaded twice when there is no actual need for it. But it may be small enough change that we feel comfortable with adding it to v1.8.2.

@tonistiigi LGTM.
Let's take an action item to see if can test for a fix to https://github.com/docker/docker/issues/9718.

@vbatts PTAL

@rhvgoyal PTAL

I have a report of this problem in
https://bugzilla.redhat.com/show_bug.cgi?id=1252421
They have reported that this pull request fixes the problem for them.

I can confirm the issue was gone on docker-1.7.1 + devicemapper driver applying the following patch:
diff --git a/graph/graph.go b/graph/graph.go
index f305622..28ab1f4 100644
--- a/graph/graph.go
+++ b/graph/graph.go
@@ -154,6 +154,10 @@ func (graph *Graph) Register(img *image.Image, layerData archive.ArchiveReader)
        // this doesn't mean Register is fully safe yet.
        graph.imageMutex.Lock(img.ID)
        defer graph.imageMutex.Unlock(img.ID)
+
+        if graph.Exists(img.ID) {
+               return nil
+       }

        defer func() {
                // If any error occurs, remove the new dir from the driver.
@@ -164,11 +168,6 @@ func (graph *Graph) Register(img *image.Image, layerData archive.ArchiveReader)
                }
        }()

-       // (This is a convenience to save time. Race conditions are taken care of by os.Rename)
-       if graph.Exists(img.ID) {
-               return fmt.Errorf("Image %s already exists", img.ID)
-       }
-
        // Ensure that the image root does not exist on the filesystem
        // when it is not registered in the graph.
        // This is common when you switch from one graph driver to another

@tonistiigi need rebase :/

@LK4D4 done

@spinolacastro Thank you for the confirmation.
LGTM, once again. Also confident this close #9718.

LGTM


test: fix ability to use posargs with tox

Description
reverts a change from #4725 that prevents the ability to invoke tox with tox -- some/path
@Czaki, let me know what the original rationale was for that and maybe we can figure something out that works for both cases

as you may see with this changes the test fails because oof presence of --skip-examples. The reason is explained in conftest.py

Ok thanks, let’s use an alternative way to skip the examples then.  Will add to this pr

updated.  I've never really liked the fact that the async markers required running all of the tests.  I consider that a "broken feature" and not one we should emulate.  Since this is only skipping a single module, I used a module skip approach


error when using node-canvas alpha.8

my package.json versions
"canvas": "2.0.0-alpha.8"
"chart.js": "^2.7.1",
"chartjs-node": "^1.6.0",

When using "canvas": "^2.0.0-alpha.2", node-chartjs works like a charm, when using "canvas": "^2.0.0-alpha.8", item is null in acquireContext so item.length errors in platform.dom.js
	acquireContext: function(item, config) {
		if (typeof item === 'string') {
			item = document.getElementById(item);
		} else if (item.length) {
			// Support for array based queries (such as jQuery)
			item = item[0];
		}

		if (item && item.canvas) {
			// Support for any object associated to a canvas (including a context2d)
			item = item.canvas;
		}

		// To prevent canvas fingerprinting, some add-ons undefine the getContext
		// method, for example: https://github.com/kkapsner/CanvasBlocker
		// https://github.com/chartjs/Chart.js/issues/2807
		var context = item && item.getContext && item.getContext('2d');

		// `instanceof HTMLCanvasElement/CanvasRenderingContext2D` fails when the item is
		// inside an iframe or when running in a protected environment. We could guess the
		// types from their toString() value but let's keep things flexible and assume it's
		// a sufficient condition if the item has a context2D which has item as `canvas`.
		// https://github.com/chartjs/Chart.js/issues/3887
		// https://github.com/chartjs/Chart.js/issues/4102
		// https://github.com/chartjs/Chart.js/issues/4152
		if (context && context.canvas === item) {
			initCanvas(item, config);
			return context;
		}

		return null;
	},

Can someone please help me and tell me what im doing wrong?

same problem for me :
"canvas": "2.0.0-alpha.11",
"chart.js": "^2.7.2",
"chartjs-node": "^1.6.1",
error :
Unhandled rejection TypeError: Cannot read property 'length' of null
    at Object.acquireContext (/Users/xxx/Documents/xxx/Docker/xxx/node_modules/chart.js/src/platforms/platform.dom.js:340:19)
    at Chart.construct (/Users/xxx/Documents/xxx/Docker/xxx/node_modules/chart.js/src/core/core.controller.js:79:27)

Mac OS X 10.13.3, node v8.9.3

Same problem for me tried 2.0.0-alpha.8?
Any solutions or fixes to this would be great.

which platform Windows or Linux

I have also got the error in windows platform but when I used Ubuntu it works fine. I got an error in windows after installation of canvas 2.0.0-alpha.13
xyz\node_modules\bluebird\js\release\async.js:61
        fn = function () { throw arg; };
                           ^

TypeError: Cannot read property 'length' of null
at Object.acquireContext (E:\app_server\node_modules\chart.js\src\platforms\platform.dom.js:340:19)
at Chart.construct (E:app_server\node_modules\chart.js\src\core\core.controller.js:79:27)
at new Chart (E:\app_server\node_modules\chart.js\src\core\core.js:42:8)
at jsdom.envAsync.then.window (E:\app_server\node_modules\chartjs-node\index.js:106:31)
at tryCatcher (E:\app_server\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (E:\app_server\node_modules\bluebird\js\release\promise.js:512:31)
at Promise._settlePromise (E:\app_server\node_modules\bluebird\js\release\promise.js:569:18)
at Promise._settlePromise0 (E:\app_server\node_modules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (E:\app_server\node_modules\bluebird\js\release\promise.js:693:18)
at Promise._fulfill (E:\app_server\node_modules\bluebird\js\release\promise.js:638:18)
at Object.done (E:\app_server\node_modules\bluebird\js\release\nodeback.js:42:21)
at process.nextTick (E:\app_server\node_modules\jsdom\lib\jsdom.js:320:18)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

still not resolved :(
I am getting the same in osx 10.12.6

I am suffering the same issue.

"canvas": "^2.0.1",
"node-gyp": "^3.8.0",
"chartjs-node": "^1.7.1",
OS: Windows
Node version: 8.9.4

Is this repo alive or was it abandoned? I see there was a time since last commit

Also getting this same issue on Windows with any version of chartjs-node other than alpha2. Is there any fix for this?

@tudorific the only way I was able to fix it was to downgrade canvas to a 1.6.x version. It is not working with canvas 2.x versions

@gonnza thanks! I ended up downgrading to canvas 1.6.13 and that is working just fine. Thanks for the input, that definitely helped me out! :)

bump, also having this problem with canvas 2.x, but resolves with older versions. Any updates on why this is happening with recent versions?
The error is: "Unhandled rejection TypeError: Cannot read property 'length' of null".

node: 8.11.3
chartjs-node: 1.7.1
chart.js: 2.7.3
canvas: 2.3.1
OS: Mac 10.14.2

Any better solutions than just downgrading the canvas version?


pep8 compliance

I did small changes to keep the code pep8 compliant

[Current coverage][cc-pull] is 85.21%

Merging [#54][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master        #54   diff @@
==========================================
  Files            19         19
  Lines           568        568
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            484        484
  Misses           84         84
  Partials          0          0

[][cc-pull]

Powered by Codecov. Last updated by 80dc4f0
[cc-base-branch]: https://codecov.io/gh/ntucllab/libact/branch/master?src=pr
[cc-pull]: https://codecov.io/gh/ntucllab/libact/pull/54?src=pr

I've created a branch from your commit and initiated a .pylintrc here:
https://github.com/ntucllab/libact/tree/chkoar-pep8
Maybe it is necessary to add a pre-commit hook (https://github.com/sebdah/git-pylint-commit-hook)


Add HandshakeCertificates constructor from privateKey and certificates

https://github.com/square/okhttp/issues/7886
example code about suggest

OkHttp is very particular about our public API.  But also about security, what concerns me about this is us providing an implementation of X509KeyManager.  We are not cryptographers.
If we already expose the right hooks to make this possible for others to do, then I think that's the right API for us.
Your PR shows it is.  I'd suggest you publish this as a library on top of OkHttp, but it's not something we will put in the core library.  As it is, you still need to know to use this, presumably on BC Provider. There are other examples where we've decided not to implement the functionality, and @swankjesse has provided a gist instead, this feels like a similar one.
Are you blocked on this, does it need to be in the core library?

There is no special reason it should be in the core library. it was just for comfy.
Arbitrarily Implementating of X509KeyManager could be dangerous.
so, I agree with you. i'll close it


Datetime Regex breaks for Australian Postcodes

In the base initializer, the if statement using a RegEx to check whether attribute_value is a DateTime evaluates to true for simple number e.g. '5022', causing an ArgumentError: invalid date if passed such a number e.g. an Australian postcode.

This has already been fixed in Flexirest, my fork of ActiveRestClient (as the original author, ARC wasn't being maintained so I forked it). It's interface compatible (just grep replacing ActiveRestClient with Flexirest, and clear your cache). https://github.com/andyjeffries/flexirest

https://github.com/andyjeffries/flexirest/blob/master/Migrating-from-ActiveRestClient.md

Thanks Andy!
Do you have any plans to improve the authentication system? I'm trying to work with tokens stored as sessions to authenticate my api, but of course you can't access session data from models.

I don't have any plans to enhance it like this, for the reason that there's enough stuff built in.
For example, in your case if you store a token in your session, I would do something like this (untested, but in theory it should work):
class BarnabyBase < Flexirest::Base
  cattr_accessor :token
  before_request do |name, request|
    if self.token.present?
      request.headers["X-Custom-Authentication-Token"] = self.token
    end
  end
end

class MyResource < BarnabyBase
  get :whatever, '/whatever'
end

class MyResourceController < ApplicationController
  before_filter :set_api_token

  private

  def set_api_token
    BarnabyBase.token = session[:api_token] if session[:api_token].present?
  end
end

The API already has functionality for handling authentication with username/password (https://github.com/andyjeffries/flexirest#basic) and api-auth (https://github.com/andyjeffries/flexirest#api-auth), along with the ability to fiddle with any request before sending them out using before_request (https://github.com/andyjeffries/flexirest#using-filters) and potentially using proxies (https://github.com/andyjeffries/flexirest#proxying-apis), but breaking the separation between model and sessions isn't something I want to do.

Thanks, that's really helpful!


Remove dead code from data_download.py

@bitfort this PR and #78 make the download script TF independent. Any objections?

@tremblerz Please tag me in the PRs otherwise I don't see them.
Can you re-run the download script and paste the log here for verification?

Thanks @ddkang.
Here is the link for log generated few hours ago.

@bitfort as far as I can tell, the dead code and TF specific code isn't necessary, so I'll go ahead and approve these commits in on Wednesday unless there are objections

@deepakn94 can you approve this commit?


GitHub-Issue#2778: Added CloudWatchLogs Buffer, ThresholdCheck, and ClientFactory utilities.

Description
This change contains the Buffer, ThresholdCheck, and ClientFactory implementations for the CloudWatchLogs Sink. It provides to add ability for threshold checking, AWS Client Interfacing and customer support for threshold checks.
Issues Resolved
This PR will work towards resolving CWL-Sink for Data-Prepper [Issue https://github.com/https://github.com/opensearch-project/data-prepper/issues/2778]
Link: https://github.com/opensearch-project/data-prepper/issues/2778#issue-1731228391
Check List

[x] New functionality includes testing.
[x] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@MaGonzalMayedo , This looks good. There are currently checkstyle errors:
Error: eckstyle] [ERROR] /home/runner/work/data-prepper/data-prepper/data-prepper-plugins/cloudwatch-logs/src/test/java/org/opensearch/dataprepper/plugins/sink/buffer/InMemoryBufferFactoryTest.java:11:36: Using the '.*' form of import should be avoided - org.hamcrest.Matchers.*. [AvoidStarImport]
Error: eckstyle] [ERROR] /home/runner/work/data-prepper/data-prepper/data-prepper-plugins/cloudwatch-logs/src/test/java/org/opensearch/dataprepper/plugins/sink/client/CloudWatchLogsClientFactoryTest.java:27:15: Unused import - org.hamcrest.Matchers.notNullValue. [UnusedImports]


#913 SQL Server variable assignment in a select does not parse | SELECT @var = 1

This fixes #913 but breaks SelectTest.testMultiPartNamesIssue608().
Unfortunately, I don't know JavaCC enough to fix both.
My test works: SELECT @var = 1
but it breaks SELECT @@sessions.tx_read_only

The function is integrated, but not with your pull request.


Prepare release for Wasmi v0.37.0

The failing miri job is because of the usual timeout. We should fix this CI job some time soon.


Add snapshot testing for lib

Discussed in https://github.com/rust-practice/cargo-leet/discussions/47

Originally posted by c-git July 21, 2023
Once we've stabilized a bit more on the output we should add snapshot testing to ensure changes don't break output. Proposed create is https://docs.rs/insta/latest/insta/

Just set this up on another project I'm working on and super happy with insta. Happy to help with getting this setup, it's not too hard it's probably a good beginner task. I may need to do it at some point but for now it can wait. Some of our current test are suitable for replacement as snapshot tests as well. So that's also an exercise that needs to be done (separate?)


Virtual disk right click open bash shell do not change the correct dir

Your Windows build number:  (Type ver at a Windows Command Prompt)
10.0.17686.1003
What you're doing and what's happening:  (Copy&paste specific commands and their output, or include screen shots)
Virtual disk right click open bash shell do not change the correct dir

other disk work perfect

Are you able to navigate to this drive in WSL normally?

@benhillis yes

Thanks for reporting. This is a duplicate of #3246, for which I have a fix pending.

This should be fixed in Insider Build 17713


Compiler warnings

Remove any compiler warnings. Please post any compiler warnings you see in this thread!

qml/ml/representations/ffchl_module.f90:275.36:
& t_width, d_width, cut_distance, order, pd, ang_norm2, &
1
Warning: Unused dummy argument 'cut_distance' at (1)

TravisCI gives the following problem:
/home/travis/build/qmlcode/qml/docs/source/qml_examples/examples.ipynb:`` WARNING: Pygments lexer name u'ipython3' is not known
We should move building the docs to the Python 3.6 build IMO.


Post count issue when there's a poll and more than 1 page.

"assert int(reply_cnt) == self.replies" in Thread class throws exception whenever a thread has more than 1 page and there is a poll.

Confirmed, waiting for poll implementation first before being able to fix.

Fixed.


documentation unclear

The readme states
@NgModule({
  imports: [
    StoreModule.provideStore(rootReducer),
    // Note that you must instrument after importing StoreModule
    StoreDevtoolsModule.instrumentStore({
      maxAge: 5,
      monitor: monitorReducer
    })
  ]
})

however I have no idea where you go the monitorReducer from.
Also I'm using (maybe due to old code) 'providers: []' to get init the store.

monitorReducer is a reducer function for containing a monitor component's state. See @ngrx/store-log-monitor for an example monitor.
The preferred way to use the devtools now is using the Chrome extension. I've updated the README with instructions.

perfect, that is much better


chore: Make travis run eslint first and fail immediately if needed

Should fix #632.
Due to https://github.com/travis-ci/travis-ci/issues/1066, the solution is not as simple as inverting the two lines.
Instead, I made the script a one liner that runs eslint before coverage.
This is not tested as I don't want to create a fake & bogus PR :/

Coverage remained the same at 39.398% when pulling f220e970ffe1fd0731f53f3e83172b45d21929c7 on machour:travis-fail-fast into ef2dd1d89caab3c14138cfd87e1b3e8a8cf87a91 on gitpoint:master.

@machour We can learn something from a project I played recently. My PR failed in the lint stage first, and no coverage task was triggered.

Oh, thank you for that! If I understand correctly, they split the various checks across different jobs, and job support stopping on failure.
Notice how prettier was still ran even if eslint failed there? (same problem as described here)


Markdown in issue description isn't parsed

If there is any Markdown syntax in the issue description, it doesn't get parsed in the app i.e. it is displayed in plain text.

(e.g. it should look like this: subject says "in two days", content says "two days ago")

Thanks for the feedback.
I will work on that for the next release, i want to highlight, and display images, etc...
Thanks.

You're welcome. I'm looking forward to it!


Recoil System Controll not working

RCS not working how to fix this?

@danielkrupinski Close it :heartbeat:


Global viewmodel helper

(Thanks for this addition to Meteor! The first day after discovering this, I was flying :) I actually searched for "meteor viewmodel", because I thought there had to be some MVVM library for Meteor – and yours is even simpler and more powerful than what I thought I was looking for.)
Can you tell me whether I'm working an anti-pattern here?
Inside sub-templates, I am able to write data-bind attributes and have them picked up by the closest overlying viewmodel – however, I can't use the viewmodel properties as Spacebars helpers without passing them through to the sub-template as named params.
Instead of doing that, I'm thinking of registering a global helper vm which returns the closest overlying viewmodel of the current template instance.
Is there a reason you haven't included such a helper in the library?
It would solve the need for even registering specific vm props as helpers – they could just be gotten through {{vm.myProp}}. The code is straight-forward (in this example using the parent() method from aldeed:template-extension, but that part could easily be copied):
Template.registerHelper("vm", function () {
  var instance = Template.instance();

  do {
    if (instance.viewmodel)
      return instance.viewmodel;
  }
  while (instance = instance.parent());
});

I have to do a few tests but if it works the way I think it does then it's a great idea and I'll change the way I define helpers.

Now that I think of it, I'm questioning the wisdom of forcing you to
specify which properties are available as helper methods. I think I should
just add all properties as helper methods automatically and be done with
it. That way we don't need the global helper or specifying which properties
are helpers.
On Aug 10, 2015 3:22 AM, "Kristian Dalgård"<EMAIL_ADDRESS>wrote:

(Thanks for this addition to Meteor! The first day after discovering this,
I was flying :) I actually searched for "meteor viewmodel", because I
thought there had to be some MVVM library for Meteor – and yours is much
simpler and more powerful than I had even wished for.)
Can you tell me whether I'm working an anti-pattern here?
Inside sub-templates, I am able to write data-bind attributes and have
them picked up by the closest overlying viewmodel – however, I can't use
the viewmodel properties as helpers without passing them through as
template params.
Instead of doing that, I'm thinking of registering a global helper vm
which returns the closest overlying viewmodel of the current template
instance.
Is there a reason you haven't included such a helper in the library?
It would solve the need for even registering specific vm props as helpers
– they could just be gotten through {{vm.myProp}}. The code is completely
straight-forward – in this example using the parent() method from
aldeed:template-extension, but that part could easily be copied.
Template.registerHelper("vm", function () {
var instance = Template.instance();
do {
if (instance.viewmodel)
return instance.viewmodel;
}
while (instance = instance.parent());
});
—
Reply to this email directly or view it on GitHub
https://github.com/ManuelDeLeon/viewmodel/issues/81.

I may have misunderstood you. Can you post an example of how you use that helper?

I think you understood me perfectly. And I agree with you, all properties should be registered as helpers by default – if developers really want to be able to distinguish between Blaze helpers and viewmodel properties, then choosing different names is a more than fair requirement.
That point being clear, we still face the problem of template helpers not being inherited by sub-templates without passing them as template param. This is the main reason for making my global vm helper returning the closest viewmodel, if it exists.

Now I get it.
My initial reaction is that I don't think that's a good idea... being able to bind to properties which you don't know when/where/if they're created. I can imagine having a WTF moment after seeing data-bind: "value: name" and name nowhere to be found on the view model.
As it stands, ViewModel almost forces you to create your application in small modular and independent components. That's makes the code easy to navigate and reason about. Allowing that kind of inheritance breaks all that.
I know I'm not giving you fact-based reasons (it's more of a feeling) but it has a strong smell. I may change my mind though.
btw, why do you want/need this? What is the scenario you have in mind?

We're pretty much still talking about the overview/filter example from the other thread, which is the case that I'm trying ViewModel out on. I think it's a sensible scenario – the sub-template has internal view state but also produces some value that is read by the super-template. It applies to everything from individual form controls to pagination widgets and whole filter panels.
Smells are important. On the other hand, I submit that Angular has interaction between nested controllers all the time (don't get me wrong, there's a reason why I'm not simply using Angular).
The whole issue is how the data from the child template's viewmodel is best used within the parent's viewmodel.
Having the child write to the parent probably is sort of upside down. The reason why I'm thinking that way, I believe, is that putting data-bind= attributes inside sub-templates worked totally fine – up until the point where the sub-templates got its own viewmodel. Then the value went missing from the parent's viewmodel, and for a good reason.
For maximum stringency in developer's use of ViewModel, data-bind= attributes inside sub-templates probably shouldn't be parsed attributes at all. The only way of getting data out, then, would be one of the options discussed in the other thread:
https://github.com/ManuelDeLeon/viewmodel/issues/82

Just to be clear, I still think adding all properties as helper methods automatically is a really good idea :+1:

I would happily make a pull request that adds all properties as helper methods, but this kind of API change belongs to the next major version, and I'm not sure how you plan to handle the move to 2.0.0.

adds all properties as helper methods, but this kind of API change belongs to the next major version

Yeah, that feature is a v2 thing because it changes the way ViewModel works.

The whole issue is how the data from the child template's viewmodel is best used within the parent's viewmodel.

There are many ways of dealing with this kind of situation and I'm very happy that ViewModel allows you to choose the one you're most comfortable with. For example, the way this is done in React is by passing a function to the child, the child then invokes the functions with whatever parameters it wants and the parent would then update its state.
The same can be done with ViewModel and it takes it one step further. Instead of passing a function that will only serve to update a property, you can pass the parent's property itself.

I guess having the child write on the parent is sort of upside down.

The fancy term for it is "Inversion of Control".

data-bind= attributes inside sub-templates probably shouldn't be parsed at all.

What do you mean?

I guess having the child write on the parent is sort of upside down.

The fancy term for it is "Inversion of Control".

I'm not sure I agree. Inversion of control – "don't call us, we'll call you" – is somewhat synonymous with dependency injection.
By my logic, this means that the child should never have to call the parent (which might not exist), the parent should call the child (which definitely exists).

data-bind= attributes inside sub-templates probably shouldn't be parsed at all.

What do you mean?

You mentioned it yourself – inheritance breaks encapsulation. In the case of viewmodels, sub-templates will inherit their parent's viewmodel simply by getting parsed by the ViewModel initialized on the overlying template. The parsing of data-bind= attributes on sub-templates currently happens by default unless the sub-template has its own viewmodel.
Besides being a bit confusing, this creates a discrepancy when the properties of the overlying template's viewmodel can be used as helpers on the overlying template, but are not present on the sub-template (since this is how Blaze works), where they may be every bit as justified.
This discrepancy can only be lifted by not parsing the elements of embedded templates in the first place.

I'm not sure I agree.
Inversion of control – "don't call us, we'll call you" – is somewhat synonymous with dependency injection. Now, the child should be able to stand alone as a unit in itself and live without any inferred dependencies – whereas a parent always knows about it's children.
By my logic, this means that the child should never have to call the parent (which might not exist), the parent should always call the child (which definitely exists).

It's an inversion of control because the parent template doesn't "use" the components, it merely instantiates them. It's the children/components the ones that use the parent in the form of calling its methods and setting its properties.

The parsing of data-bind= attributes on sub-templates is happening by default – except when the sub-template has its own viewmodel

If I understand you correctly then this is 100% intentional and by design. If you have a data-bind in a template then that template should have a view model.

If you have a data-bind in a template then that template should have a view model.

Exactly my point – that template ought to have been given its own viewmodel. Of course, developers can't be trusted to remember these best practices, which is why ViewModel shouldn't parse data-bind= attributes on sub-templates in the first place.

It's the children/components the ones that use the parent in the form of calling its methods and setting its properties.

I guess maybe both our points could be valid in regard to inversion of control. Nevertheless, I still think I made a good argument about the dependency relationship of parent/child.

After debating this with my colleagues, I'm leaning towards an IoC-like pattern, where the parent template instantiates the child template and, in that process, passes a reference to the property on the parent that should be read or written to.
This is pretty much exactly what you are doing in the first part of this example – you pass the actual attribute by reference in a round-about way required by Blaze. In the second part, you use a predetermined property name, which might also have been passed in as a string:
<template name="myOverview">
  {{> myFilter bindTo='filter'}}
</template>

<template name="myFilter">
  <input type="text" data-bind="{{#if bindTo}value: parent.{{bindTo}}{{/if}}">
</template

Exactly my point – that template ought to have been given its own viewmodel. Of course, developers can't be trusted to remember this best practice – which leads me to conclude that ViewModel shouldn't parse data-bind= attributes on sub-templates at all.

Ahhh, I can now say with confidence that I get your point. Sorry it took so long. This is something I've been trying to do since day 1 but Blaze doesn't allow it. I can't just parse the elements of one template. Blaze forces me to parse the template and all its children. So for now we're stuck with this situation where if you put a data-bind on a child template, without a child view model, it will be picked up by the parent. =/

Using the same pattern, the name could also be passed in as a string:

Nice! Got a question though, why the {{#if bindTo}}? Seems to me that the component will need to be bound to something (making the if kinda pointless).
Either way, it's a great use of parent. I now have a few more patterns to use:
<template name="one">
  {{> two }}
</template>

<template name="two">
  <input data-bind="value: parent.name">
</template>

Template.one.viewmodel({
  name: ''
});

Template.two.viewmodel({

});

And your example:
<template name="one">
  {{> two bindTo="name" }}
</template>

<template name="two">
  <input data-bind="value: parent.{{bindTo}}">
</template>

Template.one.viewmodel({
  name: ''
});

Template.two.viewmodel({

});

Ahhh, I can now say with confidence that I get your point. Sorry it took so long.

Sorry for flooding you project with questions ;) But thanks for taking the time. I think everything comes down to MVVM having some fundamental challenges, in spite of it being a great pattern for UI.
I recognize many of these questions from Knockout and Angular, and it's great being able to discuss them.

I can't just parse the elements of one template. Blaze forces me to parse the template and all its children.

Maybe I'm being naïve, but couldn't you simply check whether the element belongs to the correct template view?
template.$("[data-bind]:not([data-bound])").filter(function () {
  return getClosestTemplateView(Blaze.getView(this)) === template;
});

function getClosestTemplateView(view) {
  do if (view.template) return view;
  while (view = view.parentView);
}

Nice! Got a question though, why the {{#if bindTo}}? Seems to me that the component will need to be bound to something (making the if kinda pointless).

I like being able to insert the widget somewhere without actually binding it. An example would be in a style guide.
Btw, this is GitHub's markdown syntax for syntax highlighting, in case you didn't know :)
```javascript  <-- or html etc.
  var name = function () {};
```

On a theoretical level, I think some of the issues with finding the right pattern has to do with wanting components to be generic while using them in a specialized way...
I feel like I've gotten myself into a quagmire a little too quickly with the IoC/bindTo approach, unfortunately.

It doesn't read well when there are multiple bindings for reading and writing, on top of component settings etc. – {{> myFilter bindTo='filter' bindTextLoadingTo='filterTextLoading' bindDateLoadingTo='filterDateLoading' showDateField=true ...}}

Having to use a factory when creating the viewmodel instead of a nice, declarative object, is a bummer. Setting up the binding also requires boilerplate code, making things more cumbersome and less readable.

I guess I'll go back to passing in data through named parameters and getting out data through this.children().
Then we'll see what consequences it leads to.


ability to output --make-digest result to stdout, or other way to fetch digest from changed remote file

I have been testing blocksync-fast and it has been fantastic so far!  Thank you for all your hard work!
I have run into a use case that is not elegantly handled.  I would like to be able to run a blocksync-fast to an existing (possibly changed) remote file.  I was able to accomplish this by making a digest on the remote side, transferring it to the local side, and using it for my -f switch.  :

Perform an initial clone of the block device to the remote location (with blocksync-fast, rsync, or dd, anything)
The remote location may change (e.g. it gets mounted remotely and changes are made).  OR, the digest file from the initial clone is lost.  OR the initial clone was made with dd, rsync or another tool.
We need an up-to-date digest file of the destination, so  on the remote destination, create a digest file with:  ssh user@remote "blocksync-fast --make-digest -s /dev/vg/dest_vol -f /tmp/vol.digest"
scp vol.digest down to my local device:     scp user@remote:/tmp/vol.digest /tmp/
run blocksync-fast using this digest to undo/rollback any changes on the destination:  blocksync-fast -s /dev/vg/src_vol -f /tmp/vol.digest --make-delta | ssh user@remote "blocksync-fast --apply-delta -d /dev/vg/dest_vol"

If --make-digest could output to stdout, then this could be done with one less step (ie. missing the scp step).  We could replace steps 3 and 4 with:  ssh user@remote "blocksync-fast --make-digest -s /dev/vg/dest_vol -f -" > /tmp/vol.digest
I tried using - as an value to -f switch, but was unable to get a working digest file out of it.. e.g. blocksync-fast --make-digest -f - > digestfile created an invalid digest file without the correct size.  Maybe -f could allow -, or if --make-digest is specified without a -f switch, it could output to stdout (like --make-delta works)?
Hopefully this would be a pretty minor change, if this all makes sense.  Thanks again for this amazing utility!

You understand the idea of the program well. For fast synchronization between remote block devices, you using the Digest file, which is generated locally and sent to the other side.
Of course, the STDOUT functionality for the make-digest operation is easy to implement and I will try to include it as soon as possible.
Out of curiosity, I ask, your use case is restoring a VPS server to a previously saved state from a previously made copy or original image, do I understand correctly?

Hi, the use case for this was actually more for edge cases.   I work at a small hosting company and so I suspect I have all the same unaddressed needs that led you to write bocksync-fast in the first place, so I bet this will sound familiar :)

updating an older backup / clone of a VPS, when the digest file is no longer around.
Even though  I'm expecting to always have my digest file from past runs in normal circumstances (like regular scheduled backups and migrations), there are edge cases and one-offs where sometimes we copy or clone stuff by hand.  For example, maybe we clone a server for a customer and they use it for testing/etc for a while, then need it synced up from their live server (and we didn't save the delta anywhere because it was a one-off operation from a support ticket).

The actual use case I was looking at yesterday was when I accidentally mounted my destination volume in the destination, without using -o ro .  Oops!!!  I realized immediately that my digest was no longer correct, which led me to try the other method (taking the dest digest back to the source).  and of ocurse that worked so well because blocksync-fast is so clever!

I think your approach with blocksync-fast and the ability to save and re-use the digest plus do the deltas, and how it pipes UNIX-style through whatever transport is nothing short of brilliant work.  It's so great!    I also read through the source (I used to code C for work stuff a lifetime or two ago) and it is really tidy and great looking too.  It looks very polished and like you have been using it yourself in production for a quite a while!
Thanks in advanced for adding stdout to the make-digest, it's in no way urgent as it's an edge case thing... It wont' hold me up adding blocksync-fast support to my VM migration scripts and I'm super excited to implement automatic snapshot backups too.

Hi, Your request has been added to version 1.0.6
You can use without -f parameter, then stdout will be default for --make-digest operation:
blocksync-fast --make-digest -s /dev/vg/dest_vol > /tmp/vol.digest
blocksync-fast --make-digest -s /dev/vg/dest_vol | ssh 'cat - > copy_to_another_machine'

so great!  Thank you!!!   I have been doing lots of testing on my end, I've worked blocksync-fast into my VM migration scripts and it is working great, so much faster than when I was using rsync and waiting for the checksum calculation to run before the transfer would start.  I love it!!!!    I'm going to be setting up incremental snapshot backups of VM disks next, using some of the stuff from your scripts folder.
I've come across a couple other small things that I'll make issues for.. they are not urgent fixes any of them.
And some other things I'd like to help with (if you'd like to pursue it)
is getting a man page together and looking at how we'd get this into some OS packaging.  I use Debian for server stuff but also FC40 (actually asahi) and some Manjaro (arch), so I have some skills in those three.
We would probably need a proper champion for each of these distros who can be the package maintainer.   I could definitely take that on for the Debian package, but i'm not a Debian developer (yet) so we'll see.  I can go onto their IRC though and see if I can get someone to sponsor me, once I get a package built.  :-)
Let me know if you're interested in that at all and I can make an issue for tracking it (we can start with a .deb).

I'm really glad that blocksync-fast is useful and works successfully. Any suggestions are welcome and I will try to develop the project to be even more helpful.
Of course, any help in the development of the project is appreciated and contributions will be appreciated. I like your enthusiasm and that you are working on something that you think is good and works great.
You can report minor issues that you come across and I will take care of them.
It would be great to distribute it to various linux packages.
As for packaging, we can start with a .deb package for Debian - it would be a great starting point.
So far I have added every version to the Gentoo distribution to the user-created repository - GURU, but none of the Gentoo developers have merged it into the main branch yet.
I think it will be similar process for every Linux distribution. First you need to make your own packages and add them to the user-created repository appropriate for each distribution.
Something like GURU in Gentoo or AUR in Archlinux.
Then convince the core developers of the system to merge the program into the main branch of the repository.
I personally use Gentoo Linux on Desktop and on various customized solutions, such as my own network routers, Linux servers. I use Archlinux on Laptop. And Debian as Linux systems for standard VPS.


Sorting support

Okay, that will be your next case then.
On Fri, Jun 21, 2019 at 5:32 PM spiresheep<EMAIL_ADDRESS>wrote:

@spiresheep commented on this pull request.
In source/main.tsx
https://github.com/eidolonsystems/clipped_table/pull/16#discussion_r296400963
:

@@ -42,8 +45,8 @@ function changeValues() {
}
}

-setInterval(changeValues, 5000);
+setInterval(changeValues, 200000);
Totally. Please keep in mind SortedTable does not send if a value is
updated (yet) so the table won't stay sorted.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/eidolonsystems/clipped_table/pull/16?email_source=notifications&email_token=AD6MKGO5QDOYIEWR5NNNVALP3VCIHA5CNFSM4H2U4YWKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB4KRS7A#discussion_r296400963,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD6MKGKPJTBB3C2RFLUX64LP3VCIHANCNFSM4H2U4YWA
.

--
Kamal Mansouri
Computer Programmer
+1<PHONE_NUMBER>


Master to Live

Docs Build status updates of commit efd969f:
:clock10: Full build: the average full build time is 12 min(s) 20 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit efd969f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

exchange/exchange-ps/exchange/client-access/Set-OwaMailboxPolicy.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/policy-and-compliance-content-search/New-ComplianceSearchAction.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/policy-and-compliance-ediscovery/Get-ComplianceCase.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/policy-and-compliance-ediscovery/New-ComplianceCase.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/policy-and-compliance-ediscovery/Remove-ComplianceCase.md
:white_check_mark:Succeeded
View (exchange-ps)

exchange/exchange-ps/exchange/policy-and-compliance-ediscovery/Set-ComplianceCase.md
:white_check_mark:Succeeded
View (exchange-ps)

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


add ut for istioctl/pkg/authz/listener_test.go

Please provide a description of this PR:
add ut for istioctl/pkg/authz/listener_test.go
I want to contribute a little code.

Hi @hexiaodai. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/ok-to-test

@hexiaodai: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
29945a163cdd3db3e0d5b8528df39ebab784f5ec
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test release-notes

we tend to defer tests that that don't add much value - and I think this is close to falling into this category. I think a more valuable addition would be testing the top-level Print method which calls extractName from further up in the call stack. istioctl/cmd/authz_test.go is basically an empty file right now. I'll defer approval to @hanxiaop

I agree with @GregHanson. I think the outer Print function is a more proper layer to add tests, or the analyzer, maybe we can add tests to that analyzer like other analyzers.


[Bug]: Setting a status puts cursor in channel (not the modal)

Before you file a bug report

[X] I have checked the issue tracker and have not found an issue that matches the one I'm filing.
[X] This issue is not a troubleshooting question. Troubleshooting questions go here: https://forum.mattermost.com/c/trouble-shoot/16.
[X] This issue is not a feature request. You can request features and make product suggestions here: https://mattermost.com/suggestions/.
[X] This issue doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[X] This issue reproduces on the most recent stable version, or the most recent prerelease version of the Mattermost Desktop App.
[X] I have read the contribution guidelines.

Mattermost Desktop Version
5.4.4
Operating System
macOS 12.1
Mattermost Server Version
No response
Steps to reproduce

Click the profile button, at the top right of app
Click 'Set a Custom status'
Attempt to write a new status

Expected behavior
Typing enters text into the 'set a status' textbox
Observed behavior
The cursor is still set in the channel (not the modal). You are required to re-click the textbox in the modal before typing the status.
Log Output
Not relevant, I believe.

Additional Information
No response

I'll add that I tried to receate this on the browser version (Chrome, macOS) but I couldn't even click any of the top level buttons, so not sure what is going on there.
I can create another bug issue for that if need be too. Thanks!

This is a webapp issue, transferring to that repo.