How to handle multiple clients with different default pages?

For discussion, I want to know how people are handling multiple clients and default pages for each client.
I have 3 tablets in different rooms running fully kiosk pointing to the same TB index.html hosted on the HASS server www folder (I had different local instances earlier). I want each tablet to have a different default page (each room has a page defined in TB).
Ideally, if I could specify the page using a URL parameter, that would be an easy solution. Each kiosk would have a different URL then.

I have a separate pages variable with entries for each tablet (as well as a default and a global). I then use the fully.getDeviceId() function to return a unique ID for each tablet, and inject the correct pages variable into CONFIG.pages.
if (typeof PAGES[deviceId] === 'undefined') { CONFIG['pages'] = PAGES['default']; } else { CONFIG['pages'] = PAGES[deviceId]; }
CONFIG['pages'] = CONFIG['pages'].concat(PAGES['global']);

I may change it though, because this makes it impossible to debug on a different tablet since they're tied to the tablet's device id.

https://github.com/resoai/TileBoard/wiki/Mobile-configuration#how-do-i-divide-configs-on-mobile-and-non-mobile


Screensaver remains "black" after starting: Could not open manifest for source, issues specific to China.

Mac model: MacBook Pro (Retina, 15-inch, Mid 2015)
macOS version: 10.15.6
Monitor setup: External 1080P monitor
Hello, I am a mainland China user. I have been using your screensaver for many years, many thanks for your contribution. I'm new here and not an expert.
Recently, I upgraded Aerial to 2.0.9. As you know, China's network firewall limits the external access of some websites. Only through VPN can we solve this problem. I found that if I shut down the VPN, the software would not work normally. After launching, it would be black, and only by pressing the power button could the lock screen interface be restored and the password could be entered. But if I turn on VPN, everything is OK. I've downloaded all the videos before, so it shouldn't be about caching. I checked the log and found out "Could not open manifest for source at https://aerialscreensaver.github.io/community/".
I would like to ask if there is any way to solve this problem, so that I can normally use the screen saver without opening the VPN. The 1.9.X I used earlier didn't have this problem.
I have attached the relevant log.
AerialLog.txt
Thanks again.

Hey there,
Thanks for the report, it's pretty hard to test around the firewall so sometimes I miss things. I was told though from another Chinese user that this : https://aerialscreensaver.github.io/community/entries.json
worked behind the firewall. I guess it does not.
Regarding your specific issue, there's currently a bug in 2.0.9 that might be behind this, it tries to download that file at startup even if it's already cached. I'll release a fix tonight and will let you know.

@linyifan96 apologies it took me so long, I fixed the bug in 2.0.10, please check and let me know : https://github.com/JohnCoates/Aerial/releases/download/v2.0.10/Aerial.saver.zip


Character editor "Save character" button only works once

Describe your bug here.
Mind you, if you are modding, please try testing your bug in a clean version of the engine instead, this ensures the bug is actually caused by the engine itself.
Post title should be self-explanatory.
Command Prompt/Terminal logs (if existing)
No response
Are you modding a build from source or with Lua?
Lua
Which branch of the engine are you using?
Latest (main)
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
removed guitar hero held notes

turns out i was on out of date version i think 💀 mb


Update to 1.19.2

As usual, Mo-Jank doing their best to break mixins and chat. That won't stop me. :D

Hey! I've been away for a couple of weeks, thanks for this!! I'm going to test it as soon as I can and merge for a new release


Expose HttpClient.AllowAutoRedirect in cluster config?

Would be super handy to not have to write a custom code just to get access to this one property... a lot of our legacy code uses fully qualified URLs in the redirects so it's causing us to hop off the proxy frequently.

The client usually needs to be aware of redirects in order to store cookies, complete auth flows, cache, etc.
What kind of redirects are you seeing?
See these docs for recommendations to get apps to generate links and redirects with the correct host names:
https://microsoft.github.io/reverse-proxy/articles/header-guidelines.html#x-forwarded--forwarded

We've got some 307 (authorization redirect) and some 301 (content has moved) the issue is, again; they are fully qualified domains in the redirect so stuff on the other side of the proxy can't access where they're being redirected to.

I'd be surprised if AllowAutoRedirect worked for auth scenarios, it would break if there are any cookies involved.
If you don't want to modify the existing app to use forwarders then you could also use a response transform to rewrite the Location header.
https://microsoft.github.io/reverse-proxy/articles/transforms.html#addresponsetransform

I'd be surprised if AllowAutoRedirect worked for auth scenarios, it would break if there are any cookies involved.

Would the cookies not be proxied out to the client? The client would then send them to the proxy and those would be passed to the server, don't see why that would be an issue.

Set-Cookie headers included on the 30X redirect response would not be proxied to the client if the proxy automatically redirects, the client never gets that 30X response. Set-Cookie is pretty common on 30X auth responses for scenarios like OAuth, OIDC, and forms auth.

Seems like that goes against the expected behavior of Set-Cookie, I would expect a proxy to queue up Set-Cookie for a domain and send those when you reach the end of a redirect chain... (sigh) looks like this will require custom code, since this seems to be a fundamental issue with httpclient's implementation.

I would expect a proxy to queue up Set-Cookie for a domain and send those when you reach the end of a redirect chain

Nope, I'd be curious to see if any proxy supported that.

Sounds like this has been answered, closing issue.


Is it possible to construct an octree for a CT(Computed Tomography) image(e.g., 512^3 size)?

O-CNN constructs an octree based on point cloud. From my perspective, any high-dimensional data (e.g. dim>=3) could also has its octree through a somewhat different construction. For example, my data is a three-dimensional computed tomography image which has a size of 512^3. I want to borrow the idea of O-CNN and construct an octree for CT images. Is it possible?

was it possible?


UI: Add table render in separate file to make more readable

Describe the bug
There is use of the 'useTable' hook which can be very verbose; abstracting it into it's own file will make the code more readable and developer friendly.
To Reproduce
Steps to reproduce the behavior:

View the current application of the 'useTable' hook in the dashboard file.

Hi @utsab I will be working on this issue.


Remove config.tabs_style from the initializer using the upgrade tool.

Also add a little recipe on how to apply the scrollable tabs style by applying the css rule


Add cake-contrib user on NuGet.org

First of all, I wanted to thank you for adding to the Cake community by adding this addin.
I was just wondering if you had seen this blog post:
http://cakebuild.net/blog/2016/08/cake-contribution-organization
We are currently going through a process of increasing the visibility of addins, and also trying to ensure their long term maintainability.
To that end, we are asking addin creators to add the cake-contrib user on NuGet as a co-owner (this can be done through the NuGet website by clicking on Manage Owners on the package page).
Would you be interested in doing this for Cake.Packages? If you have any questions about this, please let me know. There was some initial concern that the Cake Team were trying to "take over" packages, and that couldn't be further from the truth, and if you have this concern, or others, I would like to address them.
Thanks!

@tomstaijen just wanted to touch base to see what your thoughts are on this, thanks.

I just wanted to follow up with this issue.  Thanks


/richest does not work with SQLite

In the SQLite database, the metrics displayed in the rankings are not updated after the first account update.
(If recompute-frequency is set to 0, the metrics will be updated.)

Is this issue specific to SQLite?

This issue could not be reproduced in MySQL.
To reproduce this issue:

Put the plugins into the clean server.
Configure the command

  top-player-commands:
    richest:
      command:
        description: Displays the richest player
        requires-op: false
      selector: []
      ordering: desc
      metric: balance-sum
      refresh:
        batch-size: 200
        batch-frequency: 1
        recompute-frequency: 1
      pagination:
        per-page: 5
        limit: 5
      messages:
        header: Showing page {page} of {totalPages}
        entry: '#{rank} {name}: ${value}'
        footer: ""

Join a player to the server.
Execute the following commands (and get outputs)

addmoney Nerahikada 1
[00:43:14.733] [Server thread/INFO]: Nerahikada has received $1. They now have $101 left.

richest
[00:43:36.612] [Server thread/INFO]: Showing page 1 of 1
[00:43:36.613] [Server thread/INFO]: #1 nerahikada: $101
[00:43:36.613] [Server thread/INFO]:

addmoney Nerahikada 1
[00:43:52.532] [Server thread/INFO]: Nerahikada has received $1. They now have $102 left.

richest
[00:44:45.678] [Server thread/INFO]: Showing page 1 of 1
[00:44:45.679] [Server thread/INFO]: #1 nerahikada: $101
[00:44:45.679] [Server thread/INFO]:


Broken image link in Django user guide

The link https://panel.pyviz.org/apps/django2/sliders.png in https://panel.pyviz.org/user_guide/Django_Apps.html doesn't seem to go anywhere; was that meant to point to https://parambokeh.pyviz.org/assets/sliders.png ?

I'm trying to fix it, but building the docs proves to be a little tricky.

Ha, turns out the reason why I couldn't check if my fix was working was because my browser cached the broken link location, how utterly nice of it. Next time I try to fix something in a browser I should blame caching from the beginning =/

@jbednar I don't see a anything sliders.png on that site though, I fixed the only link that I could find on that page, which happened to be broken too. Could you post a screenshot of what you mean?

I see, my browser didn't show the broken image thing so I glossed over it. The image exists local to the notebook, but the docs builder doesn't copy that part of the examples tree over, and neither should it. I'll copy it to _static and refer that instead.

Resolved by #705


CI jobs ocasionaly fail with: missing encryption passphrase in secrets

Describe the bug
While running the mini-e2e CI jobs, on occasion these fail with
invalid encryption kms configuration: missing encryption passphrase in secrets

Actual results
While provisioning, the KMS configuration gets read from the parameters in the StorageClass. These can define a KMS that uses a passphrase stored in the Secrets that are linked to the StorageClass. Sometimes, the provisioner/node-plugin fail to receive the passphrase from the Secret.
Expected behavior
The CI environment should configure the Secret with the passphrase for encrypting RBD volumes correctly. The secret should get passed by CSI to the provisioner/node-plugin.
Logs
CI job mini-e2e_k8s-1.20/9
These logs do not help with identifying where the problem is caused. :thinking: Possibly the deployment of the StorageClass-Secret is failing to add the passphrase.

currently, we are making use of the secretes created by the rook for our E2E. incase of the RBD pvc encryption test case we are adding the encryption key to the same secret. there is a good chance that Rook is reconciling the secretes which it has created. i  would suggest creating new secrets for the cephcsi E2E instead of using the secrets created by the Rook.

@Madhu-1 @nixpanic @agarwal-mudit @humblec, Since https://github.com/ceph/ceph-csi/pull/1863 and https://github.com/ceph/ceph-csi/pull/1888 are merged, most probably this CI issue will be prevented. Can we close this issue for now and reopen it if we hit it anytime later?

Yes, closing it for now.


SyntaxError: Illegal Break Statement

Challenge Bonfire: Check for Palindromes has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:
function palindrome(str) {

  //have to remove all non-alphanumeric characters - punctuation, spaces, symbols. Assume you have to use regular expressions for this.
  var stripWord = str.replace(/\W|\s|_/g,'');

  //set all words to lowercase
  var palinWord = stripWord.toLowerCase();
  console.log(palinWord);

    /* reverse palinWord for comparison*/
  var checkPalindrome = palinWord.split('').reverse().join('');
  console.log(checkPalindrome);

   /* Check to see if str is a Palindrome*/
   if (palinWord === checkPalindrome) {
     return true;
   } else {
     return false;
   }

}

palindrome("A man, a plan, a canal. Panama");

I keep getting SyntaxError: Illegal Break Statement. There is no 'break' statemet and the above code runs without error in the console and passes all the examples. After going through and taking everything out one by one then replacing them, I found the statement only appears at the following statement:
/* reverse palinWord for comparison*/

var checkPalindrome = palinWord.split('').reverse().join('');
console.log(checkPalindrome);
Thanks,
Tim

Well, that's interesting. Something about this is triggering loopProtect to run even though there is no loop. If you run your code with a commend of //noprotect at the top it will run fine.
Now that we've vendored loopProtect we should probably look into this. Here's what the code looks like once it gets hit by loopProtect:
function palindrome(str) {

  //have to remove all non-alphanumeric characters - punctuation, spaces, symbols. Assume you have to use regular expressions for this.
  var stripWord = str.replace(/W|s|_/g,'');

  //set all words to lowercase
  var palinWord = stripWord.toLowerCase();
  console.log(palinWord);

    /* reverse palinWord ;loopProtect.protect({ line: 10, reset: true }); for comparison*/{
if (loopProtect.protect({ line: 10 })) break;

  var checkPalindrome = palinWord.split('').reverse().join('');
}

  console.log(checkPalindrome);

   /* Check to see if str is a Palindrome*/
   if (palinWord === checkPalindrome) {
     return true;
   } else {
     return false;
   }

}

palindrome("A man, a plan, a canal. Panama");

It looks to me like the regex is triggering on the word for.  I'm thinking we either need to improve the regex (to look for a for\s*\() or somehow have it ignore comments.  I suspect the former is much easier.

HI Logan,
I added //noprotect and it did indeed pass. I didn't think to remove comments and try with that (being a total beginner with regex). But thanks, both for the answer and the impressively quick response.
Best,
Tim

Loop protect definitely isn't perfect. The only way to make it perfect is to make it actually parse JS, which would involve a lot of work for a couple of edge cases.
Loop protect was definitely a stepping stone for us on the way to actually using an AST parser and analyzing the AST for infinite loops.
We can definitely make improvements to the regex's to keep us going in the mean time.

It's because the 2nd comment has the word "for" in it.


As #2222 is closed : [binance.js] Error -1100: Illegal characters found in parameter 'price'

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.
I'm submitting a ...
[ X] bug report
[ ] question about the decisions made in the repository
Action taken (what you did)
Fresh install and same output.
Expected result (what you hoped would happen)
working trade.
Actual result (unexpected outcome)
buying BTC @ 5.8e-7
<-- POST /api/getCandles
--> POST /api/getCandles 200 495ms 1.47kb
handleCreate [binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(.[0-9]{1,20})?$'.
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-08-00-14-tradebot-266139359109518
{ name: 'AbortError',
message: '[binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'.' }
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
I know it's Sunday :)
But from what i can imagine may it could be "just" the price format to change (eg 5.8e-7 by 0.00000058)
Thank You

Thanks for the report!

But from what i can imagine may it could be "just" the price format to change (eg 5.8e-7 by 0.00000058)

Just to be sure, on what market where you trading?

Hi
It was on btc pundi x
After my night i thaught it may be linked to my distrib. I used the Ubuntu
from the Windows store but maybe others dont have this issue...
Thanks
Le dim. 8 juil. 2018 à 07:42, Mike van Rossum<EMAIL_ADDRESS>a
écrit :

Thanks for the report!
But from what i can imagine may it could be "just" the price format to
change (eg 5.8e-7 by 0.00000058)
Just to be sure, on what market where you trading?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2287#issuecomment-403264197, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AnB2HF3gqxb0XTKoB92krI8iLPnMME42ks5uEZvagaJpZM4VGhBT
.

Just pushed a fix to the develop branch, please download that one and try again!

Arf as i'm new also to git i struggle on how to do that.
nonetheless i took the new lines of the binance.js and removed the old ones but still :
buying BTC @ 6.1e-7
<-- POST /api/getCandles
--> POST /api/getCandles 200 440ms 1.94kb
handleCreate [binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(.[0-9]{1,20})?$'.
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-08-15-12-tradebot-177197138346324
{ name: 'AbortError',
message: '[binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'.' }
Can you help me with the correct way to get this specific commit ?

nevermind, i've added the price var with this.scientificToDecimal and it works.

Cool, you can also download a new release I just published: https://github.com/askmike/gekko/releases
If you do make sure to read the update doc: https://gekko.wizb.it/docs/installation/updating_gekko.html

I have the same problem, maybe you can help me.
The new 6.2 update doesn't work for me either.
In which file and where did you change price var "this.scientificToDecimal"?
thx

The new 6.2 update doesn't work for me either.

What do you mean?

In which file and where did you change price var "this.scientificToDecimal"?

inside exchange/wrappers/binance.js

I have made a fresh installation of the 0.6.2 patch but I still have the same "[binance.js] Error -1100: Illegal characters found in parameter 'price'" error.
Markets I have tested are BCN, NPXS and KEY.
To exclude that it is not a windows bash error, I did 2 test installations with the new patch. One windows 10 bash ubuntu and one native windows 10 installation. Both show the error.
In an older develop branch installation I tried to change var price in binance.js but without luck. Haven't found a var price in binance.js. My programming skills are rather limited, so I asked where exactly.

Very strange, are you able to share more logs?

strangely enough, the logs don't show any errors. It just stops.
here the last lines of the tradebot log:
2018-07-09 13:23:37 (DEBUG):	calculated RSI properties for candle:
2018-07-09 13:23:37 (DEBUG):		 rsi: 26.31573632
2018-07-09 13:23:37 (DEBUG):		 price: 0.00000045
2018-07-09 13:23:37 (DEBUG):	In low since 1 candle(s)
2018-07-09 13:23:37 (INFO):	Trader Received advice to go long. Buying  BCN
2018-07-09 13:23:43 (DEBUG):	[ORDER] statusChange: SUBMITTED
console window:
handleCreate [binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(.[0-9]{1,20})?$'.
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-09-13-19-tradebot-928605191674484
{ name: 'AbortError',
message: '[binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'.' }
browser:
In the browser window an orange message popps up with:
This is an archived Gekko, it is currently not running anymore.
This is Gekko crashed with the following error: { "name": "AbortError", "message": "[binance.js] Error -1100: Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'." }
BTC-NPXS only issues an empty error message:
console:
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-09-13-17-tradebot-829084883261726
{}
Except for the error message and the tradebot stop, gekko continues to run normally.

I think I found the problem! Here are my trade logs:
2018-07-09 21:08:43 (INFO):         [EVENT advice]
 { id: 'advice-1',
  recommendation: 'short',
  date: moment.utc("2018-07-09T13:08:00.000+00:00") }
2018-07-09 21:08:43 (INFO):         [EVENT portfolioValueChange]
 { balance: 0.004157699999999999 }
2018-07-09 21:08:43 (INFO):         [EVENT tradeInitiated]
 { id: 'trade-1',
  adviceId: 'advice-1',
  action: 'sell',
  portfolio: { currency: 0.000272, asset: 6370 },
  balance: 0.004157699999999999 }
2018-07-09 21:10:44 (INFO):         [EVENT tradeCompleted]
 { id: 'trade-1',
  adviceId: 'advice-1',
  action: 'sell',
  cost: 0.000001845555,
  amount: 6051,
  price: 6.1e-7,
  portfolio: { currency: 0.00396311, asset: 319 },
  balance: 0.004157699999999999,
  date: moment("2018-07-09T21:09:18.040"),
  feePercent: 0.05,
  effectivePrice: 6.09695e-7 }

I am quite positive this is fixed now in the latest develop branch, please update and try again :)

Unfortunately it still doesn't work for me. I'm on the latest dev branch.
Now gekko crashes with an empty error message.
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-09-16-23-tradebot-7025096271114903
{}
I tested with bcn and npxs.
tradebotlog:
2018-07-09 16:33:11 (DEBUG):	calculated RSI properties for candle:
2018-07-09 16:33:11 (DEBUG):		 rsi: 6.03650177
2018-07-09 16:33:11 (DEBUG):		 price: 0.00000046
2018-07-09 16:33:11 (DEBUG):	In low since 1 candle(s)
2018-07-09 16:33:11 (INFO):	Trader Received advice to go long. Buying  BCN
2018-07-09 16:33:11 (DEBUG):	Creating order to buy<PHONE_NUMBER>0869557 BCN
2018-07-09 16:33:16 (DEBUG):	[ORDER] statusChange: SUBMITTED

Hello six101 and askmike
i didn't try the latest update but from the commit i have i've added that line :

Trader.prototype.addOrder = function(tradeType, amount, price, callback) {
const setOrder = (err, data) => {
if (err) return callback(err);
 const txid = data.orderId;

 callback(undefined, txid);

};
price = this.scientificToDecimal(price);
const reqData = {
symbol: this.pair,
side: tradeType.toUpperCase(),
type: 'LIMIT',
timeInForce: 'GTC',
quantity: amount,
price: price,
timestamp: new Date().getTime()
};

I doubt that it was the best place to add it but it did the job.
Although now i have another problem, the buy order is correctly sent to binance but my strategy on the next candle send a legitimate sell order whereas the buy order is not completed and so cancelled it...But i don't want to pollute this issue.

@tralala44 I'd rather have the fix to work across all exchanges where this
issue might show up, which is what my commit does.
@six101 can you provide logs?

The order was transmitted to binance and also executed. After that the
tradebot crashed.

So I take it you got a different error this time?
On Tue, Jul 10, 2018 at 12:00 AM, Tralala44<EMAIL_ADDRESS>wrote:

Hello six101 and askmike
i didn't try the latest update but from the commit i have i've added that
line :
Trader.prototype.addOrder = function(tradeType, amount, price, callback) {
const setOrder = (err, data) => {
if (err) return callback(err);
const txid = data.orderId;
callback(undefined, txid);
};
price = this.scientificToDecimal(price);
const reqData = {
symbol: this.pair,
side: tradeType.toUpperCase(),
type: 'LIMIT',
timeInForce: 'GTC',
quantity: amount,
price: price,
timestamp: new Date().getTime()
};
I doubt that it was the best place to add it but it did the job.
Although now i have another problem, the buy order is correctly sent to
binance but my strategy on the next candle send a legitimate sell order
whereas the buy order is not completed and so cancelled it...But i don't
want to pollute this issue.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2287#issuecomment-403530134, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA7MD_qNfoPn4d5C8jYK7LiTHWPzq_mEks5uE34sgaJpZM4VGhBT
.

--
PGP key at keybase.io/mikevanrossum
https://keybase.io/mikevanrossum/key.asc

So Six, have you made it ?
Reality seams way different of backtesting bcn or npxs for me :)

Sorry I'm just checking in, I'm in the middle of a move. I didn't have much time to test. I think sunday I can take a little time to re-test. . Then I will test bcn and npxs again.

@six101 can you provide logs?

previous tests showed only an empty error message:
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-09-16-16-tradebot-745727029157132
{}
No entries in tradebotlog.
Is it somehow possible to enable a higher log level?
But I can also report something positive.
I tested a little with BTC-DENT and the bot went without any errors. But I hadn't tested DENT before and I have no idea if DENT caused errors before.

Sorry for being unable to fix this properly guys. It's very strange as I am
unable to reproduce all binance bugs. For me personally it's running very
smooth.
I did push some updates related to binance error handling to the develop
branch (see #2302), so you can try pulling latest. If Gekko encounters a
fatal error from binance (since that branch) it will now log that error
multiple times.
On Fri, Jul 13, 2018 at 7:42 AM, six101<EMAIL_ADDRESS>wrote:

Sorry I'm just checking in, I'm in the middle of a move. I didn't have
much time to test. I think sunday I can take a little time to re-test. .
Then I will test bcn and npxs again.
@six101 https://github.com/six101 can you provide logs?
previous tests showed only an empty error message:
RECEIVED ERROR IN GEKKO INSTANCE 2018-07-09-16-16-tradebot-745727029157132
{}
No entries in tradebotlog.
Is it somehow possible to enable a higher log level?
But I can also report something positive.
I tested a little with BTC-DENT and the bot went without any errors. But I
hadn't tested DENT before and I have no idea if DENT caused errors before.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/askmike/gekko/issues/2287#issuecomment-404683562, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA7MDxmCbp300C85MdpCfqS3Sspg35_Vks5uF97tgaJpZM4VGhBT
.

--
PGP key at keybase.io/mikevanrossum
https://keybase.io/mikevanrossum/key.asc


Adjusting labels font size to fit width

Codecov Report

Merging #25 (effc3f8) into main (3314384) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   93.89%   93.91%   +0.01%
==========================================
  Files          20       20
  Lines         885      887       +2
==========================================
+ Hits          831      833       +2
  Misses         54       54

Flag
Coverage Δ

ios
93.91% <100.00%> (+0.01%)
:arrow_up:

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

Impacted Files
Coverage Δ

Sources/DropView.swift
96.64% <100.00%> (+0.04%)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks @thierrybucco 🥇


Keep Perspective menu open after selecting an option

Previously the menu closed after selecting an option, which made exploring view modes and debug options quite tedious.
This allows for quicker inspection of the scene, and makes missclicks more forgiving.
Also makes the Perspective menu consistent with the View menu in the 3D viewport.
Demo:

Thanks!

Cherry-picked for 3.6.


Display snap damage

displays expected snap self-damage on HP bar
some refactoring and opening up of SnapCounter
addresses #409

Using the Fragile power now also needs retinkering with Determination applying the Fragile power. It should not duplicate like Corruption, but it should also update the amount to the minimum of turn count and Determination stacks.

This changes the behavior of playing Determination multiple times. In my opinion, it is more in line with the wording of the card, "At the end of this turn, Snap."

Zero clarities

Three clarities turn 1

Three clarities turn 7 (snap turn)

All clarities turn 7 (snap turn)

Fragile Power + Determination

Brief summary of changes (from what I remember):

new SNAP_TURN constant.
FragilePower now doesn't show any numbers
FragilePower now takes in a SnapCounter for the purposes of checking or forcing snap turn
when Determination is played, the new DeterminationAction forces a SnapCounter to the snap turn, either from the existing SnapCounter or a new SnapCounter instance.
some simple review comments


Drop pointer for activity type name

What changed?

Why?

How did you test it?

Potential risks

Coverage increased (+0.03%) to 61.706% when pulling f8ce41706c293fba5756bc57575118cecaed822c on vytautas-karpavicius:drop-ptr-activity-type into b32559a1a5f29859fc930458afca00a9a7d7e946 on uber:master.

Coverage increased (+0.03%) to 61.706% when pulling f8ce41706c293fba5756bc57575118cecaed822c on vytautas-karpavicius:drop-ptr-activity-type into b32559a1a5f29859fc930458afca00a9a7d7e946 on uber:master.


Generalize a property after the fact

As far as I know, we do not have a way in Nit to generalize a property in a refinement. For example, suppose we have the following first module:
class A
    fun foo: Int do return 42
end

Now, suppose we try to generalize the foo method by writing the following second module:
class X
    fun foo: Int is abstract
end
redef class A
    super X
end
class B
    super X
    redef fun foo do return 21
end

We will obviously end up with a name conflict between A::foo and X::foo. So, what should be written instead to promote the introduction of foo property to class X, without editing the first module?

Just... why?

Generated code versus developer.

The original refinement specification (in someone's PhD thesis) features property generalization and deals with the various conflicts.
It is not implemented in Nit (nor PRM) because:

it is more complex to do than it seems. Find the potential generalizations is complex with refinement.
we need a keyword to mark the generalization, and using the redef keyword for a generalization is not POLA.
resulting name scheme is not NOPA. eg. the fullname of foo is A::foo therefore the call-sites my_x.A::foo and my_b.A::foo might be confusing since X and B are not subclasses of A.
you are the first to ask for the feature, so this does not seems to be a high demand.

Honestly, I do not have the time (nor the motivation) to implement it.
I can propose you, as a workaround, to introduce a new property in the general class and bind it to the orignal property in the original class:
class X
    fun foo_x: Int is abstract
end
redef class A
    super X
    redef foo_x do return foo
end
class B
    super X
    redef fun foo_x do return 21
end

I was just wondering if there was something more elegant than this workaround. Thank you anyway.


Type or namespace issue while following the tutorial "Secure Azure SQL Database connection from App Service using a managed identity"

Hi,
I am getting these  errors when I adapt the code provided for the tutorial:
The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
The type or namespace name 'AzureServiceTokenProvider' could not be found (are you missing a using directive or an assembly reference?)
Thank you for your help

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

ID: 31b0d33c-f88e-d50c-2926-7933940f3b92
Version Independent ID: 4aaef906-f501-6947-5d23-1b704470f09d
Content: Secure Azure SQL Database connection from App Service using a managed identity
Content Source: articles/app-service/app-service-web-tutorial-connect-msi.md
Service: app-service-web
GitHub Login: @cephalin
Microsoft Alias: cephalin

@bertrandpons Thank you very much for the detailed feedback. Can you please provide the link to the tutorial you are experiencing issues with. It is not clear from this issue what documentation needs to be addressed. Thank you!

@Mike-Ubezzi-MSFT Thanks for your answer. Here is the link: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi

@bertrandpons Okay, I see this issue. I am going to forward this on to the content author to evaluate an update as appropriate.

@bertrandpons Please just run Install-Package Microsoft.Azure.Services.AppAuthentication -Version 1.1.0-preview instead of the packages.config changes. I've updated the doc and it should be published sometime today. #please-close

@Mike-Ubezzi-MSFT @cephalin Thanks a lot for your support!


velocity: fix latest

stablePackages previously filtered the experimental builds, but did not account for a possibility where every single build within a version was experimental (the empty list would be kept, thus breaking last).
This just happened now with 3.3.0 (where every single build is currently experimental).
$ nix build github:infinidoge/nix-minecraft#velocity-server
error:
       … while evaluating the attribute 'velocity-server'

         at /nix/store/63yr5rbdg9wkzbzrz7ww29pyzil33hk2-source/flake.nix:41:11:

           40|           paper-server = paperServers.paper;
           41|           velocity-server = velocityServers.velocity;
             |           ^
           42|           minecraft-server = vanilla-server;

       … while evaluating the attribute 'velocity'

         at /nix/store/35dcag44a0ymww0vy0s4jjgxwpv9g62d-source/lib/attrsets.nix:488:14:

          487|     value:
          488|     { inherit name value; };
             |              ^
          489|

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: lists.last: list must not be empty!

This PR makes sure we remove the empty lists.

Good catch!


Installing fastaudio downgrades fastai

I think due to setting a fixed fastai version, installation of fastaudio via pip currently downgrades the fastai install.
Acknowledging that I don't use python routinely, I don't know if this is working as intended, or if it would instead be possible to specify that fastai needs to be >= 2.1.9 to avoid reverting the fastai version when fastaudio is installed.

The lock is deliberate, fastai hasn't consistently followed the semantic versioning in the past so we didn't want to allow users to install a fastai that breaks fastaudio. What we do need to do, is make sure that we are keeping up to date with fastai's versions more frequently. If there are many changes in the new version, it can take us some time to implement so please be patient with us.
Did you upgrade fastai manually after installing to see if it works with fastaudio?
pip install --upgrade fastai
#79 #71

Just tried this - seems to work, although right now I'm not even training a fastai model. But basic audio loading and pipelines still work for me after forcing the fastai upgrade after installing fastaudio.


Automerge.clone(heads)

Added the ability to pass heads into the Automerge.clone() method.
While doing so decided to merge the wasm doc.fork() and doc.forkAt() methods into one.

I merged this manually with a little rebase.


Streaming job logs

CCC API users can monitor job output as it executes. There is a working API endpoint (or some other mechanism) to an API user to listen for updates.
This would enable, for instance:

progress bars during computes
simulation status monitoring (total time simulated, simulation temperature, etc.)
trajectory streaming (user can monitor 3D trajectory in real time as the simulation progresses)

The actual mechanism for this streaming is up for discussion

I propose using an API end point
/api/log/:jobId
The next question is how should the two streams be handled?

This will be addressed as needed by MST, closing


Cannot close the peek window with ESC

Cannot close the peek window with ESC directly without focus. Same as this issue.
Sorry to open a duplicate issue, but that issue has been locked and the problem has not been fixed. Now detailed information is provided here.

Cannot reproduce in VS Code (behaving as expected in VS Code)
Can reproduce in both Monaco Editor homepage and Playground
monaco-editor version: same as the Playground
Browser: Safari 13.1 / Chrome 81
OS: macOS  / Windows

How to reproduce the issue:

Open the Playground.
Add a function call hello() on the right side.

Right click the hello() and click Go to References.

Press ESC directly (without focusing on the outer editor or the embedded editor).

The peek window cannot be closed by ESC.
After a click on either editor, pressing ESC can close it.
In VS Code, the window can be directly closed without focus.

@alexdima Could you please give a hint about how to solve this? Is this a bug or a feature? Any help would be appreciated.

Fixed via https://github.com/microsoft/vscode/commit/b89779ea91fe400070903b7ef8b3f3c32595f39b


Not Getting Youtube Link previews

Hi,
This is not supporting YouTube videos metadata like Whatsapp, Skype etc supports, please provide solution for that.

Working when JSOUP library has 'org.jsoup:jsoup:1.11.3' version

Or add userAgent as 'Mozilla'
            doc = Jsoup.connect(url)
                    .timeout(30*1000).userAgent("Mozilla")
                    .get();

Or add


Core-js instead of es6-shim

I had issue with IE11 in prod mode. Generating a 20 rows/10 columns table was taking 50 seconds comparing to <1second on Chrome/Firefox.
This is the issue in Angular repo
https://github.com/angular/angular/issues/8112
As suggested, I've replaced es6-shim with core-js. Now IE has same performance as Chrome.
Lets use core-js by default in seed?

migrate to core-js from es6-shim


Fixes async trace context lingering in consumer objects

Previously, ConsumerDispatcher injected async trace context into Consumer directly.
However, the same Consumer object is shared between different message deliveries, the async trace context may be overwritten, or shared between different transactions.
This fixes so that async trace context is no longer injected into a shared Consumer object, and is instead injected into the message envelope which gets created for each message delivery.
resolves #4014

Codecov Report

Merging #4023 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4023      +/-   ##
==========================================
- Coverage   41.21%   41.16%   -0.06%
==========================================
  Files        2332     2332
  Lines       73496    73584      +88
  Branches     9936     9965      +29
==========================================
- Hits        30294    30290       -4
- Misses      40410    40500      +90
- Partials     2792     2794       +2

Impacted Files
Coverage Δ

...interceptor/ConsumerHandleDeliveryInterceptor.java
0% <0%> (ø)
:arrow_up:

...t/plugin/rabbitmq/client/RabbitMQClientPlugin.java
0% <0%> (ø)
:arrow_up:

...terceptor/RabbitMQConsumerDispatchInterceptor.java
0% <0%> (ø)
:arrow_up:

...p/pinpoint/rpc/client/WriteFailFutureListener.java
56.25% <0%> (-18.75%)
:arrow_down:

...pinpoint/profiler/instrument/AccessorAnalyzer.java
57.14% <0%> (-8.58%)
:arrow_down:

...m/navercorp/pinpoint/test/OrderedSpanRecorder.java
70.19% <0%> (-3.85%)
:arrow_down:

...orp/pinpoint/rpc/server/DefaultPinpointServer.java
79.51% <0%> (-0.7%)
:arrow_down:

...cluster/zookeeper/ZookeeperClusterDataManager.java
65.3% <0%> (+0.68%)
:arrow_up:

...pinpoint/profiler/monitor/DeadlockMonitorTask.java
19.76% <0%> (+1.16%)
:arrow_up:

...java/com/navercorp/pinpoint/rpc/DefaultFuture.java
74.16% <0%> (+1.66%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

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


PyTorch Pseudospectral Solver Implementation

Implement a PyTorch version of the solver as described in #2.
Note: This will undoubtedly be slower than the NumPy implementation as the torch.fft methods are not as efficient. This is being implemented to allow for backwards differentiation should the user want to tie this into an autogrid-compatible backend.

Resolved by 2cc0689


"How to use" guide

Create a "How to use" guide for users. Showcase the main features. Would be nice if screenshots is included.

Navigating RPIEventHub.pdf

Navigating RPIEventHub.pdf


Add more tests to test_highlight.py

Add more test to test_highlight.py to test different arguments

We have added some tests related to the get_date function


[FRONTEND WITH FRAMEWORK]: Angular(5.1) -> How to generate an application with routing enabled?

Description

Describe steps to generate routing enabled application
How to add components for routing?
Explain with syntax/example
Reference :- https://angular.io/guide/router

(Week 5 Issue)
Note:-

Don't copy paste, we would be merging after reviewing the PR.
Changes should be made inside "Frontend_Web_Development_React_Angular_Vue/Angular/Week5" directory
Tasks would be assigned on First Come First Serve Basis

Domain
Frontend Dev React/Angular/Vue
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


bootstrap-datepicker on jsdelivr

Good day,
are there any chances to see bootstrap-datepicker hosted also on www.jsdelivr.com cdn? I'd like to use same cdn network across single project and bootstrap-datepicker missing. Adding a project seems easy and maintaining it is automatic.
Best wishes,
Krzysztof Kosz

I don't know if it's necessary to add the libary to another cdn. The library is currently available on cdnjs. So maybe this is fix/answer for you question?

Loading all the libraries from single CDN should reduce loading time (saving DNS lookups). I've considered switching to cndjs, but unfortunately due to their internal regulations (issue described here: https://github.com/cdnjs/cdnjs/issues/2984) they don't host "respond-proxy.html" file, which is necessary for respond.js to function properly when used with cdn network. So only solution for now is to use two cdn networks (jsdelivr for respond.js and cdnjs for bootstrap-datepicker) within single project which is something I'd like to avoid.

Ok, I see the usecase! I will look into to this in the next few days/weekend! Will give you an update about this here!

It's good to hear this. Thank you for taking care.

The new backend is live. It pulls files directly from npm and github https://github.com/jsdelivr/jsdelivr#usage

Brilliant! Thanks for the information - it's all working good.


DropwizardAppRule cannot be shared in a parent class.

I have 2 JUnit test classes that are sub-classes of a parent containing a DropwizardAppRule.
While tests run correctly on the first class, the tests on the second will fail with a MalformedUrlException indicating a port equal to -2.
The reason is that the DropwizardAppRule.after() method stops the jettyServer within a try/catch which propagate any exception. When an exception occurs, the jettyServer member variable isn't nullified and the next attempt to start it within the same DropwizardAppRule instance will fail since the code believes the server is still up.
The fix is to make sure the jettyServer is nullified within a finally block; this way the jettyServer will be correctly restarted when the 2nd test class is executed.
Bugged
@Override
    protected void after() {
        resetConfigOverrides();
        try {
            jettyServer.stop();
        } catch (Exception e) {
            propagate(e);
        }
        jettyServer = null;
    }

Fixed
Note the addition of a finally block to ensure jettyServer is null once the test class completes.
@Override
    protected void after() {
        resetConfigOverrides();
        try {
            jettyServer.stop();
        } catch (Exception e) {
            propagate(e);
        }
        finally {
            jettyServer = null;
        }
    }

i have dropwizard version 0.7.0-1 can we fix this for this version ? Please

@arungupta2008 No, Dropwizard 0.7.x is not maintained anymore. Upgrade to Dropwizard 0.8.x or 0.9.x.


ThinMatrix's water tutorials

ThinMatrix has a handful of rather good water tutorials, you can check out:

https://www.youtube.com/playlist?list=PLRIWtICgwaX23jiqVByUs0bqhnalNTNZh
https://www.youtube.com/watch?v=5yhDb9dzJ58

Thanks! We'll integrate this soon.


fix(deps): Move dependencies used in examples to extras

At some point matplotlib and plotly was added to requirements.txt. These dependencies are causing some issues as they are also hard pinned. Since these dependencies are only used in the examples, I suggest moving them to the extras_require section of setup.py. If they should also have some version bounds, I'm not sure. I reckon it is ok to have them open, as they are not critical.

We could of course just drop the extras_require as well. The removed dependencies in this PR were not there until recently.

@hieuhc I agree. I have removed extras_require now, and at the same time updated the docs to let users know they need to install matplotlib and plotly to run the examples.


[stable/mattermost-team-edition] bump mm-te to 5.9.0

What this PR does / why we need it:
Bump mm-te to 5.9.0
Checklist

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/lgtm

thanks @unguiculus


still confused please help

we have a query that works but is not really good on the server.
the server queries al whole table and then picks a record right now due to how this is written. I want to have it work better but I can't seem to get the right way to do it.
what goes to fiddler now is like this:  /aspnetusers/aspnetusers?$filter=Id%20eq%201157&$expand=AspNetRoles
what I want to have it do is like this: /aspnetusers/aspnetusers(1157)?$expand=AspNetRoles
the client side right now is using this
return $odataresource(url + "/atrakapi/aspnetusers/aspnetusers").odata()
.filter("Id", id)
.expand("AspNetRoles")
.query();
so how do I change that from filter to a get by id
trying different things so far gets me errors but not the right data.
sorry I am so dense on this, I am more of a C# developer not a JS developer

If you're doing a get for a single record, there's no need to apply the filter on the id.  Also, the query() method on the odata provider is used for retrieving an expected array of data, you want to use get(id) for retrieving a single entity.
You'll want to let the provider know your key however if you ever plan on doing patch/put/deletes though.
So let's change up that call to the following:
var id = 1157;

// 3 ways to create the service
// Non odata v4
var service1 = $odataresource(url + "/atrakapi/aspnetusers/aspnetusers/:id", {id: "@Id"})
// odata v4
var service2 = $odataresource(url + "/atrakapi/aspnetusers/aspnetusers", "Id");
// odata v4 explicitly defined
var service3 = $odataresource(url + "/atrakapi/aspnetusers/aspnetusers", {}, {}, { isodatav4: true, odatakey: 'Id' });

return service.odata().expand("AspNetRoles").get(id);

thanks!   I think one of the things that is confusing is that some samples are for the old way before V4 and others are for V4 but they often do not call that out.
also I had not found a clear example of how to pass the id  and the different forms of how they declared the key ....   I think your example will get me sorted out now!!!

Agreed it's kind of messy.  I believe a result of trying to support the stock Resource format so as not to break existing projects converting to this library.


Add package for SLES-15

Signed-off-by: Jaymala Sinha<EMAIL_ADDRESS>Description
SLES-15 requires the 'insserv-compat' package
Issues Resolved
[List any existing issues this PR resolves]
Check List

[ ] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] All commits have been signed for the Developer Certificate of Origin. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

@jaymalasinha Can you make this same change against chef/chef as well since we're consuming the built in build_essential resource everywhere now


Use of environment variables in backup path

Hello
I'd like to backup my vault on different computers with different backup paths.
I tried to create an environment variable %obsidian_backup_path% but it seems that your local backup can't parse this.
Does anybody have an idea how to define different backup paths?
Yes, I sync my plugins and I think I can't turn off the sync for just one plugin. That would be a solution as well.
Thanks
Daniel

Hi, sorry for replying to you so late, this feature may be added in the future, but not yet as I've been busy lately. I would suggest that you set up the same storage path on both computers so that you can use the same local backup configuration.

Does the unix backup path support $HOME so I can sync the path between linux and Mac systems?

Does the unix backup path support $HOME so I can sync the path between linux and Mac systems?

Not yet.

Does the unix backup path support $HOME so I can sync the path between linux and Mac systems?

This, or, at the very least, it should support tilde, so that something like ~/Backups/Obsidan can be set across Linux and Mac OS.


restucturedtext-lint won't work with sphinx extensions

In th #164 we talked about using restucturedtext-lint for automatic testing of quality of the rst files and docstrings. The linter is unfortunately unable to work work with Sphinx extensions we are using.
I can see several ways out of it:

do not lint the rst files,
do it it with a custom Python script and filter out complaints regarding the Sphinx extensions,
convert all documentation to Markdown.

What do you think?

Which Sphinx extensions?

At least todo. Some Sphinx directives can be registered to the linter and some of them not. It complains also about automoduleand toctree, but I didn't find the directives in the sphinx package, so I can't tell whether they can work or not.

I see. Well, the question is, whether doing something about that is worth it or not. Personally, I would scrap the whole idea.. What are exactly the benefits of having rst checker (or checked documentation)?
I mean - if I write or update a piece of documentation and commit it, I always go to the new docs page and check whether it's ok or not.
As for docstrings, the worst are captured by pylint, and we could do something about the others (e.g. force the developers to document all function params, check whether they are complete, check whether there are not any nonexisting parameters documented, and so on)
As for documentation, I would not force any particular format and I would not go lint with it.

OK, let's keep it like this for now. When I am in linting mood again, I can come with PEP257 or something like this.


Update to incorporate power_state

This incorporates the use of the PowerState in jvc_projector, and staged in pull request: https://github.com/bezmi/jvc_projector/pull/5
It should be fully backwards compatbile (ie: if integrations depend on it, it should still work as the base state is still on/off).
Because the dependency on jvc_projector and its pull-request I could not test it in ideal situations. I did however test it by depending on my local jvc_remote project.
When accepting this, an update should be done to the manifest.json (i guess it will be 0.0.3)

You were right, I forgot to refactor the turn_on() function. It is updated now!

I have introduced two try/catches in the code. It is a (deliberate) broad exception (see commit message for details).
I was also considering refactoring the jvc_projector some more so handling commands and receiving commands is handled in a more general way (making it easier to handle exceptions). However that was a can of worms and decided to ponder a bit about it :) I'll create an issue about it.


V1.4.1 doesn't work for MacOSX 11.10.6

Hi,
downloading wavedrom-editor-v1.4.1-os64 provides a non working binary. The nwjs.app application quits with "You can't open the application "nwjs" because it may be damaged or incomplete".  The "wavedrom-editor"
in "wavedrom-editor-v1.4.1-osx-x64/nwjs.app/Contents/MacOS" is not executable (missing chmod +x). Making it executable results in a plain NW.JS-window.

I can replicate this in MacOS Version 10.11.6. Can the v1.4.1 osx release be marked as bad in the release notes? Should this remain an open issue?
v1.4.2 works, but "it is from an unidentified developer," failing the MacOS GateKeeper signed software check.

Closing for now. Updated v1.4.2 release notes.
Please open "it is from an unidentified developer" issue is needed.


Text is in the same color as a background

First screenshot shows the place where text is the same color as a background.

Desired result:

Fixed as proposed in desired result.


Fix typo at -D installation param in README

-Duint64_t='unsigned long long' -> -D'uint64_t=unsigned long long'
(The reason I told you in Slack instead of doing an immediate PR is because I heard that some people are actively trying to find minor errors in bigger repos in order to create PRs to make their accounts look "better" for job interviews. I dont know if this is a big thing or not, I have no experience in that matter yet. I will immediately do PRs in the future)

@CAS-ual-TY Thank you! No worries, you are a student in one of my classes and thus encouraged to do PRs.


floating point parameters error

For the control parameters which take a FLOAT32 input, set_parameter returns FALSE if the part to the right of the decimal point is not a rational binary fraction.  Some kind of floating point precision issue?
examples where set_parameter returns TRUE:  1.0, 1.25, 1.375
examples where set_parameter returns FALSE:  0.3, 1.1, 1.4
I "fixed" it by changing the set_parameter method:
was        return value == value_set
now       return value == round(value_set,6)

This issue has been fixed with the commit on August 30, 2018.
https://github.com/spomjaksilp/pyMeCom/commit/22ce55d7a2d5b5c8fae7146c9ce188f804512732#diff-2ab1910e9f7734d75b6409f71e7fbc0746d039d1a4ae22d966ccbb63cbe052c9


deps(selenium-webdriver): upgrade to selenium 3

Please make sure that the description for the big commit links to the selenium-webdriver changelog:  https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md
and gives a quick heads up about major breaking changes.

:bowtie: :grinning: :blush:


Should not overwrite the existing variables defined in $CLASSPATH

We should keep the existing variables when adding Tachyon jar files into $CLASSPATH

@pfxuan The issue is not in 0.6.0 anymore, right?

@haoyuan  I'm still using old version on real cluster, but will carefully test this new feature and send feedback to everybody. Thanks!

Thanks.

I'm going to close this for now. Please reopen it if the issue is still existing.


add a k8 service

add a k8 service with the following functions:

available resource information
available service list
execute a new service as a pod or job

PR #28
PR #23


src/entrybleed.c is dedicated to x86(-64)

The README.md claims the support for non-x86 architectures. However, file src/entrybleed.c is dedicated to x86(-64) since it relies on inlined assembly: (in function sidechannel)
  uint64_t a, b, c, d;
  // Note: clang does not support this asm with intel_syntax noprofix
  __asm__ volatile(".intel_syntax noprefix;"
                   "mfence;"
                   "rdtscp;"
                   "mov %0, rax;"
                   "mov %1, rdx;"
                   "xor rax, rax;"
                   "lfence;"
                   "prefetchnta qword ptr [%4];"
                   "prefetcht2 qword ptr [%4];"
                   "xor rax, rax;"
                   "lfence;"
                   "rdtscp;"
                   "mov %2, rax;"
                   "mov %3, rdx;"
                   "mfence;"
                   ".att_syntax;"
                   : "=r"(a), "=r"(b), "=r"(c), "=r"(d)
                   : "r"(addr)
                   : "rax", "rbx", "rcx", "rdx");

Correct. The Entrybleed side-channel attack works only Intel x86_64 CPUs and AMD x86_64 CPUs with kPTI disabled (pti=off).
https://github.com/bcoles/kasld/blob/19534d156f5b18255a91dd6e37acc6326e9b87b2/src/entrybleed.c#L1-L27
The main() function simply returns 0 if entrybleed.c is compiled on an incompatible system.
https://github.com/bcoles/kasld/blob/19534d156f5b18255a91dd6e37acc6326e9b87b2/src/entrybleed.c#L398-L409

Correct. The Entrybleed side-channel attack works only Intel x86_64 CPUs and AMD x86_64 CPUs with kPTI disabled (pti=off).

Should the compilation of file src/entrybleed.c be ignored by the build system?

Correct. The Entrybleed side-channel attack works only Intel x86_64 CPUs and AMD x86_64 CPUs with kPTI disabled (pti=off).

Should the compilation of file src/entrybleed.c be ignored by the build system?

Ideally, yes it should be ignored. I've moved the platform check to the start of the file in 47caa3e6c7f7f42b6bf0228eac942c8f8238a43c.
The build system naively attempts to build everything in ./src/.
Compiler errors for individual files are treated as non-fatal. Build failures for individual files are expected when compiling on-target (most often due to missing headers).
Files in ./src/ opt-out when compiling on an incompatible platform through the use of C pre-processor macros. This is a temporary solution until I decided how I want to structure the build system. I would like to support cross-compiling while keeping the project modular.


rename refactor

xref: https://github.com/JunoLab/Atom.jl/pull/202
xref: https://github.com/JunoLab/Atom.jl/pull/203

@aviatesk is this PR still relevant? Could you rebase so I know which files are under editing?


[BUG] testing within vscode

Description
Currently using vscode to discover test  failed on the repository.
In which platform does it happen?
Tested on VSCode + ssh into DSVM, but should be reproducibe on all plaforms.
How do we replicate the issue?
In VSCode, click "Discover Tests" in the bottom bar, it would result in "test discovery failed".  I have experienced two kind of errors by checking Python Test Log window.

The first kind of errors is something like
Test Discovery failed:
Error: ImportError while loading conftest '/home/azureuser/src/recommenders/tests/conftest.py'.
conftest.py:22: in
from reco_utils.common.constants import (
E   ModuleNotFoundError: No module named 'reco_utils'
Which can be addressed in https://github.com/microsoft/recommenders/issues/1065.

The second kind of errors is something like
import file mismatch:
imported module 'test_notebooks_gpu' has this file attribute:
/home/azureuser/src/recommenders/tests/integration/examples/test_notebooks_gpu.py
which is not the same as the test file we want to collect:
/home/azureuser/src/recommenders/tests/unit/examples/test_notebooks_gpu.py
HINT: remove pycache / .pyc files and/or use a unique basename for your test file modules
________ ERROR collecting tests/unit/examples/test_notebooks_pyspark.py ________

According to https://stackoverflow.com/questions/12582503/test-discovery-failure-when-tests-in-different-directories-are-called-the-same, init.py are needed to different subirs.  Will do a PR on this.
Expected behavior (i.e. solution)

Other Comments

Adding onto @miguelgfierro, this test discovery issue and tests can be runnable from root if we add __init__.py to all of the subfolders under tests. This due to how pytests modify python package. From the pytest documentation:

prepend import mode (which is the default): your test files must have unique names, because pytest will import them as top-level modules since there are no packages to derive a full package name from. In other words, the test files in the example above will be imported as test_app and test_view top-level modules by adding tests/ to sys.path.
If you need to have test modules with the same name, you might add init.py files to your tests folder and subfolders, changing them to packages:

This issue will be address in an upcoming PR.

Issue should be resolved by PR #1494


fix: hoist imports of @jest/globals correctly

Summary
This doesn't work. Output after running babel on it is
"use strict";

_globals.jest.mock('virtual-module', function () {
  return 'kiwi';
}, {
  virtual: true
});

var _globals = require("@jest/globals");

/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// The virtual mock call below will be hoisted above this `require` call.
var virtualModule = require('virtual-module');

test('works with virtual modules', function () {
  expect(virtualModule).toBe('kiwi');
});

So the mock call is correctly hoisted (which is probably a bug actually, we should only hoist the "global" jest, not any variable named jest), but the require call is not high enough.
@jeysal @nicolo-ribaudo any help appreciated - I'm on very thin ground when doing AST modifications 😀

Test plan
Test added.

Another issue here is that we only hoist jest, so import {jest as j} from 'jest' won't get hoisted. This might require some larger change in the plugin?

@SimenB is there a way I can get @jest/globals package ? I think ts-jest hoisting might need to change too since it has similar logic to babel-plugin-jest-hoist.

I'll publish after fixing this bug

@ahnpnl thanks for taking the initiative regarding ts-jest! Even a beta release right now is probably not a good idea given that we know this is a problem, but once it's released we can ping you, I think that's the best way to go about it :)

@SimenB I'll take a shot :upside_down_face:

@SimenB I can take a look at this tomorrow!

I have done some well-deserved cleanup in https://github.com/jeysal/jest/commit/fdecf0447029e34a82dcdd62540d56a0aff15dc7 and went in a direction with the visitor that we might want to go in (similar to what I understand _blockHoist causes internally in Babel), but didn't quite have the time to fine tune and get all the test cases green yet.

Ah, that's great @jeysal! The plugin definitely needs some TLC and if we can get rid of the _blockHoist usage at the same time that'd be wonderful. Does it make sense to land a refactor to not using _blokcHoist first, and then tackling the added complexity of hoisting the import statement once that's in?

@jeysal @nicolo-ribaudo any progress? 🙏 I'd love to release this, but with this bug I'd rather revert and re-land later. If you don't have time that of course perfectly fine! 😀

I was hoping to get back to it on one of the evenings this week but that didn't happen :/ maybe tonight or tomorrow

I'm looking at this right now!

Woo, thanks both!

I think an easy way of safely fixing this is to rely on what is natively hoisted: functions. The output in the PR description would become something like this:
"use strict";

_globals().jest.mock('virtual-module', function () {
  return 'kiwi';
}, {
  virtual: true
});

function _globals() {
  var tmp = require("@jest/globals");
  _globals = () => tmp;
  return tmp;
}

/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// The virtual mock call below will be hoisted above this `require` call.
var virtualModule = require('virtual-module');

test('works with virtual modules', function () {
  expect(virtualModule).toBe('kiwi');
});

By dining so, we don't have to worry about _blokcHoist or possible conflicts with other plugins which might inject other things before the require call.

Ah, that's a great idea!

@nicolo-ribaudo wanna open up a separate PR with that? Feel free to take the test from this one.
The whole plugin probably needs some more tlc regardless, but it's a good start, and something I feel comfortable shipping

@nicolo-ribaudo also, it might be good to start from the commit I posted (https://github.com/jeysal/jest/commit/fdecf0447029e34a82dcdd62540d56a0aff15dc7) since there's a lot of cleanup in there. I already don't remember what exactly and not sure if you aren't gonna end up rewriting everything anyway but yeah maybe do that if you can. It also has all the tests (including new one)

Oh sorry I thought you were preparing a PR based on 'looking at this right now'. But I can also definitely take over again with your guidance!
I will try to get to it tonight or tomorrow and incorporate your suggestion into my branch :)

I wrote "looking at this right now" before seeing your comment, then I deleted it because I didn't want to "steal" it from you :stuck_out_tongue:
Feel free to go ahead, and I can review your changes when they are ready.

:+1: cool will do

Very sorry I didn't get back to it this weekend. I'll try to make some time during the workdays next week to make sure to it asap

No big rush! 🙂

Working on this tonight, should be doable using @nicolo-ribaudo's great idea!

Awesome! I'll put up a revert of the revert

I think I'm close, but the key problem is: While the function _getJestObj may be hoisted, the _getJestObj().mock() call is not - @nicolo-ribaudo have you considered / do you have ideas how to cleanly get this up above the imports?
Also, 'minor' thing: Haven't integrated require('@jest/globals') detection yet. Could take from https://github.com/facebook/jest/pull/9806/commits/9b91b6227537884678e9dabb1b5c54b7679a44cc#diff-28d6d43e119aff6d32cbc726f678f341

I'm really digging where this is heading 😀 Would it make sense to land the improvements outside of @jest/globals (i.e. ditching usage of _blockHoist) separately, so the focus of another PR is to support the import/require?

I'm really digging where this is heading  Would it make sense to land the improvements outside of @jest/globals (i.e. ditching usage of _blockHoist) separately, so the focus of another PR is to support the import/require?

I think it may not be worth the effort to split things up now, there's already parts about the imports in the helpers, and the new test etc. I think landing a major refactor as part of a major feature is okay :sweat_smile:

While the function _getJestObj may be hoisted, the _getJestObj().mock() call is not

I guess I could try to unshift the program body on exit, trying to come after the CJS transform. But it's not what I would consider clean :sweat_smile:

I guess I could try to unshift the program body on exit, trying to come after the CJS transform. But it's not what I would consider clean sweat_smile

If you want to be sure to run last, you can use the post hook (rather than visitor.Program). However, being last any new node inserted at that time won't be transformed by other plugins.

I think I'm close, but the key problem is: While the function _getJestObj may be hoisted, the _getJestObj().mock() call is not - @nicolo-ribaudo have you considered / do you have ideas how to cleanly get this up above the imports?

Something like this?
_mock('virtual-module', function () {
  return 'kiwi';
}, {
  virtual: true
});

function _mock(arg1, arg2, arg3) {
  _getJestObj().mock(arg1, arg2, arg3);
}

@nicolo-ribaudo but then I have the same problem with the call to _mock() - how do I get it above the imports :/

Ok, assuming that the number of requires in the top-level scope is low (low = not 10000), we could add a call to each of them:
"use strict";

/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// The virtual mock call below will be hoisted above this `require` call.
var virtualModule = (_setupAllMocks(), require('virtual-module'));

test('works with virtual modules', function () {
  expect(virtualModule).toBe('kiwi');
});

function _setupAllMocks() {
  // Run this only one time
  _setupAllMocks = () => {};

  _globals().jest.mock('virtual-module', function () {
    return 'kiwi';
  }, {
    virtual: true
  });
}

function _globals() {
  var tmp = require("@jest/globals");
  _globals = () => tmp;
  return tmp;
}

However, if you think that this is becoming too complex you can see here how to use the post hook.

That does however mean we need to have the requires - but we have partially (most of the time only) import declarations, so again we'd have to do it after the CJS transform

I do have a working local version using the post hook now btw

I've pushed the post hook version. The only things missing now are

the actual import from '@jest/globals' support, lol, I'll take a look why that doesn't quite work another day
require('@jest/globals') support, if we want that

Re require support however, I'd argue we don't really need that.
If someone uses CJS, using globals is the lesser problem :sweat_smile:
More seriously though, it'd be very easy to break anyway.
const {jest} = require('@jest/globals'); may be easy to support,
let jest; ({jest} = require('@jest/globals')); or
const jest = require('@jest/globals')['jest']; not so much.

With CJS probably it's easy enough to ask the users to move the mock call before require, since requires are not hoisted.

I think I know already why the import one does not work:

the referencesImport helper does not help with import namespace specifiers, even for the simple static case (referencesImport('dep', 'prop'))

import * as ns from 'dep';
ns.prop;

(@nicolo-ribaudo known? plans to improve?)
2. some optimization replaces the direct import with an access to the namespace import, meaning that that one fails as well.

(@nicolo-ribaudo known? plans to improve?)

I didn't even know about the referencesImport helper :joy:
I can add support for this on the Babel side, but it would probably go in the next minor which will be in ~1 month.

@nicolo-ribaudo that'd be cool, do you want an issue created for that?
For now we can implement it in here as well and then once it's in Babel remove our impl and bump the minimum Babel version

do you want an issue created for that?

Either that, or otherwise please ping me next week :sweat_smile:

won't detecting require('@jest/globals'); and sticking it inside a function so it's hoisted cover all those cases? I do agree it's way less of an issue though, so we can at least punt on it for now

@SimenB no no, we can't even detect whether a call is a call to require('@jest/globals').jest.mock() if there's a lot of indirection between the require and mock(). It could be anything that .mock() is being called on. We can only detect it for a select few statically analyzable cases.

@jeysal If you want some "smart" logic to detect what a variable/member expression references to, you might check https://github.com/nicolo-ribaudo/babel-polyfills/blob/master/packages/babel-helper-define-polyfill-provider/src/visitors/usage.js.
However, it might be overkill and it might be ok to only support the let { jest } = require("@jest/globals") case.

I think I know already why the import one does not work:

Actually, that's not quite the whole story either. We also need to run the referencesImport / whole analysis earlier, before imports have been transformed to requires, to easily detect what the identifier references actually are. Then mark/remember that and transform in post hook.

@SimenB @nicolo-ribaudo it works and I'm happy with the cleanliness of the plugin now :) can I get a review?
We'll need to land the revert-revert https://github.com/facebook/jest/pull/9849 before rebasing and merging this.

@jeysal wonderful! Landed the revert of the revert, feel free to rebase 🙂 It conflicts since I've landed the change in runtime already, so should be pretty simple to resolve.
You can also open up a new PR, that way when people git blame the plugin in the future, they can blame you 😀

I merged in master here, btw

Lots of different tests failing, unfortunately. Weird, haven't looked into it yet.

The test failures are because the plugin now hoists to the top of the program, not just the code block that the mock statement is in, which I thought was a fix. You want to put it into a describe or test or something to colocate it with where the mock is needed, but still have it work despite import declarations. If you don't, because you use dynamic imports, use doMock at the top of the block.
But looking into the documentation, it says it's hoisted to the top of the code block. This means that it would be a breaking change to do it the way this PR currently does.
What do you think about hoisting to the top of the current block for now, and changing it to hoist to the top of the program in the next major? @SimenB @cpojer

What do you think about hoisting to the top of the current block for now, and changing it to hoist to the top of the program in the next major? @SimenB @cpojer

Makes sense to me to change in 26 yeah, I don't see a use case for just top of current function scope - I agree that seems better served by doMock.
Should we error if the jest.mock call isn't defined at the top level in 26? (probably a different discussion)

IMO we shouldn't, because colocating it with the describe or test that uses it is one of the benefits of the hoist plugin. That's also why I think we can't introduce a warning upfront that the behavior will change - if you WANT it to be hoisted from deep down to the top of the program it's not an actionable warning.

But co-locating can give the impression they'll be scoped there (e.g. having multiple) mock calls. Silently hoisting all to the top sounds very confusing

What do you think about hoisting to the top of the current block for now, and changing it to hoist to the top of the program in the next major?

That's a major breaking change and I do not understand the reasons for changing it. jest.mock has been intentionally designed to be hoisted to the top of the block. This works well in codebases that also use inline-requires, which is generally the best way to get tests to run as fast as possible (enabling inline-requires can speed up test runs by 40-60%). Changing this would cause a lot of breakage across the community, especially in tests that use beforeEach with jest.mock which is a well-supported pattern.
If you believe this behavior is important I recommend making it the default for jest.mockModule which you were considering for ESM (for which it is likely necessary anyway). In that case I would also enforce that the first argument to jest.mockModule is a string (for static analysis) and throw if there is more than one call to jest.mockModule for the same module within the same test file.

@nicolo-ribaudo Because of the new discussion I will change the behavior to hoisting all the _getJestObj().mock() calls to the top of their own scope, not the program scope. The easiest way to correctly do this that I can think of would be to check whether the generated _getJestObj identifier binding in the scope equals the binding in the program scope, and otherwise generate another identifier uniquely in the sub scope and declare and initialize it in the program scope. Is there perhaps a helper of some sort to make this easier?

Actually, it seems this is not a problem, as generateUidIdentifier seems to generate an identifier that is unique in all scopes? When I introduce _getJestObj in a function somewhere, it names the top-level generated identifier _getJestObj2 instead. Very conveninent, I just would have expected it to only be unique in the scope object that I generate it on.

Test complains about function coverage dropping from 100% to 0% somewhere, this is probably legit, we should only insert the function the first time we actually find something to hoist. Will change.

The test file for which the coverage snapshot changed now definitely doesn't get a getJestObj() injected by the plugin, but the coverage snapshot still changed :shrug: I updated that and two stacktrace snapshot lines. lmk if any of these look dangerous to you @SimenB

CI seems like it wants to revert the snapshot changes you made?

On my machine the 3 snapshot updates (incl. the stack trace ones) no longer try to update after a --clear-cache

On my machine the 3 snapshot updates (incl. the stack trace ones) no longer try to update after a --clear-cache

We might wanna add --no-cache to those tests. Or include the version of the hoist plugin in the cache key of babel-jest

Definitely the latter I think. Although just version doesn't help for development in the Jest repo?

We can read its source. We include babel-jest's own source in the cache key, trivial to include the plugin as well (although it's the preset we load, so maybe not...)

All greeeeeeeeen :tada: would be great to get another look by @nicolo-ribaudo then ship :shipit: :ok_hand:

Is it a problem if I review this tomorrow instead of today?

No no totally not! :heart:

@nicolo-ribaudo gentle ping, if you don't have time to review just let us know, I'm mostly confident in this and we could land without 😄

Def agree about the tests, I really don't like the current test suite, it's very confusing.
I even considered rewriting the test suite at one point, but time is very sparse atm :/

Yeah, we should definitely add some unit tests as well that's just input=>output. I like the current tests, but they are integration tests, not unit tests. Probably not for this PR, though 😀

Added the unit tests rewrite to my legendary Jest todo list :ok_hand: :joy:

Thanks for landing this @jeysal, and thanks for your help @nicolo-ribaudo!


feat!: Support P.derivedRoles

This PR adds support for request.principal.derivedRoles in conditions. The value of the field is a lexicographically sorted list of the effective derived roles (always an empty list outside of resource policy conditions).
A caveat is that we prune imported but unreferenced derived roles at compile time, so this will only ever include derived roles that are referenced by at least one rule in the policy.
To make this work, I've unified the type of the request variable in the evaluator and planner by introducing an explicit type, cerbos.engine.v1.Request. This is a subset of fields available on both the CheckInput and PlanResourcesInput types.
I've also fixed a bug in the query planner where request.auxData didn't work. I couldn't work out why the JSONFieldProvider isn't working in the planner - from all my attempts to create a minimal reproduction of the issue, it should work - so I've added a workaround instead of a proper fix.
Potentially breaking changes

I've omitted several fields (e.g. request.actions, request.resource.policyVersion) that would've been available previously. These don't seem useful in conditions as they have already been used by the engine to determine which conditions to evaluate.

I've introduced an alias for the ternary conditional operator which previously appeared in query plans as the raw CEL function name _?_:_ - this is now called if.

I wonder whether users will be confused by the fact that not all derived roles they imported are available in P.derivedRoles. What if we rename it to P.effectiveDerivedRoles or something along those lines instead?

I also am concerned about this. I can't think of a simple name that clearly communicates this though - I don't think effectiveDerivedRoles is obvious without the caveat in the docs either.
I think it might be preferable to instead remove this caveat by ensuring that P.derivedRoles contains all the imported derived roles that are matched.
We could do this in a blunt force manner by disabling the compiler optimisation if we find a condition/output referencing P.derivedRoles, but it seems unfortunate to incur a performance penalty on all rules in the policy.
Perhaps a good approach would to rewrite the expressions at compile time (in a similar way to what I have done in the planner). We can supply a map of the effective derived roles as a variable to the CEL environment to avoid re-evaluating the conditions that we have already evaluated.
So, we would expand P.derivedRoles to
("referenced_derived_role" in _effective_derived_roles ? ["referenced_derived_role"] : []) +
(condition_for_unreferenced_derived_role ? ["unreferenced_derived_role"] : []) +
...

This would also allow us to sort the list at compile time rather than runtime.
We could also optimize the foo in P.derivedRoles construct at compile time. If foo is not a string literal, then we expand it to
(foo == "referenced_derived_role" && "referenced_derived_role" in _effective_derived_roles) ||
(foo == "unreferenced_derived_role" && condition_for_unreferenced_derived_role) ||
...

If foo is a string literal, then this would simply be
"referenced_derived_role" in _effective_derived_roles

or
condition_for_unreferenced_derived_role

So, P.derivedRoles would effectively be a macro? I suppose that could work but I am a bit concerned about a few things.

Invalid or really complicated expressions in unreferenced derived roles could produce an invalid expression when expanded inside the condition expression and produce cryptic errors or surprising behaviours
Would the query plans become really complicated when P.derivedRoles is expanded to a complex expression?
We won't be able to produce traces for derived roles activations to help debug things
I am generally not fond of macro-like behaviour because they complicate things and make it really hard to reason about the system

I think it's OK to only have the effective derived roles available to use. Maybe we make it available under P.runtime.effectiveDerivedRoles to make it abundantly clear? There are couple of workarounds the users could do if they want to check for the existence of a particular set of derived roles in a policy rule.

Define the derived role conditions as variables and reference those variables instead. Now that we have export variables, both the derived role definition and the policy rules can share them.
Create a dummy rule in the policy that references all the derived roles they are interested in.

Regarding sorting, I think it might be better to introduce a sort function instead. Then those who need stable output can use that if necessary.

I think it's OK to only have the effective derived roles available to use. Maybe we make it available under P.runtime.effectiveDerivedRoles to make it abundantly clear? There are couple of workarounds the users could do if they want to check for the existence of a particular set of derived roles in a policy rule.

Yep, on balance I agree that turning it into a macro is overly complex.
I think we should introduce a new top-level identifier, runtime, so that this could just be runtime.effectiveDerivedRoles. I feel like adding derivedRoles to request.principal was potentially confusing anyway, since request is supposed to contain information that was passed in the check/plan request.

Regarding sorting, I think it might be better to introduce a sort function instead. Then those who need stable output can use that if necessary.

I think introducing a sort function is potentially quite complicated. We'd have to have overloads for the different types one might want to sort.
How about we keep it sorted but we use lazy binding so that we only ever compute the runtime.effectiveDerivedRoles list if it is actually used in an expression? That would avoid an unnecessary map-to-slice conversion as well in the majority of cases where it is unused.

Sounds good on both points (top level runtime and lazy binding) 👍🏽


Diode check behavior

Hi, I'm getting more into details with this project, great work!
The charger checks the diode on the EV side in the beginning of the charging session but doesn't monitor it during charging which doesn't feel quite intuitive to me. Is this actually the standard-conform behavior (or the common practice) or is it more a device-specific behavior?
It's not super important to OCPP, just stumbled over it because the diode in my EVSE tester made problems.

Hi Matthias,
Good question, i had a look at the specifications again.
According to the J1772 spec, after the EV has closed S2, switching from State B to State C. The EVSE should check the presence of the diode:
f. The EVSE determines that the EV/PHEV pilot control circuitry is correctly configured by verifying the presence of the
diode. The low side of the pilot pulse must be within the range specified in Table 4.
And the IEC 61851-1 standard:
The EV supply equipment shall check PWM signal low state of -12V, diode presence, at least once before the closing of the supply switching device on the EV supply equipment.
So it's according to spec.

Perfect, thank you for the clarification!