ref returns incorrect type when using generic type variables

Version
3.0.0-beta.14
Reproduction link
https://codesandbox.io/s/vanilla-typescript-sm1c6
Steps to reproduce
Open the reproduction, wait a while until editor has loaded and you will see red squiggly line under const mapped =  definition:
export function useMappedRef<T, MT>(
  original: Ref<T>,
  fn: (newVal: T) => MT
) {
  const mapped: Ref<MT> = ref(fn(original.value));
        ~~~~~~
}

What is expected?
I expected this code to work without any type errors.
What is actually happening?
I'm getting type error. Something along these lines:
Type 'UnwrapRef<MT>' is not assignable to type 'MT'.
    'UnwrapRef<MT>' is assignable to the constraint of type 'MT', but 'MT' could be instantiated with a different subtype of constraint '{}'

Maybe I'm doing something wrong with types here, but my minimal fake reproduction using fakeRef() compiles without errors, so I am not sure..

Should be like this
export function useMappedRef<T, MT>(
  original: Ref<T>,
  fn: (newVal: T) => MT
) {
  const mapped: Ref<UnwrapRef<MT>> = ref(fn(original.value));
}

when using generics is recommended to cast:
export function useMappedRefOriginal<T, MT>(
  original: Ref<T>,
  fn: (newVal: T) => MT
) {
  const mapped = ref(fn(original.value)) as Ref<MT>;
  return mapped;
}

Thank you both.
@zhangzhonghe: using your suggestion, I would still need to cast every time I assign to mapped.value.
@pikax: that works.
However, is that how it's supposed to work? Can it be improved?
I migrated from @vue/composition-api 0.4.0 where this used to work without casting of explicit UnwrapRef.

@dodas check https://github.com/vuejs/vue-next/pull/1129 and https://github.com/microsoft/TypeScript/issues/33942

@pikax Can we close this? I think the consensus is that this can't be made to work as UnwrapRef<T> can indeed, by design, return an interface that is not compatible with T?

Yes UnwrapRef<T> can and it will be different than T
As you can see in this example:

const a = reactive({
  b: ref(1),
  c: {
     ca: 1,
     cb: ref('11'),
     value: 2
  }
})

// it will return UnwrapRef<T>
/*
{
  b: 1,
  c: {
    ca: 1,
    cb: '11',
    value: 2
  }
}
*/

// Or by interface

interface Bespoke {
  b: Ref<number>
  c: {
    ca: number,
    cb: Ref<string>,
    value: number
  }
}

// the unwrap type of Bespoke will be

type UnwrappedBespoke = UnwrapRef<Bespoke>

/*
// UnwrappedBespoke  will be

interface UnwrappedBespoke {
  b: number
  c: {
    ca: number,
    cb: string,
    value: number
  }
}
*/

so why'd you close it?

I think the consensus is that this can't be made to work

so why'd you close it?

Because is not an issue, this behaviour is correct, please read and understand my example above

yea, sorry, I came from the other ticket linked here which doesn't have anything to do with this, actually.
I'm working on a separate issue.
Sorry.

There is a problem with the previous solutions. Initializing the ref(initialValue) with fn(original.value) will cause the ref function to actually unwrap the ref (in case MT was indeed a ref) and also unwrap any refs that might exist in nested properties of MT. Casting it to as Ref<MT> would be lying to the TypeScript compiler, since in reality the top-level ref might be containing something that doesn't look like MT anymore, but like MT with unwrapped refs.
It would be more correct to initialize the ref by passing null, force-cast that to Ref<MT>, and then assign the inner value of the ref to be the actual thing you wanted to put in there in the first place:
export function useMappedRefOriginal<T, MT>(
  original: Ref<T>,
  fn: (newVal: T) => MT
) {
  const mapped = (ref(null) as unknown) as Ref<MT>;
  mapped.value = fn(original.value);
  return mapped;
}

If this is intended, does that mean we cannot use generic fucntions with refs? Or is there some way we are supposed to be doing this?
For instance (trivial example)
function useThing<T>(value: number) {
    const valueRef = ref(value);

    function setValue(val: T) {
        valueRef.value = val;
    }
}

This results in:

Type 'T' is not assignable to type 'number'

So, if casting is lying, can this ref never be assigned to again...?


How to change GatheringDataPeriodType

I'm testing Tortoise because it looks promising. In order to accelerate the testing, I'm trying to figure out how to change the GatheringDataPeriodType from weekly to daily, so I can see results more quickly in a dev cluster.
It's not clear to me how or where to make that change. I tried modifying pkg/config/config.go, uninstalling, rebuilding, reinstalling, redeploying, but every new tortoise I create will always say:

It will take 1 week to finish gathering data and then tortoise starts to work actually

Can anybody help me out with the correct process?
Also, can this value be set at the workload level?

The cluster admin can set the global configurations via the configuration file, and the configuration file is passed via --config flag.

You have to create a config file with GatheringDataPeriodType and specify the path via --config flag.
https://github.com/mercari/tortoise/blob/main/docs/admin-guide.md

Also, can this value be set at the workload level?

No, unfortunately this is (only) a global parameter.

Thanks for your answer. It works (not sure how I missed that).
Just needed to either modify file:
config/manager/controller_manager_config.yaml

to include the GatheringDataPeriodType as a top-level key before installation:
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
  healthProbeBindAddress: :8081
metrics:
  bindAddress: <IP_ADDRESS>:8080
webhook:
  port: 9443
leaderElection:
  leaderElect: true
  resourceName: 76c4d78a.mercari.com
GatheringDataPeriodType: daily

or edit the configmap in place after installation:
kubectl edit cm -n tortoise-system tortoise-manager-config
Then:
$ kubectl get cm -n tortoise-system tortoise-manager-config --output yaml | grep PeriodType
    GatheringDataPeriodType: daily

$ kubectl describe -n $MY_NAMESPACE tortoise.autoscaling.mercari.com/default-tortoise | tail

# Tortoise is initialized and starts to gather data to make recommendations.
# It will take 1 day to finish gathering data and then tortoise starts to work actually

Thanks again!


Cloudflare connection discrimination breaks Console pages

When I try to load the Console (https://console.akash.network/) on Tor Browser, the loading spinner spins forever, blocking access to the Your Account section. The reason is that requests to api.cloudmos.io are triggered by Cloudflare and return garbage 403 captcha page (and missing CORS headers) instead of the API responses.

Please consider removing Cloudflare or making it less of a hassle for users to work around the way it breaks the site. Otherwise, please advise some easy way of self hosting. I can't tell from the Readme if Cloudmos is a service I would be able to host or not. But frankly it might be too much of a hassle for me to set up my own nodes...

Hello @mashdragon
Happy weekend
I have checked the akash project and very interested in this
I would love to engage in your team and contribute in this project

@Oyase-shinobi I have no direct affiliation with akash project. Since this is a deployment configuration issue, I don't think you would be able to contribute.

@mashdragon
I see
Thanks

There seems to be an issue with CORS and TOR. https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/18080
We suggest you use Chrome based browsers to use Akash Console.

This is not an issue with Tor Browser. The reason there is a CORS issue is that Cloudflare does not send a proper CORS response when it's giving you a response saying you are blocked, since the request never makes it to Akash's servers to begin with.
Generally most blockchain applications try to give access to Tor users because anonymity and decentralization is something they value, and if a Tor user can access it, that means everyone can. Bitcoin's node software had support for routing connections over Tor since Satoshi. Please give this another thought.

We can try other solutions sure


Suggestion: Change default DTMF intertone gap

The INFO implementation of DTMF has a default intertone gap of 500ms which is obscenely long. The default intertone gap for RTCDTMFSender is 70ms. Consider reducing the default of the former to something closer to RTCDTMFSender's default for parity.

I think that INFO gap is so long due to compatibility with gateways converting it into inband dtmf. I would be alright with making it a configuration option on the UA.


[Vagrant]: fatal: unsafe repository ('/home/vagrant/go/src/github.com/cilium/cilium' is owned by someone else)

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
For some git versions, using the provided Vagrantfiles to set up Cilium environment will lead to the below error:
fatal: unsafe repository ('/home/vagrant/go/src/github.com/cilium/cilium' is owned by someone else)
I use to fix it by adding, as recommended, the cmd git config --global --add safe.directory /home/vagrant/go/src/github.com/cilium/cilium in the Vagranfile.
If, you, guys, think it is an acceptable solution, let me know to make a PR.
Cilium Version
Client: 1.11.90 dfa6b157e8 2022-05-13T13:42:00-07:00 go version go1.18.1 linux/amd64
Daemon: 1.11.90 dfa6b157e8 2022-05-13T13:42:00-07:00 go version go1.18.1 linux/amd64
Kernel Version
Linux 5.18.0-rc1-gd54d06a4c4bc
Kubernetes Version
v1.23
Sysdump
No response
Relevant log output
No response
Anything else?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

:wave: thanks for your issue.
There is development guide mentioning about .devvmrc file, which can be used to setup git config in VM. Majority of cilium developers might probably have git user details configured in this file, however, there is no harm to have additional safe.directory attribute as an alternative option.
https://docs.cilium.io/en/stable/contributing/development/dev_setup/


Fix disabled-text scss styling to meet a11y standards

disabled-text usage should be replaced to meet accessibility contrast requirements
Replace disabled text usage to new shared constant:

[ ] badge
[ ] datepicker
[ ] form field
[ ] input
[ ] select
[ ] stepper
[ ] tabs

@josephperrott do you remember at all what prompted this issue? Did we get a report about the contrast being poor?

I discovered the issue while performing aXe tests across the codebase.  The disabled-text check failed in its usages here.
If I remember correctly, we determined that for many of these we would need to consult with the Material team to determine if it was a spec issue or something in our implementation.

For inputs now I see

a 4.57:1 contrast ratio on disabled text in dark mode. This is okay.
a 2.66:1 contrast ratio on disabled text in light mode. This is failing.

Taking a look...

What are the latest thoughts on disabled-text styles (light and dark) not meeting a11y contrast guidelines?
https://github.com/angular/components/blob/40ceda28fd4c8477a368e4631e3eaf945cb99106/src/material/core/theming/_palette.scss#L29-L36
This issue doesn’t have much detail, but seems to hint at there being a need to change the opacity value for these disabled-text styles. It seems like the short term workaround, was to change most things to just use secondary-text instead. But this has been in this state for about 3 years. Did we determine that this was too breaking, did we never get design feedback, or did we just not follow up on it until now?
We could

Update the disabled-text opacities to be the same as those for secondary-text
We could change a lot of usages of disabled-text to secondary-text like in this PR.
Or we should change both secondary-text and disabled-text to new opacity values.

It seems like the spec doesn’t constrain us to a specific set of opacity values anymore? It only gives examples via some of their custom themes.

disabled-text is referenced 47 times in about 19 files (some of them _palette.scss) in src/material/, but src/material-experimental only refers to $dark-disabled-text once directly for use with the FormField w/ native select when using a dark theme. As mentioned in https://github.com/angular/components/pull/19232#discussion_r654753190 (with a screenshot), on macOS with the OS configured for dark mode (and Material using a dark mode), these styles are completely ignored for the native select dropdowns. So that style should have no impact on a11y in many (maybe all) cases.
Thus I think that this one is safe to mark as Fixed in MDC.

Also, WCAG states the following:

Text or images of text that are part of an inactive user interface component, that are pure decoration, that are not visible to anyone, or that are part of a picture that contains significant other visual content, have no contrast requirement.

So TL;DR disabled controls don't actually have a text contrast requirement. Personally I think this is not the best, but that's the standard today. If we can confirm that all of these cases are genuinely for inactive controls, that lowers the priority in my estimation (to P4).
@Splaktar  I don't think this can be fully fixed in MDC, though, since we don't have (or plan to have) MDC versions of badge, datepicker, or stepper.

Okay, then we need to fix this in @angular/material for

[ ] matBadge
[ ] mat-datepicker
[ ] mat-stepper

And verify that the following MDC-based components in @angular/material-experimental pass a11y contrast standards

[ ] mdc-input
[ ] mdc-select
[ ] mdc-tabs

Yep, that sounds right.

Looked quickly at a M3 select that uses the Azure and Blue light theme on the docs site. The disabled text has a contrast of 2.33:1. So removing the 'Fixed in MDC' label


[WIP] Structured data for scrolled entries

REDMINE-17390

Coverage remained the same at ?% when pulling 67f9e6f53caf8890af6345eca35d7c0bd7444b5f on tf:scrolled-structured-data into 72d34b944007476147739513b4707fdd9ca6abd0 on codevise:master.


Navigation Context for Shadow Pages

When a page is set as shadow, it is not shown in the navigations context unless the user added to a context and save the page before checking and saving the page as a shadow. This could be easily fix by keep the navigation context dropdown active for shadow pages.
Steps to reproduce:

Create a page in any language, give it a name, url, publish it and save it. Now add it to a navigation context and save it again.
Use the localization dropdown to create a translation for the page.
Without changing a thing, go to settings and select a shadow language and check the shadow page checkbox.
Check that the translated page is not show in the navigation menu.

@berndhep what would you say to that fix? technically it would be no problem to solve that issue if we keep the dropdown active!

@sRmarcos @berndhep i have talked to @chirimoya a few days ago about that topic ... the navigation context should be derived from shadowed language!

@wachterjohannes Yes, you are definitely right.

https://github.com/sulu-io/sulu-standard/issues/445

@chirimoya Guess you have linked the wrong number here ;-)

I think the issue this is a duplicate of is https://github.com/sulu-io/sulu/issues/1007

;-) thx


[terra-clinical-item-view] Implement item view as unordered list

Note: This PR is a little messy right now as it's pointing towards UXPLATFORM-9563. Once that's merged this will be able to be rebased with main and it'll clean up better.
Summary

What was changed:

Implementing the usage of unordered lists to contain the displays as list items
Split out the logic into more individual methods for readability/because there were so many different scenarios to handle
add guidance for consumers about adding a header for the item view

For two column layout (this includes the byRow formatting) the implementation of the unordered lists is slightly different. It works as an unordered list that contains the two columns as list items. Each column is an unordered list as well that contains the displays as list items.
For normal two column layout:
Unordered  List
-> list item 1 (column 1 as UL) -> column 1's displays as list items
-> list item 2 (column 2 as UL) -> column 2's displays as list items
For by row two column layout:
Unordered List
-> list item 1 (row 1 as UL) -> row 1's two displays as list items
-> list item 2 (row 2 as UL) -> row 2's two displays as list items
-> list item 3 (row 3 as UL) -> row 3's two displays as list items
-> list item 4 (row 4 as UL) -> row 4's two displays as list items
When there is just a single display passed in to the item view we don't treat it as part of a list.
Why it was changed:
This was changes so we have greater context when using the screen reader of how this information is grouped.
Testing

This change was tested using:

[x] WDIO
[x] Jest
[x] Visual testing (please attach a screenshot or recording)
[ ] Other (please describe below)
[ ] No tests are needed

Reviews
In addition to engineering reviews, this PR needs:

[ ] UX review
[x] Accessibility review
[ ] Functional review

Additional Details
Validation posted below, first two are how the implementation will read when the consumers adds their header. Also added a recording of the 'by row' readout since it is different than the other two.
https://github.com/cerner/terra-clinical/assets/40574651/01f0aed2-295e-4132-a864-008b6909b23b
https://github.com/cerner/terra-clinical/assets/40574651/9277ff13-18b7-4388-a5e9-aed899b46f73
https://github.com/cerner/terra-clinical/assets/40574651/3e4aa3c1-5603-40f4-9a2c-3f46f216672c
https://github.com/cerner/terra-clinical/assets/40574651/5435fb24-660f-4862-a81b-226304a594b2
https://github.com/cerner/terra-clinical/assets/40574651/e669bcfc-7506-458c-90e6-37655f295530
https://github.com/cerner/terra-clinical/assets/40574651/8b8bd224-fd58-426f-b4e7-e37e1db26a1c
This PR resolves:
UXPLATFORM-9430

Thank you for contributing to Terra.
@cerner/terra

@eawww @sycombs @sdadn this is ready to be looked when you've got a moment

Posting in it's own comment - I was having trouble getting the header label to read out with JAWs. Dug around a bit and JAWs by default does not read out headers for lists. More on that here: https://stackoverflow.com/questions/36882441/jaws-not-reading-listview-column-headers
So since by default it doesn't read them out (presumably for some reason that the JAWs team has determined) this should be good in that regard. Just to be as thorough as possible I've been trying to figure out how to switch the settings so it will read out the header, but I've had no luck so far. I've tried to do these steps but I can't access the manager it seems? https://docs.oracle.com/applications/smartview/610/SVAAA/enabling_jaws_to_read_listview_headers.htm#SVAAA-smart_view_accessibility_book_4
I've posted recordings to at least show that it's reading them out as a list now. Does the above JAWs behavior sound reasonable? Not sure if I'll be able to get recordings with that setting working.

Does this depend on #912 ? If so, I'll review it once that gets merged to avoid messy diffs and merges.

#912 Has been merged, once you update it with main, I can review this.


Make level: and mod: links work for about.md files

Geode Version
v2.0.0-beta.14
Related Problem
As specified in the Geode documentation on the MDTextArea class

Note that links also have some special protocols. Use user:<id> or user:<name> to link to a GD account; level:<id> to link to a GD level and mod:<id> to link to another Geode mod.

currently only "user:" links work not "mod:", nor "level:" links.
Your Solution
To be able to use "level:" and "mod:" links in game for MDTextArea.
Additional Information
Currently, when you click "level:" or "mod:" links in Geometry Dash on a Mod's about.md (or a MDTextArea class), they go to Windows instead of going to the level or mod in the game. Windows asks what application you want open the link with, Geometry Dash is not listed and instead their is only one option, look for an app on the Microsoft Store.

For the additional: that's an OS level assignment of a default program to open .md (markdown) files. You don't want that because Geometry Dash isn't the only program that uses markdown, and trying to open non-GD-formatted files with GD will end poorly.

@Corsaka thats not about the md file, thats about clicking a level: or a mod: link inside of the game in an MDTextArea, not double-clicking a file in windows explorer.

...which attempts to open it as a markdown file.

idk what ur on brah this is just about the geode provided MDTextArea, which has special tags already like user: to open the profile of an account. this has nothing to do with windows file assignment

fixed in #664


original tflite model before quantization pose landmark?

Hello, your human pose landmark model is very effective, and we want to apply it to other places, but the current tflite model after quantization. After converting it to onnx, the model output is inconsistent. Can you provide a tflite model before quantization or an onnx model? Thank you very much.

Hi @chaowentao, Could you please elaborate your inconsistent model output in the form of errors or any video screenshot to understand it much better. And we would encourage to use python pose solution rather using the tflite model, If you're targeting  python platform.

Have you solved your problem?

Hi @chaowentao @hongyaohongyao, You can get the original weight at this link.
https://github.com/PINTO0309/PINTO_model_zoo/tree/main/053_BlazePose/10_lite_full_heavy_version_May6_2021


Stats tracking improvements

This does two things:

Adds stats for stream opening and closing
Moves the decrementing of recvLoop until after we've closed the underlying connection (just in case that might hang or something)

LGTM!

Thanks @joesis!


Fix memo bug, allow conversation rounds to run in parallel

This change:

Fixes a bug where memoized streams sometimes duplicated their content
Refactors <Converse> to allow the rounds to run in parallel when the content allows

Yeah it's sort of mind-bending and I have to constantly remind myself why it matters. The relevant difference between:
yield AI.AppendOnlyStream;
yield x;
yield y;

and
return [x, y]

is that in the top one, x will (might, depending on what the parent does) be rendered to completion before y starts being rendered, whereas in the second one they will render in parallel. What makes it especially mind-bending is that in this case y actually has an internal partial dependency on x. So the trick is to construct a render tree with inter-branch dependencies rather than inter-frame dependencies where possible.


Extract REST methods on application.properties

In order to make configurable REST api methods accessed by the Connector, it would be better extract that configuration to application.properties

Iteration 1 comment


Proof of concept: nested taxonomies

Like in this forum post: Nested taxonomy terms - tips & tricks - HUGO

I think this can be deemed done by https://github.com/loikein/hugo-tufte/tree/main/layouts/book.


helm upgrade/delete intermittently fails with errors like "unable to create impersonator account: error setting up impersonation for user u-xxxxx"

Rancher Server Setup

Rancher version: 2.6.0
Installation option (Docker install/Helm Chart): ?
Proxy/Cert Details: ?

Information about the Cluster

Kubernetes version: ?
Cluster Type (Local/Downstream): Downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): ?

Describe the bug

Running helm upgrade / helm uninstall for an unknown application intermittently fails with errors like this:
error: unable to recognize "/tmp/kubectl_replace_486731274/resource.stdin": an error on the server ("unable to create impersonator account: error setting up impersonation for user u-8j72f: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-8j72f\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding

Error: uninstall: Release not loaded: katana-api-dev: query: failed to query with labels: an error on the server ("unable to create impersonator account: error setting up impersonation for user u-8j72f: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-8j72f\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding (get secrets)

Additional context

Created from the following comment: https://github.com/rancher/rancher/issues/34187#issuecomment-914575796

Some details: Downstream cluster is microk8s (3 nodes, k8s 1.21.3), I am not using the authorized cluster endpoint, we are calling rancher directly using the rancher API to create the kubeconfig. Then using that kubeconfig with helm and kubectl commands via CI pipelines.
Helm version is 3.6.2 and the error occurs when trying to upgrade or delete a chart, I'm not sure about install as I haven't tested that extensively yet. One example of a chart where this happened on is: https://github.com/codecentric/helm-charts/tree/master/charts/keycloak the rest are internal charts that are based off of the GitLab auto-deploy chart.
It doesn't occur consistently but it does occur enough to cause me to not want to upgrade our production Rancher cluster yet.

@anupama2501 to try to reproduce this before the weekend.

@andrew-landsverk-win , so far I could not reproduce it, but others are looking into it as well.
Couple questions:

I'm guessing you're using non-admin credentials in this flow. What kind of user is it and what access they have to downstream cluster and Rancher cluster?
How often does keycloak chart upgrade/uninstall fails? I understand it happens often enough for you to hold off upgrading, but it would be helpful for us to know for reproduction. One out of how many times on average does it fail?

The user is a local rancher user, globally they have:

Create new clusters
create RKE template revisions
use catalogs

For the downstream cluster, they are a Cluster Owner.
On average, I'd guess 1 in 5 times? It's been inconsistent so far :(
Is there something else I can look into the next time it fails, some logs somewhere?

@andrew-landsverk-win , thank you for this additional info, this is helpful.
As for the logs, there is logging for this added impersonation code, but most of them are at TRACE level. So if's feasible to enable trace logging for your Rancher pod(s) (or Docker container if that's how you're running it), these logs could be helpful. Since those will be rather large, knowing exact time stamp you've got the failure would help a lot with narrowing down our search.

Sure, how would I go about enabling TRACE on the rancher pods?

@andrew-landsverk-win , this should help: https://rancher.com/docs/rancher/v2.6/en/troubleshooting/logging/

Looks good, I'll try to capture it next time it happens, although I don't think I'll leave trace on too long without watching it :)

@cmurphy , since you're back on Monday and it much more familiar with this code than anyone else, please investigate this issue.

I'm not able to reproduce either. I tried the following:

Created a rancher HA
Created 1 user with global permissions - user1 :

Create new clusters
create RKE template revisions
use catalogs

Create a cluster as user1
Using the kubeconfig, and via helm v3.4.1, installed the app helm install keycloak codecentric/keycloak  and upgraded it a few times helm upgrade --install keycloak, have not seen the error mentioned
Downloaded rancher cli and logged in as admin and added the catalog codecentric https://codecentric.github.io/helm-charts
as user1 from rancher cli installed the app ./rancher app install keycloak codecentric/keycloak , and don't see the error mentioned above.

@andrew-landsverk-win would you be able to provide us any helm upgrade commands that were used or how the app was installed and the upgraded ?

Sure, the process goes like this:

Login to rancher cluster via Rancher CLI 2.4.12 as Cluster Owner user via token, to obtain kubeconfig file: rancher login $KUBE_SERVER -t $KUBE_TOKEN --context $KUBE_PROJECT_ID
Write out a kubeconfig file:  rancher kubectl config view --raw > ~/.kube/config``
Use said kubeconfig file to launch helm v3.6.3 :
helm upgrade --install --values values.yaml --namespace=keycloak --version=15.0.2 --repo=codecentric keycloak keycloak

values.yaml:
---
replicas: 2
rbac:
  create: true
  rules:
    - apiGroups:
        - ""
      resources:
        - pods
      verbs:
        - get
        - list

affinity: |
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
            - key: app.kubernetes.io/instance
              operator: In
              values:
                - keycloak-dev
        topologyKey: kubernetes.io/hostname

resources:
  requests:
    cpu: "1000m"
    memory: "2048Mi"
  limits:
    cpu: "1000m"
    memory: "2048Mi"

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
  rules:
    - host: dev-keycloak.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - hosts:
        - dev-keycloak.example.com
      secretName: star-example-com

@andrew-landsverk-win , thank you for providing this additional info.
Couple follow up questions / requests:

I see you run helm upgrade --install - does the app exist on the downstream cluster already and is actually being upgraded or it doesn't exist and fresh install is actually run?
If would be great If you could provide full output of helm command on an attempt that has failed.
Thank you for your help with investigating this.

The app may or may not exist when you run helm that way, if it doesn't exist, it gets created, if it does, it gets upgraded
This is all I get when it failed:

W0907 12:43:53.267131      51 helpers.go:557] --dry-run is deprecated and can be replaced with --dry-run=client.
error: unable to recognize "/tmp/kubectl_replace_486731274/resource.stdin": an error on the server ("unable to create impersonator account: error setting up impersonation for user u-8j72f: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-8j72f\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding

I'm unsure about that first bit of the error /tmp/kubectl_replace_XXXXXX/resource.stdin could be an issue on the machine running kubectl or something on the node? However, these errors only showed up when upgrading to rancher 2.6.0 so it's still unclear to me :) I really appreciate the help though!

Hi @andrew-landsverk-win, I have a couple of clarification questions:

Is the local Rancher cluster a helm deployment on a kubernetes cluster, or a docker installation?
If it's a helm install, how many nodes is it running on?
When you say "these errors only showed up when upgrading to rancher 2.6.0", that's an in-place upgrade from 2.5.9 to 2.6.0, not a fresh 2.6.0 install, right?

In this case, it is a single node helm install and yes it was an in place upgrade from 2.5.9 to 2.6.0.

I just ran into a very similar sounding issue. I also upgraded from 2.5.9 to 2.6.0. Plus I changed over from Keycloak SAML to OIDC as the auth provider. This might be relevant here as I observed the following:
While I was getting the error
unable to create impersonator account: error setting up impersonation for user u-96k65: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \\\"cattle-impersonation-u-96k65\\\": the object has been modified
I checked said clusterRole in the affected RKE cluster and noticed that the resource kept being updated by rancher. What changed between each resource version was the order of the resourceNames in the rules of the clusterRole:
rules:
- apiGroups:
  - ""
  resourceNames:
  - u-96k65
  resources:
  - users
  verbs:
  - impersonate
- apiGroups:
  - ""
  resourceNames:
  - keycloakoidc_group://SomeGroup
  - keycloak_group:///SomeGroup
  - system:authenticated
  - system:cattle:authenticated

next resource version:
rules:
- apiGroups:
  - ""
  resourceNames:
  - u-96k65
  resources:
  - users
  verbs:
  - impersonate
- apiGroups:
  - ""
  resourceNames:
  - keycloak_group:///SomeGroup
  - keycloakoidc_group://SomeGroup
  - system:authenticated
  - system:cattle:authenticated

Notice that the two keycloak group names have switched position. The issue in the code seems to be more or less here. Because the resourceNames do not appear to be ordered this DeepEqual frequently returns false.
So I'm not actually sure if this only can happen if you have two auth providers configured but I guess a simple sort on that resourceNames slice should fix this.
@andrew-landsverk-win Does your user also have groups attached?

@ctrox  here are the rules for my ClusterRole:
rules:
- apiGroups:
  - ""
  resourceNames:
  - u-8j72f
  resources:
  - users
  verbs:
  - impersonate
- apiGroups:
  - ""
  resourceNames:
  - system:authenticated
  - system:cattle:authenticated
  resources:
  - groups
  verbs:
  - impersonate
- apiGroups:
  - authentication.k8s.io
  resourceNames:
  - local://u-8j72f
  resources:
  - userextras/principalid
  verbs:
  - impersonate
- apiGroups:
  - authentication.k8s.io
  resourceNames:
  - gitlab-deploy
  resources:
  - userextras/username
  verbs:
  - impersonate

Interesting, so no keycloak auth provider. In the meantime I have created a new local user and while I still see the error unable to create impersonator account appear from time to time it is way less frequent than with the keycloak user. I can see that the clusterRole is still frequently updated by rancher so I guess there is some other bug in that update logic that causes this.

I do not use keycloak for auth inside the cluster, we use it for an application that runs on the cluster though.

Just to add some more information, I added a logrus.Info(cmp.Diff(role.Rules, rules)) in this block to see what is constantly changing in that ClusterRole. This is the diff I got over and over, one update call would empty out the ResourceNames while the next one would add them back again.
  {
    Verbs:           {"impersonate"},
    APIGroups:       {"authentication.k8s.io"},
    Resources:       {"userextras/principalid"},
-     ResourceNames:   []string{""},
+     ResourceNames:   []string{"local://u-wf2jf"},
      NonResourceURLs: nil,
    },
    {
      Verbs:           {"impersonate"},
      APIGroups:       {"authentication.k8s.io"},
      Resources:       {"userextras/username"},
-     ResourceNames:   []string{""},
+     ResourceNames:   []string{"username"},
      NonResourceURLs: nil,
    },
  }

This is a local user, so nothing related to Keycloak.
So out of curiosity I scaled Rancher to a single replica (from 3) and now I see way less of these diffs and so far I did not see the "unable to create impersonator account" error again.

Thanks for all the hints, @ctrox and @andrew-landsverk-win, I was able to reproduce it and I will have a patch incoming soon.
@anupama2501 here's what I did to reproduce:

Deploy Rancher 2.6.0 via helm (no need to upgrade from 2.5.9 to 2.6.0)
Import a downstream cluster, I used a kind 1.21.1 cluster but it shouldn't matter what version or distribution
Create a local user and add them as a cluster owner
As the new user, download a kubeconfig for the downstream cluster (doesn't matter if you use the rancher CLI or the UI to get the kubeconfig)
Using that kubeconfig, run any kubectl command against it in parallel, I used xargs for this:

$ for i in `seq 1 10` ; do echo kubectl get pod -A ; done | xargs -I {} -P 10 bash -c "{}"
Error from server (InternalError): an error on the server ("unable to create impersonator account: error setting up impersonation for user u-wrhhk: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-wrhhk\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding (get pods)
Error from server (InternalError): an error on the server ("unable to create impersonator account: error setting up impersonation for user u-wrhhk: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-wrhhk\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding (get pods)
NAMESPACE             NAME                                         READY   STATUS    RESTARTS   AGE
cattle-fleet-system   fleet-agent-b94869475-hqjlw                  1/1     Running   0          41m
cattle-system         cattle-cluster-agent-6cbdc4f846-qfms5        1/1     Running   0          41m
kube-system           coredns-558bd4d5db-mn8fv                     1/1     Running   0          63m
kube-system           coredns-558bd4d5db-vlbkr                     1/1     Running   0          63m
kube-system           etcd-kind-control-plane                      1/1     Running   0          64m
kube-system           kindnet-6mdsf                                1/1     Running   0          63m
kube-system           kube-apiserver-kind-control-plane            1/1     Running   0          64m
kube-system           kube-controller-manager-kind-control-plane   1/1     Running   0          64m
kube-system           kube-proxy-td748                             1/1     Running   0          63m
kube-system           kube-scheduler-kind-control-plane            1/1     Running   0          64m
local-path-storage    local-path-provisioner-547f784dff-bsnqw      1/1     Running   0          63m
NAMESPACE             NAME                                         READY   STATUS    RESTARTS   AGE
cattle-fleet-system   fleet-agent-b94869475-hqjlw                  1/1     Running   0          41m
cattle-system         cattle-cluster-agent-6cbdc4f846-qfms5        1/1     Running   0          41m
kube-system           coredns-558bd4d5db-mn8fv                     1/1     Running   0          63m
<snipped>

After the first initial errors it will go away, you can remove and re-add the user to the cluster to see the errors again.
I haven't reproduced @ctrox's exact issue with the reordering of groups but I imagine it should be doable by setting up an auth provider where the user has multiple groups coming from the auth provider, or doing what @ctrox did and switching from one auth provider to another.

Not sure if that's exactly the same issue, but it maybe:

I just upgraded a Rancher cluster from 2.5.9 to 2.6.0. It now fails to upgrade the agent in the downstream cluster.
No keycloak is in use, but we use FreeIPA authentication, if that's matter.

Hi @tuxpeople, this error looks different and probably has a different root cause. I opened https://github.com/rancher/rancher/issues/34824 for it. Can you add more information about how to reproduce the error to that issue? How is rancher deployed and upgraded, how many nodes is it running on? What users have roles for that cluster? Does it happen consistently or just sometimes?

@cmurphy  - that was my experience as well I think, that's why I said "randomly" initially. Having seen your analysis, I realized my CI jobs that do deployments to Rancher-managed clusters use different users for the downstream clusters. After the initial error, they all worked as they should, like you mention. Thank you so much for the work and the fix on this issue! :)

Able to reproduce the issue on v2.6.0

Bring up an HA rancher server of v2.6.0 version
Create an rke1 cluster with 3 nodes all roles in each [rke version: v1.3.0]
Once the cluster is up, from the rancher server, use import an existing cluster Generic type option to create a cluster.
Run the command curl --insecure -sfL https://<redacted> | kubectl apply -f -  against the cluster created in step2
imported cluster registers with the rancher server.
Create a local user from users & auth  - user1
Add the new user to the imported cluster as a Cluster owner
Log in as the user1 and download the kube config file
Run the kubectl command with the kubeconfig file downloaded for i in seq 1 10 ; do echo kubectl get pod -A --kubeconfig rkeimport.yaml; done | xargs -I {} -P 10 bash -c "{}"
Error is seen in the output:

for i in `seq 1 10` ; do echo kubectl get pod -A --kubeconfig rkeimport.yaml; done | xargs -I {} -P 10 bash -c "{}"
Error from server (InternalError): an error on the server ("unable to create impersonator account: error setting up impersonation for user u-d57bn: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-d57bn\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding (get pods)
Error from server (InternalError): an error on the server ("unable to create impersonator account: error setting up impersonation for user u-d57bn: Operation cannot be fulfilled on clusterroles.rbac.authorization.k8s.io \"cattle-impersonation-u-d57bn\": the object has been modified; please apply your changes to the latest version and try again") has prevented the request from succeeding (get pods)
NAMESPACE             NAME                                       READY   STATUS      RESTARTS   AGE
cattle-fleet-system   fleet-agent-b94869475-zkwzr                1/1     Running     0          5m21s

Verified on the v2.6-head 223ec88
Upgrade scenario
Followed the same steps as above reproduction steps to create rancher server on v2.6.0
Upgraded the rancher server to v2.6-head version
As the auth user, tried running the command for i in seq 1 10 ; do echo kubectl get pod -A --kubeconfig rkeimport.yaml; done | xargs -I {} -P 10 bash -c "{}"
Verified no errors were seen
New user on an upgraded setup
Created a new user
Added the user as a cluster member and ran the kubectl command
Changed the permission from cluster member to cluster owner
tried running the command and no errors were seen
On a fresh install of v2.6-head
Created a new user as an admin,
Added the user to the cluster as cluster member,  and then later changed to cluster owner
Ran the kubectl command, no errors were seen

waiting for https://github.com/rancher/dashboard/issues/4271 to validate https://github.com/rancher/rancher/issues/33912

Validated https://github.com/rancher/rancher/issues/33912

Created an rke2/rke1 and imported rke cluster node driver DO, 1 node all roles
Added a group as cluster owner from cluster --> RBAC --> members
Logged in as a user from the group and verified pod security policies load without any error for rke2 cluster.
Verified k8s/clusters//apis/, all APIs load without an error for all the three clusters

Installed cert-manager in the downstream cluster as follows:
helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.crds.yaml
kubectl create ns cert-manager
helm install cert-manager --version 1.0.4 --namespace cert-manager jetstack/cert-manager

Verified the resources of the above app, load without any issue


add metadata to regions table

there is an aws managed ssm param that contains queryable metadata for regions:
{
    "Parameters": [
        {
            "Name": "/aws/service/global-infrastructure/regions/us-east-1/domain",
            "Type": "String",
            "Value": "amazonaws.com",
            "Version": 1,
            "LastModifiedDate": "2019-04-21T14:14:22.858000-04:00",
            "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/regions/us-east-1/domain",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/regions/us-east-1/geolocationCountry",
            "Type": "String",
            "Value": "US",
            "Version": 1,
            "LastModifiedDate": "2019-04-17T22:13:03.395000-04:00",
            "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/regions/us-east-1/geolocationCountry",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/regions/us-east-1/geolocationRegion",
            "Type": "String",
            "Value": "US-VA",
            "Version": 1,
            "LastModifiedDate": "2019-04-17T22:13:03.953000-04:00",
            "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/regions/us-east-1/geolocationRegion",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/regions/us-east-1/longName",
            "Type": "String",
            "Value": "US East (N. Virginia)",
            "Version": 1,
            "LastModifiedDate": "2019-04-17T22:13:04.011000-04:00",
            "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/regions/us-east-1/longName",
            "DataType": "text"
        },
        {
            "Name": "/aws/service/global-infrastructure/regions/us-east-1/partition",
            "Type": "String",
            "Value": "aws",
            "Version": 1,
            "LastModifiedDate": "2019-04-17T22:13:07.217000-04:00",
            "ARN": "arn:aws:ssm:us-east-2::parameter/aws/service/global-infrastructure/regions/us-east-1/partition",
            "DataType": "text"
        }
    ]
}

would be great to have this info in the aws_region table

@cbruno10 this can be closed and we can track this later if required.


python312Packages.hstspreload: 2024.6.1 -> 2024.7.1

Diff: https://github.com/sethmlarson/hstspreload/compare/refs/tags/2024.6.1...2024.7.1
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

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

4 packages built:

python311Packages.hstspreload
python311Packages.hstspreload.dist
python312Packages.hstspreload
python312Packages.hstspreload.dist


[Identity] Disable loading profiles in powershell

Passing -NoProfile is generally recommended to ensure the powershell script is run in the default environment without user profile side effects interfering.

API change check
API changes are not detected in this pull request.


Tool doesn't have a license

Under what license can this tool be used?

I've now added a MIT Licence, hope this helps.

Thanks a lot


Part of the v4 Grid example page still talks about v3's grid

Hello

In the folder /docs/examples/ is a file index.md. Guess it should be a compiled html index page to the examples.

In examples/grid. There is still written about BS3 and 4 instead of 5 tiers.

Mixed: mobile and desktop
The Bootstrap 3 grid system has four tiers of classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). You can use nearly any combination of these classes to create more dynamic and flexible layouts.

In the folder /docs/examples/ is a file index.md. Guess it should be a compiled html index page to the examples.

No, it's the source code for http://v4-alpha.getbootstrap.com/examples/

In examples/grid. There is still written about BS3 and 4 instead of 5 tiers.

Fixed in dedfffe5dbda53148c816e379f7ba93eb1ff36f6. Thanks!


README.md: add Sinatra example

Added a blurb about setting up modular Sinatra web applications.

Thanks!

You bet -- let me know if there's anything else in this vein that I could/should add.  Thanks also for working on this super helpful gem.  I'm teaching a coding class and the entire class will be using this gem with Sinatra this semester :)


Options for acts_as_group like class name for group_membership

It would be nice if you could specify the the class name for group_membership, to have the ability for two types of groups to exist in a project, and users can belong to both these types of groups

Another problem I've had with this issue is that Group is hardcoded to look for a 'GroupMembership' model, and the group membership class cannot be named something else or name spaced

I'm open to suggestions. Maybe the names of these classes could be specified via configuration?

+1

+1. The group membership class passed as an attribute would be a nice plus.

It's simple enough to make the class name of the group membership model configurable. However, all Groupify groups and group members must use the same model. It's the only way to support the different kinds of membership queries, which join different models to the same group memberships table.


FE: Minor improvement to the display of blockchain slot clickables.

Before. Note the way the third slot linebreaks in an unsatisfying way:

After:


Make the homepage more dynamic

Resolves #297
Resolves #311
Resolves #313

See also See also https://github.com/freezingsaddles/freezing-web/issues/173

This is a HUGE improvment! Merging and we can fix up any funkiness as we go.


Support for ONVIF ptz cameras?

Any possible chance of supporting ONVIF cameras in the future, the robotastic fork supposedly has support for ONVIF but I was not able to get it working, and the mqtt module seems to only run on a arm. I am trying to run this on amd64.

Thanks for the question - at this time we are only supporting Axis cameras using the vapix interface.


Preserve images across runs

Split off from issue #155 - there's too much in that issue already.

Tested in windows and preserved.
Need to double check hyperkit on macos

Works fine on macos/hyperkit too (current main).


Update graph_session.py

What does this PR do?
Fixes #54

Thanks for your contribution @NdagiStanley

Thanks for your contribution @NdagiStanley


linux_xanmod, linux_xanmod_latest: 2024-12-20

~still building lts~
lts runs fine on my setup
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@eljamm as you have reviewed some prs in the past i assume that you are actively using xanmod. If you like to get pinged for testing of updates you could add yourself as maintainer. Just if you like to. :slightly_smiling_face:

Thanks @Shawn8901. I've been using Xanmod for many months, now, and I really like it. I'd also like to be a maintainers, so I'll open a PR for this some time later.

24.05 is still supported until EOY.


Very slow body read times on hyper 1+

Version
hyper = "1.3.1"
tokio = { version = "1.38.0", features = ["rt", "rt-multi-thread", "macros"] }
http-body-util = "0.1.2"
hyper-util = { version = "0.1.5", features = ["full"] }
serde_json = "1.0.117"
serde = { version = "1.0.203", features = ["derive"] }
bytes = "1.6.0"

Platform
Darwin MacBook-Pro.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64

Description
While upgrading from 0.14, I've noticed the body parsing time increased significantly and sometimes, it went from 100μs all the way up to 100ms with bigger responses. It became very apparent when I tried to implement a fuzzer using Hyper, and for some reason is way slower than the most unmantained fuzzer tool written in JS
res.collect().await?.aggregate(); seems to take longer than expected, same output running as release is just as slow (just 1-2ms difference, still up to 30ms using the example code below).
I tried this code, adapted from the examples to read the fake comments json (157.75 kB uncompressed):
#![deny(warnings)]
#![warn(rust_2018_idioms)]

use std::time::Instant;
use bytes::Bytes;
use http_body_util::{BodyExt, Empty};
use hyper::{body::Buf, Request};
use hyper_util::rt::TokioIo;
use serde::Deserialize;
use tokio::net::TcpStream;

type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;

#[tokio::main]
async fn main() -> Result<()> {
    let url = "http://jsonplaceholder.typicode.com/comments".parse().unwrap();
    let comments = fetch_json(url).await?;

    println!("Got {} comments", comments.iter().len());
    Ok(())
}

async fn fetch_json(url: hyper::Uri) -> Result<Vec<Comment>> {
    let host = url.host().expect("uri has no host");
    let port = url.port_u16().unwrap_or(80);
    let addr = format!("{}:{}", host, port);

    let stream = TcpStream::connect(addr).await?;
    let io = TokioIo::new(stream);

    let (mut sender, conn) = hyper::client::conn::http1::handshake(io).await?;
    tokio::task::spawn(async move {
        if let Err(err) = conn.await {
            println!("Connection failed: {:?}", err);
        }
    });

    let authority = url.authority().unwrap().clone();

    let req = Request::builder()
        .uri(url)
        .header(hyper::header::HOST, authority.as_str())
        .body(Empty::<Bytes>::new())?;

    let res = sender.send_request(req).await?;

    let read_body_time = Instant::now();
    let body = res.collect().await?.aggregate();

    println!("Read body time: {:?}", read_body_time.elapsed());

    let comments = serde_json::from_reader(body.reader())?;

    Ok(comments)
}

#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct Comment {
    #[allow(unused)]
    id: i32,
    #[allow(unused)]
    post_id: i32,
    #[allow(unused)]
    name: String,
    #[allow(unused)]
    email: String,
    #[allow(unused)]
    body: String
}

Results on a M2 Max 32GB:
cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/hyper-tests`
Read body time: 30.642833ms
Got 500 comments

cargo run --release
    Finished `release` profile [optimized] target(s) in 0.02s
     Running `target/release/hyper-tests`
Read body time: 32.694959ms
Got 500 comments

I expected to see way lower read times, but got insanely high read times compared to 0.14 and gets worse with bigger responses. About 30ms on average seems to be very high for just 157 kB of data, both dev and release gets those times in average, while in release mode just a couple of ms lower, but still high.

Actually, I tried the very same with 0.14 and still gets 30ms for reading the body on both, release and dev. So, this time requesting http://www.google.com (with User-Agent header, otherwise Google returns polyfills) the average response size is 19 KB instead of 157 KB but still it's 30-ish ms.
Deps:
hyper = { version = "0.14.29", features = ["client", "http1", "tcp"] }
tokio = { version = "1.38.0", features = ["full"] }

Code:
use std::time::Instant;
use hyper::{Body, Client, Method, Request, Uri};

type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;

#[tokio::main]
async fn main() -> Result<()> {
    let url = "http://www.google.com".parse().unwrap();
    let response = fetch(url).await?;

    println!("Response length: {:?}", response.len());

    Ok(())
}

async fn fetch(uri: Uri) -> Result<String> {
    let client = Client::new();

    let req = Request::builder()
        .method(Method::GET)
        .header("User-Agent", "hyper-tests")
        .header("Accept", "*/*")
        .uri(&uri)
        .body(Body::empty())?;

    let resp = client.request(req).await?;

    println!("Got response from {:?}: {:?}", uri, resp.status());

    let read_body_time = Instant::now();
    let body = hyper::body::to_bytes(resp).await?;
    println!("Read body time: {:?}", read_body_time.elapsed());

    Ok(String::from_utf8_lossy(&body).to_string())
}

Results for example to www.google.com (19kB-ish):
cargo run --release
   Compiling signal-hook-registry v1.4.2
   Compiling tokio v1.38.0
   Compiling hyper v0.14.29
   Compiling hyper-tests-14 v0.1.0 (/Users/josesachs/Animus/Rust/hyper-tests-14)
    Finished `release` profile [optimized] target(s) in 5.97s
     Running `target/release/hyper-tests-14`
Got response from http://www.google.com/: 200
Read body time: 33.167875ms
Response length: 19879

Results for the comments json (157 kB):
cargo run --release
   Compiling hyper-tests-14 v0.1.0 (/Users/josesachs/Animus/Rust/hyper-tests-14)
    Finished `release` profile [optimized] target(s) in 3.04s
     Running `target/release/hyper-tests-14`
Got response from http://jsonplaceholder.typicode.com/comments: 200
Read body time: 31.33975ms
Response length: 157745

I'm always getting 30ms, any ideas as to why? It happens too in 1.x

I just tried it myself on http://www.google.com, which only ever gives me some small HTML about a redirect, and takes ~400 microseconds. On http://jsonplaceholder.typicode.com/comments, a couple runs shows it taking ~16ms.
On a somewhat separate note, however:
let body = res.collect().await?.aggregate();
let comments = serde_json::from_reader(body.reader())?;

If you're going to pass it to serde-json, you will likely find the performance is better with .to_bytes(). serde-json parses significantly faster with a single slice, as opposed to with the generic Read interface.

I just tried it myself on http://www.google.com, which only ever gives me some small HTML about a redirect, and takes ~400 microseconds. On http://jsonplaceholder.typicode.com/comments, a couple runs shows it taking ~16ms.

I give a bad example with Google, seems they vary the response widely depending on the location, in my location I'm able to get a http version without a redirection to the https version.
Could it be a bit slower on arm? I think I was too ambitious with the parsing time as Chrome seems to take about the same but a bit less.

On a somewhat separate note, however:
let body = res.collect().await?.aggregate();
let comments = serde_json::from_reader(body.reader())?;

If you're going to pass it to serde-json, you will likely find the performance is better with .to_bytes(). serde-json parses significantly faster with a single slice, as opposed to with the generic Read interface.

Yep, thank you! In this case I was just adapting what's on the example page to give a quick code to test. In my use case I'm just parsing as string as it's a RESTful client app (kinda like Insomina, Postman, etc)


Scope issue with mocha acceptance test runner

I get the following error with a fresh install of ember-cli-mocha and ember-cli-yadda
$ ember --version
ember-cli: 2.12.0
node: 6.9.1
os: darwin x64
$ ember init
$ ember install ember-cli-mocha
$ ember install ember-cli-yadda
$ ember g feature make-a-feature
$ ember t
not ok 1 PhantomJS 2.1 - Feature: make a feature "before each" hook for "Scenario: the one where I type ember g feature"
    ---
        message: >
            Attempted to assign to readonly property.
        stack: >
            http://localhost:7357/assets/tests.js:12:16
            invoke@http://localhost:7357/assets/test-support.js:13223:25
            asyncFn@http://localhost:7357/assets/test-support.js:13208:17
            callFnAsync@http://localhost:7357/assets/test-support.js:4496:12
            run@http://localhost:7357/assets/test-support.js:4448:18
            next@http://localhost:7357/assets/test-support.js:4812:13
            http://localhost:7357/assets/test-support.js:4834:9
            timeslice@http://localhost:7357/assets/test-support.js:77:27
        Log: |
    ...
not ok 2 PhantomJS 2.1 - Feature: make a feature "after each" hook for "Scenario: the one where I type ember g feature"
    ---
        message: >
            undefined is not an object (evaluating '_this.application')
        stack: >
            http://localhost:7357/assets/tests.js:15:65
            invoke@http://localhost:7357/assets/test-support.js:13223:25
            asyncFn@http://localhost:7357/assets/test-support.js:13208:17
            callFnAsync@http://localhost:7357/assets/test-support.js:4496:12
            run@http://localhost:7357/assets/test-support.js:4448:18
            next@http://localhost:7357/assets/test-support.js:4812:13
            http://localhost:7357/assets/test-support.js:4834:9
            timeslice@http://localhost:7357/assets/test-support.js:77:27
        Log: |
    ...

I'd be tempted to raise a PR that changed https://github.com/curit/ember-cli-yadda/blob/master/lib/test-runner/mocha/acceptance.js#L8-L11 to this.application - but perhaps the scope is needed for older versions of Ember?
https://github.com/curit/ember-cli-yadda/blob/master/lib/test-runner/mocha/separate/acceptance.js works ok and uses this.application https://github.com/curit/ember-cli-yadda/blob/master/lib/test-runner/mocha/separate/acceptance.js#L12

I think you're right we use this.application everywhere. I think I'll change this, and we'll see if we break someone else 😄


undefined method `per' for #<Comfy::Blog::Post::ActiveRecord_AssociationRelation

It seems like comfy_paginate is needed in the blog/posts_controller. I see that kiminary and will_paginate conflict is causing this. This has been resolved in other places, but this controller was passed over

Yes. But this reveals another issue: comfy_paginate is defined in Comfy::Admin::Cms::BaseController and thus not available from Comfy::Blog::PostsController. I assume this should be moved to Comfy::Cms::BaseController or a new application controller which can be shared between the admin controllers and the normal site controllers. Happy to make a pull request just not sure on the implications. Any advice @GBH ?
Current workaround:

copy https://github.com/comfy/comfortable-mexican-sofa/blob/b8a22f258412cef56c8c906fe6b7f2f40b9b4f43/app/controllers/comfy/admin/cms/base_controller.rb#L57-L66 to your application controller.

change to @posts = comfy_paginate(scope, limit) in https://github.com/comfy/comfy-blog/blob/master/app/controllers/comfy/blog/posts_controller.rb#L33

I'll fix it. I wish I cold reuse one defined in CMS, but it's in a different controller scope.

Grab blog 1.12.3 for the fix

Thank you!


tcell errors out when distributed as static binary vs source install

Thanks for the great library!
Some of our end-users have complained that if they have your env set to
TERM=xterm-color
then tcell succeeds if you have built from source, but fails with "terminal entry not found" if you have a statically compiled binary.
AFAICT, the problem is that tcell relies on a database file that it looks up from GOPATH
https://github.com/gdamore/tcell/blob/de7e78efa4a71b3f36c7154989c529dbdf9ae623/terminfo/terminfo.go#L836
This seems fragile for a bunch of reasons: end-users will not necessarily have a GOPATH, and the Go team wants to move away from assuming that code lives under GOPATH.
Is there any guidance on how consumers of this library should distribute database.json? Maybe by embedding the json file with packr or some such?

I've spent some time working on a solution.  Ultimately, we need to go to compiled in database definitions. There isn't a good way to portably depend on external resources otherwise.  This is going to be a big enough change that it may be a major version bump, and breaking.

I just run into this, as tmux-256color isn't supported yet.
Do you have any news regarding this issue?
What could be done to help you and take up some of the workload?
IN #254 you say you won't add new entries as per this issue here, however would you consider adding it in the meantime if this issue can't be resolved soon?

+1 here
I am using alacritty which ships it's own terminfo definition...

I'll chime in as well, as I'd like to use https://git.sr.ht/~sircmpwn/aerc in my preferred terminal alacritty. I don't use go, and so don't have a GOPATH defined. What would be the workaround here?

This is pretty much already resolved master.  If your terminal definition isn't built into the go binary already, it will attempt to create one for you (in memory, so non-persistent) using infocmp -1.
If your host system lacks infocmp, you may be out of luck.  I've yet to see a UNIX or Linux system that didn't have it though.  (It is part of ncurses I think, but also legacy AT&T terminfo -- legacy BSD UNIX -- like old BSD/386 -- or 4.4BSD -- might be in trouble -- but I wager you won't be able to get a go program running on such platforms either.)

I'm keeping this particular issue open, as I am going to actually nuke the old JSON database files altogether, and refactor the internal go database a bit too, so that application developers can choose to include either more (for increased compatibility and richness) or fewer (for less bloat) in their binary.
The infocmp changes I made last night mostly mean that even folks using the lean version will still be able to have their programs work.

The database removal will occur in tcell v2.  I consider that a breaking a change... so want to keep it separate.

So I have the database refactor here.  This has some API ramifications, and ramifications.  I've decided not to do this in v2, because that will be too disruptive, but instead to permit this in v1, as almost nobody will be impacted adversely.  PR coming shortly.

@gdamore updated from 1.0 to 1.2. and got users complaining when using the binary with tcell 1.2 inside tmux on FreeBSD (TERM=screen).
Thankfully, this is still pre-release, but it seems like a regression to me, details in this issue in the zrepl repo: https://github.com/zrepl/zrepl/issues/204#issuecomment-533833843
What is the path forward? Will infocmp become a hard dependency of tcell?
(Not sure if I understand the status of the 'database refactor' in above comments correctly)

There are two options.  One is to move screen into the default set of terminals.  That might be warranted. The other is to just import the extended database that has pretty much all the terminal entries.
If you want to move screen into the default set please file a ticket. I will likely do so unless someone beats me to it with a PR.

Given the api breakage maybe I should just import them all.  Binaries will be bigger.  Let me see how much bigger before I decide.  It may not be enough to fret over.

The difference in size was 150k, which is in the noise for most Go programs.  I'm going to go ahead and make this the default, and offer a way to build with a minimalized version only for folks that need it.  See #302 for details.


⚠ Spryr has degraded performance

In 37ed2a9, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 6270 ms

Resolved: Spryr performance has improved in 0c6bb74 after 7 minutes.


compose: Move overflowing buttons to a popover.

  In both the screenshots it seems like there's substantial space where more buttons could be in the space below the open popover.  I don't have a precise sense in mind, but I'd kinda hope that we aim to maximize the number of buttons that are displayed sans popover.  (Also, are you testing with other languages where the "Press enter to send" text has a non-fixed length?)

We also need space for the "Sending..." Indicator.

Using media query breakpoints.

I think the GIF button disappeared for some reason?

Could you post screenshots with the Sending... indicator in English and Russian (which is generally a good example of a language with longer text)? I'm not sure how to get that indicator to show up.

I actually optimized this for 360px width for eng since that is the most commonly used screen width on mobile.

Mm, OK, so in the next to last Russian-language screenshot, there really isn't extra room. I don't know how complicated it is to make the sizing language-dependent, but we wouldn't want to squish that transition more.

Closing in favour of #20396 which includes commits of this PR.


Timm Models integration to Optimum-intel

This PR is a part of Google Summer of Code 2023 project  Showcase performance of PyTorch Image Models (Timm) with OpenVINO  under Openvino-toolkit.
Main goal of this PR is seamless integration of TIMM library(hosting 1100+ pytorch computer vision models, as of writing this) into the OpenVino ecosystem. And as Timm is now part of huggingface ecosystem, the integrations done through Optimum-intel.
As most of Timm models are for Image-classification or feature-extraction, the integration is done through OVModelForImageClassification, so the user can take load models like any other Huggingface models from HuggingFace Hub. Note that, previously the attempt to load the models in this ways raised a number of errors and unexpected behavious, similar to loading through AutoModelForImageClassification some of which are mentioned here.
With this PR we can load and use Timm models from hub like this:
import torch
from optimum.intel import OVModelForImageClassification
model_id = "timm/vit_tiny_patch16_224.augreg_in21k"
hf_model = OVModelForImageClassification.from_pretrained(model_id, export=True)
out = hf_model(pixel_values = torch.zeros((5, 3, hf_model.config.image_size, hf_model.config.image_size)))
print(out.logits.shape)

or
import requests
from PIL import Image
from optimum.intel.openvino.modeling_timm import TimmImageProcessor
from optimum.intel import OVModelForImageClassification

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
model_id = "timm/vit_tiny_patch16_224.augreg_in21k"
preprocessor = TimmImageProcessor.from_pretrained(model_id)
inputs = preprocessor(images=image, return_tensors='pt')
ov_model = OVModelForImageClassification.from_pretrained(model_id, export=True)
outputs = ov_model(pixel_values=inputs["pixel_values"])

Aditionally,

A feature extractor TimmImageProcessor has been implemented, as transformers didn't have any dedicated feature-extractor/image-precessor to handle the processor according to provided model config.
Several tests have been added, to test these new features.

@AlexKoff88  I have removed a of unnecessary code, and abstractions. Please take a look and let me know your feedback.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

It could be worth mentioning in the documentation as well that OVModelForImageClassification can handle timm models.

@sawradip Would you like to precise the doc / add an example, or should I merge as is?

I will add some refernce to the doc as well add some description to the PR.

@fxmarty , I have done some additions in docs, as well as added description to this PR. If everything seems alright, you can merge.

@fxmarty  There was one error with style, fixed it.
Any feedback?


add deregisterField method

Add a deregisterField method that allows to remove a text field from validation.

Thanks for your contributions @snorpey ! I think that is a great function to add to the validator project. think the method should be called unregisterField.
Here are some outstanding items:

Update readme
Add tests

@jpotts18 just added the changes you requested. Let me know if this looks OK to you :-)

Du bist toll!


[v0.0.18] Issue running the command mila code

Make sure you can reproduce the issue with the latest version available
pip install milatools --upgrade
[milatools command e.g. mila code ...]

What command did you run?
mila code /home/mila/a/annabel.adeyeri/ --alloc --cpus-per-task=2 --mem=4Gb --gres=gpu:1
Describe the bug
A clear and concise description of what the bug is. If there is an error
traceback, please paste it here.
Traceback (most recent call last):
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/milatools/cli/commands.py", line 43, in main
auto_cli(milatools)
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/coleo/cli.py", line 656, in auto_cli
result = run_cli(entry, args, **kwargs)
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/coleo/cli.py", line 628, in run_cli
return call(opts=opts, args=args)
File "/Users/annabel/miniconda3/lib/python3.10

/site-packages/coleo/cli.py", line 587, in thunk
result = fn(*args)
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/milatools/cli/commands.py", line 285, in code
remote = Remote("mila")
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/milatools/cli/remote.py", line 84, in init
connection.open()
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/fabric/connection.py", line 636, in open
self.client.connect(**kwargs)
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/paramiko/client.py", line 485, in connect
self._auth(
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/paramiko/client.py", line 818, in _auth
raise saved_exception
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/paramiko/client.py", line 794, in _auth
self._transport.auth_publickey(username, key)
File "/Users/annabel/miniconda3/lib/python3.10/site-packages/paramiko/transport.py", line 1658, in auth_publickey
return self.auth_handler.wait_for_response(my_event)
File "/Users/annabel/miniconda3/lib/python3.10/s

ite-packages/paramiko/auth_handler.py", line 248, in wait_for_response
raise e
paramiko.ssh_exception.AuthenticationException: Authentication failed: transport shut down or saw EOF
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

Mac OS 13.4

Additional context
it was working yesterday. idk what the problem is now.

I believe there was an issue with logging in to the cluster in general this morning. Is the problem still happening? You can try to run ssh mila to check, if that doesn't work either then the issue is not with mila code.

Hi!
I think the problem is resolved now.
Best,
Annabel Adeyeri
On Thu, Jun 29, 2023 at 3:59 PM Olivier Breuleux @.***>
wrote:

I believe there was an issue with logging in to the cluster in general
this morning. Is the problem still happening? You can try to run ssh mila
to check, if that doesn't work either then the issue is not with mila code
.
—
Reply to this email directly, view it on GitHub
https://github.com/mila-iqia/milatools/issues/45#issuecomment-1613734432,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMB74BEIQLHPBRCQIJL4CS3XNXNAVANCNFSM6AAAAAAZYUFPCY
.
You are receiving this because you authored the thread.Message ID:
@.***>


Fix menu in visual JSON editor

[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)

Proposed changes
Current "Collapse items" element in the menu on visual JSON editor collapses child JSON objects only. I think that it is natural to collapse both parent and child JSON objects (It is opposite handling of "Expand items"). Therefore, I added the handling to collapse the parent JSON object.
Checklist

[x] I have read the contribution guidelines
[ ] For non-bugfix PRs, I have discussed this change on the mailing list/slack team.
[x] I have run grunt to verify the unit tests pass
[ ] I have added suitable unit tests to cover the new/changed functionality

Coverage remained the same at 77.534% when pulling a0026e66cea66fdf493a2ca52af18ff4b0690878 on kazuhitoyokoi:master-fixvisualeditor into f75dd2209d51d7cad39586f3ace999241e9f69f0 on node-red:master.

@knolleary Thank you!


Improvement - Split buttons variants in subcomponents

On button component screen, display a list menu with the variants: contained buttons, outlined buttons, text buttons,...
On each selection, open a dedicated page to present only the selected variants.

the split was done correctly. Please @mccart77  & @afrahB  confirm this is ok for you as well?


Can't fetch file by API: "message": "Not Acceptable"

I can't download an LFS file on EC2, although I can on my local machine, and I'm getting an odd response from GitHub when I try to debug it.
I have a build server running on EC2.  When I do a fresh clone and checkout of my repository, the one file I have stored in LFS is not retrieved, and I get this message:
$ git checkout develop
Downloading ***.zip (55.87 MB)
Error accessing media: ***.zip (<long hash value>)

Errors logged to .git/lfs/objects/logs/20151015T174546.361886396.log
Use `git lfs logs last` to view the log.
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'

When I check the git lfs logs last log, I get the following snippet that leaves a clue:
git-lfs/1.0.0 (GitHub; linux 386; go 1.5.1; git 7379fa9)
git version 2.4.3

$ git-lfs smudge ***.zip
Error accessing media: ***.zip (<long hash value>)

Unable to parse HTTP response for GET https://api.github.com/lfs/fairbanksllc/fairbanks-ltss-v2/objects/<long hash value>
goroutine 1 [running]:
github.com/github/git-lfs/lfs.Stack(0x0, 0x0, 0x0)
	/Users/rick/go/src/github.com/github/git-lfs/lfs/errors.go:557 +0x80
<cut for brevity>

When I attempt to retrieve that URL, I get the following JSON document:
{"message":"Not Acceptable","documentation_url":"https://github.com/contact"}

I don't have this same problem from my local machine, so I'm not sure where the problem is.

This is a server problem, and has nothing to do with the OSS Git LFS client. That URL doesn't work because you're not following the API spec. Just missing an Accept header.
https://github.com/github/git-lfs/tree/master/docs/api
Also, check your email, I have a more detailed response there :)

Thanks to @technoweenie, I have tracked this down a bit further, and I'm getting the following debug information in the log:
$ GIT_TRACE=1 GIT_TRACE_PACKET=1 git lfs fetch
18:41:53.891958 git.c:557               trace: exec: 'git-lfs' 'fetch'
18:41:53.892098 run-command.c:347       trace: run_command: 'git-lfs' 'fetch'
trace git-lfs: run_command: 'git' rev-parse --abbrev-ref HEAD
trace git-lfs: run_command: 'git' config branch.develop.remote
trace git-lfs: run_command: 'git' rev-parse HEAD --symbolic-full-name HEAD
trace git-lfs: run_command: 'git' config -l
trace git-lfs: run_command: 'git' config -l -f /home/***/.git/config
Fetching develop
trace git-lfs: run_command: git rev-list --objects --no-walk ***
trace git-lfs: run_command: git cat-file --batch-check
trace git-lfs: run_command: git cat-file --batch
trace git-lfs: tq: starting 3 transfer workers
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: fetch ***.zip [<long hash value>]
trace git-lfs: tq: sending batch of size 1
trace git-lfs: ssh<EMAIL_ADDRESS>git-lfs-authenticate ***.git download
trace git-lfs: api: batch 1 files
trace git-lfs: HTTP: POST https://api.github.com/lfs/***/***/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: api error: Unable to parse HTTP response for POST https://api.github.com/lfs/***/***/objects/batch
(0 of 1 files) 0 B / 55.87 MB

It appears the git-lfs-authenticate over ssh is not working in my case.

Weird. If there was an authentication error, you should see something about getting a 403. Can you run that with:
$ GIT_CURL_VERBOSE=1 git lfs fetch

Feel free to send the log to our github support email, unless you want to do this here.  This isn't an issue with the OSS client though. The curl verbose log will include your authorization header too. Look for any lines with "Authorization: Basic".

If you set GIT_CURL_VERBOSE=1it should show you the http response so you can figure out what's wrong with it.

Log sent in; I will not post a sanitized version here, except to note that the authorization both ways was successful, and a valid JSON document containing the objects to be downloaded - and the authorization to do that (via AWS4-HMAC-SHA256) - was received by the client.

Closing this, as it's a temporary issue on our server. Thanks for the report!

Confirmed the issue is resolved.


support loading indicator view without much trouble

added support for UIActivityIndicatorView while the image is
downloaded, without adding extra ‘setImageWithUrl’ methods to the
UIImageView+WebCache category.
I used this pull request, original author is JJSaccolo,  and modded it a bit to support loading indicator while the image is downloading.
the usage is basically this right before the usual sd_setImage... methods:
        // show activity indicator
        [cell.imageView setShowActivityIndicatorView:YES];
        // choose indicator style
        [cell.imageView setIndicatorStyle:UIActivityIndicatorViewStyleGray];

This works great! But how can we use it for buttons? I see that this is only implemented inside the UIImageView+WebCache.h category, but not in the UIButton+WebCache.h
I'll make a ticket about it


Facebook Live integration

Hi, is it possible to use your library to publish Livestream to Facebook? I already have the RTMPS URL from facebook, can I use this URL to your library to broadcast to FB?
Thank you!

Yes, you can.
Facebook is compatible with this library in RTMPS.


Scrolling on mobile advances to next slide

This appears to be true both for horizontally or vertically navigated decks.
On mobile Safari, I start to scroll down, and boom, the slide advances. Any quick workaround for this?

We will check it out. Thanks Zach!


cephfs create pvc always pending

Using rbd can create PVC, but cephfs can't. After testing in toolbox, we get the following error, hoping to get some advice
sh-4.4# ceph fs subvolume create myfs stone-test-1<PHONE_NUMBER> csi
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 165, in get_fs_handle
    conn.connect()
  File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 88, in connect
    self.fs.mount(filesystem_name=self.fs_name.encode('utf-8'))
  File "cephfs.pyx", line 739, in cephfs.LibCephFS.mount
cephfs.Error: error calling ceph_mount: Connection timed out [Errno 110]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1177, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 426, in handle_command
    return handler(inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 34, in wrap
    return f(self, inbuf, cmd)
  File "/usr/share/ceph/mgr/volumes/module.py", line 480, in _cmd_fs_subvolume_create
    namespace_isolated=cmd.get('namespace_isolated', False))
  File "/usr/share/ceph/mgr/volumes/fs/volume.py", line 157, in create_subvolume
    with open_volume(self, volname) as fs_handle:
  File "/lib64/python3.6/contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 316, in open_volume
    fs_handle = vc.connection_pool.get_fs_handle(volname)
  File "/usr/share/ceph/mgr/volumes/fs/operations/volume.py", line 171, in get_fs_handle
    raise VolumeException(-e.args[0], e.args[1])
TypeError: bad operand type for unary -: 'str'

File "cephfs.pyx", line 739, in cephfs.LibCephFS.mount
cephfs.Error: error calling ceph_mount: Connection timed out [Errno 110]

The above is a connection issue, some kubernetes network plugin might work with RBD but not with CephFS.

@Madhu-1
Thank you very much for your reply. My k8s cluster uses the flannel plugin. Does this plugin support cephfs?

https://github.com/rook/rook/issues/4006 might help, as you are using Rook to deploy the ceph cluster. I would suggest opening the issue in Rook as cephcsi is not involved in the above issue. Closing for the same reason

OK,Thank you very much


Zigbee2mqtt crash I don't understand why

Description of problem:
I use Z2mqtt in 2 identicals system
With the first I never have problem.
With the second Z2mqtt regulary crash I can't restart it
my devices are not specifics: switchs, bulbs...
my gateway : SONOFF ZBDongle-P
Zigbee2mqtt add-on version (if edge, please report commit hash):
Current version: 1.24.0-1

Your entire configuration from the frontend (with sensitive fields redacted):
data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
serial:
  port: /dev/ttyUSB0
advanced:
  log_level: warn
  pan_id: 6750
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
  rtscts: false
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false

Running platform (details from Suypervisor > System)

Core: core-2022.3.5
Supervisor: supervisor-2022.03.5
Operating System: Debian GNU/Linux 10 (buster) (Armbian)
Docker version: 20.10..12
eMMC Lifetime: Used 10 % - 20 %
Used space: 47.3 %

Your logs from Home Assistant Supervisor
Log when I want to restart it
22-03-19 15:07:01 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host <IP_ADDRESS>:8099 ssl:default [Connect call failed ('<IP_ADDRESS>', 8099)]
22-03-19 15:07:03 ERROR (MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host <IP_ADDRESS>:8099 ssl:default [Connect call failed ('<IP_ADDRESS>', 8099)]
22-03-19 15:07:40 ERROR (SyncWorker_3) [supervisor.plugins.dns] Can't update hosts: [Errno 30] Read-only file system: '/data/dns/hosts'
22-03-19 15:07:40 WARNING (SyncWorker_3) [supervisor.docker.addon] Can't update DNS for addon_45df7312_zigbee2mqtt
22-03-19 15:07:41 INFO (SyncWorker_3) [supervisor.docker.interface] Stopping addon_45df7312_zigbee2mqtt application
22-03-19 15:07:41 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning addon_45df7312_zigbee2mqtt application
22-03-19 15:07:41 ERROR (MainThread) [supervisor.utils.json] Can't write /data/addons.json: [Errno 30] Read-only file system: '/data/tmpzp10z8dv'
22-03-19 15:07:41 ERROR (MainThread) [supervisor.utils.json] Can't write /data/addons/data/45df7312_zigbee2mqtt/options.json: [Errno 30] Read-only file system: '/data/addons/data/45df7312_zigbee2mqtt/tmpi4a640jv'
22-03-19 15:07:41 ERROR (MainThread) [supervisor.addons.addon] Add-on 45df7312_zigbee2mqtt can't write options
22-03-19 15:07:45 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning addon_45df7312_zigbee2mqtt application
22-03-19 15:07:49 ERROR (MainThread) [supervisor.utils.json] Can't write /data/addons.json: [Errno 30] Read-only file system: '/data/tmpgnrek6jh'
22-03-19 15:07:49 ERROR (MainThread) [supervisor.utils.json] Can't write /data/addons/data/45df7312_zigbee2mqtt/options.json: [Errno 30] Read-only file system: '/data/addons/data/45df7312_zigbee2mqtt/tmpqhblmizi'
22-03-19 15:07:49 ERROR (MainThread) [supervisor.addons.addon] Add-on 45df7312_zigbee2mqtt can't write options
22-03-19 15:07:58 WARNING (SyncWorker_7) [supervisor.docker.interface] Can't grep logs from zigbee2mqtt/zigbee2mqtt-aarch64: 409 Client Error for http+docker://localhost/v1.41/containers/ce091f37e6c6add125315f19a031eac0819dbfc4e629c49096724c0b756f9125/logs?stderr=1&stdout=1&timestamps=0&follow=0&tail=100: Conflict ("can not get logs from container which is dead or marked for removal")
22-03-19 15:08:00 WARNING (SyncWorker_2) [supervisor.docker.interface] Can't grep logs from zigbee2mqtt/zigbee2mqtt-aarch64: 409 Client Error for http+docker://localhost/v1.41/containers/ce091f37e6c6add125315f19a031eac0819dbfc4e629c49096724c0b756f9125/logs?stderr=1&stdout=1&timestamps=0&follow=0&tail=100: Conflict ("can not get logs from container which is dead or marked for removal")
22-03-19 15:13:41 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token

End of log of zigbee2mqtt before crash
> node index.js
(node:1556) UnhandledPromiseRejectionWarning: Error: EROFS: read-only file system, mkdir '/config/zigbee2mqtt/log/2022-03-19.17-17-53'
    at Object.mkdirSync (fs.js:1013:3)
    at mkdirSyncRecursive (/app/node_modules/mkdir-recursive/index.js:199:16)
    at mkdirSyncRecursive (/app/node_modules/mkdir-recursive/index.js:197:12)
    at mkdirSyncRecursive (/app/node_modules/mkdir-recursive/index.js:197:12)
    at mkdirSyncRecursive (/app/node_modules/mkdir-recursive/index.js:197:12)
    at Object.mkdirSync (/app/node_modules/mkdir-recursive/index.js:82:10)
    at Object.<anonymous> (/app/lib/util/logger.ts:22:8)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1556) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1556) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
s6-supervise zigbee2mqtt: warning: unable to write supervise/death_tally: Read-only file system
s6-supervise zigbee2mqtt: warning: unable to write status file: Read-only file system
s6-supervise zigbee2mqtt: warning: unable to write status file: Read-only file system
s6-supervise zigbee2mqtt: warning: unable to write status file: Read-only file system
[17:17:55] INFO: Handing over control to Zigbee2mqtt Core ...
><EMAIL_ADDRESS>start
> node index.js

I had the same today, about 6 hours ago.
I rebooted my system completely, and everything worked after that

It was a problem of emmc (became read only)


DAN steal update ,  Animal Transfrom sting check

steal dna now cares about new targets so a new index for dna that have been sampeled
var added to comp
and if animals can be ransformed whit trasnform sting

nah


Update docs

Various doc alterations

Many thanks for this PR, we really appreciate it!
Before merging it, I would like to address two issue:
1.) Why is python 2.7 a prerequisite? (https://github.com/keptn/keptn.github.io/pull/142/files#diff-c37526d13f80733723a7a987e7edd273R52)
2.) Can you please close this PR and open it against the develop branch? The reason is that we work on the develop branch until we release a new version. Then we update the master based on the develop branch.

I've adjusted the base branch to be develop.
python2.7 is a prereq when I use an Ubuntu 19.04 box as my bastion. Here's the output of the ./installKeptn.sh command:
[keptn|DEBUG] [2019-05-21 06:15:04] GCLOUD_USER is not set, retrieve it using gcloud.
[keptn|INFO] [2019-05-21 06:15:04] Testing connection to Kubernetes API
Unable to connect to the server: error executing access token command "/snap/google-cloud-sdk/82/bin/gcloud config co
nfig-helper --format=json": err=exit status 1 output= stderr=ERROR: gcloud failed to load: invalid syntax (yaml_comma
nd_translator.py, line 236)
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.command_lib.util.apis import yaml_command_translator
    if self.spec.async:
SyntaxError: invalid syntax
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 executable:
    /usr/bin/python3
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.
If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
    https://cloud.google.com/sdk/
[keptn|ERROR] [2019-05-21 06:15:09] Could not connect to Kubernetes API.
adam@instance-1:~/keptn/install/scripts$ [keptn|ERROR] [2019-05-21 06:15:09] Stopping keptn installation. Already cre
ated resources are not deleted; execute the uninstallKeptn.sh script to clean-up.

I am using the latest gcloud:
adam@instance-1:~/keptn/install/scripts$ sudo snap refresh google-cloud-sdk
snap "google-cloud-sdk" has no updates available


Add more inhibit sources

This is probably not ready to merge as I did a lot of rework as well as pulled in @XaviDCR92's systemd inhibitor PR.  I was using Xavi's version of sleepwalk for several weeks and one issue I kept running into is that it would sleep in the middle of a call.  Phosh seems to turn off the screen during calls.  I added a check for calls using modemmanager (mmcli -m any --voice-list-calls).  If there is a call it displays a path which includes "freedesktop" so I'm checking for that string.  If no calls are present, it has a message indicating no calls and if the modem is offline (which happens when waking from suspend) it has an error, so grepping for "freedesktop" handles all those cases.
I also added suspend sources for the PinePhone, Pro, and Keyboard power supplies, though commented all out except keyboard because that's what I'm using.  An enhancement would be to test which paths exist and automatically use the correct one (with keyboard taking priority over the phone specific ones, as the phone's power supply will report online when the keyboard battery is charging the phone).
I tested the call functionality by turning off the screen and leaving the call active for 2 minutes, the PinePhone did not sleep.

Hi.
I would prefer to use gnome-session-inhibit instead of systemd-inhibit. I'm using it since a few weeks and it works very well. It also solves the issue on sleeping during a call. Tested it today and gnome-session-inhibit --list correctly displays org.gnome.Calls: call active. No further checking, if the modem has disappeared will be needed in this case. It also has the advantage of being more portable (e.g. postmarketOS) and seems to work with Qt apps as well (tested with angelfish) while systemd-inhibit doesn't seem to work with all apps (most notable firefox, a research on the web seems to confirm this issue that systemd-inhibit --list doesn't show up firefox, when media is played). I don't know, if it would work on plasma mobile though, further testing is needed here. I will add the modified sleepwalk script with gnome-session-inhibit to another branch so you can test it, if you want. Let me know what you think about it.
Adding USB power checks for the keyboard case and PinePhone Pro is nice to have! Does everything else work on the PinePhone Pro as expected?
Thanks for your contribution!

Let me know when you have the branch pushed and I'll gladly test it out.  Does gnome-session-inhibit work on non-GNOME desktop environments (plasma, sxmo, etc)?  I don't really want to test as I only use Phosh and GNOME.


Arithmetic operations doesn't seem to be right!

The values displayed on the page, pasted below, seems to be off. For example

why
5-1 = 4
but
1- 0 = 0?

why 1+5 = 4?

Operation
Num1
Num2
Result column
Result value

Addition
1
5
Add(Num2_Num1)
4

Multiplication
1
5
Multiple(Num2_Num1)
5

Subtraction
1
5
Subtract(Num2_Num1)
4

Subtraction
0
1
Subtract(Num2_Num1)
0

Division
1
5
Divide(Num2_Num1)
5

Division
0
1
Divide(Num2_Num1)
Infinity

[Enter feedback here]

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

ID: 077b6c4d-0536-c08f-a8eb-7952f17c155c
Version Independent ID: 3d351748-466c-2fc4-5d56-6cd227eb396d
Content: Apply Math Operation - Azure Machine Learning
Content Source: articles/machine-learning/algorithm-module-reference/apply-math-operation.md
Service: machine-learning
Sub-service: core
GitHub Login: @likebupt
Microsoft Alias: keli19

@wassimamer we'll review your feedback and get back to you shortly. Thanks.


Error: Unsupported Terraform Core version  on .terraform/modules/waap_juiceshop_example.apigee.apigee/modules/apigee/versions.tf line 16

Error: Unsupported Terraform Core version
│
│   on .terraform/modules/waap_juiceshop_example.apigee.apigee/modules/apigee/versions.tf line 16, in terraform:
│   16:   required_version = ">= 1.4.4"
│
│ Module module.waap_juiceshop_example.module.apigee.module.apigee (from
│ git::https://github.com/GoogleCloudPlatform/cloud-foundation-fabric.git?ref=v24.0.0//modules/apigee)
│ does not support Terraform version 1.3.7. To proceed, either choose another
│ supported Terraform version or update this version constraint. Version
│ constraints are normally set for good reason, so updating the constraint
│ may lead to other errors or unexpected behavior.
╵

@juliocc  I have set required_version = ">= 1.4.4" as version equal to or greater than 1.4.4
Why module is saying "does not support Terraform version 1.3.7."
Thanks for the response by the way

https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/blob/master/default-versions.tf