text:
Downstream cluster using Oracle Linux 8.2 fails health check and is in Error state

What kind of request is this (question/bug/enhancement/feature request):
bug
Steps to reproduce (least amount of steps as possible):

Install rancher v2.5.2, 2.5.5 or 2.5.6-rc2 (single-node cluster)
provision Oracle Linux 8.2 custom cluster

install docker on the node (using rancher script for 19.03)
follow instructions here for oracle linux firewall with rancher (also tested skipping this step, same result)
run custom node install command from rancher server

Result:

rancher reports Cluster health check failed: cluster agent is not ready after adding custom cluster (default and system projects report cluster not ready
node page reports all good. viewing the containers on the node also appear healthy (no restarts)

da88f11e84ed        rancher/kube-api-auth                             "/bin/sh -c 'kube-ap…"   4 minutes ago       Up 4 minutes                            k8s_kube-api-auth_kube-api-auth-2gk5n_cattle-system_a4b9da15-276f-4789-967b-d418eaaa55da_0
4a7747e779f3        rancher/nginx-ingress-controller-defaultbackend   "/server"                4 minutes ago       Up 4 minutes                            k8s_default-http-backend_default-http-backend-65dd5949d9-hkrmg_ingress-nginx_0499e8af-32b8-45ee-b6d3-a2589b9be753_0
f4d15c0a54e8        46177de0d5d3                                      "run.sh"                 4 minutes ago       Up 4 minutes                            k8s_agent_cattle-node-agent-xw755_cattle-system_2c518787-9486-4a3a-aa53-151dff056269_0
60a90418c5f0        rancher/pause:3.2                                 "/pause"                 4 minutes ago       Up 4 minutes                            k8s_POD_kube-api-auth-2gk5n_cattle-system_a4b9da15-276f-4789-967b-d418eaaa55da_0
de021c0f99c0        rancher/pause:3.2                                 "/pause"                 4 minutes ago       Up 4 minutes                            k8s_POD_cattle-node-agent-xw755_cattle-system_2c518787-9486-4a3a-aa53-151dff056269_0
37c4eb5632ff        rancher/pause:3.2                                 "/pause"                 4 minutes ago       Up 4 minutes                            k8s_POD_cattle-cluster-agent-57cc48f446-wcg72_cattle-system_14de5414-34a6-43e2-9b11-0bbf74b86c9c_0
5009a1fb08bf        rancher/nginx-ingress-controller                  "/usr/bin/dumb-init …"   5 minutes ago       Up 5 minutes                            k8s_nginx-ingress-controller_nginx-ingress-controller-b45zq_ingress-nginx_c6c70aa9-c2f1-4a59-8d97-3d1ddb5ae7cf_0
86d1659777af        rancher/metrics-server                            "/metrics-server --k…"   5 minutes ago       Up 5 minutes                            k8s_metrics-server_metrics-server-8449844bf-2bscr_kube-system_3a5c3061-1866-45a7-8090-7a131e636836_0
6763685cae4d        rancher/coredns-coredns                           "/coredns -conf /etc…"   5 minutes ago       Up 5 minutes                            k8s_coredns_coredns-6f85d5fb88-6md6v_kube-system_8fd4185c-a4ac-4d35-87ed-9e82515a80f7_0
41905a59c66d        rancher/cluster-proportional-autoscaler           "/cluster-proportion…"   5 minutes ago       Up 5 minutes                            k8s_autoscaler_coredns-autoscaler-79599b9dc6-c5cmc_kube-system_e7c79597-20dc-4a4c-9014-bbd82a54f1a3_0
404fd67de74a        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 4 minutes                            k8s_POD_default-http-backend-65dd5949d9-hkrmg_ingress-nginx_0499e8af-32b8-45ee-b6d3-a2589b9be753_0
5cdbc3e3fa7b        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_nginx-ingress-controller-b45zq_ingress-nginx_c6c70aa9-c2f1-4a59-8d97-3d1ddb5ae7cf_0
aceffc4914e4        rancher/calico-kube-controllers                   "/usr/bin/kube-contr…"   5 minutes ago       Up 5 minutes                            k8s_calico-kube-controllers_calico-kube-controllers-7fbff695b4-mwjh7_kube-system_a1a98fa5-fc0a-49bc-8e6a-874984044ff7_0
2ebbf09d7dfa        rancher/coreos-flannel                            "/opt/bin/flanneld -…"   5 minutes ago       Up 5 minutes                            k8s_kube-flannel_canal-zmmd7_kube-system_1845e40c-d8f6-4ad9-955c-bf0be5159eae_0
538fda673b79        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_metrics-server-8449844bf-2bscr_kube-system_3a5c3061-1866-45a7-8090-7a131e636836_1
3ccb9ad9f8d3        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_coredns-6f85d5fb88-6md6v_kube-system_8fd4185c-a4ac-4d35-87ed-9e82515a80f7_1
268e45055e1b        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_coredns-autoscaler-79599b9dc6-c5cmc_kube-system_e7c79597-20dc-4a4c-9014-bbd82a54f1a3_0
735621b5dd66        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_calico-kube-controllers-7fbff695b4-mwjh7_kube-system_a1a98fa5-fc0a-49bc-8e6a-874984044ff7_0
4664c06ac16d        rancher/calico-node                               "start_runit"            5 minutes ago       Up 5 minutes                            k8s_calico-node_canal-zmmd7_kube-system_1845e40c-d8f6-4ad9-955c-bf0be5159eae_0
816b7fc5b262        rancher/pause:3.2                                 "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_canal-zmmd7_kube-system_1845e40c-d8f6-4ad9-955c-bf0be5159eae_0
cb32ea3ca47f        rancher/hyperkube:v1.19.6-rancher1                "/opt/rke-tools/entr…"   5 minutes ago       Up 5 minutes                            kube-proxy
7f9e5507142f        rancher/hyperkube:v1.19.6-rancher1                "/opt/rke-tools/entr…"   5 minutes ago       Up 5 minutes                            kubelet
62b91a9e87e1        rancher/hyperkube:v1.19.6-rancher1                "/opt/rke-tools/entr…"   6 minutes ago       Up 5 minutes                            kube-scheduler
fa50e9e133c0        rancher/hyperkube:v1.19.6-rancher1                "/opt/rke-tools/entr…"   6 minutes ago       Up 6 minutes                            kube-controller-manager
ee5f4a2bcd1f        rancher/hyperkube:v1.19.6-rancher1                "/opt/rke-tools/entr…"   6 minutes ago       Up 6 minutes                            kube-apiserver
82bb68700533        rancher/coreos-etcd:v3.4.13-rancher1              "/usr/local/bin/etcd…"   6 minutes ago       Up 6 minutes                            etcd

however, dashboard of custom cluster does not display information:

Other details that may be helpful:
blocking this ticket: #30899
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): tested on v2.5.2, 2.5.5, 2.5.6-rc2
Installation option (single install/HA): single install

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): imported, Oracle Linux 8.2

Machine type (cloud/VM/metal) and specifications (CPU/memory): tested with aws t2/t3.medium, t2.xlarge

Kubernetes version (use kubectl version):  v1.19.6

Docker version (use docker version):  v19.03

Error seen in kubelet when disabling firewalld:
E0121 21:46:40.252248    3313 pod_workers.go:191] Error syncing pod 6847fb94-ff62-4ee0-94d9-4dc4cfb21995 ("cattle-cluster-agent-5b796f7bcb-8567h_cattle-system(6847fb94-ff62-4ee0-94d9-4dc4cfb21995)"), skipping: failed to "StartContainer" for "cluster-register" with CrashLoopBackOff: "back-off 2m40s restarting failed container=cluster-register pod=cattle-cluster-agent-5b796f7bcb-8567h_cattle-system(6847fb94-ff62-4ee0-94d9-4dc4cfb21995)"

k8s v1.19.3
Rancher v2.5.5

Error seen in kubelet when disabling firewalld:
E0121 21:46:40.252248    3313 pod_workers.go:191] Error syncing pod 6847fb94-ff62-4ee0-94d9-4dc4cfb21995 ("cattle-cluster-agent-5b796f7bcb-8567h_cattle-system(6847fb94-ff62-4ee0-94d9-4dc4cfb21995)"), skipping: failed to "StartContainer" for "cluster-register" with CrashLoopBackOff: "back-off 2m40s restarting failed container=cluster-register pod=cattle-cluster-agent-5b796f7bcb-8567h_cattle-system(6847fb94-ff62-4ee0-94d9-4dc4cfb21995)"

k8s v1.19.3
Rancher v2.5.5

workaround was to disable iptables and firewalld on all nodes running Oracle Linux (we tested 7.9 and 8.2)

sudo systemctl stop iptables
sudo systemctl disable iptables

systemctl disable firewalld
systemctl stop firewalld

### install docker
### run command from rancher

workaround was to disable iptables and firewalld on all nodes running Oracle Linux (we tested 7.9 and 8.2)

sudo systemctl stop iptables
sudo systemctl disable iptables

systemctl disable firewalld
systemctl stop firewalld

### install docker
### run command from rancher

authors: aaronRancher slickwarren


text:
Certificate "dynamic" can't be renewed

Hello,
i have Rancher running as a docker container with version v2.5.9. For the issue with the invalid dynamic certificate and therefore not working rancher dashboard i have a monitoring check. This tells me now that my certificate will expire in less than a month:
SSL WARNING - Certificate 'dynamic' expires in 23 day(s) (2022-02-02 15:02 +0100/CET).
My Problem is that i can't renew this certificate.  I tried everything i could find in other issues like here https://github.com/rancher/rancher/issues/26984#issuecomment-818770519

rm /var/lib/rancher# cd management-state/tls
rm /var/lib/rancher/k3s/server/tls/dynamic-cert.json
kubectl delete secret -n kube-system k3s-serving
also tried deleting the whole /var/lib/rancher/k3s/server/tls/ directory
updated rancher from v2.5.8 to v2.5.9

my container doesn't crash, but i get a bad certificate error:
I0110 07:28:58.926623      26 kubelet_node_status.go:109] Node local-node was previously registered
I0110 07:28:58.926702      26 kubelet_node_status.go:74] Successfully registered node local-node
time="2022-01-10T07:28:59.043372542Z" level=info msg="Cluster-Http-Server 2022/01/10 07:28:59 http: TLS handshake error from 10.42.0.192:60056: remote error: tls: bad certificate"
I0110 07:28:59.418536      26 topology_manager.go:221] [topologymanager] RemoveContainer - Container ID: adcd2692a4fa162cc8e9764f52f38b6f64d541461f0730f781dc2cab3966c6eb
I0110 07:28:59.418812      26 topology_manager.go:221] [topologymanager] RemoveContainer - Container ID: dad7917ac368f4a607654505aa4577ee59bc11d33cee4c91a9003940f67253ea
E0110 07:28:59.419027      26 pod_workers.go:191] Error syncing pod 08083316-19a1-44e4-b369-f2cb127a8037 ("fleet-controller-79554fcbf5-k8ftx_fleet-system(08083316-19a1-44e4-b369-f2cb127a8037)"), skipping: failed to "StartContainer" for "fleet-controller" with CrashLoopBackOff: "back-off 10s restarting failed container=fleet-controller pod=fleet-controller-79554fcbf5-k8ftx_fleet-system(08083316-19a1-44e4-b369-f2cb127a8037)"
time="2022-01-10T07:28:59.811768227Z" level=info msg="Cluster-Http-Server 2022/01/10 07:28:59 http: TLS handshake error from 10.42.0.195:54336: remote error: tls: bad certificate"

Had the same issue last year, but i didn't have a monitoring check telling me that my certificate needs to be renewed. Last time an update of the rancher container fixed my problem, but not this time.
Can someone please tell me how to renew this certificate or can't this be made automatically?

Done:
https://github.com/rancher/rancher/issues/26984#issuecomment-1012216649

source: gharchive/issue

repo: rancher/rancher

license_type: permissive

license_source: github-api


text:
Updating taints on nodes right after deleting it may cause node-cleanup-job pods not be cleaned up

@thedadams , please fill in the details here.
SURE-4289

/backport v2.6.3-patch3

Root cause
The node-cleanup job completely ignored the private registry information for a cluster.
What was fixed, or what changes have occurred
The cattle-cleanup-node job now created with private registry information similar to the cattle-cluster-agent.
Areas or cases that should be tested

Create a custom RKE1 cluster with Kubernetes version v1.21.10 (I don't know if the Kubernetes version is important, but I was able to reproduce this issue with that version).
Provision three custom nodes: one with all roles and two with a worker-only role.
Once all nodes are active, turn the VM off one of the worker nodes.
Once this worker node is unavailable in the Rancher UI, delete the node from the Rancher UI. It should be deleted.
Without turning the VM off, delete the second worker-only node. It should be deleted.

What areas could experience regressions?
Deleting nodes from custom RKE1 clusters.
Are the repro steps accurate/minimal?
Yes

Ticket #37063 - Test Results - [Duplicate of #35148]
With Docker on single-node instance:
Reproduction Failure on rancher v2.6-9ef92c2168bd91ce6b05734731d9c2c21c42a5f4-head:

Unable to reproduce; I have experienced this error first hand and am able to ensure quality verification provided below

Verified on rancher v2.6-6955cebc208a925e3e6f42a3a7f5d24dcd7d2585-head:

Fresh install of rancher v2.6-head
Provision an RKE1 Custom downstream cluster, k8s v1.21.10, with 3 nodes; One with all 3 roles [etcd, cp, wkr], and two as dedicated worker nodes
Once cluster is Active and stable, turn off VM of one of the dedicated worker nodes
Once the node becomes Unavailable, delete it from the rancher UI - [SUCCESSFULLY_DELETED]
With both remaining nodes in an Active state, delete the remaining dedicated worker node - [SUCCESSFULLY_DELETED]
Verified - All steps are executed successfully; No nodes caught in "hang" state and unable to be removed

authors: Josh-Diamond snasovich thedadams


text:
[v2.6] KDM Update for K8s 2022 May patch release

KDM Updates
TO BE RELEASED: OOB KDM with RKE v1.3.12

New Kubernetes Version
Min Rancher Version
Min RKE Version

1.23.7-rancher1-1
2.6.4-rc0
1.3.3-rc0

1.22.10-rancher1-1
2.6.3-rc0
1.3.3-rc0

1.21.13-rancher1-1
2.6.0-rc0
1.3.0-rc0

Rancher System Images & Add-ons
Note: Please update system images and add-ons in the template as needed.
TBD
Developer Changelog

Add templates for new K8s versions. If a template that hasn't been released yet already exists, update it in place.
Update the default K8s version, and add or update the version information (MinRancherVersion and MinRKEVersion) in k8s_version_info.go for new K8s versions if needed (Use table from above).
Confirm versions for system images, add-on templates are correct using versioning reference table from below (expand details to view the table). Update the table if new versions are introduced.
Confirm add-on template version constraints in template.go are correct using versioning reference table from below (expand details to view the table). Update the table if needed.

Versioning Reference

Expand for system images & add-on templates versioning table

Note: Truncated repository names with a * indicates there are multiple images with that prefix. All repository names that match a truncated prefix should be checked for the same version stated in the table.
For example: rancher/weave-* matches weaveworks/weave-kube and weaveworks/weave-npc, and they should both have the same version.
v1.23.7-rancher1-1

Repository
Tag

rancher/mirrored-coreos-etcd
v3.5.3-rancher1

rancher/hyperkube
v1.23.7-rancher1

rancher/rke-tools
v0.1.78

rancher/mirrored-k8s-dns-*
1.17.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/mirrored-coreos-flannel
v0.15.1

rancher/flannel-cni
v0.3.0-rancher6

rancher/mirrored-calico-*
v3.19.1

weaveworks/weave-*
2.8.1

noiro/* (All ACI images)
5.1.1.0.1ae238a

rancher/mirrored-pause
3.4.1

rancher/nginx-ingress-controller
nginx-1.1.0-rancher1

rancher/mirrored-nginx-ingress-controller-defaultbackend
1.5-rancher1

rancher/mirrored-jettech-kube-webhook-certgen
v1.1.1

rancher/mirrored-metrics-server
v0.5.1

rancher/mirrored-coredns-coredns
1.8.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/kubelet-pause
v0.1.6

rancher/mirrored-k8s-dns-node-cache
1.18.0

Add-on Name
Add-on Template Version Constraint

Calico
calicov319

Canal
canalv3211

Flannel
flannelv0140

CoreDNS
coreDnsv183

KubeDNS
kubeDnsv116

MetricsServer
metricsServerv050

Weave
weavev120

Aci
aciv500

NginxIngress
nginxIngressv110Rancher3

Nodelocal
nodelocalv121

v1.22.9-rancher1-1

Repository
Tag

rancher/mirrored-coreos-etcd
v3.4.16-rancher1

rancher/hyperkube
v1.22.9-rancher1

rancher/rke-tools
v0.1.78

rancher/mirrored-k8s-dns-*
1.17.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/mirrored-coreos-flannel
v0.15.1

rancher/flannel-cni
v0.3.0-rancher6

rancher/mirrored-calico-*
v3.19.1

weaveworks/weave-*
2.8.1

noiro/* (All ACI images)
5.1.1.0.1ae238a

rancher/mirrored-pause
3.4.1

rancher/nginx-ingress-controller
nginx-1.1.0-rancher1

rancher/mirrored-nginx-ingress-controller-defaultbackend
1.5-rancher1

rancher/mirrored-jettech-kube-webhook-certgen
v1.1.1

rancher/mirrored-metrics-server
v0.5.1

rancher/mirrored-coredns-coredns
1.8.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/kubelet-pause
v0.1.6

rancher/mirrored-k8s-dns-node-cache
1.18.0

Add-on Name
Add-on Template Version Constraint

Calico
calicov319

Canal
canalv3211

Flannel
flannelv0140

CoreDNS
coreDnsv183

KubeDNS
kubeDnsv116

MetricsServer
metricsServerv050

Weave
weavev120

Aci
aciv500

NginxIngress
nginxIngressv110Rancher3

Nodelocal
nodelocalv121

v1.21.12-rancher1-1

Repository
Tag

rancher/mirrored-coreos-etcd
v3.4.16-rancher1

rancher/hyperkube
v1.21.12-rancher1

rancher/rke-tools
v0.1.78

rancher/mirrored-k8s-dns-*
1.17.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/mirrored-coreos-flannel
v0.15.1

rancher/flannel-cni
v0.3.0-rancher6

rancher/mirrored-calico-*
v3.19.1

weaveworks/weave-*
2.8.1

noiro/* (All ACI images)
5.1.1.0.1ae238a

rancher/mirrored-pause
3.4.1

rancher/nginx-ingress-controller
nginx-1.1.0-rancher1

rancher/mirrored-nginx-ingress-controller-defaultbackend
1.5-rancher1

rancher/mirrored-jettech-kube-webhook-certgen
v1.1.1

rancher/mirrored-metrics-server
v0.5.0

rancher/mirrored-coredns-coredns
1.8.4

rancher/mirrored-cluster-proportional-autoscaler
1.8.3

rancher/kubelet-pause
v0.1.6

rancher/mirrored-k8s-dns-node-cache
1.18.0

Add-on Name
Add-on Template Version Constraint

Calico
calicov319

Canal
canalv319

Flannel
flannelv115

CoreDNS
coreDnsv183

KubeDNS
kubeDnsv116

MetricsServer
metricsServerv050

Weave
weavev120

Aci
aciv500

NginxIngress
nginxIngressv110Rancher3

Nodelocal
nodelocalv121

The KDM changes have been merged in the branch 2022-05-k8s-patches-v2.6. Please use the same branch for test.
cc: @sowmyav27 @rishabhmsra @vivek-infracloud

Fresh install checks - PASS

KDM points to 2022-05-k8s-patches-v2.6 branch.
Cluster creation succeeds for v1.23.7-rancher1-1, v1.22.10-rancher1-1, v1.21.13-rancher1-1 k8s versions with all network providers
Network checks succeeded for all new clusters
Ran validation tests for Canal cluster.
Network checks and Canal checks pass.

RKE checks using v1.3.12-rc1 passed for v1.23.7-rancher1-1, v1.22.10-rancher1-1, v1.21.13-rancher1-1 k8s version.

@doflamingo721  @vivek-infracloud
Could you also update the image used for KubeDNS in v1.23.7-rancher1-1?
The image should be rancher/mirrored-k8s-dns-kube-dns
https://github.com/rancher/kontainer-driver-metadata/blob/aec8036b15c1612896c6503d7eef083bc44db78f/rke/k8s_rke_system_images.go#L7549

The change above has been addressed and this is ready to be tested on rancher:2022-05-k8s-patches-v2.6 branch.

Based on the test results commented by Rishabh and me the KDM testing is finished.
Kube dns issue and nginx-ingress-controller issue are being tracked in different issues. Hence, closing the KDM may patch release issue since all the tests passed.

authors: doflamingo721 jiaqiluo kinarashah rishabhmsra snasovich vivek-infracloud


text:
New feature: Dynamic volume names for service instances

Rancher Version: v1.1.4
Docker Version: docker-1.10.3-46.el7.centos.14.x86_64
OS and where are the hosts located? (cloud, bare metal, etc): CentOS 7.2 - VMware (on-premise)
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB) 3 node rancher HA with external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos) Cattle
Steps to Reproduce:

Create new stack and add named volume to service
Scale up service

Results:

Each instance of the service uses the same volume

Expected:
Some ability to have dynamic volume names. Maybe allow for ${stack_name} or other magic variables to be interpolated in other parts of docker-compose.yml other than just scheduler rules.
For example, the following would be quite neat:
nginx:
  image: nginx:latest
  volume_driver: flocker
  volumes:
   - "${stack_name}-${service_name}-${instance_number}:/var/log"

Then, each instance of this service, as I scale it up, will get a named volume created named something like "nginx_nginx_1", "nginx_nginx_2", etc...

This is very much a requirement for us. In my case it's for Elasticsearch where each node stores only part of the database but any service that shards information will have the same requirement. Anonymous (UUID) volumes won't cover this properly as if you lose all or quorum on the cluster you'd have to dig around to find out which volumes constituted the last working set.

@will-chan @alena1108 this is pretty close to the "scoped" volumes work that @ibuildthecloud has already done for 1.2. Is there actually any new work to do here?

Similar to https://github.com/rancher/rancher/issues/3393

Compose files aren't interpolated dynamically for each new container instance so ${instance_number} wouldn't be possible. I agree with @cjellick that volume scoping covers this use case.

@cjellick and @joshwget @moensch I disagree and find the stack scoped volumes documentation to be contradictory, or at least confusing.  From https://docs.rancher.com/rancher/v1.6/en/rancher-services/storage-service/#volume-scopes:

With a stack scoped volume, services referencing the same volume in a stack would share the same volume.

This does not help me when scaling a service within a stack, where each container needs isolated volume(s), that can connect to the appropriate container again later.
The next paragraph claims:

In Rancher, stack scoped volumes are named with the stack name as a prefix to indicate which stack the volume is scoped to and suffixed with a random number to guarantee no duplication.

Stack scoped volumes would be adequate in Rancher 1) if that means a new isolated volume for each scaled container, and those volumes would be reused when scaling the service within the stack, and 2) Rancher had a better understanding of volume names.  Those of us (maybe I'm in the minority, I don't know) working with multi-tenant, policy-based volumes have meta-data at the beginning of the volume name.  I'm eagerly awaiting an official release with this fixed in the UI so that I can at least enter the volume reference name correctly (policy-tenant/volumeName:/mountpoint/data).
This forum is probably the wrong place for this; however, I am quite frustrated that volume plugins that work with Docker Compose and the command line, but don't work within the Rancher UI without writing a separate volume manager container--that appears redundant.
I have a very simple use case as an example that proper persistent volume management would help, but not solve entirely.  I am running Open LDAP in multi-master mode.  I don't care which hosts they run on, as long as it is not the same host, which I easily managed via host affinity labels.  I want a scale of 2 initially, and I do not want to define the services separately--that do not scale. I want to define the service once in the stack and scale it to whatever number I wish, requiring new volumes and containers created with unique names, and each volume be isolated. I refuse ever to lose data again when a host goes down is otherwise unavailable, and Rancher moves the container to a new host.  Moving the container is the correct action. Losing the data volume or the data within the instantiated container is unforgivable.
That part that isn't solved is the OpenLDAP containers knowing that a new member is available. Currently, I pass in hostnames of the two containers I know should be there. I have no easy way to tell the containers that the service has scaled up or down. I do not want to use Rancher's metadata services because that makes it dependent upon Rancher. My next thought is to integrate it with etcd, like my volume manager. While Rancher is my favorite orchestration platform, I do not want to be incompatible with stock Docker.

@joshwget Thank you for confirming:

Compose files aren't interpolated dynamically for each new container instance so ${instance_number} wouldn't be possible.

I've added more premature gray hair trying to make that work, even using ENV variable substitution.  Your statement will save my hours of additional head-banging, not to mention my wife is tired of hearing Quiet Riot blasting in my home office. ;)

@DonaldFoss There's an upcoming per_container option that I think will fit your use case. I think it's currently scheduled for v1.6.1.

Don't know if is the same issues, but the using variables as volume names will lead to error, because the volume statement in compose v2+ need the name as key, and you can't map variable to key.
I hope that rancher-compose maybe would be able to substitute the variable before the docker-compose.yml is validated, otherwise i'm pretty stuck in the v1. The v1 version don't support external=false volume properties.

@joshwget @cjellick Looking at the storage services documentation, I don't see any reference to the per_container option, has this been implemented yet? As @DonaldFoss stated, stack and environment scopes don't solve the issue. Currently, if you have multiple stack instances deployed on the same host and they share a volume you can get a race condition. You should be able to configure the stack such that each stack instance only shares the volume with the containers in that instance. If the reasons why this is a problem are not clear, I am happy to elaborate. Thanks!

Just curious if this is still on the works? would be really nice to be able to scale up and down and dynamically mount volume based on the instance number. Currently I use clone to achieve similar strategy.

@moensch you can define dynamic volume like this:
volumes:
  pgsql:
    external:
      name: pgsql_${DATA_SUFFIX}

and then refer to from service
nginx:
  image: nginx:latest
  volume_driver: flocker
  volumes:
    pgsql: '/var/data'

Dont't forget define env variable DATA_SUFFIX in .env or in command line shell.

How would $DATA_SUFFIX change with each instance of a scaled service?

after some time....
someone got a solution ? Could share please ?

authors: DonaldFoss ahmet2mir andrewvmail cjellick djcenox gloffreda iDiogenes joshwget kevin-thorpe moensch yuklia


text:
New Hosts aren't appearing in Rancher

I've created 3 CentOs7 machines with Docker installed. The agent docker command has been run on them but they do not appear in Rancher. I'm seeing an error in the Docker logs about WebSockets not working but I've set up the ELB policy for this load balancer as described in the documentation:
{
"PolicyDescriptions": [
{
"PolicyAttributeDescriptions": [
{
"AttributeName": "ProxyProtocol",
"AttributeValue": "true"
}
],
"PolicyName": "rancher-dev-elb-policy",
"PolicyTypeName": "ProxyProtocolPolicyType"
}
]
}
Here's the docker logs:
INFO: Downloading http://redacted/v1//configcontent//host-config current=host-config-1-6d1e996b0dd5b4ca6ff6145b7d222ecf1d9b00df19f4db64f3e4a16a1f2c075b
INFO: Already up to date
INFO: Sending host-config applied 1-6d1e996b0dd5b4ca6ff6145b7d222ecf1d9b00df19f4db64f3e4a16a1f2c075b
time="2017-03-03T18:18:05Z" level=info msg="Launching agent"
time="2017-03-03T18:18:05Z" level=info msg="http://redacted/v1ECB12B21331605B9A62CGYe9So2a5o7SQtRoxRYUyd86BMDrNMPLQkzdWUd8"
time="2017-03-03T18:18:05Z" level=info msg="Listening for events on http://redacted/v1"
time="2017-03-03T18:18:05Z" level=info msg="launching hostapi"
time="2017-03-03T18:18:05Z" level=info msg="Starting event router."
time="2017-03-03T18:18:05Z" level=info msg="Initializing event router" workerCount=50
time="2017-03-03T18:18:05Z" level=error msg="invalid character 'c' looking for beginning of value"
time="2017-03-03T18:18:05Z" level=error msg="Error subscribing to events: websocket: bad handshake" subscribeUrl="ws://redacted/v1/subscribe?eventNames=compute.instance.pull&eventNames=storage.volume.activate&eventNames=storage.volume.remove&eventNames=ping&eventNames=config.update&eventNames=compute.instance.activate&eventNames=compute.instance.deactivate&eventNames=compute.instance.force.stop&eventNames=compute.instance.inspect&eventNames=compute.instance.remove&eventNames=storage.image.activate"
time="2017-03-03T18:18:05Z" level=error msg="Got error response" responseHeaders=map[X-Api-Schemas:[http://redacted/v1/schemas] X-Api-User-Id:[1a12] X-Rancher-Version:[v1.4.1] Content-Type:[application/json; charset=utf-8] Date:[Fri, 03 Mar 2017 18:18:05 GMT] Expires:[Thu, 01 Jan 1970 00:00:00 GMT] Server:[Jetty(9.2.11.v20150529)] X-Api-Account-Id:[1a12] Content-Length:[1236] Connection:[keep-alive] Set-Cookie:[PL=rancher;Path=/] Vary:[Accept-Encoding, User-Agent] X-Api-Client-Ip:[10.151.4.69]] status="200 OK" statusCode=200
time="2017-03-03T18:18:05Z" level=error msg="Error response: {"type":"collection","resourceType":"subscribe","links":{"self":"http:\/\/redacted\/v1\/subscribe"},"createTypes":{},"actions":{},"data":[],"sortLinks":{"eventNames":"http:\/\/redacted\/v1\/subscribe?eventNames=compute.instance.pull&eventNames=storage.volume.activate&eventNames=storage.volume.remove&eventNames=ping&eventNames=config.update&eventNames=compute.instance.activate&eventNames=compute.instance.deactivate&eventNames=compute.instance.force.stop&eventNames=compute.instance.inspect&eventNames=compute.instance.remove&eventNames=storage.image.activate&sort=eventNames"},"pagination":null,"sort":null,"filters":{"eventNames":[{"modifier":"eq","value":"compute.instance.pull"},{"modifier":"eq","value":"storage.volume.activate"},{"modifier":"eq","value":"storage.volume.remove"},{"modifier":"eq","value":"ping"},{"modifier":"eq","value":"config.update"},{"modifier":"eq","value":"compute.instance.activate"},{"modifier":"eq","value":"compute.instance.deactivate"},{"modifier":"eq","valu"
time="2017-03-03T18:18:05Z" level=fatal msg="Exiting. Error: websocket: bad handshake"
INFO: Starting agent for ECB12B21331605B9A62C
INFO: Access Key: ECB12B21331605B9A62C
INFO: Config URL: http://redacted/v1
INFO: Storage URL: http://redacted/v1
INFO: API URL: http://redacted/v1
INFO: IP: 10.151.4.69
INFO: Port:
INFO: Required Image: rancher/agent:v1.2.0
INFO: Current Image: rancher/agent:v1.2.0
INFO: Using image rancher/agent:v1.2.0
INFO: Downloading agent http://redacted/v1/configcontent/configscripts
INFO: Updating configscripts
INFO: Downloading http://redacted/v1//configcontent//configscripts current=
INFO: Running /var/lib/cattle/download/configscripts/configscripts-1-f0f3fb2e1110b5ada7c441705981f93a480313a324294321cff467f0c3e12319/apply.sh
INFO: Sending configscripts applied 1-f0f3fb2e1110b5ada7c441705981f93a480313a324294321cff467f0c3e12319
INFO: Updating pyagent
INFO: Downloading http://redacted/v1//configcontent//pyagent current=
INFO: Running /var/lib/cattle/download/pyagent/pyagent-1-9e3dcab12585149a65d818082279708965cd826df1937a55b24f48428f8f0c0644fc1033b5be15c88dcf9540b1c04c67/apply.sh
INFO: Updating host-api
INFO: Downloading http://redacted/v1//configcontent//host-api current=1-9608ead804f8cebbfe95b9f114701d8a5ac4244d603d196068043c902b1a0bdf
INFO: Already up to date
INFO: Sending host-api applied 1-9608ead804f8cebbfe95b9f114701d8a5ac4244d603d196068043c902b1a0bdf
INFO: Updating python-agent
INFO: Downloading http://redacted/v1//configcontent//python-agent current=1-936086fb3866b781d82a97bdc0832430463ab8b2b33bfbeafd5ecf60d50d0766
INFO: Already up to date
INFO: Sending python-agent applied 1-936086fb3866b781d82a97bdc0832430463ab8b2b33bfbeafd5ecf60d50d0766
INFO: Sending pyagent applied 1-9e3dcab12585149a65d818082279708965cd826df1937a55b24f48428f8f0c0644fc1033b5be15c88dcf9540b1c04c67
INFO: Starting agent /var/lib/cattle/pyagent/apply.sh
INFO: Executing /var/lib/cattle/pyagent/agent
INFO: Updating host-config
INFO: Downloading http://redacted/v1//configcontent//host-config current=host-config-1-6d1e996b0dd5b4ca6ff6145b7d222ecf1d9b00df19f4db64f3e4a16a1f2c075b
INFO: Already up to date
INFO: Sending host-config applied 1-6d1e996b0dd5b4ca6ff6145b7d222ecf1d9b00df19f4db64f3e4a16a1f2c075b
time="2017-03-03T18:18:48Z" level=info msg="Launching agent"
time="2017-03-03T18:18:48Z" level=info msg="http://redacted/v1ECB12B21331605B9A62CGYe9So2a5o7SQtRoxRYUyd86BMDrNMPLQkzdWUd8"
time="2017-03-03T18:18:48Z" level=info msg="Listening for events on http://redacted/v1"
time="2017-03-03T18:18:48Z" level=info msg="launching hostapi"

Useful
Info

Versions
Rancher v1.4.1 Cattle: v0.176.9 UI: v1.4.6

Access
Disabled

Orchestration
Cattle

Route
authenticated.project.help

@wrsuarez I see you enabled proxy protocol, did you define the port the rancher server listens on, for the proxy protocol?
when describing the ELB you should see something like:
            "BackendServerDescriptions": [
                {
                    "InstancePort": 8080,
                    "PolicyNames": [
                        "EnableProxyProtocol"
                    ]
                }
            ],

The command is outlined here

Did this work @wrsuarez ? Let us know if you need any more help!

authors: aemneina superseb wrsuarez


text:
[2.5] Update default ui-dashboard-index setting

Ensure dashboard served up is latest 2.5, rather than fixed 2.5.8

@gaktive or @richard-cox , is there an issue that this can be linked to? I'm only seeing the PR. QA was looking for the original issue for testing purposes.

@MKlimuszka This was first raised by QA. Gary has now created https://github.com/rancher/dashboard/issues/4860.

source: gharchive/pull-request

authors: MKlimuszka richard-cox


text:
Going back from Add LB Config takes you to back to Balancers instead of configurations

v0.16.3
Steps:

Go to LB Configuration page
Click on Add Balancer Config
Click on < Back

Results:
Takes you to Balancer page
Expected:
Take you back to Configurations page

There is no back button now... so.. there.

v0.21.3
Verified Fixed

repo: rancherio/rancher

license_source: bigquery


text:
Autocomplete not seeing period-separated words

In Enhanced-R, ST3 was able to correctly identify period-separated words and autocomplete as expected.   This feature seems to be absent from R-Box.
If this was deliberate, can we set a user option to adjust to old behavior?

should be fixed now.

Tested and confirmed.  Thanks Randy!

license: mit


text:
Create new PyPI release after latest merge

Could you create a new release which includes the ggsize fix?

Yeah, I'll try to get that up today.
Just an FYI, I'm no longer at Streamlit, so if you'd like to be the maintainer of this project I can add you as a collaborator. Otherwise, updates are unlikely from me unless I go back to writing software again.

Okay, you're all set. 0.0.3 is on PyPI. I also set up a GitHub Action to automate this, so if changes are committed in the future and a new tag is created it will automatically get uploaded to PyPI.

Thank you @randyzwitch!
I am not sure how much time I have in the future but I think it cannot hurt to add me as a collaborator.
Slightly off topic: Do you know why streamlit-letsplot is not implemented into streamlit directly?

authors: randyzwitch schakalakka

repo: randyzwitch/streamlit-letsplot

license: MIT


text:
Restart/reboot functionality

It would be nice to have ESP32 restart functionality :)

via the dedicated mqtt topic?
via the http page (portal)?
something else?

Hmm... IMO ESPAltherma should be stable enough not to need a restart functionality.
In which condition would you need one?

I think I should been more precise: restart by user is just "nice to have" feature, but auto-reboot in case of "hung" is very useful. Resetting ESP requires power cut off of heat pump, which is not really good thing.
I don't use ESP32 a lot, but in ESP8266 it's common auto/soft-reboot in case of lost wifi and no re-connection in 1-5min period. The second is case of mine - OTA blocked by firewall, so pulling ESP32 out of heatpump is pain in the ass.
So maybe Watchdog Timer (TWDT?) can be used for such task?

I had connected a usb cable to the esp and have it coming out of the heatpump where the other wires come out. That way I can always update via cable when I want.

Hey @rufik, thanks for clarifying. ESPAltherma has already this type of 'watchdog' functionality: it monitors MQTT and Wifi connections. If one breaks and cannot recover in few minutes, ESPAltherma will reboot on itself and maintain it's status in the meantime.

That's very good. Is it possible to apply watchdog to OTA errors? I mean when OTA goes wrong (like [E][ArduinoOTA.cpp:370] _runUpdate(): Update ERROR: Aborted in my case) it could reboot ESP as well. Possible?

In case of an OTA failure, the best is yet to relaunch the OTA.
But still, I added this feature, ESPAltherma in now rebooting on error in OTA.
I also added an MQTT for reboot: send "R" to espaltherma/POWER and it will restart.

Perfect, thank you :)

authors: m-reuter raomin rufik

repo: raomin/ESPAltherma


text:
Autocrafting works once then breaks

Issue description:
I automated the crafting of crafters  in a normal way but it can only craft one item and then i have to remove all patterns for it to fix.
What happens:
Auto-crafting just stops
What you expected to happen:
Auto-crafting to continue
Steps to reproduce:

Place crafter
Added multi stage recipes
Clicked craft more than one
Watch video
https://youtu.be/NlT4vNr4yIA

Version (make sure you are on the latest version before reporting):

Minecraft: 1.12
Forge: 14.21.1.2443
Refined Storage: 1.5.17

Does this issue occur on a server? [yes/no]
Unsure
###Game log
https://gist.github.com/NicosaurusRex99/9aee6333c901c98b56eacf3ecc62e1a4

Duplicate of #1357

oh soz i didnt see 1357

repo: raoulvdberge/refinedstorage


text:
Ender IO Tank Derpness

Issue description:
Buckets and other fluid containers both empty and full get inserted into Ender IO Tanks on External Storage and are visible but may not be accessible via the grid.
What happens:
http://imgur.com/a/2egts
What you expected to happen:
None of the above.
Steps to reproduce:

...
Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: 2119
Refined Storage: 1.2.3

Does this issue occur on a server? [yes/no]
Unknown.
If a (crash)log is relevant for this issue, link it here:
[pastebin/gist/etc link here]

More info please, e.g. how are your external storages on the tank configured..?

Okay. So it would appear to involve a third party as in a fresh install of just RS and EIO I can not reproduce it but in the Spilled Juice https://www.atlauncher.com/pack/SpilledJuice you just need a controller, grid, external storage -> tank. Any buckets thrown in the grid go into the tank and yes the external storage is set to fluid mode.
You probably have a better idea of the likely offenders but I'll try and narrow down the interaction as I have time.
The new disk drive model is great btw.

Are you sure your external storage is in fluid mode?

Mod interaction wasn't a thing just a coincidence.
If the priority of external storage (in fluid mode :p) is higher, then the fluid containers get stored there.
If the priority is the same, then where they get stored seems based on another factor (distance from controller maybe?) hence my initial failure to reproduce in a test world,

Same issue with a Forestry Bottler which also filled with water (I was importing) while the External Storage was still in item mode. It's almost a feature though it unfortunately disregards fluid filters.

So what is the issue here now? I have no idea what the problem is / you are suggesting?

To reiterate.
Ender IO Fluid Tanks are treated as item storage for any fluid containers (buckets, tanks, bottles etc.), either empty or full, when connected with an External Storage set to fluid mode.
For example. If I have a EIO Fluid Tank of water connected with an External Storage set to fluid mode and whitelisted for water only and I then put a bucket of lava into the RS system it will store the bucket of lava in the input slot of the EIO Fluid Tank. I can see it in the grid but cannot get it out and after I remove it from the tank it still remains visible in the grid.

authors: PONYRYDE raoulvdberge


text:
Inline HTML event is oddly glued to text up to end of line

In this example test, I was expecting to see two events:
fn main() {
    let parser = pulldown_cmark::Parser::new(" Hello, world!");
    for event in parser {
        println!("{:?}", event);
    }
}

I was expecting to see:
Html("")     // modulo the borrow structure
Text(" Hello, world");

Instead, I see just one:
Html(Borrowed(" Hello, world!"))

This is really odd because it depends on context: if the inline html is in the middle of more text, as in:
fn main() {
    let parser = pulldown_cmark::Parser::new("starting:  Hello, world!");
    for event in parser {
        println!("{:?}", event);
    }
}

then this does have the behavior I was expecting to see in separating the comment from the rest of the content:
Start(Paragraph)
Text(Borrowed("starting: "))
Html(Borrowed(""))
Text(Borrowed(" Hello, world!"))
End(Paragraph)

so I suspect that this is a bug.

Right, this seems a bug. Thanks for reporting!

A troubling issue, though, is that this appears to be defined behavior in the spec, in one of its test cases:  https://spec.commonmark.org/0.30/spec.json
https://spec.commonmark.org/0.30/#example-177
  {
    "markdown": "*bar*\n*baz*\n",
    "html": "*bar*\n
baz
\n",
    "example": 177,
    "start_line": 2869,
    "end_line": 2875,
    "section": "HTML blocks"
  },

and the spec does appear to say that this is expected, as what is happening is an HTML block, matching the second of the start/end condition cases.
https://spec.commonmark.org/0.30/#html-block

If the first line meets both the start condition and the end condition, the block will contain just that line.

and unfortunately, this means that my bug report is erroneous: the parser is doing exactly what the spec is saying should happen.  :(
Sorry for the noise.  I'll have to let @mgeisler know that this particular desired feature won't quite work the way we expected.

repo: raphlinus/pulldown-cmark


text:
Using double progressbars?

Hi. Thx for this package. I've one question:
How can i use 2 progressbars at same time? One for main loop, second for subloop?
For example file copy utility (like in FAR):
1 progressbar shows how many files ramained
2 progressbar shows file copy progress
I've tryed to simply add second bar inside first bar loop
    n = 10
    items = ['file_%s.csv' %i for i in range(1,10)]

    bar = pyprind.ProgBar(len(items))
    for i in items:
        bar.update(item_id = i)
        for z in pyprind.prog_percent(range(n), monitor=True):
            time.sleep(0.1) # do some computation

    print bar

here is output
0%     100%
[100 %] elapsed[sec]: 1.099 | ETA[sec]: 0.000
Total time elapsed: 1.099 sec
[100 %] elapsed[sec]: 1.095 | ETA[sec]: 0.000 2.csv
Total time elapsed: 1.095 sec
[100 %] elapsed[sec]: 1.099 | ETA[sec]: 0.000 3.csv
Total time elapsed: 1.099 sec
[100 %] elapsed[sec]: 1.099 | ETA[sec]: 0.000 4.csv
Total time elapsed: 1.099 sec
[100 %] elapsed[sec]: 1.102 | ETA[sec]: 0.000 5.csv
Total time elapsed: 1.102 sec
[100 %] elapsed[sec]: 1.100 | ETA[sec]: 0.000 6.csv
Total time elapsed: 1.100 sec
[100 %] elapsed[sec]: 1.105 | ETA[sec]: 0.000 7.csv
Total time elapsed: 1.105 sec
[100 %] elapsed[sec]: 1.100 | ETA[sec]: 0.000 8.csv
Total time elapsed: 1.100 sec
[#########] | ETA[sec]: 0.000 | Item ID: file_9.csv
Total time elapsed: 8.799 sec
[100 %] elapsed[sec]: 1.086 | ETA[sec]: 0.000
Total time elapsed: 1.086 sec
Title:
  Started: 12/13/2015 00:20:42
  Finished: 12/13/2015 00:20:51
  Total time elapsed: 8.799 sec

this is not what i exspected to see :)

Hi, amirotin! Unfortunately, the current implementation only supports one progress bar/ progress percent tracker at a time. I think that having nested progress bars would be a super useful feature. However, I am currently not sure how to implement it (it would require that you could jump between multiple lines in the output stream. But I will leave this issue open, and I will brainstorm a bit.

Hi rasbt, could this potentially be implemented using the curses library? It allows you to manipulate the cursor position with greater control than how you're currently doing it. I believe this would also allow the users to print to stdout while looping without duplicating the progress indicator.

@BrandonHeinrich Sorry for getting back to you so late, I'd been on vacation in December, and somehow the note must still be buried in some email inbox
Anyway, I honestly haven't heard of the curses library before; didn't know that such a neat package would be in the stdlib. I think it would be great to substitute the current way of printing the progress bar using curses. This may then also make the "double progressbars" possible!
I am not sure when I'd be able to get to that, but if you (or someone else) wants to contribute, I'd be very happy about this addition! :)

This anwser maybe help，https://stackoverflow.com/questions/6840420/python-rewrite-multiple-lines-in-the-console

Thanks! I remember looking at the curses library some time ago. I think the reason why I ended up not using it for PyPrind was that it's OS specific. Personally, I am only using macOS and Linux, but I think a large portion of Python users in general are using Windows, which doesn't support curses afaik

authors: BrandonHeinrich amirotin kant-chan rasbt

repo: rasbt/pyprind


text:
🛑 BFSU Mirror(mirrors.bfsu.edu.cn) is down

In 4856f54, BFSU Mirror(mirrors.bfsu.edu.cn) (https://mirrors.bfsu.edu.cn) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BFSU Mirror(mirrors.bfsu.edu.cn) is back up in a00c4c5.

repo: raspbian-addons/status


text:
Events undefined

I'm having an issue wherein events appear as being undefined. What I've written so far is...
admob.setOptions({                 isTesting: true,                 autoShow: false,                 publisherId: "<removed for copy/paste>",                 interstitialAdId: "<removed for copy/paste>"             });
admob.interstitial.config({                 id: "<removed for copy/paste>"             });
admob.interstitial.prepare();
admob.interstitial.show();
This all works just fine and I am getting the ad to appear. But I'm also attempting to listen for events and I'm doing that like so...
document.addEventListener(admob.interstitial.events.LOAD, ads.adLoaded.bind(this));         document.addEventListener(admob.interstitial.events.LOAD_FAIL, ads.adError.bind(this));         document.addEventListener(admob.interstitial.events.OPEN, function (e) {});         document.addEventListener(admob.interstitial.events.CLOSE, ads.adFinished.bind(this));
When I attempt to run the listener code, I get an error telling me that admob.interstitial.events is undefined.
Can anyone suggest a reason and/or fix for this?
EDIT: Figured it out. The events are strings, not variables. Putting quotation marks works. Like so...
document.addEventListener("admob.interstitial.events.LOAD", ads.adLoaded.bind(this));

I am also facing same issue, @kjartank13 did you find solution?

Yeah, I did. I edited the post, putting the solution at the bottom. The event names look like they should be variables, but they're actually strings. My issue was resolved by putting quotes around the event names.
So, admob.interstitial.events.LOAD becomes "admob.interstitial.events.LOAD".

repo: ratson/cordova-plugin-admob-free


text:
Alternate RSS feed doesn't parse

I really love this as it doesn't require any external JavaScript and works with the different feeds I've tested except UptimeRobot RSS and I just can't figure out why.
I do understand you wrote this for Medium but could you please explain why this RSS feed doesn't parse with your code? https://api.rss2json.com/v1/api.json?rss_url=https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb
Thanks

I am not sure what problem you faced, but it worked for me.
fetch('https://api.rss2json.com/v1/api.json?rss_url=https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb')
  .then((res) => res.json())
  .then(data => {
  data.items.forEach(key => console.log(key.title))
})

I really love this as it doesn't require any external JavaScript and works with the different feeds I've tested except UptimeRobot RSS and I just can't figure out why.
I do understand you wrote this for Medium but could you please explain why this RSS feed doesn't parse with your code? https://api.rss2json.com/v1/api.json?rss_url=https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb
Thanks

I am not sure what problem you faced, but it worked for me.
fetch('https://api.rss2json.com/v1/api.json?rss_url=https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb')
  .then((res) => res.json())
  .then(data => {
  data.items.forEach(key => console.log(key.title))
})

Hi @ratul16 thanks for replying, I've attached some screenshots to better explain what's happening and hopefully you can tell me what I'm doing wrong?
https://medium.com/feed/@ratul16

https://www.feedforall.com/sample.xml

http://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb

Thanks

Hi @ratul16 thanks for replying, I've attached some screenshots to better explain what's happening and hopefully you can tell me what I'm doing wrong?
https://medium.com/feed/@ratul16

https://www.feedforall.com/sample.xml

https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb

Thanks

Hi @brentonv the reason that https://rss.uptimerobot.com/u1547170-7f480a74203d142f1ed154a4b64ce5cb isn't working because the categories key doesn't have any value (empty array) to it.


text:
Retweets keep failing

Keep getting error: [Error] RT Failed for 942658223244480500 . Likely has already been retweeted. Adding to blacklist.
I left it running overnight and it only successfully retweeted 4 tweets. My account has a total of about 20 retweets, so it seems unlikely that all the tweets it checked had already been retweeted. Is there another reason for this error?

Was fixed by filtering out the phrase "RT". Twitter API seems to have trouble retweeting other bot tweets in the format of "RT @username: [TWEET]"

repo: raulrene/twitter-contest-js-bot


text:
Experimental branch

Currently looking at my outstanding PRs alone it's impossible to merge them all because they have merge conflicts.
This makes testing them even harder since you can't have a build that tests them all at once. Add to this there are a lot of users that would rather have features now than stability and I'd like to suggest an experimental branch.

No guarantees against force push
PRs get in early for testing
Good patches get cherry picked into master
More people can help @raveren test
Add a section to the bottom of README.md to explain it

Basically a sandbox to speed up and distribute testing.
(Alternatively, you could just throw up a new tag for the first time in 2 years and use master a bit more liberally. Reverts aren't the end of the world :)

Going to go ahead and bump this, I have a fairly large experimental branch of my own right now: https://github.com/jnvsor/kint/tree/experimental
Additionally, you might want to consider a branch for the next major version to incorporate breaking changes (I have a few PRs in mind that fix bugs/improve things in ways that could technically break behaviour in some rare cases)

all further Kint development discussion is now in #208 I believe

authors: jnvsor raveren

repo: raveren/kint


text:
🛑 Minecraft is down

In 2cbf93b, Minecraft (https://minecraft.redacted-designs.com) was down:

HTTP code: 0
Response time: 0 ms

This was a known failure, I've not set up connectivity for the service quite yet. Resolution will occur when I have time to research alternatives to the current proxy architecture.

repo: ravirett/megastor-monitor


text:
Discussion: using package.el and straight.el together

straight.el looks like a real awesome package manager and I'd like to start using it right away. But I already have a massive spacemacs based config, so I'm wondering if I can make a gradual change towards straight somehow. For example, only using it to manage a few packages to start. Wondering if this  is a good idea and is possible at all.

Well, I would say that straight.el is much better than package.el in this respect, since straight.el will do only what you explicitly tell it to do in your init-file, and nothing more. As opposed to package.el which insists on activating all the packages you ever installed with it.
There should be no trouble at all with using both straight.el and other package managers, at least from the straight.el side. If you are going to be using straight.el together with package.el, you may want to set straight-enable-package-integration to nil, since otherwise straight.el will automatically disable some "features" (i.e. bugs which are defended vehemently on the mailing list) of package.el that cause package.el to modify the init-file.
The thing you have to be concerned about is duplicate packages. There is no inherent harm in loading a package twice, other than that your init may be slower and you might get some weird side effects if the two versions being loaded are not the same. You should be especially concerned about dependencies, since if you use package manager X to load package Y, then you also need to use package manager X to load all of the dependencies of package Y—otherwise you'll get duplicate packages if you load those dependencies also using package manager Z.
Another consideration is that use-package does not have support for using different package managers for the :ensure clauses in different use-package forms. This is not a problem straight.el can fix, although you may want to keep an eye on my new with-feature package, which will solve this problem among others. As a workaround, I would recommend disabling :ensure for the use-package forms that you wish to use straight.el, and then just putting a manual (straight-use-package 'whatever) above those use-package forms. I.e.
(straight-use-package 'el-patch)
(use-package el-patch
  :ensure nil
  <whatever>)

instead of
(use-package el-patch
  :ensure t
  <whatever>

In order for the use-package forms that do specify :ensure to keep using package.el rather than straight.el, you should set straight-enable-use-package-integration to nil.
Does this answer your question? Let me know if any other information would be helpful.

Also, for the question of "is it safe to use" in general, see the new known issue FAQ section.

Hi, what is "different use-package forms" you mentioned?
Are you recommend to use such style

(straight-use-package 'el-patch)
(use-package el-patch
:ensure nil
<whatever>)

for every package installed?
Currently I set config with

(use-package el-patch
:ensure t
<whatever>)

only. It seems works.

@caadar No, that's just for @rgrinberg's particular use case. What you're doing is already recommended. 😀

that's just for @rgrinberg's particular use case

Correct, the problem only arises when you want to use straight.el for packages and another package manager for others.

@raxod502 thanks for the reassuring response. I'm trying out straight.el and things are going great except for one situation. There are some packages where I'd like straight to simply install them from an existing local repositories instead of trying to clone them. Those are usually packages that aren't just emacs packages and hence need to be located where they are in other (non emacs) contexts. For example, the utop package that I'm trying to get working:
(straight-use-package
 '(utop
   :type git :repo "rgrinberg/utop"
   :local-repo "/home/rgrinberg/reps/ml/utop"
   :files "src/top/utop.el"
   :upstream (:host github :repo "diml/utop")))

Ideally, straight-el should simply assume that this package is cloned and just build it. But I can't figure out how to do that.

Currently straight.el only supports local repositories that are inside ~/.emacs.d/straight/repos. That is, :local-repo isn't resolved as a real path, it's just concatenated to the prefix I mentioned. So that's your problem.
The quick fix is to symlink the repository into ~/.emacs.d/straight/repos. In general, I would consider allowing a :local-repo that is outside of your ~/.emacs.d directory, if that would be a useful feature.

Thanks, this workaround is adequate. I think straight supporting local repos anywhere on the filesystem would be a useful feature.

I've created https://github.com/raxod502/straight.el/issues/133 to track this feature separately. Feel free to either close this issue or follow up with other questions.

Thanks again :) I will create new issues/questions as necessary

Actually, I have another question that probably doesn't deserve its own issue:
Is there a way to prevent straight from hacking use-package? The reason for that is that I already have use-package calls done by my spacemacs config and those packages are already being installed by the traditional package management system. It would be preferable would only install packages that are used through straight-use-package only.

(setq straight-enable-use-package-integration nil)

for more info, Integration with use-package. That's what I advise in https://github.com/raxod502/straight.el/issues/128#issuecomment-321956872, to allow for the default to remain package.el but for some packages to be installed via straight.el.

OK, thanks.

… except for the part where straight-enable-use-package-integration doesn't actually do anything(?!!?!), not sure how I screwed that up.

Fixed on develop.

@raxod502 said "package.el which insists on activating all the packages you ever installed with it."
I would like to point out that this is not necessarily the case if you call package-initialize with non-nil optional argument, e.g.,
(package-initialize 'no-activate)

This is how I have always use package.el so that I can have many installed packages, but activate only some of them by using a different init file when emacs starts.

@emacs18 You're right. It's only the default behavior which is flawed, at least in this case.
If you have a suggestion for a corresponding update to the comparisons section in the README, I'd be glad to consider it.

@raxod502 I'll look into providing a patch later.
In the mean time, I would like to ask you if the following could allow me to use straight.el along with spacemacs without duplicating packages:
(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager."
  (or (and (fboundp 'straight--dir)
           (straight--dir "build" (symbol-name (car args))))
      (apply original-function args)))

(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

I'm in the process of testing this idea.  I also considered writing use-package-ensure-straight similar to use-package-ensure-elpa to be set as the value of use-package-ensure-function variable.  However just advising package-installed-p seemed like a simpler idea.

@emacs18 Your advice doesn't take into account the case where a package was previously loaded using straight.el, but is not currently. Use this instead:
(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager."
  (or (gethash straight--recipe-cache (car args))
      (apply original-function args)))

(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

At some point it may be a good idea to expose some user-facing functions for getting information from the caches.
That said I can't guarantee that advising package-installed-p will actually stop package.el from loading duplicate packages. In fact, if I had to guess, I would say that duplicate loading will still take place.
By the way, straight.el already provides straight-use-package-ensure-function which it sets as the value of use-package-ensure-function. You would of course have to override this with your own version that delegates to both straight.el and package.el conditionally.

Actually, your original advice doesn't work at all. It always returns t.

Yes I forgot to add (file-directory-p) call.
Thanks for your advice.  I'll poke around some more.

The way :upstream works doesn't seem to work for a use case that I have. My standard practice for naming remotes is as follows:

origin - upstream, main repository
rgrinberg - my own fork

Where I only pull from origin and only push to rgrinberg. Is there a way to make straight respect this convention? Since I do have some emacs package repositories that live outside of straights control.

@rgrinberg Currently, there is no way to specify different remote names on a per-repository basis. However, you can change them globally by configuring straight-vc-git-primary-remote and straight-vc-git-upstream-remote. That probably doesn't really work for your use case, since you sometimes want origin to be the primary remote, and sometimes the :upstream (in the case that you have a fork). This specific problem will be alleviated by #114, but more generally it would be nice to allow customizing remote names directly in the recipe. I suggest you open a new issue to track it.

The code shown below allowed me to use straight.el and packge.el to install any
number of packages using straight.el, but let package.el (via use-package)
install the rest. My method of verifying that there were no duplications was to
make sure that load-path did not have path added by both straight.el and
package.el.
(defun my-straight-installed-p (package)
  "Return non-nil if PACKAGE is installed by `straight'."
  (and (fboundp 'straight--dir)
       ;; FIXME: Radon said to use this gethash call rather than straight--dir.
       ;; However this fails with "Wrong type argument: hash-table-p,
       ;; org-plus-contrib". So use straight--dir for now.
       '(gethash straight--recipe-cache package)
       ;; 'dash' package is cloned under 'dash.el' directory. That is why we
       ;; check for raw name as well as with ".el" appended.
       (or (file-directory-p (straight--dir "build" (symbol-name (car args))))
           (file-directory-p (concat (straight--dir "build" (symbol-name (car args))) ".el")))
       ))

(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager. Otherwise
call the original function `package-installed-p'."
  (or (my-straight-installed-p (car args))
      (apply original-function args)))
(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

(defun my--advice-package-activate (original-function &rest args)
  "Return t if package is installed via `straight' package manager. Otherwise
call the original function `package-activate'."
  (if (my-straight-installed-p (car args))
      (progn
        (unless (memq (car args) package-activated-list)
          ;; Not sure if package-activated-list needs to be updated here ...
          (push (car args) package-activated-list))
        t)
    (apply original-function args)))
(advice-add 'package-activate :around 'my--advice-package-activate)

With this method I was able to install any number packages by straight.el, and
the rest by package.el. At first I started with less than 10 packages installed
by straight.el, and 310+ installed by package.el.  I then gradually added more
packages to be installed by straight.el.  Now I have pretty much all 320+ pacakges
installed via straight.el and only a handful via package.el.
Spacemacs came up fine as well.
However calling straight-use-package on about 320 packages took more than 14
minutes. This is on a virtual ubuntu running via virtualbox with win10 as host
OS. Spacemacs on this same setup comes up in about 6 seconds if all 320+
packages are setup via package.el without using straight.el.
If the startup time can be reduced from about 15 minutes to less than a minute,
then I might be motivated to switch over to using straight.el exclusively and
not use package.el at all. I'm hoping that the slow startup is due to my mistake
which can easil be fixed.
Following is my init file to test straight.el. Code to setup spacemacs and my
other customization (includeing the code shown above) followed the code below.
This is not shown since it is not relevant.
;; (package-initialize)

(setq my-start-time (current-time))

(defun my-print-time (msg)
  (let ((elapsed (float-time (time-subtract (current-time) my-start-time))))
    (message "%s (%.3fs)" msg elapsed)))

(setq user-emacs-directory "/u/me/elisp/")

(custom-set-variables '(straight-enable-package-integration nil))

(load "/u/me/Public/straight.el/straight")

(straight--reset-caches)

(unless (and after-init-time (not (bound-and-true-p straight-treat-as-init)))
  (add-hook 'after-init-hook #'straight-finalize-transaction)
  (straight-begin-transaction)
  (straight-mark-transaction-as-init))

;; So meta. This updates the various caches, so that straight.el shows
;; up properly in the lockfile and other things like that.
(straight-use-package '(straight :type git :host github
                                 :repo "raxod502/straight.el"
                                 :files ("straight.el")))

;; Now we need to register the default recipe repositories.

(straight-use-recipes '(melpa :type git :host github
                              :repo "melpa/melpa"
                              :no-build t))

(straight-use-recipes '(emacsmirror :type git :host github
                                    :repo "emacsmirror/epkgs"
                                    :nonrecursive t
                                    :no-build t))

(mapcar
 #'straight-use-package
 '(magit org quelpa use-package))

(my-print-time "straight-use-package 4 pkgs")

(mapcar
 #'straight-use-package
 '(
   ac-ispell ace-jump-helm-line ace-link ace-window adaptive-wrap ag
   aggressive-indent alert anaconda-mode anaphora anzu apiwrap async auctex
   auto-compile auto-complete auto-dictionary auto-highlight-symbol
   auto-yasnippet avy bbdb beacon beacon biblio biblio-core bind-key bind-map
   browse-at-remote clang-format clean-aindent-mode clojure-mode closql
   cmake-mode coffee-mode column-enforce-mode command-log-mode company company
   company-anaconda company-anaconda company-auctex company-c-headers
   company-c-headers company-math company-math company-math company-quickhelp
   company-quickhelp company-shell company-shell company-statistics
   company-statistics company-tern company-tern company-web company-web counsel
   counsel-dash counsel-projectile crux cython-mode dash dash-functional
   default-text-scale deferred define-word demangle-mode diff-hl diminish
   disable-mouse disaster dumb-jump edit-server editorconfig ein elfeed
   elisp-slime-nav elpa-mirror elpy emacsql emacsql-sqlite emmet-mode emms
   engine-mode epkg epl esh-help eshell-prompt-extras eshell-z eval-sexp-fu evil
   evil-anzu evil-args evil-ediff evil-escape evil-exchange evil-iedit-state
   evil-indent-plus evil-lion evil-lisp-state evil-magit evil-matchit evil-mc
   evil-nerd-commenter evil-numbers evil-org evil-search-highlight-persist
   evil-surround evil-tutor evil-visual-mark-mode evil-visualstar
   exec-path-from-shell expand-region eyebrowse f fancy-battery
   fill-column-indicator finalize find-file-in-project fish-mode floobits flx
   flx-ido flycheck flycheck-bashate flycheck-pos-tip flyspell-correct
   flyspell-correct-ivy fringe-helper fuzzy geiser ggtags gh-md ghub ghub+
   git-commit git-gutter git-gutter+ git-gutter-fringe git-gutter-fringe+
   git-link git-messenger git-timemachine gitattributes-mode gitconfig-mode
   gitignore-mode gntp gnuplot golden-ratio google-c-style google-translate
   goto-chg graphviz-dot-mode haml-mode helm helm-ag helm-bibtex
   helm-c-yasnippet helm-company helm-core helm-css-scss helm-dash
   helm-descbinds helm-dictionary helm-flx helm-gitignore helm-gtags helm-make
   helm-pydoc help-fns+ hide-comnt highlight highlight-indentation
   highlight-numbers highlight-parentheses highlight-thing history hl-todo ht
   htmlize hungry-delete hy-mode hydra ibuffer-projectile iedit igrep imenu-list
   impatient-mode indent-guide info+ insert-shebang irony itail ivy ivy-hydra
   ivy-purpose js-doc js2-mode js2-refactor json-mode json-reformat
   json-snatcher key-chord less-css-mode link-hint linum-relative lispy
   live-py-mode livid-mode load-relative loc-changes log4e macrostep
   magit-gitflow magit-popup magithub markdown-mode markdown-toc
   math-symbol-lists mmm-mode mmt monokai-theme move-text multi-term
   multiple-cursors neotree ob-ipython open-junk-file org-alert org-brain
   org-bullets org-download org-mime org-password-manager org-pomodoro
   org-present org-projectile org-tree-slide ox-gfm ox-pandoc ox-reveal p4
   package-build packed pacmacs paradox paredit parent-mode parsebib
   password-generator password-store pcmpl-git pcre2el persp-mode
   pip-requirements pkg-info popup popwin pos-tip powerline projectile pug-mode
   py-isort pyenv-mode pytest pythonic pyvenv rainbow-delimiters realgud request
   request-deferred restart-emacs s sass-mode scss-mode shell-pop showkey
   simple-call-tree simple-httpd skewer-mode slim-mode smartparens smeargle smex
   spaceline spinner string-inflection sudoku swiper symon tagedit tern
   test-simple tldr toc-org typit undo-tree uuidgen vi-tilde-fringe
   volatile-highlights web-beautify web-completion-data web-mode websocket wgrep
   wgrep-ag which-key window-purpose winum with-editor worf ws-butler xah-lookup
   xterm-color yapfify yasnippet zeal-at-point zoutline
   ))

(my-print-time "straight-use-package many pkgs")

I tried to profile via the following:
(elp-instrument-package "straight")
(elp-reset-all)
(mapcar #'straight-use-package '( ... )) ;; about 170 pacakges
(elp-results)

Following shows the profiling result.
Not sure if this is helpful.
Please let me know if there is anything else I can do to help
understand what is taking so long.
straight--transaction-exec                     2253        700.71348628  0.3110135314
straight-use-package                           1634        355.84875113  0.2177776934
straight--package-might-be-modified-p          467         347.24724488  0.7435701175
straight--cache-package-modifications          171         347.22685301  2.0305663919
straight--convert-recipe                       2440        1.8821768900  0.0007713839
straight-recipes-retrieve                      485         1.8590368450  0.0038330656
straight-recipes                               806         1.8564849809  0.0023033312
straight-recipes-emacsmirror-retrieve          321         1.7303635509  0.0053905406
straight-finalize-transaction                  1634        1.2360444370  0.0007564531
straight--save-build-cache                     171         1.2247415299  0.0071622311
straight--load-build-cache                     171         0.7969233699  0.0046603705
straight--activate-package-autoloads           467         0.5217148469  0.0011171624
straight-recipes-melpa-retrieve                485         0.0454132690  9.363...e-05
straight--get-call                             321         0.032518909   0.0001013050
straight--get-call-raw                         321         0.032428036   0.0001010219
straight-vc                                    830         0.0314635299  3.790...e-05
straight--register-recipe                      748         0.0314228160  4.200...e-05
straight-vc-keywords                           660         0.0275945299  4.180...e-05
straight--dir                                  3004        0.0262487459  8.737...e-06
straight--file                                 809         0.0212868049  2.631...e-05
straight--repository-is-available-p            748         0.018435396   2.464...e-05
straight--uncache-package-modifications        171         0.0093695809  5.479...e-05
straight-begin-transaction                     1634        0.0090953039  5.566...e-06
straight--add-package-to-load-path             467         0.0071420979  1.529...e-05
straight-vc-local-repo-name                    170         0.0050447479  2.967...e-05
straight-vc-git-local-repo-name                170         0.0027370300  1.610...e-05
straight--get-overridden-recipe                1634        0.0018399910  1.126...e-06
straight--transaction-p                        2253        0.0009042939  4.013...e-07
straight--autoload-file-name                   467         0.0006129540  1.312...e-06
straight--checkhash                            467         0.0005662019  1.212...e-06
straight--get-dependencies                     467         0.0005402970  1.156...e-06
straight-vc-git-keywords                       660         0.0002679830  4.060...e-07
straight-vc-git--decode-url                    6           3.3597e-05    5.599...e-06

OK. With the following minified init.el:
(setq package-enable-at-startup nil)
(load (concat user-emacs-directory "straight/bootstrap.el") nil 'nomessage)

(mapcar
 #'straight-use-package
 '(
   ac-ispell ace-jump-helm-line ace-link ace-window adaptive-wrap ag
   aggressive-indent alert anaconda-mode anaphora anzu apiwrap async auctex
   auto-compile auto-complete auto-dictionary auto-highlight-symbol
   auto-yasnippet avy bbdb beacon beacon biblio biblio-core bind-key bind-map
   browse-at-remote clang-format clean-aindent-mode clojure-mode closql
   cmake-mode coffee-mode column-enforce-mode command-log-mode company company
   company-anaconda company-anaconda company-auctex company-c-headers
   company-c-headers company-math company-math company-math company-quickhelp
   company-quickhelp company-shell company-shell company-statistics
   company-statistics company-tern company-tern company-web company-web counsel
   counsel-dash counsel-projectile crux cython-mode dash dash-functional
   default-text-scale deferred define-word demangle-mode diff-hl diminish
   disable-mouse disaster dumb-jump edit-server editorconfig ein elfeed
   elisp-slime-nav elpa-mirror elpy emacsql emacsql-sqlite emmet-mode emms
   engine-mode epkg epl esh-help eshell-prompt-extras eshell-z eval-sexp-fu evil
   evil-anzu evil-args evil-ediff evil-escape evil-exchange evil-iedit-state
   evil-indent-plus evil-lion evil-lisp-state evil-magit evil-matchit evil-mc
   evil-nerd-commenter evil-numbers evil-org evil-search-highlight-persist
   evil-surround evil-tutor evil-visual-mark-mode evil-visualstar
   exec-path-from-shell expand-region eyebrowse f fancy-battery
   fill-column-indicator finalize find-file-in-project fish-mode floobits flx
   flx-ido flycheck flycheck-bashate flycheck-pos-tip flyspell-correct
   flyspell-correct-ivy fringe-helper fuzzy geiser ggtags gh-md ghub ghub+
   git-commit git-gutter git-gutter+ git-gutter-fringe git-gutter-fringe+
   git-link git-messenger git-timemachine gitattributes-mode gitconfig-mode
   gitignore-mode gntp gnuplot golden-ratio google-c-style google-translate
   goto-chg graphviz-dot-mode haml-mode helm helm-ag helm-bibtex
   helm-c-yasnippet helm-company helm-core helm-css-scss helm-dash
   helm-descbinds helm-dictionary helm-flx helm-gitignore helm-gtags helm-make
   helm-pydoc help-fns+ hide-comnt highlight highlight-indentation
   highlight-numbers highlight-parentheses highlight-thing history hl-todo ht
   htmlize hungry-delete hy-mode hydra ibuffer-projectile iedit igrep imenu-list
   impatient-mode indent-guide info+ insert-shebang irony itail ivy ivy-hydra
   ivy-purpose js-doc js2-mode js2-refactor json-mode json-reformat
   json-snatcher key-chord less-css-mode link-hint linum-relative lispy
   live-py-mode livid-mode load-relative loc-changes log4e macrostep magit
   magit-gitflow magit-popup magithub markdown-mode markdown-toc
   math-symbol-lists mmm-mode mmt monokai-theme move-text multi-term
   multiple-cursors neotree ob-ipython open-junk-file org org-alert org-brain
   org-bullets org-download org-mime org-password-manager org-pomodoro
   org-present org-projectile org-tree-slide ox-gfm ox-pandoc ox-reveal p4
   package-build packed pacmacs paradox paredit parent-mode parsebib
   password-generator password-store pcmpl-git pcre2el persp-mode
   pip-requirements pkg-info popup popwin pos-tip powerline projectile pug-mode
   py-isort pyenv-mode pytest pythonic pyvenv quelpa rainbow-delimiters realgud
   request request-deferred restart-emacs s sass-mode scss-mode shell-pop showkey
   simple-call-tree simple-httpd skewer-mode slim-mode smartparens smeargle smex
   spaceline spinner string-inflection sudoku swiper symon tagedit tern
   test-simple tldr toc-org typit undo-tree use-package uuidgen vi-tilde-fringe
   volatile-highlights web-beautify web-completion-data web-mode websocket wgrep
   wgrep-ag which-key window-purpose winum with-editor worf ws-butler xah-lookup
   xterm-color yapfify yasnippet zeal-at-point zoutline
   ))

I observe an M-x emacs-init-time of 3.6 seconds. Can you test with this version @emacs18?

Note, by the way: you will observe very very poor performance of straight.el in the case that you evaluate a lot of straight-use-package calls without wrapping said evaluation in a transaction. By default, init is considered a transaction. You are encouraged to also insert straight-transaction blocks into any of your interactive commands that evaluate Elisp code interactively.
In particular, your profiling

(elp-instrument-package "straight")
(elp-reset-all)
(mapcar #'straight-use-package '( ... )) ;; about 170 pacakges
(elp-results)

will have terrible performance compared to if you wrap the mapcar in a straight-transaction. This is due to several reasons, but the biggest is that straight.el checks all packages for modifications at the beginning of a transaction, because this is faster than checking each package individually. So if you don't wrap in a transaction, then you're checking all 320 packages for modifications 320 times. O(n²) makes everybody cry.

Also, food for thought. Would anybody be interested in me making a pull request to Spacemacs to add an option for using straight.el instead of package.el (much like there is an option to use helm vs. ivy or evil vs. the One True Keybindings)?

@raxod502 This thread may interest you in that case (or maybe not :woman_shrugging:): https://github.com/quelpa/quelpa/issues/93#issuecomment-143230503

Created https://github.com/syl20bnr/spacemacs/issues/9505.

Thanks for all the feedback.  I found out why things were taking so long.
It was because I launched emacs via
emacs -Q -l .../init-file-for-straight.el

If I do not use -Q and setup my ~/.emacs to do the equivalent thing, then the startup
time goes from 15 minutes down to 4 seconds.  Now that I know this, I'll just avoid using -Q, and instead mess with my ~/.emacs to setup straight.

See also this snippet from the user manual, which explains the proper way to load straight.el using emacs -Q -l .../init-file-for-straight.el.

There is one final user-facing note about the transaction system, which is important when you want to load your init-file after Emacs init has already completed, but before straight.el has been loaded (so you cannot just wrap the call in straight-transaction). To cover this edge case (which arises, for example, when you wish to profile your init-file using something like esup), you should use the following pattern:
(unwind-protect
    (let ((straight-treat-as-init t))
      "load your init-file here")
  (straight-finalize-transaction))

@emacs18 any chance you want to share your most recent versions of my-straight-installed-p etc., and perhaps indicate where within your user-init-file / dotspacemacs-filepath you've put it all?

Closing this issue since we have a Gitter for general discussion now. For requesting a better-supported way to use straight.el and package.el together with use-package, open a new issue.

Does that mean straight-enable-use-package-integration should be deprecated?

I don't see why; can you explain?

I thought most of the idea with straight-enable-use-package-integration, was to override the use of :ensure to use straight.el, instead of package.el. And later, I thought a separate keyword was added to use-package so that :ensure can now always correspond with package.el. Sorry if I misunderstand.

Everything you said is correct, except that you are omitting the part where in the default (i.e. non-deprecated) configuration, straight-enable-use-package-integration defines the :straight keyword that allows you to use straight.el with use-package. That part is definitely not deprecated as without it there is no way to use the packages together. You can read more in the docstrings of the relevant variables.

authors: bradyt braham-snyder caadar emacs18 raxod502 rgrinberg vyp


text:
bootstrap on Windows 10 fails to find python

I am testing straight.el on Windows 10 now, after having it run on Ubuntu flawlessly.
Starting with empty .emacs.d, I add the bootstrap code as per docs.
Both both watchexec.exe and python3.exe are available. I have also this code, borrowed from radian,
(if (and (executable-find "watchexec")
         (executable-find "python3"))
    (setq straight-check-for-modifications '(watch-files find-when-checking))
  (setq straight-check-for-modifications '(find-at-startup find-when-checking)))

So, straight-check-for-modifications is set to (watch-files find-when-checking)
At first boot, emacs (27.0.50) stops with message:
$ cd "c:/tools/emacs27/bin/"
$ "c:/home/.emacs.d/straight/watcher/virtualenv/bin/python" "-m" "pip" "install" "-e" "c:/home/.emacs.d/straight/repos/straight.el/watcher"

[File error while searching for program]

I can see python is missing there,
.emacs.d/straight/watcher/virtualenv/bin/python

but I saw it was installed here:
.emacs.d\straight\watcher\virtualenv\Scripts\python.exe
Could it be straight is looking for a linux bin, while it should look for the Windows one?

With
(setq python (straight--watcher-file "virtualenv" "Scripts" "python.exe"))

(file-executable-p python) returns t.
Basedo on that, I tried to modify the source (changing bin with Script, and python with python.exe`, but still it show same error message.

Sorry, I edited the wrong file. Editing .emacs.d/straight/repos/straight.el/straight.el with the values allows me to have a succesful bootstrap.
I am not sure how to cleanly propose a system-dependant fix, though.

I think it is fine to have straight-watcher--virtualenv-setup use a pcase on system-type, and use your value for python only on ms-dos, windows-nt, or cygwin. Or whichever subset of those values actually corresponds to having the binaries in a different directory.
Thanks for diagnosing the problem!

I am glad of I was of some little help. I have bene uisng Emacs since 2002, searching all the time for a suitable way to organise the Emacs-world, and I have finally found the graal in straight.el. Thank you for developing such a useful and meaningful tool.

Your suggested change is implemented. Let me know if it fixes the problem for you.

Thank you, it works.
I have tested with prepending (setq straight-repository-branch "develop") to my init.el and starting from an empty .emacs.d. Now the error message is gone.
I am also testing straight.el's different other watching systems, and I will report on a new issue.
This one could be closed if you wish.
Thank you!


text:
Define custom :host types

Right now, AFAICT, the domain resolution for different :hosts has a hardcoded dictionary of mappings from a host to a domain. I would like to be able to change this mapping.
I use ssh for interacting with remote git repositories, but since I am a lazy guy, I don't really feel like always typing in the 'github.com' part. So I use my ~/.ssh/config to resolve git@gh as git@github.com with the correct identity, and I do this for multiple hosts.
As a result, all my github remotes are of the form git@gh:user/repo.
I would like to be able to give this information somehow to straight.el.
ATM, I'm using advices on the functions straight-vc-git--{decode,encode}-url and it works well for the most part, except for the very crucial task of installing straight.el itself, since I can't advice functions that aren't defined yet (AFAIK), so during install, straight tries to clone itself via git@github.com, which doesn't have an associated ssh identity and fails.
Feel free to close this issue if it's too niche of a use case. I have no problem with setting the default protocol to https for the first time running a fresh install of Emacs, or using any other workaround that I can come up with :smile:.

This was actually a planned feature that I worked on a while ago, but never finished. I pushed the work in progress to a temporary branch in case you or somebody else would like to finish the feature.

I might take a look at it.

I'm interested to know what's unfinished for this. I found this issue after realizing I couldn't use a git.sr.ht repo as a source, I'd be willing to try and wrap up whatever work is needed to get this merged.

You can use any git repo, you just have to set :host to nil and then specify the full URL in :repo.
As for integrating custom host symbols, I think @raxod502's linked commit should pretty much work, so I too would like to hear from him why he considers it unfinished.

Looking into it more, it seems that:

The spec->url encoding helpers are there, but they are not used in straight-vc-git--encode-url proper
The url->spec decoding is not implemented

AFAICT, the decoding is used in two places:

Converting Emacsmirror (proper) recipes into straight.el recipes. Emacsmirror proper uses git modules to list packages, so straight retrieves the package definition by looking at the URL. This should not be a problem because a) the default is to use emacsmirror-mirror over Emacsmirror, which uses different recipe resolution, and b) the recipes only specify GitHub URLs (as mentioned here)
To identify compatible URLs. I don't know what breaks if this is not implemented, as I am not very familiar with this part of the codebase.
From reading the code, I think if a recipe specifies a URL that is not recognized by one of the patterns, it just returns the full URL and a nil host (protocol is also nil in this case, but that seems like a bug, because the protocol is always identified).
If the result is a literal URL, that means that even inconsistencies like trailing / or a .git suffix would result in a false negative on the match.
However this should not be a problem unless you go to the local repo directory and twiddle with the remotes, expecting straight to recognize that the new remote is compatible with the one specified in the original recipe.

That said, I don't think decoding is required to support custom hosts, but if it were to be implemented, it couldn't be done with the interning trick that was used for encoding, because the decoder doesn't know the host (that's its job), so it can't delegate to an appropriate decoder based on its name alone.
An alternative approach would be to have a customizable list of URL decoders, straight-vc-git-decode-url-functions, that are then ran with run-hook-with-args-until-success to get the first matching result. The downside is that it's inconsistent with the "automagic" approach to feature resolution that is employed in other parts of the codebase.

You can use any git repo, you just have to set :host to nil and then specify the full URL in :repo.
As for integrating custom host symbols, I think @raxod502's linked commit should pretty much work, so I too would like to hear from him why he considers it unfinished.

Thanks - that wasn't clear to me after reading the docs but it does indeed work.

that wasn't clear to me after reading the docs

Entirely understandable---is there a place this info could have been placed in the docs so that you would have found it?

@VojtechStep everything you said in your comment is 100% correct.

I don't think decoding is required to support custom hosts, but if it were to be implemented, it couldn't be done with the interning trick that was used for encoding, because the decoder doesn't know the host (that's its job), so it can't delegate to an appropriate decoder based on its name alone

There is one silly thing we could do:
(let ((syms nil))
  (mapatoms
   (lambda (sym)
     (when (string-match "straight-vc-git-host-.+-encode-url" (symbol-name sym))
       (push sym syms))))
  syms)

It's a bit slow though, and also slightly pains me. Could cache it using the transaction system, but, like, that would be a little ridiculous.

Entirely understandable---is there a place this info could have been placed in the docs so that you would have found it?

Thank you for asking. I think if we had an explicit example or mention of doing this in the Git backend section that would suffice. I'm happy to put together a PR for that.

yeah, that would be lovely!

authors: VojtechStep hristoast raxod502


text:
Please add install instructions

Hello! I'd love to try this config, but I'm not sure what dependencies it has :)
Could you please add an "install" section?

I added install instructions. Please check if it works for you.
I am not sure if the instructions work in your OS. I am using MacOS btw.

I'm using MacOS and getting the following error:
Error detected while processing VimEnter Autocommands for "*":
E5108: Error executing lua [string ":lua"]:1: module 'packer.load' not fo
und:
        no field package.preload['packer.load']
        no file './packer/load.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lu
ajit-2.1.0-beta3/packer/load.lua'
        no file '/usr/local/share/lua/5.1/packer/load.lua'
        no file '/usr/local/share/lua/5.1/packer/load/init.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lu
a/5.1/packer/load.lua'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/share/lu
a/5.1/packer/load/init.lua'
        no file './packer/load.so'
        no file '/usr/local/lib/lua/5.1/packer/load.so'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/
5.1/packer/load.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './packer.so'
        no file '/usr/local/lib/lua/5.1/packer.so'
        no file '/usr/local/Cellar/luajit-openresty/2.1-20210510/lib/lua/
5.1/packer.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'

I don't know much about lua. Do I need to install something else?

Hi, bbkane
Thanks for trying this out. It turned out to be a bug in my script. As I did not purge my folder and re-run the script from ground up.
The bug was fixed and please give it another try.
If you do not want start from beginning, you can
(1) pull the repo
(2) Run the commands in nvim command mode.
:PackerCompile
:PackerUpdate
Thanks!

Apologies for the late reply @ray-x . I'm off vacation and back at work, so I'm not sure when I'll have time to play with this. I'll go ahead and close this ticket, and open a new one if I have troubles when I have time to check this out again :)

authors: bbkane ray-x

repo: ray-x/nvim


text:
[API Feature Request] Toast Event Handler

Describe the feature and the current behavior/state.
I love the toast API. It's extremely easy to use, and it has a great aesthetic. By using const toast = new Toast(), we get to control the toast. The toast has a x button that user can click on, and there's this loading animation. I wish there's an event handler (like toast.on('close')) that fires at least when toast.style = ToastStyle.Animated. Also, toast.on('click') might be less useful, but it can be used to display a error log file when something went wrong or to show a webpage containing some information.
Will this change the current api? How?
It's going to add an event handler to the toast API
Who will benefit with this feature?
A lot of people, really. The first one can be used to stop http requests, download, and pretty much anything that require loading. Second one can provide better error handling, especially for debugging when something went wrong on a distributed build.

Instead of Toasts having different behaviour on click, we are going to allow for Toast Buttons instead so that the action is clear when the user click on something: https://github.com/raycast/extensions/issues/438

authors: froxcey mathieudutour

repo: raycast/extensions


text:
Inconsistent Action shortcut

Extension – GIF Search
Author: @josephschmitt
Hm, there’s an inconsistency between the Search for GIFs extension and the built-in Search Screenshots functionality. For screenshots, you can hit ⌘ ⏎  to paste it to the current app, but in the GIF extensions, the same shortcut copies the GIF link.
(See Slack thread).

@josephschmitt What do you think?

Hmm, I don't think "pasting into the current app" is functionality that is available to extensions. The screenshots stuff is built-in to Raycast itself and has more explicit system permissions.

authors: josephschmitt roelvangils


text:
[Asana] ...

Extension
https://www.raycast.com/raycast/asana
Description

Error:
TypeError: Cannot read properties of undefined (reading 'errors')

Ba:errors.ts:16:87
Object.onError:create-task.js:59:6400
create-task.js:1:202516

Steps To Reproduce
No response
Current Behaviour
No response
Expected Behaviour
No response

Could you include a screencast to troubleshoot the error better, please?


text:
Update ray-so extension with new "mono" theme

Description

Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Very nice! We can merge once the errors are fixed (prettier(

Need to update the changelog 🔥

All good now!

authors: emlez peduarte


text:
Add prowlarr extension

Description

Screencast

Checklist

[ ] I read the extension guidelines
[ ] I read the documentation about publishing
[ ] I ran npm run build and tested this distribution build in Raycast
[ ] I checked that files in the assets folder are used by the extension itself
[ ] I checked that assets used by the README are placed outside of the metadata folder

An extension for https://prowlarr.com, an indexer manager/proxy built on the popular arr stack.
Contains a subset of functionality, available on the WEB.
Allows to to search for the torrents, copy download links and add to download clients.


text:
[bitbucket] Changed the SearchList implementation to work with workspaces with large number of repositories

👋🏾
Description
SearchList currently tries to load all the repositories in a workspace into cache before presenting to the user. This works great for workspaces with small number of repositories but it takes forever for workspaces with larger number of repositories. I was trying to use the extension on my workspace that has 10k+ repositories and it never finishes loading the data.
I changed the implementation to load the fist page of the data as the user types. swr cache will still cache per query. In most cases if the user types 3-5 letters the list shrinks down to less a 100 repositories (even with 10k+ repos!) so imo its not that important to load more than a page.
Also took the opportunity to upgrade to latest version of RayCast.  All other changes except queries/index.ts and searchRepositories.tsx file are due to RayCast version upgrade.
Screencast
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hello! 👋
Thanks for contributing to this extension :)
Could you run npm audit fix on your PR? I noticed on NPM install several vulnerabilities (7 moderate, 3 high, 1 critical).
Otherwise LGTM, my workspace only have ~50-ish repositories so I tweaked the page length to 10 in order to experiment the new behavior.

Is there a reason why this extension has default values for two of the fields? A placeholder should be sufficient.

@pernielsentikaer good catch! Looks like we already had placeholders, I just removed the default values from it.

authors: Lp-Francois itsrifat pernielsentikaer


text:
Fixed Generated Normals for GenMeshCubicmap

Just flipped the signs of n5 and n6 at lines 2021 and 2022.

@GoldenThumbs thanks for the improvement, I did a quick test and it seems there are still some issues, check the open issue!

license: Zlib


text:
Add Vector2Reflect to raymath.h

Vector3Reflect exists but not Vector2Reflect. The code is pretty much the same.
I'm not sure what RMDEF does, but I added it to match other function definitions (haven't done much C programming, maybe I'm missing something). Can someone explain to me what it does?

@daniel-junior-dube Thanks for the addition!
RMDEF just declares different type of symbols for function depending on the compilation mode of the module (static, inline, as a dll...).


text:
Fix the Julia set shader example

A follow-up to #3466
Hello! Ever since I added the Julia set shader example (~4 years ago!) it had always bugged me that the zoom function was never correct. This PR fixes this, and is also a general tidy-up.
In summary:

Fix zoom issue.
Add a COLOR_CYCLES variable to the shader to allow for cycling of the color palette. This allows for finer details of the fractal to be shown when using a high max iteration number.
Allow user to reset the camera with "R".
Fix some pretty terrible if statement mess.
Other minor tidying (removal of unnecessary uniform value).
Update copyright.

Issue
Fixes: #3465
Testing
I have tested the code on my Linux machine. I have not tested on glsl100 platforms, or Windows.

@joshcol9232 Thanks for the improvement, added some possible points to review.

@raysan5 thank you for the timely review; I've updated given the comments and also tidied elsewhere in the code where the coding conventions were not being followed. Thanks!

@joshcol9232 thanks for the review!


text:
Create a Swift Benchmark from BucketSort

Recently I worked on the ExistentialSpecializer optimization in the Swift compiler (https://github.com/apple/swift/pull/19820, others). BucketSort seems to improve significantly with this optimization. BucketSort has nice protocol usages and I was wondering if it makes sense to make it a Swift performance benchmark. What are the licensing and other issues? Any thoughts?

We operate under MIT, so you're free to use anything here =)

authors: kelvinlauKL rajbarik

repo: raywenderlich/swift-algorithm-club