cannot get resource "leases" in API group "coordination.k8s.io"

I get this error in the ejabberd logs:
E1228 19:03:46.407554     170 leaderelection.go:332] error retrieving resource lock ejabberd-flux/ejabberd: leases.coordination.k8s.io "ejabberd" is forbidden: User "system:serviceaccount:ejabberd-flux:ejabberd" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "ejabberd-flux"
This are the only values i set:
values:
    # ingress:
    #   enabled: true
    #   className: nginx
    #   annotations: {}
    #     # kubernetes.io/ingress.class: nginx
    #     # kubernetes.io/tls-acme: "true"
    #   hosts:
    #     - host: mydomain.com
    #       paths:
    #         - path: /upload
    #           pathType: ImplementationSpecific
    #   tls:
    #     - secretName: ejabberd-tls
    #       hosts:
    #         - "mydomain.com"  # Das Zertifikat gilt für die Hauptdomain
    hosts:
      - mydomain.com
    certFiles:
      # -- Please specify your kubernetes secret containing the tls certificates for
      # the domains specified in .Values.hosts, otherwise the service will not work
      secretName:
        - ejabberd-tls
        # - another-secret-for-another-domain
    statefulSet:
      # -- Number of pods of the statefulSet
      replicas: 1
    elector:
      enabled: false # bei mehreren replicas auf true setzen

    # Weitere ejabberd-spezifische Konfigurationen können hier hinzugefügt werden

and perhaps some important descriptions:
kubectl -n ejabberd-flux describe statefulsets.apps ejabberd
Name:               ejabberd
Namespace:          ejabberd-flux
CreationTimestamp:  Sat, 28 Dec 2024 18:11:53 +0100
Selector:           app.kubernetes.io/instance=ejabberd,app.kubernetes.io/name=ejabberd
Labels:             app.kubernetes.io/instance=ejabberd
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=ejabberd
                    app.kubernetes.io/version=24.07-k8s1
                    helm.sh/chart=ejabberd-0.8.3
                    helm.toolkit.fluxcd.io/name=ejabberd
                    helm.toolkit.fluxcd.io/namespace=ejabberd-flux
Annotations:        meta.helm.sh/release-name: ejabberd
                    meta.helm.sh/release-namespace: ejabberd-flux
Replicas:           1 desired | 1 total
Update Strategy:    RollingUpdate
Pods Status:        1 Running / 0 Waiting / 0 Succeeded / 0 Failed
Pod Template:
  Labels:           app.kubernetes.io/instance=ejabberd
                    app.kubernetes.io/managed-by=Helm
                    app.kubernetes.io/name=ejabberd
                    app.kubernetes.io/version=24.07-k8s1
                    helm.sh/chart=ejabberd-0.8.3
  Service Account:  ejabberd
  Containers:
   ejabberd:
    Image:           ghcr.io/sando38/ejabberd:24.07-k8s1
    Ports:           5222/TCP, 5280/TCP, 5443/TCP, 5269/TCP, 3478/UDP, 5210/TCP
    Host Ports:      0/TCP, 0/TCP, 0/TCP, 0/TCP, 0/UDP, 0/TCP
    SeccompProfile:  RuntimeDefault
    Command:
      /sbin/tini
      --
      /bin/sh
      -c
      run.sh
    Liveness:   exec [cat /opt/ejabberd/.ejabberd_ready] delay=0s timeout=1s period=3s #success=1 #failure=30
    Readiness:  exec [cat /opt/ejabberd/.ejabberd_ready] delay=0s timeout=1s period=3s #success=1 #failure=3
    Startup:    exec [cat /opt/ejabberd/.ejabberd_ready] delay=0s timeout=1s period=3s #success=1 #failure=10
    Environment:
      K8S_CLUSTERING:   true
      POD_NAMESPACE:     (v1:metadata.namespace)
      ELECTOR_ENABLED:  true
      ELECTION_NAME:    ejabberd
      ELECTION_URL:     <IP_ADDRESS>:4040
      ERLANG_COOKIE:    YouR-3rl4n6-C00k!3
      HTTP_API_URL:     <IP_ADDRESS>:5281
      ERL_DIST_PORT:    5210
    Mounts:
      /opt/ejabberd/certs/ejabberd-tls from ejabberd-certs-ejabberd-tls (ro)
      /opt/ejabberd/conf from ejabberd-config (rw)
      /opt/ejabberd/database from mnesia (rw)
      /usr/local/bin/ejabberdctl from ejabberd-startup-scripts (ro,path="ejabberdctl")
      /usr/local/bin/run.sh from ejabberd-startup-scripts (ro,path="run.sh")
  Volumes:
   ejabberd-certs-ejabberd-tls:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  ejabberd-tls
    Optional:    false
   ejabberd-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      ejabberd-config
    Optional:  false
   ejabberd-startup-scripts:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      ejabberd-startup-scripts
    Optional:  false
   mnesia:
    Type:          EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:
    SizeLimit:     <unset>
  Node-Selectors:  <none>
  Tolerations:     <none>
Volume Claims:     <none>
Events:            <none>

kubectl -n ejabberd-flux describe certificate ejabberd-tls
Name:         ejabberd-tls
Namespace:    ejabberd-flux
Labels:       kustomize.toolkit.fluxcd.io/name=flux-system
              kustomize.toolkit.fluxcd.io/namespace=flux-system
Annotations:  <none>
API Version:  cert-manager.io/v1
Kind:         Certificate
Metadata:
  Creation Timestamp:  2024-12-28T17:11:49Z
  Generation:          2
  Resource Version:    171744206
  UID:                 4ce7e92f-271b-485c-ace2-f41d39eb891f
Spec:
  Additional Output Formats:
    Type:       CombinedPEM
  Common Name:  mydomain.com
  Dns Names:
    mydomain.com
    *.mydomain.com
  Duration:  2160h
  Issuer Ref:
    Kind:        ClusterIssuer
    Name:        netcup-issuer
  Renew Before:  528h
  Secret Name:   ejabberd-tls
  Secret Template:
    Annotations:
      k8s-sidecar-target-directory:  certs/ejabberd-tls
    Labels:
      helm-ejabberd/watcher:  true
Status:
  Conditions:
    Last Transition Time:  2024-12-28T17:11:54Z
    Message:               Certificate is up to date and has not expired
    Observed Generation:   2
    Reason:                Ready
    Status:                True
    Type:                  Ready
  Not After:               2025-03-28T16:13:23Z
  Not Before:              2024-12-28T16:13:24Z
  Renewal Time:            2025-03-06T16:13:23Z
  Revision:                1
Events:                    <none>

kubectl -n ejabberd-flux describe secret ejabberd-tls
Name:         ejabberd-tls
Namespace:    ejabberd-flux
Labels:       controller.cert-manager.io/fao=true
              helm-ejabberd/watcher=true
Annotations:  cert-manager.io/alt-names: *.mydomain.com,mydomain.com
              cert-manager.io/certificate-name: ejabberd-tls
              cert-manager.io/common-name: mydomain.com
              cert-manager.io/ip-sans:
              cert-manager.io/issuer-group:
              cert-manager.io/issuer-kind: ClusterIssuer
              cert-manager.io/issuer-name: netcup-issuer
              cert-manager.io/uri-sans:
              k8s-sidecar-target-directory: certs/ejabberd-tls

Type:  kubernetes.io/tls

Data
====
tls-combined.pem:  5270 bytes
tls.crt:           3594 bytes
tls.key:           1675 bytes

and some more information about my setup:
the cluster runs at home on a 3-node-microk8s. my domain is hosted by netcup and i update the ip for subdomain xmpp.mydomain.com via cron.
i have set this DNS-records:

xmpp A <IP_ADDRESS>
conference.mydomain.com CNAME xmpp.mydomain.com
proxy.mydomain.com CNAME xmpp.mydomain.com
pubsub.mydomain.com CNAME xmpp.mydomain.com
upload.mydomain.com CNAME xmpp.mydomain.com
_stun._tcp SRV 10 5 3478 xmpp.mydomain.com
_stun._udp SRV 10 5 3478 xmpp.mydomain.com
_stuns._tcp SRV 10 5 5349 xmpp.mydomain.com
_xmpp-client._tcp SRV 10 5 5222 xmpp.mydomain.com
_xmpp-server._tcp SRV 10 5 5269 xmpp.mydomain.com
_xmpps-client._tcp SRV 10 5 443 xmpp.mydomain.com

My firewall directs everything incoming to one node of the cluster excepting a few ports used for SIP-Phones.
I hope I haven't forgotten anything important, otherwise just ask.

Hi, I can see that in your environment variables
ELECTOR_ENABLED:  true
Although this should be case according to your values.yml
    elector:
      enabled: false # bei mehreren replicas auf true setzen

https://github.com/sando38/helm-ejabberd/blob/5f42d7e57b57493c0dd2e6f4b124687600f7133c/charts/ejabberd/templates/_pod.tpl#L218-L219

Could you double check?
Could you also try to set .Values.elector.enabled=true in your values.yml? This should work, because then the required RBAC are assigned to the service account.

Thanks for your quick reply, I have commented out elector.enabled and the messages have disappeared. I misinterpreted something and thought I had to set it to false if I only wanted 1 replica.
Probably has nothing to do with the previous issue, but...
Unfortunately, I still get the ingress.local(Kubernetes Ingress Controller Fake Certificate) when I want to connect via Conversations. Can you maybe help me where my error is or how to find it?

Do you have a proxy (<IP_ADDRESS>) running in front of ejabberd?
Does ejabberd have valid domain certificates?
what is your implementation? k3s with MetalLB for example?

Thanks again for your reply.
as mentioned in my first post, my cluster with 3 bare metal nodes is running at home with microK8s.
Metallb is enabled in microK8s, but I would prefer to be able to enable an ingress(default nginx in microK8s) so that the forwarding configured in the firewall can simply remain on a node <IP_ADDRESS>.

as mentioned in my first post, my cluster with 3 bare metal nodes is running at home with microK8s.

Sorry, somehow I did not see it. You should be able to use Nginx's stream module (https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/) to listen for the respective ports and forward it to ejabberd. In that case, depending on where you terminate TLS, you may just forward plain TCP to ejabberd and disable its TLS listeners, or you perform a PASSTHROUGH.
Personally I have never worked with Ingress.Nginx in Kubernetes yet. And I fear, that the .Values.ingress in my values.yml template are faulty. So you probably need to create a custom configuration for that. Will look into it, when I have more time on fixing it.
This is an example when using Kubernetes Gateway API:
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
  name: istio-ingressgateway
  namespace: istio-ingress
  labels:
    app: istio-ingressgateway
spec:
  gatewayClassName: istio
  listeners:
  ### HTTP  ####################################################
  - name: http
    protocol: HTTP
    port: 80
  - name: https
    port: 443
    protocol: HTTPS
    tls:
      mode: Terminate
      certificateRefs:
      - kind: Secret
        group: ""
        name: le-cert-wildcard
    allowedRoutes:
      namespaces:
        from: All

  ### XMPP for StartTLS ### ####################################################
  - name: xmpp-c2s
    # hostname: "*"
    protocol: TCP
    port: 5222
    allowedRoutes:
      namespaces:
        from: All
  - name: xmpp-s2s
    # hostname: "*"
    protocol: TCP
    port: 5269
    allowedRoutes:
      namespaces:
        from: All

  ### XMPP for DirectTLS ### ####################################################
  - name: xmpp-c2s
    hostname: "example.com"
    port: 443
    protocol: TLS
    tls:
      mode: Passthrough
    allowedRoutes:
      namespaces:
        from: All
  - name: xmpp-s2s
    hostname: "example.com"
    port: 5270
    protocol: TLS
    tls:
      mode: Passthrough
    allowedRoutes:
      namespaces:
        from: All

# https://gateway-api.sigs.k8s.io/guides/tcp/
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
  name: xmpp-c2s
  namespace: ejabberd
spec:
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: istio-ingressgateway
    namespace: istio-ingress
    sectionName: xmpp-c2s
  rules:
  - backendRefs:
    - name: ejabberd-internal
      port: 5222
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TCPRoute
metadata:
  name: xmpp-s2s
  namespace: ejabberd
spec:
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: istio-ingressgateway
    namespace: istio-ingress
    # port: 5222
    sectionName: xmpp-s2s
  rules:
  - backendRefs:
    - name: ejabberd-internal
      port: 5269

# https://gateway-api.sigs.k8s.io/guides/tls/
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata:
  name: xmpp-c2s
  namespace: ejabberd
spec:
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: istio-ingressgateway
    namespace: istio-ingress
    sectionName: xmpp-c2s
  rules:
  - backendRefs:
    - name: ejabberd-internal
      port: 5223
---
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: TLSRoute
metadata:
  name: xmpp-s2s
  namespace: ejabberd
spec:
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: istio-ingressgateway
    namespace: istio-ingress
    sectionName: xmpp-s2s
  rules:
  - backendRefs:
    - name: ejabberd-internal
      port: 5270

Let me know if you have some further questions.


microsoft-github-policy-service Bot Issues

All,
As the Validation pipeline issue has been resolved, I'm creating this issue to track things related to the microsoft-github-policy-service bot.
Note: This is not to be confused with @wingetbot maintained by the WinGet team.
I'll update the following list as we continue to monitor issues and work with the bot engineering team:

https://github.com/microsoft/winget-pkgs/issues/96175
https://github.com/microsoft/winget-pkgs/issues/96181
https://github.com/microsoft/winget-pkgs/issues/96182
https://github.com/microsoft/winget-pkgs/issues/96183
https://github.com/microsoft/winget-pkgs/issues/96801

Something else we're noticing over on the Terminal: we've got a rule for when we add the needs-second label to a PR, the bot should add everyone else on the team to the PR as a reviewer. You can find our copy of the rule here: https://github.com/microsoft/terminal/blob/281015504629739995ddb63dd542615570919970/.github/fabricbot.json#L2580-L2646
As an example: https://github.com/microsoft/terminal/pull/14486

However, we've just noticed that this regressed, and seems to be re-requesting a review from people who have already approved:

(I'm filing this here cause this has kinda become the "issues with fabric bot" thread. If there's a better place, lemme know.)

Hi @zadjii-msft,
Unfortunately, my position was eliminated as part of the layoffs on March 6th and I was the sole engineer on the project.  I was left to believe that means Fabric Bot will no longer be used/supported/maintained.  You'll have to contact Dragos Boia internally for any news on that front, especially as I no longer have access to any systems.
Best of luck, and I'm glad FabricBot was useful!

I think I heard as much through the grapevine - sorry to hear it 😢 FabricBot has been absolutely critical to us being able to stay on top of the Terminal repo. You can bet I'll be following up internally.
Best of luck in the future!

cc @denelon All linked issues appear to have been closed as resolved.


Add tests for AppConfig and fix issue60

Close #60

Coverage decreased (-0.001%) to 97.232% when pulling 553c21a6f92657e6545ce4dbd614e69226ee12dc on issue60 into 6c43c2e6c92967e84dfafc54d324310677d781fe on master.

Coverage decreased (-0.001%) to 97.232% when pulling 0cf0b28f3cdab57afb821149d9a75a5db0c0ba6a on issue60 into 6c43c2e6c92967e84dfafc54d324310677d781fe on master.


Add support for AWS EC2 autoscaling services.

This PR adds support for AWS EC2 autoscaling using AWS autoscaling APIs.

[ ] Rebased/mergable
[ ] Tests pass
[x] CHANGELOG.md updated
[x] Sign CLA (if not already signed)

@nathanielc I have tested the code and scaling part is working fine.
Still lot of cleanup should be done on the code. However, could you please do a quick review? just to make sure that design and standards are proper. Let me know if any changes.
Thanks :)

@nathanielc Waiting for your review.

@nathanielc Have made the changes and also merged ec2_scale and ec2. I have not tested the ec2 discovery after the code change. I hope I have not broken the code.
Kindly review this.

@nathanielc Have made the required changes.

@nathanielc Any update on this PR? Is there anything more to be added?

@adityacs This looks good to go, Can you rebase and add a changelog entry? Once that is done I can merge.

@nathanielc Have made the changes.
Thanks :blush:


Develop variant to include the Textarea within the Radio with revealed input

Background
This issue was reported via the Radios discussion board #56.
Issue
An IDS user would like a variant that allows the Textarea component to be the input for the Radio with revealed input component.
Examples
The user provided an example of how this would appear:

Tasks

Develop a variant that allows the Textarea input to be within the Radio with revealed input.
PM to update the user of the outcome.
Possibly need to add a new ticket for content design to document this variant.

Discussed as team - agreed that this variant can be created.


Implement web.createContainer method

Implement a convenience method to create a container.

Implementation notes to self:

Use PUT instead of POST (to guarantee the container name)
Use If-None-Match: * header (tell the server to only create the container if no container by that name exists)

Implemented in #76, closing.


[BUG] Skip registration by domain not wokring

Im trying to get 'livechat.viasatconnect.com/livechat' to show the reg page, but skip it on localhost

In this case you can only mention localhost in the list, so it will only skip on localhost.
From the PR 381:
Adding only domain name skips registration for all paths with that domain
i.e. if www.google.com it will skip for www.google.com/a,www.google.com/b, www.google.com/*
Adding specific path like www.google.com/a will only skip registration on that path not others
Originally posted by @Shailesh351 in https://github.com/WideChat/Rocket.Chat.Livechat/pull/39#issuecomment-702181418

@Shailesh351 i tried hosting the widget on different pages, but none of them work except for skipping 'livechat.viasatconnect.com', but when doing that it skips the registration for ALL pages

@dlassalle when we use LiveChat with Livechat Script on any teest webpage, the url is same what we pass in the script function. For example:
<!-- Start of Rocket.Chat Livechat Script -->
	<script type="text/javascript">
	(function(w, d, s, u) {
		w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
		var h = d.getElementsByTagName(s)[0], j = d.createElement(s);
		j.async = true; j.src = 'https://livechat.viasatconnect.com/livechat/rocketchat-livechat.min.js';
		h.parentNode.insertBefore(j, h);
	})(window, document, 'script', 'https://livechat.viasatconnect.com/livechat');
	</script>

Using the above script on any page say example.com, on the serverside will recieve the url https://livechat.viasatconnect.com/livechat That's why when you were skipping 'livechat.viasatconnect.com', it was skiping ALL pages using the above script.

@dlassalle One solution can be to add query params in the URL and skipDomainList, and check that as well with hostname and path.
@Shailesh351 Thoughts?

@dlassalle One solution can be to add query params in the URL and skipDomainList, and check that as well with hostname and path.
@Shailesh351 Thoughts?

@shubhsherl As our widget is loading in iFrame and the src of iFrame is https://livechat.viasatconnect.com/livechat. So
window.location.href uses that instead of actual web page url. https://github.com/WideChat/Rocket.Chat.Livechat/pull/20/files#diff-dbd1065ebaf59b9c5fec54631b2e5e06R23
I'm trying to find a way using which we can pass actual parent web page url down to iFrame and pass it on with Livechat.config() API

PR #43


add extras to billdocument

some times we want to index bill attachments. add extras field to doc to attach these attributes.

Hi @jamesturk sorry for the failing test. Needed migrations. working now.

looks good to me


how to set prefix to 'en/admin'

route/admin.php:
I want to set prefix as fellows because I want to built a multi-language site.
'prefix' => LaravelLocalization::setLocale(). '/admin' ,
my site URL will be xxxx/public/en/admin.
how to set prefix in config/multiauth.php ?

Sorry but its not configurable right now


Skin disfigurement?

We're having skin disfigurement issues.
Is this caused by the change to the 1.8 skins?

Optifine is knows to cause issues. Do you have it installed?

Not at all

Fastcraft?

I don't think fastcraft would cause problems.
Try with the latest release: http://minecraft.curseforge.com/projects/et-futurum/files/2270081
Alternatively, if you don't use the 1.8 skin style, you might as well just turn that feature off :)

I've actually had a 1.8 skin for a long time, and am really looking foreward to having the disguise mode of that outer layer. 1.5.2 seems to have fixed it, thank you.

Awesome! That's great to hear, because I've run out of ideas on how to implement this XD


Does this support sync downloads?

When this app downloads a Patreon page for content does it re-download overwriting previous downloads? Or does it only download new Patreon posts since the last time it was ran?
For example if I download all 100 episodes of a weekly podcast and then one week later run the app again does it re-download all 100 episodes or just the new one?

In most cases it should not re-download already existing files by default. Depending on the server where the file is hosted the check might range from file existance check to file size comparison. If remote file size is available and file size comparison fails the old file is backed up and new one is downloaded in its place.
The only time there might be issues is when creator adds additional files to already existing posts.


array type

store arrays as:

jsonb for postgres (aws_redshift)
json for mysql
Array(String) for Clickhouse
Array<String> for bigquery
array for snowflake

Not need for now. Closing


More docs

More docs, trying to cleanup some of the main rustdoc page.

Just a couple minor typos


EISDIR: illegal operation on a directory, read error when trying to REMOTE-SSH

I am using VS Code insider 1.35.0 and I was trying to get Remote Development to work, and I accidentially modified a config file and now when I hit F1 and choose "REMOTE-SSH" I get the following error:
EISDIR: illegal operation on a directory, read
I don't recall exactly which file was modified.  Is there ANY way to recover from this?  I tried uninstall VS Code, rebooting, and re-installing and I still get the same error.  Is there any way to start over from scratch?

I had set an absolute path as a user variable, and that was causing the problem.  I was able to fix it, but I think VS Code could be made to be more robust to such problems.


Select a Project from a list of existing Projects when retrieving data, pipelines from external repositories

We should assume at present that a given user has a predefined list of existing Projects in the system. We need to allow the user to choose a Project from among these when receiving data pushed from Boardwalk or a pipeline pushed from Dockstore.

See UI design mocks with a clickthrough path here
"Code Repository" is a stand-in for Dockstore in these mocks


Added "delayed" generation of delegate signatures (follow-up)

This is a reopening of #53, rebased on top of the latest main branch.
I apologize for not replying to the request of an example, sorry.
I'll show an example in this PR; I'm not 100% sure this is the best way to fix the issue, but we can start from this for a discussion.

Description
Just as before, with this patch if a delegate is found during the construction of a method, its declaration is still emitted, after all the other types have been.
This is implemented through an HashSet of forward declarations that is used as now for delegates, but can be expanded to include other item types in the future.

Example
Take this example Rust source:
#[no_mangle]
pub extern "C" fn set_callback(alloc_callback: extern "C" fn(size: usize, data: *const u16) -> *mut u8) {
    println!("Your callback is {alloc_callback:p}");
}

This CORRECTLY generates the following C# code:
namespace ExampleNamespace
{
    internal static unsafe partial class NativeMethods
    {
        const string __DllName = "example.dll";

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate byte* set_callback_alloc_callback_delegate(System.UIntPtr size, ushort* data);

        [DllImport(__DllName, EntryPoint = "set_callback", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void set_callback(set_callback_alloc_callback_delegate alloc_callback);
    }
}

So far so good. Now, that Rust declaration is nasty and would probably get refactored as:
type MyCallback = extern "C" fn(size: usize, data: *const u16) -> *mut u8;

#[no_mangle]
pub extern "C" fn set_callback(alloc_callback: MyCallback) {
    println!("Your callback is {alloc_callback:p}");
}

which produces
namespace ExampleNamespace
{
    internal static unsafe partial class NativeMethods
    {
        const string __DllName = "example.dll";

        [DllImport(__DllName, EntryPoint = "set_callback", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void set_callback(set_callback_alloc_callback_delegate alloc_callback);
    }
}

which is obviously bad because set_callback_alloc_callback_delegate's definition is nowhere to be found.
The proposed fix produces this version instead:
namespace ExampleNamespace
{
    internal static unsafe partial class NativeMethods
    {
        const string __DllName = "example.dll";

        [DllImport(__DllName, EntryPoint = "set_callback", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
        public static extern void set_callback(set_callback_alloc_callback_delegate alloc_callback);

        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
        public delegate byte* set_callback_alloc_callback_delegate(System.UIntPtr size, ushort* data);
    }
}

Differences from the version in PR #53
The code is verbatim the same with these small differences:

in #53 the delegate declaration was being generated at the namespace level (as it does for other types like structs and enums), now I moved it to be at the class level to follow what it would do for the first Rust code in the example above
added public visibility modifier, given that the declaration is now inside the class and would default to private instead of internal
added the [UnmanagedFunctionPointer(CallingConvention.Cdecl)] boilerplate

sorry for delayed response and thank you for clarification.
Certainly, it seems useful.
I have a CONFLICT due to a merge of another branch, can you please fix it?
If so, we would like to check it out and incorporate it into the release process as soon as possible.

Rebased, should have no conflicts.

Hmm, I tried it with the current main branch, but
type MyCallback = extern "C" fn(size: usize, data: *const u16) -> *mut u8;

#[no_mangle]
pub extern "C" fn set_callback(alloc_callback: MyCallback) {
    println!("Your callback is {alloc_callback:p}");
}

This seems to be expanded to:
[DllImport(__DllName, EntryPoint = "set_callback", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
internal static extern void set_callback(delegate* unmanaged[Cdecl]<nuint, ushort*, byte*> alloc_callback);

That's how it expanded in my tests.
I wonder if it could be configuration or some other difference.
I will recheck, but I'm currently away from "decent computing devices" for a couple of weeks.

I wonder if it could be configuration or some other difference.

It is configuration.
Namely, it works with csharp_use_function_pointer(true) but not with csharp_use_function_pointer(false). I'll check if it can be made to work in the second case without all this infrastructure.


updated 33-7 with color #FF25AC

Checklist

[ ] I ran npm test locally and it passed without errors.

[x] I only edited the _data/pixels.json file.

[ ] I entered the username in the pixels.json that I'm also using to create this pull request.
[ ] I acknowledge that all my contributions will be made under the project's license.

Closing this as a duplicate of #544

Closing as another duplicate


resources add hash

Related Issues
#91494
Description
In normal Web project, the js / css / images has a hash symbol, like react.dr34ex.js, this can block browser use cached file. But in flutter web, the js / images use the same name even code has been changed, this case the browser can not update resources immediately.
So if you add this feature code, when run flutter build web, the main.dart.js change to main.dart.[hash].js and the images's name like user.png change to user.[hash].png. If you use defered loader, the main.dart.js_1.part.js change to main.dart.js_1.part.[hash].js.
@darshankawar Thanks for looking into this.
Use Before

Use After

Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

The service worker already uses a similar cache busting technique (js, tool).
Would it be possible to reuse that instead of the file renaming techinue?

@yjbanov  I have read this code logic, the random int will add the end of the file as version, looks like: a.js?v=198. If we use the version technique for the main.dart.js / xxx.part.js / images, those files will be reload after every publish, even though those files haven't changed.
The renaming technique will calculate the MD5 value of these files as the hash, if the file does not change, the MD5 value will not change either. Webpack or Rollup also use this method to deal with resources, this can take advantage of browser cache.

Hello @yjbanov, Do you have any other ideas about the implementation of the hash?

Hello @christopherfujino What do you think about the implementation of the hash functions?

I like the idea of cache busting based on content-hashing. However, I can't quite wrap my head around how robust this particular implementation is. I feel like the Flutter tool and dart2js should collaborate on this more explicitly. Perhaps dart2js could vend JS bundles with content-hashed file names as well as a JSON manifest explaining the output.
I'm also wondering if this can work without renaming the files themselves. For example, can we put the hash as a URL query parameter, like this:
<script src="main.dart.js?hash=414f03">

If content hashing is used, should we also content hash the service worker?
The way this implementation works right now, it takes the output of dart2js then rewrites the code treating it as a plain string. The same can be done using a script or a pub package. IOW, it's not strictly necessary to add it to the Flutter Tool. If we want to add it to the Flutter Tool, I'd expect it to understand all the compilation units more deeply, before even we output the JS files. For example, in the dependency graph of the part files, the leaves would be hashed first, then their hashes would be embedded into parts that depend on them, and then those will be hashed.

I like the idea of cache busting based on content-hashing. However, I can't quite wrap my head around how robust this particular implementation is. I feel like the Flutter tool and dart2js should collaborate on this more explicitly. Perhaps dart2js could vend JS bundles with content-hashed file names as well as a JSON manifest explaining the output.
I'm also wondering if this can work without renaming the files themselves. For example, can we put the hash as a URL query parameter, like this:
<script src="main.dart.js?hash=414f03">

If content hashing is used, should we also content hash the service worker?
The way this implementation works right now, it takes the output of dart2js then rewrites the code treating it as a plain string. The same can be done using a script or a pub package. IOW, it's not strictly necessary to add it to the Flutter Tool. If we want to add it to the Flutter Tool, I'd expect it to understand all the compilation units more deeply, before even we output the JS files. For example, in the dependency graph of the part files, the leaves would be hashed first, then their hashes would be embedded into parts that depend on them, and then those will be hashed.

@sunhaikuo thank you for opening this PR; however, I agree with @yjbanov, I think the approach in this PR could easily be implemented as third-party tooling. Thus, I am going to close this PR. Feel free to discuss approach further on https://github.com/flutter/flutter/issues/91494. In general, I would advise starting with a discussion on the issue first, before working on implementing new features.


npm-run-all vs ampersand

I'm not sure if understand of difference between:

npm-run-all script-one script-two
and
script-one & script-two

Can anybody explain? What is the difference? Why I should use npm-run-all?

Thank you for the question.
At first, npm-run-all script-one script-two and script-one & script-two is pretty different. The npm-run-all script-one script-two is equivalence to npm run script-one && npm run script-two. In short, npm-run-all is a tool to run multiple npm-scripts. In addition;

You can use glob-like pattern matching. E.g. npm-run-all build:**. This allow you to simplify npm-scripts.
You can run multiple npm-scripts in parallel on cross platform. E.g. npm-run-all -p watch:js watch:css. This is almost equivalence to npm run watch:js & npm run watch:css, but works on Windows which doesn't support the & operator, as well.
Maybe --race option is useful for tests. E.g. npm-run-all -p -r test-server test runs the test server and test in parallel, then it will kill the test-server automatically after the test completed.

Documents is here: https://github.com/mysticatea/npm-run-all/blob/master/docs/npm-run-all.md


[Refactor Sessions] [ENG-4431] Fix status message

Purpose
TBD
Changes
TBD
QA Notes
N/A
Any concerns/considerations/questions that development raised?
Documentation
N/A
Side Effects
N/A
Ticket
https://openscience.atlassian.net/browse/ENG-4431

@adlius PR looks good as we've discussed in person. Can you update the ticket description + PR description to briefly describe bug and the fix, thanks! Afterwards feel free to merge it.


[SMALLFIX] [branch-1.3] Throw IOException directly on login failure, rather than creating LoginException first

The original code creates log message has the real cause very minimal
Also update the command using -libjar in doc

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/11608/
Test PASSed.

Merged build finished. Test PASSed.


I want to use it on symfony 3 what are the steps please ?

symfony 3

hi, isn't it working as on the documentation ? https://github.com/mediafigaro/google-analytics-api-symfony#installation


[Request] Add Slack fields to notifications

The Slack notification API has added a fields parameter that allows for some additional formatting [1]. It looks like the work was started to add this additional parameter [2], but the feature was never finished so that it was available.
[1] https://api.slack.com/docs/message-attachments#fields
[2] https://github.com/prometheus/alertmanager/blob/v0.5.1/notify/impl.go#L485-L490

Hi @taharah do you have some time creating a PR for this? We are here to help in case you have any questions.

@mxinden @taharah  I would like to pick this up. Will create a PR soon with my basic Golang knowledge. Thanks.


python3Packages.wandb: 0.16.0 -> 0.16.4

Motivation for this change
Upgrades python3Packages.wandb from 0.16.0 to 0.16.4
This PR was automatically generated by nixpkgs-upkeep.

CI workflow that created this PR.
Internal tag: c24ae5bb4c195d6f23aa5c3afada07cf.

Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Why not force-push https://github.com/NixOS/nixpkgs/pull/286848 instead?

Why not force-push https://github.com/NixOS/nixpkgs/pull/286848 instead?

Not a bad idea, but tricky to get right: If work starts on a branch, and then we auto force push work could be lost. For instance, commits following your suggestions in https://github.com/NixOS/nixpkgs/pull/286848 would've been lost.
Currently nixpkgs-upkeep hashes based on the new version number and package metadata, which works mostly ok. I'm open to improvements on the deduplication/update logic, just have to ensure that they are non-destructive.

Anyway, let's close this and work on the other PR instead.


bloom release galactic 2.0.6

Codecov Report

Merging #239 (130d55c) into galactic (f8d1c84) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           galactic     #239   +/-   ##
=========================================
  Coverage     60.75%   60.75%
=========================================
  Files            13       13
  Lines          1488     1488
  Branches        440      440
=========================================
  Hits            904      904
  Misses          379      379
  Partials        205      205

Continue to review full report at Codecov.

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


Add JS syntax highlighting to readme

Hi, Duncan 👋 This library looks awesome!
I thought the code examples on the readme might be easier to read with some syntax highlighting so I tagged the markdown code blocks with js to make GitHub highlight it properly.

Hey Cole! Thanks for the PR, now it's a real open source project. :P The syntax highlighting does help, thanks for that. Let me know if you build anything cool with the library!


Fix crash with tf.transpose when a is complex and conjugate is True

This PR tries to address the issue raised in #46891 where
tf.transpose will crash when a is complex and conjugate is True.
The issue comes from:
https://github.com/tensorflow/tensorflow/blob/57bbc5e0d4b93483b8ae853352173516f1c08018/tensorflow/core/kernels/transpose_functor.h#L169
However, as ndims < 2 has already been handled properly:
https://github.com/tensorflow/tensorflow/blob/57bbc5e0d4b93483b8ae853352173516f1c08018/tensorflow/core/kernels/transpose_functor_cpu.cc#L103-L105
The check could be removed.
This PR fixes #46891.
Signed-off-by: Yong Tang<EMAIL_ADDRESS>

@rohan100jain @cantonios thanks for the review. The PR has been updated. Please take a look.

Thanks @cantonios  for the help. The PR has been updated. Please take a look and let me know if there are any issues.

Thanks @cantonios for the help. The PR has been updated. Please let me know if there are any additional issues.


Custom ports not used for ingress in ACA

I've got an AppHost project with custom ports for Kafka and Postgres:
var kafka = builder.AddKafka("kafka", port: 6000);
var postgres = builder.AddPostgres("postgres", port: 6001);

var rideService = builder.AddProject<Projects.Application_RideService>("ride-service")
	.WithReference(postgres)
	.WithReference(kafka);

This works well locally, but when I deploy to Azure Container Apps using azd the custom ports aren't taken into consideration.
This is the ingress that's configured for the kafka container:
"ingress": {
        "allowInsecure": false,
        "clientCertificateMode": null,
        "corsPolicy": null,
        "customDomains": null,
        "exposedPort": 0,
        "external": false,
        "fqdn": "kafka.internal.__________________.swedencentral.azurecontainerapps.io",
        "ipSecurityRestrictions": null,
        "stickySessions": null,
        "targetPort": 9092,
        "traffic": [
          {
            "latestRevision": true,
            "weight": 100
          }
        ],
        "transport": "Tcp"
      },

Meanwhile, the connection string secrets of the ride-service are set as follows:
connectionstrings-kafka = kafka:6000

The result is that the ride-service cannot reach the Kafka cluster.

Can you say what version of azd you are using and can you also run
dotnet run --publisher manifest --output-path manifest.json
in the apphost directory and paste the output here?

The ingress is correct, that's the container port i.e.g the one you are bound to in the container itself. The "port" is what other containers use to talk to you, not what you are bound to.

azd version 1.9.2 (commit c58b02f71710960aba28f81f3698e64cfdda9f96)
Manifest looks pretty good:
{
  "resources": {
    "application-insights": {
      "type": "azure.bicep.v0",
      "connectionString": "{application-insights.outputs.appInsightsConnectionString}",
      "path": "application-insights.module.bicep",
      "params": {
        "logAnalyticsWorkspaceId": ""
      }
    },
    "kafka": {
      "type": "container.v0",
      "connectionString": "{kafka.bindings.tcp.host}:{kafka.bindings.tcp.port}",
      "image": "docker.io/confluentinc/confluent-local:7.6.1",
      "env": {
        "KAFKA_ADVERTISED_LISTENERS": "PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092"
      },
      "bindings": {
        "tcp": {
          "scheme": "tcp",
          "protocol": "tcp",
          "transport": "tcp",
          "port": 6000,
          "targetPort": 9092
        }
      }
    },
    "postgres": {
      "type": "container.v0",
      "connectionString": "Host={postgres.bindings.tcp.host};Port={postgres.bindings.tcp.port};Username=postgres;Password={postgres-password.value}",
      "image": "docker.io/library/postgres:16.2",
      "env": {
        "POSTGRES_HOST_AUTH_METHOD": "scram-sha-256",
        "POSTGRES_INITDB_ARGS": "--auth-host=scram-sha-256 --auth-local=scram-sha-256",
        "POSTGRES_USER": "postgres",
        "POSTGRES_PASSWORD": "{postgres-password.value}"
      },
      "bindings": {
        "tcp": {
          "scheme": "tcp",
          "protocol": "tcp",
          "transport": "tcp",
          "port": 6001,
          "targetPort": 5432
        }
      }
    },
    "ride-service": {
      "type": "project.v0",
      "path": "../Application.RideService/Application.RideService.csproj",
      "env": {
        "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EXCEPTION_LOG_ATTRIBUTES": "true",
        "OTEL_DOTNET_EXPERIMENTAL_OTLP_EMIT_EVENT_LOG_ATTRIBUTES": "true",
        "OTEL_DOTNET_EXPERIMENTAL_OTLP_RETRY": "in_memory",
        "ASPNETCORE_FORWARDEDHEADERS_ENABLED": "true",
        "APPLICATIONINSIGHTS_CONNECTION_STRING": "{application-insights.connectionString}",
        "ConnectionStrings__postgres": "{postgres.connectionString}",
        "ConnectionStrings__kafka": "{kafka.connectionString}"
      },
      "bindings": {
        "http": {
          "scheme": "http",
          "protocol": "tcp",
          "transport": "http"
        },
        "https": {
          "scheme": "https",
          "protocol": "tcp",
          "transport": "http"
        }
      }
    },
    "postgres-password": {
      "type": "parameter.v0",
      "value": "{postgres-password.inputs.value}",
      "inputs": {
        "value": {
          "type": "string",
          "secret": true,
          "default": {
            "generate": {
              "minLength": 22
            }
          }
        }
      }
    }
  }
}

Looks like the problem is with the exposedPort property in the ingress. When I change it to 6000 (0 after deployment) I can connect to the kafka container from the ride-service.
That immediately brings up another issue though. The KAFKA_ADVERTISED_LISTENERS environment variable is set to PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092. This is fine when running locally, but when deployed to ACA, the value should be changed to include the ACA service name and ports. Otherwise, the ride-service will try to connect to localhost:9092 and obviously fail.
I guess I can override the env var in publish mode as a workaround?

Looks like the problem is with the exposedPort property in the ingress. When I change it to 6000 (0 after deployment) I can connect to the kafka container from the ride-service.

@vhvb1989 Looks like this is a problem.
@amolenk can you file this one on https://github.com/Azure/azure-dev/issues.
Also as a future debugging tip, run azd infra synth and look at the bicep (yeah I know), it's a good way to understand the translation.

That immediately brings up another issue though. The KAFKA_ADVERTISED_LISTENERS environment variable is set to PLAINTEXT://localhost:29092,PLAINTEXT_HOST://localhost:9092. This is fine when running locally, but when deployed to ACA, the value should be changed to include the ACA service name and ports. Otherwise, the ride-service will try to connect to localhost:9092 and obviously fail.

This was recently fixed https://github.com/dotnet/aspire/blob/90cd4b58a78379650a584b297e4328fdd5319bb6/src/Aspire.Hosting.Kafka/KafkaBuilderExtensions.cs#L123-L126 (along with some other issues)
Yes, you should be able to copy this logic and override it in the kafka container

@davidfowl I'd expected the KAFKA_ADVERTISED_LISTENERS fix to part of the 8.0.1 release, but it looks like it's not. Any idea when the fix will be released?

The release after that. 8.0.1 doesn't have any of the features in main. We're still working out the scope and date for that release. For now, just copy the code above into your project as a workaround.

Closing this as it should be fixed now.


update description of Lighty

Lighty has an updated description
Project URL
https://github.com/abdullahselek/Lighty
Description
Supported platforms added to description of Lighty.
Why it should be included to awesome-ios (optional)
Checklist

[x] Only one project/change is in this pull request
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 9 / tvOS 10 or later
[x] Supports Swift 3
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

          1 Error

:no_entry_sign:
Found 1 link issue

Link issue by awesome_bot

Line
Status
Link

2446
503
http://www.teehanlax.com/tools/iphone/

  Generated by :no_entry_sign: Danger


Wrongfully matching equal versions

Hey, nice work!
Somehow, I'm having problems when matching equal versions using Compare()
if version.Compare(last, current), ">")
If 'last' is more or less than current it's fine (returns correct true/false), but if they are equal it's returning true (suppose it's to be false?)

Nevermind, my bad. :D

Nevermind, my bad. UTF8 weirdness.


better support v0.9 and RHEL distro

I've pulled in som v0.9 changes from chrisduong, and made a couple of minor RHEL updates.

+1

master supports Rhel now and the config should be a lot more configurable now.
re-open if this is not the case.


"Open with Windows Terminal" context menu starts Windows Terminal at wrong path

Windows Terminal version (or Windows build number)
10.0.22000.0, 1.11.2921.0
Other Software
No response
Steps to reproduce
Create a folder named [xxxx and [xxxx], open them, and use the "Open with Windows Terminal" context menu to open Windows Terminal.
Expected Behavior
No response
Actual Behavior
If you start Windows Terminal with the "Open with Windows Terminal" option in a folder that name begins with [, it will switch the current directory to C:\, or a folder that name begins with [ and ends with ] it will switch the current directory to C:\Windows\System32\WindowsPowerShell\v1.0.

Unfortunately, this is a PowerShell issue. The version of PowerShell that comes with Windows cannot handle being started in a folder that has [] in it. PowerShell 6+ does properly handle it, however.

Is there a workaround for this issue? Using the context menu with holding shift key and select the option "Open with Powershell" works well.

Well, that's certainly interesting, but I'd expect that's an artifact of how they implemented theiy context menu handler (rather than just fixing the underlying bug...?)
The workaround would be update to the latest PowerShell, which supports this just fine. If you're really stuck on Windows PowerShell (v5), then I'm not sure there's much else that can be done here I'm afraid ;__;


Edit reprojection and resampling notebook

This PR includes my edits to the reprojection/resampling notebook.
cc @marcozimmermannpm

@thuydotm I changed a lot of the cells to highlight the resampling aspects a little more. I also changed the title of the notebook to "Reprojecting and resampling". Please make sure I didn't create add any errors to the whole thing.
A few questions:

For the introductory paragraph, would it make sense (and be correct) to say "In general, reprojecting and resampling while loading the data is more efficient" (i.e. adding resampling)?
according to https://github.com/makepath/xarray-spatial/blob/master/xrspatial/multispectral.py, the default values for true_color() are c=10.0 and th=0.125. In the notebook, we say that we use c=20 as a default. Do we set c to 20 somewhere, or are we in fact using the default value of 10 instead?
For "Method 2": Does rasterio.enums.Resampling.average mean the same as https://en.wikipedia.org/wiki/Linear_interpolation? If not, what would be a good resource to link here?
Also "Method 2": How and where do I specify the target resolution? What default resolution is used if no explicit resolution is provided? Or is the resolution defined in robinson_transform (in this case, Step 3 should be (“Calculate a transform to reproject from source CRS to destination CRS and destination resolution.”)?
For "Method 3": How and where do I set the resolution in this example?
For "Method 4": Is there a good resource we could link to explain median resampling?
Also for "Method 4": How and where do I set the target resolution in this example?

Thanks!

Thanks @tcmetzger.
Reprojection is actually a resampling operation. When doing reprojection, we resample our data to a new CRS by using an interpolation/resample method. See more here: https://pro.arcgis.com/en/pro-app/2.7/help/analysis/raster-functions/resample-function.htm

For the introductory paragraph, would it make sense (and be correct) to say "In general, reprojecting and resampling while loading the data is more efficient" (i.e. adding resampling)?

Sounds good to me.

according to https://github.com/makepath/xarray-spatial/blob/master/xrspatial/multispectral.py, the default values for true_color() are c=10.0 and th=0.125. In the notebook, we say that we use c=20 as a default. Do we set c to 20 somewhere, or are we in fact using the default value of 10 instead?

Sorry, I made a mistake here, the default is c=10 and it is used through this notebook.

For "Method 2": Does rasterio.enums.Resampling.average mean the same as https://en.wikipedia.org/wiki/Linear_interpolation? If not, what would be a good resource to link here?

As official rasterio documention, average resampling computes the weighted average of all non-NODATA contributing pixels. Maybe we can point user to the "average" part of the section: https://rasterio.readthedocs.io/en/latest/api/rasterio.enums.html#rasterio.enums.Resampling

Also "Method 2": How and where do I specify the target resolution? What default resolution is used if no explicit resolution is provided? Or is the resolution defined in robinson_transform (in this case, Step 3 should be (“Calculate a transform to reproject from source CRS to destination CRS and destination resolution.”)?

The resolution defined in robinson_transform. It is decided by the height, width, and bounds of the destination CRS.

For "Method 3": How and where do I set the resolution in this example?

The resolution is set with space_oblique_resolution to construct the destination RasterSpec

For "Method 4": Is there a good resource we could link to explain median resampling?

Similar to 3. I think the best link is the rasterio documentation itself: https://rasterio.readthedocs.io/en/latest/api/rasterio.enums.html#rasterio.enums.Resampling

Also for "Method 4": How and where do I set the target resolution in this example?

With rasterio.reproject, the answer is similar to question 4 for method 2.
With rio.reproject, it can be set using resolution param. If not provided, it will be calculated internally using information about source raster and destination CRS.

@thuydotm Thanks for your input, I have updated the notebook accordingly. For consistency, I divided the code in Method 3 into three steps and added descriptions for each step, like I did for the other methods.

Merged. Thanks so much @tcmetzger!


request page telling me I can't make a request

Getting the generic error message come up. This is happening on chrome & Mac.

can't add support either - that's on an existing request on android

Fixed the new request page. Add support will take longer, probably has to be done tomorrow.

Add support fixed.


Is re-throwing in promises going to be supported by $q at some point?

The docs for $q state:

Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.

and

This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject

So my question is, is this planned to be supported at any time in Angular 1? In a successful .then chain we can keep returning the same item/data, or modify it and return that, so why not re-throw an error in .catch that occurred without needing to include $q as a dependency?
E.g.
doSomething
  .catch(error => {
    doSomethingElse();
    throw error;
  });

instead of:
doSomething
  .catch(error => {
    doSomethingElse();
    return $q.reject(error);
  });

If not, is there a specific reason for this not being supported in $q?

Throwing an error from within a .then or .catch callback does already work for rejecting the promise.
--
It seems like you have misinterpreted the quoted statements:

Note: unlike ES6 behavior, an exception thrown in the constructor function will NOT implicitly reject the promise.

This only refers to the throwing from within the contructor (i.e. resolver function), when using $q as a constructor (ES6-style). E.g.:
$q(function (resolve, reject) {
  throw new Error('From constructor !');
}).then(
  // Will never get here unless you call `resolve()` or `reject()`.
  // Throwing won't work !
);

But it's OK, because when using $q like this, you can use the reject function argument, so no need for $q.reject().
--

This also means that if you "catch" an error via a promise error callback and you want to forward the error to the promise derived from the current promise, you have to "rethrow" the error by returning a rejection constructed via reject

The key word here is "forward". Throwing an error will still work for rejecting the promise, but it does not do a good job at forwarding the initial error, because the next rejection handler will get your thrown error as argument.
So, if you only care to propagate the rejection, throwing is enough. If you want to propagate the error (which could be anything from null, to an error message string, to a custom object), you need to use $q.reject().

Closing as it seems like what you are asking is already supported.
Feel free to reopen, if I missed something :smiley:

@gkalpak thanks for the reply, I guess I misinterpreted the first paragraph indeed.
But, what I am interested in, is indeed the ability to rethrow anything, be it null, a string, or a custom object, and not necessarily an exception/error object.
This works for example in Ember's promise library, and can be quite handy.
So for example the following would work as expected.
doSomething
  .then(() => {
    throw 'foo';
  })
  .catch(reason => {
    console.log(reason); //foo
  });

Can I take from your reply that this use case is not supported and will not be supported by $q?

@adambuczynski, ooops, how did I miss that ? Obviously you can throw anything and it works as you expect it to. (I guess I'm too used to throwing only Error objects :smiley:)
It's just JavaScript :)
The only difference between is that return $q.reject(anything) will just pass anything down the chain, while throw anything will additionally pass anything to the $exceptionHandler. Other than that, both methods work the same.
Sorry for the confusion :disappointed:

@gkalpak No worries, and thanks for the clarification. Now that you've mentioned that, I remember why I wasn't using throws. It's not that it wasn't working, it's that those rejections weren't silent as they were sent to the $exceptionHandler, which in my case was logging to console.
Is there a way to turn off that behaviour in $q, perhaps via a decorator? Or is it too deeply baked into Angular?

Unfortunately, you can only decorate $exceptionHandler globally (not just for $q).

Yeah I was thinking of decorating $q, not $exceptionHandler :)

There's no easy way to skip the call to $exceptionHandler (unless you implement your own $q :stuck_out_tongue:). It's hidden deeply inside Deferred, which is a private "class" available to $q iirc.

Alright, I'll stick to using $q.reject's. Do you know if this works differently in Angular 2? Does Angular 2 use native promises, or can you specify a promise library to use?

Angular 2 prefers Observables (not promises), but you can still use promises. Since ng2 uses zones, you can use native implementations and hooking in your library of choice should be fairly easy (although I haven't tried that).
But you'll probably want to use observables and not miss out on the new features the bring on the table :grin:

Will give them a shot for sure, thank you.


Is there code about Imitation Learning of training the policy?

I havn't run these two line code because I havn't configure the environment.

python -m run_openpose

python -m refine_video

But I guess the first one is to get the json file storing all the keypoints and the second one is to get the bvh and h5 file storing the animation..
The question is, how to train the policy? Is the code for training not uploaded yet?
I'm a newbee about Deep Learning and I will be very appreciated if you have time to answer me.

Please take a look at the deep mimic code release for this part: https://github.com/xbpeng/DeepMimic


Drone doesn't schedule pods according to platform

Drone version: 1.3.1
Mixed-arch K8s cluster
Deployed using helm chart  https://github.com/helm/charts/tree/master/stable/drone

It seems drone randomly creates pods without taking into consideration the node's architecture. More often than not, AMD64 pipelines get scheduled on ARM64 nodes.
Here's my drone.yml
kind: pipeline
name: amd64

platform:
  os: linux
  arch: amd64

steps:
- name: docker
  image: plugins/docker
  pull: always
  settings:
    repo: example.com/firefly-iii
    registry: example.com
    auto_tag: true
    auto_tag_suffix: linux-amd64
    debug: true
    dockerfile: Dockerfile
---
kind: pipeline
name: arm64

platform:
  os: linux
  arch: arm64

steps:
- name: docker
  image: plugins/docker
  pull: always
  settings:
    repo: example.com/firefly-iii
    registry: example.com
    auto_tag: true
    auto_tag_suffix: linux-arm64
    debug: true
    dockerfile: Dockerfile.arm64
---
kind: pipeline
name: manifest

steps:
- name: manifest
  image: example.com/drone-manifest
  pull: always
  settings:
    repo: example.com/firefly-iii
    registry: example.com
    ignore_missing: true
    spec: manifest.tmpl
    dump: true

trigger:
  event:
  - push
  - tag

depends_on:
- amd64
- arm64

Any idea what might be causing this? Thanks :)

duplicate of https://github.com/drone/drone-runtime/issues/68


chore: better approach on deleting node entries

Purpose
Miho's approach did do anything and peers was still dropped on timeout. This should improve what peers are we dropping
How does the solution address the problem

Changes made

prnet cleaned-up successfully


Location Timezone support for python3 newstr

Things have been quiet for a while. Hope the fall is going well for all of you so far!
The following code
from __future__ import (absolute_import, division,
                        print_function, unicode_literals)
from builtins import *
from pvlib.location import Location
tz = -10
str_tz = 'Etc/GMT+' + str(-1*int(tz))
my_loc = Location(20.0, -155.9, str_tz, 105.0, "my_place")

gives the following exception:
Traceback (most recent call last):
  File "/Users/lucas/Documents/Code/sim/pv.py", line 52, in <module>
    my_loc = Location(20.0, -155.9, str_tz, 105.0, "my_place")
  File "/usr/local/lib/python2.7/site-packages/pvlib/location.py", line 76, in __init__
    raise TypeError('Invalid tz specification')
TypeError: Invalid tz specification

The most straightforward fix is, in location.py, to check isinstance(tz, basestring) instead of str on line 66. This makes it compatible across python 2 and 3.

The fix is just one word in location.py, but I can't make the change as I seemingly don't have permission to push my branch for a PR. I'm fine if someone else simply makes the fix, but if I can have permission to contribute to branches for PRs, that would be nice :) thanks!
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/Issue244-location-compatibility:refs/heads/Issue244-location-compatibility
Pushing to https://github.com/pvlib/pvlib-python.git
remote: Permission to pvlib/pvlib-python.git denied to lukewitmer.
fatal: unable to access 'https://github.com/pvlib/pvlib-python.git/': The requested URL returned error: 403
Completed with errors, see above

To maybe make things a little more clear for future readers, the problem is that in the example above, str_tz = 'Etc/GMT+' + str(-1*int(tz)) is not actually a pure str. Rather, the from __future__ import unicode_literals statement means that Python 2 will interpret that "string" as unicode (same behavior as the default in Python 3). In Python 2, this presents a problem for the Location class constructor since it's looking for str but getting unicode instead.
We'd welcome a fix for this. To make a PR, you need to fork the library, push the changes to your fork, and make the PR from your fork. Please also add a test to test_location.py, probably just by adding u'Etc/GMT+7' or similar to the test_location_tz parametrize list.

Thanks Will. I wasn't familiar with the forking workflow. I think I have it now. PR is in and was running through some checks. Thanks!


ScriptTagInputDataType enum fields are incorrect

The ScriptTagInputDataType enum is missing some required fields, and has incorrect numeric values for some fields.

Fixed in v2.0.0-beta.165


Possible enhancement: 2-way binding $index on a model field

Per this question at stack overflow http://stackoverflow.com/questions/31314134/is-there-a-way-to-2-way-bind-index-from-ng-repeat-on-a-model-without-javascript/31314293#31314293
It would be nice if we could get rid of the boiler plate code that keeps the model field and $index in sync.
Let me know what are your thoughts or of this currently possible somehow.
Thanks,
Michael

The simple hack of doing
<div ng-repeat="element in elements track by $index" ng-attr-xxx="element.order = $index"> </div>

is enough and there should be no need to add anything special to the core.


[VS Code] Publish to Open VSX registry

it allows to install it in VS Codium and more easily in a bunch of other IDEs (gitpod, Eclipse Theia, Eclipse Che)
https://open-vsx.org/

Done


Switch to Devbox

To make it easier to get up and running, we should switch this to use devbox instead of make

Would help with these
https://github.com/juno-fx/Terra-Official-Plugins/issues/13
https://github.com/juno-fx/Terra-Official-Plugins/issues/14


Correct issues with DTO Generation in NestJS

NestJS (latest version) for Swagger requires objects to be well formed when referred to as a "type: object".  However, since these objects are often free-form (if they do not point to a ref), the type definition can be omitted from the @ApiProperty annotation.  They are often "additionalProperties" but do not need to be defined as such.

Fixed.


Deliverable 13. Initialize API

Application programming interfaces (APIs) allow parameterized requests to servers with responses in standardized formats, such as JSON. These endpoints may export a table from the database query, a figure from an analysis, or an entire report. We will create the initial API using Plumber, which is based in R. Eventually these endpoints will serve read functions in the R library as well whole reports generated based on a suite of parameters gathered by the Shiny application from the user.

See:

#1


I downloaded a community created lesson and the audio did not pull. Will Memrise2Anki pull audio for community lessons.

The lesson is here:
https://www.memrise.com/course/1509572/beginners-syrian-arabic/
My version of Anki is Version 2.1.14 (7b93e985)
Qt 5.12.1 PyQt 5.11.3

Yes it does, just checked. The smoothest way is to let the addon create a new note type when importing and don't touch the field mapping.


drop support for sapper studio or update comment

Describe the bug
there's a line referring to sapper studio. not quite sure what that is, but pretty sure we don't need to support it :smile: is there code that can be removed or should we update the comment to say VS Code or something?
Reproduction
https://github.com/sveltejs/vite-plugin-svelte/blob/b523d7570c55145d9a400f3d067f1ad341629302/packages/vite-plugin-svelte/src/handle-hot-update.ts#L108
Logs
No response
System Info
latest

Severity
annoyance

yes, that comment is from the early days. the main point is that it doesn't affect user code.


runtime/race: externally link, PIE, race-enabled executable crashes on startup

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version devel +91824fb Fri Apr 22 10:21:03 2016 +1200 linux/amd64
or
go version go1.6.1 linux/amd64

What operating system and processor architecture are you using (go env)?

linux/amd64, 16.04 or 16.10

What did you do?

go run -ldflags='-linkmode=external -extldflags=-pie' -race /opt/opensource/go-test-cases/trivial.go

What did you expect to see?

No output.

What did you see instead?

==12590==ERROR: ThreadSanitizer failed to allocate 0x2698000 (40468480) bytes at address 1765924f4c680 (errno: 12)
signal: segmentation fault (core dumped)
This came to my attention because the development release of Ubuntu has enabled PIE by default on amd64 and ./all.bash fails in the "Testing race detector" step. This could be patched around by passing -no-pie to the external linker when -race is passed to the linker but that seems like a short term hack only.

cc @dvyukov @ianlancetaylor

It's a miracle that it works at all with external linking! :)
I can reproduce the issue with -pie. ThreadSanitizer shadow memory mapping is tricky. Let's do -no-pie for now.

Btw, tsan tries to map shadow at 0x1765924f4c680. Tsan shadow mapping for Go/linux is:
uptr MemToShadow(uptr x) {
  return (x * 4) | 0x200000000000ull;
}

It means that the binary is mapped at 0x555555555555. That used to be 0x7f0000000000. Whoever did that broke C++ ThreadSanitizer on Ubuntu.


Clarification Request: dnd 2.2

There are quite a few spells that have target definitions of the form allies within 30 ft, creatures within 20 ft etc.
Within midi-qol I represented that with a target specification of 30 ft creature/ally/etc. With the latest release it is impossible to set that combination in the target specification anymore.
What is the intended way to represent such target specifications? The current Area targeting requires the placement of a template which these sorts of target definitions don't require, or if a template is intended I'm not aware of any way to anchor it to the caster.
Any guidance would be gratefully received.

Same question, different module.

I don't believe this has ever been intended to be displayed through the item details, but through the item description. The UI rework was done because labels such as '30 foot creature' is nonsensical (#1858). One aura spell in the SRD compendium backs this up with a range of 'self' and a target of '30 feet radius'.

How would you display turn undead in 2.2.x core?  Cause it really does look weird in 2.2.x.  There is a very distinct difference between a template radius and all creatures within 30ft.  One includes the casters width.

A template is not going to cut it unless we edit them all away from raw and add in the 5ft...to 15ft depending on the casters size.

I think target "30 foot creature" is a natural expression of creatures within 30 feet of the caster.
In any event I'm looking for clarification from the dnd5e team about how they intend to represent such things so I can align with their intent.

I feel like this is a core place where our data structure isn’t quite up to snuff. It seems like we should have one field that defines target type (sphere, cone, line, radius, target, space) and a second field defining who it affects (all creatures, all creatures & objects, only allies, only enemies). Right now things like a cone that only targets enemies or a space that only targets allies (like healing spirit) aren’t possible.

There is also a few weird ones like the Slow Spell and Mass Cure Wounds, where they are templates that don't target everything in them, they have a target count limit.

I feel like this is a core place where our data structure isn’t quite up to snuff. It seems like we should have one field that defines target type (sphere, cone, line, radius, target, space) and a second field defining who it affects (all creatures, all creatures & objects, only allies, only enemies). Right now things like a cone that only targets enemies or a space that only targets allies (like healing spirit) aren’t possible.

Has there been any more discussion about the way that might get implemented?
Knowing if/how that might be added would help modules better plan ahead on how to utilise any such additions or work arounds.


500 error for some NYC events

there are server errors for some event pages (but not all) from the nyc events listing
example: ocd-event/001297df-b47c-40b2-a1b0-f31afb8082a1(3rd event in the listing)
@mileswwatkins @rshorey

@cathydeng I think this issue should be on https://github.com/opencivicdata/api.opencivicdata.org
Imago is just the software for the API, not the API itself.

thanks @jpmckinney - moved the issue


Can't run examples

From where do I have to run the examples? When I try to run them from the project directory I get:
cargo run -q --example counter
error: couldn't read `packages\iocraft-macros\src\../examples/counter.rs`: The system cannot find the path specified. (os error 3)
   --> packages\iocraft-macros\src\lib.rs:386:9
    |
386 | #[doc = include_str!("../examples/counter.rs")]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
    |
386 | #[doc = include_str!("../../../examples/counter.rs")]
    |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: couldn't read `packages\iocraft-macros\src\../examples/table.rs`: The system cannot find the path specified. (os error 3)
   --> packages\iocraft-macros\src\lib.rs:395:9
    |
395 | #[doc = include_str!("../examples/table.rs")]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)
help: there is a file with the same name in a different directory
    |
395 | #[doc = include_str!("../../../examples/table.rs")]
    |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: could not compile `iocraft-macros` (lib) due to 2 previous errors

This is with stable-x86_64-pc-windows-gnu.

Thanks for reporting this! Until this point I hadn't tested on Windows, and it looks like the lack of symlink support was breaking the build for you. I fixed up a few things, added Windows to CI, and released a version 0.2.1 which should work for you now:


[DOCS]

Description
Greetings.
Here are a few changes that can be made in the documentation according to me.

ReadMe can be updated to provide more information about the project.
Prerequisites needed for contribution can be added
Tech Stack can be added
Is the project open for others to run it on their machine?
You can mention the installation steps for people to run it on their local machine or online.

Screenshots
No response
Additional information
No response

Right now the installation steps are mentioned in the contribution guidelines.
With the intention of, If someone is interested to contribute they will read the contribution guidelines and from there, they will able to readi how to install and make pull request.
Yup, the Tech Stack is missing in the documentation.

Alright! That seems fine to me :)


⚠ SolarOscp has degraded performance

In 7bc27d4, SolarOscp ($SOLAROSCP_URL) experienced degraded performance:

HTTP code: 200
Response time: 430 ms

Resolved: SolarOscp performance has improved in 885a6f4 after 10 minutes.


Rebuild for icu69

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

I am rather keen on seeing this migration through.  I know there are big changes coming to qt, but until then :)  If there is no chance this PR could get green without heroic effort, if somebody could let me know, that'd be great!

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

Hmmm, this has now gotten past the troublesome RPM setup failures on linux 64... watching

Way beyond my meager skill :(


Make controls bar stick when hovering

When playing a video file, the controls bar always get hidden after sometime.
In other media players, when the user hover over the controls it doesn't get hidden since it gives the user the ability to seek and observe the current time.

Coverage remained the same at 74.376% when pulling 94952c7689be65467365a480aee7edaead479111 on Dananji:hover-controls-fix into d8a667fd65560093fb227700a82805600ec9e8e3 on mediaelement:master.


Wrong hash table offset in mocompiler

From the specification of mo file format
https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
The hash table offset should be in mocompiler.js - line 192:
// hash table offset
returnBuffer[this._writeFunc](28 + (4 + 4) * list.length * 2, 24);
Please let me know if I was wrong.

You are right, the location address is not stored correctly. So far this hasn't been an issue as the hash table length is 0. I fixed the location and published it as v1.1.1


MB-607: ma create role and user_role tables

Description
Create a roles table as well as a user_role join table.
Reviewer Notes
Is there anything you would like reviewers to give additional scrutiny?
Setup
make db_dev_migrate
Code Review Verification Steps

[ ] Have the acceptance criteria been met for this change?

References

Story for this change

Ah, got it.  Thanks.


release: v1.0.0b7

Signed-off-by: Leonardo Rossi<EMAIL_ADDRESS>

Is the remember me PRs ready to be merged? If so it might be worthwhile including them as well.

@lnielsen yes, the #233 should be ready! :+1:


Fixed DocStrings

Hello there,
Just changed the DocString to follow the standard that IDEs follow.
Cheers

Please fix flake8 issue.
Thanks!

Hi Blake,
I'm new to git and GitHub so I don't know how to fix that, sorry about that!
If you'd prefer to reject the changes, it's okay with me! No hard feelings :-)
Cheers.
Rodrigo.

Merged in #72. Thanks!


[tests] bump devstack branch to stable/2023.2, fix python issues

What this PR does / why we need it:
the stable/2023.1 was removed in some openstack repos, now the stable/2023.2 is the stable one. also we need to update pip and setuptools
Which issue this PR fixes(if applicable):
fixes #
Special notes for reviewers:

Release note:

NONE

/test openstack-cloud-csi-cinder-e2e-test

@zetaab @dulek ready for review

Why not 2024.1? Given 2023.2 is non-slurp - most people probably will use 2024.1

/approved
/lgtm

Why not 2024.1? Given 2023.2 is non-slurp - most people probably will use 2024.1

I already spent an evening trying to fix the tests, don't want to invest more time. Feel free to submit a new PR.
@dulek /approve, not /approved

/approve

/cherry-pick release-1.29


Post CSS support

Describe the feature
I was in the process of porting over to SWC from babel and noticed that babel would let my css modules imports fall through so that post css could pick them up.  Can we either support post css to handle css imports like css modules or is there a way to let css module imports slide like babel does?
Babel plugin or link to the feature description
https://postcss.org/
Additional context
No response

css module is handled by webpack, not babel


Not optimal build process for DASH repo, SAI and saithrift

@chrispsommers hey, i have been playing with building dash repo for couple days, and i noticed that there are a lot of chmod -R a+w or o+w in many directories, mainly in SAI directory, which touches each file, and because of that, make file is rebuilding the same stuff over and over again when it don't need to, and it's really annoying at this point since for example during make all, SAI metadata and libsai is rebuild 3 times, which takes a lot of time and is pointless, i tried to fix it but it's all over the place and current build files and thrift makefiles are complex, that im worried that i will break something here
can we start to fix it ? why chmod wad done in the first place ? it's because docker container user is dash and have no permissions to write user host file when dash repo is located and build? maybe it would be easier to add local host user to bmv2 docker and set it as default user when running docker, then it would have permissions to write those files and chmod would not be needed at all
for example i see this:
  9715951      4 -rw-rw-r--   1 kcudnik   kcudnik      1914 sie 27 12:59 ./Makefile.3rdpty
  9715950     28 -rw-rw-r--   1 kcudnik   kcudnik     25305 sie 27 12:59 ./Makefile
...
  9719459    712 -rw-r--r--   1 4321     4321       725020 sie 27 13:27 ./SAI/SAI/test/saithriftv2/sai_headers.py.bk
  9717973     12 -rw-r--r--   1 4321     4321        11504 sie 27 13:36 ./SAI/SAI/experimental/saiexperimentaldashtag.h
...
  9717986     12 -rw-r--r--   1 4321     4321        12011 sie 27 13:36 ./SAI/lib/utils.h
  9717984      4 -rw-r--r--   1 4321     4321         2901 sie 27 13:36 ./SAI/lib/Makefile
  9717969     40 -rw-r--r--   1 4321     4321        39629 sie 27 13:00 ./bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.json
  9717971    536 -rw-r--r--   1 4321     4321       548597 sie 27 13:00 ./bmv2/dash_pipeline.bmv2/dash_pipeline.json
  9717968     76 -rw-r--r--   1 4321     4321        75937 sie 27 13:00 ./bmv2/dash_pipeline.bmv2/dash_pipeline.p4i
  9717970     36 -rw-r--r--   1 4321     4321        34680 sie 27 13:00 ./bmv2/dash_pipeline.bmv2/dash_pipeline_p4rt.txt
  9719506    256 -rwxr-xr-x   1 4321     4321       258728 sie 27 13:30 ./tests/libsai/vnet_out/vnet_out
  9719507    972 -rwxr-xr-x   1 4321     4321       993096 sie 27 13:30 ./tests/libsai/init_switch/init_switch

so suddenly next to my local user, there is dash user 4321 in docker, and there are issues with writings files, that's why chmod
some of the changes for chmod comes from this PR https://github.com/sonic-net/DASH/pull/202

Hi @kcudnik thanks for your feedback. Sorry if the build process seems inefficient. BTW it used to take >1 hour, part of the optimization was to create many small pre-built containers pulled from ACR and these have dashuser 4321 as default user instead of root (which had caused its own set of problems which PR https://github.com/sonic-net/DASH/pull/202 attempted to remedy, with some quirks as you've noticed). So I agree the current situation is non-ideal but the amount of effort which went into getting it to even this state was considerable and for most people, so far, performance has been acceptable. I haven't felt the need to open this can of worms since then. :)
Also, I am hoping someday someone solves PR https://github.com/sonic-net/DASH/issues/395 which forces building saimeta into libsai, which takes most of the time and is probably the item getting built 2-3 times (I was only aware of 2 builds not 3).
Some questions:

Out of curiosity, how long does make all take to run in your setup? It takes around 5 min for me, despite some redundant re-builds.
Are you possibly using make all more than necessary? There are build targets e.g. to just rebuild libsai which should take much less time, make all can be used after intermediate work is done. For example:

make clean p4 - needed one time, takes 8 sec on my machine
<edit python p4-sai codegen or libsai c++ code>
make sai - 67 sec on my machine

So, the recommendation is to use the make sai target until you need to run sai-thrift tests, which requires make all and takes 5x longer (5 minutes). Take a look at Concise Developer Workflows if you haven't already.
As far as making substantial changes, I am a bit leery because it can be very time-consuming and if we need to change Docker images stored in ACR, it gets even more involved. I'll keep the idea open for now.

Hey, yea it's can of worms, i am actually trying to fix this, but its so convoluted, there are many different problems on so many different levels, so mainly the makefiles are not optimal, and wrong dependencies are made, so for example:

when building saithriftv2, it always does clean at all every time which rebuilds metadata and rpc each time and saiserver which take a long time to compile since those generated files are in megabytes: https://github.com/opencomputeproject/SAI/blob/master/test/saithriftv2/Makefile#L68
when gensairpc.pl is executed location is based on XML generated files for SAI/meta but it was generated outside the docker, and when rpc target is built then it uses that location which is invalid inside docker and fails to generate correct sai.thrift file https://github.com/opencomputeproject/SAI/blob/master/meta/gensairpc.pl#L315, thats why clean is performed at start
thfirt binary is not regenerating files if the files exists even if sai.thrift changed, (i spend an hour to find this) https://github.com/opencomputeproject/SAI/blob/master/test/saithriftv2/Makefile#L79 i think  this is a bug i thrift, there is no option to override, and there is no message that files exits, so option here is to remove existing generated files if sai.thrift changed

there is also another problem that i don't understand: https://github.com/opencomputeproject/SAI/blob/master/test/saithriftv2/Makefile#L84 in this code PY headers depends on sai headers, but those are not sai in SAI/inc headers, but headers from /usr/include/sai, i'm not sure if that is mistake or intended behaviour, but for example sair_rpc_server depends on correct ones https://github.com/opencomputeproject/SAI/blob/master/test/saithriftv2/Makefile#L93 ../../inc, and this is really wired since those headers are copied to /usr/include/sai here: https://github.com/sonic-net/DASH/blob/main/dash-pipeline/SAI/saithrift/Makefile#L36 which make no sense XD i would update that to use ../../inc but im not sure whether this is used somewhere outside DASH repo and this: https://github.com/sonic-net/DASH/blob/main/dash-pipeline/SAI/saithrift/Makefile#L36 and what can be broken, oh well i will do that anyway and see what will break XD
i spent last week analyzing all makefiles in dash-pipeline, how this go, what is build where, and man, this is just house of cards, im really surprised that this works at all, but at this stage this is not maintainable in the long run :(
my goal is to create deb target to generate deb packages for libsai from dash, but it would be nice if build system would be more efficient and not clean and regenerate everything each time and 3 times in a row
i tested that the containers can use host user as long as sudo is not used, it requires to override -u user:guid in docker run command and all created files in docker mounted host directories are with the same user as host, but when sudo is used then there is and issue it dont work
i'm trying to fix all this, but its a long slow way, im starting from SAI repo, take a look at latest commits if you are interested https://github.com/opencomputeproject/SAI/commits/master
as for https://github.com/sonic-net/DASH/issues/395 why saimeta would be needed there ? so far libsai.so from DASH is not using that, it can of course, that would be helpfull if libsai gets more complicated or need some internal validation,
im not building all, just sai, and saithrift-server, but it's a long build for me, i dont have timer but defiantly over 10min, im using old laptop and preparing to buy some new dev machine :P

Hi Kamil, I admire your dilligence, it is indeed complex. I wouldn't call it a house of cards, but it is mildly elaborate. Less so than SONiC IMO.
A lot of the complexity in DASH repo is to integrate with pre-existing saithrift server code in SAI. I won't comment on saithrift server build process other than to say I made a few small improvements to it to accommodate DASH, you might even have reviewed those PRs. I had to learn it all the hard way and getting it into DASH was weeks of work.
As for your question:

as for https://github.com/sonic-net/DASH/issues/395 why saimeta would be needed there

That is a good question, please see https://github.com/sonic-net/DASH/issues/395#issuecomment-1611889596, this is what I'd like to see resolved. You can be the hero to fix it! If this can be resolved we can save some build time and complexity in DASH.
I just added some more comments: https://github.com/sonic-net/DASH/issues/395#issuecomment-1696436991
Building saithrift server is the slowest part of the overall build, so I would only do that as needed. I did not attempt to do any more work on saithrift server than necessary to get DASH working.

Thanks for comments, i didn't noticed those functions used by saiserver since it compiles for me without explicit saimetadata.o being added, this is interesting, maybe because libsai.so is compiles with saimetadata.o thats why saithrift compiles for me locally fine when i use libsai.so from DASH, but yes, other vendors may not have metadata in their sai, then saithrift will not compile, the sai_rpc_frontent.cpp uses that to identify attribute value type, including saimetadata.o to the saithrift directly will resolve that, and it's easy actually to do since all *.o needed are already generated when saithrivtv2 is build, but it's also an overkill, since this is just only functionality that is uses, so another approach could be to generate those objecttype/attrid mapping to value only in sai_rpc_server.cpp which is generated via gensairpc.pl, but that a little bit harder task than including some *.o in builds
i will think about this, after i fix current makefiles
anyway, sorry for house of cards, what i have in mind, is that when i touched anything in dash-pipeline/Makefile something exploded something else XD i was trying to fix -R o+w to not touch those files becasue this messes up make build process and rebuilds stuff over and over again

I get it, and feel partially responsible, but can't keep investing more time into perfecting it. I am so happy that you bring fresh energy and ideas!

Start of long road:

https://github.com/opencomputeproject/SAI/pull/1867
https://github.com/opencomputeproject/SAI/pull/1868

Final touches

https://github.com/sonic-net/DASH/pull/423
https://github.com/sonic-net/DASH/pull/429
https://github.com/sonic-net/DASH/pull/432

now build is fast and clean, closing this issue


Host off switch

This PR is not complete, just wanted to post it for review. Still needs testing, API support, and siac support.
Commit messages are pretty strong.

--- FAIL: TestIntegrationWalletTransactionGETid (0.01s)

	wallet_test.go:245: provided encryption key is incorrect

This needs to be inspected. It's nondeterministic.

--- FAIL: TestReceiveConsensusSetUpdate (0.48s)

	update_test.go:83: hostdb should have a host after getting a host announcement transcation

I've seen this nondeterministic error a few times as well.

--- FAIL: TestIntegrationRenewing (7.87s)

	host_test.go:114: 0

	host_test.go:115: uploading has failed

Another failure. Hmmm, I hope there's a common thread to all of these.

Why not treat AcceptingContracts like any other HostSettings field? i.e., to toggle it on or off you would go through the existing /host [POST] call, with /host?acceptingcontracts=false.
It's not as user-friendly as a separate toggle, but that shouldn't matter since UIs can easily make it a separate call if so desired.

derp. Designed this in the reverse order, added the switch first and later decided it should be a setting. Didn't even think through the fact that we can already adjust the settings at will.
We can drop the extra methods and api calls, this change has a lot more code than is needed.


Inform user about the progress of mining at regular intervals

Every 30 seconds is good enough.

covered with console logs

if


New testupdate urls for IBS maintenance

you.suse.de is going away with the upcoming IBS switch to Build
Service Maintenance.

+1

It seems, only the SP4 and SLE12 ones are really active yet. Marcus said, SP3 one is still to come.

@bmwiedemann splitted the part that can be merged into https://github.com/SUSE-Cloud/automation/pull/412

Anything left todo here? Still +1

@toabctl I think a second +1 is missing.. :-)

well, jenkins passes, so merging anyway.


Rename to do_contains

https://github.com/logicalmechanism/assist/blob/c6c55e64d997f90814ec51aa0632e183a4da9ec9/lib/assist/values.ak#L59C30-L59C30

do_contains is in line with stdlib helpers for this kind

Good catch and suggestion. There are many other helper functions to update too.

All pub fn that are wrappers now use the do_func_name syntax for stdlib alignment. This change will be pushed into 0.3.1.


Strange npm warning

A short aside, thanks for the user-friendly message that accompanies sails-new these-a-days!
Now, I get a handful of deprecation warnings when starting a new project, but I found the last line a little confusing (and related to the aforementioned user-friendly message).
npm WARN update-linked node_modules/sails needs updating to 0.12.0 from 0.12.0 but we can't, as it's a symlink

I'll do some digging, but I figured I would put it here for now!

O. I get it now :grin:

:monkey_face:

@brettimus
I am getting similar message. Unable to figure out the problem.. Can you please tell me how did you fix it.

@swapnarajaputra Just rm -rf node_modules and then npm install


Lettuce difference between async get vs sync

Currently, for all of our synchronous calls, we are doing:
connection.async.get(key).get()
What would the difference be between doing this instead of:
connection.sync.get(key)
Thanks!

The difference is that the sync API applies a controlled timeout and it translates exceptions so that you get the stack trace from the call site.


deps: remove questionary

Current dependencies on/for this PR:

main

PR #243   👈

This stack of pull requests is managed by Graphite.

Merge activity

Feb 19, 11:51 AM GMT+1: @MartinBernstorff merged this pull request with Graphite.


Update to go 1.18 and  dependences

Update to 1.18 using golang docker.io (ubi image don't exist yet)
Still the big fight against k8s/knative libraries but so far so good with the update.
Still keeping old version of cel-go until we figure out what's going with it.
Signed-off-by: Chmouel Boudjnah<EMAIL_ADDRESS>
Changes

Submitter Checklist

[ ] ♽  Run make test lint before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI
[ ] 📖 If you are adding a user facing feature or make a change of the behavior, please verify that you have documented it
[ ] 🧪 100% coverage is not a target but most of the time we would rather have a unit test if you make a code change.
[ ] 🎁 If that's something that is possible to do please ensure to check if we can add a e2e test.
[ ] 🔎 If there is a flakiness in the CI tests then don't necessary ignore it, better get the flakyness fixed before merging or if that's not possible there is a good reason to bypass it. (token rate limitation may be a good reason to skip).

/retest

one step forward, two steps backward (getting golang1.18 with image registry.ci.openshift.org/openshift/release:golang-1.18  but based on a very old centos with old git that doesn't get-url)

Codecov Report

Merging #848 (7fddbc9) into main (3573a34) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #848      +/-   ##
==========================================
- Coverage   62.15%   62.15%   -0.01%
==========================================
  Files          78       78
  Lines        4981     4983       +2
==========================================
+ Hits         3096     3097       +1
- Misses       1582     1584       +2
+ Partials      303      302       -1

Impacted Files
Coverage Δ

pkg/cli/webhook/github.go
53.84% <ø> (ø)

pkg/cmd/tknpac/describe/describe.go
56.60% <ø> (ø)

pkg/provider/bitbucketserver/bitbucketserver.go
83.56% <ø> (ø)

pkg/provider/github/acl.go
86.02% <ø> (ø)

pkg/provider/github/events.go
91.13% <ø> (ø)

pkg/provider/github/github.go
68.22% <ø> (ø)

pkg/provider/github/status.go
75.52% <ø> (ø)

pkg/reconciler/status.go
74.50% <ø> (ø)

pkg/random/random.go
100.00% <0.00%> (ø)

pkg/formatting/age.go
77.77% <0.00%> (ø)

... and 1 more

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

kind e2e test workflow will fail because it needs on main :
https://github.com/openshift-pipelines/pipelines-as-code/pull/848/files#diff-8659bed08848dfbc4c7c1304a5c46ecf5ddef9777d9d617dd18269dc63093c38R44


Translate Java algorithms and comments to English.

Please help translate the algorithms and comments in Java from Portuguese to English, as this would help increase the visibility of the repository, and it's the standard used by the company/people.
--
Por favor ajudem a traduzir os algoritmos e comentários em Java  do português para o inglês, pois isso ajudaria a aumentar a visibilidade do repositório, e é o padrão utilizado por empresa/pessoas.

Hello, @vidhan63-soe.
Welcome! Contributions are welcome. Please see this  on how to contribute.

Thank you, @ricardocarva, for your advice.I'm new to open source, however if you could please review my translation of the Readme from Portuguese to English
Check out the main tree here:  https://github.com/vidhan63-soe/translate-copy
.

Submitted a pull request for a couple of the easier ones. Please feel free to offer feedback!
https://github.com/kelvins/Algoritmos-e-Estruturas-de-Dados/pull/201


Auth Instance Type

Currently our authentication for cortex and graphite-shared will not ensure instance type the api key is authorized is for the correct instance type. This allows users to write to a cortex tenant with the same instance ID as a metrictank hosted metrics instance. The same would apply to graphite-shared.
Auth must be altered to verify the instance type.

To be clear, the types are graphite, graphite-shared and prometheus.

Sounds like we just need a new arg in auth/gcom/auth.go
ie,
flag.StringVar(&validInstanceType, "auth-valid-instance-type", "", "if set, instance validation while fail if the type attribute of an instance does not match. (graphite|graphite-shared|prometheus)")

By default we can just "", which does no type validation.

Resolved with #136


Adding process section to 'Contributing'

Introduction
The documentation section added in the PR explains:

How the auto-release works
How the NDK versioning works
How to check the built documentation on a PR

Codecov Report
Patch coverage has no change and project coverage change: +0.58 :tada:

Comparison is base (60942f1) 69.14% compared to head (46d21d9) 69.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   69.14%   69.72%   +0.58%
==========================================
  Files          26       26
  Lines        2048     2035      -13
==========================================
+ Hits         1416     1419       +3
+ Misses        632      616      -16

see 13 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Add releases

Until this can be pushed into the ports tree, I think it'd be good for us to provide pre-built releases for those who want them.
I've done so on my branch https://github.com/psa/photoprism-freebsd-port/releases, but I think it'd be nice to do so here to centralise.

Fixed in #18

Thanks.

Having them in my repo is less discoverable than having them attached here. I think they should be attached to this project, what do you think?
If that's not of interest to you, do you think we should add a link to the README to point to my repo?