max_return() optimisation

I need to get a portfolio with the maximum return out of the whole efficient frontier
I show chart on a screen with dots for efficient frontier from min_volatility()/risk for it as a very left bottom point and I need something like max_return() (and then calculate risk for it) for the very top right point of the efficient frontier.
Currently I calculate say 100 points for efficient frontier and use interpolation to show smooth chart.
various stock data
I need something like max_return()

Hi @benlvovsky,
If your portfolio is long-only, the max_return is simply the highest expected return out of your assets, e.g mu.max(). This corresponds to a portfolio that is 100% weighted in this asset, so the corresponding portfolio volatility is the volatility of that asset.
Once you calculate the max_return, you can just use it as your upper bound in the pypfopt.plotting module, e.g
return_range = np.linspace(min_return, max_return, 100)  # 100 points on the frontier
ax = plotting.plot_efficient_frontier(ef, ef_param="return", ef_param_range=return_range,
                           show_assets=True, showfig=True)

Hope this helps!
Robert

Thanks a lot!
Just one thing which is probably normal: the max return from mu.max() which
I pass to efficient_return() produces a portfolio with slightly different
return. I guess it is a normal error:
end_return = mu.max()
ef.efficient_return(end_return)
(end_return1, end_risk1, _) = ef.portfolio_performance()
end_return  =1.0052181559682412
end_return1=1.0052168269502733
Just want to make sure I am doing it right.
On Fri, 5 Feb 2021 at 12:56, Robert Martin<EMAIL_ADDRESS>wrote:

Hi @benlvovsky https://github.com/benlvovsky,
If your portfolio is long-only, the max_return is simply the highest
expected return out of your assets, e.g mu.max(). This corresponds to a
portfolio that is 100% weighted in this asset, so the corresponding
portfolio volatility is the volatility of that asset.
Once you calculate the max_return, you can just use it as your upper
bound in the pypfopt.plotting module, e.g
return_range = np.linspace(min_return, max_return, 100)  # 100 points on the frontierax = plotting.plot_efficient_frontier(ef, ef_param="return", ef_param_range=return_range,
show_assets=True, showfig=True)
Hope this helps!
Robert
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/robertmartin8/PyPortfolioOpt/issues/275#issuecomment-773726871,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN225SZARXVIOWXWBHCMS3S5NF47ANCNFSM4XD4DRBQ
.

@benlvovsky Maybe one further point: if you have constraints on the weights, the max_return can also be found by solving a linear program:
import numpy as np
import cvxpy as cp
np.random.seed(1)

n = 10
mu = np.abs(np.random.randn(n, 1))

w = cp.Variable(n)
ret = mu.T@w
first_five = np.array([1,1,1,1,1,0,0,0,0,0])  # some random constraints, could be regions, currencies, ...
odd = np.array([0,1]*5)
even = np.array([1,0]*5)
prob = cp.Problem(cp.Maximize(ret),
               [cp.sum(w) == 1,
                w >= 0,
                cp.sum(cp.multiply(first_five,w)) <= 0.3,
                cp.sum(cp.multiply(odd,w)) <= 0.4,
                cp.sum(cp.multiply(even,w)) >= 0.2])
prob.solve()

@robertmartin8 Perhaps it would make sense to include such a helper function, such that e.g. the constraint interfaces from PyPortfolioOpt can still be used. Could also improve the current plotting logic (i.e., add an "auto" case, which plots from GMVP to max return PF.

@phschiele Good suggestions. I can add max_return to the EfficientFrontier class (or do you think it is logically better suited to BaseConvexOptimizer?)
There is certainly a lot of room for improvement in the plotting functionality

It does need the expected_returns variable, which is only being added in EfficientFrontier. So I think putting it there would make sense for now.

One thing I noticed that in the new version I have to reinitialise EfficientFrontier - get a new instance - to get the cacls right:
        ef = EfficientFrontier(mu, S, weight_bounds=(options.lower_weight_bound, options.higher_weight_bound))         ef.efficient_return(val)
In the previous version I just did ef.efficient_return(val) multiple time per new val and all worked. Now I have tocreate a new instance every time otherwise something goes wrong with calcs.

@benlvovsky
When you say "previous version", which do you mean?
Since PyPortfolioOpt moved the backend to CVXPY in v1.0, instantiating an EfficientFrontier object creates an immutable optimisation problem. Methods like efficient_risk add objectives/constraints to this problem, so if you call efficient_risk twice, you are adding two sets of constraints.
Sometimes these play nice, if your subsequent additions are subsets of the previous constraints, but it should fail if the constraints are contradictory.

That explains. Thank you very much
On Mon, 8 Feb 2021, 14:16 Robert Martin<EMAIL_ADDRESS>wrote:

@benlvovsky https://github.com/benlvovsky
When you say "previous version", which do you mean?
Since PyPortfolioOpt moved the backend to CVXPY in v1.0, instantiating an
EfficientFrontier object creates an immutable optimisation problem.
Methods like efficient_risk add objectives/constraints to this problem,
so if you call efficient_risk twice, you are adding two sets of
constraints.
Sometimes these play nice, if your subsequent additions are subsets of the
previous constraints, but it should fail if the constraints are
contradictory.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/robertmartin8/PyPortfolioOpt/issues/275#issuecomment-774837781,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN225S45A5VHGUL4N5EBODS55JQXANCNFSM4XD4DRBQ
.


Fix memory leak: keep all resolver calls under the same lock

Leak occurs because we can end up calling grpc_resolver_next after grpc_resolver_shutdown.

This is a fixit fix.

LGTM.


Extend the leader and web caching

Still a WIP, but this will extend the leader and web cache to other frequently used pieces of information. To start with I extended it to requests (SingularityRequestWithState)
/cc @wsorenson

Going to merge this into the other leader cache PR so changes are all in one place


Do not try to cleanupMounts if daemon.repository is empty

Signed-off-by: Chun Chen<EMAIL_ADDRESS>ESC[37mDEBUESC[0m[0000] Cleaning up old shm/mqueue mounts: start.
ESC[37mDEBUESC[0m[0000] Unmounting /run/shm

I'm seeing such logs. It is because if daemon fails to start during init, daemon.repository can be empty and thus strings.HasPrefix(fields[4], daemon.repository) will pass

Can you please add a test to make sure this doesn't happen again?

the ci is failing because on TestCleanupMountsafterCrash on master on all builds so maybe if this one passes theres our test :innocent:

@jfrazelle Looks like jenkins still failing to run any tests.

sorry @chenchun this needs a rebase

@runcom The code is totally reverted, see https://github.com/docker/docker/pull/15848. I can't rebase now.

I think this is probably deprecated by @calavera ?

@chenchun needs a rebase too

@tiborvass , thanks for reviewing. But daemon_linux.go is an empty file now, I can't rebase. This PR depends on https://github.com/docker/docker/pull/15862. Once that one gets in, I'll rebase. Close it for now.


Make requiresMainQueueSetup static

Fixes build problem.
Add static qualifier to override of requiresMainQueueSetup.

See https://github.com/VittoriDavide/react-native-barcode-creator/issues/4

Closing in favor of PR#3.


”Livezile” is listed in the drop-down menu

Description:
"Livezile" is listed in the drop-down menu alongside its corresponding county and commune, according to the law.
Precondition:
The website is up an running.

Step 1
Type "Livezile" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Livezile, MEHEDINȚI".


data table paginator error

Bug, feature request, or proposal:
Bug
What is the expected behavior?
When list is changed, it is displayed correctly and paginator updated.
What is the current behavior?
I have seen two problems, but have only demo code for one of them.
Both involves first paging to page 2 (or later), and switch data to a shorter list.
Start with a list of say 18 entries. Set page size to 10. Move to page 2 to see entries 11-18/18.
Then switch to a small list. Say 5 entries.

The 5 new items are shown, but they are called 11-18/18 by the paginator. This can be seen in the demo.
No items are visible (!), but the paginator correctly says 1-5/5. This is when happens in my own application (which I cannot yet build a sample code to demonstrate.

In either case, if you change the page size (10 -> 20), the listed items and the paginator numbers will become correct.
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
use this one:
https://stackblitz.com/edit/angular-makxax
it is a fork from the material data table demo.
It shows 18 entries with page size 10.
Switch to page 2 to see 11-18/18
click the "go" button. It changes the source to a small list of 6 entries.
paginator will read 11-18/18 (so it doesn't know things are changed),
but the table rows are shown correctly.
What is the use-case or motivation for changing an existing behavior?
i switch the source list to different things depending on several other controls on the page.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>(that is what I'm using, I don't know what stackblitz is using.
Is there anything else we should know?
I can live with problem 1 (the one demonstrated), but problem 2 is really annoying.

@alexfung888, by running your demo, I couldn't reproduce the first issue:

The 5 new items are shown, but they are called 11-18/18 by the paginator.

You should attach the paginator to the data source
public go() {
  this.dataSource = new MatTableDataSource<PeriodicElement>(ELEMENT_DATA.slice(5,11));
  this.dataSource.paginator = this.paginator;
}

public reset() {
  this.dataSource = new MatTableDataSource<PeriodicElement>(ELEMENT_DATA.slice(0,18));
  this.dataSource.paginator = this.paginator;
}

The other problem is that the paginator doesn't automatically adjust itself if the current page is greater than the number of pages. You must do that manually.

@manklu

I need to reassign the paginator every time I assign a new list, even though it is the same value (the same element)?
that means I have to monitor the paginator events myself? I think the component should do this itself making sure at least the paginator output (item number, total) is consistent with the rows displayed.

after adding    this.dataSource.paginator = this.paginator;
as suggested, I successfully demonstrated my the second of my original problems. The list is empty although the paginator says 'item 1-6 of 6'
Demo:
https://stackblitz.com/edit/angular-makxax-5ix6tp
same as before: go to page 2 (11-18), click go.

I need to reassign the paginator every time I assign a new list, even though it is the same value (the same element)?

Yeah... as it is attached to the datasource which was changed in you demo, it makes sense having to assign it to the new one....
To change this behavior in a consistent way I think the role of the datasource within MatTable would have to be redesigned.

Actually I find it strange that I need to give it a list. I expected it to accept an observable.

@alexfung888

need to reassign the paginator every time I assign a new list, even though it is the same value (the same element)?

No, you could simply assign new values to the datasource.
public go() {
  this.dataSource.data = ELEMENT_DATA.slice(5,11);
}
public reset() {
  this.dataSource.data = ELEMENT_DATA.slice(0,18);
}

that means I have to monitor the paginator events myself? I think the component should do this itself making sure at least the paginator output (item number, total) is consistent with the rows displayed.

No, you only need to adjust the current page if the new number of pages is smaller.

If you change the data in the data source, it does not know what page you intend it to be on. This is something you should control through a binding to the paginator. For example, perhaps the new data is entirely new and should go to page 1, or perhaps data has been removed and it should go to the previous page. Since the answer is not clear, we leave it to the user to set


Select2 4.0.5, 4.0.6 select2:select select2:selecting events are not triggered correctly for the first option only

Hello, I noticed a bug when listening for the select2:select or select2:selecting event.
When we select the first option the select2:select event is not triggered correctly
https://jsfiddle.net/hwuscr0t/10/
http://jsbin.com/ruhozag/edit?html,js,output
The bug also shows up on the documentation page for the first select2 input.
https://select2.org/programmatic-control/events#limiting-the-scope-of-the-change-event
I think its because of the highlighted option. It seems that we can't select the highlighted option.
This highlighted option is selected in the first place. I can retrieve the data using
$('#select2').val()
I was expecting the text to be shown on the input, when we select the first option, even if it is already highlighted and if the data is already set. It would be nice to have the input to display the text when we select this option.
At the moment the user doesn't know if the option is really selected, he has to select the second option, then the first one again to have the input set with the proper text.
I am using Chrome Version 66.0.3359.181 (Official Build) (64-bit), and Firefox 60.0.2 (64-Bit)

Please, send us a JSFiddle example code simulating this scenario (with runnable code and steps described there, to allow us to follow this steps and check the situation). It is much more easy to understand and help to provide some solution or workaround. You are free to reopen when the JSFiddle are done.


Error running bezel with the init script

`Deploying to App Engine...

bazel run upvote/gae:monolith_binary.deploy -- upvote-233719 app.yaml santa_api.yaml
DEBUG: Rule 'io_bazel_rules_appengine' modified arguments {"shallow_since": "1544654581 -0500"}
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_closure/archive/d1110778a2e94bcdac5d5d00044dcb6cd07f1d51.tar.gz] to /private/var/tmp/_bazel_tonylin/bca64804a1a5aa72f10fce1fb59a3167/external/io_bazel_rules_closure/d1110778a2e94bcdac5d5d00044dcb6cd07f1d51.tar.gz: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_closure/archive/d1110778a2e94bcdac5d5d00044dcb6cd07f1d51.tar.gz] to /private/var/tmp/_bazel_tonylin/bca64804a1a5aa72f10fce1fb59a3167/external/io_bazel_rules_closure/d1110778a2e94bcdac5d5d00044dcb6cd07f1d51.tar.gz: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
INFO: Elapsed time: 13.410s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
Fetching @io_bazel_rules_closure; fetching 13s`

Any help is appreciated. Thanks.
Didn't run into access issues....not sure what this is

Sorry for the trouble, Tony. I'll take a look.

What happens if you run:
bazel clean --expunge
..and then try again?

Seems like it's a Java configuration issue. A bit of digging has found some possible workarounds until there's a permanent fix:
https://github.com/bazelbuild/bazel/issues/5099#issuecomment-386278374
https://stackoverflow.com/questions/52311486/bazel-build-behind-proxy/52363929#52363929
https://github.com/bazelbuild/bazel/issues/6196

Hi Matt, the solution didn't work....
download Oracle JDK
copy its cacerts to /etc/ssl/certs/java
same error....
Do i need to change the proxy settings? even though I don't use one?

just tried on a ubunto 18.04 box in GCP, getting the following error instead:
INFO: Found 1 target...
ERROR: /opt/upvote/upvote/gae/modules/upvote_app/frontend/BUILD:20:1: Checking 115 JS files in //upvote/gae/modules/upvote_app/frontend:closure_lib failed (Exit 1)
upvote/gae/modules/upvote_app/frontend/web_ui/detailpage/detail-controller.js:43: WARNING - Please do not use goog.scope to hide declarations.
It is preferable to either create an @private namespaced declaration, or migrate to goog.module.
let ComponentRegistry;
^
ProTip: "JSC_GOOG_SCOPE_HIDDEN_TYPE" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
upvote/gae/modules/upvote_app/frontend/web_ui/hostlistpage/host-controller.js:17: ERROR - Namespace not provided by any srcs or direct deps of //upvote/gae/modules/upvote_app/frontend:closure_lib.
goog.require('goog.i18n.DateTimeFormat');
^
ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
upvote/gae/modules/upvote_app/frontend/web_ui/hostlistpage/host-controller.js:18: ERROR - Namespace not provided by any srcs or direct deps of //upvote/gae/modules/upvote_app/frontend:closure_lib.
goog.require('goog.i18n.DateTimeParse');
^
ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
2 error(s), 1 warning(s)
Target //upvote/gae:monolith_binary.deploy failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.734s, Critical Path: 1.15s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

Having the same error. I have tried on both MacOS and Ubuntu 18.04.
ERROR: /home/user/upvote/upvote/gae/modules/upvote_app/frontend/BUILD:20:1: Checking 117 JS files in //upvote/gae/modules/upvote_app/frontend:closure_lib failed (Exit 1)
upvote/gae/modules/upvote_app/frontend/web_ui/detailpage/detail-controller.js:43: WARNING - Please do not use goog.scope to hide declarations.
It is preferable to either create an @private namespaced declaration, or migrate to goog.module.
let ComponentRegistry;
^
ProTip: "JSC_GOOG_SCOPE_HIDDEN_TYPE" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
upvote/gae/modules/upvote_app/frontend/web_ui/hostlistpage/host-controller.js:17: ERROR - Namespace not provided by any srcs or direct deps of //upvote/gae/modules/upvote_app/frontend:closure_lib.
goog.require('goog.i18n.DateTimeFormat');
^
ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
upvote/gae/modules/upvote_app/frontend/web_ui/hostlistpage/host-controller.js:18: ERROR - Namespace not provided by any srcs or direct deps of //upvote/gae/modules/upvote_app/frontend:closure_lib.
goog.require('goog.i18n.DateTimeParse');
^
ProTip: "CR_NOT_PROVIDED" or "strictDependencies" can be added to the suppress attribute of:
//upvote/gae/modules/upvote_app/frontend:closure_lib
2 error(s), 1 warning(s)
Target //upvote/gae:monolith_binary.deploy failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.866s, Critical Path: 0.83s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
Oddly older git commits are having the same issue as described by https://github.com/google/upvote/issues/46.
Any pointers would be helpful, I have tried on clean environments for both.

The two 'goog.i18n' errors above should now be fixed as of 6650b85416eb2f0ebdbeaaf17badefc27ab1da6d (currently only in staging). I'm still trying to reproduce the PKIX issue.

the init script ran successfully after I did this:

re-install JDK to 12.0.1
re-install Xcode
re-install Bazel to latest version
run "bazel clean --expunge"
reboot the Mac to start from the Safe Mode by pressing the SHIFT keys.

then comment out the section with KMS related configs.
The init script's last line needs to be changed to:
bazel run upvote/gae:monolith_binary.deploy


Service Broker should define the owner reference for the CRs

Bug:
We should let k8s know that the owner of the CRDs that we are using (bundles bundle(binding/instance))
Here is the relevant documentation for the owner reference.
I think that this is not a problem yet, but someday could be something that we need to do.
What happened:
No owner reference is set
What you expected to happen:
The owner reference of the object
How to reproduce it:
boot trap the broker, provision or bind. The resulting objects will not have an owner reference set.

/close


pcap.h was not found

Hi,
On the main directory, I type cmake . , it seams well.
When cmake is finished, I type make.
This is what I get:
[  1%] Building CXX object CMakeFiles/blockmoncore.dir/blocks/PcapSource.cpp.o
/home/qlq/blockmon/blocks/PcapSource.cpp:85:18: 致命错误：pcap.h：没有那个文件或目录
#include <pcap.h>
^
编译中断。
make[2]: *** [CMakeFiles/blockmoncore.dir/blocks/PcapSource.cpp.o] 错误 1
make[1]: *** [CMakeFiles/blockmoncore.dir/all] 错误 2
make: *** [all] 错误 2
Thanks!

After I installed libpcap-devel pkg,  it seamed well.

That is correct, it's not on the instructions (maybe it should?) but the libpcap headers are necessary in order to build blockmon with the PcapSource block.
Since it's working now, could you close this issue?
Thanks!

Thank you jmmlmendes.


[3.5rc1] DOF Near Blur artifact

Godot version
3.5-rc1
System information
Win 10/64 NVIDIA GeForce GTX 1060/PCIe/SSE2
Issue description
DoF Near Blur has a rendering artifact.
It doesn't affect 3.5 beta 5. Far blur is unaffected.

Steps to reproduce
Look through a camera, enable DOF Near Blur, and adjust the distance. It's obvious.
Minimal reproduction project
neardof.zip

Likely regression caused by https://github.com/godotengine/godot/pull/54585. Looking into it now.

Fixed by #61171.


Support input files for build rules

It looks like build rules don’t yet support input files, although XcodeProj does.

Correct. This issue looking for an implementor


expr: source.labels["app"] | "unknown"  returns ""

If a source label app is absent, the following expression returns "" instead of "unknown"
source.labels["app"] | "unknown"
This is not per expectations.

Can we close this now?

Yes. The pr is merged.
Using "iPhone 9";

On Jun 29, 2017, at 10:14 AM, Douglas Reid<EMAIL_ADDRESS>wrote:
Can we close this now?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.


fix(@angular-devkit/build-optimizer): limit actions on webpack bundles

Fixes #403
Fixes angular/angular-cli#9244

@hansl @filipesilva #9244 seems to be back in<EMAIL_ADDRESS>(for me exactly in version 1.7.3), should we open a new issue for it?

@rokerkony opening a new issue in angular-cli with detailed repro steps is the best way to get it fixed on our side. Thanks!


Update release notes to encourage users to update Node.js

Part of https://github.com/alphagov/govuk-prototype-kit/issues/1077

Update is looking good! Just added a few suggestions.

Thanks, suggestions have been applied.

@lfdebrux Thanks! I'll use this PR to incorporate the content from #1103.

I've sent these notes for pre-i.

Notes have passed pre-i. Currently seeking 2i review.


tls_inspector: extract supported ECDSA cipher suites.

This is a very basic ECDSA detection algorithm. The idea is we track which ECDSA cipher suites are
supported by the client (and whether it is fundamentally ECDSA capable), and then will later
reconcile this in the SSL context with the supported server cipher suites.
Part of #1319.
Risk Level: Low
Testing: New unit tests for TLS inspector that mess with cipher suites and curves. There are some
untested paths on malformed ClientHello (just as there are with the existing TLS inspector), where
the error that occur would require some serious surgery on the ClientHello to simulate, see
coverage report for these.
Signed-off-by: Harvey Tuch<EMAIL_ADDRESS>

@davidben would be great if you could weigh in on this one; some of the choices in this are inspired by Google-side details, happy to chat on IM further.

I'm going to close this one out, @davidben, @PiotrSikora have discussed offline a slightly different structure here.


One Click Page Rules

The Cloudflare WordPress Plugin says "One-click WordPress-optimized settings" and to a degree it does this. It would be nice to see this taken a notch further by adding WordPress optimized page rules when using the plugin to apply one click optimization.

adding WordPress optimized page rules what page rules do you mean exactly?

adding WordPress optimized page rules what page rules do you mean exactly?

I'm not sure why but the Cloudflare Documentation recommended page rules for WordPress no longer exist but generally for page rules the following was recommended in the past and is generally used by people using Cloudflare with WordPress today:

example.com/wp-admin
Cache Level: Bypass
Security Level: High
Disable Apps
Disable Performance
.example.com/wp-includes/
Cache Level: Cache Everything, Edge Cache TTL: 1 week, Browser Cache: 1 week
.example.com/wp-content/
Cache Level: Cache Everything, Edge Cache TTL: 1 week, Browser Cache: 1 week

I'd add also maybe implementing these: https://support.cloudflare.com/hc/en-us/articles/228503147-Speed-Up-WordPress-and-Improve-Performance
In reality a lot of the WordPress Cloudflare documentation is outdated so maybe going over current and pass best practices surrounding page rules and setting and just adding some page rules to the one click experience of the plugin? Ultimately without page rules things like the backend are cached and that's not good generally.

The recommended setup is to use Automatic Platform Optimization instead of the page rules with "Cache Everything". I'm going to close the issue as we don't plan to add automatic Page Rules any time soon.

The recommended setup is to use Automatic Platform Optimization instead of the page rules with "Cache Everything". I'm going to close the issue as we don't plan to add automatic Page Rules any time soon.

This isn't a great result for those using who don't want APO and use the Cloudflare plugin. Cloudflare and its plugin should be a world class experience without steering free plan users to paid plans which is what it seems like its come to. Page rules have become stripped down over time with options moving from free to paid. Wordpress support used actually be much better.

This isn't a great result for those using who don't want APO and use the Cloudflare plugin. Cloudflare and its plugin should be a world class experience without steering free plan users to paid plans which is what it seems like its come to. Page rules have become stripped down over time with options moving from free to paid. Wordpress support used actually be much better.


Color.rgb and Color.rgba returns improperly formatted strings

Its a minor issue, but when calling Color.rgb or Color.rgba, the resulting string is missing the closing parentheses. IE rgb(0,0,0 instead of rgb(0,0,0)
@williamngan I can make a quick PR for this one if you'd like.

Ooops, that's embarrassing. 😅  Thanks for catching this. If you can send a PR, that would be great. Thanks @prkirby !


TAMM/ExaChem Updates

Is this pull request associated with an issue(s)?
No
Description
Bumps TAMM and ExaChem versions in the testing environment image.

🚀 [bumpr] Bumped! New version:v0.3.57 Changes:v0.3.56...v0.3.57


do not include H,T, and R in ciphertext

Reading through the code comments, it looks like you are including some information in the cipher text, which IMHO should not be there.
c.f. " FFHHTTRRRR******-------------------------------------DDDD******* "
I think it should rather be like this:
FF******-------------------------------------DDDD*******
Both, sender and receiver, are in possession of the pad. Determining the length of fuzz from pad data is easily possible for both parties without the need of transmitting that info, unless you don't want random fuzz lengths

And do you consider F to be sensitive information that needs to be encrypted?

Thanks!  I think you're right -- I was careless in writing that comment.  The information is not actually included in the ciphertext; it's just read from the pad at encryption and decryption time.  I will update the comment to be clearer on the difference between what gets used versus what gets included in the ciphertext.
Thank you for noticing this.
Yes, I do consider F to be sensitive information.  If you know F, then you know the version of OneTime that was used to encrypt the file, which means you have a lower bound -- and a probable upper bound -- on the date that the message was encrypted.  This would be an unacceptable information leak about the sender's relationship to the plaintext.

Ok, I see your point re F. It's not an issue for me, but I understand it is for some.
Thanks for updating the comments to reflect that H,R,T are not included in the message.
If they were, they'd needlessly increase message size and disclose raw pad data.
This issue can then be closed.


"Error: postgres/print.alterTableAction: unsupported action "add_table_constraint_definition""

When running through the CLI flow with Postgres, I get this error after the step for @updatedAt:
✔ Done migrating @updatedAt? Press 'y' to continue … yes

Let's transition Prisma 1's 1-to-1 relations with @relation or @relation(link:INLINE) to unique constraints on the database. Run the following SQL command against your database:

Error: postgres/print.alterTableAction: unsupported action "add_table_constraint_definition"
    at alterTableAction (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/index.js:36:13)
    at Array.map (<anonymous>)
    at alterTableStmt (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/index.js:27:32)
    at stmt (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/index.js:18:14)
    at Array.map (<anonymous>)
    at print (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/index.js:12:16)
    at Object.upgrade (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/index.js:1206:30)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
    at async main (/Users/nikolasburk/Desktop/upgrade-guide/prisma-binding/dry-runs/prisma-binding-to-prisma2-base/node_modules/prisma-upgrade/dist/cli/index.js:118:3)

This happens repeatedly when I re-run the CLI.
I'm using this Prisma 1 datamodel:
type User {
  id: ID! @id
  email: String @unique
  name: String!
  posts: [Post!]!
  role: Role! @default(value: CUSTOMER)
  profile: Profile
  jsonData: Json
}

type Post {
  id: ID! @id
  createdAt: DateTime! @createdAt
  updatedAt: DateTime! @updatedAt
  title: String!
  content: String
  published: Boolean! @default(value: false)
  author: User @relation(link: TABLE)
  categories: [Category!]!
}

type Profile {
  id: ID! @id
  bio: String
  user: User! @relation(link: INLINE)
}

type Category {
  id: ID! @id
  name: String!
  posts: [Post!]!
}

enum Role {
  ADMIN
  CUSTOMER
}

Please upgrade and try again :-)


Fixed manual time entries, editing entries on invoice generation and editing pages

Notion card
https://www.notion.so/6afc9500b2cc42af86be55f37894fb09?v=185bd45b9dc24dfcad9c57c07d32a7c0&p=984c5819652745fc9d8e47771ac184e7&pm=s
Summary

This PR resolves the bugs in time entries on invoice generation and editing pages. Earlier when user want to add manual entries it was not supporting the time in HH:MM and rate due to that line item total is always wrong or NaN. If user want to edit the entries added on the invoice generation page also the same above mentioned things goes wrong because of that there is no match between line item total, subtotal and amount due.
On the invoice edit page also same bugs are consistent.

Now on the invoice generation page with this PR, user can add manual time entries with the HH:MM format as quantity and rate and line total will auto calculated accordingly.
Now on the invoice generation page with this PR, user can edit the added time entries from new time entries modal. Now the quantity supports HH:MM format as quantity and rate and line total will auto calculated accordingly.

This PR fixes all the bugs related to invoice time entries on both invoice generation & edit page.
Please watch below videos shared in the preview.
Preview

https://www.loom.com/share/7901a08e88894bb8913088b3f1339bec
https://www.loom.com/share/62568522c3ca49dca1507e65656ba0b9
Type of change

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

How Has This Been Tested?

Checklist:

[x] I have manually tested all workflows
[x] I have performed a self-review of my own code

@prasanthchaduvula Can we also implement the same logic here also to convert this 12:87 to 13:27? Also, can we handle validations too?

@apoorv1316  I went through the above comment and quantity on the edit entry is the input box and it’s the user typing it, it’s a live one. If you observe carefully the line total is correct but the quantity input box we are showing what the user enter until he saves it. We can’t instantly change the user input as our UI don’t have any save for individual entry while editing. We are directly using the save button for the complete invoice to update things at one shot. So we can’t change the user quantity input while he is typing and we don’t know whether his typing on the quantity is done or not, until he click on the save button the edit invoice .


PR for issue 16, (7-8): exclude outliers from labeled TMCs

In part due to IsolationForest using a random seed that was not fixed, perfect reproduction accuracy is not expected.

@ABurnage : note that I bumped up the file size limit in the pre-commit config, so that should be re-installed after pulling the development branch to your local machine and testing.


Azure Log Analytics Scaler: Scaled object is defined on http requests but the hpa is scaling on resource cpu on pods  (as a percentage of request)

Report
The configured Log analytics Scaler is based on a count metric
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: trigger-auth-kedaloganalytics
  namespace: default
spec:
  podIdentity:
    provider: azure
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: kedaloganalytics-dev-us-server-scaled-object
  namespace: default
  labels:
    deploymentName: dev-us-server
spec:
  scaleTargetRef:
    kind: Deployment
    name: dev-us-server
  pollingInterval: 10
  cooldownPeriod: 60
  minReplicaCount: 8
  maxReplicaCount: 20
  triggers:
  - type: azure-log-analytics
    metadata:
      workspaceId: "f39f2e7d-f20f-425d-b84c-4a09ce102d64"
      query: |
        let AvgDuration = ago(2m);
        let ThresholdCoefficient = 0.8;
        AppTraces
          |where TimeGenerated > AvgDuration
          |search "INFO"
          |summarize MetricValue = count() by AppRoleName
          |project MetricValue, Threshold = MetricValue* ThresholdCoefficient
      threshold: "2"
    authenticationRef:
      name: trigger-auth-kedaloganalytics

But when I describe the hpa it gives
kubectl describe hpa keda-hpa-kedaloganalytics-dev-us-server-scaled-object
Name:                                                  keda-hpa-kedaloganalytics-dev-us-server-scaled-object
Namespace:                                             default
Labels:                                                app.kubernetes.io/managed-by=keda-operator
                                                       app.kubernetes.io/name=keda-hpa-kedaloganalytics-dev-us-server-scaled-object
                                                       app.kubernetes.io/part-of=kedaloganalytics-dev-us-server-scaled-object
                                                       app.kubernetes.io/version=2.1.0
                                                       deploymentName=dev-us-server
                                                       scaledObjectName=kedaloganalytics-dev-us-server-scaled-object
Annotations:                                           <none>
CreationTimestamp:                                     Mon, 22 Feb 2021 14:30:11 +0530
Reference:                                             Deployment/dev-us-server
Metrics:                                               ( current / target )
  resource cpu on pods  (as a percentage of request):  0% (1m) / 80%
Min replicas:                                          8
Max replicas:                                          20
Deployment pods:                                       8 current / 8 desired
Conditions:
  Type            Status  Reason            Message
  ----            ------  ------            -------
  AbleToScale     True    ReadyForNewScale  recommended size matches current size
  ScalingActive   True    ValidMetricFound  the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)
  ScalingLimited  True    TooFewReplicas    the desired replica count is less than the minimum replica count
Events:           <none>

Expected Behavior
Above the metrics should be as defined in the log analytics query which is a count not (resource cpu) .
kubectl get hpa
Expected
NAME                                                              REFERENCE                  TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
keda-hpa-kedaloganalytics-dev-us-server-scaled-object   Deployment/dev-us-server   2/16    8         20        8          3h36m

Actual Behavior
Current
NAME                                                    REFERENCE                  TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
keda-hpa-kedaloganalytics-dev-us-server-scaled-object   Deployment/dev-us-server   0%/80%    8         20        8          3h36m

Steps to Reproduce the Problem

Make an managed identity based aks cluster
Follow this to enable managed identity authentication for log analytics scaler https://keda.sh/docs/2.1/scalers/azure-log-analytics/#guides
Deploy triggers https://keda.sh/docs/2.1/scalers/azure-log-analytics/#managed-identity-based-authentication
Reference the above yaml file for query.

Logs from KEDA operator
2021-02-22T09:55:39.462Z        INFO    controller-runtime.metrics      metrics server is starting to listen    {"addr": ":8080"}
2021-02-22T09:55:39.464Z        INFO    controllers.ScaledObject        Running on Kubernetes 1.18      {"version": "v1.18.14"}
2021-02-22T09:55:39.465Z        INFO    setup   Starting manager
2021-02-22T09:55:39.465Z        INFO    setup   KEDA Version: 2.1.0
2021-02-22T09:55:39.465Z        INFO    setup   Git Commit: 4866ce69c4897df532b43390bafe4477275bf65a
2021-02-22T09:55:39.465Z        INFO    setup   Go Version: go1.15.6
2021-02-22T09:55:39.465Z        INFO    setup   Go OS/Arch: linux/amd64
I0222 09:55:39.465426       1 leaderelection.go:243] attempting to acquire leader lease keda/operator.keda.sh...
2021-02-22T09:55:39.465Z        INFO    controller-runtime.manager      starting metrics server {"path": "/metrics"}
I0222 09:55:56.884437       1 leaderelection.go:253] successfully acquired lease keda/operator.keda.sh
2021-02-22T09:55:56.884Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob", "source": "kind source: /, Kind="}
2021-02-22T09:55:56.884Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "source": "kind source: /, Kind="}
2021-02-22T09:55:56.985Z        INFO    controller      Starting Controller     {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob"}
2021-02-22T09:55:56.985Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "source": "kind source: /, Kind="}
2021-02-22T09:55:56.985Z        INFO    controller      Starting workers        {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob", "worker count": 1}
2021-02-22T09:55:57.085Z        INFO    controller      Starting Controller     {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject"}
2021-02-22T09:55:57.085Z        INFO    controller      Starting workers        {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "worker count": 1}
2021-02-22T09:55:57.086Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T09:55:57.898Z        INFO    controllers.ScaledObject        Initializing Scaling logic according to ScaledObject Specification      {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T09:57:38.524Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T10:02:29.018Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:17:48.602Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:18:49.776Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:19:50.896Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:20:52.138Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:21:37.746Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:22:39.411Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:23:40.504Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:24:41.646Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:25:42.853Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:26:43.531Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:27:44.616Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:28:45.845Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:29:46.929Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:30:48.051Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:31:49.139Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:32:50.245Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:33:51.335Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:34:52.504Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:35:38.144Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:36:39.728Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:37:40.882Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:38:42.020Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:39:43.108Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:40:43.537Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:41:43.534Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:42:43.535Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}
2021-02-22T11:47:33.243Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "kedaloganalytics-dev-us-server-scaled-object"}

KEDA Version
2.1.0
Kubernetes Version
1.18
Platform
Microsoft Azure
Scaler Details
Azure Log Analytics

Hey, same issue!

We have the exact same issue trying to use Keda to scale applications based on Azure Log Analytics query result !
Keda version = 2.0.0 and Kubernetes version = 1.18.

Would you be able to help @spoplavskiy?

Similar issue #1632 .

@tomkerkhove, could you assign me on this issue. I will have a look this week.

Thanks!

@sagar027, @kibnelbachyr, @enjlee
It looks like there was some changes in keda version 2.1.0 that breaks LA scaler.
While I continue to investigate this issue, you can try to run previous version of keda with LA scaler (I have tested it, it works).
You can do it by running the following command: helm install keda kedacore/keda --version 2.0.1 --namespace keda

@spoplavskiy @sagar027 Downgrading to keda version 2.0.0 worked.
Initially there were some errors regarding aadpodidentity when I redeployed keda pods.
The error was then patched using below commands.
 kubectl patch deployment keda-operator -n keda --type json -p='[{"op": "add", "path": "/spec/template/metadata/labels/aadpodidbinding", "value": "'${IDENTITY_NAME}'"}]'
kubectl patch deployment keda-operator-metrics-apiserver -n keda --type json -p='[{"op": "add", "path": "/spec/template/metadata/labels/aadpodidbinding", "value": "'${IDENTITY_NAME}'"}]'

Now we are getting the expected metrics in hpa
NAME                                                    REFERENCE                  TARGETS          MINPODS   MAXPODS   REPLICAS   AGE
keda-hpa-kedaloganalytics-dev-us-server-scaled-object   Deployment/dev-us-server   17750m/2 (avg)   8         20        20         37m

I'm facing the same issue and, unfortunately downgrading to keda 2.0.0 didn't help.
HPA is trying to use the CPU as a metric.
Name:                                                  keda-hpa-cpfprocessorhost
Namespace:                                             default
Labels:                                                app.kubernetes.io/managed-by=Helm
                                                       app.kubernetes.io/name=keda-hpa-cpfprocessorhost
                                                       app.kubernetes.io/part-of=cpfprocessorhost
                                                       app.kubernetes.io/version=2.0.0
                                                       scaledObjectName=cpfprocessorhost
Annotations:                                           <none>
CreationTimestamp:                                     Fri, 05 Mar 2021 12:23:47 +0300
Reference:                                             Deployment/cpfprocessorhost
Metrics:                                               ( current / target )
  resource cpu on pods  (as a percentage of request):  0% (2m) / 80%
Min replicas:                                          1
Max replicas:                                          10
Deployment pods:                                       1 current / 1 desired
Conditions:
  Type            Status  Reason               Message
  ----            ------  ------               -------
  AbleToScale     True    ScaleDownStabilized  recent recommendations were higher than current one, applying the highest recent recommendation
  ScalingActive   True    ValidMetricFound     the HPA was able to successfully calculate a replica count from cpu resource utilization (percentage of request)
  ScalingLimited  False   DesiredWithinRange   the desired count is within the acceptable range
Events:
  Type     Reason                        Age                  From                       Message
  ----     ------                        ----                 ----                       -------
  Warning  FailedGetResourceMetric       107s (x2 over 2m3s)  horizontal-pod-autoscaler  unable to get metrics for resource cpu: no metrics returned from resource metrics API
  Warning  FailedComputeMetricsReplicas  107s (x2 over 2m3s)  horizontal-pod-autoscaler  invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: unable to get metrics for resource cpu: no metrics returned from resource metrics APIA

ScaledObject:
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: {{ template "chart.fullname" . }}
spec:
  scaleTargetRef:
    kind: Deployment
    name: {{ template "chart.fullname" . }}
  pollingInterval: 15                                # Optional. Default: 30 seconds
  cooldownPeriod:  300                               # Optional. Default: 300 seconds
  minReplicaCount: 1                                 # Optional. Default: 0
  maxReplicaCount: 10
  triggers:
    - type: azure-log-analytics
      metadata:
        query: |
          let AvgDuration = ago(10m);
          customMetrics
          | where name == "ManifestProcessingTime Ms"
          | where timestamp > AvgDuration
          | summarize MetricValue=round(avg(valueSum/valueCount)), Threshold=200
          | project MetricValue, Threshold
        threshold: "30000"
      authenticationRef:
        name: trigger-auth-kedaloganalytics

No any specific logs from Operator:
2021-03-05T09:21:47.431Z        INFO    controller-runtime.metrics      metrics server is starting to listen    {"addr": ":8080"}
2021-03-05T09:21:47.434Z        INFO    controllers.ScaledObject        Running on Kubernetes 1.18      {"version": "v1.18.10"}
2021-03-05T09:21:47.434Z        INFO    setup   Starting manager
2021-03-05T09:21:47.434Z        INFO    setup   KEDA Version: 2.0.0
2021-03-05T09:21:47.434Z        INFO    setup   Git Commit: 50bec808f8b4656922797e4bcb7c2b61fabd6d0e
2021-03-05T09:21:47.434Z        INFO    setup   Go Version: go1.15.3
2021-03-05T09:21:47.434Z        INFO    setup   Go OS/Arch: linux/amd64
I0305 09:21:47.434487       1 leaderelection.go:242] attempting to acquire leader lease  keda/operator.keda.sh...
2021-03-05T09:21:47.434Z        INFO    controller-runtime.manager      starting metrics server {"path": "/metrics"}
I0305 09:22:04.860898       1 leaderelection.go:252] successfully acquired lease keda/operator.keda.sh
2021-03-05T09:22:04.861Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob", "source": "kind source: /, Kind="}
2021-03-05T09:22:04.861Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "source": "kind source: /, Kind="}
2021-03-05T09:22:04.962Z        INFO    controller      Starting EventSource    {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "source": "kind source: /, Kind="}
2021-03-05T09:22:05.065Z        INFO    controller      Starting Controller     {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject"}
2021-03-05T09:22:05.161Z        INFO    controller      Starting Controller     {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob"}
2021-03-05T09:22:05.161Z        INFO    controller      Starting workers        {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledJob", "controller": "scaledjob", "worker count": 1}
2021-03-05T09:22:05.165Z        INFO    controller      Starting workers        {"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "worker count": 1}
2021-03-05T09:23:46.749Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost"}
2021-03-05T09:23:46.749Z        INFO    controllers.ScaledObject        Adding Finalizer for the ScaledObject   {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost"}
2021-03-05T09:23:46.803Z        INFO    controllers.ScaledObject        Detected resource targeted for scaling  {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost", "resource": "apps/v1.Deployment", "name": "cpfprocessorhost"}
2021-03-05T09:23:46.803Z        INFO    controllers.ScaledObject        Creating a new HPA      {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost", "HPA.Namespace": "default", "HPA.Name": "keda-hpa-cpfprocessorhost"}
2021-03-05T09:23:47.341Z        INFO    controllers.ScaledObject        Initializing Scaling logic according to ScaledObject Specification      {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost"}
2021-03-05T09:23:47.351Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost"}
2021-03-05T09:24:02.856Z        INFO    controllers.ScaledObject        Reconciling ScaledObject        {"ScaledObject.Namespace": "default", "ScaledObject.Name": "cpfprocessorhost"}

We were able to discover issues after installing keda with verbose logging enabled and then fetching logs of the keda operator pods. I used this command :
helm install keda kedacore/keda --namespace keda --set logging.operator.level=debug --set logging.metricServer.level=4
If you can try and install keda using above commands, I hope you should be able to get better error messages in the keda operator logs

We were able to discover issues after installing keda with verbose logging enabled and then fetching logs of the keda operator pods. I used this command :
helm install keda kedacore/keda --namespace keda --set logging.operator.level=debug --set logging.metricServer.level=4
If you can try and install keda using above commands, I hope you should be able to get better error messages in the keda operator logs

Thanks @sagar027 !
With debug logs I was able to find the issue - there were problems with Service Principal. Now it works.

Hey i did
helm install keda kedacore/keda --namespace keda --set logging.operator.level=debug --set logging.metricServer.level=4
KEDA INFO
CHART              APP VERSION
keda-2.1.3	2.1.0
downgrading version does not do the work either
still no evolution here.
error that i get is that i don't have the required permissions
2021-03-16T12:58:18.260Z	DEBUG	controllers.ScaledObject	All metric names are unique in ScaledObject	{"ScaledObject.Namespace": "chili-sabdev", "ScaledObject.Name": "kedaloganalytics-consumer-scaled-object", "value": "kedaloganalytics-consumer-scaled-object"}
2021-03-16T12:58:18.561Z	DEBUG	azure_log_analytics_scaler	failed to get metric spec.	{"Scaled object": "kedaloganalytics-consumer-scaled-object", "Namespace": "chili-sabdev", "Inner Error": "error calling Log Analytics REST api. Inner Error: Post "https://api.loganalytics.io/v1/workspaces/185800c6-35e2-49ee-bc0a-61889401dd3b/query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
2021-03-16T12:58:18.570Z	DEBUG	controllers.ScaledObject	ScaledObject is defined correctly and is ready for scaling	{"ScaledObject.Namespace": "chili-sabdev", "ScaledObject.Name": "kedaloganalytics-consumer-scaled-object"}
2021-03-16T12:58:18.578Z	DEBUG	controller	Successfully Reconciled	{"reconcilerGroup": "keda.sh", "reconcilerKind": "ScaledObject", "controller": "scaledobject", "name": "kedaloganalytics-consumer-scaled-object", "namespace": "chili-sabdev"}
But Keda got Contributor role on the entire Azure Management group
can anyone help me here?

Hi,
I am ot what is exactly causing the error but ran into similar errors when the log analytics query was being sent using http and I realised that a newline (\n) character was getting encoded in the base64. It was getting copied when I was copying keys and then getting encoded too. Hence, I used the 'echo' with '-n' switch to encode the keys and it was good. Maybe you can try something similar :
$ echo -n |base64

Hey @sagar027 thanks for the advice but it is still not working.
Btw forgot to mention that when i installed the previous version of KEDA i don't get this error message about authentication problem..
ChiliMeta_Tenant\":\"sabdev\",\"ChiliMeta_Region\":\"westeurope\"}","","","","","","","","","<IP_ADDRESS>","","cronjob-sabdev-monitorqueue-1612164600-j7pmr","PC","","","<IP_ADDRESS>","Amsterdam","North Holland","Netherlands","","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",","Azure","AppMetrics","/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/test_rg/providers/microsoft.insights/components/workspacebased_ai_test"],["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","2021-02-01T07:35:07Z","OverdueTasks",1,0,0,0,"{\"_MS.AggregationIntervalMs\":\"0\",\"ChiliMeta_TasksVersion\":\"0.12\",\"ChiliMeta_Environment\":\"dev\",\"ChiliMeta_Version\":\"<IP_ADDRESS>.2307\",\"ChiliMeta_Cluster\":\"chili-cluster-euwest-dev3\",\"ChiliMeta_Tenant\":\"sabdev\",\"ChiliMeta_Region\":\"westeurope\"}","","","","","","","","","<IP_ADDRESS>","","cronjob-sabdev-monitorqueue-1612164900-mjj9m","PC","","","<IP_ADDRESS>","Amsterdam","North Holland","Netherlands","","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",","Azure","AppMetrics","/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/test_rg/providers/microsoft.insights/components/workspacebased_ai_test"]]}]}"}
2021-03-18T09:44:18.716Z	DEBUG	scaleexecutor	ScaleTarget no change	{"scaledobject.Name": "kedaloganalytics-consumer-scaled-object", "scaledObject.Namespace": "chili-sabdev", "scaleTarget.Name": "chiliservice-sabdev"}
But my hpa is not doing it is supposed

Hi @honnyzo : sorry the previous reply didn't help. Not sure what could be wrong here. Sharing some additional thoughts : In my scenario, I was using AKS (Azure Kubernetes Service) with Managed Identity and keda was assigned an identity as well for 'Log Analytics Reader'. I see you have given KEDA an Contributor role, which would work if the Log Analytics workspace was in the same management group. But if the log analytics workspace is in different subscription, then keda may need to be given 'Log Analytics Reader' access to the workspace. One interesting thing which I noticed in the logs you shared was 'ScaleTarget no change' -- so I was wondering what happens when the value changes for your log analytics query? Maybe the scaler isn't receiving query results in expected format (threshold, metricvalue)? I guess, also checking the logs from kubernetes metric-server could help get some more info if other factors like identity, etc. could be possibly contributing to this resulting the hpa to fall back to cpu scaler ?
I will let keda community experts to chime in and share additional guidance if I am missing anything.

Hi, Is this still an issue in 2.2.0 ? I'm experincing this:
Inner Error: error calling Log Analytics REST api. Inner Error: Post "https://api.loganalytics.io/v1/workspaces/<REDUCTED>/query": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
from 10 "so" objects the exists together.
The so status is falpping between True and False for activity.
Status:   Conditions:     Message:               ScaledObject is defined correctly and is ready for scaling     Reason:                ScaledObjectReady     Status:                True     Type:                  Ready     Message:               Scaling is not performed because triggers are not active     Reason:                ScalerNotActive     Status:                False     Type:                  Active

Hi everyone, I manage to make keda work with this azure log analytics.
But when I go over my threshold it displays something weird.
first: hitting my threshold

second: going over my threshold

does anyone knows why this is happening?

Can you elaborate on what is being weird?

yes, for sure
31 is the sum

so on the target I am supposed to see 31/10
but why am i seeing 8750m/10 and not the amount that my overduetask is returning in the log analytics

Is there any update on this issue?
We are also getting:
scalehandler Error getting scale decision {"Error": "failed to execute IsActive function. Scaled object: xxx. Namespace: default. Inner Error: error calling Log Analytics REST api. Inner Error: Post "https://api.loganalytics.io/v1/workspaces/xxx/query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
Sometimes the Azure LAS works for over an hour before throwing this error and other times it throws it immediately. When the error occurs (and hence the HPA defaults to CPU and then fails), deleting the HPA and letting it be recreated seems to temporarily fix the issue.

Please do not close - we are still facing this issue.

@enjlee @jjoynsonerwin I encountered a similar issue and I was able to solve this behavior by including the following parameters in my trigger authentication. Until I had those entries - the logic kept on defaulting to the CPU scalar.
`apiVersion: v1
kind: Secret
metadata:
name: test-app-trigger-auth-secrets
namespace: test-app
data:
activeDirectoryClientId: encoded
activeDirectoryClientPassword: encoded
tenantId: encoded
workspaceId: encoded
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: test-app-trigger-auth
namespace: test-app
spec:
secretTargetRef:
- parameter: clientId
name: test-app-trigger-auth-secrets
key: activeDirectoryClientId
- parameter: clientSecret
name: test-app-trigger-auth-secrets
key: activeDirectoryClientPassword
- parameter: tenantId
name: test-app-trigger-auth-secrets
key: tenantId
- parameter: workspaceId
name: test-app-trigger-auth-secrets
key: workspaceId`

Hi everyone,
I'm running on a 2.5.0 KEDA version and I'm still have this problem. How can we fix?
Regards

@ifutant How do you know it was defaulting to CPU? If you didn't add the parameters then that means it was misconfigured and should stop, but not default to CPU.

@engineering-dotcms Can you try using KEDA 2.7 please?

@tomkerkhove upgrading KEDA version from 2.4.0 to 2.7.0 solved our problem! Thank you

@engineering-dotcms FYI we plan to release 2.7.1 very soon (matter of days), I recommend you to update to that version then.

I upgraded KEDA to v2.7.0, The auto-scaling is working and our application can scale based on Azure Log Analytics query result. But, I see a persistent warning inside the events of the HPA  :
Warning FailedGetExternalMetric 3m47s (x333 over 4h3m) horizontal-pod-autoscaler unable to get external metric <namespace>/s0-azure-log-analytics-<id>/&LabelSelector{MatchLabels:map[string]string{scaledobject.keda.sh/name: kedaloganalytics-consumer-scaled-object-dev,},MatchExpressions:[]LabelSelectorRequirement{},}: unable to fetch metrics from external metrics API : no matching metrics found for s0-azure-log-analytics-<id>
and this error in KEDA operator :
1.6521939320277655e+09 ERROR scalehandler Error getting scale decision {"scaledobject.Name": "kedaloganalytics-consumer-scaled-object-dev", "scaledObject.Namespace": "dev", "scaleTarget.Name": "dev", "error": "failed to execute IsActive function. Scaled object: kedaloganalytics-consumer-scaled-object-dev. Namespace: dev. Inner Error: error calling Log Analytics REST api. Inner Error: Post \"https://api.loganalytics.io/v1/workspaces/<id>/query\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"} github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).checkScalers /workspace/pkg/scaling/scale_handler.go:278 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).startScaleLoop /workspace/pkg/scaling/scale_handler.go:149

Does your cluster have access to that endpoint? Looks like it's timing out

@tomkerkhove I assume that my cluster have access to Azure Log Analytics endpoint since it happens that the HPA can retreive the metric from Azure Log Analytics :

That's a wrong assumption, because what you are seeing is that HPA is talking to KEDA but it might be that it sometimes can't reach KEDA or it's too slow in responding because the call from KEDA to Log Analytics is taking too long 🤔
Would you mind opening a new issue for this please given this is another problem as far as I see.

@tomkerkhove I have created this issue : https://github.com/kedacore/keda/issues/3031


General "not working" issue

I'm sorry, I don't know how to name this issue.
I followed the installation steps:

Installed playlyfe/gql:

Installed watchman:

Installed this plugin in VSCode & restarted the IDE:

Added a .graphqlconfig file, which points to a graphql file I'd like to edit:

{
  "schemaPath": "src/schema.gql"
}

What works:

Syntax highlighting works fine:

Snippets work fine:

What doesn't work:

Autocomplete - only the default token based autocomplete shows up:

Linting/error highlighting - I couldn't cause any linting errors

Find type - doesn't work

Language server doesnt even seem to be running:

Any pointers on how could I make this plugin work?

Have the same issue - VSCode for Graphql couldn't start
Neither changing schema nor .gqlconfig have any different effect.
.gqlconfig

{
  "schema": {
    "files": "schema.graphql"
  },
  "query": {
    "files": [{
      "match": "packages/**/*.gql",
      "parser": "QueryParser"
    }, {
      "match": { "include": "packages/**/*.js" },
      "parser": ["EmbeddedQueryParser", { "startTag": "gql`", "endTag": "`" }]
    }]
  }
}

@kumarharsh any ideas on what we can try to resolve this?

@TuxujPes The error can happen if schema.graphql file is not present or there is some error in schema.graphql file which is not handled in plugin (Share content of schema.graphql if possible).
To fix issue first check schema.graphql file is present. If the file is present and still error is coming then replace schema.graphql content with below and restart vscode. If everything works fine then you should see error in schema.graphql file Type "xString" not found.
# schema.graphql
type Query {
   name: xString
}

I'm having the same issue here using the exactly same versions and tried the shutdown workaround...
In my case, nothing works... Syntax highlight, nothing...
Can anyone shed a light and what that may be?


[v2] Removing parent UID should remove child paths

Scenario
UID foo.bar.baz exists
Simpla.remove('foo.bar') called
Expected outcome
The foo.bar path is removed. That is, foo.bar and all of its children are removed.
Actual outcome
Only the specific identifier foo.bar is removed, so foo and foo.bar.baz exist, but foo.bar does not.
This will also play into the move from UIDs -> paths, but I imagine is a separate issue in terms of implementation.

Fixed in https://github.com/simplaio/simpla/commit/1c27c1729f9f9ca4b9697c81355188e2750b2e5d


fail e2e tests on unhandled exceptions

Tasks

[ ] fail (all) e2e tests on unhandled frontend exceptions

Use case
all
Related Pull request
#883

@4ydan wrote in https://github.com/ElektraInitiative/PermaplanT/pull/883#discussion_r1320179293

Currently they are not looking at statuses codes or thrown exceptions.

Which status codes do you mean? From backend queries might fail, this can be part of a successful e2e test.

Which status codes do you mean?

Like for example when creating something new, if the backend is returning 201 Created

@4ydan here would be interesting in what you looked so far, what does (not) work and how we can continue in this topic.

for status codes: https://playwright.dev/python/docs/api/class-page#page-wait-for-response
events: https://playwright.dev/python/docs/api/class-page#events

@chr-schr did you already work on this?


Add code to preprocess anatomy/fieldmap data

To make sure we can all reproduce the results of this project, i suggest we put on GH the code that:

fetches a specific version of the dataset
loops through all subjects
perform whatever preprocessing is needed (eg: smoothing of masks, related to #1 ), cropping (eg: based on vertebral labels to only keep the brain + c-spine)
perform processing (eg: getting susceptibilty and fieldmap), related #1
run shim layout optimization model @govish

Steps 1-4 listed are done as of v1.1 - https://github.com/shimming-toolbox/b0-fieldmap-realistic-simulation/tree/v1.1


Remove generated JS files from repo

Since the TS files are compiled every time npm install is run and after any modification to them, would it not make sense to include only TS files for development?

The extension used to have no dependencies and was able to run without npm install. I wanted to ship the generated JS files without the TS sources.
It's impossible now and makes sense not to include the generated JS files in the repo.

Close due to inactivity


[FEATURE] Max hitpoints option

Currently the options for token hitpoints are rolled or average
I would like to see the option for maximum hitpoints as well, my group are powergamers and I typically run with max hitpoints and modifying it for a group of mooks is a pain.

I wanted the same thing so hacked it into my install of token-mold. Line 308 of token-mold.js now reads:
r.evaluate({maximize: true}); /* max hit points -svs */
I would be happy to contribute with a pull-request for a proper implementation if that's useful.

I wanted the same thing so hacked it into my install of token-mold. Line 308 of token-mold.js now reads:
r.evaluate({maximize: true}); /* max hit points -svs */
I would be happy to contribute with a pull-request for a proper implementation if that's useful.


Fatal Unhandled Exception System.Text.UTF8Encoding.GetByteCount(String chars)

Please note: ScriptHookVDotNet is NOT ScriptHookV!
If you get a FATAL error (e.g. FATAL: Unknown game version after a game update), than this project is not responsible and you instead need to wait for ScriptHookV to update.

Version
SHVDN v2.10.12 as part of release 3.0.3,
Project is built against 2.10.10
Description
This has happened a few times now and under no consistent conditions. I have two buttons on a GUI and when I select one of them, this error is thrown.
System.ArgumentNullException: Value cannot be null.
Parameter name: s
at System.Text.UTF8Encoding.GetByteCount(String chars)
at SHVDN.NativeFunc.PushLongString(String str, Action`1 action)
at GTA.UIText.Draw(Size offset)
at GTA.UIText.Draw()
at CustomHSLSetter.HSLPicker.Draw()
at CustomHSLSetter.cCustomHSLSetter.onTick(Object sender, EventArgs e)
at SHVDN.Script.MainLoop()
There are no errors in the ScriptHookVDotNet2.log, only the ScriptHookVDotNet.log

Edit, I have found out when this happens but I am not sure why. A UIText.Caption seems to be getting set to "" when I change a control... which I have now prevented.
But is this error caused because an empty string is being passed to a SHVDN function that always expects there to be text in the caption?

"" or string.Empty are supported, null is not. Judging by the exception it was set to null?.


Updates from rspec-dev (2015-07-09)

These are some updates, generated from rspec-dev's rake tasks.

:+1: Thanks!


Incorrect result of view(array, ellipsis())

xt::view() handles xt::ellipsis() incorrectly:
auto a = xt::xarray<int>::from_shape({4,3,2});
auto v = xt::view(a, xt::ellipsis());
EXPECT_EQ(a.shape(), v.shape());  // fails

for(auto k: a.shape())
{
    std::cout << k << ", ";       // prints 4, 3, 2
}
std::cout << " a.shape()\n";

for(auto k: v.shape())
{
    std::cout << k << ", ";       // prints 0, 3, 2
}
std::cout << " v.shape()\n";

std::cout << xt::info(v) << "\n";
// Prints:
// Value type: int
// Layout: dynamic
// Shape: (0, 3, 2)
// Strides: (6, 2, 1)
// Size: 0

BTW, support for printing shapes would be helpful.

Hey, you can use xt::info for infos on the array including shape :) Also, ellipsis is unfortunately only supported on dynamic view as I think the docs state as well.

Ellipsis is unfortunately only supported on dynamic view as I think the docs state as well.

Then the code should not compile or throw an error. Silently returning wrong results is a bug, and documenting it is not helpful.

Yeah, gives a nice error message now :smile:


Add cache expiration time configuration description

If the cache time is too long, it is recommended to reduce the parameter value (For example, the JDBC Engine console configuration cannot take effect immediately due to caching)
Related PRs
Related pr:https://github.com/apache/incubator-linkis-website/pull/262

No follow-up feedback A new PR has been merged #262


Update examples to support section_data_by_name returning Cow

Coverage remained the same at 92.701% when pulling 7331e0294178528a4f4fa8e5051937ec9baef4ec on rocallahan:cow into da9fad8f51d7748ebb136f86a274a35e74843e95 on gimli-rs:master.


Video guides

Pr:
https://github.com/XcmSend/xcmsend.github.io/issues/18
https://github.com/XcmSend/xcmsend.github.io/issues/17

videos still needs to be done, merge to close


Add Fiat data collection from Bank of Canada

Get, parse, and store data from Bank of Canada

Need to just finish adding it to a database


Logout routing

On '/logout' route the user cookie mus be cleared.
Redirect to /index

closed by https://github.com/trngl8/library-project/issues/80


SPC SPC and c-o cannot pop up action menu

What did you expect to happen?
SPC SPC and c-o should pop up action menu.
What actually happened?
SPC SPC and c-o open the file directly.
Steps to reproduce:

SPC p p open a project
SPC SPC
c-o

System information:

SYSTEM  type       darwin
        config     x86_64-apple-darwin19.6.0
        shell      /bin/zsh
        uname      Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
        path       (~/.emacs.d/bin/ ~/.yarn/bin ~/.config/yarn/global/node_modules/.bin ~/.nix-profile/bin ~/.emacs.d/bin /usr/local/opt/llvm/bin ~/.cargo/bin ~/SDK/sciter-sdk/bin.osx/ ~/.pub-cache/bin /Library/Frameworks/Python.framework/Versions/3.7/bin /usr/local/sbin ~/SDK/flutter/bin /usr/local/share/dotnet ~/Documents/Gocode/bin /usr/local/apache-ant-1.9.3/bin ~/SDK/android-sdk-macosx/tools ~/SDK/android-sdk-macosx/platform-tools ~/SDK/android-sdk-macosx /usr/local/apache-ant-1.9.3/bin ~/SDK/android-sdk-macosx/tools ~/SDK/android-sdk-macosx/platform-tools ~/SDK/android-sdk-macosx ~/SDK/cocos2d-x-3.7.1/templates ~/SDK/cocos2d-x-3.7.1/tools/cocos2d-console/bin /opt/local/bin /opt/local/sbin ~/.nvm/v0.10.26/bin /usr/local/j2objc-0.9.5 /usr/local/mongodb/bin /usr/local/gradle-2.1/bin /usr/share/java/apache-maven-3.0.5/bin ~/SDK/android-sdk-macosx/platform-tools ~/SDK/android-sdk-macosx/tools ~/Documents/Gocode/bin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /usr/local/git/bin /usr/local/ant/bin /usr/local/go/bin /nix/store/m41ksg1c4p4hh55sdmcy8siy08pdp7z3-emacsGccDarwin/libexec/emacs/28.0.50/x86_64-apple-darwin19.6.0/)
EMACS   dir        ~/.emacs.d/
        version    28.0.50
        build      Oct 09, 2020
        buildopts  --prefix=/nix/store/m41ksg1c4p4hh55sdmcy8siy08pdp7z3-emacsGccDarwin --disable-build-details --with-modules --with-ns --disable-ns-self-contained --with-nativecomp --with-ns CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200
        features   JPEG TIFF PNG RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES NATIVE_COMP THREADS JSON PDUMPER
        traits     (server-running envvar-file)
DOOM    dir        ~/.doom.d/
        version    2.0.9
        build      HEAD -> develop 8ba2f15c7 2020-10-08 16:39:45 -0400
        elc-files  0
        modules    (:completion company (ivy +icons +prescient +childframe) :ui doom doom-dashboard hl-todo modeline ophints (popup +all +defaults) treemacs vc-gutter (window-select +numbers) workspaces :editor (evil +everywhere) file-templates (format +onsave) multiple-cursors rotate-text snippets word-wrap :emacs dired electric undo vc :term vterm :checkers syntax :tools (eval +overlay) lookup lsp :os macos :tools magit rgb taskrunner :lang (dart +flutter +lsp) emacs-lisp (go +lsp) json (javascript +lsp) lua markdown org rest sh web yaml :config (default +bindings +smartparens))
        packages   ((lsp-ui :disable t) (literate-calc-mode) (tiny))
        unpin      (n/a)
        elpa       (n/a)

Can confirm. This only happens with (ivy +childframe).

This seems to be an incompatibility with ivy-childframe, but haven't had the time to determine if the issue is internal (in Doom) or external (in ivy-childframe).

Not sure if it's of any help, but:
when i remove the binding for ivy-dispatching-done, C-o triggers the hydra (not the menu as before).
https://github.com/hlissner/doom-emacs/blob/8024f4edf918a1c909ff5edc4f35b8f7f7dbff4e/modules/completion/ivy/config.el#L108

Turns out this was an ivy-childframe issue, which was fixed upstream in tumashu/ivy-posframe@d16fbb0. As of dc50c6b the :completion ivy module now pins to a commit of ivy-childframe that includes this fix, so this issue is resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!


Allow different instances of FlavourSaver

Currently, FlavourSaver is a singleton. This means that all uses have to share the same partials, helpers and so on. This is problematic, because it's sometimes desirable to have different instances in the same program, each with their own helpers, because these helpers can then close over local variables in the context they are created.

To illustrate my particular problem:
class MyRenderer
    def initialize template, globals = {}
        @template = Tilt['handlebars'].new { template }
        FlavourSaver.register_helper :global do |name|
            globals[name]
        end
    end

    def render data
        @template.render data
    end
end

Unfortunately, this won't work, because each instance of MyRenderer overrides the previous definition of the helper global with its own.
If it were possible to instantiate FlavourSaver, the following would be possible (just an example):
class MyRenderer
    def initialize template, globals = {}
        @fs = FlavourSaver.new
        @template = @fs.new_template { template }
        @fs.register_helper :global do |name|
            globals[name]
        end
    end

    def render data
        @template.render data
    end
end

This seems like a reasonable request. Shouldn't be too hard to break up.

I gave it a try, it turned out to be not as simple. The way the current instance is passed through Tilt is a horrible hack, and in any case, it's not backward compatible. Maybe you have an idea how to do it properly...
Anyway, here is how far I got:
https://github.com/schuetzm/FlavourSaver/commits/instances

@schuetzm you can implement what you originally wanted by passing required helpers as a second argument to render method.
Tilt['handlebars'].new { "Value - {{myhelper}}" }
  .render(OpenStruct.new, myhelper: -> { "From Helper" })
# => "Value - From Helper"

Tilt['handlebars'].new { "Value - {{myhelper}}" }
  .render(OpenStruct.new, myhelper: -> { "Another text" })
# => "Value - Another text"

Tilt['handlebars'].new { "Value - {{myhelper}}" }
  .render(OpenStruct.new)
# => "Value - "

The calls are completely independent, although I'm not sure about thread safety.


[v1.15] gh/workflows: fix skipping of no-frag test in ipsec-e2e workflow

The no-frag test needs to be skipped after the key rotation. The upstream patch has it right, fix up the backport.
Fixes: b636828c2f12 ("gh/workflows: Skip no-frag in IPsec for some key rotation")

/test-backport-1.15


Update React.js and React-Router Versions

... as the title says (updated package.json to react and react.router 0.13.*)

+1

Thanks @weblogixx


$container isn't set

Some of the commands require the $container variable, but this variable is not set in the tutorial.

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

ID: db3d06eb-12d1-5fdb-e5f7-647556d0d38b
Version Independent ID: 8f53d1c4-316d-76ca-8664-6a18ba3676c1
Content: How to enable Azure Key Vault logging
Content Source: articles/key-vault/general/howto-logging.md
Service: key-vault
Sub-service: general
GitHub Login: @msmbaldwin
Microsoft Alias: mbaldwin

@joshnoe
Thanks for your feedback! We will investigate and update as appropriate.

@joshnoe can you be more specific which commands are required container. I see this with container specified: Get-AzStorageBlob -Container $container -Context $sa.Context -Blob '*/VAULTS/CONTOSOKEYVAULT3

@joshnoe can you be more specific which commands are required container. I see this with container specified: Get-AzStorageBlob -Container $container -Context $sa.Context -Blob '*/VAULTS/CONTOSOKEYVAULT3

Updated

Updated

#please-close

#please-close


Use JPEG Pixel Format for Camera Capture

This is a simple PR that requests JPEG pixel format instead of YUV. This simplifies the go image fill and avoids issues with handling interleaved vs non-interleaved YUV when running on different devices.
Tested on an Android Tablet and Emulator running on Darwin.

are there perf implications to this? (extra compression roundtrip on small devices)

Only difference wrt performance is that we are now "decoding" jpeg into YCbCr using jpeg.Decode instead of the previous hand-rolled conversion from YUV420 to YCbCr. We are still repackaging into JPEG to send over GRCPC.
This is a little confusing as we are unpacking JPEG into a goimage (in YCbCr pixel format) then performing rotations and then repackaging as JPEG for the API response. This is not as crazy as it seems and is done across our cameras (even when choosing a JPEG Webcam source).
Did not notice any significant slowdown but will do some profiling to double-check before merging.

awesome makes sense


Implement a Language Server Protocol for editors

Implement an LSP (Language Server Protocol) for RainLisp.
This will enable an even more powerful integration with VSCode than the already provided one by rainlisp-vscode.
It will also support other editors using it.

Implementing an LSP (Language Server Protocol) for RainLisp involves creating a server application that understands the LSP protocol and interacts with the RainLisp language. Here's a simplified example of how you might implement an LSP server for RainLisp using Python and the python-language-server library:
from typing import List, Dict, Any, Optional
from lsp_server import BaseLanguageServer
from lsp_types import InitializeParams, InitializeResult, TextDocumentSyncKind, Position, Range, \
    CompletionItem, CompletionList, CompletionParams, CompletionContext, \
    MarkupContent, MarkupKind

class RainLispLanguageServer(BaseLanguageServer):
    def __init__(self):
        super().__init__()
        # Initialize any necessary state for your language server here

    def initialize(self, params: InitializeParams) -> InitializeResult:
        # Perform any initialization tasks here
        capabilities = {
            "textDocumentSync": TextDocumentSyncKind.Incremental,
            "completionProvider": {
                "resolveProvider": False,
                "triggerCharacters": ["(", "'", '"']
            }
        }
        return InitializeResult(capabilities=capabilities)

    def completion(self, params: CompletionParams) -> Optional[Union[List[CompletionItem], CompletionList]]:
        # Provide completion suggestions here
        # Example implementation
        completion_items = [
            CompletionItem(label="function"),
            CompletionItem(label="variable"),
            # Add more completion items as needed
        ]
        return completion_items

    # Implement other LSP methods as needed

if __name__ == "__main__":
    server = RainLispLanguageServer()
    server.start()

In this example, BaseLanguageServer is a hypothetical base class that handles the communication protocol of the LSP. You would need to implement or use a library that provides the LSP communication protocol.
The initialize method initializes the language server and returns its capabilities. In this example, it declares support for incremental text document synchronization and completion provider with specific trigger characters.
The completion method handles completion requests from the client. It returns a list of completion items based on the current context.
You would need to implement other LSP methods such as textDocument/didOpen, textDocument/didChange, textDocument/didSave, etc., as required by the Language Server Protocol.
Please  note that this is a simplified example, and you may need to adjust it based on the specifics of RainLisp and the requirements of your implementation. Additionally, you'll need to handle the parsing and analysis of RainLisp code within the server to provide accurate language features like code completion, hover information, etc.

Thank you for the feedback.


Consider documenting interactions with Ranges

I don't follow this one.  What specific interaction should be documented that isn't?

This suggestion is from Gavin's comment
https://lists.boost.org/Archives/boost/2019/12/247827.php

I don't think this is a useful change to make to the docs.


Analog input filtering/dampening

Hi, love this program. (And it's AHK predecessors...)
I'd love to implement dampening filters to smooth out movements done with analog sticks on a controller. DIRT Rally's default steering smoothing is ridiculously strong, but raw input isn't ideal for driving either. I'm thinking of a damped spring filter with a few variables for start, but I'm sure there are different algorithms for this purpose if the spring based one wasn't very good...
Would it be just another plugin?
Thanks.

Whatever way you want to do it, something running at a timed interval seems reasonable in this instance, but you would want to be sure to stop the timer when the plugin DeActivates etc.
At the moment, plugins are all in one file, but we intend to make each plugin it's own DLL, so what you do in your own plugins would be your own business :)
BTW, if you want to discuss stuff, best place is the Discord channel rather than the issue tracker...

Thanks! I'll create a PR.


Sanitize TODOs before composing

make sure todos dont contain characters that break the comment

TODO

[ ] src/elements/control-issue.ts:74: TODO #74 make sure todos dont contain characters that break the comment link

Tracked Branch: refs/heads/main | Tracked commit: 6a32e4634580ee71ea6f22ba0307010ebe8a8d18


Publish 3.0 snapshot documentation

Configure Github action to publish snapshots docs for 3.0.x branch to https://docs.awspring.io/spring-cloud-aws/docs/

Hi @maciejwalkowiak, in case you weren't aware (and assuming you're ready with the 3.0.x snapshot docs) - I get an Access Denied error on attempting to view the docs at https://docs.awspring.io/spring-cloud-aws/docs/ -
.
Cheers.

https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-SNAPSHOT/reference/html/index.html - this is the correct link. Docs are not up to date though, we will work on it before M1 gets released.


Add Carbon

This is a new PR with the same purpose as this PR: https://github.com/LeaVerou/color.js/pull/195

@LeaVerou this one should be okay now. Please review and let me know if I need to change anything else.

Hi @sayzlim, thank you! I think I would prefer it closer to the right side of the viewport on large screens, rather than right next to the content. Would you be able to make this change?

@LeaVerou all set! Please review again.

Fantastic, thank you!


Getting Error even PDF File size is less than 4 MB

Hi, I have 5 test PDF files (1 pager) of similar data and none of them exceeds 4MB. After I upload to a Blob container and try to train, I am getting this error - "Operation returned an invalid status code 'RequestEntityTooLarge'". Is there any limitation on overall container size?

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

ID: 400d903c-36d4-e20b-d2fc-b80b53b00ceb
Version Independent ID: 210dbaf5-eda5-f50e-8d8e-18b86daff035
Content: What is Form Recognizer? - Azure Cognitive Services
Content Source: articles/cognitive-services/form-recognizer/overview.md
Service: cognitive-services
Sub-service: forms-recognizer
GitHub Login: @PatrickFarley
Microsoft Alias: pafarley

@githubavi
Thanks for the feedback! We are currently investigating and will update you shortly.

@githubavi Hi, the 4MB limit is for all the dataset in the blob container. You have to point to a blob with smaller data. Thanks and sorry for your experiences.
We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.


unconverted data remains: Z

Sometimes we get this error which makes a recipe fail. I suspect it's something to do with the way we are measuring expiry of tokens.

Saw this happening today on every JamfUploader recipe run during the JamfCategoryUploader step. Issue went away after we deleted /private/tmp/jamf_upload and /private/tmp/jamf_upload_token based on troubleshooting guidance given in MacAdmins Slack.
Traceback if it helps:
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 626, in process
    self.main()
  File "/path/to/RecipeRepos/com.github.autopkg.grahampugh-recipes/JamfUploaderProcessors/JamfCategoryUploader.py", line 119, in main
    token = self.handle_uapi_auth(self.jamf_url, self.jamf_user, self.jamf_password)
  File "/path/to/RecipeRepos/com.github.autopkg.grahampugh-recipes/JamfUploaderProcessors/JamfUploaderLib/JamfUploaderBase.py", line 225, in handle_uapi_auth
    token = self.check_api_token(url)
  File "/path/to/RecipeRepos/com.github.autopkg.grahampugh-recipes/JamfUploaderProcessors/JamfUploaderLib/JamfUploaderBase.py", line 156, in check_api_token
    data["expires"].split(".")[0], "%Y-%m-%dT%H:%M:%S"
  File "/Library/AutoPkg/Python3/Python.framework/Versions/Current/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/Library/AutoPkg/Python3/Python.framework/Versions/Current/lib/python3.7/_strptime.py", line 362, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains: Z
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
unconverted data remains: Z
Failed.

I have pushed a change to JamfUploaderBase to attempt to handle this better. It now incorporates the Z in the time import step, which python's datetime seems to accept, and I have added an exception statement that, if it can't recognise the time format, will just not return the token and a new one will be obtained. So recipes should not fail any more either way. But, let me know if you still see failures - I will also be monitoring this on our own runs of course.


RegExp documentation does not mention DOS risk

Per the conclusion on https://github.com/dart-lang/sdk/issues/50301#issuecomment-1293645935, it is expected that RegExp matches can take arbitrary amounts of time (e.g. hours) when faced with carefully-crafted inputs. Currently the documentation for the RegExp class provides no guidance regarding this risk.
We should add a "Risks" section to the RegExp API docs that discusses the dangers of processing data using user-provided patterns or user-provided inputs, recommended mitigations, suggestions on how to design regular expressions safely, how to test them for such risks, etc.

The default Map and Set implementations are also vulnerable to computational complexity attacks. https://www.kb.cert.org/vuls/id/903934/


Adding Vuetify

Hi @danijelh would you mind to show me how I add Vuetify in the project? Thanks.

Hi 👋,
it should be pretty straightforward.
1. Install the pacakge
Run npm install vuetify --save
2. Reference vuetify .css
In site.css change the following lines
// @import "~bulmaswatch/flatly/bulmaswatch.scss"; // Comment out Bulma
@import "~vuetify/dist/vuetify.min.css"; // Add vuetify css

3. Add vuetify in modules
So in modules where you want to use Vuetify you add the following lines
import Vuetify from 'vuetify'
Vue.use(Vuetify)

That's it. Also, don't forget to wrap the HTML in <v-app> tags before using the framework components.
Also also, take note that since Vuetify is a complete framework it's maybe not best suited for the multipage applications. But, by all means, you can use it in your modules and it will work the same as in the project with Vue CLI.

Thanks @danijelh. I really appreciate that.
Could you please explain a bit more about Vuetify probably is not the best for multipage application? Will it be performance wise or harder to work with or something else?

No, it will work just fine and as any multi-page application. What I meant to say is that Vuetify itself was designed to be used primarily in a SPA but since every module is a SPA for itself you'll find yourself with multiple spa's and multiple Vuetify imports. It's just organizational thingy, something like using multiple Angular applications within the same application but on a much lower scale. Anyway, you're fine with Vuetify, regarding performance and usage everything is ok.

Thanks @danijelh. You can close this issue if you want. I have been able to add Vuetify to my .net project.

Gr8! Happy developing 👍


Submitting NTop version 0.3.20

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the directory's name containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service agree

@wingetbot run

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Packages\gsass1.NTop__DefaultSource\ntop.exe returned exit code: -1073741515
Executable C:\Users\validator\AppData\Local\Microsoft\WinGet\Links\ntop.exe returned exit code: -1073741515

Automated error analysis suggests -1073741515 may mean STATUS_DLL_NOT_FOUND - possibly due to a dependency on Microsoft.VCRedist.2015+.x64 (or .x86).
(Automated response - build 897.)