accessibility: screenreader always reads selection as "blank"

The ui-select is a very nice combo-box and already supports some aria attributation and partial accessibility. However if I focus the select a screenreader reads something like:

Choose a person focus  menu button  editable  has auto complete
blank

Even if there is currently a selection it will still read it as "blank".
According to my observation this is because you produce the following html element as hidden representative for the control but without an aria-owns/aria-activedescendant pointing to the actual combo-box holding the value:

<input type="text" role="button" aria-haspopup="true" aria-label="Choose a person focus" id="focusser-0" class="ui-select-focusser ui-select-offscreen ng-scope" ng-disabled="$select.disabled">

I do not understand why you attach "focus" to the aria-label. Also why this has role button.
See also:
http://www.w3.org/TR/wai-aria/roles#combobox
BTW: To test yourself here the easiest instruction:
If you want to get an quick impression how a blind person "sees" your content, quickly download and install NVDA (free OSS):
http://www.nvaccess.org/
Then in case you do not actually need assistive technology set volume to zero and open the NVDA speech viewer to see what NVDA would read to a blind person.  This might open your mind to how a blind person "sees" the web.
Thanks for taking care!

FYI: I am referring to the select2 theme of this demo:
http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview
The "Selectize theme" and the "Bootstrap theme" is not accessible at all.
The select2 theme works fine for other aspects such as choosing from the options works perfect.

Cause of error:  There's an input element for the search and another input element for the focus. If the focus would have been set on the input element for the search then screenreader would have read everything correctly.

2 years later, still open issue?

Yes, it's still open!

We've decided to move away from ui-select for the time being. Until we have time to fork it and fix a lot of these issues in house.


Phantomjs is removed from Kali repo

Hi,
Just want to let you know that phantomjs is removed from Kali repo: pkg.kali.org/pkg/phantomjs

Thanks for the heads-up! This will probably become a breaking change for Kali users running the "manual" setup.sh installation fairly soon.
Workaround for now is to use the Docker version (which I would recommend in any case) - but will definitely queue this as a fix for the setup script. Should definitely be possible to automate installation of a stable PhantomJS version from here.


Combobox unique value: update website docs

Update the new behavior, allowing users to input a unique value in the ComboBox under "Combo box" section

i

After discussing with the team and reviewing industry standards, where both Elastic and Adobe refer to the feature as 'custom value', it seems to be the best choice, as it also aligns with our Storybook documentation.

Figma file


KeyNotFoundException in IndexedSagaDictionary

https://github.com/MassTransit/MassTransit/blob/6444976e9b335ccd1603b033b954a8ff5681c4b3/src/MassTransit/Util/IndexedSagaDictionary.cs#L99
Getting an exception here. I believe it has to do with me not having a CorrelationId property. Instead I am explicitly implementing the CorrelatedBy interface.

Is this easily reproduced via a unit test?

@wasabii This has nothing to do with CorrelatedBy and messages correlation. It is the saga id. Your saga state must implement the SagaStateMachineInstance interface. When you do that, you will have to have the CorrelationId property in your saga state class.
http://masstransit-project.com/MassTransit/advanced/sagas/persistence.html#identity

@wasabii can you do something about it? Like close? :)

The SagaStateMachineInstance is an interface. It doesn't force you to implement with properties of the same name. One could explicitly implement, as I was doing. But if you do so, this logic breaks.

I guess if nobody wants to log it as a bug I'll close it. Seems broken to me though.


doesn't send uuid type parameters

Actual Behavior
operator does not exist: uuid = character varying
Steps to Reproduce the Problem
 const result = await connection.query(
  'select * from users where uid = $1',
  {values: ['3f680a7f-6f86-11eb-bd8b-02004c4f4f50']});

Specifications

Version: 1.14.0

Fixed in version 1.14.1


feat: add option for denyList

[ ] Tests are still missing (I will not find time for it, so feel free to push the tests into my branch)

I'm not sure if we need the denyList for both (renderer and main).

@sapkra Hey, do you mind resolving the conflicts? We could get it merged afterwards :)

@matmalkowski Done and also changed the blacklist naming in the README.

:tada: This PR is included in version 2.0.0-alpha.6 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Compose 1.6.0 crashes after quick resizing (Direct3d) or laggy (OPENGL)

Describe the bug
When i collapse window to very small size and after that quickly expand my app craches in Direct3d and creates error log or do it very laggy in OPENGL. In
System.setProperty("skiko.renderApi", "SOFTWARE") all works good
Affected platforms

[ ] Desktop (Windows, Linux, macOS)

Versions

Kotlin version*: 1.9.22
Compose Multiplatform version*: 1.6.0
OS version(s)* (required for Desktop and iOS issues): Win 11 Pro 23H2 22631.3155
OS architecture (x86 or arm64): x64
JDK (for desktop issues): 17.0.2

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

Go to https://github.com/vladyslavv-ua/compose-desktop-discoloured-bug
Download project
Run gradle task "compose desktop -> run"
Collapse window as much as possible (like on the video)
Sharply expand
See crash in direct3d or lagging expansion in openGL

Expected behavior
A smoothly resizing
Screenshots
https://github.com/JetBrains/compose-multiplatform/assets/110237787/1cee8845-cca5-4e2b-bff2-612c0ba1eb5e
Additional context
Here is error log
hs_err_pid1084.log

Let's track here only a crash, "laggy" part is not regression and there is a separate issue for that - #2925

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


[Bug] API Relation Table Used in SQL Header Not Recognized as Parent of Model

Is this a new bug in dbt-core?

[X] I believe this is a new bug in dbt-core
[X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior
In one of my DBT models my_downstream_model, I am defining a table reference using api.relation.create like this:
{% set my_table = api.Relation.create(
    database=<my_database>,
    schema=<my_schema>,
    identifier=<my_identifier>
) -%}

This table is then used to leverage the declare variables functionality of BigQuery within a SQL header. I am doing this since the main table used in the model is a hive partitioned external table, so declaring the partitions as a variable greatly reduces the query cost compared to having the partitions be defined by the result of another query.
The SQL header call looks something like this:
{% call set_sql_header(config) %}
    DECLARE my_partition_list ARRAY<STRING> DEFAULT(ARRAY(select partition_field from {{ my_table }}));
{%- endcall %}

my_table is not used anywhere else in the main model query, and it is not recognized as a parent of my_downstream_model.
Is this the intended behavior? I also tried to set it as a dependency manually, doing -- depends_on: {{ my_table }} but that didn't get it to be recognized as a parent either.
Expected Behavior
My expectation was that my_table would be recognized as a parent of my_downstream_model, so that the DAG execution ordering would be correct.
Steps To Reproduce
Create a DBT SQL model with my_table defined as above, and use it in a SQL header call as I defined. I ran dbt ls --select=my_table+ and my_downstream_model was not in its list of dependencies
Relevant log output
No response
Environment
- OS: macOS 14.5 and Debian 11.4
- Python: 3.10.8
- dbt: 1.8.9

Which database adapter are you using with dbt?
bigquery
Additional Context
No response

Thanks for reaching out @aboomer07 !
What you described sounds like the expected behavior to me. This is because dbt will only recognize dependencies that come from a call to the ref or source functions. The dbt DAG does not support dynamic graph building -- all the dependencies must be specified up-front.
Is there a reason why you can't create a source and then utilize it like the following?

First, create a source with your database, schema, and identifier:

models/_sources.yml
sources:
  - name: <my_source_name>  # often same as <my_schema>, but you can name the source whatever you want
    database: <my_database>
    schema: <my_schema>
    tables:
      - name: <my_identifier>

Then, utilize it within a dbt model:

models/my_downstream_model.sql
-- ...

-- depends_on: {{ source("<my_source_name>", "<my_identifier>") }}

-- ...

I didn't try one way or another with placing the source reference within the sql_header, but the at the very least the -- depends_on:  approach should work.

Thanks for getting back!
I now see that wasn't quite enough information on my part, but in general that makes sense what you're saying about dynamic graph building.
So I have a couple more things going on here, I have both a DBT project (<my_project>) as well as a private external (to the project) package (<my_package>) I built that I am using in that project. <my_package> has some generalized DBT macros and models that can be used across multiple projects.
So <my_table> is a model within <my_project> and gets referenced with {{ ref }} in other parts of the project.
<my_downstream_table> is actually a generic model within <my_package>. The way the models within <my_package> are built is that the project using <my_package> gets to supply a variable in the project specifying the name of the tables required by <my_downstream_table>. The goal of this was to set up a package where the user would only need to supply two tables specific to their project, and then the package would be able to generate results from those.
So following the DAG I have <my_table> which is a model defined within and created by <my_project>. <my_downstream_table> is a generic model defined within <my_package>. <my_project> uses <my_downstream_table> and creates a realization of it dependent on <my_table>.
<my_downstream_table> is actually dependent on a few other tables either created / with their sources defined within <my_project> that are referenced within the main query, and the dependency graphing of those works fine!
Then <my_project> has some other tables that are dependent on <my_downstream_table>.
Hopefully this makes sense? I found a workaround for now, and if this isn't a good pattern to pursue then I'm fine with closing this issue!

Thank you for that additional context @aboomer07 💡

<my_downstream_table> is actually a generic model within <my_package>. The way the models within <my_package> are built is that the project using <my_package> gets to supply a variable in the project specifying the name of the tables required by <my_downstream_table>. The goal of this was to set up a package where the user would only need to supply the table names specific to their project (and containing the correct fields), and then the package would be able to generate results from those.

This would be a feature request rather than a bug report, so I'm going to update the title accordingly. The ability to pass in a list of table dependencies is not something we'd be interested in adopting especially since you have a workaround so I'm going to close this as "not planned".


Support for alt text

<svg role="img">
 <title>Descriptive Title Here</title>
 <use xlink:href="#some-icon"></use>
</svg>

something like this, gathered from the alt text of the image would be great!

Accessibility would be great, I will add it in a near future.
I just found this and it looks like a credible reference:
https://accessibilityinsights.io/info-examples/web/svg-img-alt/


Plaintext export api

Added functionality for api to export board in human readable format

Can one of the admins verify this patch?

Looks fine.


Basket Subsystems API

Pre-Flight checklist

[ ] Migrations

[x] Migration is backwards-compatible with current production code

[ ] Testing

[ ] Code is tested
[ ] Changes have been manually tested

What are the relevant tickets?
Fix #307
What's this PR do?
Adds REST api to retrieve and update states for Basket and BasketItems.
How should this be manually tested?

Codecov Report

Merging #370 (417e6c3) into main (adf6084) will increase coverage by 5.51%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
+ Coverage   91.39%   96.91%   +5.51%
==========================================
  Files         230      127     -103
  Lines        6949     3010    -3939
  Branches      602        0     -602
==========================================
- Hits         6351     2917    -3434
+ Misses        504       93     -411
+ Partials       94        0      -94

Impacted Files
Coverage Δ

ecommerce/admin.py

ecommerce/factories.py

ecommerce/models.py

ecommerce/serializers.py

ecommerce/urls.py

ecommerce/views/v0/__init__.py

users/api.py

users/admin.py

users/management/commands/unblock_users.py

cms/serializers.py

... and 93 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 adf6084...417e6c3. Read the comment docs.

@rhysyngsun I addressed your comments. Thank you for your review


circuit-breakers not working?

Describe the bug
We're attempting to use Circut Breaker (https://www.getambassador.io/docs/latest/topics/using/circuit-breakers/) to control connections to service but seems like the setting is completely ignored.
To Reproduce
Steps to reproduce the behavior:

Our configuration:

---
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: service123-backend
  namespace: service123
spec:
  prefix: /
  service: dev1-service123.service123:8070
  timeout_ms: 120000
  resolver: resolver1
  add_response_headers:
    Strict-Transport-Security: max-age=31536000;  includeSubDomains
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-XSS-Protection: 1; mode=block
  circuit_breakers:
  - max_connections: 1
    max_pending_requests: 1
    max_requests: 1
    priority: high

Deploy above mapping
Generate some traffic to service

Expected behavior
I would expect the connection would be limited to only 1, but doesn't' seem to be the case.
Versions (please complete the following information):

Ambassador: 1.4.2
Kubernetes environment EKS
Version 1.5

Additional context
n/a

seems to be working as expected.

Looks like you meant to close this -- please reopen if not though!


ENH: On Windows, add VirtualBox path in addition to Boot2Docker

At present, the installer for Windows add Boot2Docker to the user's path, which is good. However, it should also add VirtualBox to the path at the same time.

Moved to windows-installer issue tracker.


Just a question. how to see a suggestion of users in "Panels -  Value"?

I'm watching this video
https://youtu.be/SvPZ0DN8y4o?t=744
And here when he click un NULL user - Value panel showed him created user.

I did the same code, press NULL user and my Value panel is empty.
Is there a button to show suggestions?

It works if you have a foreign key on this column to another table.


Chrome on start fallback with fewer permissions

Content Script and messaging to the background page for the URL conversion.
tabs permission no longer required.

https://www.reddit.com/r/Windows10/comments/3fp86a/announcement_we_heard_you_chrometana_users/


AFJSONRequestOperation empty JSON (0x0)?

Hello
I trying to parse a JSON, but the JSON is coming empty (0x0).
I thought that it should be a problem in my JSON, but I changed for Twitter JSON and I'm still getting empty JSON.
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://search.twitter.com/search.json?q=@pablocantero"]];

AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {

    /* JSON comes 0x0 */

    NSLog(@"completed_in: %@", [JSON valueForKeyPath:@"completed_in"]);

   /* [JSON valueForKeyPath:@"completed_in"] returns null */

} failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
    NSLog(@"%@", error);
}];

NSOperationQueue *queue = [[NSOperationQueue alloc] init];
[queue addOperation:operation];

I'm using ARC, but I configured -fno-objc-arc in the AF*.
Any help will be appreciated!
Cheers,
Pablo Cantero

What JSON library are you using? Are you building for a platform that supports NSJSONSerialization? This code runs fine for me when put into the sample project which uses JSONKit.

I thought it raised an assert. I'll double check this, maybe it changed.
--
David Keegan
davidkeegan.com
On Jan 16, 2012, at 6:53 AM, Pablo<EMAIL_ADDRESS>wrote:

Tks @kgn!
My target SDK was pointing to 4.3, not 5 (NSJSONSerialization) as I expected. My mistake. :(
I added JSONKit in the project and it worked very well.
Maybe... AFNetworking should print a log if any JSON parser was found.

Reply to this email directly or view it on GitHub:
https://github.com/AFNetworking/AFNetworking/issues/175#issuecomment-3511668

Hmmm... I didn't see anything in the console.

You are correct, an exception was created but never raised, this has been fixed in the pull request above.

Tks!

Hi guys,
maybe is a trivial question (I'm pretty new in iOS developing,forgive me for this),but I want to be sure:
Yesterday I was testing a simple JSON retrieval from my iPhone (iOS5) but the guy on the server generated an invalid json string,something like:
{
name : "test_name",
surname :"test_surname"
}
The interesting thing is that instead of calling the  fail: block,the success: was called with a null Json object as response and NO exception was raised. Is this the intended behaviour? (or maybe I'm not correctly handling the exception)
NSString *baseurl = @"http://www.mysite.com";

NSString *path = @"/test.json";

AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:baseurl]];
[client registerHTTPOperationClass:[AFJSONRequestOperation class]];
//[client setAuthorizationHeaderWithUsername:@"myusername" password:@"mypassword"];

@try {
    [client getPath:path parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) {

        NSLog(@"sjson: %@", JSON);
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"Error Code: %i - %@",[error code], [error localizedDescription]);
    }];
}
@catch (NSException *exception) {
    NSLog(@"main: Caught %@: %@", [exception name], [exception reason]);
}

thanks a lot


Shortcut terminal similar to Yakuake?

Is there any means by which a dock-like terminal can be added to the topmost part of Windows? So that it pops from the topmost part on pressing aby shortcut, like F12 for instance?
Or maybe a desktop widget?

This is #653. Please subscribe to that thread instead opening new ones.

Thanks for the suggestion! Please make sure to search for duplicates when filing new issues. This is already being tracked by another issue on our repo - please refer to #653 for more discussion.
/dup #653


Give IE9 the no-js experience

Fixes https://github.com/cfpb/cfgov-refresh/issues/3687
Removals

common.ie.js IE9-specific JS.
IE scripts build task.
class-list.js polyfill.

Changes

Merges IE8 and IE9 style build tasks.
Increment conditional comments by one to ignore JS in IE9.
Drop script.readyState check in dynamic JS loader (for IE9).

Testing

gulp clean && gulp build.
Check site in IE9 and IE8.

@Scotchester @jimmynotjim how's this look?

Approval contingent on rebasing before merging to get rid of the dozen "Update branch" merge commits ;)

Works for me after the fancy rebase. Thanks for indulging my OCD 🙂


Integration with CI

Description
Hi @fatkodima, thanks for this nice gem, currently we've used rails db:structure:load for the CI integration/tests, which kind of avoid the checking migrations created from other team members, is it possible to check the new migrations manually from a rake tasks? Thanks!

Hi @berniechiu. Thank you for kind words ❤.
Unfortunately, this is not possible. This gem works by hooking into the process of running migrations, so to trigger checks - you need to run migrations.


Processing screenshots using Tensorflow, OpenCV, mss and Python

I tried to create a simple program which captures screenshots (using mss) and gets tensorflow to predict/detect elements in the images, but it's not working. Here's part of the code:
import cv2
import mss
import numpy as np
from PIL import Image

#Import TFNet
from darkflow.net.build import TFNet
import matplotlib.pyplot as plt

#Specify the dictonary.
options = {
    'model':'cfg/yolo.cfg',
    'load':'bin/yolov2.weights',
    'threshold': 0.3
}
tfnet = TFNet(options)

#Creates an endless loop for high-speed image acquisition...
while (True):
    with mss.mss() as sct:

    #Get raw pixels from the screen
    sct_img = sct.grab(sct.monitors[1])

    #Convert image to a numpy array
    img = np.array(sct_img)
    result = tfnet.return_predict(img)

    print(result)

Could someone tell me where I'm going wrong? It returns the following error every time:
ValueError: Cannot feed value of shape (1, 608, 608, 4) for Tensor 'input:0', which has shape '(?, 608, 608, 3)'
Please give code examples. Thanks in advance.

I guess for those who are looking for the fix, the solution is - https://python-mss.readthedocs.io/examples.html#bgra-to-rgb
By default, mss captures images in BGRA format and TF expects it in RBG.


Visual Studio 2022 Support

Installed product versions

Visual Studio: 2022 All Versions

Description
Make the extension available in Visual Studio 2022.
Steps to recreate

Download the extension installer.
Run the installer.

Current behavior
Message that it is already installed to all applicable products appears even though it is not installed in Visual Studio 2022.
It is also not listed in Online Extensions in Manage Extensions Visual Studio 2022.
Expected behavior
Installs and works in Visual Studio 2022.
Note: Sorry for the all the extra details.  I probably could have stopped with the title on this one.

Thanks for reporting the issue. Apiport VS extension doesn't support VS 2022 yet.

Do you have a time estimate on it?

No, there is no time estimate on it yet.

Anytime frame for this @Lxiamail ?

Closing as API Port was deprecated in favor of binary analysis in .NET Upgrade Assistant.


[enhancement] Show active menu link or group #216

Changes
Added js to show current active menu link or group.
If the same link belongs to multiple groups then I am showing the first one as active.
Gif

Checklist

[x] I have read the contributing guidelines.
[x] I have manually tested the proposed changes.
[x] I have written new test cases to avoid regressions. (if necessary)
[x] I have updated the documentation. (e.g. README.rst)
[x] I have added [change!] to commit title to indicate a backward incompatible change. (if required)
[x] I have checked the links added / modified in the documentation.

closes #216

Coverage remained the same at 98.455% when pulling 6db0d704b2343fc19eaa78fa40b4d59748cb62ec on issues/216-show-active-menu-item-or-group into f5cde29f6ba8a3a3742f213094e924a9ecf93a9b on master.

@thanks @nemesisdesign
Here are the changes I have made according to your suggestions:

it would be great to open the menu group as well, so if we're in templates, show "configuration" highlighted and open, then "templates" highlighted as well

I am disabling the group so that it remains always open. I will change the implementation if you want.

it would be super great to highlight the links also when in one of the detail page, for example if we are in the details of a user, would be great to highlight the menu as if we are in the user list (in the narrow/minimized version we can highlight too but we shouldn't open the submenu), is that possible @niteshsinha17?
active menu items should have a different cursor, eg: cursor: default

:+1: Done

we could also style the active menu slightly differently to make it clear that the menu is active and not in hover state, perhaps we could play with the rgba version of the color and lower the opacity a bit?

I have changed it but it is for testing purpose only( Please ignore it for some time). I will change it after approval.

Clicking on any row in a list page closes the menu, that's weird, is this on purpose or is it a mistake?

It's not a mistake. The menu group gets closed on clicking anywhere on the screen. Focus of the user also gets shifted from menu when they interact with other elements of the page. What do you think @nemesisdesign Do you want any change?

Clicking on any row in a list page closes the menu, that's weird, is this on purpose or is it a mistake?

It's not a mistake. The menu group gets closed on clicking anywhere on the screen. Focus of the user also gets shifted from menu when they interact with other elements of the page. What do you think @nemesisdesign Do you want any change?

It's kind of weird to me, I think it may be also unnecessary and we may save some complexity here.
What do you think @atb00ker @pniaps @kkreitmair @nickberry17?

Clicking on any row in a list page closes the menu, that's weird, is this on purpose or is it a mistake?

It's not a mistake. The menu group gets closed on clicking anywhere on the screen. Focus of the user also gets shifted from menu when they interact with other elements of the page. What do you think @nemesisdesign Do you want any change?

It's kind of weird to me, I think it may be also unnecessary and we may save some complexity here.
What do you think @atb00ker @pniaps @kkreitmair @nickberry17?

In any case when we need to close the menu group on clicking other elements when the menu is minimized. To not keep the same functionality on different screens we will need to introduces some other checks.

I think that the active menu has always tell me where I am, so  if I am in a sub item, the paren group should always be expanded, until y close it manually or navigate to another page.

I agree with @nemesisdesign  and @pniaps, because this will improve the workflow.
For example, if you do some configuration, you will mostly navigate through sub items of the configuration group. It will be annoying, to always first expand the group again, to get to the sub items.

Implemented requested feature.


Runtime error on Apple Silicon

🐛 Bug
After installation and set-up on Apple Silicon, running the following command gives error RuntimeError: _share_filename_: only available on CPU
comet-score -s src.txt -t hyp.txt --model Unbabel/wmt22-cometkiwi-da

Proposed fix here: #236
Environment
OS: macOS
Packaging: conda
Version: lastest master branch
Additional context

Thanks for the PR I am merging it and bumping the version


[draft] Pointpillars LiDAR object detection ROS2 node

Based on code from here https://github.com/NVIDIA-AI-IOT/ros2_tao_pointpillars
Note: must run with
DOCKER_BUILDKIT=0 ./watod up --build

since Docker buildkit does not support GPU yet https://github.com/docker/compose/issues/9681

Outdated, see https://github.com/WATonomous/wato_monorepo/pull/73


chore: update logo link in README.md

:tada: This PR is included in version 2.6.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Parsing blog URL

Fixes #39 and #45 - blog URL was not parsed properly if the blog is served over HTTPS.

Hey! Before merge yours, can you check this branch out and see if it works as well? #40
https://github.com/michaelhelmick/python-tumblpy/tree/bugs-39

I can check it out later, although this is the same problem with a different solution... It seems a bit "dirty" to try to parse url with stripping first n characters from the string, so I decided to use Python's urlparse module to get a proper blog name... My solution should support both http and https schemas, along with hard-coding the blog name without any schema (e.g. myblog.tumblr.com).

Touché. Good input!

Version 1.1.1 is available on pypi

Great! Thanks a bunch! ;)


Find & Fix Mismatch in in Get Execution Info result

Executing get_execution_info returns a TxInfo as parts of its result. There is a missmatch between the account_contract_address returned by the syscall and the one expected.
The syscall is returning the correct one but it seems that Native is reading the value where it shouldn't (perhaps because it is boxed).
To solve the issue we need to (i) learn what is causing this error, (ii) fix it by either updating the code or our dependencies

Solved in https://github.com/lambdaclass/cairo_native/pull/502


Add tests and set up GH Action

Need to add tests to allow for additional development and new features. Test directory has been created.
Initial thoughts:

session.py: test average, menu options to start game and quit
game.py: test validate, remove_one_peg, make_jump
board.py: test initiate, pegs_left, locate_peg, figure out how to test show, remove, get_moves
is there a good way to test print statements?
is there a way to test package install?

Once tests are set up:

[ ] create Action to automate testing and linting

Using tests branch.

Set up workflow to lint on push (all branches)

Still need to create tests for game play and functionality.

This issue should not have been closed by PR 5. Reopening, as there is still work to do (creating tests using Pytest).

Wrote some initial tests for session.py after figuring out how to interact with the command line during the tests. That method will be needed for most additional tests of the game. Got the configuration files set up and included comments for future reference. GH Actions are currently passing under each build.
I should figure out how to get this library to work for me so I can run tests locally (via Docker) before pushing to GH: https://github.com/nektos/act

Added command to test workflow to launch the game and immediately quit, so that I can see in the output window what the game looks like on each OS!


links to #anchor when the target page is not translated

A general comment about links to #anchor when the target page is not translated: the user will not see the message "This page hasn't been translated yet". This might surprise the user, because they are not expecting to see English and do not see the warning. Maybe the warning needs to be sticky/absolutely-positioned?
Originally posted by @jbrains in https://github.com/withastro/docs/pull/463#discussion_r880881262

Agreed that @hippotastic had a great idea... just wondering, didn't we discuss this very thing a loooooong time ago? Was @Yan-Thomas involved in that? I can't remember why we didn't go that route?

I also had a slight déjà-vu moment while suggesting that approach, but couldn't find any prior discussion on Discord. :)

There was discussion of this. Don't remember where. The tricky thing is the link looks like /fr/page-in-english so we can't do this based on link alone — any plugin would need to be aware of the translated pages.

As the sidebar can do it, I'm confident the plugin can also achieve this! :)

Found the existing discussion: https://github.com/withastro/docs/discussions/590

Yeah. An automated solution seems good at this point. So do we by any chance have someone around who has familiarised themselves to a great depth with remark? 🤔

I can give it a shot tomorrow!

Awesome, thanks Hippo!

Chris: perfects something
Hippo: I will make this redundant tomorrow.

Chris: perfects something
Hippo: I will make this redundant tomorrow.

Oh no, that wasn't my intention at all! 😅 I already felt bad suggesting an alternative approach after all the work Chris put into the notice, now I feel even worse! 🙈

Not my intention, Hippo! And sorry, that was probably a better comment for Discord!
I think we all feel good about this direction, and appreciate your ability to tackle problems, or else I wouldn't have been so joking about it.

I've just had a look at this, and it seems that the tough part is not the Markdown plugin, but the styling! 😄
There are at least 4 different ways on how we could style the EN suffix of fallback links. I need your input to select one of them (or come up with an even better one).
Please compare them, especially how they mix with punctuation. Which variant do you prefer?
Variant 1: In link color, underline ends before

Variant 2: In link color, underline continues

Variant 3: In lighter text color, underline ends before

Variant 4: In lighter text color, underline continues

We can do a quick emote poll maybe.

Variant 1: 🎉
Variant 2: ❤
Variant 3: 🚀
Variant 4: 👀

We can do a poll, but variant 1 is the only one I find acceptable. ;)

The bit that bugs me is the weird gap around punctuation, so wonder if just:

Text with link to fallback (EN).

Could make sense?

The weird gap next to punctuation is the reason why I found this so difficult, too.
Apparently, @sarah11918 doesn't seem to mind that gap, though 😄

I am OK with either superscript and slightly off punctuation (I do like the instinct to put it , and would personally be willing to sacrifice Perfect Punctuation Positioning if that were the will of the group) or Chris' suggestion.
I already sort of dislike how code words  inside larger link phrases come out formatted, so PPP isn't that big a deal to me. But, I also don't hate (EN)!

I like your suggestions with a regular text suffix. Hope it's not an issue in any of our languages to put a fixed suffix like that in the regular text/link flow.

Correct, @hippotastic ! I am surprisingly tolerant of the gap! But, not attatched to it!

Sounds good to me!


Add AWS pod identity support

docs are here https://github.com/kedacore/keda-docs/pull/56

@zach-dunton-sf would it be possible to merge with master please?
I presume you are still waiting on a review? Care to pick this up @ahmelsayed ?

Sorry for the delay @zach-dunton-sf, I'm not too familiar with how pod identity works on AWS so was just keeping an eye on the conversation here. The change looks fine from my prospective. I will merge it once the build passes

Is this solution expected to also work for kube2iam which uses similar techniques to kiam?

Yes. kube2iam should work also.
On Tue, Mar 10, 2020 at 5:11 PM Christian Rothe<EMAIL_ADDRESS>wrote:

Is this solution expected to also work for kube2iam which uses similar
techniques to kiam?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kedacore/keda/pull/499?email_source=notifications&email_token=AEH7ZDOC4JAYOK7DIMMCBDDRGZRDDA5CNFSM4JV6P5O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOMCFEQ#issuecomment-597172882,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEH7ZDLF2JEGPJ6S3E4UJ3LRGZRDDANCNFSM4JV6P5OQ
.

Tried it out and it does not seem to work for kube2iam (or I don't understand what I am supposed to do).
I have added a kube2iam role to the metrics-apiserver pod thus allowing the metrics server to get the correct credentials to fetch metrics from Cloudwatch. However, I am getting 403s. The following can be found in the logs of the apiserver:

AccessDenied: User: <MY_KUBE2IAM_PROVIDED_READER_ROLE> is not authorized to perform: sts:AssumeRole on resource: <ROLE_OF_THE_POD_TO_BE_SCALED>

I do not understand that. Why would it try to assume the role of the thing it is supposed to be scaling? What is the right way to use aws-kiam? The docs are, unfortunately, rather sparse on this.

You need to modify the role <ROLE_OF_THE_POD_TO_BE_SCALED> so it can be
assumed by  <MY_KUBE2IAM_PROVIDED_READER_ROLE>. You can do that in the IAM
console, if you select the <ROLE_OF_THE_POD_TO_BE_SCALED> role, then click
on "Trust Relationships" then add the ARN for
<MY_KUBE2IAM_PROVIDED_READER_ROLE>
On Mon, Mar 16, 2020 at 2:49 PM Christian Rothe<EMAIL_ADDRESS>wrote:

Tried it out and it does not seem to work for kube2iam (or I don't
understand what I am supposed to do).
I have added a kube2iam role to the metrics-apiserver pod thus allowing
the metrics server to get the correct credentials to fetch metrics from
Cloudwatch. However, I am getting 403s. The following can be found in the
logs of the apiserver:
AccessDenied: User: <MY_KUBE2IAM_PROVIDED_READER_ROLE> is not authorized
to perform: sts:AssumeRole on resource: <ROLE_OF_THE_POD_TO_BE_SCALED>
I do not understand that. Why would it try to assume the role of the thing
it is supposed to be scaling? What is the right way to use aws-kiam? The
docs are, unfortunately, rather sparse on this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kedacore/keda/pull/499#issuecomment-599546259, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEH7ZDNDW6SBVECC4JHSAO3RHYU5NANCNFSM4JV6P5OQ
.

I understand how to do the mechanical AWS parts, but I don't understand why I would want to set it up that way? ROLE_OF_THE_POD_TO_BE_SCALED is the role that pod needs to do it's work and that work has nothing to do with metrics. At most it might typically have some PutMetrics permissions, but I don't think it should, as a general rule, have GetMetrics permissions - that is not the task of the scaled pod and thus IMO it should not have the permission.

(but thank you for clarifying your intention with the different roles)

Briefly thinking out loud: What would the alternative be, though? I came in expecting to add the permissions to the apiserver, which I'm starting to realise would mean I need to add all relevant permissions for all possibly AWS-scaled things to that pod/role. Which I guess could be seen as excessive. OTOH, I really dislike having to assume the role of the pod-to-be-scaled. Can we maybe add an annotation to the ScaledObject or the TriggerAuthentication object instead and then make sure the role the apiserver runs with can assume that one? From a separation of concerns perspective that would be much cleaner IMO.

It is possible to assign a separate more limited role using the
TriggerAuthentication, don't use podIdentity. You can specify a Role ARN in
the TriggerAuthentication.
On Mon, Mar 16, 2020 at 3:18 PM Christian Rothe<EMAIL_ADDRESS>wrote:

Briefly thinking out loud: What would the alternative be, though? I came
in expecting to add the permissions to the apiserver, which I'm starting to
realise would mean I need to add all relevant permissions for all possibly
AWS-scaled things to that pod/role. Which I guess could be seen as
excessive. OTOH, I really dislike having to assume the role of the
pod-to-be-scaled. Can we maybe add an annotation to the ScaledObject or the
TriggerAuthentication object instead and then make sure the role the
apiserver runs with can assume that one? From a separation of concerns
perspective that would be much cleaner IMO.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kedacore/keda/pull/499#issuecomment-599561655, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEH7ZDOLFSTFBXLOGI3BM3DRHYYMXANCNFSM4JV6P5OQ
.

Hmm, ok. But if I understand correctly: If I want to use TriggerAuthentication (with or without roleARN), I will then need to hard-code AWS_ACCESS_KEY_ID etc. (which is a big no-no in our organization) or jump through some hoops to make dynamic secrets work with this possibly (which is what kube2iam and kiam were designed to avoid).

No, you just need the role arn.
Christian Rothe<EMAIL_ADDRESS>schrieb am Mo. 16. März 2020 um
15:36:

Hmm, ok. But if I understand correctly: If I want to use
TriggerAuthentication (with or without roleARN), I will then need to
hard-code AWS_ACCESS_KEY_ID etc. (which is a big no-no in our organization)
or jump through some hoops to make dynamic secrets work with this possibly
(which is what kube2iam and kiam were designed to avoid).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kedacore/keda/pull/499#issuecomment-599571399, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AEH7ZDI4C2AUIR3SBQVOGP3RHY2OJANCNFSM4JV6P5OQ
.

Could you please point in the direction of a working example then?
apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-trigger-auth-aws-credentials
  namespace: default
spec:
  awsRoleArn: <MY_METRICS_READER_ROLE>

Does result in errors like
{"level":"error","ts":1584369099.61145,"logger":"controller_scaledobject","msg":"Failed to create new HPA resource","Request.Namespace":"default","Request.Name":"aws-sqs-queue-scaledobject","HPA.Namespace":"default","HPA.Name":"keda-hpa","error":"error getting scaler for trigger #0: Error parsing Cloudwatch metadata: 'AWS_ACCESS_KEY_ID' doesn't exist in the deployment environment","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128\ngithub.com/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).reconcileDeploymentType\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:229\ngithub.com/kedacore/keda/pkg/controller/scaledobject.(*ReconcileScaledObject).Reconcile\n\tkeda/pkg/controller/scaledobject/scaledobject_controller.go:155\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:216\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:192\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.2.2/pkg/internal/controller/controller.go:171\nk8s.io/apimachinery/pkg/util/wait.JitterUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:152\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:153\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20190404173353-6a84e37a896d/pkg/util/wait/wait.go:88"}

It's a bit weird because you have to go through a Secret. I do not think it is possible to set it directly on the TriggerAuthentication.
https://github.com/kedacore/keda-docs/blob/master/content/scalers/aws-sqs.md
apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
  name: trigger-auth-aws-role
spec:
  secretTargetRef:
  - key: AWS_ROLE_ARN
    name: keda-aws-secrets
    parameter: awsRoleArn
---
apiVersion: v1
kind: Secret
metadata:
  name: keda-aws-secrets
data:
  AWS_ROLE_ARN: some role arn

That did it! Thanks for the help, I got it running now. Looks like I completely misunderstood what podIdentity is about and plain kube2iam would've worked before.
To recap in case someone runs into this ticket again:

I have set up a kube2iam role on both operator (for setup, I guess) and metrics-apiserver that is allowed to assume the role configured in the TriggerAuthentication
TriggerAuthentication with awsRoleArn reference in secret as explained by Zach
no podIdentity involved in my use case anywhere

TriggerAuthentication doesn't support hardcoded values indeed, for now.
Was everything clear or do we need to update the docs?

I think a full example with the awsRoleArn could be useful. It is not obvious that that can e.g. pull default AWS authenticators and that it needs to go into the secret.

Tracking this in https://github.com/kedacore/samples/issues/10 but happy to link to a sample if you have one

Having problems setting the SQS scaler up on a kubernetes cluster using kube2iam. We are using v 1.3.0.
Followed @ncrothe approach above...

kube2iam role on both operator (for setup, I guess) and metrics-apiserver that is allowed to assume the role configured in the TriggerAuthentication (the kube2iam annotation is being written to the wrong section in the charts)
TriggerAuthentication with awsRoleArn reference in secret as explained by Zach
no podIdentity involved in my use case anywhere
created a keda role(k8s-keda), which contains a trust relationship for the kube2iam role attached to the kubernetes worker node(same as the many other roles we have)

Get the following error in the keda-operator...
{"level":"debug","ts":1585482843.978178,"logger":"scalehandler","msg":"Error getting scale decision","ScaledObject.Namespace":"hydra-sbx1-mobilelogins", "ScaledObject.Name":"hydra-ingest-outbound-etl","ScaledObject.ScaleType":"deployment", "Error":"AccessDenied: User: arn:aws:sts::123456789123:assumed-role/k8s-keda/e7450c49-k8s-keda is not authorized to perform:  sts:AssumeRole on resource: arn:aws:iam::123456789123:policy/k8s-keda\n\n\tstatus code: 403,
Any thoughts?
Looking at the code...it seems to use a different technique to consume the kiam/kube2iam role compared to other tools eg externaldns
aws_sqs_queue_scaler.go.
aws_iam_authorization.go
externaldns. ...uses session.NewSessionWithOptions
external-dns/provider/aws.go

I think: To make the current version of this work, you need one more indirection. As the error implies, your pod is assuming the intended role via kube2iam, but then keda tries to assume the same role as that role. So either:

you add the role as trust to itself or
you split this into two roles: one role A that the pod assumes via kube2iam and a role B that role A can assume (via Keda) that has the actual permissions.

@ncrothe
Good suggestions... I was thinking similar
I will try these out and give an update

Would you be open to create a new issue for this to see what we need to fix and/or improve the docs?

@tomkerkhove
Yep...no problem


review version control lesson

I'm combing through this one now. Doesn't look like I can assign myself to this, so dibs.

@codymalick You have to accept the invitation that I sent you before I can assign the issue

Would you look at that. Thanks!

Couple notes:

The git lesson covers how to branch, clone, etc., but doesn't actually have the user do any of these things beyond cloning the flask app. Might consider doing a little more hands on once the repo is clone.
Overall the lesson is very good. I think it's rather short for such an important topic, but we should work out about how long the section takes to run through with a novice audience.

If we can get some novices to attend the rehearsal, we could use their feedback to improve the lesson before the main event. Otherwise, we should take notes and gather feedback at the November 5th session.

Maybe we could add something that would clearly show how branching, merging, commits, etc. work. This is a great tool for things like that:
http://learngitbranching.js.org/

Possibly add content to cover Github tools.


feat: add C++ modules support

Resolves #7.

Limitations have been documented: https://github.com/JohelEGP/jegp.cmake_modules/#limitations.

Apparently, not all is lost, as it might be possible to make the downcasting facility work with Clang modules: https://godbolt.org/z/jenGb5hM8. I just need to figure out why this works and attempt the same in mpusz/units.

@JohelEGP, is this PR ready to merge (besides merge conflicts)? I thought that you still wanted to add to it.

I have to address some of the comments above.

While I work on further integration, this is how I have made use of this PR:
  ExternalProject_Add(
    mp-units
    GIT_REPOSITORY "${WAARUDO_mp-units_GIT_REPOSITORY}"
    GIT_TAG "${WAARUDO_mp-units_GIT_TAG}"
    CMAKE_ARGS ${mp_units_args} -DUNITS_AS_MODULES=TRUE -DUNITS_USE_LIBFMT=FALSE
    CMAKE_CACHE_ARGS ${cxx_args} ${jegp_args} ${waarudo_args}
    SOURCE_SUBDIR "src"
    CONFIGURE_HANDLED_BY_BUILD TRUE
    BUILD_COMMAND "${CMAKE_COMMAND}" --build <BINARY_DIR> --target mp-units-module
    INSTALL_COMMAND ""
    DEPENDS jegp.cmake_modules gsl-lite Waarudo_std
    EXCLUDE_FROM_ALL TRUE)

This adds https://github.com/JohelEGP/jegp.cmake_modules/#jegpaddmodule to CMAKE_MODULE_PATH.

https://github.com/Kitware/CMake/blob/v3.27.4/Help/dev/experimental.rst#c20-module-apis
explains how to use CMake's experimental support for C++ modules.
Change the v3.27.4 in the link for your CMake version.
Using Clang 18, I'm afraid there seems to be a bug:
Error
/home/johel/Documents/C++/Forks/mpusz/units/test/unit_test/static/quantity_test.cpp:52:22: error: constraints not satisfied for class template 'quantity' [with R = mp_units::si::metre{{}}, Rep = short]
   52 | static_assert(sizeof(quantity<si::metre, short>) == sizeof(short));
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/quantity.h:85:28: note: because 'RepresentationOf<short, get_quantity_spec(mp_units::si::metre{{}}).character>' evaluated to false
   85 | template<Reference auto R, RepresentationOf<get_quantity_spec(R).character> Rep = double>
      |                            ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:82:28: note: because 'short' does not satisfy 'Representation'
   82 | concept RepresentationOf = Representation<T> && ((Ch == quantity_character::scalar && is_scalar<T>) ||
      |                            ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:79:93: note: because 'short' does not satisfy 'Scalable'
   79 | concept Representation = (is_scalar<T> || is_vector<T> || is_tensor<T>)&&std::regular<T> && detail::Scalable<T>;
      |                                                                                ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:70:3: note: because 'short' does not satisfy 'CastableNumber'
   70 |   CastableNumber<T> ||
      |   ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:65:62: note: because 'std::common_type_t<short, std::intmax_t>' (aka 'long') does not satisfy 'ScalableNumber'
   65 | concept CastableNumber = CommonTypeWith<T, std::intmax_t> && ScalableNumber<std::common_type_t<T, std::intmax_t>>;
      |                                                              ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:62:3: note: because 'std::regular_invocable<std::multiplies<>, long, long>' evaluated to false
   62 |   std::regular_invocable<std::multiplies<>, T, U> && std::regular_invocable<std::divides<>, T, U>;
      |   ^
/home/johel/root/clang-main/bin/../include/c++/v1/__concepts/invocable.h:34:29: note: because 'invocable<std::multiplies<void>, long, long>' evaluated to false
   34 | concept regular_invocable = invocable<_Fn, _Args...>;
      |                             ^
/home/johel/root/clang-main/bin/../include/c++/v1/__concepts/invocable.h:28:3: note: because 'std::invoke(std::forward<_Fn>(__fn), std::forward<_Args>(__args)...)' would be invalid: no matching function for call to 'invoke'
   28 |   _VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving
      |   ^
/home/johel/root/clang-main/bin/../include/c++/v1/__config:805:17: note: expanded from macro '_VSTD'
  805 | #  define _VSTD std
      |                 ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:71:24: note: and 'typename T::value_type' would be invalid: type 'short' cannot be used prior to '::' because it has no members
   71 |   (requires { typename T::value_type; } && CastableNumber<typename T::value_type> &&
      |                        ^
/home/johel/Documents/C++/Forks/mpusz/units/src/core/include/mp-units/bits/representation_concepts.h:73:24: note: and 'typename T::element_type' would be invalid: type 'short' cannot be used prior to '::' because it has no members
   73 |   (requires { typename T::element_type; } && CastableNumber<std::remove_reference_t<typename T::element_type>> &&
      |                        ^

This is how I tested this (using CPM instead of Conan).
In the CMake buildsystem:
CPMAddPackage("gh:gsl-lite/gsl-lite#4b5e9ab7474841fc2d7efc2e0064ef81785535d1")
CPMAddPackage("gh:fmtlib/fmt#e8259c5298513e8cdbff05ce01c46c684fe758d8")
CPMAddPackage("gh:catchorg/Catch2#3a5cde55b7a27a6d94ce994a8362b2425211bd5e")
execute_process(COMMAND "${CMAKE_COMMAND}" -S "${CPM_Catch2_SOURCE}" -B Catch2
                WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" COMMAND_ERROR_IS_FATAL ANY)
set(Catch2_DIR "${CMAKE_CURRENT_BINARY_DIR}/Catch2")
list(APPEND CMAKE_MODULE_PATH "${CPM_Catch2_SOURCE}/extras")
CPMAddPackage(
  NAME "mp-units"
  VERSION "modules"
  GITHUB_REPOSITORY "JohelEGP/mp-units"
  OPTIONS "MP_UNITS_USE_LIBFMT TRUE"
  SOURCE_SUBDIR "src")
add_subdirectory("${CPM_mp-units_SOURCE}/test" "mp-units-test")
add_subdirectory("${CPM_mp-units_SOURCE}/example" "mp-units-example")

This is how I tested this (using CPM instead of Conan).

We need to be able to trigger this from Conan.

Hi @JohelEGP, it would be great to merge this PR but there are still some unresolved issues we discussed above.

All that's left is the integration with Conan.
I'll leave that to you.
I suppose you're going to add an option to Conan, which translates to a CMake option.
You should use that in place of CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API.
https://github.com/fmtlib/fmt/releases/tag/10.1.1 is needed for the fixes for C++ modules.
Of https://github.com/mpusz/mp-units/issues/7#issuecomment-1073138373, https://github.com/llvm/llvm-project/issues/54574 is still open, so warnings abound.

Unsurprisingly, GCC 13 and GCC 14 ICE.

The CI needs fixing as well. We should probably add modules tests to CI as well to check if there are no issues in the PR. Which compilers should the module-build support as of now? Only clang-16+?
When you are done with all the required changes and the CI will be fixed I will contribute to this PR with Conan-related changes to enable CI builds with modules.

Looks like Clang 16 can't be used to test the modules.

Looks like Clang 16 can't be used to test the modules.

I got the info from the  Conan team that Conan 2.0.12 should appear today and will have fixes to enable clang-17 configuration.

clang-17 support added with https://github.com/mpusz/mp-units/commit/92b7069c35bba592743c1132c4c2eccfa9c59c6c.

Please let me know when you will think it is ready to merge (i.e. in case you want to provide those toolchain files for CMake).

Hi @mpusz - I've had a chance to test things out on this branch as I prepare to continue experiments with C++ module packaging.
A few comments:

The MP_UNITS_BUILD_MODULES option is declared in the top-level CMakeLists.txt but is never evaluated - module functionality seems to be conditional on either of the following, which have some issues.

CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API being defined. Note that this is no longer needed in CMake 3.28 - module scanning functionality is enabled automatically when C++20 mode is active (as far as I'm aware).
or if(TARGET mp-units::modules) - this never entered the "true" branch for me when building this project with CMake 3.28 nightlies. Unsure why - this is ver dependent on CMake configuration order, but I can see the src directory is included before the others.

My advice for the above would be to align everything around the MP_UNITS_BUILD_MODULES condition.

Defining cmake_minimum_required() to an old version of CMake (e.g 3.4 or 3.5) - this was disabling the dependency scanning to that part of the tree - and I was getting a lot of import errors because CMake never ran clang-scan-deps for that file. Removing these lines did the trick. I'd say they're only needed at the top-level project, and any subdirectory that you expect to be "standalone" (that is, the root of a tree). Otherwise they're redundant at best, and dangerous at worse (since the call to cmake_minimum_required() changes the policy settings).

having (lots) of compiler errors with Clang 17 and GNU's libstdc++ (clang on Linux uses the GNU standard library by default) - these could be due to issues specific to GNU's library, but worth cehcking

using Clang 17 and libc++ works without compiler errors, but I get linker errors instead - I suspect that this may have to do things from #includes (standard library, GSL and fmt) being attached to the module. For everything that you do not want to be attached to the modules, you'll have to do an #include in the module preamble (after module; and before export module xxxx;. You can see an example here: https://github.com/fmtlib/fmt/blob/master/src/fmt.cc#L3-L36 - this will also apply to other things that are #included , such as fmt (and maybe gsl?)

As for the cmake_minimum_required() - indeed this will be a problem with CMake 3.28 if the different subdirectories have a call to that function for a version earlier than 3.28, as described here:

https://cmake.org/cmake/help/git-master/manual/cmake-cxxmodules.7.html
https://cmake.org/cmake/help/git-master/policy/CMP0155.html#policy:CMP0155

There are a few alternatives:

At the top level, evaluate MP_UNITS_BUILD_MODULES early on, and if true,  set(CMAKE_CXX_SCAN_FOR_MODULES ON) - this will enable dependency scanning for all targets, regardless

Alternatively (and probably better): ensure the policy default is new, even for files that set cmake_minimum_required() for older versions: set(CMAKE_POLICY_DEFAULT_CMP0155 NEW)  - I think this ensures dependency scanning by default for all targets where C++20 or higher is used

Removing calls to cmake_minimum_required() from files that don't need it (and inherit it from the parent) is probably the best approach. For the files that do need it, may be safer to include 3.28, e.g. cmake_minimum_required(3.5...3.28)

I am still looking for the best modules structure for the project. There are a few alternatives:
The simplest one
flowchart TD
    mp_units --- core
    mp_units --- systems
    mp_units --- ostream
    mp_units --- fmt

If someone does not want any I/O (i.e. embedded), the following is needed:
import mp_units.core;
import mp_units.systems;

Separate no_io
flowchart TD
    no_io --- core
    no_io --- systems
    mp_units --- ostream
    ostream --- no_io
    mp_units --- fmt
    fmt --- no_io

Now we just need:
import mp_units.no_io;

but his somehow sucks 😉
Separate I/O options
flowchart TD
    mp_units --- core
    mp_units --- systems
    mp_units_ostream --- mp_units
    mp_units_fmt --- mp_units

In many cases, we use both I/O options (fmt and streams). In such a case, we need:
import mp_units_ostream;
import mp_units_fmt;

Unified I/O
flowchart TD
    mp_units --- core
    mp_units --- systems
    mp_units_ostream --- mp_units
    mp_units_fmt --- mp_units
    mp_units_io --- mp_units_ostream
    mp_units_io --- mp_units_fmt

Now we just need
import mp_units_io;

I personally like the first one the most. It is the simplest one and allows selective inclusion of all the options.

We could consider breaking the project into even smaller pieces but I am unsure if it makes sense to provide separated modules for each system.

I'm going to limit the scope to C++ and CMake sources.

@jcar87, could you please help @JohelEGP with his issues with Conan support for modules? We would like to merge this to the mainline ASAP.

I'd prefer to limit this to PR CMake.
It was working before.
But then I had to touch the Conan files, which I don't really understand.
Since the CMake buildsystems already work standalone,
the Conan support should be purely additive.

With regards to the first option of https://github.com/mpusz/mp-units/pull/350#issuecomment-1763842790,
the module mp_units.core would only include the headers compare.h and random.h from the utility sources.
The utility sources chrono.h and math.h require SI, so they would be part of mp_units.systems.

I suppose all that's missing now is documentation on how to use it.
You need to follow https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html.
For the CMake buildsystems of the examples and tests in this repository,
which don't require a minimum CMake version of 3.28,
that means configuring with -DCMAKE_CXX_SCAN_FOR_MODULES="TRUE".
Right now, if the CMake version is at least 3.28, the modules targets are unconditionally added.

Please see:

c9d1f83ca493931909392cf28334e11dfd251ff9
7f0e7f8ca86c5860d6c3e5c62eaddcd43092a78a

This commit should fix most of your CI issues: 8dae093517ab921cb53aaac698a4a2f2bb13e219.

If you do not have time for docs, you can leave updating them to me.

Rebased.
Added the option MP_UNITS_BUILD_CXX_MODULES to the CMake buildsystem and documentation.
Should we mention https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html,
which documents the requirements for the support of C++ modules?
I wasn't sure where to put that, so I didn't include it.
Please, check whether commit 797752c724a9713250c5bf7569b98c3b74470d4c remains correct.

Should we mention https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html,
which documents the requirements for the support of C++ modules?

Yes, I think it would be useful. We probably provide a bit more information about the modules hierarchy (the graph from earlier messaged in this PR) and how to build it. Maybe a new chapter somewhere on the "Installation and Usage" page (maybe before "Contributing (or just building all the tests and examples"). But you may leave it to me if you do not have time for it.

Please, check whether commit https://github.com/mpusz/mp-units/commit/797752c724a9713250c5bf7569b98c3b74470d4c remains correct.

The best and fastest way to check docs is to serve a local instance of the docs with mkdocs serve. You can find more in https://mpusz.github.io/mp-units/2.2/getting_started/installation_and_usage/#building-documentation.

Also, could you please run pre-commit run --all-files to fix "Check CI" issues?

And of course, we need some unit tests for modules in the CI :wink:

But CI uses conan, which doesn't have an option corresponding to MP_UNITS_BUILD_CXX_MODULES.

As we are exposing regular targets as well with modules, I think that we might need two options in CMake and Conan. The first is to enable the building of modules. This could be set automatically as you tried, but we need better checks (compiler version, CMake version, build system type and version), which might be really hard to manage. The second one is to use the modules for not only a local build of tests and examples but also for the Conan customer projects.

The second one is to use the modules for not only a local build of tests and examples but also for the Conan customer projects.

I don't know how you'd do it in Conan.
In CMake, you just use the new targets.

piggyback on this issue. I'm trying to run CPMAddPackage like this:
CPMAddPackage("gh:mpusz/mp-units#f3b18e055fc96fb0cbe85fdbb96a39dac369051b")

and getting
.../build/_deps/mp-units-src/CMakeLists.txt'
  is meant to be used only as a CMake entry point and should not be included
  from other CMake files.  Include
  '.../build/_deps/mp-units-src/src/CMakeLists.txt'
  directly instead.
Call Stack (most recent call first):
  build/_deps/mp-units-src/CMakeLists.txt:40 (ensure_entry_point)

what am I doing wrong?
thanks!

Hi, the problem is that any solution that uses CMake's add_subdirectory for dependencies is not the proper way to do the dependencies management in C++. I spoke about it in one of my talks: https://youtu.be/mrSwJBJ-0z8?t=1931.
As stated in our FAQ it is not only about tests and examples. There are many issues related to this approach.
I strongly recommend using a proper package manager like Conan. Alternatively, to fix your issue, you have to find a way to do add_subdirectory on the ./src subdirectory rather than the main one in the repo.

This project's directory structure is described in our docs.

This project's directory structure is described in our docs.

thanks. I can start working on bringing in conan for our project.
I tried this small test (just as a quick try before bedtime):
# https://stackoverflow.com/questions/72362303/how-to-use-fetchcontent-populate-with-eigen
cmake_minimum_required (VERSION 3.12)

project (FetchContentExample)

# download CPM.cmake
file(
  DOWNLOAD
  https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
  ${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
  EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)

CPMAddPackage("gh:gsl-lite/gsl-lite#bd9eb162d42d8ae6a7e86902ca7060247d71ac41")
CPMAddPackage("gh:fmtlib/fmt#7.1.3")

include (FetchContent)

FetchContent_Declare(
  mp-units
  GIT_REPOSITORY https://github.com/mpusz/mp-units.git
  GIT_TAG        v2.2.0
)

FetchContent_GetProperties(mp-units)
if(NOT mp-units_POPULATED)
  FetchContent_Populate(mp-units)

  add_subdirectory(${mp-units_SOURCE_DIR}/src ${mp-units_BINARY_DIR}/src EXCLUDE_FROM_ALL)
endif()

But I'm getting export issue. Not sure if I want to fight it :)
...
-- Configuring done (4.7s)
CMake Error: install(EXPORT "mp-unitsTargets" ...) includes target "mp-units-core" which requires target "fmt" that is not in any export set.
CMake Error in build/_deps/mp-units-src/src/CMakeLists.txt:
  export called with target "mp-units-core" which requires target "fmt" that
  is not in any export set.

This is one of the reasons that I recommend using true package managers. mp-units has its own dependencies as stated in our docs. Those may depend on other packages as well. If you do not want to resolve all of this manually I strongly recommend using a proper package manager like Conan.
A short intro to Conan can be found here https://mpusz.github.io/mp-units/latest/getting_started/installation_and_usage/#obtaining-dependencies. Please note that mp-units 2.2 was just released yesterday and ut may take a few days for it to be added to ConanCenter.

If you want to use the latest stable package, the easiest way would be to follow: https://mpusz.github.io/mp-units/latest/getting_started/installation_and_usage/#conan-cmake-live-at-head.


Pinia stopped working after updating Nuxt to 2.13 (and beyond)

Hello,
First: thanks for the work put in this library, it really is a fresh breeze after using vuex for some time.
To the point:
I have just recently updated our project to new version of nuxt (v.2.13) and I have encountered a problem with pinia.
Here is the transcript of the error:
TypeError: Cannot read property 'control' of undefined
    at getInitialState (pinia.esm.js?d071:119)
    at useStore (pinia.esm.js?d071:257)
    at setup (default.vue?2e42:40)
    at mergedSetupFn (vue-composition-api.module.js?750b:418)
    at eval (vue-composition-api.module.js?750b:637)
    at activateCurrentInstance (vue-composition-api.module.js?750b:569)
    at initSetup (vue-composition-api.module.js?750b:636)
    at VueComponent.wrappedData (vue-composition-api.module.js?750b:623)
    at getData (vue.runtime.esm.js?2b0e:4748)
    at initData (vue.runtime.esm.js?2b0e:4705)

It seems like an issue in this function:
function getInitialState(id) {
    var provider = stateProviders.get(getActiveReq());
    return provider && provider()[id];
}

I am not sure, but it seems to me it could be somehow related to work done on integrating the composition-api guys just recently did in the nuxt project.
Any insights on how to make this work again?
Thanks!

Can you provide a boiled down repro using nuxt-composition-api?

Not sure if it's related to the Nuxt Composition API updates @spetex mentioned, but I'm experiencing the behavior in https://github.com/posva/pinia/issues/179 this is what my package.json and nuxt.config.js look like respectively:
// package.json
{
  "name": "nuxt",
  "version": "1.0.0",
  "description": "A description",
  "author": "Christian George Echevarria-Reina",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt-ts build",
    "old_start": "nuxt-ts start",
    "start": "nuxt-ts",
    "export": "nuxt-ts export",
    "serve": "nuxt-ts serve",
    "generate": "nuxt generate",
    "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
    "test": "jest"
  },
  "dependencies": {
    "@nuxtjs/apollo": "^4.0.1-rc.1",
    "@nuxtjs/dotenv": "^1.4.0",
    "@nuxtjs/pwa": "^3.0.0-0",
    "@tailwindcss/ui": "^0.3.0",
    "apollo-cache-inmemory": "^1.6.6",
    "body-parser": "^1.19.0",
    "express": "^4.17.1",
    "graphql-tag": "^2.10.3",
    "nuxt": "latest",
    "nuxt-composition-api": "^0.10.6",
    "pinia": "0.0.7",
    "tailwindcss": "^1.4.6"
  },
  "devDependencies": {
    "@babel/runtime-corejs3": "^7.10.1",
    "@nuxt/types": "^2.13.3",
    "@nuxt/typescript-build": "^2.0.0",
    "@nuxtjs/eslint-config": "latest",
    "@nuxtjs/eslint-module": "latest",
    "@nuxtjs/tailwindcss": "~2.0.0",
    "@vue/test-utils": "latest",
    "babel-eslint": "latest",
    "babel-jest": "latest",
    "core-js": "^3.6.5",
    "eslint": "latest",
    "eslint-config-prettier": "latest",
    "eslint-plugin-nuxt": "latest",
    "eslint-plugin-prettier": "latest",
    "jest": "latest",
    "prettier": "latest",
    "vue-jest": "latest"
  }
}

and
// nuxt.config.js

export default {
  mode: 'universal',
  /*
   ** Headers of the page
   */
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      {
        hid: 'description',
        name: 'description',
        content: process.env.npm_package_description || '',
      },
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
      { rel: 'stylesheet', href: 'https://rsms.me/inter/inter.css' },
    ],
  },
  /*
   ** Customize the progress-bar color
   */
  loading: { color: '#fff' },
  /*
   ** Global CSS
   */
  css: [],
  /*
   ** Plugins to load before mounting the App
   */
  plugins: ['~plugins/filters.js'],
  /*
   ** Nuxt.js dev-modules
   */
  buildModules: [
    // Doc: https://github.com/nuxt-community/eslint-module
    '@nuxtjs/eslint-module',
    // Doc: https://github.com/nuxt-community/nuxt-tailwindcss
    '@nuxtjs/tailwindcss',
    '@nuxt/typescript-build',
    'pinia/nuxt',
    'nuxt-composition-api',
  ],
  /*
   ** Nuxt.js modules
   */
  modules: [
    '@nuxtjs/pwa',
    // Doc: https://github.com/nuxt-community/dotenv-module
    '@nuxtjs/dotenv',
    '@nuxtjs/apollo',
  ],
  // Give apollo module options
  apollo: {
    cookieAttributes: {
      expires: 7, // optional, default: 7 (days)
    },
    includeNodeModules: true, // optional, default: false (this includes graphql-tag for node_modules folder)
    authenticationType: 'Bearer', // optional, default: 'Bearer'
    // optional
    errorHandler: '~/plugins/apollo-error-handler.js',
    // required
    clientConfigs: {
      default: '~/apollo/clientConfig.js',
    },
  },
  serverMiddleware: ['~/api/index'],
  /*
   ** Build configuration
   */
  build: {
    /*
     ** You can extend webpack config here
     */
    extend(config, ctx) {},

    babel: {
      configFile: './babel.config.js',
    },
  },
}

I'm going to try rolling back Nuxt to see if it would work in versions lower than 2.12.x and report back the results

Update: tried rolling back to 2.12.2 and fixed this particular issue -- although I had another issue where Nuxt would just refresh non-stop, can't say with certainty that it was related to this

Could you post a woring demo with pinia an nuxt?

Closing due to inactivity. Please open a new issue with a reference to this one if you can follow up with more information.

This seems to be another occurence of https://github.com/posva/pinia/issues/161. Previous check is not enough because at some point context.nuxtState started existing in spa mode as well.

It seems to be fixed in 0.1.0


draft 3 phase processing of metrics

#19 Hopefully this works as I can't test it other than through the test harness, but it should process L1 or L1-N data where present to extra state attributes. Phase to phase voltages are not processed L1-L2 etc as they can be calculated if needed.

Great! I assume this does not impact chargers that do not provide the phase related data, so it is safe to merge?

Great! I assume this does not impact chargers that do not provide the phase related data, so it is safe to merge?

Should be, it does make some changes to main metric logic though.  I am about to head off on holiday so if it does suggest reverting.

Enjoy your holiday!


Document Cronjob behaviour

Cronjobs currently have an obscure behaviour where they will run inside the CLI pod if the period of the cronjob is <= 15 min.
This is not currently documented anywhere I could find, and it should be.
While we are at it we should also document where logs end up, for cronjobs inside the container vs outside plus also provide the advanced example in this comment https://github.com/amazeeio/lagoon/issues/1653#issuecomment-603110855

This doesn't seem to be addressed in the docs yet - and the advanced example given definitely isn't, so I'll tag @AlannaBurke and put this under consideration.


[gatesgarth] Complete Milestone 16

Merged to other branches as well:
fe48adf40..6e104d2b5  gatesgarth -> gatesgarth-next


Unable to debug parcelport on a single node

Working on my laptop, I am getting an empty list of parcelports and concomitant segfaults from my rdma code when it attempts to obtain the rdma memory registration handler from the parcelport.
Could it be that recently a patch was applied that disabled initialization of the parcelport when running on a single node? If that is the case, could someone please point me to the code responsible so that I can temporarily re-enable it for my local build for testing purposes.

@biddisco just use the command line option --hpx:expect-connecting-localities which will have the side effect of not disabling the parcelport.

Thanks. That's just what I needed


Java 7/Crouton/ARM and Minecraft

I'm so sorry if this is the wrong forum...please feel free to redirect me. I saw a similar question elsewhere on this forum!
Samsung Chromebook XE303C12
KDE Linux 3.8.11 (32-bit)
Java version 1.7.0_60
I'm not able to launch Minecraft. I am 99% sure this has to do with my Chromebook being one of the ARM-based Samsung models. I totally realize this is Not Recommended, but for my nine-year-old's sake I'm trying to do it anyway.
I found a thread here which said that Java 7 as distributed doesn't support ARM processors, so I downloaded a version of 1.7.0_60 that said it supports hard float on ARMs. But I'm still getting the same kind of errors.
If you have any ideas, please let me know!
In the Game Output you get:
OpenJDK Zero VM warning: You have loaded library /home/baserty/.minecraft/versions/1.8.3/1.8.3-natives-44326013494133/liblwjgl64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/baserty/.minecraft/versions/1.8.3/1.8.3-natives-44326013494133/liblwjgl64.so: /home/baserty/.minecraft/versions/1.8.3/1.8.3-natives-44326013494133/liblwjgl64.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at org.lwjgl.Sys$1.run(Sys.java:72)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:96)
at org.lwjgl.Sys.(Sys.java:117)
at avf.J(SourceFile:2524)
at net.minecraft.client.main.Main.main(SourceFile:41)

The particular problem you're having is due to Minecraft's dependency on some libraries that are built for x86 (liblwjgl64.so). But even getting past that, there won't be any 3D acceleration on ARM (at least with Mali graphics) so the game itself will be unplayable.

So does that mean it's possible to get past that? I thought that was what I was hoping to achieve by installing the Java version for ARM, but are you saying that there's no potential replacement of this library for ARM processors?
To be honest, I've spent enough time on this that even if the game were unplayable, it would be worth getting it to run.

It's definitely possible, and it looks like it's been done before here. I can't vouch for the accuracy of those instructions though ;)

OK! I got it working and can positively confirm that, yeah, it's totally unplayable on an ARM machine. However I'm still a hero to my son for getting it to run so I am in your debt. Plus I learned a ton.
Just in case anyone else decides to attempt this...although why you would, now that I've confirmed it will run at maybe one frame a second, is beyond me...

Use this  article to install KDE Linux on the Chromebook.

Go here to build the ARM-compliant version of the liblwjgl.so and libopenal.so libraries.

When you get to Preliminary Run of Minecraft, use version 1.6.4. The most recent versions only seem to use downloaded versions of LWJGL so there's not really any local version to replace.

Install zip: sudo get-apt install zip. It's not a part of KDE Linux by default.

Use this script to copy those libraries into the .jar file where the liblwjgl.so and libopenal.so libraries are stored. Note that you will need to look in ~/.minecraft/libraries/org/lwjgl/lwjgl/lwjgl-platform to check the version. The script says 2.9.1 but my version was using 2.9.0.

never played minecraft, but have to admit this is tempting :)

Yeah, no 3D acceleration on ARM.... Not likely to improve in the near future...


Radix-sort numbers with associated data

@jasondavies thanks for the awesome module, its performance is mind-blowing! Still scratching my head over the following issue though:
In most algorithms, you don't just sort a set of numbers without context — usually you sort numbers associated with some additional data. For example, when sorting 2d points by x, you can't use radixSort in the current form because you also need to access y in addition to x in resulting x-sorted points.
What's the easiest way to modify this module to support this kind of use case? For example, could we additionally generate an array associating each sorted element wth original array through indices?

To illustrate what I would want to achieve:
var points = [[10, 10], [25, 7], [15, 12], [12, 16], ...];

var xValues = points.map(p => p[0]); // [10, 25, 15, 12, ...]

var indices = radixSortIndices(xValues); // [0, 3, 2, 1, ...]
xValues; // [10, 12, 15, 25, ...] (sorted)

var sortedPoints = indices.map(i => points[i]);

Is this even possible (retaining the performance)?

@mourner Did you ever happen to find a solution for this? I've run into this many times recently and would love to come up with a nice solution. I don't see why it would be any more complicated than striding and bookkeeping, but haven't found a module that nails it just yet.

@rreusser nope, so far I've been using a custom quicksort for that which swaps elements in multiple typed arrays in parallel. It's usually fast enough. Here's a recent example https://github.com/mourner/flatbush/blob/master/index.js#L199

Makes sense. Thanks!

that sorts bbox data alongside the hilbert values

Haha that's exactly how I got here, though mine was a z-order curve for triangular mesh face bounding boxes. I've stuck with top-down at the moment though since this all took me down a bit of a rabbit hole. (30 bits for three dimensions leaves a bit to be desired (pun??)). See: bvh for top-down result. Had fun profiling it a bit with Greg Tatum, though concluded mostly that nothing too silly is happening. It's about 100ms to index 160k faces—well, with a fixed 10 faces per leaf as opposed to the surface area heuristic—because I just can't justify further optimization at the moment. Could be faster, but perhaps not that much faster.
But I digress.
Hadn't worked through flatbush, but a very helpful read. Thanks for the reference! 😄

@rreusser this looks great! I also recommend looking into into Hilbert curves (fast 3D algorithm here) — they may be slower to calculate, but are much better suited for bottom-up packing because the resulting BVH has less node overlap, meaning much faster queries: https://beta.observablehq.com/@mourner/hilbert-curve-packing


[tsm1] 30 second hard shutdown timeout causing hard kills as normal

When we gracefully shutdown InfluxDB while running under load, there is a hard coded 30 second timeout (in main.go).
109                 case <-time.After(time.Second * 30):
110                         m.Logger.Println("time limit reached, initializing hard shutdown")

Our compaction are taking 2-4 minutes generally, and this means that typically on shutdown they are getting killed in flight. It appears that when the server starts up, it simply continues the compaction without drama, but we wonder if that is not a bit risky and if the 30 second limit should perhaps be configurable, and should be recommended to be set to a value > the standard compaction time.
For example, from a running log:
[tsm1] 2015/11/21 09:31:39 Compaction of /data/influxdb-data/metrics/tg_udp/default/2 took 3m7.314151723s

From shutdown:
[tsm1] 2015/11/21 09:32:03 writing new index file /data/influxdb-data/metrics/tg_udp/default/2/0004585.tsm1
[tsm1] 2015/11/21 09:32:04 rewriting index file /data/influxdb-data/metrics/tg_udp/default/2/0004584.tsm1 with /data/influxdb-data/metrics/tg_udp/default/2/0004586.tsm1
[tsm1] 2015/11/21 09:32:05 rewriting index file /data/influxdb-data/metrics/tg_udp/default/2/0004583.tsm1 with /data/influxdb-data/metrics/tg_udp/default/2/0004587.tsm1
[run] 2015/11/21 09:32:07 time limit reached, initializing hard shutdown

On startup:
[tsm1wal] 2015/11/21 09:34:08 tsm1 WAL writing to /data/influxdb-data/metrics/tg_udp/default/2
[tsm1wal] 2015/11/21 09:35:05 startup flush of /data/influxdb-data/metrics/tg_udp/default/2 with 1368143 keys and 12120000 total values of 194084718 bytes
[tsm1] 2015/11/21 09:36:04 writing new index file /data/influxdb-data/metrics/tg_udp/default/2/0004586.tsm1
[tsm1] 2015/11/21 09:36:06 rewriting index file /data/influxdb-data/metrics/tg_udp/default/2/0004584.tsm1 with /data/influxdb-data/metrics/tg_udp/default/2/0004587.tsm1
[tsm1] 2015/11/21 09:36:06 rewriting index file /data/influxdb-data/metrics/tg_udp/default/2/0004583.tsm1 with /data/influxdb-data/metrics/tg_udp/default/2/0004588.tsm1
[tsm1wal] 2015/11/21 09:36:32 /data/influxdb-data/metrics/tg_udp/default/2 flush to index took 1m26.43364572s
[tsm1] 2015/11/21 09:36:32 Starting compaction in /data/influxdb-data/metrics/tg_udp/default/2 of 27 files to new file /data/influxdb-data/metrics/tg_udp/default/2/0004589.tsm1
[tsm1] 2015/11/21 09:37:04 Compaction of /data/influxdb-data/metrics/tg_udp/default/2 took 32.44334413s
[subscriber] 2015/11/21 09:37:05 opened service

(This ends up taking several minutes)
We also notice that these compaction are 100% CPU bound, and only seem to use 1 core (I guess its one goroutine). Since they block startup it might be good to split the CPU work across multiple goroutines if possible?

I can confirm we also experience this, although our startup times are much longer - sometimes up to one hour.

Should be fixed in 0.9.6 release.


[FTL-1755] - affinidi-vault integration (phase #1)

Added/updated business logic in WalletStorageService to work with affinidi-vault service:

saveCredentials - hashing credentialId and types to store separately from VC. Removed storing logic to bloom-vault.
getAllCredentials (options by types) - get combined list of affinidi-vault and bloom-vault.
getCredentialById - get credential by Id from affinidi-vault, in case of error try bloom-vault.
deleteCredentialById - delete credential by id from affinidi-vault, in case of error try bloom-vault.
_authorizeVcVault - creating Did request/response tokens.

Added integration tests for the use cases above.
Updated version to 6.0.0-beta.4

Also, if you have time for that, you might want to consider making the code simpler an more maintainable, and this PR easier to review, by, for example:

Renaming the old WalletStorageService to BloomVaultStorageService

Removing everything related to saving credentials
Removing relevant parts related to decrypting credentials
Basically, it only needs to expose the following public methods: deleteAllCredentials, fetchAllBlobs, deleteCredential. You may also preserve methods like getSignedCredentials and getCredentialOffer (they do not belong to WalletStorageService at all, but that's another task). It might also make sense to implement simple getCredentialById there; and since it already has filterCredentials, we might as well implement fetchAllCredentialsByTypes (if so, we should probably export fetchAllDecryptedCredentials instead of fetchAllBlobs)
So it will be a wrapper around BloomVaultApiService, providing somewhat reasonable interface for bloom vault unreasonable API (it will contain all the logic of fetching credentials in batches, etc)

Creating the new WalletStorageService which will work with AffinidiVaultApiService, and fall back to BloomVaultStorageService as needed; but will not contain any of the complex logic required by bloom vault (fetching credentials in batches, dealing with indices, etc).

That way, when the day comes for us to drop bloom vault support, it will be enough to just remove all references to BloomVaultStorageService from WalletStorageService. And in the meantime, we won't have all of that legacy code in WalletStorageService, making it easier to maintain.

Overall it seems good now (besides these comments), good job!
By the way if you need to catch lint errors locally, npm run lint should do the job.


Security enhancements

Just to mention that there are two good practices that are missing in this library. Worth considering their implementation to improve security.
First one is required by RFC 6238 - authentication code once accepted must not be accepted twice (i.e. again). This requires additional field in DB.
Second one is a best practice, also recommended by RFC 6238 - encrypt security key in DB. The encryption key must not be stored in DB. One-way hash functions like scrypt cannot be used for TOTP, but simple encryption would suffice.
(Also note there is by mistake used term "authorisation" in README.)

hi, @vilda
Having any ideas about gem which follows that practice you've mentioned?
I'm looking for good 2-factor-auth library now and didn't find any yet.

@kiote All gems I found were missing some of those desired properties. However, there is https://github.com/tinfoil/devise-two-factor which encrypts data in DB and they actually implemented code-reuse-avoidance when I opened a ticked for it. It seems maintained, worth checking out.

Thanks for suggestion, Viliam!
Tried that one, but faced with https://github.com/tinfoil/devise-two-factor/issues/52.

I've been working on a pull request for encrypting the OTP. It should be done today.

awesome! I'm going to have a looong holidays soon, but hopefully will have a time to try out your solution/fix! Thanks!

Aren't these security flaws already fixed?

Yes, these security issues are fixed in commits:
https://github.com/Houdini/two_factor_authentication/commit/2df6fa248192f409526bc06b59d02e8655a20839
https://github.com/Houdini/two_factor_authentication/commit/d2b6d39d2419fc5fc78bea1b1889d8277f679f80


⚠ Bofrost.be has degraded performance

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

HTTP code: 200
Response time: 1769 ms

Resolved: Bofrost.be performance has improved in 258dca7 after 1 hour, 4 minutes.


Navbar shows mobile background on wider screens

Hello, I have encountered another issue.  Between, and including, the widths of 992px - 1007px, my background for when the navigation menu is open on slim widths is appearing, while being on the desktop size screen.  That probably sounds confusing but here is a screenshot.

Would this be due to possible inconsistencies of my media query max-width's?
As before, my site and code is located at unknownluck.github.io.

Hi, @UnknownLuck! I understand what is the problem but it is confusing for me because on my side this problem is not present. I will give you a video to see how it works on my side. Have you made some changes in the scss?
https://www.dropbox.com/s/dutakwu80bxl4vo/unknown.mov?dl=0
Regards,
Dragos

Interesting.  I have seen this appear in chrome and opera on two separate computers.  I have not changed any scss, mainly out of not knowing much about it. I will take a look and see if I can figure anything out.

Okay, now that I found that, I was able to add a media query for these screen widths and force there to be no background. Not sure what caused this, but I'm glad I finally got this bug out. Thank you!


fix(runtime-dom): true-value and false-value not working on first render

close #2694

Sorry, I just saw this after I pushed 48f00c0f (note it just moves the setChecked call)

It does occur to me that true-value and false-value are not properly handled for SSR.

Sorry, I just saw this after I pushed 48f00c0 (note it just moves the setChecked call)

@yyx990803
I know this and tested it already. Unfortunately this is not working.
We should assign true-value or false-value to checkbox but setChecked is not do this after first render.

  model {{ model }}
  <input type="checkbox" v-model="model" :true-value="11" :false-value="22" />

After first render,the model value is still false not 22.

And my PR is make it works fine.


T&T dataset test error

Hi, I'm trying to test the advanced sequence data of tnt dataset, but when I run sh sh/tnt.sh, I got "TypeError: forward() missing 3 required positional arguments: 'sample', 'depth_nums', and 'interval_scales'", I checked the code but found nothing missing. I don't know what happend, could you help this? Thank you!

Have you solved this problem? I also encountered the same problem


Integration with django-plans

In short:
manuals and sample test project suggest that listener should treat order.total as a property::
def new_payment_query_listener(sender, order=None, payment=None, **kwargs):
"""
Here we fill only two obligatory fields of payment, and leave signal handler
"""
payment.amount = order.total
payment.currency = order.currency
# ...
However, django-plans implement Order.total as a function::
def total(self):
...
Combining these two projects leads to a problem, for which I see 3 possible solutions:

Fix order.total => order.total() everywhere in django-getpaid.
Make Order.total in django-plans a property.
In every project inherit from plans.models.Order and redefine total as a property.
In this case we have to document it somehow, but I don't really like this option.

@AndrewLvov getpaid doesn't care about (tries not to use) order at all. You can define your signal listener the way you want it (django-plans want's it). We can not update documentation for every subscription app that is out there.
I'm sorry but I can not see how this is a problem for you.


neo.mjs context: adding support for SharedWorkers

Feature request
I am not 100% sure if this still fits the scope of the webpack project.
I am working on the topic "Expanding Single Page Apps into multiple Browser Windows", which can look like this:

Quick background info:
Apps we create using neo.mjs just import the main thread. The main thread creates the app, data & vdom workers. The only important part here is the app worker: you define which app (entrypoint) you want to use and the app worker dynamically imports it.
For the dist versions which rely on webpack, webpack has no chance to know what could get imported, so I created build specific entrypoints.
Example:
https://github.com/neomjs/neo/blob/master/buildScripts/webpack/entrypoints/myApps/Covid.mjs
import '../../../../src/worker/App.mjs';
import '../../../../apps/covid/app.mjs';

This cheating a little bit, since inside the dist versions, the import is no longer dynamic.
Works fine though.
Now for the multi Browser Window apps, i needed to switch the App (,Data & VDom) workers into SharedWorkers.
It does work fine using webpack based builds as long as you use only 1 app:
Online Demo: https://neomjs.github.io/pages/node_modules/neo.mjs/dist/development/apps/sharedcovid/index.html#mainview=table
More background infos:
https://medium.com/swlh/neo-mjs-v1-2-5-support-for-sharedworkers-including-firefox-b31f144cea3f?source=friends_link&sk=6bd4d0beb0e095c388153ce8f06aa76f
I got a version using multiple Apps running directly inside Chrome (using JS modules inside the browser) and it would be nice if it would be possible to achieve the same result with a webpack based build.
Now this is the tricky part:
SharedWorkers have to use the same file as an entry point (otherwise the browser will spawn new SW instances, which makes using them pointless).
To make this happen, we need to use separate webpack based builds (Shared AppWorker VS apps), which can work in combination.

What is the expected behavior?
https://www.youtube.com/watch?v=RslY-e-f_qc
It would be nice if this app could run the same way it does in dev mode (without any builds).
What is motivation or use case for adding/changing the behavior?
SharedWorkers are a big deal, even the webkit team is finally thinking about supporting them:
https://bugs.webkit.org/show_bug.cgi?id=149850
This has a big potential to improve the way, UI development works in general.
How should this be implemented in your opinion?
I have been thinking about this quite a bit.
For the neo.mjs context, we should create a separate webpack based build just for sharedthe app worker (not including apps).
Then, to build apps, we need separate builds (entry points for builds).
I was thinking about something like:
import '../../../../src/worker/App.mjs';

import(/* webpackChunkName: 'apps/sharedcovid/app' */       '../../../../apps/sharedcovid/app.mjs');
import(/* webpackChunkName: 'apps/sharedcovid_chart/app' */ '../../../../apps/sharedcovid_chart/app.mjs');
import(/* webpackChunkName: 'apps/sharedcovid_helix/app' */ '../../../../apps/sharedcovid_helix/app.mjs');
import(/* webpackChunkName: 'apps/sharedcovid_map/app' */ '../../../../apps/sharedcovid_map/app.mjs');

This way, the app worker will get parsed as well for each app build to ensure that we don't duplicate modules inside the app worker and apps (especially duplicating the IdGenerator would break a lot).
We can adjust output: {filename: chunkData => {}}
to save the app worker output itself for an app build into a not used dummy chunk (e.g. 0.js or tmp.js).
we can use split chunks for app related code this way (multiple dynamic imports which are supposed to not duplicate code).
I tried this approach, but am getting errors. E.g. since we are not using the "real" entry point, the build app worker output is not able to pick up the app chunks (webpack_require.e is undefined, since the separate app worker output is no longer exposing dynamic imports to webpack).
Are you willing to work on this yourself?
I don't have much time at the moment (still polishing the content of the first shared workers demo to expand SPAs into multiple browser windows), but am willing to help a bit and can definitely provide more input if needed.

What do you want webpack to do here?

Hi Tobias,
we probably need to enhance webpack a little bit => adding a config for inserting the webpack based logic to include the dynamic import logic although it does not find dynamic imports (unless this one already exists).
Building the App Worker on its own and including the output needs to be the starting point for neo.mjs (the one the main thread picks up for every app).
When adding an app chunk like the output of the one inside the last code snippet, the app worker gets parsed again (to avoid duplicate modules), so i think the harmony related imports on this end should match the ones of the app worker build (since it is the first import here).
When changing the app worker code base, I would need to rebuild all apps, but this is fine (should not happen too often).
The biggest challenge here is that the standalone build of the App worker needs to be able to pick up one or more of the dynamic imports (chunks) for apps.
Makes sense?
Best regards,
Tobias

we can close this one, since the new build strategy for the neo framework resolves it in a different way.