pods stuck in terminating state

I have tried to stop and uninstall snmp and re-install but i am stuck in this state..

NAME                                                          READY   STATUS        RESTARTS   AGE
snmp-mibserver-68665c8f55-shhz2                               1/1     Terminating   0          14d
snmp-redis-master-0                                           1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-worker-sender-847c9dbd95-v9458   1/1     Terminating   0          14d
snmp-mongodb-57d7cdf5f6-74t26                                 2/2     Terminating   0          14d
snmp-splunk-connect-for-snmp-worker-poller-77cbfc4555-nnbgk   1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-worker-poller-77cbfc4555-mj5sp   1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-trap-54676c6d6f-b5qpw            1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-trap-54676c6d6f-zv2k9            1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-scheduler-58d89d4dc9-777d2       1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-worker-trap-799cb7bb59-mbbcl     1/1     Terminating   0          14d
snmp-splunk-connect-for-snmp-worker-trap-799cb7bb59-rqp2g     1/1     Terminating   0          14d

I have tried:

microk8s helm3 uninstall snmp -n sc4snmp

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /var/snap/microk8s/5137/credentials/client.config
Error: uninstall: Release not loaded: snmp: release: not found

and also ..

microk8s helm3 uninstall snmp -n sc4snmp

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /var/snap/microk8s/5137/credentials/client.config
Error: uninstall: Release not loaded: snmp: release: not found

but it just hangs
Also a reboot did not resolve issue

OK fixed it .. i thought but still broken .. i was able to kill the pods with:
microk8s kubectl delete pod snmp-splunk-connect-for-snmp-trap-54676c6d6f-b5qpw --grace-period=0 --force --namespace sc4snmp
until i got:
microk8s kubectl delete pod snmp-splunk-connect-for-snmp-trap-54676c6d6f-b5qpw --grace-period=0 --force --namespace sc4snmp
But now when i try and re-install snmp - only 4 pods start ..
microk8s kubectl get pods -n sc4snmpNAME                                                         READY   STATUS    RESTARTS   AGE snmp-splunk-connect-for-snmp-worker-sender-6f9d97567-qk5nv   0/1     Pending   0          15s snmp-mibserver-68665c8f55-5lw2c                              0/1     Pending   0          15s snmp-mongodb-76c9f55486-c7w4b                                0/2     Pending   0          15s snmp-redis-master-0                                          0/1     Pending   0          15s

Even after un-installing sc4snmp and removing and snap installing microk8s again i still now only see 4 pods running ..
`
microk8s kubectl get pods -n sc4snmp
NAME                                                          READY   STATUS    RESTARTS   AGE
snmp-mongodb-6df549cfd5-jgggb                                 0/2     Pending   0          10m
snmp-redis-master-0                                           0/1     Pending   0          10m
snmp-splunk-connect-for-snmp-worker-sender-7f644bcd78-rt2n9   1/1     Running   0          10m
snmp-mibserver-847c5bf574-g488k `

Isn't it a problem with not enough resources?
Can you check microk8s kubectl get events -A and microk8s describe nodes?

this is a c6i.2xlarge | 8cpu | 16GB
 microk8s kubectl get events -A NAMESPACE   LAST SEEN   TYPE      REASON                    OBJECT                                                 MESSAGE sc4snmp     4m55s       Normal    FailedBinding             persistentvolumeclaim/snmp-mongodb                     no persistent volumes available for this claim and no storage class is set sc4snmp     4m55s       Normal    FailedBinding             persistentvolumeclaim/redis-data-snmp-redis-master-0   no persistent volumes available for this claim and no storage class is set sc4snmp     4m35s       Warning   FailedGetResourceMetric   horizontalpodautoscaler/snmp-mibserver                 failed to get memory utilization: unable to get metrics for resource memory: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)
 microk8s describe nodes 'describe' is not a valid MicroK8s subcommand.

microk8s status --wait-ready
microk8s is running
high-availability: no
datastore master nodes: <IP_ADDRESS>:19001
datastore standby nodes: none
addons:
enabled:
dns                  # (core) CoreDNS
ha-cluster           # (core) Configure high availability on the current node
helm                 # (core) Helm - the package manager for Kubernetes
helm3                # (core) Helm 3 - the package manager for Kubernetes
metallb              # (core) Loadbalancer for your Kubernetes cluster
disabled:
cert-manager         # (core) Cloud native certificate management
community            # (core) The community addons repository
dashboard            # (core) The Kubernetes dashboard
gpu                  # (core) Automatic enablement of Nvidia CUDA
host-access          # (core) Allow Pods connecting to Host services smoothly
hostpath-storage     # (core) Storage class; allocates storage from host directory
ingress              # (core) Ingress controller for external access
kube-ovn             # (core) An advanced network fabric for Kubernetes
mayastor             # (core) OpenEBS MayaStor
metrics-server       # (core) K8s Metrics Server for API access to service metrics
observability        # (core) A lightweight observability stack for logs, traces and metrics
prometheus           # (core) Prometheus operator for monitoring and logging
rbac                 # (core) Role-Based Access Control for authorisation
registry             # (core) Private image registry exposed on localhost:32000
storage              # (core) Alias to hostpath-storage add-on, deprecated

Okay, I see your hostpath-storage is disabled, an the error communicate is  no persistent volumes available for this claim and no storage class is set sc4snmp. Can you run microk8s enable hostpath-storage? Then you can check for available stroageclasses on your kubernetes cluster with microk8s kubectl get storageclass

Thanks - thats sorted it.

ran that command and then unistalled snmp and re-installed and looks a lot better.

microk8s kubectl get pods -n sc4snmp
NAME                                                          READY   STATUS      RESTARTS   AGE
snmp-mibserver-847c5bf574-q9wxt                               1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-worker-trap-c944fbd96-cf8gm      1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-worker-sender-85bb6df4bd-5vxq5   1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-trap-dfc6687f4-t424c             1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-trap-dfc6687f4-qhjkr             1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-scheduler-7bc4f57cdb-vnf6h       1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-worker-trap-c944fbd96-k2jkz      1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-worker-poller-6b9c8c656d-7gbns   1/1     Running     0          5m42s
snmp-splunk-connect-for-snmp-worker-poller-6b9c8c656d-66ztj   1/1     Running     0          5m42s
snmp-redis-master-0                                           1/1     Running     0          5m42s
snmp-mongodb-75b89b595f-r9jr6                                 2/2     Running     0          5m42s
snmp-splunk-connect-for-snmp-inventory-6rlvv                  0/1     Completed   0          5m42s

thanks

No problem, closing it.

No problem, closing it.


Wrong project status

Hello,
looks like there is some issue with Project status in Dockstation. My projects is always off, while on container page I can see that containers are run. All containers are started via Run button for project.
https://imgur.com/a/4TNSLOw
Docker compose is:
version: '3'
services:
traefik:
image: traefik
container_name: main_traefik
restart: unless-stopped
command: '-c /dev/null --web --docker --logLevel=DEBUG --defaultEntryPoints=''http,https'' --entryPoints="Name:https Address::443 TLS:/certs/ssl.crt,/certs/ssl.key" --entryPoints="Name:http Address::80"'
networks:
- shared
ports:
- '443:443'
- '80:80'
- '8080:8080'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- './certs:/certs'
portainer:
image: portainer/portainer
container_name: main_portainer
command: '--no-auth -H unix:///var/run/docker.sock'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
labels:
- traefik.backend=shared_portainer
- traefik.port=9000
- 'traefik.frontend.rule=Host:portainer.ff'
- traefik.enable=true
- traefik.default.protocol=http
networks:
- shared
mailhog:
container_name: main_mailhog
image: mailhog/mailhog
labels:
- traefik.backend=shared_mailhog
- traefik.port=8025
- 'traefik.frontend.rule=Host:mailhog.ff'
- traefik.enable=true
- traefik.default.protocol=http
- 'traefik.frontend.entryPoints=http,https'
- traefik.frontend.redirect.entryPoint=https
networks:
- shared
logio:
hostname: logio
image: 'blacklabelops/logio:latest'
environment:
- LOGIO_ADMIN_USER=
- LOGIO_ADMIN_PASSWORD=
- LOGIO_CERTIFICATE_DNAME=
labels:
- traefik.backend=shared_mailhog
- traefik.port=28778
- 'traefik.frontend.rule=Host:logio.ff'
- traefik.enable=true
- traefik.default.protocol=http
- 'traefik.frontend.entryPoints=http,https'
- traefik.frontend.redirect.entryPoint=https
volumes:
- /opt/server
networks:
- shared
networks:
shared:
external:
name: shared
env file contains only:
COMPOSE_PROJECT_NAME=admin stack
System is Linux Mint 19.1

But behavior the same even if I use any other docker-compose.yml

Ok, I've was able to solve the issue.
For that, I have to downgrade docker-compose to 1.17.1 version.
Before that, it was 1.23.1 installed. Maybe application needs to be modified somehow to support a newer version of docker-compose?

Hi. Please check your issue on new 1.5 version. If the issue is still actual let me know. Thanks.


[Discussion] 3D Unit healthbars

Discussion for http://godotrecipes.com/3d/healthbars/

The ZIP is not working as described.
To make it work, change HealthBar3D as follows:

set Texture to 'New ViewportTexture' and select the existing Viewport
delete the Material in Geometry
enable the Billboard flag

Yes, this is due to a change in the recent version of Godot (addition of the Billboard flag).
The text has been changed, but the zip needs to be updated.

I can send you my version, if that helps.

I like the video and demonstration however after following along, I found that the viewport does not update the sprite3D very well. Its leaving me with this gray box over my head. The viewport seems to not be setting the texture correctly? idk if thats a godot thing or a me thing


[timeline] use units from the observations as y-axis label

we are currently showing the mprop, but we should also use observation units on the chart. if the units are different, we should not display timelines in the same chart.
e.g. unclear what the units are in the chart:
https://autopush.datacommons.org/tools/timeline#place=geoId%2F06%2CgeoId%2F26&statsVar=Annual_Consumption_Coal_ElectricPower&chart={"consumption"%3Afalse%2C"cost"%3Afalse%2C"heatContent"%3Afalse}
vs
https://datacommons.org/browser/geoId/06?statVar=Annual_Consumption_Coal_ElectricPower

we should also include the units in the tooltip


Update to topic - Understanding ASP.NET 5 Web Apps

Updated code, images and text to RC.

@Rick-Anderson @danroth27 @rachelappel - This topic built well and looks good. However, I got the same failure above that Rick saw recently (changed author link #709). How should this PR proceed?

Looks like a false alarm failure to me. I'd say merge it but  @rachelappel knows best.

I think the sample app in this doc can be removed and the Web app sample in common should be used instead. The only thing the sample for this doc adds is injecting configuration into the controller, which is not best practice. Folks should use the options model instead.

:shipit:

5259974076c8f0ab5b11f25ba01e037dec1d78aa


Rename sawtooth-raft to sawtooth-raft-engine

Signed-off-by: Ryan Beck-Buysse<EMAIL_ADDRESS>

Possible minor doc issue: In configuring_deploying.rst, under "Verifying Raft Is running", the doc shows a log message with the consensus engine name.  Will this PR change that message?  If so, it would be nice to update the doc.

Once the genesis block has been committed, you will see a message in the validator's logs
indicating that the Raft engine has been registered:
   Consensus engine registered: sawtooth-raft X.Y.Z

See https://github.com/hyperledger/sawtooth-raft/blob/master/docs/source/configuring_deploying.rst

Good catch, Anne.


HoloToolkit 2<IP_ADDRESS> Speech Recognition not working

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)?
HoloToolkit
Describe the bug
HoloLens doesn't invoke any events when trying to use speech commands.
To Reproduce

Import HoloToolkit 2<IP_ADDRESS> to Unity2018.1.9
Setup scene and project
Add 'SpeechInputHandler' and 'SpeechInputSource' to empty gameobject
Enable Microphone capabilities
Deploy to HoloLens

Expected behavior
Spoken words get recognized and a sound is being played.
Actual behavior
nothing happens
Screenshots

Unity Editor Version
Unity2018.1.9
Mixed Reality Toolkit Release Version
HoloToolkit 2<IP_ADDRESS>
Additional context

Happens for me too. Seems to work sometimes when I delete the entire build folder and rebuild that from scratch.
Built my project with 2018.2.4 and voice commands worked again

Sidebar: Where did you get the build window in Unity?

observed same issue. some times it works and but most of the times I get Unity exception "UnityException: Speech recognition is not supported on this machine"

HTK requires Unity 2017.4
Closing older HTK issue as we are no longer actively working on HTK.
Please upgrade to MRTK V2 for the latest fixes.


Serial.write crashes Homespan

I'm attempting to use the Television example along with an IR transmitter module to control my TV. (I know I can do it with just the IR led but I don't have the correct transistor on hand.) The transmitter works by sending the HEX codes over serial using Serial.write in the following code:
uint8_t on_code[5]={0xA1, 0xF1, 0x00, 0xFF, 0x47}; void setup() {         Serial.begin(9600); } void loop() {         Serial.write(on_code,sizeof(on_code)); }
I have added the Serial.write line just below the Serial.printf in each RemoteKey switch case and changed the serial rate to 9600 as that is what the transmitter requiers. Every time I trigger it however, Homespan stops responding and I have to restart the ESP32.
Any help would be appreciated, thanks!

You are trying to write to the main Serial port?  This is already used by HomeSpan.  You need to use Serial1 or Serial2 instead.
-Gregg

That worked, thank you! I didn't even know there were multiple serial ports as I haven't seen that before. Thanks for the quick response.


Get value from key first; if not existing, try recursive get

Due to splitting object field by dot (.), when an user provides a data
which key has a dot, it will cause an issue for an undefined data
which looks like not rendered.
So, to solve this, we should try to get the object value from the key
first. If it's not defined or null, then we will try to do the original
recursive way to get value.
Fix #1381

Thanks for looking into this. It seems like the "Nested field" feature was added by @AllenFang  here in response to a popular RBT 1 issue. I think Allen had the right idea to reject this nested field feature initially, as it adds more complications to this library.
The users on the original issue thread came up with a number of ways of handling this outside the table library (i.e., massage your own data), and there are certainly more ways than _.get from lodash.
But of course this feature already went out so it would be weird to remove it now. Handling this in the getter util seems like a good fix.

I think Allen had the right idea to reject this nested field feature initially, as it adds more complications to this library.

Indeed; it's possible that adding this would make it much more difficult to debug in the future.

The users on the original issue thread came up with a number of ways of handling this outside the table library

If users find their own way to handle the data, it sounds great 👀

Handling this in the getter util seems like a good fix.

It's indeed an easy fix but I think it's fine for me to close it if @AllenFang will worry about adding more complexity to this library.
Feel free to close it if there's any concern!

thanks @CYBAI  🇹🇼   I will release it later


Add renderLit to render-component

This PR adds an additional renderLit function into the riteway/render-component path of this package to support Lit elements. The renderLit function takes in an element parameter of type TemplateResult and returns a Cheerio instance that can be used in the exact same way as the previous render for Lit elements.
The default render method will use renderReact and use the previous implementation.
Todo:

[ ] Add tests (having an issue with ESM vs CommonJS modules)
[X] Update README

We are using renderFixture and renderShadow in our platform repo. Should they be here?


brew runs 'update' whenever I open a new terminal

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
Please always follow these steps:

[ ] Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/new
[ ] Ran brew update and retried your prior step?
[ ] Ran brew doctor, fixed all issues and retried your prior step?
[ ] Ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

What you were trying to do (and why)
What happened (include command output)
What you expected to happen
Step-by-step reproduction instructions (by running brew commands)

Features
Please replace this section with:

a detailed description of your proposed feature
the motivation for the feature
how the feature would be relevant to at least 90% of Homebrew users
what alternatives to the feature you have considered

We will close this issue or ask you to create a pull-request if it's something we're not actively planning to work on.
Due to the special network environment in my country, the command 'brew update' always suffers  a terrible lag and ends up with 'Operation timeout'. Likes following:

Last login: Tue Oct 24 15:31:10 on ttys000
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
curl: (7) Failed to connect to akamai.bintray.com port 443: Operation timed out
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.

This annoying situation comes up every time when I open a new terminal tab.

And I set my env variable HOMEBREW_NO_AUTO_UPDATE to 1 and it doesn't work as expected.

If I uninstall brew, then every time I open a new terminal tab, it shows

It looks like brew command runs automatically when bash is loaded. Any hint to disable this?

Ran brew config and brew doctor and included their output with your issue?

Please post the brew config and brew doctor output as requested.

It looks like brew command runs automatically when bash is loaded. Any hint to disable this?

This is something you have configured on your personal machine and doesn't happen by default. These are the commands that prompt an update: https://github.com/Homebrew/brew/blob/357b7bb0b72f5f3e2747ffffdad76d694f73b626/Library/Homebrew/brew.sh#L314
As this relates to you personally and not Homebrew this is being closed. Also, you must always follow the issue template in future.

As I mentioned before, brew just runs updating operation ignoring what you command. What's even worse is that the network lag makes brew almost unusable.

That's not an update operation, it's trying to install Ruby so it can run any command.

@Edward1992 you need to download that file one way or another and place it in your Homebrew cache (~/Library/Caches/Homebrew).


Find an alternative to VoIP push when building the app for iOS 13

TL;DR: When we will build for iOS 13 SDK with Xcode 11 we should find an alternative to VoIP push to wake up the application when she is killed to render encrypted messages in notifications. We should try to use a Notification Service Extension to decrypt an encrypted message before it is displayed and see if it can work decently despite the 30 seconds limit of code execution.
About iOS 13 PushKit restriction
New restriction coming in iOS 13

iOS 13 introduces new requirements, detailed here, which now require VoIP push notifications show a full-screen incoming call interface (via CallKit) that the user must interact upon the reception of each notification.

Note: This restriction applies on iOS 13 only if we build the app for iOS 13 SDK with Xcode 11, we can continue to build the app with Xcode 10 for iOS 12 SDK to get some extra times.
##Several alternative options
APNS regular notification
Sending push notifications using only APNS is not an option as it would mean sending all messages unencrypted in push payload.
APNS silent push notification
We can send a silent push with APNS to wake up the app but as said in Apple documentation but there is following restrictions:

The system treats background notifications as low-priority: you can use them to refresh your app’s content, but the system doesn’t guarantee their delivery. In addition, the system may throttle the delivery of background notifications if the total number becomes excessive. The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or
three per hour.

as pointed out here other restrictions:

The downsides are quite annoying for this option:

You will only get 30 seconds to run.
These notifications must have a apns-priority of 5, which might cause them to be grouped and delivered in bursts, and even throttled or not delivered.
If the user force closes the app, it will completely ignore all silent notifications until the user opens the app again.

This kind of notification is not reliable but we can use it to keep the app up to date. We can use it in conjunction with new iOS 13 BackgroundTasks framework to extend the duration of the sync treatment. But the main drawback is that the app should not be killed to make silent push working.
APNS notification using Notification Service Extension
A Notification Service app extension lets you customize the content of a remote notification before it is delivered to the user.
From this article we can find following restrictions:

Firstly, your extension will only be launched for notifications which are configured to show on-screen alerts to the user. This means that any silent notifications (like the ones used to update app badges) will not trigger your extension.

As you can see, when using a notification service extension, you only have a limited amount of time to perform the necessary work. If your extension is taking too long, then it will be stopped by the system, and the notification will be delivered as if you had no extension at all.

With this option we can send a generic message in the notification like "Someone send you a message" and put the event id in the custom keys of the push content. And then try to render the final message from this event id within 30s otherwise it will display the generic message.
The main advantage of using Notification Service Extension is that this is possible to execute arbitrary  code in background even if the main application is killed by the user.
Conclusion
VoIP push notifications using PushKit framework was an easy way to wake up the application to execute arbitrary code even when she was killed. But if Apple stay on it's position, an application built with iOS 13 will have to show a full-screen incoming call interface on a VoIP push. This makes impossible to silently execute code in the background using PushKit.
The most serious alternative is to use APNS notification with a Notification Service Extension. With this option we will be able to receive a notification even if the app is killed. But the drawback is that the user could end with a default title and message if the final message could not be rendered in time (within 30s).

One question relevant to VoIP push notifications, when I failed to report call kit manager that has stopped delivering even simple push notifications to my app. What shall I do to reset this? There must be some solution to this right?

One question relevant to VoIP push notifications, when I failed to report call kit manager that has stopped delivering even simple push notifications to my app. What shall I do to reset this? There must be some solution to this right?

@VishalSharma91 you should reboot the device.

Rebooted and re-installed the device. It doesn't even call didRegisterForRemoteNotificationsWithDeviceToken method. I think the CallKitManager malfunctioned push for this app.

didRegisterForRemoteNotificationsWithDeviceToken

Yes, didRegisterForRemoteNotificationsWithDeviceToken never called, again

Some problem. System are crashed my app after receiving push.
"Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback"

Hi everyone, I am trying to implement Notification Service Extension in my branch, Although i was wondering if the notification sent by matrix is a silent push or not,  Can anyone help with this?

Hi guys,
I was trying to use UNNotificationServiceExtension, but it turned out it has a limitation of only 12MB of memory. how are you planning on utilizing that?

Closed with #3268

had anyone applied this solution?
does it work with no problems?
what changes should be made from the server-side and the client-side?

We're testing this internally after #3268 on client side and https://github.com/matrix-org/sygnal/pull/114 on server-side. Tracking issues with https://github.com/vector-im/riot-ios/milestone/33. Anyone can test the implementation with xcode11 branch.

@ismailgulek we tried to test the implementation with xcode 11 branch and Sygnal v0.6.0
we still could not receive any notifications.
we tried the APNS with the certificate, also we tried with firebase gcm ios. the push notification is sent from sygnal service, but nothing is received from the app side.

is there any new configuration that should be added to the sygnal service ?
could we send a test notification from the sygnal service directly?


Syntax erro - Pointers must begin with "#/"

Hi there, I just started getting this error today.  Not sure what changed or how to fix it.

Any ideas?

This error means that you have an invalid $ref somewhere in your schema.  Without actually seeing your schema, I can't get any more specific than that.

This is a valid bug; it violates the spec WRT internal links. Internal links are not necessarily JSON pointers.
$ node -e 'require("json-schema-ref-parser").dereference({"$ref": "#bar", "definitions": {"bar": {"$id": "#bar"}}}).then(s=>console.log(s))'
(node:17237) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2):
SyntaxError: Invalid $ref pointer "bar". Pointers must begin with "#/"

$ ajv -d <(echo null) -s <(echo '{"$ref": "#bar", "definitions": {"bar": {"$id": "#bar"}}}')
/dev/fd/63 valid

ajv gets it right
See http://json-schema.org/latest/json-schema-core.html#rfc.section.9.2.1

as a stopgap the program could simply ignore internal refs. Not ideal but better than crashing.

Example dereferencing local refs
        return _.reduce(Object.entries(schema), (a, [k, v])=>{
          if (k === '$id') a.ids[v] = a.parent;
          k === '$ref' && a.refs.push(a.parent);
          if (v && typeof v == "object") {
            let oldParent = a.parent;
            a.parent = v;
            let r = this._walkSchema(v, a)
            a.parent = oldParent;
            return r;
          }
          return a;
        }, accum);
      }
      _derefLocal(schema) {
        let stuff = this._walkSchema(
          schema,
          {parent: schema, ids: {}, refs: []}
        );
        stuff.refs.forEach(ref=>{
          if (ref.$ref[0] === '#' && ref.$ref[1] !== '/') {
            _.assign(ref, stuff.ids[ref.$ref]);
            delete ref.$id;
            delete ref.$ref;
          }
        })
        console.log(stuff);
        return schema;
      }

this seems to duplicate https://github.com/BigstickCarpet/json-schema-ref-parser/issues/17

I intend to support inline references in the next version of JSON Schema $Ref Parser, which I have already begun working on.  👍
In the meantime, I will implement @n1ywb's stopgap recommendation of ignoring these references.

6.1.0 has the same bug

I think this might also be related to #136

Faced it today in 9.0.6 version.


Fix conversion warnings

I've fixed a few conversion warnings!

Thanks Christian! Guess I need to setup CI on this one....


Disable strict loading in multiprocessing launcher

What does this PR do?
Fixes #14534
Sets strict=False when loading the state dict of the model back into the main process. The model in the main process may have a different architecture than the one trained in the worker processes:

class BoringModel(LightningModule):
    def __init__(self):
        super().__init__()
        self.layer1 = torch.nn.Linear(32, 2)

    def setup(self, stage=None):
        self.layer2 = torch.nn.Linear(32, 2)  # this layer does not exist in main process

model = BoringModel()  # layer2 does not exist yet
trainer = Trainer(strategy="ddp_spawn", ...)
trainer.fit(model)
# here, at the end of fit, we load model weights back into main process
# but we can only do so for layer1, because layer2 does not exist in main process

This is a limitation of this type of training with the "spawn" method. Since we don't know what the user will do with the model after fit(), the best we can do is load the weights that match.
Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
I made sure I had fun coding 🙃
cc @borda @justusschock @awaelchli

It is possible to install pytorch-lightning with this fix? I don't see any way to do this listed here https://pytorch-lightning.readthedocs.io/en/stable/starter/installation.html

@awaelchli Thank you for quickly implementing this!
It is possible to install pytorch-lightning with this fix? I don't see any way to do this listed here https://pytorch-lightning.readthedocs.io/en/stable/starter/installation.html

Try this:
PACKAGE_NAME=pytorch pip install https://github.com/Lightning-AI/lightning/archive/refs/heads/master.zip -U

This works, thank you!

Although the solution itself doesn't work - the module ends up with no parameters. Is there any point downstream of this change there the contents of state_dict can be ignored or overwritten?

This is probably because you don't create your layers at the time of instantiation, only later. You will always run into this limitation with the "ddp_spawn" strategy, it's a result of the design. In this case, you should choose strategy="ddp" and you will never have this issue.

I see, thanks for explaining!
And there is no way to modify the strategy - e.g. run Callback setup before loading the parameters in the main process?

But before falling back to this workaround, I suggest just using the regular ddp strategy.

Thanks @awaelchli! Both solutions ddp and dpp_notebook + running callback in the main process seem to work (code runs). However, I see that both solutions lead to identical batches loaded to both devices (the data-loaded tensors such as the pyro plate indices on both devices are identical). I read this https://github.com/Lightning-AI/lightning/discussions/7186 and other related issues - but I don't understand why this should be happening. Is it possible to check if DistributedSampler (replace_sampler_ddp=True) was created successfully?

Is it possible to check if DistributedSampler (replace_sampler_ddp=True) was created successfully?

You can check isinstance(trainer.train_dataloaders[0].sampler, DistributedSampler) for example.

It appears that worker_init_fn=pl_worker_init_function leads to all workers being initialised in all processes using the same seed. Is this expected?

Call seed_everything(1, workers=True) to seed dataloader workers based on global rank.
For further questions, please consider posting in the forum or if you find a bug, a new issue would be appreciated (since this topic here is about strict loading of weights).


After a regular gem update, Double test broken, even the expected and got look the same

the result is as below:
       #<Double "BROOK"> received :request_suspensions_jsa with unexpected arguments
         expected: (nil, {:contract=>"BROOK", :site=>"ABCD"}, {:jsid=>"123456"})
              got: (nil, {:contract=>"BROOK", :site=>"ABCD"}, {:jsid=>"123456"})
       Diff:

related gems
 bundle list | rg rspec

  * rspec (3.11.0)
  * rspec-activemodel-mocks (1.1.0)
  * rspec-core (3.11.0)
  * rspec-expectations (3.11.0)
  * rspec-html-matchers (0.9.4)
  * rspec-json_expectations (2.2.0)
  * rspec-mocks (3.11.0)
  * rspec-rails (5.1.0)
  * rspec-support (3.11.0)
  * ruby_event_store-rspec (2.3.0)

maybe duplicated with #1460

Yes this is a duplicate


CSS styling the HTML representation of InferenceData

We use <details> to enclose the plaintext representation of the groups in the custom InferenceData HTML show method. By default, the group name is styled with the right-facing arrow to the far left, which rotates to point down when the group is expanded. However, the CSS of the page in which the InferenceData's HTML is inserted might custom style the <details> to remove the arrow. Jupyter does this, for example.
We should embed whatever CSS is necessary in a <style> block after the HTML to ensure that at least in Jupyter the arrow is shown correctly, but it's better if we can style the <details> to show the error no matter what the global CSS is.
Related, each of our tags should probably have a custom class associated with it, which would allow others to style our HTML as they prefer.

Relates #10


[4.2] [Type checker] Prefer available declarations in AnyObject lookup.

When we perform AnyObject lookup, we can find multiple declarations with
the same signature. When we do so, we pick fairly arbitrarily among them.
However, make sure that we don’t pick an unavailable declaration when
an available declaration is… available.
Fixes rdar://problem/39115471.

@swift-ci please test and merge


enabled tests

enabled tests for xz port.

@IgorTodorovskiIBM Igor, am unable to add you as reviewer. Please review the changes. Thank you!


Drop support for PHP 7.4 & fix tests

This PR;

drops support for PHP 7.4 since it reached its end of life and is no longer supported,
allows tests to run on PHP 8.2,
fixes tests (by ensuring only one leading slash is present in a path, which was introduced in https://github.com/php-http/psr7-integration-tests/pull/54),
closes #275.

Thank you for your contribution @nbayramberdiyev


I failed to use .config/dask/dask.yaml set logger,why?

I am using dask==1.2.2,distributed==1.28.1
I wish to change my worker's logger configs,like format
I read https://docs.dask.org/en/latest/configuration.html
and change my dask.yaml to
logging:
  distributed: debug
  bokeh: critical
  tornado: critical

scheduler:
  work-stealing: True
  allowed-failures: 5

admin:
  log-format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'

but my logger level did not change, nor the format of logging message.
My guess is admin.log-format do not mean the distributed worker logger format, but I can't find a doc about the detail of the configurations
what can I do?
=========================================
I guess it's because the configuration is on scheduler's node not on worker's node, so I should pass env to worker when I instantiate the worker.
I set env,but I don't know the rule, so I use the example to guess,but still failed!
echo $ADMIN__LOG_FORMAT
%(asctime)s - %(name)s - %(levelname)s - %(message)s
echo $LOGGING__DISTRIBUTED
10

10 is logging.DEBUG
===============================
I read source code and find the logic in dask/config.py
If you set
env = {'DASK_DISTRIBUTED__ADMIN__LOG_FORMAT': '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
      'DASK__LOGGING__DISTRIBUTED': logging.DEBUG}

you will get what you want
====================================
But I still want a doc of all configurations together,rather than read the source code

Thanks for raising this issue @tarjintor

My guess is admin.log-format do not mean the distributed worker logger format

Correct, I believe if you add an additional distributed:, then the log-format will be be set for the distributed workers. I.e.
distributed:
    admin:
        log-format: '%(asctime)s - %(name)s - %(levelname)s - %(message)s'

I set env,but I don't know the rule

Specifying configuration values using environment variables is discussed in https://docs.dask.org/en/latest/configuration.html#environment-variables.

But I still want a doc of all configurations together,rather than read the source code

I totally agree with this point. There's an existing issue (#4286) with such a request.

I believe this issue is quite out of date since the config setting has changed a lot since then, and the documentation has been updated multiple times. I will close this issue, for now, if there is a need to still be more explicit in the configuration docs, we can always re-open it.


Port for iCue

it would be great if we have a port for iCue profiles, I can start work on it, what do you think?

Sure @joaopealves , just go for it, thanks! 💜


datepicker displays selected date in local time zone

When you select the date from date picker it displays in local time zone when you set the date format as "yyyy-MM-ddTHH:mm.sssZ". I can change the timezone in javascript side and send to the server but I want to maintain consistency.
Please refer the plnkr
http://plnkr.co/edit/s63f7uzvokjNI4XgiyXI?p=preview

Is this still an issue in UI Bootstrap 0.13.0? Can you reproduce this with the latest release?

@rvanbaalen Yes it is. Since JS largely lacks time zone supports I don't think this is feasible to fix. Note that angular's date filter behaves the same way.

I think this is one of the items that could get resolved if/when we move to using moment.

I don't think this is something we should fix in the library itself - local time is by far the desired behavior. If we do come to the conclusion of allowing configurability, this is something that is also better encapsulated in other issues.
Closing as a result.

Timezone would not make sense while picking a Date. Any further thoughts?


Update spring cloud and boot dependencies

Fix spring-cloud-stream-app-starters/app-starters-release#100

Merged as https://github.com/spring-cloud-stream-app-starters/core/commit/d91ac45c4b80bb7e5993f61bf5e8275dff646726


Revert unintended "col" to "column" rename

The recent RPC changes renamed the "col" parameter in the "gesture"
command to "column", which broke gestures. This reverts that change.

Heh, somehow managed to not include this one RPC in the integration tests. :| will add a commit.

@raphlinus I might've gotten a bit cute here: If you'd prefer this as a separate PR force your original commit and ping me

Adding a test is good, thanks. Dear googlebot, I confirm everybody is ok with this commit.

Nah, having a test with the change is good, I would have added it had it been on my radar. I'll just wait for travis before merging.


Validate socket if a browser support or a connection problem

After some test when the user has a long time disconnected show an error of transports, I add a validation for that (previously removed) to verify if an error about browser support or a connection problem.
error:

Coverage decreased (-0.05%) to 73.935% when pulling 343f99d4685008390f4a6a45a0757e75e3b947cd on vxcamiloxv:fix-socket-transports-validation into 3637b31c7b3159d9c5e8c02448ad87363eae9eab on pump-io:master.

Coverage decreased (-0.05%) to 73.935% when pulling 343f99d4685008390f4a6a45a0757e75e3b947cd on vxcamiloxv:fix-socket-transports-validation into 3637b31c7b3159d9c5e8c02448ad87363eae9eab on pump-io:master.

How can I contact anyone on the pump network?

@Serkan-devel  in the irc channel: https://github.com/pump-io/pump.io/wiki/Community


rename "Open at master" => "Open at main"

Technically I think this would break existing keyboard shortcuts if anyone has any set up, but It's not that hard to fix and I doubt anyone does.
Fixes #10

@j-wing can you release a new version of the plugin on the vscode marketplace? Let me know if there's anything I can do to help

@ComputerDruid  Yes, thanks for the reminder! I tried a bit ago and ran into some local auth issues, will try to get those resolved this week.

Hey @ComputerDruid  - I just published v1.5.0. VS code should auto-updated, but if you could give it a try and make sure your changes are working alright that would be great!

Yep, my work computer picked it up today and it seems to be working as expected. Thanks for making the release!


Documentation for hw6

So the task assignment does not include the documentation part. Do we have to do that? If yes, Whose role could be it?

We don't need to do it for this homework.

Task 3


Modules 2A-2F need data from old modules migrated

Draft Module Name
iDigBio Module Name

2A - Initiating a Digitization Project
Module 0: Generic Tasks Applicable to Two or More Modules

2B - Quality Control
Module 5: Quality Assurance of Data

2C - In house data cleanup
split from Module 5

2D - Community data cleanup
split from Module 5

2E - Disseminating Data: Serving data to aggregators
N/A

2F - Workflow Metadata
N/A

I migrated Module 2A, including comments.

@mandrewj Migrated some text to 2C from Module 5.

@debpaul migrated a bunch to 2B - just need 2D left to close this issue.

All data from Module 5 has been migrated. Closing issue.


it is not getting unistalled

Jenkins and plugins versions report

Environment

Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?
Windows 10
Reproduction steps
step :1 -Deleted all the credentials in slack notifier.
step:2 - In manage jenkins I have selected option plugins.
step:3 - I have selected available plugins.
step:4 - searched slack notification and uninstalled it.
Expected Results
Uninstallation of slack notifier need to be done.
Actual Results
It is showing uninstallation pending and uninstallation is not getting done.
Anything else?
No response

Restart Jenkins


⚠ Bofrost.be has degraded performance

In 5bad4ea, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1228 ms

Resolved: Bofrost.be performance has improved in 081bb1b.


Sass deprecated soon

This gem has dependency sass_rails which use sass too. Ruby Sass is deprecated and will be unmaintained as of 26 March 2019. Will you update dependency to use sassc_rails? Thank you.
http://sass.logdown.com/posts/7081811

@senny @jone
Do you have any plan to upgrade to sassc_rails?

@xinlangzi thanks for pointing out.
@siegy22 will take care of it. He us offline until next year though.

Any update on this? I'm upgrading to Rails 6. Rails 6 which moves off sass-rails by specifying this version of it:
gem "sass-rails", ">= 6"

That version of sass-rails is really just a wrapper for sassc-rails (link).

Hi! Same issue here, upgrading to Rails 6 and I got stuck when updating sass-rails.

Hi all.  Love to get this fixed.  Sort of stuck otherwise

Hi!
I've put up a patch to make this transition happen (#67). I'm not using this gem anymore, so any assistance to help test would be very much welcome. It would be great if someone could run their project with based on the branch in the PR and report back if everything behaves as it should.


ZEPPELIN-304 Intepreter.registeredInterpreted occurs failing tests wh…

…ile multiple tests runs

Added clean-up logic for Interpreter.registeredInterpreters

LGTM


Documentation improvements - suggestion for GitBook

Pre-flight checklist

[x] I have read the Contributing Guidelines on pull requests.
[x] Commit messages follow the conventional commits spec
[ ] If this is a code change: I have written unit tests.
[ ] If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Related issues/PRs

GitBook
GitBook might be a good alternative that can be used to update the visuals of the documentation.
There is a free version, but for it we have some limitations.
Only one user can be supported in the free version, for every additional user included, there is a price. More information can be found in here - https://www.gitbook.com/pricing
The Plus plan might be enough for what we are after, and depending on monthly or annual plan, the costs might be decent.
After my research, I conducted that currently there is a limit on the documentation import size -
The maximum number of pages that can be uploaded in a single import is 20.
There is a solution for that, with no limitations - https://docs.gitbook.com/integrations/git-sync
Also there is some other limitations, more info can be found here - https://docs.gitbook.com/help-and-faq/faq/content-creation-faq
If we decide to use GitBook, I have included a new script file generate-docs-markdown.js, and a new script trigger command docs:generate-markdown in package.json
Regarding the automation of the deployment of the documentation, GitHub workflow file can be added.
Below you can find an example file for the automation process.
Example:
typedoc-generate-gitbook-docs.yml
name: Deploy TypeDoc to GitBook

on:
  push:
    branches:
      - YOUR_TRIGGER_BRANCH

env:
  NODE_VERSION: 18.x
  ENTRY_FILE: "packages"
  CONFIG_PATH: "tsconfig.base.json"
  USES_PNPM: "true"

jobs:
  deploy:
    concurrency: ci-${{ github.ref }}
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    permissions:
      contents: write
    steps:
     - uses: actions/checkout@v4

     - uses: actions/setup-node@v3
        with:
          node-version: ${{ env.NODE_VERSION }}

     - name: Setup pnpm
        uses: pnpm/action-setup@v4
        with:
          version: 7

     - name: Install dependencies
        run: pnpm install --no-frozen-lockfile

     - name: Build project
        run: pnpm build

     - name: Build documentation
        run: pnpm docs:generate-markdown

     - name: Deploy to GitBook
        env:
            # GITBOOK_TOKEN, more information can be found in here - https://developer.gitbook.com/gitbook-api/authentication
          GITBOOK_TOKEN: ${{ secrets.YOUR_GITBOOK_TOKEN }}
            # GITHUB_PERSONAL_ACCESS_TOKEN more information can be found in here - https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
          GH_PAT: ${{ secrets.YOUR_GITHUB_PERSONAL_ACCESS_TOKEN }}
        run: |
          git clone --branch=YOUR_DOCUMENTATION_BRANCH https://YOUR_GITBOOK_REPOSITORY.git book
          rsync -av --delete markdown-docs/ book/markdown-docs/
          cd book
          git config user.name "GitHub Actions"
          git config user.email<EMAIL_ADDRESS>          git add markdown-docs/
          git commit -m "Update documentation [skip ci]"
          git push https://YOUR_GITBOOK_REPOSITORY.git YOUR_DOCUMENTATION_BRANCH

Notes:
We could use this library - https://github.com/ZanderZhao/gitbook-action for the last part Deploy to GitBook, but something to take in mind is that it will replace the old documentation content in gh-pages branch. https://github.com/ZanderZhao/gitbook-action?tab=readme-ov-file#step3-choose-options

Replace YOUR_GITBOOK_REPOSITORY with the actual GitBook repository URL.
The YOUR_GITBOOK_TOKEN secret should be added to your GitHub repository settings. This token allows the GitHub Actions workflow to push changes to your GitBook repository.
YOUR_DOCUMENTATION_BRANCH should be the branch which will be connected to the GitBook - GitHub Sync
YOUR_TRIGGER_BRANCH  should be the branch from which the GitHub Workflow will be triggered.
YOUR_GITHUB_PERSONAL_ACCESS_TOKEN secret should be added to your GitHub repository settings. This token allows the GitHub Actions workflow to push changes to the GitHub repository.

This setup will automatically build and deploy TypeDoc documentation to GitBook whenever there is a push to the suggested branch.
The end documentation can look something like this: - https://limechain.gitbook.io/limechain-test

@gtsonevv I love the improved look, but it looks a bit complex to me. I must say that I got used to automated docs.rs service that just my Rust crate and makes the docs out of it with zero configuration. I believe that the improved look will contribute to the adoption and I hope that we will be able to flesh out the docs with more examples and relevant information / references. What would be the best way forward? Will the free plan work for us, or should I register a paid plan?

@gtsonevv Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Weekly streak is on the road, smart strategy! Secure your streak with another PR!

Current status: waiting for scoring
We're waiting for maintainer to score this pull request with @race-of-sloths score [0,1,2,3,5,8,13] command. Alternatively, autoscoring [1,2] will be applied for this pull request
What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow
For contributors:

Tag @race-of-sloths inside your pull requests
Wait for the maintainer to review and score your pull request
Check out your position in the Leaderboard
Keep weekly and monthly streaks to reach higher positions
Boast your contributions with a dynamic picture of your Profile

For maintainers:

Score pull requests that participate in the Race of Sloths
Engage contributors with fair scoring and fast responses so they keep their streaks
Promote the Race to the point where the Race starts promoting you
Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands

For contributors

Include a PR: @race-of-sloths include to enter the Race with your PR

For maintainers:

Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called


sweepall support for unconfirmed_balance

I am not sure if lncli sendcoins --sweepall support also unconfirmed_balance (by CPFP?), if it does, can you please add it to the documentation; if it does not, can you please add this option?
Thanks

Setting --min_confs will allow you to sweep unconfirmed outputs. We should indeed mention this explicitly in the help for the command since not all --min_confs flags of other commands actually support this yet.


Clean linting for graylog returners

this seems to have failed pr-merge testing ... Looks like it maybe didn't pick up the new change to list(set(dict())) dedup (maybe).


Document what gets synchronized to the git repo by flux

Reading the documentation it is not at all clear to me what gets automatically synchronized to the git repo by flux. The sentence here https://github.com/weaveworks/flux/blob/master/site/faq.md#why-does-flux-need-a-deploy-key "Flux needs a deploy key to be allowed to push to the version control system in order to read and update the manifests", seems to suggest to me that only the manifests which are in the git repo will be updated, and other manifests will not. I presume that means that if I upload secrets to the cluster using kubectl then they won't end up automatically synced to my git repo by flux, but that's not actually stated and this lack of clairity makes me quite nervous.

To calm your nerves: Flux will not create new manifests for resources in your git repository, it will only update resources already in git to reflect cluster state.

it will only update resources already in git to reflect cluster state.

Not even that; it will only update manifests in git, when you tell it to, then apply them to the cluster.

How does that work? I've created a placeholder PR which I'll update until we come to the heart of the matter https://github.com/weaveworks/flux/pull/1444

@timthelion see my updated answer, I was a bit too quick with the shiny green button.

Thanks for opening a PR, @timthelion -- it's certainly worth clearing up what gets synced with what. I've commented in the PR, on the direction of synchronisation. Let us know here or there if we can shine more light on the matter ..


Refactor NNI manager globals (step 1) - argparse

Description
Refactor NNI manager's argparse with de facto standard library yargs.
Changed args and options:

start_mode -> action because "mode" has too many meanings in NNI manager.

new -> create because the command is called "nnictl experiment create".
resume + readonly -> view because the command is called "nnictl view". (Why it's not "nnictl experiment view"? 🤔)

log_dir -> experiments-directorey because it is not log dir at all.

In config file it is called experimentWorkingDirectory but... it was a mistake. I thought it was ~/nni-experiments/<ID> but no, it is just ~/nni-experiments.

Checklist

[x] test case
[x] doc

How to test
Test together with following up PRs.

Description
Refactor NNI manager's argparse with de facto standard library yargs.
Changed args and options:

start_mode -> action because "mode" has too many meanings in NNI manager.

new -> create because the command is called "nnictl experiment create".
resume + readonly -> view because the command is called "nnictl view". (Why it's not "nnictl experiment view"? 🤔)

log_dir -> experiments-directorey because it is not log dir at all.

In config file it is called experimentWorkingDirectory but... it was a mistake. I thought it was ~/nni-experiments/<ID> but no, it is just ~/nni-experiments.

Checklist

[x]  test case
[x]  doc

How to test
Test together with following up PRs.

the command is nnictl create and we don't have nnictl experiment create 😂
maybe experimentsWorkingDirectory?

the command is nnictl create and we don't have nnictl experiment create 😂 maybe experimentsWorkingDirectory?

Ooops, seems there was a bug in my mind.
experimentsWorkingDirectory sounds better. I will update.

There is a conflict, pls fix it


Interface for RPNGDescription -> Plaquette

Is your feature request related to a problem? Please describe.
We are in the process of replacing most of the Template + Plaquette code by RPNGTemplate that includes nearly all the information provided by Template + Plaquette.
The only missing piece of information is the ability to get a Plaquette instance from a RPNGDescription. With that missing piece, a RPNGTemplate could directly implement a to_circ method.
Describe the solution you'd like
An easy to use and easy to understand interface that takes as input an RPNGDescription and outputs a Plaquette instance implementing that RPNGDescription.
The interface should also have a default implementation that simply returns exactly the circuit represented by the input RPNGDescription.
Supplementary notes
Note that this should be implemented as a public interface to allow people with unusual requirements (potentially imposed by their hardware, e.g., dynamical decoupling with measurements) to have full freedom to implement the plaquettes how they want. In practice, it will be an interface for power-users and should be rarely (or never?) used by users that only want to perform stim simulations.

Note that the prototype for the default implementation already exists as RPNGDescription.get_plaquette().


Make blog design and main page more visually integrated?

I was wondering if we shouldn't work a little bit our blog design so that it has some common visual elements?
For instance, I had in mind making the top of the scikit-learn blog similar to the main page:

vs

This is jekyll + web design work that does not require specific scikit-learn / datascience expertise. Probably something that we can ask help with.
What do people think?

Since this is built using the Minimal Mistakes theme, the header bar can only be customized to a certain degree. We could try using a different theme or we might be able to add custom HTML/CSS to add a header element but that would require additional setup.

@GaelVaroquaux We could update the header links to mimic the main website, but I'm not sure we could completely duplicate the design.

We could update the header links to mimic the main website, but I'm not sure we could completely duplicate the design.

Sure! My suggestion was just to move a bit more towards to the main website. It's always a question of hitting the right tradeoff in terms of return over investment.
Also, this is typically something where I would do a call for volunteer rather than burden the comms team, because it is work that can well be delegated (as opposed to work that requires inside knowledge of editorial choices)

@GaelVaroquaux Update the menu: https://scikit-learn.org/blog/

I would also agree with @reshama here. We should be in general more open towards developing new UI especially when we start from scratch. To me it would be completely fine to have a very different UI/UX experience on the blog, and we may take some components back to the website.
We're very conservative about changes on the website, I think we should let the blog be a bit more free from those constraints.

In that case, I have a couple of questions about everyone's preference for the menus.

Are there any pages that you absolutely want to be linked and are there any pages that we feel okay about leaving off?
Do we prefer the nav menu to be left- or right-centered? (search will always remain on the far right)

_
This is my current planned layout:

Nav Bar (top/header menu)

scikit-learn.org, Calendar, (anything else?)

Sidebar

ARCHIVES

Category, Tag, Year

SCIKIT-LEARN

About Us
Mailing List Archive (could also go under ARCHIVES, unless we think it would be confusing)
Code of Conduct


Add hindent fixer

As #2206 seems dead, I've reopened this issue and added a test.

If you can fix the conflict here and fix the sorting issue CI mentions, I'll merge this.

@AlexeiDrake thanks for taking over this one - i have to admit i totally forgot about it and didn't have it on my radar anymore!

Merged fix the commandline. Cheers! :beers:


404 when starting a container

Running a container build from the following Dockerfile:
            FROM alpine
            RUN echo \$RANDOM >> /tmp/test.txt
            CMD cat /tmp/test.txt && echo "DONE" && sleep 28800

I get 404 from when calling container.start. When I look at the pods inside k8s, everything looks good, so I think this is a bug inside kubedock.
In the logs I get the following, but not sure if it is a red herring:
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 204

I am going to try and figure out a small runnable example to demonstrate this.

I can't get a reliable reproducible example so far, but when this fails the logs look like this:
I0302 12:45:11.323301     279 util.go:77] Request Headers: http.Header{"Accept":[]string{"application/json"}, "Accept-Encoding":[]string{"gzip, x-gzip, deflate"}, "Connection":[]string{"keep-alive"}, "Content-Length":[]string{"1968"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"Apache-HttpClient/5.0.3 (Java/11.0.8)"}}
I0302 12:45:11.323332     279 util.go:78] Request Body: {"name":null,"authConfig":null,"platform":null,"Hostname":null,"Domainname":null,"User":null,"AttachStdin":null,"AttachStdout":null,"AttachStderr":null,"PortSpecs":null,"Tty":null,"OpenStdin":null,"StdinOnce":null,"Env":[],"Cmd":[],"Healthcheck":null,"ArgsEscaped":null,"Entrypoint":null,"Image":"********************************************/buildsrc-functional-tests:snapshot-1be97a70dbf46c604c97-test-cache-2","Volumes":{},"WorkingDir":null,"MacAddress":null,"OnBuild":null,"NetworkDisabled":null,"ExposedPorts":{},"StopSignal":null,"StopTimeout":null,"HostConfig":{"Binds":[],"BlkioWeight":null,"BlkioWeightDevice":null,"BlkioDeviceReadBps":null,"BlkioDeviceWriteBps":null,"BlkioDeviceReadIOps":null,"BlkioDeviceWriteIOps":null,"MemorySwappiness":null,"NanoCpus":null,"CapAdd":null,"CapDrop":null,"ContainerIDFile":null,"CpuPeriod":null,"CpuRealtimePeriod":null,"CpuRealtimeRuntime":null,"CpuShares":null,"CpuQuota":null,"CpusetCpus":null,"CpusetMems":null,"Devices":null,"DeviceCgroupRules":null,"DeviceRequests":null,"DiskQuota":null,"Dns":null,"DnsOptions":null,"DnsSearch":null,"ExtraHosts":[],"GroupAdd":null,"IpcMode":null,"Cgroup":null,"Links":[],"LogConfig":null,"LxcConf":null,"Memory":null,"MemorySwap":null,"MemoryReservation":null,"KernelMemory":null,"NetworkMode":null,"OomKillDisable":null,"Init":null,"AutoRemove":null,"OomScoreAdj":null,"PortBindings":{},"Privileged":null,"PublishAllPorts":null,"ReadonlyRootfs":null,"RestartPolicy":null,"Ulimits":null,"CpuCount":null,"CpuPercent":null,"IOMaximumIOps":null,"IOMaximumBandwidth":null,"VolumesFrom":[],"Mounts":null,"PidMode":null,"Isolation":null,"SecurityOpt":null,"StorageOpt":null,"CgroupParent":null,"VolumeDriver":null,"ShmSize":null,"PidsLimit":null,"Runtime":null,"Tmpfs":null,"UTSMode":null,"UsernsMode":null,"Sysctls":null,"ConsoleSize":null},"Labels":{"org.testcontainers":"true","org.testcontainers.sessionId":"eb8b57c2-d565-436b-9b6d-d27b2bba68e9"},"Shell":null,"NetworkingConfig":null}
I0302 12:45:11.323457     279 util.go:101] Response Body: {"Id":"dfd5522dc93fd9df86dc09e478b1215b8d8cc5835f0a2495f02f24392cacf964"}
[GIN] 2022/03/02 - 12:45:11 | 201 |     190.096µs |       <IP_ADDRESS> | POST     "/containers/create"
I0302 12:45:11.324698     279 util.go:77] Request Headers: http.Header{"Accept":[]string{"application/json"}, "Accept-Encoding":[]string{"gzip, x-gzip, deflate"}, "Connection":[]string{"keep-alive"}, "Content-Type":[]string{"application/json"}, "User-Agent":[]string{"Apache-HttpClient/5.0.3 (Java/11.0.8)"}}
I0302 12:45:11.324727     279 util.go:78] Request Body:
W0302 12:45:11.324748     279 container.go:161] user not set, will run as user defined in image
I0302 12:45:11.373990     279 main.go:68] finished cleaning lingering objects...
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 204
I0302 12:45:14.819066     279 util.go:101] Response Body:
[GIN] 2022/03/02 - 12:45:14 | 204 |  3.494384342s |       <IP_ADDRESS> | POST     "/containers/dfd5522dc93fd9df86dc09e478b1215b8d8cc5835f0a2495f02f24392cacf964/start"

But testcontainers fails with:
Could not start container

    com.github.dockerjava.api.exception.NotFoundException: Status 404

which makes me thing that despite what the log says, POST     "/containers/dfd5522dc93fd9df86dc09e478b1215b8d8cc5835f0a2495f02f24392cacf964/start returned 404

At the point we get to this line
c.Writer.Written() is true and c.Writer.Status() is 404. Not sure what sets them though.

Not sure either, maybe it's the verbosity flag?

Is this still an issue? The orchestration of containers has been changed in 0.11.0, including the handling of completed containers and checking if a container was started succesfully.

I don't know. Our use case for using kubedock was removed some time ago.
Given that there is little to go on from my original bug report, probably not worth keeping this open

I have seen a similar issue with a project using go testcontainers. There, I was running into this error in 1 in 3 runs.
What I also see in the logs is:
 [GIN-debug] [WARNING] Headers were already written. Wanted to override status code 404 with 204

After a lot of troubleshooting I found that this is being caused by the last line ContainerStart in internal/server/routes/common/containers.go.
Then I did some more investigation by removing middleware in main.go (internal/server/main.go). It now looks as follows:
        router := gin.New()
	//router.Use(httputil.VersionAliasMiddleware(router))
	//router.Use(gin.Logger())
	//router.Use(LoggerMiddleware())
	//router.Use(httputil.RequestLoggerMiddleware())
	//router.Use(httputil.ResponseLoggerMiddleware())
	//router.Use(gin.Recovery())

Disabling this middleware went without issue except for the first one which has the task of filtering out the version tag (e.g. /v1.25) at the start of the URL path.  To make this work, I included the version in the route as follows:
        version := "/:version"
	router.POST(version+"/containers/create", wrap(docker.ContainerCreate))

And of course made similar changes for the other routes.
Now my tests are almost 100% stable with only 3-4 out of a 100 runs failing but for a different reason, which I believe to be a character encoding issue for kubectl logs which has to be put in a docker json response. The message I am getting there is 'invalid character' so I consider that to be a totally different issue.
It beats me why the VersionAliasMiddleware is having this effect. I looked at the code there and could not see anything wrong with it. Given that it is non-deterministic it could even be a bug in gin with some sort of subtle concurrency issue.  This middleware  is rewriting the URL then triggering a complete reevaluation of the whole request.
Anyway, I think it is a good idea to modify the code in this way to include the version in the router path. That way the magic of VersionALiasMiddleware is no longer needed and the code is more along the 'golden path' of gin.
If changing the code in this way is an accepted solution, I will file a pull request for this one.

I now think it was a different issue after all. I filed #106 which was most likely the problem I was seeing. After I fixed that and rolled back the above change. the problem did not reoccur (1000 repetitions of the same test).


Add basic info on how to run nimona

Closes #155
Still needs some info on usage but should be better than nothing.

Pull Request Test Coverage Report for Build 427

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.1%) to 35.882%

Totals

Change from base Build 421:
0.1%

Covered Lines:
732

Relevant Lines:
2040

💛  - Coveralls


if fail need header message

The headers are accessible on exception objects as e.http_headers or e.response.headers.


Interface being overridden

Bug Report

🔎 Search Terms
Interface override , interface not getting the actual types
🕗 Version & Regression Information

This changed between versions 4.0.5 and  4.9.4.

⏯ Playground Link

Playground link with relevant code
💻 Code

interface ITypes {
  name: string;
  address: string;
}
const query = {
  min: 4,
  max: 0,
};
const obj: ITypes = {
  name: 'anish',
  address: '0123asdfj',
  ...(query.min == undefined ? {} :{min:query.min}) // it should check types
};

🙁 Actual behavior
{
"name": "anish",
"address": "0123asdfj",
"min": 4
}
🙂 Expected behavior
{
"name": "anish",
"address": "0123asdfj",
"min": 4 // it should throw error min is not defined in ITypes
}

Almost positive it’s a known limitation that excess property checks (which FWIW you shouldn’t rely on as a type check, it only applies to directly-assigned object literals - see #12936) don’t work with spread.


Check randomness of random nonce

Check if we get the same nonce twice with a high probability / when restarting the app / when sending too fast.
Check how the random generator is initialised.

The clientlib tries to use cryptographic secure numbers and print a warning if that is not possible.
if not using cryptographic secure numbers it uses math.random() which is I guess the best we can do.
So the thing left to check is if the range of 0 to 10*19 ~ 63 bit is enough.

With the approximation of the birthday problem (see https://en.wikipedia.org/wiki/Birthday_problem#The_generalized_birthday_problem)
p(n) = n**2/(2m)

The probability for a person sending 10 years a transaction every second (10*365*24*60*60)
Is then 0.4% when using 10*19. This is fine for normal usage, but we should increase the number if blockchain scale and people send a lot of transfers.
With 10**15 for payment request p(n) is already 50% so we should also increase it to 10**19 there.

Done.


[BUG] Envoy Does Not Respect ENVOY_LOG_LEVEL Setting from Service Connect Agent in AWS App Mesh

Summary

In the AWS App Mesh scenario, the Service Connect Agent is utilized to generate static bootstrap configurations for Envoy proxies. Despite this setup, there is an observed issue where Envoy logs do not respect the ENVOY_LOG_LEVEL setting specified by the Service Connect Agent. This behavior is unexpected.
Description

When setting the ENVOY_LOG_LEVEL to off via the Service Connect Agent, Envoy sidecar containers continue to output logs at the info level. Despite correctly setting this environment variable here, it appears that Envoy is not respecting the specified log level.

Expected Behavior
Envoy should not produce any logs when ENVOY_LOG_LEVEL is set to off, as per the configuration defined by the Service Connect Agent.
Observed Behavior
Envoy continues to output logs at the info level, disregarding the ENVOY_LOG_LEVEL set to off. More detailed in this ticket
Environment Details

https://github.com/aws/aws-app-mesh-roadmap/issues/492


fix cve

Signed-off-by: yuswift<EMAIL_ADDRESS>

/cc @RolandMa1986

fix https://github.com/kubesphere/kubesphere/issues/3740#issuecomment-820956516

/cc @zryfish


optimized version lists

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:

@gaoyan1998 删除的 icon 用红的


[views] Error when inserting new records in junction tables.

PGSync version: master
Postgres version: 14
Elasticsearch version: 7+
Redis version: latest
Python version: 3.7
Problem Description:
Hi,
I'm trying to sync a materialized view in postgres to ES.
Followed the comments in this issue. And was able to get the initial sync.
But when linking books to new categories, I'm getting an error (I've pasted the entire trace block below)
Here's the screenshot of schema :

Queries to create sample data :
create table book (
	id int primary key,
	name varchar(40)
);

create table book_category (
	book_id int,
	category_id int
);
alter table book_category add constraint fk_book_id foreign key(book_id) references book(id);
alter table book_category add constraint fk_cat_id foreign key(category_id) references cat(id);

create table cat (
	id int primary key,
	value varchar(40)
)

-- create some books.
insert into book(id, name) values(1,'book-1');
insert into book(id, name) values(2, 'book-2');
insert into book(id, name) values(3, 'book-3');

-- create some categories.
insert into cat(id, value) values(1, 'adventure');
insert into cat(id, value) values(2, 'action');
insert into cat(id, value) values(3, 'sci-fi');

-- create relation between book and categories.
insert into book_category (book_id, category_id) values (1, 1);
insert into book_category (book_id, category_id) values (1, 2);
insert into book_category (book_id, category_id) values (2, 1);

-- create a materialized view of this (book + category).
create materialized view mvw_books as (
	with get_categories as (
		select
			b.id, b."name",
			array_agg(c.id) as category
			from book b
			left join book_category bc
			on b.id=bc.book_id
			left join cat c on c.id=bc.category_id
			group by b.id, b."name"
	)
	select * from get_categories
);

select * from mvw_books;

-- This is the update part, that generates error.
insert into book_category (book_id, category_id) values (3, 1);

Schema :
[
    {
        "database": "postgres",
        "index": "book_data",
        "nodes": {
            "table": "mvw_books",
            "base_tables": ["book", "book_category", "cat"],
            "columns": [
                "id",
                "name",
                "category"
            ],
            "primary_key": ["id"]
        }
    }
]

Error Message (if any):
2022-06-15 09:29:02.229:ERROR:pgsync.sync: Primary keys ['id'] not subset of payload data dict_keys(['book_id', 'category_id']) for table public.mvw_books
NoneType: None
2022-06-15 09:29:02.326:ERROR:pgsync.elastichelper: Exception No active exception to reraise
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pgsync/elastichelper.py", line 142, in bulk
    raise_on_error=raise_on_error,
  File "/usr/local/lib/python3.7/site-packages/pgsync/elastichelper.py", line 197, in _bulk
    ignore_status=ignore_status,
  File "/usr/local/lib/python3.7/site-packages/elasticsearch/helpers/actions.py", line 484, in parallel_bulk
    actions, chunk_size, max_chunk_bytes, client.transport.serializer
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 748, in next
    raise value
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 140, in _helper_reraises_exception
    raise ex
  File "/usr/local/lib/python3.7/multiprocessing/pool.py", line 292, in _guarded_task_generation
    for i, x in enumerate(iterable):
  File "/usr/local/lib/python3.7/site-packages/elasticsearch/helpers/actions.py", line 155, in _chunk_actions
    for action, data in actions:
  File "/usr/local/lib/python3.7/site-packages/pgsync/sync.py", line 791, in _payloads
    raise
RuntimeError: No active exception to reraise
Exception in poll_redis() for thread Thread-16: No active exception to reraise

I tried by adding book_id and category_id, but it gave a different error. I think my schema.json file is wrong, but don't know what can be done to fix it.

Hi @toluaina ,
Is there any documentation for views ?

I'm afraid I don't have much documentation on views yet. Can  you try with 2 tables?
Otherwise I will take a look at this shortly.

@toluaina I tried by changing a column name in book_category table from book_id toid.
The same update query worked fine, whereas it was giving that error before.
insert query -> insert into book_category (book_id, category_id) values (3, 1);
So I'm guessing (can't say for sure), that pgsync is expecting the primary_key list to be same across all the base tables. Since changing the book_id to id worked.

Hi @toluaina ,
Thanks for helping me out.... will test it out ASAP.

Hi @toluaina ,
It works after adding an auto increment PK in book_category. Closing this issue.
Thanks :)


Update text on cookies page

Update text and html structure on cookies page.
Trello https://trello.com/c/58UFlEm9/255-change-text-on-cookies-page

Sorry, I made a mistake in my draft.
We use Google Analytics software to collect anonymised information about how you use GovWifi.
Should be -
We use Google Analytics software to collect anonymised information about how you use the service.
Otherwise looks good to me - thanks.

Sorry, I made a mistake in my draft.
We use Google Analytics software to collect anonymised information about how you use GovWifi.
Should be -
We use Google Analytics software to collect anonymised information about how you use the service.
Otherwise looks good to me - thanks.

Thanks @StephenGill - no worries - have updated.


treewide: change window manager style guide

This makes the most sense to me, I feel like blue is the "most default" accent color. As for groups, the active and inactive colors should be the same, since they are still windows, while the locked active color is a slightly modified active color (at least in catppuccin, it's teal instead of blue).

Please check this thoroughly, I'm the least sure about bspwm

(Only reworded the commit)


Fix filter fallback doesn't work issue

When the GET request doesn't include the name of filter, it should call fallback function if it exists.

A new inspection was created.

The inspection completed: 1 updated code elements

Hello here @hirakujira :+1:
Once again, thank you very much for your contribution.
Indeed, fallbackLogic would never be applied if it should be applied when the filter name is not on the GET request.
This must have slipped when we refactored to use classes for filters, fields, colums etc.
I think we can remove the code from lines 119 to 122, because fallback would only be applicable inside the conditional check for the parameter (where you added it).
Can you update the PR with this change so after review and merging you will show up as a contributor ? If you don't have time for it, me or @tabacitu can do it, just let us know.
Wish you the best,
Pedro

A new inspection was created.

OK I pushed the code with your suggestions. Thanks!

The inspection completed: No new issues

Great! Merged, will be available in today's patch update.


takeLast added.

Oh ok. I too my inspiration from append. Feel free to close this as I work out the other solution.

I see, append already doesn't follow this convention. Nevermind, I think this is good to go.
Thanks @mfirry!


Retain conref and keyref information after preprocessing

Add namespaced attributes to retain conref and keyref source information. This will allow advanced users to create e.g. review PDFs which show the source of each block.
The feature should be controlled by dynamic configuration; by default the feature should be disabled.

I DO agree Jarno's opinion. When DITA users uses conref/conkeyref more frequently, they needs the original source information for reviewing process. I've requested this capability from user and modified to retain them by modifying DitaWriter.java in DITA-OT 1.7.5. If this capability is implemented, it is strongly appreciated. Are there any possibilities to implement this?

We already retain @keyref today in the temp file (it's still there after the attribute is resolved). We do not retain @conref or @conkeyref.


Need help with the infrastructure regarding interconnection

Hi, Dolu.
I'm looking for the infrastructure of naxriscv regarding interconnection but can't find any on "https://spinalhdl.github.io/NaxRiscv-Rtd/main/NaxRiscv/introduction/index.html". Could you tell me how multiple cpus, l1 cache, l2 cache, main memory, IOs are connected to each other? For example, what protocal do they use, is it tilelink or Axi4? Are both l1 and l2 cache coherent? And any other information regarding interconnection would help.
Thank you!

Hi @phillippZZ
As far as I know, there are 2 architectures, 1 for simulation with SocDemo.scala, 1 for fpga emulation that connect to Litex in NaxSoc.scala.
The 2 architectures are almost similar, but there are some bridges in NaxSoc to connect to Litex, as it uses AXI.
SocDemo architecture

NaxSoc architecture

L1 and L2 are coherent, that's why they use Tilelink Coherent bus to communicate.
Tilelink-C is only present between L1 and L2. Between Fetch cache and L2, there is a simple Tilelink bus.

@atkarim Wow!!!
That's a lot of work and thank you so much!
@Dolu1990 @atkarim BTW, is it possobile that I add some kind of bridge provided by litex or naxriscv so that an IP which uses AXI can be itegrated and impact the cache or memory. My friend has such an IP and sorry I don't know the details yet.
All I know is that it's based on an algorithm that could improve the speed of reading from cache/memory with multiple cores.

The Nax SoC for litex does this already i think :
   val dma = c.withDma generate new Area {
     val bus = slave(
       Axi4(
         Axi4Config(
           addressWidth = 32,
           dataWidth = mainDataWidth,
           idWidth = 4
         )
       )
     )

     val bridge = new Axi4ToTilelinkFiber(64, 4)
     bridge.up load bus.pipelined(ar = StreamPipe.HALF, aw = StreamPipe.HALF, w = StreamPipe.FULL, b = StreamPipe.HALF, r = StreamPipe.FULL)
     bridge.down.setDownConnection(a = StreamPipe.FULL)
     memFilter.up << bridge.down

     //As litex reset will release before our one, we need to ensure that we don't eat a transaction
     Fiber build {
       bridge.read.get
       bridge.write.get
       when(ClockDomain.current.isResetActive){
         bus.ar.ready := False
         bus.aw.ready := False
         bus.w.ready := False
       }
     }
   }

That dma bus will be coherent with all caches

If you want to get good perforance on that AXI to tilelink bridge :

Do not sent request which use the same AXI ID than another request which is still inflight
Avoid AXI burst that are more than 64 bytes
Avoid if possible splitting memory bursts into less than 64 bytes

64 byte for everything is you can ^^


[10.x] Implement "max" validation rule for passwords

Adds a max length validation rule for the Password rule object for consistency with the min length rule.
This would come into action when defining a default password rule.
Password::min(8)->rules('max:32');
vs.
Password::min(8)->max(32);

This makes sense to me to me.
brcrypt has a maximum length of 72 characters it takes into account and it silently discards characters after that, so setting a max length is probably a generally good idea.
e.g.
$password = str_repeat('a', 71);

$hash = Hash::make($password);

dump(Hash::check($password.'z', $hash));
// false

$password = str_repeat('a', 72);

$hash = Hash::make($password);

dump(Hash::check($password.'z', $hash));
// true

💭 It might even be good for the framework's default rules to take the algorithm into account and add a max by default (not in this PR)?

OWASP suggests enforcing a max pw length, so adding this rule and making it a default makes sense to me.
https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#input-limits-of-bcrypt

bcrypt has a maximum length input length of 72 bytes for most implementations, so you should enforce a maximum password length of 72 bytes (or less if the bcrypt implementation in use has smaller limits).

I am also for adding the max default 72 in Laravel 11. (Another PR of course)

Agree, enforcing the max length rule by default is a good idea.
After this PR got merged, I'm going to create a new PR that introduces the default max length of 72 chars in laravel 11.

I am also for adding the max default 72 in Laravel 11. (Another PR of course)

@Jubeki Is this new method going to work for that purpose? It uses mb_strlen() when I think it should use strlen():
> $strmb = str_repeat('∆', 24); // 72 bytes
= "∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆"

> strlen($strmb);
= 72

> mb_strlen($strmb);
= 24

> $hash = Hash::make($strmb1);
= "$2y$12$PI8pvzqWR0sESH0VLbJLxeCVSVfDPckIFszfsnA7Q/QuCsgDCOzU6"

> Hash::check($strmb, $hash);
= true

> Hash::check($strmb . '∆∆∆', $hash); // 81 bytes
= true

Is using mb_str() here going to cause problems with passwords that contain multi-byte strings?
> $strmb = str_repeat('∆', 24); // 72 bytes
= "∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆"

> mb_strlen($strmb); // *characters* in string
= 24

> strlen($strmb); // *bytes* in string
= 72

the error message doesn't show the max length:
The password field must not be greater than :max characters.
but when I use rules('max:5') it comes correctly :
The password field must not be greater than 5characters.


Provide automated deployment of Azure resources used in end-to-end tests

Provide automated deployment of Azure resources used in end-to-end tests with Bicep so that things are automated and I'm not the bottleneck (or at least less).
This is because our Azure subscription is not accessible to everyone and should be just a PR away.

For Promitor I have an azure infrastructure repo to which contributors can PR new resources required for automated testing and is automatically deployed with GitHub Actions.

Is for all infra including AKS or only for resources like EventHub, ServiceBus, etc?

That's up to us to decide

My only concert is the time to create/delete and AKS cluster, if we need to do it, we will make test even longer

I'd start with upstreams

and maybe we should take a look to crossplane, it could give us more flexibility and we can use it for more cloud providers

sadly, they don't support queues and other resources we need for the moment 😢

This would not run every test run; only when there are changes to the infrastructure definition

aaaah, your idea is having the infra there all the time, and update it on the fly only when needed. I thought you meant deploying/destroying it during the tests

Yes, correct.
Doing the latter is more intensive and harder to get right. I think we can avoid that as we don't have the capacity for it.

Bicep works fine but if you want to use this cross cloud then Terraform is OK.
If it's just Azure, just use Bicep IMO.
I'd introduce kedacore/testing-infrastructure for this.

I have expertise with terraform, so I can create the scaffolding and the initial infrastructure, that's not a problem.
I'm thinking in what infra we have, and IDK if we need to cover AWS now because we create the infra during the e2e test and we delete them after it, so maybe we can go with biceps, but GCP has infra I need to review to check if we should cover it.
I said terraform because it's a single language to manage all the infra, so it's easier for people who doesn't know cloud provider specific language. There is also a bot for terraform that we could use to improve the experience, giving the plan outputs and other stuff https://github.com/runatlantis/atlantis

Let's use Terraform in that case, we don't want to do a migration later on

I have checked and we can update the secrets by Secrets API, so we can get the terraform outputs and update the secrets directly in the org so they can be automatically managed, on every terraform executions, secrets.
OFC this is a draft, we need to go deeper, but it's promising and could improve new infra creation

The problem here is that secrets should be taken from somewhere in order to put them as secrets. If we go to the cloud provider and take from there, we still need access to Azure Subscription, so the blocker should be there.
I won't publish secrets as output in github, so the options are, push them somewhere like a vault all of us we can access or push them directly to GH or any vault and pull them from there in the workflow.
I have checked and there is a azure key vault integration for GH Actions, so we could put all the secrets from terraform directly in the vault and get them in the workload, but for that I prefer to use GH Secrets

BTW, We can name them as TF_CURRENT_ENV_NAME to know which of them are self generated and which manually generated. Once we have all of them working, we can just modify the secret we use in the workflows to don't touch current secrets

FYI - opened a ticket with CNCF for access (owner) to an Azure Subscription so we could run these kind of automated workloads where we want. My thinking is we could start small (just spinning up Azure Event Hubs / E2E tests) and start to move more of the workloads over time as we want https://cncfservicedesk.atlassian.net/servicedesk/customer/portal/1/CNCFSD-1422

you are right. for the moment, I'll start creating the scaffolding with a simple resource but with all the elements ready (terraform code/modules with a backend, secret management, docs, etc) and then we can move the services one by one.
To start I have my MVP subscription and once the scaffolding is ready, we can change the SP and use other account for this (MSFT or CNCF account, not to worry).

@jeffhollan I can already tell you that they will not be able to help you :) I already looked in to this.
Please don't introduce yet-another subscription @JorTurFer and just use the existing one :)

Okey,
I said only during the scaffolding, once the things are working I wanted to swap from mine to current (because I have access to the UI to check how it's going and in case of the necessity of deleting something)

I'm naively going through the motions to see where this ends https://github.com/cncf/credits/issues/23

I have one question here, are we going to make public the infra repo or it'll be only internal?
I ask because I'm working on it and depending on this, we need to think the CI checks for PRs (terraform checks requires secrets and PRs from forks can't access to secrets directly)

Yes, it should be public so that every contributor can open a PR imo

I think this is already done as we have moved the infrastructure management to https://github.com/kedacore/testing-infrastructure and it's already public, so any contributor can just open a PR there to create needed resources on Azure but also AWS and GCP (GCP is still in progress)

Job well done, thanks! 🎉
Can we add this new addition to the contribution guide please?

The e2e readme in keda has a section about e2e infrastructure, and that repo has a readme with a brief description

I have created an issue in test-tools repo to add documentation there because we don't have any guide or help

Thanks a ton! I've noticed that contribution guide has link to test folder as well so we're good to go; thanks!


chore: add code highlighting option to docs

fixes https://github.com/shuding/nextra/issues/1400

This option should be set in next.config and not in theme.config, can you move it to this page? https://nextra.site/docs/guide/syntax-highlighting 🙈

🙈 my bad. Have moved it. Thanks 👍🏻

Thanks!


Font differ with font from google

Hello,
I add this package into my project instead fonts from google
But height of letters little differ. (see red arrows on screenshot).
Left - roboto-fontface
include into project with:
@import url("../../node_modules/roboto-fontface/css/roboto/roboto-fontface.css");

Right - fonts from google
include into project with:
@import url(http://fonts.googleapis.com/css?family=Roboto:100,100italic,200,300,300italic,400,400italic,500,500italic,700,700italic,900italic,900);

any ideas?

Probably not the last release from Google.


Compatibility fix for Starcounter 2.2 and 2.3

This app was done for Starcounter 2.1 and had multiple problems in the current version. The following Pull Request attempts to fix all the problems that I have encountered.
Changes are explained in more details in the commit messages.
To test this, you need Website (compatibility-fix), Content (compatibility-fix), SignIn (develop), UserProfile (master)
@miyconst could you pls review?

Looks good to me. Don't have time to check whether it works, but I believe it does.

I have commited few more fixes. I have big aspirations for this app, because within a month #12 should happen.
Before this PR is submitted for a final review, I will do the following things:

[ ] Explain in README.md the features of the Website CMS

Including how to use the "default template" mode

[ ] Submit a sample "default template"
[ ] Move the sample configuration to a separate app

I think this PR is ready for a final review.
If anyone needs starting instructions, they are in README.md in this branch.
cc @miyconst, @diliger

@diliger can you please do a final review and do the sample apps routine explained in the https://github.com/StarcounterPrefabs/Website/blob/compatibility-fix/README.md file.
Then we can merge this PR and do any following work as new branches from develop.

Great, merging to develop. Thanks @miyconst and @diliger!


iOS building error

Hi, when trying to build the app on android, it runs perfectly.
But when trying to build same on iOS, it returns error while linking. I've updated my Xcode to 7.2, I've also disabled bitcode, and my Cordova version is 5.3.1.
I tried remove the push plugin and the app runs. Re-adding and removing googleplus plugin, it also runs. Looks like there's some conflict with both together, but I'm not sure. I spent few hours trying to fix it, without success. Paste latest lines of building log below. Hope someone can help.
[...]
/Users/danielarditti/Desktop/myappfolder/platforms/ios/My App/Plugins/phonegap-plugin-push/GCM/Libraries/libGTMSessionFetcher_full.a(GTMReadMonitorInputStream.o)
My App/Plugins/cordova-plugin-googleplus/GoogleSignIn.framework/GoogleSignIn(GTMReadMonitorInputStream.o)
ld: 276 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 warnings only
Thanks,
Diogo

@lessadiogo does your build work if you only include the push plugin? What googleplus plugin are you using?

Same error. I try to do this:
http://stackoverflow.com/questions/30848208/new-warnings-in-ios9
But not results yet :(

@macdonst I'm using cordova-plugin-googleplus by Eddy Verbruggen. Yes, if I include only push plugin, the build works.

Duplicate of #449

@macdonst, thanks for your time.


Need help to parse custom log pattern

I have a log file with a custom pattern like below.
[2024-02-19T16:55:18.296] [DEBUG] product details v2
 |-> get products - Total Article Not In DB: 0
[2024-02-19T16:55:19.327] [WARN] customers - Error on customers, customers doesnt have 'something'! {
  anything_goes: [ '0000600186' ],
  stack: 'Error\n' +
    '    at getStack (D:\\Repository\\something\\service\\custSapOnDB\\fnsomething.js:6:11)\n' +
    '    at module.exports (D:\\Repository\\something\\service\\custSapOnDB\\fnsomething.js:16:17)\n' +
    '    at Object.module.exports [as shiptoV2] (D:\\Repository\\something\\graphql\\resolver\\catalog\\shipToV2.js:159:28)\n' +
    '    at runMicrotasks (<anonymous>)\n' +
    '    at processTicksAndRejections (internal/process/task_queues.js:94:5)\n' +
    '    at async Promise.all (index 0)\n' +
    '    at async graphqlMiddleware (D:\\Repository\\something\\node_modules\\express-graphql\\index.js:125:26)'
}

I can get the first line with
.*^(\[(?<Timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+)\])\s\[(?<Level>\w+)\]\s(?<Title>.*)

But how to get the next line??

Hi @GreenNeon, you just need to define 2nd log pattern and set it as skippable, maybe set as repeatable also if more lines are possible.

Here is a sample log profile based-on the log you provided:
GitHub#31.json

Work great, I understand now.
Thank you for your response 😁.


removed TODOs in dtc.h

added corresponding documentation

Do not add a new file, change the existing dtc.h.in.

corrected that

true.