F* cannot prove this simple statement on lists

Consider this F* code:
module A

let rec elem (#a:eqtype) (i:a) (l:list a)
  : bool
  = match l with
    | [] -> false
    | hd :: tl -> hd = i || elem i tl

let rec concat (#a : Type) (fst : list a) (snd : list a) =
  match fst with
  | [] -> snd
  | hd :: tl -> hd :: (concat tl snd)

let rec join (#a : Type) (li : list (list a)) : (list a) =
  match li with
  | [] -> []
  | hd :: tl -> concat hd (join tl)

let elem_join (aty : eqtype) (a : aty) (xs : list (list aty)) : unit = assert (elem a (join xs) ==> (exists (z : list aty). elem a z /\ elem z xs))

I tried to check it using big fuel and rlimit, but F* still unable to check this:
# X=1000; ~/fstar/bin/fstar.exe --fuel $X --ifuel $X --z3rlimit 1000 --codegen OCaml A.fst
Extracted module FStar.Pervasives.Native
Extracted module A
A.fst(19,71-19,77): (Error 19) assertion failed; The SMT solver could not prove the query, try to spell your proof in more detail or increase fuel/ifuel (see also A.fst(19,100-19,146))
Verified module: A
1 error was reported (see above)

Your statement is nontrivial by the current prover standards :)
module Sandbox

open FStar.List

let rec elem (#a:eqtype) (i:a) (l:list a) : bool
  = match l with
    | [] -> false
    | hd::tl -> hd = i || elem i tl

let rec concat (#a : Type) (fst : list a) (snd : list a) =
  match fst with
  | [] -> snd
  | hd::tl -> hd::(concat tl snd)

let tail (#a:eqtype) (l: list a{length l>0})
  = match l with |hd::tl -> tl

let head (#a: eqtype) (l: list a{l<>[]}) =
  match l with | hd::tl -> hd

let rec concat_lemma (#a:eqtype) (x:a) (p q: list a)
  : Lemma (requires elem x (concat p q) /\ ~(elem x p))
          (ensures elem x q) =
  match p with
  | [] -> ()
  | hd::tl -> concat_lemma x tl q

let rec join (#a : eqtype) (li : list (list a)) : (list a) =
  match li with
  | [] -> []
  | hd :: tl -> concat hd (join tl)

let some_list_lemma (#a:eqtype) (li: list (list a){length li > 0}) (x:a)
  : Lemma (requires elem x (join li) /\ (~(elem x (head li))))
          (ensures (elem x (join (tail li)))) =
          concat_lemma x (head li) (join (tail li))

let rec elem_join (t : eqtype) (a : t) (xs : list (list t))
  : Lemma (requires elem a (join xs))
          (ensures (exists (z: list t). elem a z /\ elem z xs))
  = match xs with
  | [] -> ()
  | h::_ -> if elem a h then () else
          begin
            some_list_lemma xs a;
            elem_join t a (tail xs)
          end

...but if you intend to learn F*, you'll soon get used to such verbosity. I'd say the proof isn't that big anyway.

And if you do want the implication variant of the lemma, that is easily achieved via Classical.move_requires:
let elem_join_impl (t : eqtype) (a : t) (xs : list (list t))
  : Lemma (elem a (join xs) ==> (exists (z: list t). elem a z /\ elem z xs)) =
  (Classical.move_requires_2 (elem_join t)) a xs

Thanks a lot!

Thanks @safinaskar for the question, and @hacklex for chiming in! In general, F* does not provide automatic induction, so induction needs to be setup manually. Closing this issue, please reopen if you have more questions (or join the F* slack and ask there!).


Cannot override BackstageSidebar styles after packages update

Expected Behavior
BackstageSidebar should have merged styles with the ones defined within backstage.
Actual Behavior
BackstageSidebar does not have any styling applied and the layout is malformed.
Steps to Reproduce
Create a style override for BackstageSidebar. Here is an example override:
overrides.BackstageSidebar = {
    ...overrides.BackstageSidebar,
    drawer: {
      ...overrides.BackstageSidebar?.drawer,
      borderRight: 'none',
      boxShadow: theme.shadows[4],
      '& hr': {
        background: 'transparent',
      },
    },
  };

After updating packages, the override above is causing the sidebar not to have any styling applied.
 I think that this commit could be the things that's changed.
https://github.com/backstage/backstage/commit/35b78976e9269b3cb966aca2ccd5d6373aa9648c
Maybe you'll need to provide functions instead now? Not 100% sure.

It was from 1.0.3 to 1.1.1
I've seen this commit, and I tried with providing functions (for the drawer override listed above) before opening this issue. The same problem persists with functions as well 🤔

Hm now I'm wondering if this is actually hitting a MUI bug. Some time back, I remember us struggling like crazy with getting props into styles. Whenever we used prop functions in the styles, sometimes it just plain messed up and stopped doing what it should, at all. Unfortunately I seem to be unable to find the JSS issue or wherever it was, that explained the problem. And it seems to be unfixed since a very very long time back. Maybe MUI5 is the only real fix here ... 🤔

Yeah check this out.
https://github.com/backstage/backstage/pull/10775/files#diff-228bdd0b6adf4855d9d3da007abd163ea5257be38fd779f9b9f884638fd887e1R87
We had to wrap the whole style builder into a memoized thing that got called with the props as input, to circumvent the problem mentioned above. Really annoying. Maybe you could apply the same thing in more places, in that same folder?

@freben I totally missed your reply, sorry. I will try to see if this is fixed after I update my instance version.
You are suggesting doing this for every component within the layout folder (where the styles are used)?


Feature/base tag

My problem and solution:
The application is located on the load balancer at website.com/my-app.
However, when I open the statistics on the page website.com/my-app/stats, the scripts make incorrect requests like website.com/my-app/socket.io/?EIO=3&transport=polling&t=OU-55i8 (without the my-app base path). This problem can be easily solved by adding the base tag with the necessary base path to the web page HTML.
I tested it on my work project.

Thank you!


Bump to 4.2.1

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


Cloudlink credit information

@MikeDev101
Do you or any other cloudlink people want to be listed here, and if so, what names & links should be listed? (scratch.mit.edu links okay, other links may not be)

It should just be my alias, MikeDEV, and should link to the CL repository in Github.


Unable to Use Bluepill Fastlane

I am trying to use Bluepill Fastlane. but seeing below error.
[!] Could not find option 'scheme' in the list of available options: xctestrun, output_dir, app, device, headless, number_of_simulators, reuse_simulator
Could you please take care of this issue,once this issue is resolved it would help us a lot.
@RainNapper @ob @bayareabear @oliverhu

This doesn't look like a bluepill error... are you sure it isn't a fastlane error?

As far as my understanding , its not fastlane error.Based on documentation we have to include scheme and when i am trying to run it is showing above error which is coming from blupill plugin options.The same issue has been reported by some other person too.
Whats your opinion?
@ob

What documentation are you referring to? As far as I know, Bluepill doesn't have a --scheme option, which is what the error message is telling you. If fastlane is passing a --scheme flag (or config option) it should not do that and use --xctestrun instead.

Hi ,
I was following the fast lane  bluepill documentation.There was an option
of scheme and also if I donot specify scheme it says scheme option is
missing.
On Fri, Aug 13, 2021, 12:55 AM Oscar Bonilla @.***>
wrote:

What documentation are you referring to? As far as I know, Bluepill
doesn't have a --scheme option, which is what the error message is
telling you. If fastlane is passing a --scheme flag (or config option) it
should not do that and use --xctestrun instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MobileNativeFoundation/bluepill/issues/505#issuecomment-898190549,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGYJXQ4K7UVWJPZBVFP6XPTT4SQURANCNFSM5A7JXB2A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
.

Hi,
I was following below documentation mentioned under bluepill-fastlane
section.
https://github.com/tbrand/fastlane-plugin-bluepill
On Fri, Aug 13, 2021, 12:55 AM Oscar Bonilla @.***>
wrote:

What documentation are you referring to? As far as I know, Bluepill
doesn't have a --scheme option, which is what the error message is
telling you. If fastlane is passing a --scheme flag (or config option) it
should not do that and use --xctestrun instead.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MobileNativeFoundation/bluepill/issues/505#issuecomment-898190549,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGYJXQ4K7UVWJPZBVFP6XPTT4SQURANCNFSM5A7JXB2A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email
.

I think the problem is with the fastlane plugin... that "scheme option is missing error" is probably coming from here. I'd file an issue (or better yet a PR) in the fastlane-plugin-bluepill repository mentioning that bluepill no longer has an --scheme argument. Passing in the --xctestrun arg should suffice.


Made console confirmations more explicit and helpful

Hi Taylor,
I think these changes here will help the user to understand whats going to happen before they press y/n on the command line tool.
Cheers,

Please send this to 5.0.

I don't see 5.0 listed in the repo. How do I get to it?

It's the master branch. We'll actually be creating a 5.0 branch soon and making the master 5.1 :)


ghc-9.6.1 runtime error

it occurs to me that it's just as likely that the right forum for https://github.com/ndmitchell/hlint/issues/1468 is here.

Fixed in 0.10.22 I think.


chore(release): 0.2.4

:robot: I have created a release beep boop
0.2.4 (2024-08-19)
Bug Fixes

utils: Remove all instances of lookbehind (#41) (3cd4ad9)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.2.4
:sunflower:


OpenVLM leaderboard

Do you have any plan to get involved in OpenVLM leaderboard?
https://huggingface.co/spaces/opencompass/open_vlm_leaderboard
I think that needs some efforts from your side, but given the performance of VILA provides you good visibility.

@oroojlooy sure, we would love to. Our models and inference examples are already released. Any other efforts we need to get involved in the benchmark?

@oroojlooy as a followup, how can we submit vila to the leaderboard?

Hi @Lyken17
Looks like I missed your first message. Just the follow the instruction as mentioned in the page:
OpenVLM Leaderboard only includes open-source VLMs or API models that are publicly available. To add your own model to the leaderboard, please create a PR in [VLMEvalKit](https://github.com/open-compass/VLMEvalKit) to support your VLM and then we will help with the evaluation and updating the leaderboard. For any questions or concerns, please feel free to contact us at [opencompass<EMAIL_ADDRESS>


cmd/govim: add support for fuzzy matching completions

https://go-review.googlesource.com/c/tools/+/190099 has now landed; now we only require the fuzzy matching to be configurable independent of the deep completions.
Asked that question in https://github.com/golang/go/issues/32754#issuecomment-521401719

Closed per #490


is_from failing on pytorch model

is_from method is only looling at the first element of the dependency model.
model = torch.hub.load("chenyaofo/pytorch-cifar-models", "cifar10_resnet20", pretrained=True)
is_from(model, "torch")
# returns False instead of True
# > class_parents = ['pytorch_cifar_models', 'torch', 'object']

It should look at all elements from class_parents and check if torch is in it. Maybe a unit test on models defined in the test of the TorchFeatureExtractor could be useful and reproduce the bug above.

I patched the function in the very last PR.


Extraction error with const generics and hax attribute on a struct field

I'm hitting an error during F* extraction, when having a hax attribute on a struct field using a const generic.
Here is a reproducer (the actual attribute contents may not have much importance):
#[hax_lib::attributes]
struct Foo<const LEN: usize> {
    #[refine(hax_lib::forall(|i: usize| hax_lib::implies(
        i < indices.len(),
        || indices[i] as (usize) < 2
    )))]
    indices: [u8; LEN],
}

view in hax playground
The error message mentions error: [HAX0001] (FStar backend) something is not implemented yet. associated_refinement_in_type: zip two lists of different lenghts, but I can't clearly attribute this to the input Rust code.
If I move the const generic as a standalone const (e.g., const LEN: usize = 42;), F* extraction proceeds successfully.
Likewise if I just comment out the hax attribute while keeping the const generic.

Thanks for your bug report!
That's indeed a bug related to constants and struct refinements, I recall stumbling upon it quite some time ago.
From what I recall, the proc macro attributes sometimes remove const generics when it should not. I will try to investigate but I have no idea about when :/


Added Brand Request Issue Template and Fix Design By Humans

Proposed Changes

Added a brand request template that will auto add the add brand label
Fix Design By Humans

Screenshot (If Applicable)

No Screenshot but have an example: https://github.com/forks-by-kieran/littlelink-server/issues/1
Checklist

[x] Tested locally
[x] Ran yarn ci to test my code
[x] Did not add any unnecessary changes
[x] All my changes appear after other changes in each file
[x] Included a screenshot (if adding a new button)
[x] 🚀

thank you!


es: handle large k8s section

provided two mechanisms for handling large metadata fields (as the k8s metadata section):

support configuring elasticsearch limit on number of fields (default 1000 fields)
enable k8s probe to disable or prune size of the k8s metadata section (default is enabled with max 100 fields)

@hunchback There is a reason why the default is 1000 : an index has a real cost. The problem is that we put objects under the "K8s" metadata field that we have no idea what's inside. There are maps and maps of maps. Some of them can even be specified by the user. So we don't even know if 10000 is enough.
The solution we discussed during the hackathon is that we need to select the fields we want to store in the metadata.

run skydive-ppc64le-tests

run skydive-functional-tests-backend-elasticsearch

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.
With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.
The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.
We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This PR must cherry pick the commits that enable history for the functional tests. Otherwise, we have no idea if this fixes anything.

ok

With the Prune mechanism, we have no idea of what will be recorded and what will be discarded. It will even be different for the same type of resource as the order of fields in maps is not predictable : some StorageClass will have a field "A", when others won't.

Prune sorts the keys before pruning so its' predictable

The maxFields only ensure that we won't index more than maxFields fields for a single resource. So maxFields could be exhausted after having indexed a few resources. This approach simply does not work. Until we have a way to serialize/unserialize on the fly, the only viable way is to select the field we want to index per resource type.

Please explain: So maxFields could be exhausted after having indexed a few resources

We are not going to bump the index.mapping.total_fields.limit until we know how many fields we are indexing.

This needs to be used in conjunction with the above, but generally i believe in productive settings one would not want to increase total_fields.limit beyond the default (which is 1000). So I am fine with removing this commit

@hunchback
Let's say we have a new StorageClass object that has - let's say - 200 fields.
Then a Job object with also 200 fields. Then a NetworkPolicy. Then a pod. Then a deployment. We reached the 1000 field limit and Skydive will not be able to index any object of an other type.
That's why the only good solution is to index a selected set of fields.

@hunchback
Let's say we have a new StorageClass object that has - let's say - 200 fields.
Then a Job object with also 200 fields. Then a NetworkPolicy. Then a pod. Then a deployment. We reached the 1000 field limit and Skydive will not be able to index any object of an other type.
That's why the only good solution is to index a selected set of fields.

ok ... in that case I guess this may be a good point to look farther into serialization of objects ... basically store them in elasticsearch as BLOBs and expand for the UI.

@hunchback Then you won't be able to able to do any query on it, which makes the history basically useless. Again, we need to select the fields we want to index. Either by selecting the fields we want at the probe level, or by explicitely tell Elasticsearch to index the fields we are interested in.

@hunchback Then you won't be able to able to do any query on it, which makes the history basically useless. Again, we need to select the fields we want to index. Either by selecting the fields we want at the probe level, or by explicitly tell Elasticsearch to index the fields we are interested in.

All the fields we needed for searching have already been placed in the toplevel (we can add any specific fields if we discover they are missing) - so the K8s entry is just to help describe the node after its' selected. The new container code does conflict with this assumption - this should be fixed - see my comment within the patch - after fixing the container code we can simply disable the K8s field by default (leaving it for now as a debug option).

@hunchback @lebauce It seems we agreed that we need to keep only indexed fields that are relevant for :

making the probe working :)
allowing the user to do basic k8s filtering

For the rest it should be a non-indexed sub key
So I would create the following structure
type K8S struct {
   field1
   field2

   Extra ....(everything else we want to keep, could be everything)
}

I would store this in the metadata under the sub K8S, so that this is easy for users to find K8s things.
I would add a rule in the ES schema to not index K8S.Extra

@hunchback @lebauce It seems we agreed that we need to keep only indexed fields that are relevant for :

making the probe working :)
allowing the user to do basic k8s filtering

For the rest it should be a non-indexed sub key
So I would create the following structure
type K8S struct {
   field1
   field2

   Extra ....(everything else we want to keep, could be everything)
}

I would store this in the metadata under the sub K8S, so that this is easy for users to find K8s things.
I would add a rule in the ES schema to not index K8S.Extra

So I tried just that but I am not managing to setup the index such that the K8s field is really ignored, I was using the following commands attempting to do that:
echo
echo
echo "***** create index *****"
curl -X DELETE http://localhost:9200/*
curl -X PUT http://localhost:9200/skydive_test -d '{
  "mappings": {
    "graph_element": {
        "dynamic_templates": [
                {
                        "strings": {
                                "match": "*",
                                "match_mapping_type": "string",
                                "mapping": {
                                        "type": "keyword"
                                }
                        }
                },
                {
                        "k8s": {
                                "path_match": "K8s.*",
                                "mapping": {
                                        "type": "object",
                                        "enabled": false,
                                        "store": true,
                                        "index": "no"
                                }
                        }
                }
        ]
    }
  }
}'

curl -X PUT http://localhost:9200/skydive_test/_settings -d '{
        "index.mapping.total_fields.limit": 15
}'
echo
echo
echo "***** insert 2 fields *****"
curl -X PUT http://localhost:9200/skydive_test/graph_element/1 -d '{
  "k8s" : { "0": 2, "1": 2 }
}'

echo
echo
echo "***** insert 5 fields *****"
curl -X PUT http://localhost:9200/skydive_test/graph_element/1 -d '{
  "k8s" : { "0": 2, "1": 2, "2": 2, "3": 2, "4": 2 }
}'

The result I got:
[vagrant@dev skydive]$ source runme

***** create index *****
{"acknowledged":true}{"acknowledged":true,"shards_acknowledged":true,"index":"skydive_test"}{"acknowledged":true}

***** insert 2 fields *****
{"_index":"skydive_test","_type":"graph_element","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}

***** insert 5 fields *****
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [15] in index [skydive_test] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [15] in index [skydive_test] has been exceeded"},"status":400}[vagrant@dev skydive]$ vim runme

@safchain / @lebauce - if you can help disabling the K8s then fine - else we can reconsider pruning the K8s (this may anyway be needed for handling other potential limitations such as network bandwidth etc.)

@hunchback As said let's start defining a K8S struct will see the indexing/blob later

@hunchback As said let's start defining a K8S struct will see the indexing/blob later

For now I have just disabled storing/indexing K8s: https://github.com/skydive-project/skydive/pull/1426
As for re-org of K8s elements:

important fields directly under  (stuff like "Namespace", "Name", "Manager", and other fields)
extra fields under .K8s

Are you proposing we store in:

.K8s
K8s.Extra
If so then what goes into  vs. .K8s

Name and Manager are toplevel (as they are common to other resources)
Namespace would go under K8s
Extra fields would go under K8s.Extra

Name and Manager are toplevel (as they are common to other resources)
Namespace would go under K8s
Extra fields would go under K8s.Extra

ok - fine - with regards to Name it should be the "fullname" of the k8s resource:

for a node: node1
for a pod: namespace1/pod1
for a container: namespace1/pod1/container1

under K8s we would still hold the short name:
Name: "namespace1/pod1/container1",
K8s: {
  Namespace: "namespace1",
  Pod: "pod1",
  Name: "container1",
  ... and more important k8s fields ....
}

another point is that rather than:

toplevel.K8s.Extra
I rather name extra:
toplevel.Extra.K8s

this why our special handling of Extra data (in disabling indexing in elasticsearch; in presenting it in a separate panel in the UI; etc.) is generic (not k8s specific) such that other Probes can make use of this w/o requiring special handling

The restructuring of K8s is orthogonal to this PR (which focuses on supporting large K8s object in elasticsearch) this was handled in a separate PR: https://github.com/skydive-project/skydive/pull/1432

@lebauce / @safchain - I was not able to get elasticsearch to not index the K8s field - can you have a look at the script I used above ... thanks!

curl -X PUT http://localhost:9200/skydive_test -d '{
  "mappings": {
    "graph_element": {
        "dynamic_templates": [
                {
                        "strings": {
                                "path_match": "*",
                                "path_unmatch": ".Extra.*",
                                "match_mapping_type": "string",
                                "mapping": {
                                        "type": "keyword"
                                }
                        }
                },
                {
                        "extra": {
                                "path_match": "*.Extra",
                                "mapping": {
                                        "type": "object",
                                        "enabled": false,
                                        "store": true,
                                        "index": "no"
                                }
                        }
                }
        ]
    }
  }
}'

curl -X PUT http://localhost:9200/skydive_test -d '{
  "mappings": {
    "graph_element": {
        "dynamic_templates": [
                {
                        "strings": {
                                "path_match": "*",
                                "path_unmatch": ".Extra.*",
                                "match_mapping_type": "string",
                                "mapping": {
                                        "type": "keyword"
                                }
                        }
                },
                {
                        "extra": {
                                "path_match": "*.Extra",
                                "mapping": {
                                        "type": "object",
                                        "enabled": false,
                                        "store": true,
                                        "index": "no"
                                }
                        }
                }
        ]
    }
  }
}'

Great - this works! I have updated the PR - but depends on: https://github.com/skydive-project/skydive/pull/1432

need to be rebased

run skydive-k8s-tests

Need to be rebased and fix the code with the new modification of the graph

@hunchback
tests/k8s_test.go:68:20: cannot call non-function node.graphElement.Metadata (type graph.Metadata)
tests/k8s_test.go:169:21: cannot call non-function obj.graphElement.Metadata (type graph.Metadata)

run skydive-k8s-tests

run skydive-functional-tests-backend-orientdb

run skydive-k8s-tests

@hunchback
&{mapper_parsing_exception object mapping for [Metadata.Ports] tried to parse field [Ports] as object, but found a concrete value     false map[] [] []}

This is probably due to the fact that service.go does
m.SetFieldAndNormalize("Ports", srv.Spec.Ports)

and networkpolicy.go does:
metadata.SetFieldAndNormalize("Ports", getFieldPorts(np, ty))

So Metadata.Ports are different types, making Elasticsearch unable to index them

@hunchback
&{mapper_parsing_exception object mapping for [Metadata.Ports] tried to parse field [Ports] as object, but found a concrete value     false map[] [] []}

This is probably due to the fact that service.go does
m.SetFieldAndNormalize("Ports", srv.Spec.Ports)

and networkpolicy.go does:
metadata.SetFieldAndNormalize("Ports", getFieldPorts(np, ty))

So Metadata.Ports are different types, making Elasticsearch unable to index them

I see - so I should probably have a clear separation between generic K8s fields such as:

K8s.Namespace
K8s.Name
K8s.Labels (not current included)

Vs. type specific fields

K8s.Service.Ports
K8s.NetworkPolicy.Ports

I will merge this PR into https://github.com/skydive-project/skydive/pull/1432 and then handle.

@hunchback I would prefer that you cherry pick https://github.com/skydive-project/skydive/pull/1432/commits/ccf6675062838b9e5d8fa56f85dda34a889e5b6e in this PR

run skydive-k8s-tests

@hunchback I did not see that this PR could not run the tests with the history enabled as it only modifies the mapping without moving things under K8s.Extra


FOM Keycloak/bceid issue

Onboarding West Fraser BCEID users not working.
Issue:
A batch of users from West Fraser are having issue login to FOM admin (https://fom.nrs.gov.bc.ca/admin) with their BCeID accounts.
User list:
Jade Laramie
Mike Sakakibara
Kristie Seaborn
Ben Barker (already successful!)
Michele Enright
Aaron Hames
Guohua Li
Lars Lu
Jaret van der Griessen
So far only "Ben" (and one other) succeed.

Verified with Derek using newly created BCeID test account and was able to successfully login.
The flow/process does not seem to be the problem and also doe not appear the problem is on FOM application side.
Once after the registered Business BCeID user first login and shows up on KeyCloak (Derek did the intermediate steps, searched and verified on KeyCloak for the user), the user's subsequent login will be successful login to FOM.
All government test BCeID accounts are working. Also "Ben" is good as well.
The problem seems to be pointing towards BCeID setup.
Derek/Gbola will contact West Fraser BCEID admin person to verify some settings with users' BCeID.

Confirmed not an issue with FOM. Same behavior observed with other application. Believed to be an issue with keycloak, or with the communication between BCeID and keycloak. Keeping open until addressed.
Confirmed with end user two issues:

Failure of new user getting registered in keycloak. (Just get redirected back to login.)
Redirect back to login - after successful BCeID login, the login page redisplays. They do not proceed to keycloak (no session established) nor FOM.

I believe both issues have the same root cause - keycloak is not receiving or not accepting the BCeID token and just redirecting them back to log in again. Plan is to test this by looking at network tab.

Network tab shows that traffic isn't leaving the CLP (common login page). Marco suspects the WAM servers.

Discovered that West Fraser users can register and access FOM when they are not on their corporate network, so this strongly suggests that the issue is with their corporate network security. Workaround for impacted users is to connect from a non-corporate network. Further troubleshooting needs the West Fraser corporate network team plus Keycloak and/or WAM. Nothing for FOM to do, so closing.


Replace mockito with mocktail

In order to help with build times and ease null safety migration, we've opted to replace mockito with mocktail. This batch runs the codemod to swap things out, but may require manual intervention.
FEDX will come around and fix things up unless you beat us to it. Once CI is green and the PR is not in draft, you can review and merge it.
For more info, reach out to #support-frontend-dx on Slack.
Created by Sourcegraph batch change Workiva/mocktail.

Security Insights
No security relevant content was detected by automated scans.
Action Items

Review PR for security impact; comment "security review required" if needed or unsure
Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

QA +1 CI only

@Workiva/release-management-p


Initial version of the Control Board UI

This is the pull request for the initial version of the Control Board UI. It is mostly self-contained in python/ctrlboard and added as experimental feature as installation point 13) in easyinstall.sh. The installation behavior is that selection of ctrlboard ui disables the rascsi-oled service and vice versa. If 1) is selected (rascsi+web), then the enabled service is updated.
https://github.com/akuker/RASCSI/wiki/RaSCSI-Control-Board
(I'm updating this wiki page further after creating the pull request)
I hope you enjoy this :-)

@rdmark left a few comments open in case you want to comment further on them. Other than that, I have pushed the changes in 9e53103.

@akuker Do you want to give this a test drive before I merge?


2 suggestions...

Love the virtual keyboard!
Wondering if you're open to making 2 changes:

Increasing the z-index of the #tk element to a value greater than 1000 (i.e. 2000). Reason being that modals tend to use z-indexes between the 900-1200 value which prevents a user from using the keyboard in a modal.

Adding textarea support in addition to text and passwords. Here's an example of what worked for me:

29 $("body")
30        .on("focus", "input[type=text], textarea, input[type=password], input:not([type])", onFocus)
31        .on("blur", "input[type=text], textarea, input[type=password], input:not([type])", onBlur);
32      inputList = $("input[type=text], textarea, input[type=password], input:not([type])");

I've forked your repo, tested it and have not ran into issues with these 2 minor changes.
What do you think?

A little bit late to the party, 2 years only, but hey! I've pushed your suggestion to the repo.
Thank you for your contribution and I'm really sorry I haven't noticed these earlier.


Replace celery @shared_task with @app.task

I want to merge this change to enable future features implementation based on celery app

Screenshots

Pull Request Checklist

[ ] Privileged views and APIs are guarded by proper permission checks.
[ ] All visible strings are translated with proper context.
[ ] All data-formatting is locale-aware (dates, numbers, and so on).
[ ] Database queries are optimized and the number of queries is constant.
[ ] Database migration files are up to date.
[ ] The changes are tested.
[ ] The code is documented (docstrings, project documentation).
[ ] GraphQL schema and type definitions are up to date.
[ ] Changes are mentioned in the changelog.

We are only using one celery instance, I think there is no much difference between shared_task and app.task?


[TeX] delete Leading blanks

Reasons for making this change:
Template of TeX includes a leading blank.
I think You had better delete it.

@yassu thanks!


Dark theme toggle

Major code changes are:

Restructuring of project source code files css and js directories added
An implementation of the dark and light theme modes
170deg spin effects to every ALX logo icon on the intranet
Hamburger click effects when user interacts with the hamburger
170deg spin effects when user hovers on the Slack logo on the intranet. Only applicable when users visit the intranet on a screen with min-width: 768px

Minor changes:

The default popup file that shows when the user clicks on the extension has been renamed
The default popup script file and stylesheet files have also been renamed
The script files to toggle the dark and light themes have also been renamed

Note
Current implementation of the theme still requires users to interact with the extension before the theme gets applied. Here's the steps to follow to fully test the extension:

Fetch the branch that has this PR using git fetch dark-theme-toggle to fetch the code changes to your system
Switch to this new branch using git switch dark-theme-toggle
Click on the extensions icon in Google Chrome and select Manage Extensions
Switch on the Developer mode at the top right corner of your browser
Click load unpacked and browse to the root folder where you fetched this branch and click Select Folder
Pin the newly added extension to your Google Chrome browser
Visit your ALX Intranet
Click on the extension and toggle the dark mode on
You would have to just click on the extension (and not toggle the dark mode on) every other time you visit any page on the intranet.

Thank you @MartyOfMCA for the detailed description of your pull request. I've gone through it and I'm satisfied.


Make the new Buffer API the default for transports

Motivation:
We are transitioning to this new API, and this is a step in that direction.
Modification:
Change the default for ChannelOption.RCV_BUF_ALLOCATOR_USE_BUFFER to true, enabling the new API by default.
Explicitly disable it in tests that still rely on ByteBuf.
Result:
Buffer is now the default over ByteBuf.

@normanmaurer Merging this so I can base DNS migration on top. We can address comments in follow-up PRs.


better email not sent error messages

resolves #2261

How about we introduce error codes for this in the backend? This string matching does not seem like the best option.


Allow the user to get service credentials

Is your feature request related to a problem? Please describe.
Since we are developing: https://github.com/epinio/epinio/issues/2037 that is: exposing services created with epinio to the user; we are required also to equip the user with the credentials needed to access the exposed services.
Currently, there is no such command that the user can invoke to get the credentials for an instance of a service.
The only way the user can obtain the credentials is to search into some kubernetes secretes; since epinio is designed to provide a layer to hide kubernetes concepts, the current available method seems to be logically unacceptable.
Describe the solution you'd like
I would like, as user, a command such as:
epinio service show-credentials mysql

Currently, there is no such command that the user can invoke to get the credentials for an instance of a service.
The only way the user can obtain the credentials is to search into some kubernetes secretes

Actually not quite. When the service is bound to an application the K secrets with the credentials are marked as E configurations, and using configuration show on these does list the relevant keys and values. Finding the configurations for the service is do-able using a combination of configuration list and grep <service-name>.
Even so, agreed that automating the above process and printing the information as part of service show would improve GOOBE.

Agree on just improving the service show command adding more info about the credentials.


update_submit_qubo

sent qubo to toshiba qpu if method is dry-run, still need to integrate it with correct qubo obj

@dhirpalshah, have you pushed the updated changes from the resolved conversations?

@dhirpalshah, have you pushed the updated changes from the resolved conversations?

yep, just did


fix: Replace starlette.testclient.TestClient with starlette_testclient.TestClient to keep compatibility with newer starlette versions

cc @Kludex
As you suggested :) Works like a charm, thank you!

If you ever need something, let me know. :pray:


update to pocketbase version 0.8.0-rc1

This weekend, pocketbase:0.8.0-rc1 was released for testing and it comes with some breaking changes in its API.
Therefore the client SDKs have to update, too.
I have already worked on the updated python sdk in a fork of this repo and I want to create a pull request for my changes for you to check -> #3

As replied in the request [#3] I created a new branch for the update and added you as a contributor. Welcome aboard!

Cool, thank you :)
I have merged (#4) my changes to the 0.8.0-rc2 branch.


RFP - gaiasky

Checklist

[X] The package I am requesting does not already exist on https://community.chocolatey.org/packages;
[X] There is no open issue for this package;
[x] The issue title starts with 'RFP - ';
[X] The download URL is public and not locked behind a paywall / login;

Package Details
Software project URL : https://zah.uni-heidelberg.de/gaia/outreach/gaiasky
Changelog: https://codeberg.org/gaiasky/gaiasky/src/branch/master/CHANGELOG.md
Direct download URL for the software / installer : https://gaia.ari.uni-heidelberg.de/gaiasky/releases/latest/gaiasky_windows-x64_3_5_1.exe
Software summary / short description:
Real-time 3D Universe application. It is developed within the framework of ESA's Gaia mission to chart more than 1 billion stars.
A part of Gaia Sky is described in the paper Gaia Sky: Navigating the Gaia Catalog.
Package Expectations
Note:

Windows installer
Download the installer and double-click on it. Follow the on-screen instructions. In Windows 8/10 SmartScreen may block the installation. If so, just click on More info and then on Run anyway.

Hoping for a maintainer soon :pray:


Modal::find($instance) returning multiple models when passed model instance

Laravel Version: 5.7.*
PHP Version: 7.2.10
Database Driver & Version: MySQL 5.7.17

Description:
This is probably relevant to any Eloquent model, just using User as an example.
When using App\User::find($user); where $user is a User instance not an ID (or primary key) the User object is treated as an array of IDs (/primary keys) and it's possible for multiple models to be returned given the right data.
I understand that the data on Emma (in example below) is being treated as IDs, and the organisation_id of 1 is picking up Jack. And I know this isn't how ::find() is intended to be used but shouldn't there be protections in place to stop accidentally passing an instance to the Model::find() method?
Steps To Reproduce:
Add the following to the users table:

id
name
email
organisation_id

1
jack
jack
1

2
emma
emma
1

Run the following:
// Setup
$emma = App\User::find(2);

// To recreate bug
return App\User::find($emma);

// Result
[Jack instance, Emma instance]

// Expected result
// Exception or Emma instance?

No real use case. Just thought that there should maybe be some protections here against. Feel free to close if this isn't something that falls within Laravel's scope.

I know how it behaves and how to change the behavior but this is unnecessary for me. Anyway, Laravel scope is anything that is decided by Mr.Otwell - Laravel author. Let's listen to the other ideas.

Heya! This is as intended. Check out the example @d1am0nd posted :)


Questions outside of repeat with randomize=true cannot work if questions inside of repeat with randomize=true exist.

Describe the bug
Questions outside of repeat with randomize=true cannot work if questions inside of repeat with randomize=true exist.
To Reproduce
Steps to reproduce the behavior. If applicable please include the smallest possible XLSForm or XForm (as zip or link).

Publish survey with this xls form: randomized in repeat.xlsx, there are two choice quesetions, one in in repeat(named rating), the other(named fruits) is outside the repeat,  both of the choide questions are randomized, publish the survey.
Add a repeat, observe that the choice order of select fruits question are changed.

Expected behavior
The choice order outside the repeat don't changed after adding new repeat instance.
Screenshots
xls form:

screenshot:

Browser and OS (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]

Additional context
Add any other context about the problem here.

oh dear...
Thanks for reporting. Fwiw, I think the cause can be found somewhere in itemset.js.

I've tracked this down to Form#getRelatedNodes here. I've explored a couple of approaches to solving this, none of which I'm particularly fond of but they do work. I don't have time today to write up a test and wrap up a solution, but should be able to get a PR open next week.


Suggestion: Host the www.chartjs.org website on Netlify to get free SSL with LetsEncrypt

Hello,
If you visit the chart.js website via https (https://www.chartjs.org/), you get an invalid SSL certificate.
I would like to suggest moving the chartjs.org website to Netlify (free). Netlify is just as easy to use as GitHub pages. You set up a webhook to compile the new site whenever you push, and they provide free SSL certificates via LetsEncrypt.
It doesn't really matter too much, but it only takes about 5 minutes to move everything over. Also, Chrome is going to start marking HTTP sites as "not secure" this year.
P.S. Sorry if this is the wrong place to post a suggestion like this, but I couldn't find a mailing list

Related: #5083
Cloudflare is also a good choice, and probably easier to set up than Netlify.

I can't agree more about the easiness of Netlify (I'm not familiar with Cloudflare), however our deploy strategy is not that simple and I'm not sure we can accomplish the following:

https://www.chartjs.org built from https://github.com/chartjs/www.chartjs.org
https://www.chartjs.org/docs (and /samples) built from https://github.com/chartjs/Chart.js
support multiple versions: https://www.chartjs.org/docs/x.x.x/ (e.g. docs | samples)
support "latest" version: https://www.chartjs.org/docs/latest/ (e.g. docs | samples)
support "master" version: https://www.chartjs.org/docs/master/ (e.g. docs | samples)

It took some time to get a stable deploy process, though, we could keep feeding the chartjs.github.io repository and deploy it with Netlify but at this point I think it would be much easier to get a (free) SSL certificate for our domain and keep using GitHub pages?

I see that TravisCI is running ./scripts/deploy.sh, which pushes the static files to the master branch of https://github.com/chartjs/chartjs.github.io.
So you could just point Netlify to the https://github.com/chartjs/chartjs.github.io repo, and it would update whenever there's a new commit. You can just leave the build script blank, and set the build directory to ..
I don't think it's possible to setup SSL on a GitHub pages site if you're using a custom domain, but the other option is to set up Cloudflare in front. That should also only take a few minutes.
Cloudflare requires that you switch to their nameservers. Netlify also has nameservers that you can use, or you can just set up a single DNS record.

Closing: https://www.chartjs.org now delivers a valid certificate.


A new callout?

Hello,
You say on the elements website that callout are subject to change. Have you an idea for a landing date?
https://elements.nuxt.space/globals/callout#callout

cc @bdrtsky

@Barbapapazes big update for Docus (including updated and finally published Elements and Tokens) planned by the end of the month, stay tuned 👋
Regarding the question, Elements will have updated Alert, Callout and Disclosure component.

@Barbapapazes big update for Docus (including updated and finally published Elements and Tokens) planned by the end of the month, stay tuned 👋
Regarding the question, Elements will have updated Alert, Callout and Disclosure component.

Okk that so nice! Will stay tuned!

@bdrtsky wowwww 🎇

Related to #909 :)


Timeout when retrieving relation count in MongoDB

Bug description
I am getting a timeout error when trying to retrieve the count of a relation in MongoDB:
$ yarn ts-node index.ts
yarn run v1.22.5
$ /Users/nikolasburk/prisma/releases/whats-new-in-prisma/v3.2.0-demos/playground/sample_mflix/node_modules/.bin/ts-node index.ts
/Users/nikolasburk/prisma/releases/whats-new-in-prisma/v3.2.0-demos/playground/sample_mflix/node_modules/@prisma/client/runtime/index.js:38739
          throw new import_engine_core3.PrismaClientUnknownRequestError(message, this.prisma._clientVersion);
                ^
PrismaClientUnknownRequestError:
Invalid `prisma.movie.findMany()` invocation in
/Users/nikolasburk/prisma/releases/whats-new-in-prisma/v3.2.0-demos/playground/sample_mflix/index.ts:6:40

  3 const prisma = new PrismaClient()
  4
  5 async function main() {
→ 6   const allMovies = await prisma.movie.findMany(
  Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: RawError { code: "unknown", message: "Command failed (MaxTimeMSExpired): Error in $cursor stage :: caused by :: operation exceeded time limit)" } })
    at cb (/Users/nikolasburk/prisma/releases/whats-new-in-prisma/v3.2.0-demos/playground/sample_mflix/node_modules/@prisma/client/runtime/index.js:38739:17) {
  clientVersion: '3.2.0'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

How to reproduce
Exactly the same steps as in: https://github.com/prisma/prisma/issues/9650
Expected behavior
No response
Prisma information
This time, the Prisma Client query is the following:
import { PrismaClient } from '@prisma/client'

const prisma = new PrismaClient()

async function main() {
  const allMovies = await prisma.movie.findMany({
    take: 10,
    include: {
      _count: {
        select: {
          comments: true
        }
      }
    },
  })
  console.log(allMovies)
}

main()
  .catch((e) => {
    throw e
  })
  .finally(async () => {
    await prisma.$disconnect()
  })

Environment & setup

OS: macOS 10.15.7
Database: MongoDB
Node.js version: v16.1.0

Prisma Version
$ npx prisma -v
Environment variables loaded from .env
prisma                  : 3.2.0
@prisma/client          : 3.2.0
Current platform        : darwin
Query Engine (Node-API) : libquery-engine afdab2f10860244038c4e32458134112852d4dad (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli afdab2f10860244038c4e32458134112852d4dad (at node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core afdab2f10860244038c4e32458134112852d4dad (at node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt afdab2f10860244038c4e32458134112852d4dad (at node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash    : afdab2f10860244038c4e32458134112852d4dad
Studio                  : 0.435.0
Preview Features        : mongoDb

Possibly related: https://github.com/prisma/prisma/issues/8810

I think this is fixed now:

mkdir 9651 && cd 9651 && npm init -y && npm install prisma@dev && npx prisma init --datasource-provider mongodb --url ... with URL from https://github.com/prisma/introspection-ci/blob/f24f50841a84c1b0249f5d63f428bfb089a8ad9a/databases/connections/mongodb_public.txt#L4
npx prisma db pull
Adapt schema to be:model Comment {
  id       String   @id @default(dbgenerated()) @map("_id") @db.ObjectId
  date     DateTime @db.Date
  email    String
  movie_id String   @db.ObjectId
  movie    Movie   @relation(fields: [movie_id], references: [id])
  name     String
  text     String

  @@map("comments")
}

model Movie {
  id                 String    @id @default(dbgenerated()) @map("_id") @db.ObjectId
  awards             Json
  cast               String[]
  countries          String[]
  directors          String[]
  fullplot           String?
  genres             String[]
  imdb               Json
  languages          String[]
  lastupdated        String
  metacritic         Int?
  num_mflix_comments Int
  plot               String?
  poster             String?
  rated              String?
  released           DateTime? @db.Date
  runtime            Int?
  title              String
  tomatoes           Json?
  type               String
  writers            String[]
  /// String: 0.1%, Int32: 99.9%
  year               Int
  comments           Comment[]

  @@map("movies")
}

model Session {
  id      String @id @default(dbgenerated()) @map("_id") @db.ObjectId
  jwt     String
  user_id String @unique(map: "user_id_1")

  @@map("sessions")
}

model Theater {
  id        String @id @default(dbgenerated()) @map("_id") @db.ObjectId
  location  Json
  theaterId Int

  @@map("theaters")
}

model User {
  id          String @id @default(dbgenerated()) @map("_id") @db.ObjectId
  email       String @unique(map: "email_1")
  name        String
  password    String
  preferences Json?

  @@map("users")
}

Create script.js with this content:const { PrismaClient } = require('@prisma/client')

const prisma = new PrismaClient()

async function main() {
  const allMovies = await prisma.movie.findMany({
    take: 10,
    include: {
      _count: {
        select: {
          comments: true
        }
      }
    },
  })
  console.log(allMovies)
}

main()
  .catch((e) => {
    throw e
  })
  .finally(async () => {
    await prisma.$disconnect()
  })

Leads to this output:
C:\Users\Jan\Documents\throwaway\9651>node script.js
[
  {
    id: '573a1390f29313caabcd4135',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [ 'Charles Kayser', 'John Ott' ],
    countries: [ 'USA' ],
    directors: [ 'William K.L. Dickson' ],
    fullplot: 'A stationary camera looks at a large anvil with a blacksmith behind it and one on either side. The smith in the middle draws a heated metal rod from the fire, places it on the anvil, and all three begin a rhythmic hammering. After several blows, the metal goes back in the fire. One smith pulls out a bottle of beer, and they each take a swig. Then, out comes the glowing metal and the hammering resumes.',
    genres: [ 'Short' ],
    imdb: { rating: 6.2, votes: 1189, id: 5 },
    languages: [],
    lastupdated: '2015-08-26 00:03:50.133000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: 'Three men hammer on an anvil and pass a bottle of beer around.',
    poster: null,
    rated: 'UNRATED',
    released: 1893-05-09T00:00:00.000Z,
    runtime: 1,
    title: 'Blacksmith Scene',
    tomatoes: { viewer: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [],
    year: 1893,
    _count: { comments: 0 }
  },
  {
    id: '573a1390f29313caabcd42e8',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [
      'A.C. Abadie',
      "Gilbert M. 'Broncho Billy' Anderson",
      'George Barnes',
      'Justus D. Barnes'
    ],
    countries: [ 'USA' ],
    directors: [ 'Edwin S. Porter' ],
    fullplot: "Among the earliest existing films in American cinema - notable as the first film that presented a narrative story to tell - it depicts a group of cowboy outlaws who hold up a train and rob the passengers. They are then pursued by a Sheriff's posse. Several scenes have color included - all hand tinted.",
    genres: [ 'Short', 'Western' ],
    imdb: { rating: 7.4, votes: 9847, id: 439 },
    languages: [ 'English' ],
    lastupdated: '2015-08-13 00:27:59.177000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: 'A group of bandits stage a brazen train hold-up, only to find a determined posse hot on their heels.',
    poster<EMAIL_ADDRESS>    rated: 'TV-G',
    released: 1903-12-01T00:00:00.000Z,
    runtime: 11,
    title: 'The Great Train Robbery',
    tomatoes: {
      viewer: [Object],
      fresh: 6,
      critic: [Object],
      rotten: 0,
      lastUpdated: [Object]
    },
    type: 'movie',
    writers: [],
    year: 1903,
    _count: { comments: 0 }
  },
  {
    id: '573a1390f29313caabcd4323',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [
      'Martin Fuller',
      'Mrs. William Bechtel',
      'Walter Edwin',
      'Ethel Jewett'
    ],
    countries: [ 'USA' ],
    directors: [ 'Harold M. Shaw' ],
    fullplot: "Thanks to the Fresh Air Fund, a slum child escapes his drunken mother for a day's outing in the country. Upon arriving, he and the other children are told a story about a mythical land of no pain. Rather then return to the slum at day's end, the lad seeks to journey to that beautiful land beyond the sunset.",
    genres: [ 'Short', 'Drama', 'Fantasy' ],
    imdb: { rating: 7.1, votes: 448, id: 488 },
    languages: [ 'English' ],
    lastupdated: '2015-08-29 00:27:45.437000000',
    metacritic: null,
    num_mflix_comments: 1,
    plot: 'A young boy, opressed by his mother, goes on an outing in the country with a social welfare group where he dares to dream of a land where the cares of his ordinary life fade.',
    poster: 'https://m.media-amazon.com/images/M/MV5BMTMzMDcxMjgyNl5BMl5BanBnXkFtZTcwOTgxNjg4Mg@@._V1_SY1000_SX677_AL_.jpg',
    rated: 'UNRATED',
    released: 1912-10-28T00:00:00.000Z,
    runtime: 14,
    title: 'The Land Beyond the Sunset',
    tomatoes: { viewer: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [ 'Dorothy G. Shore' ],
    year: 1912,
    _count: { comments: 1 }
  },
  {
    id: '573a1390f29313caabcd446f',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [
      'Frank Powell',
      'Grace Henderson',
      'James Kirkwood',
      'Linda Arvidson'
    ],
    countries: [ 'USA' ],
    directors: [ 'D.W. Griffith' ],
    fullplot: "A greedy tycoon decides, on a whim, to corner the world market in wheat. This doubles the price of bread, forcing the grain's producers into charity lines and further into poverty. The film continues to contrast the ironic differences between the lives of those who work to grow the wheat and the life of the man who dabbles in its sale for profit.",
    genres: [ 'Short', 'Drama' ],
    imdb: { rating: 6.6, votes: 1375, id: 832 },
    languages: [ 'English' ],
    lastupdated: '2015-08-13 00:46:30.660000000',
    metacritic: null,
    num_mflix_comments: 1,
    plot: "A greedy tycoon decides, on a whim, to corner the world market in wheat. This doubles the price of bread, forcing the grain's producers into charity lines and further into poverty. The film...",
    poster: null,
    rated: 'G',
    released: 1909-12-13T00:00:00.000Z,
    runtime: 14,
    title: 'A Corner in Wheat',
    tomatoes: { viewer: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [],
    year: 1909,
    _count: { comments: 1 }
  },
  {
    id: '573a1390f29313caabcd4803',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [ 'Winsor McCay' ],
    countries: [ 'USA' ],
    directors: [ 'Winsor McCay', 'J. Stuart Blackton' ],
    fullplot: 'Cartoonist Winsor McCay agrees to create a large set of drawings that will be photographed and made into a motion picture. The job requires plenty of drawing supplies, and the cartoonist must also overcome some mishaps caused by an assistant. Finally, the work is done, and everyone can see the resulting animated picture.',
    genres: [ 'Animation', 'Short', 'Comedy' ],
    imdb: { rating: 7.3, votes: 1034, id: 1737 },
    languages: [ 'English' ],
    lastupdated: '2015-08-29 01:09:03.030000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: 'Cartoon figures announce, via comic strip balloons, that they will move - and move they do, in a wildly exaggerated style.',
    poster: 'https://m.media-amazon.com/images/M/MV5BYzg2NjNhNTctMjUxMi00ZWU4LWI3ZjYtNTI0NTQxNThjZTk2XkEyXkFqcGdeQXVyNzg5OTk2OA@@._V1_SY1000_SX677_AL_.jpg',
    rated: null,
    released: 1911-04-08T00:00:00.000Z,
    runtime: 7,
    title: 'Winsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics',
    tomatoes: { viewer: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [
      'Winsor McCay (comic strip "Little Nemo in Slumberland")',
      'Winsor McCay (screenplay)'
    ],
    year: 1911,
    _count: { comments: 0 }
  },
  {
    id: '573a1390f29313caabcd4eaf',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [ 'Jane Gail', 'Ethel Grandin', 'William H. Turner', 'Matt Moore' ],
    countries: [ 'USA' ],
    directors: [ 'George Loane Tucker' ],
    fullplot: null,
    genres: [ 'Crime', 'Drama' ],
    imdb: { rating: 6, votes: 371, id: 3471 },
    languages: [ 'English' ],
    lastupdated: '2015-09-15 02:07:14.247000000',
    metacritic: null,
    num_mflix_comments: 1,
    plot: 'A woman, with the aid of her police officer sweetheart, endeavors to uncover the prostitution ring that has kidnapped her sister, and the philanthropist who secretly runs it.',
    poster<EMAIL_ADDRESS>    rated: 'TV-PG',
    released: 1913-11-24T00:00:00.000Z,
    runtime: 88,
    title: 'Traffic in Souls',
    tomatoes: { viewer: [Object], dvd: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [],
    year: 1913,
    _count: { comments: 1 }
  },
  {
    id: '573a1390f29313caabcd50e5',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [ 'Winsor McCay', 'George McManus', 'Roy L. McCardell' ],
    countries: [ 'USA' ],
    directors: [ 'Winsor McCay' ],
    fullplot: 'Winsor Z. McCay bets another cartoonist that he can animate a dinosaur. So he draws a big friendly herbivore called Gertie. Then he get into his own picture. Gertie walks through the picture, eats a tree, meets her creator, and takes him carefully on her back for a ride.',
    genres: [ 'Animation', 'Short', 'Comedy' ],
    imdb: { rating: 7.3, votes: 1837, id: 4008 },
    languages: [ 'English' ],
    lastupdated: '2015-08-18 01:03:15.313000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: 'The cartoonist, Winsor McCay, brings the Dinosaurus back to life in the figure of his latest creation, Gertie the Dinosaur.',
    poster<EMAIL_ADDRESS>    rated: null,
    released: 1914-09-15T00:00:00.000Z,
    runtime: 12,
    title: 'Gertie the Dinosaur',
    tomatoes: { viewer: [Object], lastUpdated: [Object] },
    type: 'movie',
    writers: [ 'Winsor McCay' ],
    year: 1914,
    _count: { comments: 0 }
  },
  {
    id: '573a1390f29313caabcd516c',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [
      'Stanley Hunt',
      'Sarah Constance Smith Hunt',
      'Mrs. George Walkus',
      "Paddy 'Malid"
    ],
    countries: [ 'USA' ],
    directors: [ 'Edward S. Curtis' ],
    fullplot: null,
    genres: [ 'Drama', 'History' ],
    imdb: { rating: 5.8, votes: 223, id: 4150 },
    languages: [ 'English' ],
    lastupdated: '2015-09-16 12:11:37.770000000',
    metacritic: null,
    num_mflix_comments: 1,
    plot: 'Original advertising for the film describes it as a drama of primitive life on the shores of the North Pacific...',
    poster<EMAIL_ADDRESS>    rated: null,
    released: 1914-12-07T00:00:00.000Z,
    runtime: 65,
    title: 'In the Land of the Head Hunters',
    tomatoes: {
      viewer: [Object],
      dvd: [Object],
      website: 'http://www.milestonefilms.com/',
      production: 'World Film Corporation',
      lastUpdated: [Object]
    },
    type: 'movie',
    writers: [ 'Edward S. Curtis (story)' ],
    year: 1914,
    _count: { comments: 1 }
  },
  {
    id: '573a1390f29313caabcd5293',
    awards: { wins: 1, nominations: 0, text: '1 win.' },
    cast: [ 'Pearl White', 'Crane Wilbur', 'Paul Panzer', 'Edward Josè' ],
    countries: [ 'USA' ],
    directors: [ 'Louis J. Gasnier', 'Donald MacKenzie' ],
    fullplot: `Young Pauline is left a lot of money when her wealthy uncle dies. However, her uncle's secretary has been named as her guardian until she marries, at which time she will officially take possession of her inheritance. Meanwhile, her "guardian" and his confederates constantly come up with schemes to get rid of Pauline so that he can get his hands on the money himself.`,
    genres: [ 'Action' ],
    imdb: { rating: 7.6, votes: 744, id: 4465 },
    languages: [ 'English' ],
    lastupdated: '2015-09-12 00:01:18.647000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: "Young Pauline is left a lot of money when her wealthy uncle dies. However, her uncle's secretary has been named as her guardian until she marries, at which time she will officially take ...",
    poster<EMAIL_ADDRESS>    rated: null,
    released: 1914-03-23T00:00:00.000Z,
    runtime: 199,
    title: 'The Perils of Pauline',
    tomatoes: {
      viewer: [Object],
      production: 'Pathè Frères',
      lastUpdated: [Object]
    },
    type: 'movie',
    writers: [
      'Charles W. Goddard (screenplay)',
      'Basil Dickey (screenplay)',
      'Charles W. Goddard (novel)',
      'George B. Seitz',
      'Bertram Millhauser'
    ],
    year: 1914,
    _count: { comments: 0 }
  },
  {
    id: '573a1390f29313caabcd548c',
    awards: { wins: 2, nominations: 0, text: '2 wins.' },
    cast: [
      'Lillian Gish',
      'Mae Marsh',
      'Henry B. Walthall',
      'Miriam Cooper'
    ],
    countries: [ 'USA' ],
    directors: [ 'D.W. Griffith' ],
    fullplot: "Two brothers, Phil and Ted Stoneman, visit their friends in Piedmont, South Carolina: the family Cameron. This friendship is affected by the Civil War, as the Stonemans and the Camerons must join up opposite armies. The consequences of the War in their lives are shown in connection to major historical events, like the development of the Civil War itself, Lincoln's assassination, and the birth of the Ku Klux Klan.",
    genres: [ 'Drama', 'History', 'Romance' ],
    imdb: { rating: 6.8, votes: 15715, id: 4972 },
    languages: [],
    lastupdated: '2015-09-11 00:32:27.763000000',
    metacritic: null,
    num_mflix_comments: 0,
    plot: "The Civil War divides friends and destroys families, but that's nothing compared to the anarchy in the black-ruled South after the war.",
    poster<EMAIL_ADDRESS>    rated: 'NOT RATED',
    released: 1915-03-03T00:00:00.000Z,
    runtime: 165,
    title: 'The Birth of a Nation',
    tomatoes: {
      viewer: [Object],
      dvd: [Object],
      critic: [Object],
      lastUpdated: [Object],
      consensus: 'Racial depictions aside, The Birth of a Nation is a landmark film whose achievements and pioneering techniques remain fully relevant today.',
      rotten: 0,
      production: 'Gravitas',
      fresh: 38
    },
    type: 'movie',
    writers: [
      'Thomas Dixon Jr. (adapted from his novel: "The Clansman: An Historical Romance of the Ku Klux Klan")',
      'Thomas Dixon Jr. (play)',
      'Thomas Dixon Jr. (novel)',
      'D.W. Griffith',
      'Frank E. Woods'
    ],
    year: 1915,
    _count: { comments: 0 }
  }
]

C:\Users\Jan\Documents\throwaway\9651>npx prisma -v
Environment variables loaded from .env
prisma                  : 3.10.0-dev.39
@prisma/client          : 3.10.0-dev.39
Current platform        : windows
Query Engine (Node-API) : libquery-engine 34c0995fcfd0aad58922d72470d74b34b232a879 (at<EMAIL_ADDRESS>
Migration Engine        : migration-engine-cli 34c0995fcfd0aad58922d72470d74b34b232a879 (at<EMAIL_ADDRESS>
Introspection Engine    : introspection-core 34c0995fcfd0aad58922d72470d74b34b232a879 (at<EMAIL_ADDRESS>Format Binary           : prisma-fmt 34c0995fcfd0aad58922d72470d74b34b232a879 (at<EMAIL_ADDRESS>Default Engines Hash    : 34c0995fcfd0aad58922d72470d74b34b232a879
Studio                  : 0.458.0
Preview Features        : mongoDb

Can you confirm @nikolasburk?

Thanks, this works for me as well now 👍


Merge bot could be more helpful when flakes require a retest

See https://github.com/kubernetes/kubernetes/issues/25212
I hardly ever get the syntax right for the "@k8s-bot please retest this" command. It would be nice if a failed test gave me the exact command (without the actual flake issue) that I needed to get a retest.
I was also confused by the behavior from the issue linked above. My command did trigger a retest, but @k8s-merge-robot didn't agree. To further confuse me, my command to @k8s-bot was deleted.

Yeah i think it deletes comments when you use #link instead of #number too

@bprashanth that one was fixed. Assuming the link was reasonable.

so @k8s-merge-robot is what complains, but @k8s-bot is what "does" the retest. @k8s-bot has no enforcement (this was intentional).  But at this point maybe we should 'enforce' it. But just yelling at people while still letting them get work done seems like a reasonable tradeoff.


Feature/spo listitem get

This PR adds a command to get list items as per #269

Coverage remained the same at 100.0% when pulling 4ecb94e67e290cc80b13779dfdb708c5ddb047ae on mpowney:feature/spo-listitem-get into 49160b3a52ca525a14d18273b45546c19a383f95 on SharePoint:dev.

Thanks @mpowney. Will have a look shortly!

Hey @mpowney, when trying to retrieve a list item from a list using the listId option, I'm getting the following error:
Error: The expression "web/lists/(guid'a3815d57-23cb-4c5f-a0fb-455c43ae2a9d')/items(1)" is not valid.

Command:
o365 spo listitem get -u https://m365x526922.sharepoint.com/sites/team-a -i 1 --listId a3815d57-23cb-4c5f-a0fb-455c43ae2a9d -f Id,Title,PnPCity

Could you see if you can repro?

Hey @waldekmastykarz, I've reproduced the error
Error: The expression "web/lists/(guid'a3815d57-23cb-4c5f-a0fb-455c43ae2a9d')/items(1)" is not valid.

and fix is committed. Also re-based with dev.

Excellent! Thanks for the quick turnaround @mpowney!


Remove monkey-patching?

Hello there, thank you for this great, and I mean great gem. :100:
I'm wondering if there is a chance that you would accept a PR that removes monkey patching.
This technique is dangerous and can conflict with other gems that try to redefine the same set of methods. If you search on GitHub for blank? definition, you'll get ~41,000 results. These gems doesn't even care to check if that method was previously defined.
This exposes mail to unforeseen compatibility problems with the Ruby ecosystem.
What are your thoughts about this? I can take care of this change, by submitting a PR.
Thanks in advance for your time and thanks for evaluating this request.

Wouldn't any library that defined blank? do so with the same basic concept of "blank-ness?"
It seems that defining blank? on a class would actually make it more compatible with the Ruby ecosystem, as the concept of "blankness" as a true/false is a common idea.  Monkey-patching it into Object just sets that idea at a very low level, allowing other classes to implement it as they need.
mail's implementation looks to be the same as activesupport, which has become the standard for this implementation in the Ruby ecosystem (not saying whether that's good or bad).

@darrencauthon Hello and thanks for the quick reply :smile:

Wouldn't any library that defined blank? do so with the same basic concept of "blank-ness?"

Not really, look at this implementation from https://github.com/makevoid/bitcoin_exchange
class String
  def blank?
    self == ""
  end
end

With the one from mail:
class String
  def blank?
    self !~ /\S/
  end
end

And the one from ActiveSupport:
class String
  BLANK_RE = /\A[[:space:]]*\z/

  def blank?
    BLANK_RE === self
  end
end

Now imagine if someone requires mail and then bitcoin_exchange, last win in this case, but that implementation is broken and can affect mail, because it relies on that behavior. For instance a string like this "     " will be no longer considered blank because of bitcoin_exchange.
My suggestion is to use something like Mail::String, so you are totally sure that once you'll invoke #blank? on that object, that is the implementation that you expect.
Please remember that we've just scratched the surface here with one single implementation of #blank?, which is only one of the several monkey-patches that mail uses. I'm not judging, just willing to help to improve this library :heart:

The mail monkey patches seem to be pretty close to active support, and they back out in favor of any other inplementation (presumably active support), so it seems to be a responsible usage of monkey patching.
I'm not high on monkey patching core classes, either -- even active support's work. But use of some of its monkey patches are so prevalent in Ruby, specifically Active*, I wouldn't worry too much about them so long as they kept the same behavior. Or gosh maybe just tack on the active support dependency, I don't know.
The Bitcoin gem seems to be irresponsible monkey patch due to the behavior that deviates from the Ruby norm.
—
Sent from Mailbox
On Fri, Nov 27, 2015 at 11:07 AM, Luca Guidi<EMAIL_ADDRESS>wrote:

@darrencauthon Hello and thanks for the quick reply :smile:

Wouldn't any library that defined blank? do so with the same basic concept of "blank-ness?"
Not really, look at this implementation from https://github.com/makevoid/bitcoin_exchange

class String
  def blank?
    self == ""
  end
end

With the one from mail:
class String
  def blank?
    self !~ /\S/
  end
end

And the one from ActiveSupport:
class String
  BLANK_RE = /\A[[:space:]]*\z/
  def blank?
    BLANK_RE === self
  end
end

Now imagine if someone requires mail and then bitcoin_exchange, last win in this case, but that implementation is broken and can affect mail, because it relies on that behavior. For instance a string like this "     " will be no longer considered blank because of bitcoin_exchange.
My suggestion is to use something like Mail::String, so you are totally sure that once you'll invoke #blank? on that object, that is the implementation that you expect.
Please remember that we've just scratched the surface here with one single implementation of #blank?, which is only one of the several monkey-patches that mail uses. I'm not judging, just willing to help to improve this library :heart:
Reply to this email directly or view it on GitHub:
https://github.com/mikel/mail/issues/936#issuecomment-160176862

@darrencauthon

The mail monkey patches seem to be pretty close to active support

I'm NOT saying that mail implements a wrong version of String#blank?.
My point is: if another gem with a bugged version of String#blank? is activated in a Gemfile, it breaks mail behaviors.
I've prepared a Gist to show, what I mean. Pheraps code, let me to explain better what I mean :smile:
Please try this simple test: https://gist.github.com/jodosha/d542b5d99ef4fa20bdbd
It adds a broken version of String#blank? that causes a bug for Mail.

Now, because Mail adds more or less a dozen of methods to Ruby core and stdlib, the impact of that the ecosystem (and it's broken – sigh – implementations) can be dangerous for Mail itself.

I hope I've better explained my point now. Thank you again for your time.

@jodosha I'd be interesting in see a PR that removes relying on blank?.  As @darrencauthon said, Mail only defines blank? when not already defined.  You're right that another gem that breaks blank would break Mail, but that's true for any gem, no?
FWIW, I once did this in another gem and broke blank :)  https://github.com/railsbp/rails_best_practices/pull/176

@bf4 @darrencauthon

Mail only defines blank? when not already defined.

That is great, but unfortunately other gems don't do that. We still have a problem. :smile:

You're right that another gem that breaks blank would break Mail, but that's true for any gem, no?

It's not about how Mail monkey-patches, it's about monkey-patching. Once you use it, you're exposed to this kind of problems.

I'd be interesting in see a PR that removes relying on blank?.

I can prepare a PR, only to remove blank in one code spot, just to show how this refactoring could be applied everywhere in the gem.

FWIW, I once did this in another gem and broke blank :)

Ouch. :smile:

@bf4 I've replaced it, just in one place, to show how it's possible to replace String#blank? with Mail::String#blank?.
I haven't created a PR request, because it requires a lot of work, and before to dive into such work, I wanted to make sure that it would be considered by you.
Anyway this is the small change: https://github.com/mikel/mail/compare/master...jodosha:replace-string-blank?expand=1

I'd recommend against doing it this way - building an object just to get the blank? method. A slightly simpler method might be to create a String module with a single blank? method on it, then call it as a function.
Something like:
'''
module Mail
def self.blank? input
# that AR logic
end
end
'''
A String class that can be instantiated seems a little confusing. It's not really a string, as you'll never need to use it that way. You really just want the function, so you might as well keep it as a function.
—
Sent from Mailbox
On Mon, Nov 30, 2015 at 3:28 AM, Luca Guidi<EMAIL_ADDRESS>wrote:

@bf4 I've replaced it, just in one place, to show how it's possible to replace String#blank? with Mail::String#blank?.
I haven't created a PR request, because it requires a lot of work, and before to dive into such work, I wanted to make sure that it would be considered by you.
Anyway this is the small change: https://github.com/mikel/mail/compare/master...jodosha:replace-string-blank?expand=1
Reply to this email directly or view it on GitHub:
https://github.com/mikel/mail/issues/936#issuecomment-160569571

I just dropped in a pull request that illustrates a much larger example of what removing the monkey patch could be.  I'm using a module like I mention above... which I strongly recommend, I think using an object in this case would make it much harder.
The gem seems to be solid.  The tests that are failing are those that depend on the monkey-patched method.  I'd continue and finish this now, but I have to get to work.

@darrencauthon That is great! I've used that object syntax, because it's inspired to what we do with Lotus. I'm still offering my help to reduce the amount of monkey-patching in Mail. Please let me know. Thanks! :smile:

I believe one day ruby will allow one to have fine-tuned "monkey" patches, so that you can have this behaviour as part of the Mail namespace but not outside of it; refinements go towards that way but they are not there yet. But this may be in the future... ruby 3.0 or who knows when...
jodosha has a good point about other gems causing breakage.

@shevegen That's already possible with refinements, though I've see some edge cases where it doesn't work right
@jodosha wrote:

look at this implementation from https://github.com/makevoid/bitcoin_exchange

I'd say that's really a bug in bitcoin_exchange.  Whenever I add a monkey-patch inspired by activesupport but choose not to require it, I base is on or copy it from activesupport.
That said, I'm all for not monkey-patching if there's a better way :) I'm enjoying the code and discussion in https://github.com/mikel/mail/pull/937

#1095


How to use the ML solution of Iris Depth and Hands simultaneously in MediaPipe?

We need to create a MediaPipe project on iOS, which uses the front-camera of the iPhone to run iris depth and hands recognition at the same time.
Specific usage scenarios:
We need to run a small game, in which we can track the iris and obtain the iris depth, and recognize hands gestures.
Real time input:
Live video streaming from iPhone front-camera
Real time output:

Processed video stream (original resolution, no content is rendered)
The position of the iris center point of the left eye (screen coordinate system)
The position of the iris center point of the right eye (screen coordinate system)
left_ iris_ depth_ mm
right_ iris_ depth_ mm
The position of 21 bone points in the hand (screen coordinate system)

Question:
How to create a “. pbtxt” in the MediaPipe Visualizer, which can simultaneously run iris depth and hands recognition?

Hello @xxxneo000
Please allow us sometime to ponder upon the solution and provide some pointers to your query.

OK，thanks very much

@ayushgdev OK，thanks very much.

@ayushgdev Is there a solution that uses both frameworks in MediaPipe?

@xxxneo000 no there is no ready to use solution in MediaPipe framework. But to address your query, we are working to produce such a graph. We really appreciate your patience.

@xxxneo000 no there is no ready to use solution in MediaPipe framework. But to address your query, we are working to produce such a graph. We really appreciate your patience.

OK.We also need FaceGeometry and Hands simultaneously in MediaPipe?

Hello @xxxneo000
Apologies for the late reply. We have discussed this internally and as much we would like to help on this front, we cannot provide a ready to use ".pbtxt" file at the moment.
However, to provide you some pointers to get started with, you have to manually merge the graphs of Iris Tracking and Hand Tracking.
You can use the ConcatenateNormalizedLandmarkListCalculator to merge the landmarks predicted by MediaPipe. As an example, you can refer to iris_tracking_cpu.pbtxt which merges face landmarks and iris_landmarks.
There might be some inefficiencies as we might be running the same calculator twice.
Also to provide a heads up, we are planning to look into graph/solution merging APIs but there is no concrete timeline for delivery.


Docker throws error on latest boot2docker

Just downloaded and installed latest boot2docker from https://github.com/boot2docker/osx-installer/releases/tag/v1.5.0 and docker client is throwing this error-
$ boot2docker version
    Boot2Docker-cli version: v1.5.0
    Git commit: ccd9032

$ docker version
    Client version: 1.5.0
    Client API version: 1.17
    Go version (client): go1.4.1
    Git commit (client): a8a31ef
    OS/Arch (client): darwin/amd64
    FATA[0000] Error response from daemon: client and server don't have same version (client : 1.17, server: 1.15)

edit: I'm running VirtualBox version 4.3.20 r96996

try rebooting your machine, that fixed for me. osx 10.10.1

I've had the exact same issue just now. I did the following to resolve the issue. Note that I didn't have any important images so I simply dropped everything and started from scratch.

Open VirtualBox and remove all images. (note that this might not be necessary.)
rm -rf ~/VirtualBox\ VMs.
Install the latest version of VirtualBox.
Install the latest version of boot2docker.
boot2docker init.
boot2docker start.
docker run hello-world.

Same issue for me.
You can use following command to upgrade boot2docker:
boot2docker upgrade

This download latest boot2docker iso and upgrade your VM.

Today I met the client and server version not the same problem
I download the Vbox latest version and boot2docker latest but get the bellow error ouput:
➜  ~  boot2docker start
Waiting for VM and Docker daemon to start...
..............................oooo
Started.
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
➜  ~  docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
FATA[0000] Error response from daemon: client and server don't have same version (client : 1.17, server: 1.15)
is there any solution

Today I met the client and server version not the same problem
I download the Vbox latest version and boot2docker latest but get the bellow error ouput:
➜  ~  boot2docker start
Waiting for VM and Docker daemon to start...
..............................oooo
Started.
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/kewin/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.
➜  ~  docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
FATA[0000] Error response from daemon: client and server don't have same version (client : 1.17, server: 1.15)
is there any solution

I had the same issue. boot2docker upgrade fixed it for me.

boot2docker upgrade worked for me.

boot2docker upgrade worked for me.

boot2docker upgrade worked for me as well. Closing issue.


Fix new module

Migrate the latest version of the dremio module to work with the version 1.1 of Fybrik
Refactoring

@roytman Removed the cache


build: reference transform options via jest TransformOptions type

Test plan

Green CI
Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information
N.A.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall first build on infra/improve-types at 96.017%

Totals

Change from base Build<PHONE_NUMBER>:
96.0%

Covered Lines:
4056

Relevant Lines:
4155

💛  - Coveralls


Support Lambda Capture

If a global variable is referenced in a lambda function, capture that in the ast
If a non-local variable is referenced in a lambda function, capture that in the ast
Same for a function that is inline.

Codecov Report

Merging #88 (7b2f577) into master (470a402) will increase coverage by 0.03%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   96.35%   96.39%   +0.03%
==========================================
  Files          14       14
  Lines         989      999      +10
==========================================
+ Hits          953      963      +10
  Misses         36       36

Flag
Coverage Δ

unittests
96.39% <94.73%> (+0.03%)
:arrow_up:

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

Impacted Files
Coverage Δ

func_adl/util_ast.py
90.78% <94.11%> (+0.70%)
:arrow_up:

func_adl/type_based_replacement.py
97.24% <100.00%> (ø)

Continue to review full report at Codecov.

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


Set div css flex-basis， PanelResizeHandle Slow

Whether it can be supported or not can be accelerated by adjusting the number of steps.

I don't know what you're reporting here. If it's a bug or a performance issue, you'll need to share a repro (like Code Sandbox or something) not just a picture.

Please have a look
https://codesandbox.io/embed/red-http-3gotpk?fontsize=14&hidenavigation=1&theme=dark
@bvaughn

Sorry. It's still not clear to me why you want to do this. Flex basis and grow are meant to be managed by this library. Overriding those styles will cause problems.

@bvaughn
Normally, the page is proportional.
In fact, the layout needs to be based on the actual size.
For example: left and right layout. I want the largest 300px and the smallest 200px on the left. There is no restriction on the right.

So this essentially boils down to your wanting support for min/max sizes in pixels? That's something I've consciously chosen not to support with this library. (See #114, #46, #47, #78)
I'm going to copy-paste my response form one of those other issues showing how you could tackle your own pixel constraints (if you want to do that) but I don't think you should use flex-basis for that.

Here is a way you could basically implement this in your application code:

https://codesandbox.io/s/react-resizable-panels-forked-m5qf69?file=/src/App.js

  const MIN_SIZE_IN_PIXELS = 100;

  const [minSize, setMinSize] = useState(10);

  useLayoutEffect(() => {
    const panelGroup = document.querySelector('[data-panel-group-id="group"]');
    const resizeHandles = document.querySelectorAll(
      "[data-panel-resize-handle-id]"
    );
    const observer = new ResizeObserver(() => {
      let height = panelGroup.offsetHeight;

      resizeHandles.forEach((resizeHandle) => {
        height -= resizeHandle.offsetHeight;
      });

      // Minimum size in pixels is a percentage of the PanelGroup's height,
      // less the (fixed) height of the resize handles.
      setMinSize((MIN_SIZE_IN_PIXELS / height) * 100);
    });
    observer.observe(panelGroup);
    resizeHandles.forEach((resizeHandle) => {
      observer.observe(resizeHandle);
    });

    return () => {
      observer.disconnect();
    };
  }, []);

Here my reasoning for not wanting to add it to the NPM package directly:

I think the problem with this is similar to the problem with external width/height props– either can change without PanelGroup/Panel re-rendering or being aware. (Example: an external stylesheet could define this style.)
So handling it fully would go from being something triggered only by pointer events to something that could be triggered by a lot of external things.
I don't think I want to try to support that level of complexity 😄

Check out https://github.com/bvaughn/react-resizable-panels/pull/176


Failure with @SubjectPreset not with @Restrict

Hello! I'm getting Auth Failure when I use @SubjectPresent and not when I use @Restrict...
I think I have the problem located but I cannot find a good reason about why this is happening.
On my beforeCorrect() method I set some data on context session to access it directly on getSubject(). I tested it with some examples with different roles (I use session to propagate user info and don't have to decode a token twice) and it worked. But when I use @SubjectPresent the session values are null.
Is there a problem with context when there is not a role check.
Thanks!

Are you doing anything in DeadboltHandler#beforeAuthCheck?

Sorry I mistake method names, beforeCorrect() is a private method I created and executes on  DeadboltHandler#beforeAuthCheck. In breforeAuthCheck() I look up for Authorization header, verify a JWT token and propagate the user info over the context sessions.
When I make use of @Restrict(SOME_GROUP) it works perfectly but when I use @SubjectPresent and search for context session info I saved before it is null. I thought could be a problem with context when @SubjectPresent is used or may be my code, I will check it again.
What surprised me was that it works with Restrict and don't with SubjectPresent.
PD. I will edit my initial post to change method names, sorry.

In the ‘SubjectPresent‘ annotation, you need to set the ‘forceBeforeAuthCheck‘ property to ‘true‘. Does that fix it?
Check the comments for that property for more details.

My bad, sorry. I didn't notice that. It's working now. Thank you.


StableBTreeMap Migrations

There is currently no way in Azle to recover the memory of a StableBTreeMap if you no longer need it. We should introduce a new param in the constructor of a StableBTreeMap called reclaim that is a boolean. If it exists, it will call new instead of init under-the-hood when creating the global Rust StableBTreeMap variable. This will allow the developer to reclaim the memory for a given memory id. The developer should then remove the reclaim param once the migration is complete.

We should probably introduce a new and init method on stable b tree map instances to more closely match the underlying API.


Truncate long post names on the list view

Either a text-elipse, or simply limit the char count of a post title 🤷

Probably both... I think a reasonable limit is ~30-50 characters and using ellipses (or a fade) for if it's longer than a full line


Add varying op cost to agent

@jackhack00 I am going to add it in deterministically for now to make it able to be replicated.
Are we sticking with 3 agents and if so what op costs do you want.
Other option is to set with random variable param at start of sim but it might be better to keep an operational cost constant across all the sims

Also operational costs right now are set to 0 across it looks like


add Installation method

hi @Hongbo-Miao
the master branch has been updated. please align your commit with the latest changes.
Thanks 👍

Link to here, much easy for me..