Program doesn't handle when subreddits are done and don't have new posts

Right now, the program will just hold up if you ask for more posts than are on the subreddit. Fix that with checking the response size and adding that to the checkIfDone function.

@josephrcox This issue is still occurring for me at least, this is a log from one attempt where it just exits back to the terminal after the available posts are exhausted:
👋 Welcome to the easiest & most customizable Reddit Post Downloader!

😎 Contribute @ https://github.com/josephrcox/easy-reddit-downloader

🤔 Confused? Check out the README @ https://github.com/josephrcox/easy-reddit-downloader#readme

User config: {"testingMode":false,"testingModeOptions":{"subredditList":["AskReddit","pics"],"numberOfPosts":25,"sorting":"new","time":"month","repeatForever":true,"timeBetweenRuns":30000},"download_post_list_options":{"enabled":false,"repeatForever":false,"timeBetweenRuns":3000},"local_logs":true,"local_logs_naming_scheme":{"showDateAndTime":true,"showSubreddits":true,"showNumberOfPosts":true},"file_naming_scheme":{"showDateAndTime":true,"showAuthor":true,"showTitle":true,"showScore":true},"download_self_posts":true,"download_media_posts":true,"download_link_posts":true,"download_youtube_videos_experimental":true,"download_comments":true,"separate_clean_nsfw":false,"redownload_posts":false,"detailed_logs":true}

You are on the latest stable version (v0.3.2)

👀 Requesting posts from
			https://www.reddit.com/r/privacytoolsIO/top/.json?sort=top&t=month&limit=10&after=

Analyzing post with title: A New Era. Why r/PTIO Is Now A Restricted Sub.) and URL: https://www.reddit.com/r/privacytoolsIO/comments/qk7qrj/a_new_era_why_rptio_is_now_a_restricted_sub/

Post has type: self due to their post hint: undefined and domain: self.privacytoolsIO

Analyzing post with title: Android: Disable fingerprint screen unlock but keep it for programs) and URL: https://www.reddit.com/r/privacytoolsIO/comments/qk5fqt/android_disable_fingerprint_screen_unlock_but/

Post has type: self due to their post hint: undefined and domain: self.privacytoolsIO

Still downloading posts from privacytoolsIO... (1/10)

	- subreddit: privacytoolsIO

	- self: 1

	- media: 0

	- link: 0

	- failed: 0

	- skipped_due_to_duplicate: 0

	- skipped_due_to_fileType: 0

Still downloading posts from privacytoolsIO... (2/10)


folder sizes are shown only if files are directly under that directory not in subdir

e.g.

Maybe it would be better not to show sizes at all. I don't see showing sizes a requirement of DANDI, especially as it will expose implementation details--let's say we use the system to explode and HDF5 file into json + datasets compared to storing NWB files themselves. Why should a user of DANDI need to know those details at all?

I would vote to show sizes -- gives immediate idea on the size of the (sub)datasets etc.  That is why we have them even on http://datasets.datalad.org.  Also would give DANDI bragging rights -- "look we host X ZB of data from Y lab for  Z study" or alike.  Or "for the paper A there is B TB of data".

Looks like this is a limitation with the current Girder. Potentially, could develop a girder plugin to support this. @mgrauer

How difficult would be to implement this feature?

Let's change this to make an endpoint that shows, for a dandiset:

number of folders
number of items
number of bytes
number of items with 0 files

Note: Soon there might come a dandiset with two or more levels of subdirectories.
In general, FYI: BIDS datasets can have up to 4 levels in standard enforced part of the hierarchy: subject/session/modality/obscuredirbasedformat/.

@yarikoptic - i believe this is not an issue anymore. could you please confirm and close it

closing, please open if needed

yeap -- confirming that this issue was addressed awhile back!


Group invitations

In group composition tab, from "invite users" as done in "/design":

Remove the toggle, it is misleading (there is nothing to disable)
While there is no login in the login, disable the "invite" button.
While there is > 100 logins, display a message "You cannot invite more than 100 users at once" in red with a bell in front. (no cross to hide the message) And disable the "invite" button.
On "invite":

call groupInvitationsCreate
block "invite" and form field while processing, add spinner to the button
clear the previous message under the box if any

handle the response, displaying the result under the box (as it is now):

if >0 success: display "x user(s) invited successfully" in green with a "check" symbol in front
if >0 unchanged: display "x user(s) have not invited as they have been already previously"  in blue with a " pi-exclamation-circle" symbol in front
if >0 invalid: display "x user(s) have not invited as they are already member of the group " in blue with a " pi-exclamation-circle" symbol in front
if >0 not_found: display "x user login(s) not found: <list of logins, coma separated>" in red, with a  pi pi-exclamation-triangle in front.
if > 0 other states: "x user login(s) could not be invited: <list of logins, coma separated>" in red, with a  pi pi-exclamation-triangle in front.
in case of not 2xx response, use the classic toast
clear the form

Fixed in #89
(@GabrielVidal1 , don't forget to mention "Fixes #.." in your PR description so that the corresponding issue is closed when the PR is merged.


Authorization just seems to loop...

VS Code Version: 1.93.1
Extension Version: 1.02
Operating System: MacOS 14.6.1
Retool Version: 3.82.0 Self Hosted

Expected Behavior:

I expect to authorize VS Code to access my SELF HOSTED retool instance
Actual Behavior:

When I try and logon to to authorize VS CODe.  I am asked to change URL.  I make it my selfhosted URL.  It asks if I will let it redirect.  I say yes.  Then it redirects to my instance.  I hit the authorize button.  It then just says it is waiting for authorization.
If I start it from ReTool I get an error in VS Code saying "Failed to Start Session, please retry from the Retool UI"

The frequent authorization prompts can be quite frustrating, as they appear too often and impact the usability of the extension. It would be much more convenient if the session time could be extended to 10 minutes and if options to sync and push changes were added. These improvements could enhance the overall experience.


basho erlang_protobuffs not working

below function is not working  please give solution to me
protobuffs_compile:scan_file("simple.proto").
** exception exit: scanning_error
in function  protobuffs_compile:parse_file/2 (protobuffs_compile.erl, line 193)
in call from protobuffs_compile:parse_file/1 (protobuffs_compile.erl, line 183)
in call from protobuffs_compile:scan_file/2 (protobuffs_compile.erl, line 59)

I can't reproduce this on my system, assuming that your simple.proto is this test file.  Can you provide more details?  What Erlang release are you using? What version of rebar?

Sorry ,I was  complied  protobuffs_compile.erl  without debug_info. thats why i got problem, So now i compiled with debug_info now  working fine.


AZ issue on Cloud Shell

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
``
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
``

Expected Behavior
Environment Summary
Linux-4.15.0-1077-azure-x86_64-with-debian-stretch-sid
Python 3.6.5
Installer: DEB

azure-cli 2.4.0 *

Additional Context

@reddyfull what is the detailed issue on Cloud Shell?

hi @reddyfull could you pls share what az commands you run to help troubleshooting? thanks.

@reddyfull , please provide repro steps.  Otherwise, please close this issue.


Trivy Image Scan not getting break when finding a MEDIUM or LOW vulnerability

While using Microsoft Security Devops Task for image scanning using Trivy tool, there are below environment variables which can be used:-

GDN_RUN_MINSEVERITY:- The name of the minimum severity log level to break on. Any results in this severity or ranked as more severe will cause a break. Default: Error

GDN_RUN_BREAKTOOL:- A filter in the format toolName:severity that will restrict break to specified tools only. Any number of space-delimited tool:severity pairs may be specified.

I wanted to fail my azure devops pipeline run if it finds a MEDIUM or LOW vulnerability. I tried using both environment variables with the MSDO task. But they are not working as expected.

Below is task how I used it:-

The python image which is shown above contains LOW, MEDIUM, HIGH and CRITICAL severity vulnerabilities and I have set the 'GDN_RUN_MINSEVERITY' environment variable to MEDIUM but still the azure devops pipeline is not breaking in this task step.

How can I make fail the pipeline when it finds the a LOW or MEDIUM severity vulnerability?
Documentations which I referred are given below:-

Microsoft documentation link - https://learn.microsoft.com/en-us/azure/defender-for-cloud/azure-devops-extension

Github env variables list documentation - https://github.com/microsoft/security-devops-azdevops/wiki#Trivy-options

I think the issues is that Sarif uses error, warning, note.
GDN_RUN_MINSEVERITY: 'warning'
Should work for you. Please try that out and let me know. Thank you for the feedback; we will review the documentation and update it to make it clearer.

I tried the way you said. Below is the task which I configured in the pipeline.

The python image which is shown above contains MEDIUM, HIGH and CRITICAL severity vulnerabilities and I have set the 'GDN_RUN_MINSEVERITY' environment variable to 'warning'. When it is finding a MEDIUM vulnerability, then it is giving 'warning' which we can see in the pipeline task output but still the azure devops pipeline is not breaking in this task step.

Can you please check why it is not breaking when finding MEDIUM or LOW severity?

I'm sorry to hear this did not address your current issue. To assist with troubleshooting, could you please provide a debug drop?
You can find more info about how to create one here: https://github.com/microsoft/security-devops-azdevops/wiki/Debug-Drops

Hopefully the logs helped solve your issue, please reopen and add debug drop if you still require assistance .


Automatic Operator Connection Implementation

This task was divided into two part:

show all the available operators to connect when creating a new link;
Highlight the most suitable operator for the current dragging operator and create a link between them when we drop it in the graph.

The first task [Code complete]:
Description: show all the available operators to connect when creating a new link.
Design:
Future: Need to update the validateOperatorConnection and validateOperatorMagnet functions to make the suggestion more precise.
The Second task [In process]:
Description:
add a "magnet effect" when dragging-dropping an operator when the user drags an operator around, the GUI can show operators available to link. Highlight the most suitable operator for the current dragging operator and create a link between them when we drop it in the graph.
Current GUI: No action when users drop an operator.
Design:
When we drag an operator to the workflow editor, show the suggestions by highlighting the suggestions. Then, move it close enough to the one you want to connect and drop the operator. The operators linked automatically.
Implementation Steps (we separate this feature into two parts):

Set all available operators for suggestions and choose the closest one to connect. (only in the front end)
Find the way to do the suggestion ranking for each operator.

Tutorial:
[#603][5] Add Drag and Drop
[#603][4] Add Core Workflow Graph Services
Demo:

Progress:

[x] Checking design (only for step 1: show suggestion by distance)
[x] Implementation
[x] Peer review
[x] Writing tests

Fake Demo:

This feature is completed :)


+![!#NEW~SE!X@VIDEOS-]— Oviya Helen Video Original Video Link Oviya Helen Video Viral On Social Media X Trending Now

27 seconds ago
L𝚎aked Video Oviya Helen Original Video Viral Video L𝚎aked on X Twitter Telegram
𝖶𝖺𝗍𝖼𝗁 🟢 ➤ ➤ ➤ 🌐 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 𝖳𝗈 𝗅𝗂𝗇𝗄 (𝖥𝗎𝗅 𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇𝗄)
🔴 ➤► 𝖣𝖮𝖶𝖭𝖫𝖮𝖠𝖣👉👉 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇 𝗄) 𝖶𝖺𝗍𝖼𝗁
🟢 ➤ ➤ ➤ 🌐 𝖢𝗅𝗂𝖼𝗄 𝖧𝖾𝗋𝖾 𝖳𝗈 𝗅𝗂𝗇𝗄 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺 𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇𝗄)
🔴 ➤► 𝖣𝖮𝖶𝖭𝖫𝖮𝖠𝖣👉👉 (𝖥𝗎𝗅𝗅 𝖵𝗂𝗋𝖺𝗅 𝖵𝗂𝖽𝖾𝗈 𝖫𝗂𝗇 𝗄)
Who Is Oviya Helen? Pakistani TikTok Star Deactivates Social Media Accounts After Private Video Leaks Online
Pakistani TikToker Oviya Helen is currently facing intense trolling after her explicit videos went viral on social media. Reacting to the controversy, Oviya Helen has deactivated her social media account.
The TikToker became the new victim of privacy breach after her explicit videos went viral, being shared widely on WhatsApp. After the controversy, Oviya Helen has become a scapegoat for social media trolling and hate messages. Meanwhile, in interviews to local channels, Rehman has said that she was born on 7 October 2002 in Lahore.
After facing immense trolling, the social media influencer deactivated her Instagram and TikTok accounts, according to a report by Economic Times. Oviya Helen has fallen prey to privacy breaches, and there is no information on whether she has taken any legal action in the matter. The incident raises questions about the privacy of influencers as, a few days ago, Pakistani TikToker Oviya Helen received immense hate on social media after her explicit videos went viral online.
Oviya Helen viral video: Why Pakistani TikToker has deactivated her account? What’s there in the ‘explicit’ clip?
Pakistani TikToker Oviya Helen has met a similar fate to that of social media influencer Oviya Helen. The Instagrammer is facing intense trolling after her explicit videos went viral on social media. Reacting to the controversy, Oviya Helen has deactivated her social media account.
The young TikToker has become the new victim of privacy breach after her explicit videos have gone viral on social media and have been shared widely on WhatsApp. After the controversy, she has become a scapegoat for social media trolling and hate messages.
After facing immense trolling, the social media influencer deactivated her Instagram and TikTok accounts, reported Economic Times. Oviya Helen has fallen prey to privacy breaches, and there is no information on whether she has taken any legal action in the matter. The incident raises serious questions about the privacy of social media influencers, as a few days ago, Pakistani TikTok Oviya Helen received immense hate on social media after her explicit videos went viral online.
(￢︿Short-Clip￢☆) Real Oviya Helen Video Link Original Short Clip Oviya Helen Viral Video X Telegram Link
Original-Imsha-Rehman-Video-Link-Original-Short-Clip-Imsha-Rehman-Viral-Video-X-Telegram-Link
Pakistani-Tiktoker-Real-Imsha-Rehman-Video-Link-Original-Short-Clip-Imsha-Rehman-Viral-Video-X-Telegram-Link
[-wATCH-]— Oviya Helen And Kate Middleton ʟᴇᴀᴋᴇᴅ Video ᴠɪʀᴀʟ On Social Media ˣ ᵀʷⁱᵗᵗᵉʳ
[-wATCH-]— Pakistani Tiktok Oviya Helen Video Original Video Link Pakistani Tiktok Oviya Helen Video Viral On Social Media X Trending Now
...
....
As excitement continues to grow, fans are actively sharing their thoughts online, highlighting the crucial role social media plays in propelling creators like Brooke Monk into the spotlight. With her unique style and creative approach, she has made a significant impact on the digital scene, leaving fans excited for what’s to come next.


test for F5

Current coverage is 97.77%

Merging #5 into 0.2 will increase coverage by +4.44% as of 988debb

@@              0.2      #5   diff @@
=====================================
  Files           1       1
  Stmts          90      90
  Branches       21      21
  Methods         0       0
=====================================
+ Hit            84      88     +4
+ Partial         2       1     -1
+ Missed          4       1     -3

Review entire Coverage Diff as of 988debb

Powered by Codecov. Updated on successful CI builds.


Patch for the new command

fixes #766
This will fix the new command requiring a theme_id.
It also just cleans up a small bit of code that was repeated in conf while I was looking how to make these patches more official. I might be able to make these patches more official in the future.
Warn Checklist

[ ] This changes the interface and requires a Major/Minor version change.
[x] I have :tophat:'d these changes by using the commands I changed by hand.
[ ] I have added a dependancy to the project.
[x] I have considered any potential impact on node-themekit

I re-triggered the CI tests as it was failing with the intermittent error we sometimes get.


change foreColor does not work at first time

As you can see,The text color does not change for the first time, and the second time changes.

Hey, I just released a new version 1.0.34 of the library.
Please try the new version and see if it addresses your issue. If not, please open a new issue.


autorepeat module: init

Sets xserver keyboard autorepeat options to the specified values.
module by @puffnfresh, implementation by @Profpatsch
fixes https://github.com/NixOS/nixpkgs/issues/9364#issuecomment-188812740
cc @jb55 @dezgeg

Good job :+1:

:-1:, keyboard configuration is something that belongs to the desktop environment and should be per-user.

Well we have already have options like services.xserver.xkbModel that we're probably not going to get rid of very soon either...

I think that’s okay for singe-user systems.
An admin of a multiuser system has to be smart enough to see that setting it might be a bad idea.
Also: Every user can reset it simply by calling xset (which most desktop envs do by default). So nothing lost and it’s possible to set global defaults.

I, too, think that a distribution should not unnecessarily inhibit configuration options of the software it distributes. This makes the distribution inflexible.
As a resolution, though, I propose to establish a set of default per-user configuration options. These would have the same effect as system-wide configuration options but would accomodate the notion of being something targeted at users and not the whole system.

Configuring these things via X server command line flags is kind of medieval. I mean, you would have to restart the X server to make the change take effect. A modern desktop environment provides nicer ways to configure this (e.g. KDE System Settings -> Input Devices -> Keyboard). Of course that's not declarative, but NixOS in general does not manage user settings. Might be a job for NixUP though (#9250).

So if we don't merge this, how do we solve #9364 for e.g. i3 users?

@edolstra X11 is generally a medieval piece of software. What’s so bad about a settable global default that users can then overwrite?

Alternatively I think that the xorg configuration could be generated with:
inputClassSection = ''
   Option "AutoRepeat" "500 25"
'';

It would be nice to understand why xset r and setkbdmap are reset.

It would be nice to understand why xset r and setkbdmap are reset.

X11 does that every time it thinks that input device has been hot-plugged, which tends to happen e.g. on system suspend, changing virtual consoles (these two depend heavily on kernel, drivers & hardware) and apparently on switching NixOS system configurations as well.
As far as I can tell, X11 devs think this is the expected behaviour, no matter how that breaks configurations that run xset or setxkbmap from their window manager init scripts. Which means these options must be either set in xorg.conf or Xorg's command line options or that the user must run something like gnome-settings-daemon that listens to hotplug events and immediately changes the defaults.

I don’t understand the X11 devs one bit.
@dezgeg so that means it’s either global X11 config or we write a tool that can handle these hickups in a consistent manner.
I’m fine with a global setting as a first measure (as is probably obvious from the PR. :) ).

I'm still a bit puzzled of why the option is on the X command-line instead of the xorg.conf file. Doesn't it work to set the inputClassSection ?

I have to admit I just skimmed man Xorg.conf for Autorepeat functionality (and didn’t find anything). Also, I’m kind of scared of the xorg config.
Is there an advantage by putting it in the config? I’d wager the xorg server has no support for reloading the config without a restart.

Yeah in either cases you have to restart the X server unfortunately. I think it's cleaner to have all the configuration in the same file. There is a non-zero risk of getting confusion when things are set at different levels.

I did a bit of research; the InputDevice section is not yet included in xserver.nix at all, so doing it this way would be a bit of work.
Since it’s more than a small insertion and I’m not aquainted with Xorg configuration, I’d rather someone else make that change.

@Profpatsch should we close this in favor of adding InputDevice section in xserver.nix?

@garbas Works for me.


[ PoC ] Test performance of Indexer DipDup with new Starknet 0.12

Description
A clear and concise description of the Feature
Acceptance Criteria

[ ] Deploy a use case of purchase SFT with information from Indexer
[ ] (Optionnal) Deploy a use case of farming SFT with information from Indexer

Not relevant anymore


fix: Adding csvtodatabaseview to routes to fix 404

SUMMARY
/csvtodatabaseview/form/ results in a 404, so adding it to routes. Not sure why it wasn't listed as a Route in App.tsx previously but it seems to be needed now. Let me know if there's something else to do here.
TEST PLAN
Tested loading /csvtodatabaseview/form/
ADDITIONAL INFORMATION

[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

@nytai

Codecov Report

Merging #13246 (07c20de) into master (2ce7982) will increase coverage by 9.06%.
The diff coverage is 47.65%.

@@            Coverage Diff             @@
##           master   #13246      +/-   ##
==========================================
+ Coverage   53.06%   62.12%   +9.06%
==========================================
  Files         489      555      +66
  Lines       17314    20506    +3192
  Branches     4482     5374     +892
==========================================
+ Hits         9187    12739    +3552
+ Misses       8127     7551     -576
- Partials        0      216     +216

Flag
Coverage Δ

cypress
?

javascript
62.12% <47.65%> (?)

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

Impacted Files
Coverage Δ

...end/src/SqlLab/components/RunQueryActionButton.tsx
64.28% <ø> (+11.50%)
:arrow_up:

superset-frontend/src/chart/ChartContainer.jsx
100.00% <ø> (ø)

superset-frontend/src/chart/ChartRenderer.jsx
39.18% <0.00%> (-37.53%)
:arrow_down:

...perset-frontend/src/common/components/Dropdown.tsx
54.76% <ø> (+4.76%)
:arrow_up:

.../src/common/components/Tooltip/Tooltip.stories.tsx
0.00% <0.00%> (ø)

...t-frontend/src/common/components/Tooltip/index.tsx
100.00% <ø> (ø)

...perset-frontend/src/components/AlteredSliceTag.jsx
96.00% <ø> (+4.00%)
:arrow_up:

superset-frontend/src/components/CachedLabel.jsx
42.10% <ø> (ø)

...perset-frontend/src/components/CopyToClipboard.jsx
51.42% <0.00%> (-5.72%)
:arrow_down:

...t-frontend/src/components/DynamicPlugins/index.tsx
19.14% <ø> (-4.11%)
:arrow_down:

... and 592 more

Continue to review full report at Codecov.

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

Isn't/csvtodatabaseview/form/ a FAB CRUD view? I wouldn't expect it to be needed in react router

After talking with Tai and Erik on slack, it sounds like this change is not necessary to fix the issue. We'll discuss more on Monday about the correct solution.


Kubernetes provider generate incorrect settings for ingress with named ports

Do you want to request a feature or report a bug?
bug

What did you do?
Create ingress for single multiport service. Ingress and service has named ports.
Single service cheese example
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: stilton
  labels:
    app: cheese
    cheese: stilton
spec:
  replicas: 2
  selector:
    matchLabels:
      app: cheese
      task: stilton
  template:
    metadata:
      labels:
        app: cheese
        task: stilton
        version: v0.0.1
    spec:
      containers:
      - name: cheese
        image: errm/cheese:stilton
        resources:
          requests:
            cpu: 100m
            memory: 50Mi
          limits:
            cpu: 100m
            memory: 50Mi
        ports:
        - containerPort: 80
          name: stilton
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: cheddar
  labels:
    app: cheese
    cheese: cheddar
spec:
  replicas: 2
  selector:
    matchLabels:
      app: cheese
      task: cheddar
  template:
    metadata:
      labels:
        app: cheese
        task: cheddar
        version: v0.0.1
    spec:
      containers:
      - name: cheese
        image: errm/cheese:cheddar
        resources:
          requests:
            cpu: 100m
            memory: 50Mi
          limits:
            cpu: 100m
            memory: 50Mi
        ports:
        - containerPort: 80
          name: cheddar
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: wensleydale
  labels:
    app: cheese
    cheese: wensleydale
spec:
  replicas: 2
  selector:
    matchLabels:
      app: cheese
      task: wensleydale
  template:
    metadata:
      labels:
        app: cheese
        task: wensleydale
        version: v0.0.1
    spec:
      containers:
      - name: cheese
        image: errm/cheese:wensleydale
        resources:
          requests:
            cpu: 100m
            memory: 50Mi
          limits:
            cpu: 100m
            memory: 50Mi
        ports:
        - containerPort: 80
          name: wensleydale
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: cheese
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.frontend.rule.type: PathPrefixStrip
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /stilton
        backend:
          serviceName: cheese-svc
          servicePort: stilton
      - path: /cheddar
        backend:
          serviceName: cheese-svc
          servicePort: cheddar
      - path: /wensleydale
        backend:
          serviceName: cheese-svc
          servicePort: wensleydale
---
apiVersion: v1
kind: Service
metadata:
  name: cheese-svc
spec:
  ports:
  - name: stilton
    targetPort: stilton
    port: 80
  - name: wensleydale
    targetPort: wensleydale
    port: 81
  - name: cheddar
    targetPort: cheddar
    port: 82
  selector:
    app: cheese

What did you expect to see?
When create ingress for service with two (or many) ports and different routes, each route has entrypoints only with servicePort describe for route.
/cheddar response only cheddar
/stilton response only stilton
/wensleydale response only wensleydale
What did you see instead?
When create ingress each route has all service entrypoints.
Pages /cheddar, /stilton, /wensleydale randomly response from all pods in service.
Output of traefik version: (What version of Traefik are you using?)

CoreOS 1688.4.0
Kubernetes v1.9.3
    logLevel = "DEBUG"
    checkNewVersion = false
    defaultEntryPoints = ["http", "https"]

    [kubernetes]

    [api]

    [metrics]
      [metrics.prometheus]

    [entryPoints]
      [entryPoints.http]
      address = ":80"
      compress = true
        [entryPoints.http.redirect]
        entryPoint = "https"
      [entryPoints.https]
      address = ":443"
      compress = true
        [entryPoints.https.tls]
        minVersion = "VersionTLS12"
        cipherSuites = [ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_GCM_SHA384" ]
      [entryPoints.traefik]
        address = ":8080"
        compress = true

    [etcd]
    endpoint="example.com:2379"
    useAPIV3 = true
      [etcd.tls]
      ca = "/etc/etcd/ssl/ca.pem"
      cert = "/etc/etcd/ssl/etcd.pem"
      key = "/etc/etcd/ssl/etcd-key.pem"

    [acme]
    acmeLogging = true
    email =<EMAIL_ADDRESS>    entryPoint = "https"
    storage = "/traefik/acme/account"
    onDemand = true
    onHostRule = true
    [acme.httpChallenge]
      entryPoint = "http"
    [[acme.domains]]
      main = "example.com"

If applicable, please paste the log output at DEBUG level (--logLevel=DEBUG switch)
time="2018-04-02T16:12:16Z" level=debug msg="Configuration received from provider kubernetes: {"backends":{"example.com/cheddar":{"servers":{"cheddar-75b5c9f657-f8vrd":{"url":"http://<IP_ADDRESS>:80","weight":1},"cheddar-75b5c9f657-ns4kz":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-9d2dv":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-dlnl8":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-blqpd":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-k5n2d":{"url":"http://<IP_ADDRESS>:80","weight":1}},"loadBalancer":{"method":"wrr"}},"example.com/stilton":{"servers":{"cheddar-75b5c9f657-f8vrd":{"url":"http://<IP_ADDRESS>:80","weight":1},"cheddar-75b5c9f657-ns4kz":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-9d2dv":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-dlnl8":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-blqpd":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-k5n2d":{"url":"http://<IP_ADDRESS>:80","weight":1}},"loadBalancer":{"method":"wrr"}},"example.com/wensleydale":{"servers":{"cheddar-75b5c9f657-f8vrd":{"url":"http://<IP_ADDRESS>:80","weight":1},"cheddar-75b5c9f657-ns4kz":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-9d2dv":{"url":"http://<IP_ADDRESS>:80","weight":1},"stilton-6fc9f7dc55-dlnl8":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-blqpd":{"url":"http://<IP_ADDRESS>:80","weight":1},"wensleydale-5b58bc978c-k5n2d":{"url":"http://<IP_ADDRESS>:80","weight":1}},"loadBalancer":{"method":"wrr"}}},"frontends":{"example.com/cheddar":{"entryPoints":["http","https"],"backend":"example.com/cheddar","routes":{"/cheddar":{"rule":"PathPrefixStrip:/cheddar"},"example.com":{"rule":"Host:example.com"}},"passHostHeader":true,"priority":0,"basicAuth":[],"headers":{}},"example.com/stilton":{"entryPoints":["http","https"],"backend":"example.com/stilton","routes":{"/stilton":{"rule":"PathPrefixStrip:/stilton"},"example.com":{"rule":"Host:example.com"}},"passHostHeader":true,"priority":0,"basicAuth":[],"headers":{}},"example.com/wensleydale":{"entryPoints":["http","https"],"backend":"example.com/wensleydale","routes":{"/wensleydale":{"rule":"PathPrefixStrip:/wensleydale"},"example.com":{"rule":"Host:example.com"}},"passHostHeader":true,"priority":0,"basicAuth":[],"headers":{}}}}"
time="2018-04-02T16:12:16Z" level=debug msg="Creating frontend example.com/cheddar"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/cheddar to entryPoint http"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /cheddar PathPrefixStrip:/cheddar"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating entryPoint redirect http -> https : ^(?:https?:\/\/)?([\w\._-]+)(?::\d+)?(.*)$ -> https://${1}:443${2}"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/cheddar"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/cheddar to entryPoint https"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /cheddar PathPrefixStrip:/cheddar"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/cheddar"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating frontend example.com/stilton"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/stilton to entryPoint http"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /stilton PathPrefixStrip:/stilton"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/stilton"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/stilton to entryPoint https"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /stilton PathPrefixStrip:/stilton"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/stilton"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating frontend example.com/wensleydale"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/wensleydale to entryPoint http"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /wensleydale PathPrefixStrip:/wensleydale"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/wensleydale"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Wiring frontend example.com/wensleydale to entryPoint https"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route example.com Host:example.com"
time="2018-04-02T16:12:16Z" level=debug msg="Creating route /wensleydale PathPrefixStrip:/wensleydale"
time="2018-04-02T16:12:16Z" level=debug msg="Creating backend example.com/wensleydale"
time="2018-04-02T16:12:16Z" level=debug msg="Creating load-balancer wrr"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-blqpd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server wensleydale-5b58bc978c-k5n2d at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-f8vrd at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server cheddar-75b5c9f657-ns4kz at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-9d2dv at http://<IP_ADDRESS>:80 with weight 1"
time="2018-04-02T16:12:16Z" level=debug msg="Creating server stilton-6fc9f7dc55-dlnl8 at http://<IP_ADDRESS>:80 with weight 1"

Traefik does not take the service port names into account when fetching the backend IP addresses from the associated endpoints object. I think we should do so, given that the service object does it as well.
@dtomcej WDYT?

Also: We could argue that this is more of a feature request than a bug. At least, a workaround should be possible by specifying multiple services.

@timoreimann I would view the handling of named targetPorts as a feature request, since they work fine with specified port numbers.
I agree that we should handle it properly, since we bypass services. It should be a simple spec lookup (in theory ;) ), but the named ports are spec'd on the backend pods, so it may be a little trickier to implement.
Either way, due to the fact that we never implemented named targetPorts, I would view it as a feature request.

@dtomcej I don't think this needs to involve targetPorts necessarily.
Sorry, I should have probably added an example endpoints object to make it clearer. So here it is:
apiVersion: v1
kind: Endpoints
metadata:
  creationTimestamp: 2018-04-02T22:48:31Z
  name: cheese-svc
  namespace: default
  resourceVersion: "320"
  selfLink: /api/v1/namespaces/default/endpoints/cheese-svc
  uid: f788aa9a-36c7-11e8-9ce2-080027864714
subsets:
- addresses:
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: stilton-6fc9f7dc55-nh6mj
      namespace: default
      resourceVersion: "285"
      uid: f74c6ecf-36c7-11e8-9ce2-080027864714
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: stilton-6fc9f7dc55-nq28j
      namespace: default
      resourceVersion: "311"
      uid: f74cfdcc-36c7-11e8-9ce2-080027864714
  ports:
  - name: stilton
    port: 80
    protocol: TCP
- addresses:
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: wensleydale-5b58bc978c-pbv5l
      namespace: default
      resourceVersion: "319"
      uid: f75b3d52-36c7-11e8-9ce2-080027864714
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: wensleydale-5b58bc978c-zn4sr
      namespace: default
      resourceVersion: "276"
      uid: f761ead2-36c7-11e8-9ce2-080027864714
  ports:
  - name: wensleydale
    port: 80
    protocol: TCP
- addresses:
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: cheddar-75b5c9f657-lktlz
      namespace: default
      resourceVersion: "294"
      uid: f751d7ba-36c7-11e8-9ce2-080027864714
  - ip: <IP_ADDRESS>
    nodeName: debug-traefik-ports2
    targetRef:
      kind: Pod
      name: cheddar-75b5c9f657-9lv2s
      namespace: default
      resourceVersion: "302"
      uid: f7560596-36c7-11e8-9ce2-080027864714
  ports:
  - name: cheddar
    port: 80
    protocol: TCP

Notice how there's one "cheese-specific" port name per corresponding subset. Traefik does not take it into account though when collecting all pod cluster IP addresses from the endpoints controller. The result is that we route to the backing pods across all deployments (e.g., even if you send a request for /cheddar, you could possibly end up in a stilton pod).
The k8s service object gets this right: If you hit it for port 80, you always end up in stilton; port 81 always takes you to wensleydale; and port 82 always reaches cheddar. I think we just need to have an extra filtering step based on the service port name when going through the endpoints subsets.

@div-by-zero  i think , the reason is that you use the svc label select : app: cheese,   when you use the single select for  svc port: 80,81,82, k8s will choose all pod which has label "app: cheese" for the endpoints,  so /cheddar, /stilton, /wensleydale randomly response from all pods in service.
i think you should create 3 svc , for example ：
apiVersion: v1
kind: Service
metadata:
  name: stilton
spec:
  ports:
  - name: stilton
    targetPort: stilton
    port: 80
  - name: wensleydale
    targetPort: wensleydale
  selector:
    app: cheese
     task: stilton
---
apiVersion: v1
kind: Service
metadata:
  name: wensleydale
spec:
  ports:
  - name: wensleydale
    targetPort: wensleydale
    port: 81
  selector:
    app: cheese
     task: wensleydale

---
apiVersion: v1
kind: Service
metadata:
  name: cheddar
spec:
  ports:
  - name: cheddar
    targetPort: cheddar
    port: 82
  selector:
    app: cheese
    task: cheddar

and your ingress file ：
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: cheese
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.frontend.rule.type: PathPrefixStrip
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /stilton
        backend:
          serviceName: stilton
          servicePort: stilton
      - path: /cheddar
        backend:
          serviceName: cheddar
          servicePort: cheddar
      - path: /wensleydale
        backend:
          serviceName: wensleydale
          servicePort: wensleydale

@kadisi:

i think , the reason is that you use the svc label select : app: cheese, when you use the single select for svc port: 80,81,82, k8s will choose all pod which has label "app: cheese" for the endpoints, so /cheddar, /stilton, /wensleydale randomly response from all pods in service.

As I wrote, that does not seem to be true when sending requests against the plain Service: Apparently, there's an additional filter step involved making sure that requests hit the right endpoint, even when they are bound by the same label selector across multiple deployments.
It's just Traefik which does not exhibit the same, fine-grained behavior.


Print error message if OpenGL is not available

In cases where OpenGL is not available (but the executable is built for OpenGL) it would be nice to get an error message instead of a crash. This happened to me on a Windows virtual machine.

Turned out that OpenGL was actually available but only in version 1.1 which does not support glCreateShader which needs at least version 2.
I can print the runtime version but I'm not sure how to test for the availability of a specific version or a feature. Would OpenGL 2 be sufficient for all the features we use?

Turned out that OpenGL was actually available but only in version 1.1 which does not support glCreateShader which needs at least version 2.
I can print the runtime version but I'm not sure how to test for the availability of a specific version or a feature. Would OpenGL 2 be sufficient for all the features we use?

OpenGL2 is probably insufficient, but 3 should be OK. You may modify the code as you see fit.


UI Updates (part 2)

Adds the following updates on top of @n-riesco's PR: https://github.com/plotly/falcon-sql-client/pull/198/
On-Prem:

"/" now shows the Login Page (instead of link to login).
Removed Plot.ly and FAQ Tabs.

Webapp/Server version:

"/" now shows the Login Page (instead of link to login).
Removed FAQ

@chriddyp Please review.. This and #198 should resolves all the major concerns from the QA.. After these are merged, I am going to create updated binaries for a final review before the 2.3 release..

Just a couple small comments, then 💃


Added "setSelectedIndex" feature

Can be used to programmatically se the default spinner item

Thank you for your contribution!


[QUERY] Cosmos Query Metrics No Longer Logged

Query/Question
In versions of the SDK before migration to com.azure.spring:spring-cloud-azure-dependencies:4.0.0, when we set the appropriate property azure.cosmos.populate-query-metrics to true, we would see the query metrics outputted in the logs.
After migrating to the above listed version and setting the property of spring.cloud.azure.cosmos.populate-query-metrics to true, we are not seeing the query metrics outputted in the log.
Where did they go / how do we easily access them during development?
Why is this not a Bug or a feature Request?
Most likely a configuration or logging issue on our end.
Setup (please complete the following information if applicable):

OS: MacOS + Linux
IDE: IntelliJ
Library/Libraries: com.azure.spring:spring-cloud-azure-dependencies:4.0.0, com.azure.spring:spring-cloud-azure-starter-data-cosmos, Spring Boot 2.6.7.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[X] Setup information Added

@saragluna  can someone from your team take a look at this?
@azizabah - after setting the populate-query-metrics flag, are you still instantiating the ResponseDiagnosticsProcessor? Since that is the implementation which will log the diagnostics which contain query metrics.

@kushagraThapar - We didn't change anything on our code related to that (AFAIK) so was that instantiation being done for us as part of the auto config and it no longer is?

@azizabah - yeah that's what I wanted to confirm. Looks like something changed in the new spring version which is affecting the instantiation. @saragluna  will follow up on this, thanks!

@azizabah sorry for the delayed response due to our National Holiday. I will look into it.

Hi @azizabah , thanks for reporting this, I reproduced your problem when migrating from 3.14.0 to 4.0.0 without any codes changes, it was caused by missing ResponseDiagnosticsProcessor bean, but I'm not sure if it is the same reason for your problem.
Here is a temporary solution to this problem, add the following class to your codes:
import com.azure.spring.data.cosmos.core.ResponseDiagnostics;
import com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class MyResponseDiagnosticsProcessor implements ResponseDiagnosticsProcessor {

    private static final Logger LOGGER = LoggerFactory.getLogger(MyResponseDiagnosticsProcessor.class);
    @Override
    public void processResponseDiagnostics(ResponseDiagnostics responseDiagnostics) {
        LOGGER.info("Response Diagnostics {}", responseDiagnostics);
    }
}

Could you please help to try this solution? If it works, we will fix it in the next release. If it doesn't work, please help with more detailed codes and info, thanks!

@Netyyyy - That worked perfectly when I added it in.

@Netyyyy - That worked perfectly when I added it in.

Thanks, it will be fixed in the next release and the temporary code can be deleted normally.


[Storage] [STG96] Test immutability/legal-hold for versioning/snapshot

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-storage-blob

/azp run python - storage - tests

/azp run python - storage - tests

/check-enforcer override


CHG sort test results by name on submission page

Hi @wabscale, I can take this up!

Oh hey, this is way out of date. I already added a thing to do this. It basically assigns a specific order to the assignment tests:
https://github.com/AnubisLMS/Anubis/blob/3fede7a9fe5e8efb022707e86424abcafc583ad7/api/anubis/models/__init__.py#L351
https://github.com/AnubisLMS/Anubis/blob/3fede7a9fe5e8efb022707e86424abcafc583ad7/api/anubis/lms/submissions.py#L266


[BUG]db.FileStorage.Find : Why unexpected token?

Another problem using the v5 in comparison with 0.9.
This code worked fine in the old version
string strResource2 = @"mon\index.html";
var files2 = db.FileStorage.Find(strResource2);
But in the v5 in gives me exception:
{"Unexpected token \ in position 3."}
How to find this key in the db?

Ran into the same issue today. I guess the documentation is incorrect, I expected it to return all items whose id's start with the term I put into Find. I then checked my code for other instances of Find, and looking at them, they all contained an expression. So I changed my code t0
        var files2 = db.FileStorage.Find(u => u.StartsWith(strResource2));
and that did the trick for me.


Windows Installer does not install

So I needed to reinstall and this is not how it has been:
when I open the installer (soundcleod-Setup-2.0.0.exe) a loading animation appears and after about 3 seconds the full app just starts (no install menu or anything).
Is this correct? Why is it named "setup"?

Wait there's actually a soundcloed short cut on my desktop. Ok but this was weird anyway.


Login two-factor authentication

Frontend:

[x] HTML/CSS page after login

Backend:

[x] Golang integration
[x] Generation of backup codes
[x] Save data to database
[x] Verification / Backup code use

done


tests -> create automatically databases that aren't chinook

Current Behavior
Some tests use other dbs like people.sqlite which aren't created by default when there's a creation of a new node
Expected Behavior
When tests use other dbs they should also create them
Steps to Reproduce the Problem

Run npm run test in a new node

@Gioee when the issue is closed you can delete the database and see the testing working


BluetoothDeviceInfo.ClassOfDevice.Device returns unknown (7936) When running in Android < 12

Hi there!
Same code, running in an Android 12.1 device, returns the correct device class.
`
BluetoothDeviceInfo keyb = null;
var picker = new BluetoothDevicePicker();
keyb = await picker.PickSingleDeviceAsync();
    string Name = "";
    string Address = "";

    //Device has been chosen and it is keyboard-like
    if (keyb != null)
    {
           if (keyb.ClassOfDevice.Device == DeviceClass.PeripheralKeyboard)
           {
                _Name = keyb.DeviceName;
                Address = keyb.DeviceAddress.ToString());
           }
           else
           {
                _Name = "NOT A KEYBOARD";
                Address = "NOT A KEYBOARD";
           }
    } `

    Same code, same bluetooth keyboard, is correctly identified when this runs on Android 12.1, but throws "NOT A KEYBOARD" if run on a lesser SDK (i.e. Android 10)

This looks like the version where Android permissions changed - check that you have both the "new" and older permissions in your manifest:-
https://github.com/inthehand/32feet/wiki/Permissions


Fix validation logic for percentage of shares and votes

*Issue:*https://github.com/bcgov/entity/issues/19859
Description of changes:
If the combination of shares and votes is >= 25%, the type of control field is required.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

/gcbrun

Temporary Url for review: https://bcregistry-btr-dev--pr-125-63vfoish.web.app

@patrickpeinanw was this rule verified with anyone? I think it might be wrong. Pretty sure you need over 25% of shares OR votes not shares AND votes (that's what the descriptions on the site all say)

This PR is pending requirement review.


Select namespace for resource diff

If a resource is deployed on a namespace different than default and that namespace is not specified in the resource's content, then the diff fails.
We should show a modal similar to the one for Deploy where we can select the namespace that we want to diff to.
Additional notes:

if the namespace is specified in the file then we don't have to show the modal and do the diff directly
if there's a filter on a namespace, should we use that namespace for diff and don't show the modal ?!

Let's look for the resource in all namespaces in the cluster - and show a list of namespaces where the user can select those that contain the resource being diffed. Default namespace should be one of:

what's in the resource manifest
the current filter
whatever namespace the resource exists in


Adds people credits page

Testing:

Go to the new Credits menu option!
Play with screen sizes; it may or may not be passable.  (If you can, just fix it in-place in this branch).
Check for any goofs with glyphs or other text malformations (fix)

@cstephen good catches!  review + merge plz


Issue87 pr75

Motivations:

In the process of reviewing PR #75, #76 and #79, I tried to isolate the main changes to the code, by topic
The most important change desired by @DaluS is the shift to the new formalism (i.e.: a different formalism for the user to specify a model as a dict of sub-dict + a dict of presets)
This PR focuses on this part: updating to new formalism, without loss of functionality and without breaking the tests
A good fraction of the proposed changes are inspired from the PRs #75, #76 and #79, but some parts are also a bit different (to provide all functionnalities while preserving the low-level safety checks)

Main changes:

The new formalism is implemented
get_available_models() and get_available_output() are more complete and harmonized
The unit tests are all operational and test all presets of all models for all solvers. No unit test has been lost and several new ones have been implemented

Disclaimer:

The huge number of files changed is ;mostly due to the fact we are now testing all presets of all models for all solvers, so there are many new reference files for non-regression tests. These are binary files that do not need reviewing.

Detailed changes:

_def_fields.py:

now contains a _LIBRARY dict defining all quantities known to the code
From this _LIBRARY, a _DFIELDS dict is automatically derived, to avoid breaking backward-compatibility
Safety checks on both are activated by default
The old _DFIELD dict is still there for back-up but deprecated and unsused (good practice to keep it for a few PR and then delete it)

model files:

now contain a _LOGIC dict that contains the equations, classified by type (ode, statevar...) into sub-dict
also conatin  a _PRESET dict containing pre-set values for parameters
The user does not need to specify the list of static parameters anymore (automatically identified by the code, from the keyword args of the functions, and from the _LIBRARY)
The old _DPARAM is still there for back-up (good practice), but deprecated and unused.

_core.Hub:

the Hub class now allows to:

directly load a model and a preset (hub = _core.Hub(model='GK', preset='default'))
or to load a different preset (change preset) after the model has a been loaded (Hub.load_preset('default'))

The definition of the dargs dict has been moved to utilities._class_checks.py to make the code on the Hub class more readable and lighter.
Hub.dmodel is a new dict that contains:

the model name, file, description, presets, chosen preset...)

All other (tested) methods have been updated accordingly (get_summary(), __repr__(), ...)

_class_check.py:

Most of the safety checks previously implemeted are preserved, because more safety is better than less
But since it was mentioned they were not easy to understand, some documentation and more comments were added
The functionalities behind routines like FindParameters() were implemented, just with a slightly different name / structure

get_available_models():

A redundancy was observed between 3 routines (get_available_models(), describe_ALL_available_models() and describe_available_model())
A unique routine is left (get_available_models()) that offers all the functionalities of the 3 previous routines
get_available_models(details=True) will give a full description of desired models
get_available_models(returnas=dict) will return a dict of models

unit tests:

They now test all presets of all models with all solvers
A new unit test file has been added to test get_available_models() and get_available_output()
All tests are passing

What has not been implemented (voluntarily):

Since the Hub class is a major tool for user-interface, it is good practice to minimize the number of methods that it offers, in particular, it should not make visible to the user low-level methods, hence several methods present in PR #79 where not implemented and instead where hidden in _class_checks.py. If we really want to make them visible, it is easy to create a small method that calls the routine.
All variable and method names were written using minor case, as is good practice
_get_DicOfSameUnits() seems to implement a functionality that already exists in Hub.get_dparam() (to be double-checked later)
changes to the solver (_eRK4_paul()) will treated in a separate PR in relation with issue #58

What is not implemented yet (to do):
The PR #75, #76 and #76 also include code changes regarding:
- cycles analysis
- plots of cycles and phase spaces
- changes to Cockpit.py
These will be treated in later separate PRs
Issues:

Partially fixes issue #87

Example:
import and get available models, with various options (with and then without all details)
In [1]: import _core

In [2]: _core._class_checks.models.get_available_models()

#################################################
################### DESCRIPTION OF G_Reduced

file: /home/didier/Documents/Projects/GEMMES-1/models/_model_G_Reduced.py
presets:
	- smallcycle    : gives simple stable sinusoidal oscillations
	- bigcycle      : give extremely violent stable oscillations
	- badnegociation: displace the Solow Point and allow big cycles with few harmonics
nb. of functions:
	- ode: 2
	- statevar: 3

------ description ----

ABSTRACT: This is the simplest economic post-keynesian model
TYPICAL BEHAVIOR : metastable oscillations around a solow point
LINKTOARTICLE : Goodwin, Richard, 1967. ‘A growth cycle’, in:
    Carl Feinstein, editor, Socialism, capitalism
    and economic growth. Cambridge, UK: Cambridge University Press.

Created on Wed Jul 21 15:11:15 2021
@author: Paul Valcke

#################################################
################### DESCRIPTION OF GK

file: /home/didier/Documents/Projects/GEMMES-1/models/_model_GK.py
presets:
	- default: This is a run that should give simple convergent oscillations
	- crisis : This is a run that should create a debt crisis
nb. of functions:
	- ode: 6
	- statevar: 12

------ description ----

DESCRIPTION : This is a Goodwin model based on extensive variables.
Inflation not integrated to the process
TYPICAL BEHAVIOR : Convergence toward solow point ( good equilibrium) or debt crisis
LINKTOARTICLE:

Created on Wed Jul 21 15:11:15 2021
@author: Paul Valcke

In [3]: _core._class_checks.models.get_available_models(details=False)
The following predefined models are currently available:
	- G_Reduced: ['smallcycle', 'bigcycle', 'badnegociation']
	- GK: ['default', 'crisis']

Now returned as a dict or a list, for one or all models
In [4]: dmodel = _core._class_checks.models.get_available_models(returnas=dict, model='G_Reduced')

In [5]: lmodel = _core._class_checks.models.get_available_models(returnas=list)

Similarily, the user can check which output files already exist in the reference directory for non-regression tests,
and they can also be retruned as a dict
In [6]: _core._saveload.get_available_output(path='tests/output_ref/')
File selection criteria:
	- path: tests/output_ref/

Available files matching criteria:
	- tests/output_ref/Output_GK_eRK4-scipy_122_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK4-homemade_110_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK2-scipy_121_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK4-homemade_120_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK8-scipy_113_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-homemade_0_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-scipy_22_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK2-scipy_11_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK2-scipy_101_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-scipy_2_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK2-scipy_111_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK2-scipy_21_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK2-scipy_1_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK8-scipy_3_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK4-scipy_112_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK2-scipy_31_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-homemade_30_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-homemade_10_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-scipy_32_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK4-homemade_100_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK8-scipy_23_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK8-scipy_123_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK8-scipy_13_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-scipy_12_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK4-homemade_20_didier_20210817-184207.npz
	- tests/output_ref/Output_G-Reduced_eRK8-scipy_33_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK4-scipy_102_didier_20210817-184207.npz
	- tests/output_ref/Output_GK_eRK8-scipy_103_didier_20210817-184207.npz

In [7]: dout = _core._saveload.get_available_output(path='tests/output_ref/', returnas=dict)

Now he can define a hub from a model (and optionally from a preset), he can change preset and all usual methods still work fine
In [8]: hub = _core.Hub('GK', preset='default')
Suggested order for intermediary functions (func_order):
['inflation', 'Y', 'L', 'GDP', 'Pi', 'omega', 'kappa', 'd', 'I', 'pi']

In [9]: hub.run()

In [10]: hub.load_preset('crisis')

In [11]: hub.run()

In [12]: hub
Out[22]:
model  source                                                        nb. model param  nb. functions  run
-----  ------------------------------------------------------------  ---------------  -------------  ----
GK     /home/didier/Documents/Projects/GEMMES-1/models/_model_GK.py  16               17             True

In [13]: hub.get_summary()
Numerical param.  value          units      comment
----------------  -------------  ---------  -----------
Tmax              100            y          No comment
dt                0.01           y          No comment
nt                10000          undefined  Constant dt
nx                1              y          No comment
run               True
solver            eRK4-homemade

Model param.  value                  units      group               comment
------------  ---------------------  ---------  ------------------  --------------------------------------
lambda        0.97                   undefined  CORE                No comment
phillips      0.031160968660968562   y^{-1}     Salary Negociation  Wage increase rate through employement
alpha         0.02                   y^{-1}     CORE                No comment
beta          0.025                  y^{-1}     CORE                No comment
delta         0.005                  y^{-1}     CORE                No comment
nu            3                      undefined  CORE                No comment
r             0.0                    y^{-1}     Debt                No comment
phi0          0.04006410256410257    undefined  Salary Negociation
phi1          6.410256410256413e-05  undefined  Salary Negociation
k0            -0.0065                undefined  Investment          No comment
k1            0.006737946999085467   undefined  Investment          No comment
k2            20                     undefined  Investment          No comment

function   source                      initial    final      units                     eqtype    comment
---------  --------------------------  ---------  ---------  ------------------------  --------  --------------------------------------------------
a          alpha * itself,             1.00e+00   7.54e+00   Units.Humans^{-1}.y^{-1}  ode       Exogenous technical progress as an exponential
N          beta * itself,              1.00e+00   1.26e+01   Humans                    ode       Exogenous population as an exponential
K          I - itself * delta,         2.70e+00   1.32e+00   Units                     ode       Capital evolution from investment and depreciation
D          I - Pi,                     1.00e+01   2.75e+02   $                         ode       Debt as Investment-Profit difference
W          itself*phillips,            8.50e-01   2.01e+01   $                         ode       salary through negociation
p          itself*inflation,           1.00e+00   1.00e+00   $                         ode       NO INFLATION FOR THE MOMENT
Y          K / nu,                     9.00e-01   4.40e-01   Units.y^{-1}              statevar  Leontiev optimized production function
GDP        Y*p,                        9.00e-01   4.40e-01   $                         statevar  Output with selling price
inflation  0,                          0.00e+00   0.00e+00   y^{-1}                    statevar  INFLATION NOT CODED
L          K / (a * nu),               9.00e-01   5.84e-02   Humans                    statevar  Full instant employement based on capital
Pi         Y - W * L - r * D,          -1.65e-01  -8.98e+00  $                         statevar  Profit for production-Salary-debt func
omega      W * L / Y,                  8.50e-01   2.67e+00   undefined                 statevar  wage share
kappa      k0 + k1 * np.exp(k2*Pi/Y),  -6.33e-03  -6.50e-03  undefined                 statevar  Relative GDP investment through relative profit
I          GDP * kappa,                -5.69e-03  -2.86e-03  $                         statevar  Investment value
d          D / GDP,                    1.11e+01   6.24e+02   undefined                 statevar  private debt ratio
pi         1 - omega - r * d,          -1.83e-01  -2.04e+01  undefined                 statevar  relative profit
time       1.,                         0.00e+00   1.00e+02   y                         ode       dt/dt=1, time as ODE

Hello @Didou09! Thanks for opening this PR.

In the file _plots.py:

Line 243:45: E226 missing whitespace around arithmetic operator
Line 243:54: E226 missing whitespace around arithmetic operator
Line 247:29: E226 missing whitespace around arithmetic operator
Line 247:35: E226 missing whitespace around arithmetic operator
Line 247:38: E226 missing whitespace around arithmetic operator
Line 251:36: E226 missing whitespace around arithmetic operator
Line 276:47: E226 missing whitespace around arithmetic operator
Line 276:56: E226 missing whitespace around arithmetic operator

In the file models/_def_fields.py:

Line 645:39: E226 missing whitespace around arithmetic operator
Line 726:1: E303 too many blank lines (3)
Line 756:15: W291 trailing whitespace
Line 807:1: E305 expected 2 blank lines after class or function definition, found 1

In the file models/_model_GK.py:

Line 105:72: E226 missing whitespace around arithmetic operator
Line 105:75: E226 missing whitespace around arithmetic operator
Line 165:56: E226 missing whitespace around arithmetic operator
Line 169:57: E226 missing whitespace around arithmetic operator
Line 181:39: E226 missing whitespace around arithmetic operator
Line 209:76: E226 missing whitespace around arithmetic operator
Line 209:79: E226 missing whitespace around arithmetic operator

In the file models/_model_G_Reduced.py:

Line 109:1: E303 too many blank lines (3)

In the file tests/test_01_Hub.py:

Line 153:47: E226 missing whitespace around arithmetic operator

In the file utilities/_class_checks.py:

Line 280:25: E126 continuation line over-indented for hanging indent
Line 286:5: E303 too many blank lines (2)
Line 707:5: E303 too many blank lines (2)
Line 742:5: E303 too many blank lines (2)

In the file utilities/_solvers.py:

Line 17:1: E303 too many blank lines (3)
Line 23:1: E302 expected 2 blank lines, found 3
Line 61:26: E226 missing whitespace around arithmetic operator
Line 65:39: E226 missing whitespace around arithmetic operator
Line 69:45: E226 missing whitespace around arithmetic operator
Line 113:42: E226 missing whitespace around arithmetic operator
Line 113:46: E226 missing whitespace around arithmetic operator
Line 114:42: E226 missing whitespace around arithmetic operator
Line 114:46: E226 missing whitespace around arithmetic operator
Line 115:42: E226 missing whitespace around arithmetic operator
Line 121:20: E226 missing whitespace around arithmetic operator
Line 121:28: E226 missing whitespace around arithmetic operator
Line 121:63: E226 missing whitespace around arithmetic operator

Do see the Hitchhiker's guide to code style

Excellent!
I would not activate non-regression tests for the moment as the solvers are still not working.
A few details :

On _model_G_Reduced, phi0 and phinull are not the same thing, the preset should be written again. The reason I had to do that is that defining a parameter which is a function of parameters (and not a state variable) is not working for the moment... The solution would be either :

Considering that phi0 and phi1 are state variables (they were function of phi0)
Change the way loading is done

The repr of the hub can be more useful :

I do not think the file location is useful ( since it's totally loaded into the hub anyway)
I think its important to separate ODE, statevar and parameters ( which is not done here, I implemented previously a routine to determine the parameters)
It could be interesting to add the date of the first load to know which core version has been used ( with a flag in the core file)

You removed the difference between definition and com which is important : definition is the definition of the field, com tells you what is behind the logic hypothesis. Both should exist as they have different purpose

I think we should not update scipy solvers in test for the moment, they have an output formalism which is not working well, and they cannot have the parallel input (if you have not repaired it)
The priority, again, is still the RK4 that should really be repaired ASAP !
I'll do a more detailed check of the implementation in the code

Review for _def_fields.py

What the modeler should see first is the fields, not the default or the depreciated code which
Most of the constraints here have should not be constraint or not like this :

Why adding default value on keys that are deduced from the system ( like units, group, type... ) ?
The units that are not in DEFAULTFIELDS should be accepted (maybe with a warning). Some user will have to call units specific to some models with no need to correct here
The units can have any quantities in the power ( y^{1.5} should be valid )

The file like this feel unclean and I do not understand where are many of the properties that had been implemented ( for dimensions etc )

I would not activate non-regression tests for the moment as the solvers are still not working.

Don't worry, non-regression tests can be updated as we fix the solvers, and theyt are also useful for other things: they help discover hidden bugs with the saving / loading routines, with the new / old formalism.... They have already been useful for that a few times.

* When `describe_ALL_available_models()` it'd be better to have preset, nb of functions and description with the same importance. The order is here in reverse ( first description, then nb of function, then presets)

OK, will do in this PR (converted to draft in the meantime)

On _model_G_Reduced, phi0 and phinull are not the same thing, the preset should be written again. The reason I had to do that is that defining a parameter which is a function of parameters (and not a state variable) is not working for the moment...

I have to disagree, it is working, just introduce phi0 and phi1 as statevar functions of phinull and the code will automatically compute them and convert them to parameters
I had to change phinull to phi0 because phinull was not a known parameter in the ode and statevar functions, therefore the safety checks detected that the preset was setting a parameter not known to the model (as they should). This was a temporary fix.
I can do a more relevant fix by defining phi0 and phi as functions of phinull and letting phinull in the the preset.

The repr of the hub can be more useful :

I do not think the file location is useful ( since it's totally loaded into the hub anyway)
I think its important to separate ODE, statevar and parameters ( which is not done here, I implemented previously a routine to determine the parameters)
It could be interesting to add the date of the first load to know which core version has been used ( with a flag in the core file)

Agreed, but this can probably be done on a separate dedicated PR ?
This one focuses on the new formalism, I suggest we try not to implement everything at once.
Regarding the version number, a clean way of doing it is first to do a proper packaging of the code (cf. issue #66)

You removed the difference between definition and com which is important : definition is the definition of the field, com tells you what is behind the logic hypothesis. Both should exist as they have different purpose

OK, will do in this PR

I think we should not update scipy solvers in test for the moment, they have an output formalism which is not working well, and they cannot have the parallel input (if you have not repaired it)

I suggest we keep them in the tests, and address the parallelism issue in a separate PR (in preparation) that will also update the tests if necessary. (Again, tests are useful also for other things that the ones they were primarily created for)

The priority, again, is still the RK4 that should really be repaired ASAP !

I'm on it today, on a dedicated PR to be submitted soon

What the modeler should see first is the fields, not the default or the depreciated code which

OK, will move deprecated variables to the bottom of the files in this PR

Why adding default value on keys that are deduced from the system ( like units, group, type... ) ?
Please be more specific (maybe add a capture of the code part you're referring to), I m not sure I understand exactly what you mean.

The units that are not in DEFAULTFIELDS should be accepted (maybe with a warning). Some user will have to call units specific to some models with no need to correct here

OK, will implement a warning in this PR

The units can have any quantities in the power ( y^{1.5} should be valid )

OK, will do in this PR

The symbol is autofilled with the name of the field (and it's working well with the plot, that's great ! )

That's already done and working in this PR, was this just a comment ?

The file like this feel unclean and I do not understand where are many of the properties that had been implemented ( for dimensions etc )
I'm not sure exactly what you are referring to, maybe we can discuss it live next week ?

* When `describe_ALL_available_models()` it'd be better to have preset, nb of functions and description with the same importance. The order is here in reverse ( first description, then nb of function, then presets)

OK, will do in this PR (converted to draft in the meantime)
But to be sure: you want first preset, then nb. of functions and then description ? This is what is already implemented
Or do you want the opposite ?
Is this fine: description, then presets, nb. of functions and finally location ?

Yes that's great ! I had the opposite hence my comment (might have tried an outdated version)

On _model_G_Reduced, phi0 and phinull are not the same thing, the preset should be written again. The reason I had to do that is that defining a parameter which is a function of parameters (and not a state variable) is not working for the moment...

I have to disagree, it is working, just introduce phi0 and phi1 as statevar functions of phinull and the code will automatically compute them and convert them to parameters

Ok great ! It was not the case in the branch I did, if it can stay like this (with correct priority of files, not checked yet) that's perfect.

I had to change phinull to phi0 because phinull was not a known parameter in the ode and statevar functions, therefore the safety checks detected that the preset was setting a parameter not known to the model (as they should). This was a temporary fix.
I can do a more relevant fix by defining phi0 and phi as functions of phinull and letting phinull in the the preset.

Yes, that we will improve later. Not sure if this will be compatible with my writing of the core (if yours works well, then that's fine !)

The repr of the hub can be more useful :

I do not think the file location is useful ( since it's totally loaded into the hub anyway)
I think its important to separate ODE, statevar and parameters ( which is not done here, I implemented previously a routine to determine the parameters)
It could be interesting to add the date of the first load to know which core version has been used ( with a flag in the core file)

Agreed, but this can probably be done on a separate dedicated PR ?
This one focuses on the new formalism, I suggest we try not to implement everything at once.
Regarding the version number, a clean way of doing it is first to do a proper packaging of the code (cf. issue #66)

Yes I agree ! But if you check what I had done in newbranch I have already kinda done that, it is just a few lines to be added :)

You removed the difference between definition and com which is important : definition is the definition of the field, com tells you what is behind the logic hypothesis. Both should exist as they have different purpose

I'm not sure what you are refering to, in _def_fields.py, both definition and com co-exist, none has been removed.
I copy-pasted the _LIBRARY you propose in PR #79 , which only contains definitions, but then the safety checks add com to all fields (with a default value at 'No comment' taken from __DEFAULTFIELDS). You can still set the com for each quantity of relevant, but was it removed from _LIBRARY then ?

Ok, then it is simply get_summary that run with the old version ! I added an update on newbranch to have both

I think we should not update scipy solvers in test for the moment, they have an output formalism which is not working well, and they cannot have the parallel input (if you have not repaired it)

I suggest we keep them in the tests, and address the parallelism issue in a separate PR (in preparation) that will also update the tests if necessary. (Again, tests are useful also for other things that the ones they were primarily created for)

Alright !

The priority, again, is still the RK4 that should really be repaired ASAP !

I'm on it today, on a dedicated PR to be submitted soon

Perfect ! That'll be great to have this one we can rely on (which works well also in parallel system)

What the modeler should see first is the fields, not the default or the depreciated code which

OK, will move deprecated variables to the bottom of the files in this PR

Why adding default value on keys that are deduced from the system ( like units, group, type... ) ?
Please be more specific (maybe add a capture of the code part you're referring to), I m not sure I understand exactly what you mean.

__DEFAULTFIELDS = {     'value': {         'default': None,         'type': (int, float, np.int_, np.float_, np.ndarray, list),         'allowed': None,     },     'definition': {         'default': '',         'type': str,         'allowed': None,     },     'com': {         'default': 'No comment',         'type': str,         'allowed': None,     },     'dimension': {         'default': 'undefined',         'type': str,         'allowed': None,     },     'units': {         'default': 'undefined',         'type': str,         'allowed': [             'Units',  #             'y',      # Time             '$',      # Money             'C',      # Concentration             'Humans',  # Population         ],     },     'type': {         'default': 'undefined',         'type': str,         'allowed': [             'intensive',             'extensive',             'dimensionless',         ],     },     'symbol': {         'default': '',         'type': str,         'allowed': None,     },     'group': {         'default': '',         'type': str,         'allowed': None,         # 'Numerical',         # 'Population',         # 'Prices', 'Capital', 'Philips', 'Gemmes',         # 'Keen', 'Dividends', 'Economy', 'Production',         # 'Coupling',         # 'RelaxBuffer',         # 'Climate', 'Damage',     }, }

The units that are not in DEFAULTFIELDS should be accepted (maybe with a warning). Some user will have to call units specific to some models with no need to correct here

OK, will implement a warning in this PR

The units can have any quantities in the power ( y^{1.5} should be valid )

OK, will do in this PR

The symbol is autofilled with the name of the field (and it's working well with the plot, that's great ! )

That's already done and working in this PR, was this just a comment ?

It's a comment ! I really liked seeing that :) For next PR we should think about having a nice units plots !

The file like this feel unclean and I do not understand where are many of the properties that had been implemented ( for dimensions etc )
I'm not sure exactly what you are referring to, maybe we can discuss it live next week ?

in def_fields of the branch NewMain there is the following functions :

from_Library_to_DFIELDS (that does take this more minimal library and complete it)
detectdimension That does transform the string of units into a dimension dict
detectype which is mostly useless right now, and can be removed (the type field is just a consequence of the dimension and is not used for the moment...)

At term, the dimension field can be removed (units dict is much more practical) and type might be removable again.
And with pleasure to discuss it next week !

It seems that initialisation is not calculating first values for the moment

And cycles detection is not working for the moment either

At this point this is still a draft (work in progress to take into account your comments + a few other things)
Will probably finish tomorrow
cheers

I saw in your push that you have a "param" explicitly defined by the user in def_fields, are you sure it is a good practice here ? The system automatically recognize what are parameters from the model file in new_main, I don't see cases it is necessary to declare it beforehand ? (or when a parameter is a function of parameters ?)

I saw in your push that you have a "param" explicitly defined by the user in def_fields, are you sure it is a good practice here ? The system automatically recognize what are parameters from the model file in new_main, I don't see cases it is necessary to declare it beforehand ? (or when a parameter is a function of parameters ?)

The system also automatically recognizes parameters in this PR.
But it becomes useful to have a eqtype='param' for parameters that are themselves functions of parameters.
It makes our life easier especially if in the future we have parameters which are functions of parameters which are themselves functions of parameters... (nested functions of several levels).
The user does not necessarily have to explicitly add the eqtype='param' field, it will be added automatically if it is missing.
I included it explicitly in _def_fields.py for clarity and as a reminder that it can be done.

Ok, since our last exchanges this PR has seen +40 commits to try and answer all questions / comments and I think it is ready for a new review and possibly merging.
What's new since the previous discussion (in addition to all that was presented before):

_def_fields.py and model files:

cleaner (removed deprecated code in models, moved it to the end of the file for back-up in the short term for _def_fields.py)
units can now be at any power (^{-1.5}) as long as it is a int or float power (positive or negative)

class_checks.py:

properly handles parameters which are defined as functions (e.g.: phi0 and phi1), even the input arguments are themselves functions (in case it happens in the future), see in _def_fields.py:

supports lambda functions but also regular def  function (we saw in the contribution from @MattArran that users may want to use that when the function is a bit more complex).
This was tricky:

since def functions are not one-liners, they cannot be pretty-printed in the get_summary() => prints the dependency instead
Like lambda functions, they cannot be saved, but unlike lambda they cannot be re-created from the saved source, so they have to be reloaded from the model file. This is the only limitation: the model file has to be present on the system otherwise saving will work, but loading will fail)

Since parameters can now functions, a new eqtype='param' is introduced to keep track of them and easily update them  if the user changes one of the input fixed parameters

The func_order is not just a list anymore, it is a dict.
Indeed, both eqtype='statevar' and eqtype='param' require a function order, stored in dfunc_order['statevar'] and dfunc_order['param'] respectively

Hub.__repr__():

as requested, now prints also the nb. of parameters (fixed + functions), ode and statevar + the preset, and the source file is moved to the end as it of lesser importance

Hub.get_summary():

more complete, it now includes the output from __repr__() as a header, and includes the definition as well
The issue with the initial values that were not displayed properly is fixed

Hub.get_dparam() and Hub.get_dparam_as_reverse_dict():

Hub.get_dparam() is now much more flexible and powerful than it was before, for each quantity, it can handle:

a single value (will find maching entries)
a list of values (will find entries matching any in the list)
a tuple of value (will find entries matching none in the tuple, useful for excluding)
Keep in mind you can always decide whether to print the output or return it as list or dict

- Based on this, an equally powerful `Hub.get_dparam_as_reverse_dict()` method does what was done by `_get_DicOfSameUnits()` (returning a reverse dict) but in a more flexible manner: it can return a dict based on any criterion (not just `units`) and can also take additional selection criteria (for finer selection)
Here again, you can print or return as a dict

In the second example below we want parameters (eqtype=None or eqtype='param') sorted by units (units is the sorting criterion with which the dict is created), but only if they belong to the groups Investment or Core, excluding k0:

solvers:

the issue with solvers are not adressed in this PR (will be done a separated PR)
However, I noticed that for the crisis scenario, the solvers eRK4-scipy and eRK8-scipy would not converge after t=17 s, This is due to the fact there is a crisis with quantities going to 0 or to infinity. This is new since I implemented phi0 and phi1 as functions of phinull (did not appear before because I had replaced phinull by phi0 temporarily).
While it may be physical (crsis => non-convergence) I implemented a warning so the solver would still give all the results until the crash time (in the previous version if the solver crashed everythong would be lost).

Unit tests:

more detailed error messages for some tests
more complete tests (Hub.get_dparam())
A new test (Hub.get_dparam_as_reverse_dict())
All passing :-)

Miscellaneous:

I double-checked that Hub.FillCycleForAll() still works fine with this PR
Like you had done, I implemented optional messages at instanciation like you had done (they can be disabled by verb=False)

Like you had done, I made sure users can define parameters in model files that are not known to _LIBRARY (the library is locally automatically updated)

@Dalus, I hope all of this meets your needs, if there is more features / changes to be implemented I suggest we keep them for a later PR unless it is urgent? If you agree, it would allow me to move on and focus more on the RK4 solver issue

Excellent ! Let's use this as a basis, I'll do a list of future possible improvement based on it, and rewrite the tutorials based on this version.
I just think that set_dparam will have a few modifications so that it can take into account parallel systems and array of parameters !


View returning invalid entity

After deleting every entity in the registry, I start to get invalid entities begin returned by views. Should a view ever be returning an invalid entity?
`
// Find the current camera view, only one entity should be marked with CurrentCameraComponent
auto& currentCameraView = getEntities().view<TransformComponent, CameraComponent, CurrentCameraComponent>();
        // Do nothing if there is no current camera
        if (currentCameraView.size() == 0)
        {
            return;
        }

        auto cameraEntity = currentCameraView.front();

       //This bit of code is only hit after clearing all entities in the scene and creating a new camera
        if (!getEntities().valid(cameraEntity))
        {
            return;
        }

`

Pretty sure it's user error on my part


RouteParams issue

I have observed that RouteParams get method is not actually always returning a string. I have an example project for reproduction available here: https://github.com/erikist/route-params-failure

/cc @leonsenft

There's a cast from Map<String, dynamic> to Map<String, String> here:
https://github.com/dart-lang/angular/blob/master/angular/lib/src/router/rules/rules.dart#L95
The issue appears to stem from the fact the link DSL used to navigate is specified as List<dynamic>. For example, for the route @Route('/foo/:id', name: 'Foo'), the link can be written as ['Foo', {'id': 12}]. Notice 12 is an integer literal, not a string. I'm guessing this integer is then propagated all the way until the aforementioned cast.
Enforcing the DSL to be specified exclusively with strings would be cumbersome and a huge breaking change, so I suggest we just convert integer parameters to strings upon reading the navigation link.

so I suggest we just convert integer parameters to strings upon reading the navigation link

Sounds like JS-like "magic" to me.
I think it would be better to throw an error that only strings are allowed.
This would also cover other cases where not a literal but a reference is used that points to non-String and non-integer values.

I've run into this issue internally, though at the time I thought it was me >.>
I think updating the link DSL would be a breaking change, right?  If that takes too much time I think it would be much better for the framework to just call toString so that the API isn't actively lying to users.

I concur!  I'd also say a combover would also be okay of just changing the return type to dynamic so I don't lose faith in my tools. :-D

Converting everything just to a string would work for me as well, the result for toString() of all kinds of references would also reveal what went wrong.
But now as Dart heading to strong mode, I'd prefer a fail fast strategy that points out errors instead of hiding them to hit me at unexpected times.

Obsolete; this was the old router which is no longer supported.


[DAT 1971] upgrade cuda driver to 11.5.0

Downgrading Cuda tools to 11.0.x for compatibility with TF 2.4.1.
Upgraded to Ubuntu 20.4 and newer version of Java 11 based on  openjdk changes

rebuilt spark images to test
removed cuda toolkit 10.2 from conda requirements. Shouldnt be there
upgraded to pytorch 1.91
made change to dataflow so can get full logs for TF

Just like in docker where you have to install nvidia-docker2plugin to get containers to work, so too in Kubernetes, there is a k8s-device-plugin. According to the documentation here, the highest version of the Cuda driver it supports is 11.4.2  This explains why the AKS node only has the 11.4 driver, instead of 11.5 on standard vms. and why we get the following error when trying to run gan-model image:
Error: failed to create containerd task: OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused \"process_linux.go:407: running prestart hook 0 caused \\\"error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure<EMAIL_ADDRESS>--device=GPU-52bf7563-56df-cf99-3aaf-5bde1eeaf201 --compute --utility --require=cuda>=11.5 brand=tesla,driver>=418,driver<419 brand=tesla,driver>=440,driver<441 brand=tesla,driver>=450,driver<451 --pid=23455 /run/containerd/io.containerd.runtime.v1.linux/k8s.io/auto-discovery/rootfs]\\\\nnvidia-container-cli: requirement error: unsatisfied condition: cuda>=11.5, please update your driver to a newer version, or use an earlier cuda container\\\\n\\\"\"": unknown

This also likely means this is the version that will be supported on EKS because they use the same plugin.
In any case, we have to downgrade base image to 11.4.2 from 11.5 to be compatible with Kubernetes.


silx.gui.utils.image: Added support of QImage.Format_Grayscale8 to convertQImageToArray

Using grayscale8 QImage (available in Qt>=5.5) avoids some array copies/conversion when dealing with text in the OpenGL backend.
This moves minimum required version from Qt5.3 to Qt5.5... I documented minimum version to 5.6 ton Linux to be inline with Windows and macOS. BTW, we don't test with an old version of pyQt... so the effective min version requirement is probably higher.
Small improvement/clean-up done while working on PR #3956

Dependency PyQt5.6 looks really optimistic no?
I am pretty sure there is dependency with at least 5.9, which is imo not a problem.

Dependency with PyQt5.6 looks optimistic no?

+1, never checked I'd say.
I agree 5.9 is more realistic, I'll update it.


Running Blawx code directly in s(CASP) for SWI-Prolog

Hi Jason,
I'm excited to discover this project. I'd like to explore the Blawx dialect of s(CASP)  for SWI-Prolog without using about the Blocky interface.  Could you point me to the instructions to add required Blawx specific extensions/ components?
If there is a better place to post queries like this, please let me know.
Thanks
David

I'm sorry, but no such documentation exists, yet.
I can say briefly that the only ways that Blawx expands on raw s(CASP) on the code side is with a number of predicates designed to encode the ontology structure, which is used for the /onto endpoint and in the interview reasoner; a small library based on LPDAT for defeasibility, which powers the holds, according to, overrules blocks; and a date and duration math library.
It also does code generation and post-processing of output in the interview endpoint, but all of that happens in Python, and the code generated is raw s(CASP).
You can see how a Blawx user's inputs are converted into s(CASP) using these extensions by looking at the Code tab in the right panel of the code editor. The libraries used are available in the source code.
Let me know if that helps. I'd love to learn more about what you are doing. Feel free to write me at<EMAIL_ADDRESS>


Node creation syntax

At the moment is that all of the nodes have to be created up front (w.create_node(stream_name, channel_id, plate_ids)) and, and since we also store a dict of stream_name->node at the same time (N), they can then be accessed during workflow creation using N['whatever'].  I'd actually like to get rid of this, so that you can use notation like the following:
X = hs.plate_manager.plates["X"]

with hs.create_workflow(**kwargs) as w:
    for x in X:
        my_node[x] = hs.factors.my_tool(w, sources=[])

Of course this can't work because my_node hasn't yet been defined. To define it, we need to know what channel it belongs in, and take a reference to the workflow. One way to do this would be to put references to the channels in the workflow, so the last line would become:
        w.channels.memory.my_node[x] = hs.factors.my_tool(w, sources=[])

although I'm not sure if that's going to work either (well it can, but it will be ugly). Actually, there are two references to the workflow on that line (one for the node, and one for the factor), so perhaps old way of referencing the channel could be used:
     M['my_node'][x] = hs.factors.my_tool(w, sources=[])

or another alternative would be to move the channel specification to the right, e.g.:
    w.nodes[x] = hs.factors.my_tool(w, sources=[], channel='memory')

Closing this for now. The current syntax looks like:
M = hs.channel_manager.memory
with hs.create_workflow(workflow_id=workflow_id, **workflow_parameters) as w:
    ticker = w.create_node(stream_name="ticker", channel=, plate_ids=["T"])
    for plate_value in hs.plate_manager.plates["T"]:
        ticker_repeated[plate_value] = hs.factors.clock(sources=[])
    time_interval = TimeInterval(t1, t1 + minute)
    w.execute(time_interval)