Change wording - PKU2U is needed to use RDP between Hybrid Azure AD joined devices

When using RDP between Azure AD joined devices as outlined in https://docs.microsoft.com/en-us/windows/client-management/connect-to-remote-aadj-pc with NLA enabled, CredSSP uses PKU2U with SPNego. PKU2U is disabled by default on server SKUs and thus RDP from a hybrid Azure AD joined server to a Azure AD joined Windows 10 device or Hybrid Azure AD joined domain member Windows 10 device fails. To resolve this PKU2U needs to be enabled on server SKU. Customers wanting to do this will be confused by the current wording here implying a security risk.

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

ID: a7aabd37-6d2e-a8f2-5fa5-01c9cb4eccce
Version Independent ID: d683500b-1602-ecad-4fe3-e80238aad24c
Content: Network security Allow PKU2U authentication requests to this computer to use online identities (Windows 10)
Content Source: windows/security/threat-protection/security-policy-settings/network-security-allow-pku2u-authentication-requests-to-this-computer-to-use-online-identities.md
Product: w10
Technology: windows
GitHub Login: @Dansimp
Microsoft Alias: dansimp

@officedocsbot assign @jvsam

Thank you for sharing that information @maweeras-msft. I will get this over to the Windows content writing team for review.  If you have suggestions on how it should be written so users can better understand, please let us know.

Hi again @poortom1004, please be informed that the pull request (See PR #5336) that contains suggestions based from your feedback has been approved and merged. This documentation will be updated in the next scheduled publishing run.
We will now close this issue, but please continue to send your feedback and suggestions to help improve the quality of the technical documentation of Microsoft Docs. Thank you for being part of the community!"

Hi again @maweeras-msft , I just want to inform you that the pull request (See PR #5373) that contains suggestions based from your feedback has been approved and merged. The documentation will be updated in the next scheduled publishing run. We will now close this issue, thank you again for feedback!

@officedocsbot close


Exception in callback of async function: Error: You cannot pipe after the response has been ended.

I'm getting this error sometimes (Meteor 1.2.1 on mac), when adding the file through url, like this
var file = new FS.File(url);
var mediaInsert = Meteor.wrapAsync(function(file, callback) {
        Files.insert(file, function(err, fileObj) {
            // set filename to _id
            file.name(file._id);

            callback && callback(err, fileObj);
        });
    });
    var fileObj = mediaInsert(file);

// wait for downloading
    while (getFileStatus(fileObj._id) != 'valid') {
        Meteor._sleepForMs(200);
    }

This piece of code runs in a Meteor.call and returns the _id of the new file. Additionally, i check whether the file is already downloaded and only then return the _id.
So i guess something creates a stream and then i return and there are other streams still somewhere..
CFS-related package versions:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
The full exception here:
I20160129-16:02:06.655(1)?     at Request.pipe (/Users/akuzmenok/.meteor/packages/cfs_data-man/.0.0.6.d6atck++os+web.browser+web.cordova/npm/node_modules/request/request.js:1726:13)
I20160129-16:02:06.655(1)?     at beginStorage (meteor://💻app/packages/cfs_collection/packages/cfs_collection.js:220:1)
I20160129-16:02:06.656(1)?     at meteor://💻app/packages/cfs_collection/packages/cfs_collection.js:249:1
I20160129-16:02:06.656(1)?     at wrappedCallback (meteor://💻app/packages/mongo/collection.js:544:1)
I20160129-16:02:06.656(1)?     at runWithEnvironment (meteor://💻app/packages/meteor/dynamics_nodejs.js:110:1)
I20160129-16:02:06.656(1)?     at meteor://💻app/packages/meteor/dynamics_nodejs.js:123:1
I20160129-16:02:06.656(1)?     at meteor://💻app/packages/mongo/mongo_driver.js:322:1
I20160129-16:02:06.656(1)?     at runWithEnvironment (meteor://💻app/packages/meteor/dynamics_nodejs.js:110:1)

Ok some more investigation: i think it happens when the file is 0 bytes long (which is ok because the http response code was 200, so it should assume the file is 0 bytes).


Netlify cli crashes when I run netlify dev

Describe the bug
Netlify cli crashes
Steps to reproduce
TypeError: Invalid URL
at new URL (node:internal/url:775:36)
at /Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/netlify/functions/render.ts:30:17
at Layer.handle [as handle_request] (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/route.js:149:13)
at Route.dispatch (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/route.js:119:3)
at Layer.handle [as handle_request] (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/layer.js:95:5)
at /Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/index.js:346:12)
at next (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/index.js:280:10)
at Function.handle (/Users/andrewaskins/Documents/Projects/Disco Shrimp/chartjuice/Code/chartjuice-functions/.netlify/functions-serve/render/node_modules/express/lib/router/index.js:175:3)
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M2
Binaries:
Node: 20.11.1 - /usr/local/bin/node
npm: 10.5.0 - /usr/local/bin/npm
Browsers:
Chrome: 125.0.6422.142
Safari: 17.5
npmGlobalPackages:
netlify-cli: 17.26.3
Configuration
[build]
command = "echo Building Functions"
functions = "netlify/functions"
publish = "public"
[functions]
node_bundler = "esbuild"
external_node_modules = ["express"]
[[redirects]]
force = true
from = "/*"
status = 200
to = "/.netlify/functions/render/:splat"
Environment
System:
OS: macOS 14.5
CPU: (8) arm64 Apple M2
Memory: 646.44 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.1 - /usr/local/bin/node
npm: 10.5.0 - /usr/local/bin/npm
npmGlobalPackages:
netlify-cli: 17.26.3

Looks like it was being caused by my redirects

I wasn't properly handling my errors in express, cli is behaving as expected now https://expressjs.com/en/guide/error-handling.html


"onlyUpdateForKeys" or "pure" with react-router.

I'm sorry, I'm very newbie.
I wrote this: https://codesandbox.io/s/623o62570z to understand.
I use this code in Home component:
import React from "react";
import { onlyUpdateForKeys } from "recompose";

const Home = () => {
  console.log("Home render!");
  return
Home
;
};

export default onlyUpdateForKeys([])(Home);

and I thought it would never be rendered.
Instead from page to page I see in console: Home render!
Where am I wrong?

First time it would be rendered always. Just not rerendered.
Router renders component from scratch in your example if you switch route.

@istarkov, yes. I now understand. But maybe I can use render? Like this:

So in this case when I switch route it assign my component to Garbage collector? Is it garbage already?

Now here https://codesandbox.io/s/4rq3x51490 I'm using render={()=><Component/>}.
But it's the same. :(

If you don't want to, use children callback and some kind of css display none i.e
<Route path={blabla} children={({ match, ...rest }) => (
  <React.Fragment>

  </React.Fragment>
)}/>

I'll close this ;-)

So there is no way to re-use component with react-router except css trick?!?

How you will hide component from dom? ;-)
I know other methods like render content above instead of hide, etc ;-)
You can for example set if (!props.display) return null; so you component will be reused but it's children are not.
Don't think about reusing, garbage and other stuff - it's so really rare cases in web development so I don't know what are you writing that you think about.
Based on my experience all that performance issues  usually have novice developers in their mind but not in any real example ;-)


first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, dlrs_ContactTrigger: execution of AfterUpdate caused by: System.NoAccessException: Entity is not api accessible

Error Type: Batch Apex error
Error Date: 2016-11-04 03:10:08
Message: "First error: Update failed. First exception on row 0 with id 003A000000uVn8nIAC; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, dlrs_ContactTrigger: execution of AfterUpdate caused by: System.NoAccessException: Entity is not api accessible Class...."
Context: npsp__RLLP_OppContactRollup_BATCH
Stack Trace:
null

The above error started appearing last week, around November 4, despite releasing no new Apex code around that time.
What is the best way to debug and fix the error? We are running the latest versions of both Declarative Lookup Rollup Summaries Tool and the Nonprofit Success Pack.

Hi, please see this post on the Power of Us Hub which explains what is going on and a suggestion on how to resolve. If it doesn't help, please post in the Hub and we'll be able to get to the bottom of it. It's related to a change in error handling in the NPSP 3.83 release. We troubleshoot on the Hub, so I'll be closing this issue here.  Thanks for understanding!

Thanks @judisohn. I've re-scheduled the jobs.


Update dependencies.

@robertohuertasm The build is failing for node 6.5.0 because streamfilter v1.0.6 requires node engine to be >=6.9.5.
We have two options:

Revert the dependency update that uses that package
We drop support for vscode  < 1.12.0.

Closing in favor of  #1394. There is something obviously wrong here but I can't figure out what.


Azure OpenAI - Exception has occurred: InvalidRequestError Resource not found

Hi, I'm trying to use the examples for Azure OpenAI with langchain, for example this notebook in https://python.langchain.com/en/harrison-docs-refactor-3-24/modules/models/llms/integrations/azure_openai_example.html , but I always find this error:
Exception has occurred: InvalidRequestError Resource not found
I have tried multiple combinations with the environment variables, but nothing works, I have also tested it in a python script with the same results.
Regards.

Hi @eavanvalkenburg ,the deployment_name parameter is filled, but it doesn't works, I think that a proper documentation with a working sample should be in the langchain documentation.

Hi @eavanvalkenburg ,the deployment_name parameter is filled, but it doesn't works, I think that a proper documentation with a working sample should be in the langchain documentation.

#1942 You can refer to this

Dear @xinj7 , I confirm that the #1942 fixes the AzureChatOpenAI function, but it doesn't fix the AzureOpenAI function that is used by me, and it is used in the documentation page I was refering to.

same error, trying to use a deployment named `gpt-35-turbo'.

AzureOpenAI takes a deployment_name parameter - this resolved it for me


Feature/zephyr

WIP: Test before merging
This PR add support for Zephyr in Olimex and ST Discovery boards

When checking this out, I have two issues

It doesn'tf find the STM-board, the configuration only knows "generic"
The "west" build used by Zephyr is not found

@jfm92 is working in the CI and we consider that the new CI should works fine when this branch and https://github.com/micro-ROS/micro-ros-build/pull/80 are merged

Well, I have approved #80 already, so you can try whether merging it, and integrating those changes in this PR, would work.

I'm waiting for @jfm92 and @julibert  review, then when everybody is ok, we will merge

Zephyr transports issue: https://github.com/eProsima/Micro-XRCE-DDS-Client/issues/138

BTW are the configuration flags (-t, -d, --ip, etc...) working on Nuttx?
I'll check


ID is a duplicate

I don't know where you got your ID from , but it's already in use. Please generate a new one by creating a wokwi project and using it.
If you get this issue closed in a few hours I may be able to still include your project.

@mattvenn ID bumped. The ID was the ID for the project linked in the readme - I'd assumed it generated a template project. Apologies again!


Add a docker definition for SQL Server

There's one benchmark that requires SQL Server, I should add a docker definition for a SQL Server docker image to load as needed, since not all machines have SQL Server installed to run the benchmark.

Done on PR #22


draft spatial awareness system architecture

Overview
Add architectural documentation for the spatial awareness system. Includes basic data flow and class / interface diagrams.
Interfaces are documented with the data type and purpose of each property and method. This information will also be included in the source files.
Changes

Fixes #2508  .

changing my branch... sorryfor the churn


subsys: net_buf: Make net_buf_unref thread safety.

Current buf->ref not thread safely, there are race conditions in some scenarios.
For example, in Bluetooth applications, net_buf is used extensively. Although the Bluetooth host stack is a Coop thread, which can avoid competition, but the thread where the application's main function is located is not necessarily a Coop thread, which will cause a race condition.
The following is a test code to verify what may happen:
static void thread1(void *p1, void *p2, void *p3)
{
 while (1)
 {
   pthread_mutex_lock(&mutex);
   pthread_cond_wait(&cond, &mutex);
   if (--ref > 0) {
     printf("%s ref %d\n", k_current_get()->name, ref);
   } else {
     k_fifo_put(&fifo, &node);
   }
   printf("%s ref %d\n", k_current_get()->name, ref);
   pthread_mutex_unlock(&mutex);
 }
}
static void thread2(void *p1, void *p2, void *p3)
{
 while (2)
 {
   pthread_mutex_lock(&mutex1);
   pthread_cond_wait(&cond, &mutex1);
   if (--ref > 0) {
     printf("%s ref %d\n", k_current_get()->name, ref);
   } else {
     k_fifo_put(&fifo, &node);
   }
   printf("%s ref %d\n", k_current_get()->name, ref);
   pthread_mutex_unlock(&mutex1);
 }
}
static void thread3(void *p1, void *p2, void *p3)
{
 while (2)
 {
   printf("Start\n");
   ref = 1;
   pthread_cond_broadcast(&cond);
   k_sleep(K_MSEC(10));
   void *a = k_fifo_get(&fifo, K_FOREVER);
   void *b = k_fifo_get(&fifo, K_NO_WAIT);
   printf("%p %p\n", a, b);
 }
}

After some repeat test, race condition:
Start
h4_rx_thread0 ref 0
h4_rx_thread1 ref 255
h4_rx_thread1 ref 255
0x5558f5f63470 (nil)
Start
h4_rx_thread0 ref 0
h4_rx_thread1 ref 255
h4_rx_thread1 ref 255
0x5558f5f63470 (nil)
Start
h4_rx_thread0 ref 0
h4_rx_thread1 ref 255
h4_rx_thread1 ref 255
0x5558f5f63470 (nil)
Start
h4_rx_thread0 ref 0
h4_rx_thread1 ref 0
0x5558f5f63470 0x5558f5f63470

@jhedberg Please take a look.

@jhedberg Please take a look.

Not 100% happy with this solution, since you only need the protection per-buffer rather than "all buffers from the same pool", but I understand the rationale for not wanting to increase the struct net_buf buffer size. I think we should consider promoting the net_buf refcount to an actual atomic_t.

@jhedberg Please take a look.

Not 100% happy with this solution, since you only need the protection per-buffer rather than "all buffers from the same pool", but I understand the rationale for not wanting to increase the struct net_buf buffer size. I think we should consider promoting the net_buf refcount to an actual atomic_t.

irq_lock & irq_unlock

irq_lock & irq_unlock

@LingaoM that's kind of taking this in the wrong direction. My concern with the lock in net_buf_pool was that it locks the entire pool when you really only need to lock the buffer. With irq_lock() you're not just locking the pool but the entire system :)

And just to follow-up on my earlier thought, ideally we shouldn't need to lock at all, and that's something that we'd get if had simply atomic_t in the netbuf (with the downside that then memory overhead grows).


Problem about tuning hyper-parametres

I have tried GridSearchCV and BayesSearchCV for tuning my lightGBM algorithm (for binary classification).
I have used 10 iterations. And I have indicated scoring ="roc_auc"
In the first iteration, I have got:
best score : 0.71...
and best param : max-depth: 10 , learning-rate: 0.17..., num-leave:175, n-estimators: 176, ....

In the 10th iteration, I have got :
best score : 0.72...
and best param : max-depth: 9 , learning-rate: 0.19..., num-leave:168, n-estimators: 172, ....

Then I tried to train my LightGBM classifier with the 10th param (which supposed that it get the best score!!). I have got :
AUC : (0.7541...    , 0.6467...)
Accuracy: 0.7338..
RMSE: 0.5216..

Then because I had some curiosity I have tried to train my classifier with (best param) of the First iteration (which is considered as worst score)!. I had surprised by the result that I have got:
AUC : (0.7545...   , 0.6592...)
Accuracy: 0.7332..
RMSE: 0.5152..

Because I have fixed previously scoring by roc-auc, Generally, I should get AUC in the 10th iteration better than the first iteration but I have got the contrary.
I have supposed that it is considered AUC train of 10th iteration 0.7541 as better than 0.7545 of the 1st iteration because of the overfitting but when I tried to check the 3rd and the 5th iteration I get on the 3rd : 0.7532   and in the 5th : 0.7548.
So I don't know what the best score in this algorithm means. And what is its role exactly if it gets values as the described situation. I had tried then many times with other tuning parameters but I have got the same case. I don't know where is the problem exactly.

My Source Code:
# X and y data are splited to 10 fold Cross- validation

import lightgbm as lgb
from skopt import BayesSearchCV
from sklearn.model_selection import StratifiedKFold

ITERATIONS =10
lghtboost = lgb.LGBMClassifier(silent=False, n_jobs=7, verbose=0,  metric=['roc_auc'])

param_grid ={'max_depth': [6, 15], 'learning_rate': [0.1,0.2], 'num_leaves': [150, 210],
                       'n_estimators': [100,180], 'min_child_samples': [5], 'colsample_bytree': [1] }

bayes_cv_tuner_lgh = BayesSearchCV(
        lghtboost,
        param_grid,
        n_iter=ITERATIONS,
        scoring = 'roc_auc',
        cv = StratifiedKFold(n_splits=3, shuffle=True, random_state=0),
        refit = True,
        random_state = 0,
        verbose=0,
        n_jobs=7
        )

def status_print(optim_result):
     print('Best ROC-AUC: {}'.format(bayes_cv_tuner_lgh.best_score_))
     print('params = {}'.format(bayes_cv_tuner_lgh.best_params_))

result_Lightboost = bayes_cv_tuner_lgh.fit(X_train.values, y_train.values, callback=status_print)

d_train = lgb.Dataset(X_train, label=y_train)

## I press the last best parameter:
best param = {max-depth: 9 , learning-rate: 0.19..., num-leave:168, n-estimators: 172, ....}

model_lgh = lgb.train(params, d_train)
y_pred = model_lgh.predict(X_test)

def auc_LGBM(m, train, test):
    return (metrics.roc_auc_score(y_train,m.predict(train)), metrics.roc_auc_score(y_test,m.predict(test)))

print('AUC : ', auc_LGBM(model_lgh, X_train, X_test))
print("Accuracy : ", metrics.accuracy_score(y_test, y_pred.round()))
print("RMSE : ", np.sqrt(metrics.mean_squared_error(y_test, y_pred.round())))

@LaymounaLhoulwa You are performing the parameters search on train data with cv and then you're testing your best parameters on test data after refitting on the whole train data. Of course, the best params for train data can be not the best for test data. Perhaps, your train and test data distributions are slight different. Try to find better train/test splitting.


Missing clusters for water leak / flood sensors

Problem
Missing clusters for water leak / flood sensors
Proposed Solution
Port Silabs implementation

Not needed given import issues filed


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target_4be66731-9b2f-4be3-a15b-b788bae06469/pull/1 is merged into live branch.
Auto archive content to https://github.com/OPS-E2E-PPE/docs-archive-test-target_4be66731-9b2f-4be3-a15b-b788bae06469.git

Docs Build status updates of commit 2a42812:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-11-21-02-55-17 has been deleted or has been force pushed: fatal: couldn't find remote ref refs/heads/Archive_master_2019-11-21-02-55-17

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Improve locking safety for RID handles builds

Additional locks are added. This is primarily to cover a potential race condition where the pool is resized from another thread during a get operation.
Notes

This is compiled out of regular builds (so has no effect in vanilla Godot)
It improves the thread safety of rids=handles and rids=tracked_handles builds.
Only noticed this as we were discussing the handles builds in #60406.
To my knowledge, these race condition haven't occurred for me in 5 months of use, but it is probably a good idea to close these possibilities.
Luckily it doesn't seem to have much effect on performance adding the extra lock on the get. Godot 4 puts this lock on RID gets as well, probably for similar reasons.

Note that by design in Godot 3.x, the RID objects themselves aren't thread safe. The RID database itself is intended to be thread safe, but there's nothing to stop one thread e.g. deleting a RID object mid way while another thread is accessing that object.

Thanks!


Bump IS7 KM Version to 2.0.2

$Subject

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Closing as this is upgraded by PR https://github.com/wso2/product-apim/pull/13471


HTTP Error 302 or 0Mbit upload

Hello,
Since today I have a problem. Speedtest-cli fails with the error:
root@nagios:~# speedtest-cli
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Failed to retrieve list of speedtest.net servers:
HTTP Error 302: The HTTP server returned a redirect error that would lead to an                                                                              infinite loop.
The last 30x error message was:
Found
HTTP Error 302: The HTTP server returned a redirect error that would lead to an                                                                              infinite loop.
The last 30x error message was:
Found
OR, sometimes, speedtest-cli reports me a normal result in "download speed" but with 0,00MBps of Upload Speed.
I've tried replacing http://c.speedtest.net for www, with no result.
The version of speedtest-cli is 0.3.3a and Python 2.7.1+
Can you help me please?
Thanks.

Does the no-https branch help with any of your issues?
https://github.com/sivel/speedtest-cli/blob/no-https/speedtest_cli.py

Faced same problem today. No-https version helped.

Same problem on no-https:
./speedtest_cli.py
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Failed to retrieve list of speedtest.net servers:
HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
Found
HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
Found

Been getting this recently but its somewhat random, I guess the 302 is expected just not sure why It ends up in a infinite loop.
Just got it now, but tried again and it worked...
Testing with curl doesn't indicate any 302
% curl -I http://www.speedtest.net/speedtest-servers-static.php
HTTP/1.1 200 OK
Cache-Control: maxage=600
Content-Type: text/xml
Date: Fri, 10 Jul 2015 16:57:30 GMT
Expires: Fri, 10 Jul 2015 17:07:30 GMT
Pragma: public
Server: Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 PHP/5.3.27
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-Powered-By: PHP/5.3.27
X-XSS-Protection: 1; mode=block
Content-Length: 0

% curl -I https://www.speedtest.net/speedtest-servers-static.php
HTTP/1.1 200 OK
Cache-Control: maxage=600
Content-Type: text/xml
Date: Fri, 10 Jul 2015 16:57:36 GMT
Expires: Fri, 10 Jul 2015 17:07:36 GMT
Pragma: public
Server: Apache/2.2.25 (Unix) mod_ssl/2.2.25 OpenSSL/1.0.1e DAV/2 PHP/5.3.27
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-Powered-By: PHP/5.3.27
X-XSS-Protection: 1; mode=block
Content-Length: 0

And I get the same result for the config page, wonder if its maybe a cache issue server-side

Similar issue for me on OS X Yosemite
Traceback (most recent call last):
File "/usr/local/bin/speedtest", line 9, in
load_entry_point('speedtest-cli==0.3.1', 'console_scripts', 'speedtest')()
File "/Library/Python/2.7/site-packages/speedtest_cli.py", line 686, in main
speedtest()
File "/Library/Python/2.7/site-packages/speedtest_cli.py", line 536, in speedtest
servers = closestServers(config['client'])
File "/Library/Python/2.7/site-packages/speedtest_cli.py", line 345, in closestServers
uh = urlopen('http://www.speedtest.net/speedtest-servers-static.php')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 629, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 442, in error
result = self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 619, in http_error_302
self.inf_msg + msg, headers, fp)
urllib2.HTTPError: HTTP Error 302: The HTTP server returned a redirect error that would lead to an infinite loop.
The last 30x error message was:
Found

The devel version has been pushed to master and released as v0.3.3.  Closing this issue.


multithread and singlethread executors differ

This is a continuation of a discord chat with @daxpedda.
The issue arises in this specific part of the wasm-bindgen code when using IndexedDB, with these circumstances:
https://github.com/rustwasm/wasm-bindgen/blob/64e4a258a8be912702c54ae9c19e9cc720f6ca50/crates/futures/src/task/multithread.rs#L135-L158

(This is all pseudo-code for clarity)

Assume I have access to an IDBDatabase. This is normal code (for indexed_db_futures, indexed-db already hits the same issue before due to supporting one more use case, but let's ignore that).
I call db.transaction("foo"). This starts up a transaction. From that point on, as soon as the application returns to the browser's event loop without a request pending on that transaction, it'll auto-commit.
I call request = transaction.object_store("bar").get("baz"). This opens up a request that will return me the contents of baz.
I call request.await on that request. Currently, what basically all IndexedDB crates do is, they will just return Poll::Pending from the task that called the await, and use the onsuccess/onerror callbacks of request to wake that task. This is the part that changes:

For singlethread, the task is immediately waked. This means that the browser event loop was never reached, and thus that the transaction, as expected, didn't auto-commit.
For multithread, AFAIU a Promise is made and awaited upon before the awaiting task runs. This means that the browser event loop is reached (though it almost instantly resumes execution). In particular, transaction will auto-commit at that step.

Now, just after request.await, I call transaction.object_store("bar").put("baz", "quux").await. This works only for the singlethread runtime, because on multithread the transaction has already committed.

The way IndexedDB is designed to be used, the put call should have been put inside the onsuccess handler itself, but trying to use it this way makes it very uncomfortable to use, unfortunately, with very significant rightward drift and hard-to-use lifetime behavior. Hence why IndexedDB crates try to "hide" that fact by using async functions as state machines.

It is possible to reproduce the issue by using this code:
wasm_bindgen_test_configure!(run_in_browser);

#[wasm_bindgen_test]
async fn reproducer() {
    let factory = web_sys::window().unwrap().indexed_db().unwrap().unwrap();
    let db_req = Rc::new(factory.open_with_u32("reproducer", 1).unwrap());
    let (tx, rx) = futures_channel::oneshot::channel();
    let db_req2 = db_req.clone();
    let onupgradeneeded = Closure::once(move |_: web_sys::Event| {
        db_req2
            .result()
            .unwrap()
            .dyn_into::<IdbDatabase>()
            .unwrap()
            .create_object_store("example")
            .unwrap();
    });
    db_req.set_onupgradeneeded(Some(
        &onupgradeneeded.as_ref().dyn_ref::<Function>().unwrap(),
    ));
    let onsuccess = Closure::once(|_: web_sys::Event| tx.send(()).unwrap());
    db_req.set_onsuccess(Some(&onsuccess.as_ref().dyn_ref::<Function>().unwrap()));
    rx.await.unwrap();
    let db = db_req.result().unwrap().dyn_into::<IdbDatabase>().unwrap();
    // We now have an IDBDatabase. Start a transaction, and run one request on it.
    let transaction = db.transaction_with_str("example").unwrap();
    let req = transaction
        .object_store("example")
        .unwrap()
        .get(&JsString::from("foo"))
        .unwrap();
    let (tx, rx) = futures_channel::oneshot::channel();
    let onsuccess = Closure::once(|_: web_sys::Event| tx.send(()).unwrap());
    req.set_onsuccess(Some(&onsuccess.as_ref().dyn_ref::<Function>().unwrap()));
    // getting a non-existent value will succeed with a null result
    rx.await.unwrap();
    // Here, at this await, singlethread will continue rightaway and multithread will go back to event loop once before resuming
    // This results in the line below failing on multithread, but passing on singlethread
    transaction
        .object_store("example")
        .unwrap()
        .get(&JsString::from("bar"))
        .unwrap();
}

To be completely honest, I do believe that this is a bug of the reproducer: nothing in the specification of async executors guarantees that calling .await with a ready task will not first return to the event loop. In particular, if the executor is work-stealing, then it's very possible that the ready task will be awoken on the other thread where it's already cached, which will naturally force the current thread to go back to the event loop and thus the transaction to commit.
As such, I have written a fix for my code, which is available here.
However, considering the fact that basically all other IndexedDB crates have the same bug (basically, not working with the multi-threaded executor), I'm opening this issue for their sake. I will also refrain from landing the fix for my code until the question of whether this is treated as a bug in the wasm-bindgen executor is answered, as it introduces one (tiny) bit of unsafe code and changes the public API of the crate.
This being said, I do think that the new implementation is more in line with how IndexedDB developers intended it to be used, and so would have no issues at all landing it and releasing indexed-db v4 :)

I almost forgot: Kudos to @fedeparma74 for noticing the bug in https://github.com/Ekleog/indexed-db/pull/2 :)

I have confirmed that this isn't a bug in wasm-bindgen-futures.
My fear was that the single-threaded implementation might sometimes run the future immediately, which would differ from the multi-threaded implementation and would be a bug indeed!
But with the help of Scheduler.postTask() I've confirmed that both implementations correctly take at least one tick.
(Both wasm-bindgen-futures single- and multi-threaded implementations use queueMicrotask, which actually doesn't return to the browser event loop. But the success events in the example actually don't get triggered without returning to the event loop. So my confirmation is a bit misleading, but nonetheless show that there is no bug in wasm-bindgen-futures in the context of this example.)
To go back to why the example fails though: my understanding is that you can schedule a bunch of requests on the same transaction, which will then auto-commit after a while. But if you schedule any after it had committed, it will fail. Awaiting between scheduling requests might be enough time to get the transaction to auto-commit. This is triggered in the multi-threaded implementation of wasm-bindgen-futures because it takes a bit longer, enough to make the difference.

I will close the issue, but I'm happy to re-open it if anybody finds a flaw in my findings here!

Copying here the discord exchange that followed for posterity:

@daxpedda
@ekleog I experimented with a fix in wasm-bindgen-futures, basically the "solution" is to add more artificial delays in the single-threaded implementation.
Apparently both single- and multi-threaded return to the event loop, which I tested by using Scheduler.postTask(), which got successfully triggered before the await finished.
So my conclusion is that wasm-bindgen-futures works correctly, it's just that the multi-threaded implementation takes one tick longer, but both take at least one tick.
To go back to why it fails though: my understanding is that you can schedule a bunch of requests on the same transaction, which will then auto-commit after a while. But if you schedule any after it had committed, it will fail. Awaiting between scheduling requests might be enough time to get the transaction to auto-commit. This is triggered in the multi-threaded implementation of wasm-bindgen-futures because it takes 1 tick longer, enough to make the difference.
AFAICT you might want to consider using the IDBTransaction.complete event to know when the transaction has been completed.
Please let me know if you think I missed anything!
(also you mentioned specializing the multi-threaded implementation in the case of a single-threaded use-case, I have no clue how that could be done, so I'm all ears)

@Ekleog
I see, thank you for the investigation! You're entirely right that as soon as the task returns to the event loop with no in-flight request it's all implementation-dependent behavior, so browsers are allowed to, or not, commit the transaction. I thought the behavior was correct with singlethread but it sounds like even there it's just falling through the cracks of the implementations.
As for specializing the multi-thread implementation, what I was thinking of was adding a field to the Waker that identifies its thread and, upon waking, if the waker is being called from the same thread, immediately enqueue a microTask with the to-be-awoken future, rather than go through the atomics logic. AFAIU this being a microTask would make it trigger before returning to the browser's event loop, and thus make the end-result for indexeddb the same.
It's a bit handwavy still but I think this has some likelihood of working, because I'm pretty sure all indexeddb callbacks get triggered on the worker they originated from.
However, whether the change is worth it is an even less obvious question, especially as you already pointed out that there's a return to the event loop anyway and so even with this change validity of the library would still be implementation-dependent. WDYT?
(As for the fix on my end, unfortunately it's more complex because oncomplete gets called too late to schedule additional requests; to support the proper behavior I need to run everything in the request's onsuccess/onerror callbacks rather than use a channel to run that on the main task; that said the implementation I have seems to work fine and I think is not actually implementation-dependent :))

@Ekleog
Oh and I just read your message on the github, I'd just like to check: when you say it returns to the event look, do I understand correctly that you mean between the tx.send and the rx.await?
It's expected that there'll be a return to event loop before onsuccess is called, as indexeddb will not start the request before then; but the validity of current indexeddb crate versions depends on whether there's a return to the event loop between the time onsuccess (on the first .get()'s return) is triggered and the time the second .get() is called

@daxpedda
I mean the return to the event loop happens before the await finishes.
It happens more then once even.

@Ekleog
Sorry if I'm being dense, I have no idea how to test this out 😅 but just to be sure I understand correctly, these returns to event loop happen after onsuccess was triggered and before .await resolves, right?
That makes me think I should have written the correct code too for reference: the correct-as-per-the-spec reproducer would not use a channel and just call .get() directly inside the onsuccess callback; this reproducer works fine on all executors currently

@daxpedda
No, they happen before .await resolves, it probably doesn't happen between triggering onsuccess and resolving .await, as that is probably near instantanious.
web_sys::console::log_1(&"before 2".into());
let _ = web_sys::window()
    .unwrap()
    .scheduler()
    .post_task_with_options(
        &Closure::once_into_js(|| web_sys::console::log_1(&"main thread".into()))
            .unchecked_into(),
        SchedulerPostTaskOptions::new().priority(TaskPriority::UserBlocking),
    );
rx.recv().await.unwrap();
web_sys::console::log_1(&"after 2".into());

@daxpedda

As for specializing the multi-thread implementation, what I was thinking of was adding a field to the Waker that identifies its thread and, upon waking, if the waker is being called from the same thread, immediately enqueue a microTask with the to-be-awoken future, rather than go through the atomics logic.

queueMicrotask happens on both implementations already before anything happens.
The problem isn't the call to the atomics logic, because it returns immediately if it has already been awoken.
The issue is simply that waking up directly vs waiting for Atomics.waitAsync to resolve is just faster.
So unless we can somehow ascertain beforehand that the task can't be woken up from another thread I don't know how that could be done.
I'm happy to look at a PR though.

@Ekleog
Oh ok I see the problem. Thank you for your answers! I'm not at computer right now, but will try out your debugging steps and report 🙂

@Ekleog
Uuuuh so this was a weird story: running with --cfg web_sys_unstable_apis makes the issue stop reproducing. Maybe because it switches between polyfill and browser implementation for waitAsync?
Anyway, I tried with this code:
https://github.com/Ekleog/indexed-db/blob/675ee4a8bf9499ab96035c251f2305952b827b80/tests/js.rs#L10-L70
And with a patched web-sys to remove the #[cfg] so that I don't need the rustflags.
With these changes I can confirm that between the onsuccess callback and the rx.await, in the multithread case there's a return to the event loop, and not in the singlethread case.
That said, as you mentioned I don't have a good suggestion for a solution. Do you confirm this behavior will not be changed in the foreseeable future, and I should land my api-breaking fix? 🙂

@daxpedda
web_sys_unstable_apis doesn't affect wasm-bindgen-futures, but the delay you introduce by running the additional code might.
The whole issue is that this is a race condition, so consider w/e you do to trigger it here or there random.
Take my opinion with a grain of salt, unfortunately I'm clueless about IndexedDB, so I might have missed something.
But no, I don't see how exactly we could "fix" wasm-bindgen-futures, though I'm happy to look at any PR doing so.


Fix/looking feed spinner

Reference issue #375

It seems the function getAddressStringFromIdentity has a bug.
In the if (isSimpleWallet(wallet, identityType)) branch, the private key must not start with 0x.
Here is a simple fix which will probably fix the tests as well
const privateKey = wallet.privateKey.replace('0x', '')
const buffer = Buffer.from(privateKey, 'hex')
const ethereumWallet = Wallet.fromPrivateKey(buffer)

Lastly please change the PR title to use imperative mood: e.g. fix: add spinner to feed print command


remove the second repeated line cli.api = api since api is a pointer

Dear maintainers,
This PR is used to remove unused code when docker daemon starts.
Because api server is a pointer and it is set to cli.api before, it doesn't need to be setted again.
Signed-off-by: yuzou<EMAIL_ADDRESS>

Seems the reason for the experimental failure is environment problem:
05:26:33 Failed to remove container (docker-pr-exp21255): Error response from daemon: No such container: docker-pr-exp21255

LGTM   the cli.api = api has been added https://github.com/docker/docker/pull/24663/files#diff-d3f6b8612a6b46337de40bb2010208b8R213 and it's a pointer

LGTM


server.Users and related does not respect nsswitch.conf

Describe the bug
Using the server.Users fact (and related, such as server.Groups) does not respect the configuration of /etc/nsswitch.conf, e.g. when LDAP is configured.
To Reproduce
Configure e.g. LDAP/sssd in /etc/nsswitch.conf or libnss_systemd for the passwd database and attempt to query a user from that source using the server.Users fact.
Since the server.Users and server.Groups fact only looks at /etc/passwd and /etc/groups instead of using e.g. libnss these user entries are not returned.
If necessary, I can provide a more detailed example, but I believe the main point comes across.
Expected behavior
Enumerate and return users/groups according to the /etc/nsswitch.conf configuration.
Meta
--> Support information:

    If you are having issues with pyinfra or wish to make feature requests, please
    check out the GitHub issues at https://github.com/Fizzadar/pyinfra/issues .
    When adding an issue, be sure to include the following:

    System: Linux
      Platform: Linux-6.1.0-9-amd64-x86_64-with-glibc2.37
      Release: 6.1.0-9-amd64
      Machine: x86_64
    pyinfra: v2.7
    Executable: /opt/venv/bin/pyinfra
    Python: 3.11.4 (CPython, GCC 12.2.0)

Suggested Solution
Use getent to query the passwd and groups database, but fall back to /etc/passwd and /etc/group in the unlikely case that getent is not provided, e.g. on a busybox system.
Some additional ideas:
If getent is used, it could also be helpful to allow the user to provide the --service argument to getent.
Perhaps the server.User fact could be extended to not just return the name of the current user, but to also include the same information as server.Users provides and to allow specifying a different user to return information about.
And add a new fact server.Group that does the same.
The Name Service Switch has a few other database that might be interesting to implement, e.g. aliases, ethers, hosts, initgroups, networks, protocols, rpc, services and some special cases sudoers, subid.
If such a change would be welcome, I could look into implementing these suggestions.
Thanks for this awesome tool :heart:

This would definitely be a welcome change @bauen1! An area of Linux I am not too familiar with have never used getent or LDAP before. PRs very welcome :)


Consider integrating a style-verification tool into CI

Zephyr has had for a very long time an uncrustify configuration that is recommended to ensure code conforms to the Coding Style.  However there is no QA infrastructure to detect violations of this style.
Part of the plan for coding guidelines includes an enforcement stage.  Tools like Coccinelle may be very helpful in ensuring conformance.  However, Coccinelle is unaware of coding style, and left to itself will produce changes that are not compliant.  See, for example, #21391 where Coccinelle output must be post-processed to eliminate a space from cast expression.
It would be significantly easier to use tools to ensure code guideline conformance if their output could be automatically transformed to restore style conformance.  For #21391 uncrustify might have been able to fix the resulting long lines.
Painful though it would be, I propose that steps be taken to run all Zephyr implementation and header files through uncrustify, and that the CI infrastructure be updated to emit warnings when newly committed code is not style-compliant.
There would be several benefits:

Coding style, in particular use of tabs versus spaces and indentation, would become consistent throughout Zephyr.
Arguments about whether empty lines are required before/after certain statements would be eliminated by a simple policy: if uncrustify does not change the code, and it isn't explicitly handled in the Coding Style, the code is acceptable.
Semantic patching and other automated transformations can be safely applied without causing style inconsistency.
Contributors may be acclimated to style-based expectations, easing the path to enforcing coding guidelines.

+1 for this idea, I've actually always thought about  this. Should we then remove checkpatch completely or are there some checks that would be missing otherwise?

Checkpatch verifies things outside coding style (like commit message content) so it would still be necessary.

Thought about this multiple times in the past, it is not straightforward but definitely feasible with some effort needed:

We need something that works on changes, ie. commits and not on complete files. Not sure if uncrustify can work this way, clang-format does with clang-format-diff
We need to review all the rules we already have in .uncrustify.cfg and .clang-format and tighten them up, there are many nice to haves in there that would result in major changes required. Also, right now both configurations are incompatible, need to fix that.
We will need to create a solid baseline and do a full pass on existing code. It does not make sense to require contributors to modify their changes based on input from a linter when the rest of the file is following some other style
We need a good way to display feedback and results from the linters in pull request, this is going to be a major challenge and might result in lots of noise.

Just a comment, because i used uncrustify in a pre-commit-hook and on a ci in the past. The pre-commit-hook is something similar to https://github.com/ddddavidmartin/Pre-commit-hooks/blob/master/pre-commit-uncrustify

Uncrustify behaves a little bit different with different versions of it. So it would make sense to integrate a specific uncrustify version in the sdk.

I created a patch-file that fixes all the uncrustify-issues in the pre-commit-hook. This patch could be applied with one command. This simplified the process a lot and helped that all developer accepted this workflow.

dev-review (Mar 26): @nashif we need a tool that is able to deal with a diff, since we shouldn't warn about changes not introduced by the actual PR.
uncrustify config in zephyr is inconsistent with checkpatch, so we need to update the config to be consistent.
We have 3 means today between clang-format, uncrustify, and checkpatch.  Need to see if we can get to one tool.
@pabigot will look into clang-format.

We might be able to utilize https://github.com/DoozyX/clang-format-lint-action, I haven't looked at it in great detail.

We do need something that can run this:
https://github.com/llvm-mirror/clang/blob/master/tools/clang-format/clang-format-diff.py

@pabigot will look into clang-format.

My results are in #23823, which it'd be nice to have reviewed and merged.  clang-format has potential, but we'd have to develop a style file for it, and possibly change some of Zephyr's rules to accommodate what it can verify.

As a follow-up: I've confirmed to my satisfaction that clang-format will always insert a space between a ForEach macro used as a loop construct and the opening parenthesis of its argument:
-               SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&data->cb, cb, tmp, node) {
+               SYS_SLIST_FOR_EACH_CONTAINER_SAFE (&data->cb, cb, tmp, node) {

This will generate a diagnostic from checkpatch:
-:1775: WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1775: FILE: drivers/gpio/gpio_intel_apl.c:194:
+               SYS_SLIST_FOR_EACH_CONTAINER_SAFE (&data->cb, cb, tmp, node) {

Options:

Modify clang-format to make the space insertion optional;
Accept the change tree-wide and update checkpatch to not emit a diagnostic;
Find another style formatting tool.

Another good option is clang-format. It's available everywhere that LLVM is available and is quite highly configurable. The fact that it integrates directly with the compiler ensures that it is very accurate as far as linting goes. Popular conventions can be used (Google, Apple, Mozilla), and there are quite a lot of .clang-format options.
There is also already very good git integration with git-clang-format. So setting up pre-commit hooks and server side hooks (rejecting code that is not correctly formatted) is fairly straight forward.
Also, with the format on / off tags, it's easy to do perform workarounds
/* clang-format on */
/*
 * something free-form
 */
/* clang-format off */

I've updated the issue description to avoid referencing uncrustify; https://github.com/zephyrproject-rtos/zephyr/issues/21392#issuecomment-614121177 is based on the assumption that clang-format is a better underlying tool.  But we need a resolution to the fact it breaks checkpatch.
The original driver for my opening this was to have an objective rule for whether a style change was necessary: if the as-submitted code gets throught the style checker without any changes, then variations are personal taste.

@pabigot

Modify clang-format to make the space insertion optional;

This seems to be done now (for foreach macros), see https://reviews.llvm.org/D78869 and in https://clang.llvm.org/docs/ClangFormatStyleOptions.html search for "ControlStatementsExceptForEachMacros" This seems to be included starting with clang-format-11.

Great, thanks for the pointer.  The feature was merged 2020-04-26 to the clang-11 development branch.  Based on previous LLVM releases clang-11 should be available in the second half of 2020-09.  Once it's out we can make further progress.

Please see #27058 and give it a try if you have (or can install) a clang-12 pre-release.

Whichever tool/approach gets taken, I'd like to see this project to start maintaining a .git-blame-ignore-revs file so that the git blame option --ignore-revs-file can be used in the future.

I infer that the rationale for .git-blame-ignore-revs is to list commits that are (supposedly) whitespace only so those changes don't intrude on blame.  I like the idea, but I don't believe it would be maintained to a degree that would make it useful.

I have had a look into this and have made the following observations:
ControlStatementsExceptForEachMacros is present in clang-format 11.0.0, it fixes the issue identified by @pabigot.
AlignConsecutiveMacros will probably want to use AcrossEmptyLinesAndComments, as this is the default format in a lot of Zephyr code, however this is only present in version 12.0.0, which is released, but not readily available on many platforms.
A larger issue I have identified is how clang-format treats (or mangles) lists of nested values. For example:
#define RAW {1}, {2}, {3}
// ^ goes to v
#define FORMATTED     \
	{ 1 }, { 2 }, \
	{             \
		3     \
	}

This only gets worse with more complicated structures. The Bluetooth subsystem at a minimum uses this pattern to declare things, and none of the default styles (llvm, google, webkit) formatted this example in a sane way.
The formatter also likes moving fields in struct instantiations on to the same line, which I have not identified a way to stop:
struct dummy test = {
    .a = 1, .b =2, .c = 3,
    .d = 4
};

There was another issue related with clang-format and checkpach that was solved: bit fields formatting, In past clang-format had inserted spaces before and after a colon.
It is fixed in version 12 that is already released. There is new config. option BitFieldColonSpacing that can be set to none and no white spaces will be inserted.
struct foo {
        uint_8t bar_a : 1;
        uint_8t bar_a : 2;
        uint_8t bar_a : 5;

I'm interested in update the .clang-format config file to more recent version of the tool. Besides CI it is also useful for contributors. Probably most of IDEs may be configured to format whole files or modification on save. That would increase productivity.
What do you think about enabling all features that are aligned with Coding Style and do not make commits to fail on checkpatch ?
We may leave information about clang-format versions where particular features were introduced to help contributors that use older versions of the tool.

What do you think about enabling all features that are aligned with Coding Style and do not make commits to fail on checkpatch ?

We need at least 1 script doing some amount of checking against the coding style, currently this is checkpatch. While clang-format can be run on diffs only, I would guess that we can't switch to a tool which generates (IMO) garbage output for large chunks of the repo (see the nested value issue above).
If we can resolve that, and to a lesser extent the struct instantiation issue, I think it would be easy to sell the benefits to everyone.

@JordanYates Is there a list of incompatibility items of clang-format and Coding Style rules? Have you got knowledge about such list?

As a follow-up: I've confirmed to my satisfaction that clang-format will always insert a space between a ForEach macro used as a loop construct and the opening parenthesis of its argument:
-               SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&data->cb, cb, tmp, node) {
+               SYS_SLIST_FOR_EACH_CONTAINER_SAFE (&data->cb, cb, tmp, node) {

This will generate a diagnostic from checkpatch:
-:1775: WARNING:SPACING: space prohibited between function name and open parenthesis '('
#1775: FILE: drivers/gpio/gpio_intel_apl.c:194:
+               SYS_SLIST_FOR_EACH_CONTAINER_SAFE (&data->cb, cb, tmp, node) {

Options:

Modify clang-format to make the space insertion optional;
Accept the change tree-wide and update checkpatch to not emit a diagnostic (viz. because it's not a function name, it's a synthesized control structure);
Find another style formatting tool.

@pabigot The issue with foreach macros is solved with: SpaceBeforeParens : 'SBPO_ControlStatementsExceptForEachMacros'.
Thanks to that foreach statements are treated as regular functions and there is no space inserted before opening parentheses.

I've ctreated and issue for:
#define RAW {1}, {2}, {3}
// ^ goes to v
#define FORMATTED     \
	{ 1 }, { 2 }, \
	{             \
		3     \
	}

in clang/llvm bug tracked: https://bugs.llvm.org/show_bug.cgi?id=50680
I'll be tracking it and provide a feedback when receive any response.

Could clang-tidy be used with clang-format to get full coverage? This is stopping me dead in my tracks.

Do you mean, use of clang-tidy to solve issues in coding style that are not supported by clang-format itself?

I've also recently run Intel's open source ControlFlag tool (https://github.com/IntelLabs/control-flag) on the Zephyr codebase, to see if it is worth looking into. It did not find many things (and most of those were false positives it looks like), and unfortunately it takes quite a while to run (about 13h on 8/16 cores for the zephyr directory).
Logs from the run:
thread_0.log
thread_1.log
thread_2.log
thread_3.log
Based on my experience, the tool did not catch enough nor runs fast enough for consideration.

outdated, closing. Please open new issue with updated information if this is still needed.


[PREVIEW] Add GOV style comments

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/EM-752
Change description
Add case comment styles to annotation comments
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[X] No

Put this on hold till we fix #285 as this was originally meant to go on top of this commit


Problems about IVDETECT

Hello, I'm running ivdetect using the code under "linevd-main\sastvd\ivdetect". And the gnnexplainer part reports an error, and here are the code and error:

The error is no "_FEAT"
And I check the BigVulDatasetIVDetect class in "linevd-main\sastvd\ivdetect\helpers.py",

I found that "_FEAT" does not exist in the getitem function.

Hello, did you run the command "singularity exec main.sif python sastvd/scripts/getgraphs.py" to successfully  get the graphs? I just ran this command and get a error massage like this

It's about the  /linevd/sastvd/helpers/sast.py", line 39, in rats. I don't know why the function "cElementTree.fromstring" is here. cCn you telle me the functions do and how solve this problem? Thanks a lot.

Hello, did you run the command "singularity exec main.sif python sastvd/scripts/getgraphs.py" to successfully get the graphs? I just ran this command and get a error massage like this  It's about the /linevd/sastvd/helpers/sast.py", line 39, in rats. I don't know why the function "cElementTree.fromstring" is here. cCn you telle me the functions do and how solve this problem? Thanks a lot.

The "rats" command is not processing successful. u should check the "rats" program env

您好，我正在使用“linevd-main\sastvd\ivdetect”下的代码运行 ivdetect。gnnexplainer 部分报告错误，以下是代码和错误：

错误不是“_FEAT”
我检查了“linevd-main\sastvd\ivdetect\helpers.py”中的BigVulDatasetIVDetect类，发现getitem函数中不存在“_FEAT”。

Hi. I was wondering if you could show me the replications


PROPOSAL: Add support for domain errors

As of now, when wrapping an error we keep the cause of the error meaning that if we want to handle the error in a upper layer we need to know details about the lower layers. For example:
package users

var ErrUserDoesNotExist = errors.New("user does not exist")

type Repository interface {
    GetUserById(id string) (*users.User, error)
}

package mysql

type mysqlRepository struct {
    ds datastore
}

func (mr *mysqlRepository) GetUserById (id string) (*users.User, error) {
    record, err := ds.exec(fmt.Sprintf("SELECT * FROM `users` WHERE id = %s", id))
    if err != nil {
        return nil, errors.Wrap(err, "could not retrieve user from persistence")
       // another option is to return ErrUserDoesNotExist
    }
}

Meaning that if I want to deal with the error, the handler should do something like:
package handlers

func (h *handler) UserProfile (c web.C, w http.ResponseWriter, r *http.Request) {
    uid := c.URLParams["uid"]
    u, err := h.userRepository.GetUserById(uid)

Option 1:
The handler should now about the implementation details of the database.
    if err.Cause() == mysql.NoRecordsFound {
        w.WriteHeader(http.StatusNotFound)
   }

Option 2:
We do a string comparation
    if err.Error() == "could not retrieve user from persistence"{
        w.WriteHeader(http.StatusNotFound)
   }

IMO this could be solved with another function:
func Map(causeErr error, meaningErr error) error {
	if causeErr == nil {
		return nil
	}
	err := &withDecoration{
		cause: causeErr,
		meaning: meaningErr,
	}
	return &withStack{
		err,
		callers(),
	}
}

Option 3:
We do a string comparation
    if err.Meaning() == ErrUserDoesNotExist {
        w.WriteHeader(http.StatusNotFound)
   }

I could open a PR for this.

Use Cause, that's why it's there.
On Wed, 30 Aug 2017, 18:00 José Carlos Chávez<EMAIL_ADDRESS>wrote:

As of now, when wrapping an error we keep the cause of the error meaning
that if we want to handle the error in a upper layer we need to know
details about the lower layers. For example:
package users
var ErrUserDoesNotExist = errors.New("user does not exist")
type Repository interface {
GetUserById(id string) (*users.User, error)
}
package mysql
type mysqlRepository struct {
ds datastore
}
func (mr *mysqlRepository) GetUserById (id string) (*users.User, error) {
record, err := ds.exec(fmt.Sprintf("SELECT * FROM users WHERE id = %s", id))
if err != nil {
return nil, errors.Wrap(err, "could not retrieve user from persistence")
// another option is to return ErrUserDoesNotExist
}
}
Meaning that if I want to deal with the error, the handler should do
something like:
package handlers
func (h *handler) UserProfile (c web.C, w http.ResponseWriter, r *http.Request) {
uid := c.URLParams["uid"]
u, err := h.userRepository.GetUserById(uid)
Option 1:
The handler should now about the implementation details of the database.
if err.Cause() == mysql.NoRecordsFound {
    w.WriteHeader(http.StatusNotFound)

}
Option 2:
We do a string comparation
if err.Error() == "could not retrieve user from persistence"{
    w.WriteHeader(http.StatusNotFound)

}
IMO this could be solved with another function:
func Map(causeErr error, meaningErr error) error {
if causeErr == nil {
return nil
}
err := &withDecoration{
cause: causeErr,
meaning: meaningErr,
}
return &withStack{
err,
callers(),
}
}
Option 3:
We do a string comparation
if err.Meaning() == ErrUserDoesNotExist {
    w.WriteHeader(http.StatusNotFound)

}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pkg/errors/issues/130, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAcA-2PLmsoVNPeyMil1xNOOEADdcuLks5sdRaZgaJpZM4PHAba
.

I agree with the spirit of https://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully 's "Assert errors for behaviour, not type" section. but in practice, creating an interface for each category of errors is a bit too onerous :( I found a comfortable middle ground that's more or less in the spirit of @jcchavezs' proposal in the sense that you can still get the domain error (I have named it Category inspired by C++), and it  does provide Cause: https://github.com/omegaup/go-base/blob/master/errors.go
would that be something that could find its way into this repository?

FYI we have built domain errors in https://github.com/cockroachdb/errors


Mvc services updates

:x: Validation status: errors

File
Status
Preview URL
Details

api/overview/azure/index.yml
:x:Error

Details

:x:Error

Details

api/overview/azure/index.yml

[Error] Error transforming model "W:\b14p-o-unknown\raw-\11vmbaqs.nsc\rawmodel\api\overview\azure\index.raw.json" generated from "api/overview/azure/index.yml" using "ManagedReference.html.primary.js". Error running Transform function inside template preprocessor:

[Error] Error transforming model "W:\b14p-o-unknown\raw-\11vmbaqs.nsc\rawmodel\api\overview\azure\index.raw.json" generated from "api/overview/azure/index.yml" using "ManagedReference.html.primary.js". Error running Transform function inside template preprocessor:

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


[Feature Request] mdInput place holder as innerHTML

Bug, feature request, or proposal:
Feature request.
What is the current behavior?
Input place holder is bound to DOM and renders as a string.
What is the expected behavior?
It would be nice if the input place holder was added to DOM as innerHTML instead of binding to a string.
Tags such as  and entities like &copy will render correctly when included in an input placeholder.
What is the use-case or motivation for changing an existing behavior?
My use case is that I would like to use the  tags inside the input place holder.

I just realized that's what the <md-placeholder> tag is for. Closing this.


About Flutter Doc Support Chineses

I am a Chinese developer, just ask if there is any plan to support Chinese documents...
The address is as follows: https://docs.flutter.io/flutter/dart-ui/dart-ui-library.html

a big project, lol...

It’s better to learn English than to wait for someone else to translate.

can anyone tell me how to setup Flutter in China


Create static-analysis.yml

What does this PR do?
What issues does this PR fix or reference?
#
The PR fulfills these requirements:
[ ] Tests for the proposed changes have been added/updated.
[ ] Code linting and formatting was performed.
Functionality Before
<insert gif and/or summary>
Functionality After
<insert gif and/or summary>

It was done by mistake


[Feature] Paginated asset path list

Is your feature request related to a problem? Please describe.

On an iPhone 6 with 8.500+ assets it takes roughly  25 seconds for getAssetPathList() to load.
On an iphone 8 with 25.000+ assets the app crashes with this exception taken from Firebase Crashlytics:

Fatal Exception: NSRangeException
*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray

Fatal Exception: NSRangeException
0  CoreFoundation                 0x1cf0e127c __exceptionPreprocess
1  libobjc.A.dylib                0x1ce2bb9f8 objc_exception_throw
2  CoreFoundation                 0x1ceff67bc -[__NSCFArray count]
3  Photos                         0x1ddb2500c -[PHFetchResult objectAtIndex:]
4  photo_manager                  0x1032f4b34 (Missing)
5  photo_manager                  0x1032f47a4 (Missing)
6  libdispatch.dylib              0x1ceb20a38 _dispatch_call_block_and_release
7  libdispatch.dylib              0x1ceb217d4 _dispatch_client_callout
8  libdispatch.dylib              0x1ceafcdec _dispatch_lane_serial_drain$VARIANT$armv81
9  libdispatch.dylib              0x1ceafd92c _dispatch_lane_invoke$VARIANT$armv81
10 libdispatch.dylib              0x1ceb05e08 _dispatch_workloop_worker_thread
11 libsystem_pthread.dylib        0x1ced01114 _pthread_wqthread
12 libsystem_pthread.dylib        0x1ced03cd4 start_wqthread

and
Fatal Exception: NSRangeException
*** -[__NSArray0 objectAtIndex:]: index 0 beyond bounds for empty NSArray

Fatal Exception: NSRangeException
0  CoreFoundation                 0x1cf0e127c __exceptionPreprocess
1  libobjc.A.dylib                0x1ce2bb9f8 objc_exception_throw
2  CoreFoundation                 0x1ceff67bc -[__NSCFArray count]
3  Photos                         0x1ddb2500c -[PHFetchResult objectAtIndex:]
4  photo_manager                  0x1032f4b34 (Missing)
5  photo_manager                  0x1032f47a4 (Missing)
6  libdispatch.dylib              0x1ceb20a38 _dispatch_call_block_and_release
7  libdispatch.dylib              0x1ceb217d4 _dispatch_client_callout
8  libdispatch.dylib              0x1ceafcdec _dispatch_lane_serial_drain$VARIANT$armv81
9  libdispatch.dylib              0x1ceafd92c _dispatch_lane_invoke$VARIANT$armv81
10 libdispatch.dylib              0x1ceb05e08 _dispatch_workloop_worker_thread
11 libsystem_pthread.dylib        0x1ced01114 _pthread_wqthread
12 libsystem_pthread.dylib        0x1ced03cd4 start_wqthread

My assumption is that requesting too many assets at once is the issue here. I'm happy to be proved wrong and given ideas regarding alternative solutions, though. 🙂
Describe the solution you'd like
I'm currently working on a second paginated version of getAssetPathList.
Ideally one can pass in both, the current page (e.g. page=1), as well as the number of items per page (e.g. per_page=40). However, I'd also be happy with  a fixed number of per_page at the moment. What's most important to me is that pagination is possible.
Since the largest issues in our team currently are on iOS devices, that's the first thing I'm tackling -- and simply hope that there are good solutions for Android as well.
In fact, this is the lead I'm trying to follow here as it looks pretty promising: https://stackoverflow.com/questions/47936192/how-to-add-pagination-to-phasset-fetching-from-photos-framework
Let's see how this turns out.
Additional context
Unfortunately I have never in my life touched Objective C and find the learning curve just for reading the syntax incredibly steep. Additionally, my Java-skills are also sorely lacking. If this was Dart, Go, PHP or Javascript, adding pagination would merely be routine work. However, this is a bit more involved for me.
One of the issues is that even if I manage to implement the pagination for getGalleryIdList, there is still other state in the ImageScanner-class that would have to be adjusted, specifically the logic sorrounding refreshGallery and refreshGalleryDict.
I'm willing to fight my way through this, though, and see what comes up.
The reason I open this ticket is that I have two questions:

Since I'm an absolute n00b in both ObjectiveC, as well as Java, do you believe that this is something you could implement in the library?
If you are not willing to implement this for any reason, which is absolutely fine, are there any pointers you can give me? Any pieces of advice? Anything I should keep in mind?

Other than this: thanks for this great library which is sorely needed on Flutter. This is the first library that makes scrolling through a large list of images a breeze. After lots of banging our heads against the wall this library is a life-saver. Thanks for the hard work and sharing it! 👍

Pagination is a reasonable requirement, but I may not have that much time to finish it soon.

That is fully understandable.
I have send you an email to the address in your Github profile. Let me know if that's something you're willing to talk about. If not: Again, I fully understand. 🙂

The feature has merged in #94 , but for some other reason, I will update it to the pub within a few days.


Analysis server hover length includes whole constructor invocation

Given the following code (taken from flutter_gallery/lib/gallery/app.dart):
return MaterialApp(
  theme: _options.theme.data.copyWith(platform: _options.platform),
  title: 'Flutter Gallery',
  color: Colors.grey,
  showPerformanceOverlay: _options.showPerformanceOverlay,
  checkerboardOffscreenLayers: _options.showOffscreenLayersCheckerboard,
  checkerboardRasterCacheImages: _options.showRasterCacheImagesCheckerboard,
  routes: _buildRoutes(),
  builder: (BuildContext context, Widget child) {
    return Directionality(
      textDirection: _options.textDirection,
      child: _applyTextScaleFactor(child),
    );
  },
  home: home,
);

When hovering over MaterialApp, the hover result has a length that includes the entire block of code:
{
	"offset": 3762,
	"length": 618,
	"containingLibraryPath": "/Users/dantup/Dev/Google/flutter/packages/flutter/lib/src/material/app.dart",
	"containingLibraryName": "",
	"containingClassDescription": "MaterialApp",
	"dartdoc": "...",
	"elementDescription": "...",
	"elementKind": "constructor",
	"isDeprecated": false
}

This results in the tooltip potentially being very far away:

It also doesn't seem to match what the spec says the length should be:

The length of the range of characters that encompasses the cursor position and has the same hover information as the cursor position.

The items inside the call have their own hovers, so that entire range doesn't have the same hover information. I think it should include up to the opening paren.

This actually seems to be different for methods - they do only run to the opening parenthesis:

This came up again:
https://github.com/Dart-Code/Dart-Code/issues/1563
I'll find a workaround for now (like dropping the range off if it spans more than a line).


Fix duplicate bullet point

This bit of documentation was written twice; needs to be removed!

Seems like hasNotificationSound was added twice, and the explanation for customURL was not added.

@electricduck thanks for removing the duplicate.
@ffflorian you are right, I'll add the customURL tag asap.


mount (volumes) not allowed for files – only directories

When trying to deploy a stack with mysql image, I want to mount just one file (sql script) inside of the mysql docker container. This web:
works both in docker and docker-compose, but not in docker-cloud.
Instead it just create a directory
mysql:
    image: mysql:5.6
    ports:
        - 3306:3306
    volumes:
        - /app/database/database.sql:/docker-entrypoint-initdb.d/database.sql

See also docker/compose#424

@jekkos
When you run the stack in Docker Cloud, the file that you are going to mount should be in the node where your mysql container actually runs. Do you have such a file on the node? If not, docker daemon will simply create an empty folder.

Hi there,
Indeed that will be the issue. On the other hand I would like to know if there is a way to export a single sql script from another image and mount it into the mysql in this case? Or can this only be done for directories?
Problem is that I can't export the whole directory as a volume from my web container otherwise mysql will try to execute them all

In docker compose I can mount the file directly from the daemon's context.. but in this case the context isn't there of course and the single file should be picked from the other image.

you can put the the file in another container with volume:/docker-entrypoint-initdb.d/database.sql and in your mysql, do a volume-from

Ok thanks for pointing that out. In that case I'll have to copy the script to another folder first in the web container.. which isn't necessary with docker compose as there I can map the volume to another path in the mysql container.

Ok I tried this way but now I get a circular dependency.. Guess I'll need to rebuild the mysql image in that case with my file in it? Or is there a better way to solve this kind of problem?

Alternatively, you can create an image that copy the file to the remote node first. Then, you should be able to run your compose without any changes.

Is there an easy way then to copy a file from an image to the host filesystem in a Dockerfile? So in this case I should just add a new Dockerfile to my project which contains only this file and then a command to copy it to the host filesystem?

Ok I thought this was bad practice I could use a docker cp command to copy to the host but I guess that needs to be done outside of the docker cloud stack file.. I would like that file to be selfcontained so users can deploy my app using just one click

You can put your script only, say S3, can let your mysql container download it at launch time.
If content of the sql script is fixed, you can also embed the script in your sql container.

Same issue on Debian:
Starting rsnapshot_localhost_data
Starting rsnapshot_localhost_scripts

ERROR: for scripts  Cannot start service scripts: oci runtime error: rootfs_linux.go:53: mounting "/var/lib/docker/devicemapper/mnt/563175ea4e1af1627a69b46d7b1fe7f0351572071442127adad65230900b8292/rootfs/etc/rsnapshot.conf" to rootfs "/var/lib/docker/devicemapper/mnt/563175ea4e1af1627a69b46d7b1fe7f0351572071442127adad65230900b8292/rootfs" caused "not a directory"

$ hostnamectl
Operating System: Debian GNU/Linux stretch/sid
Kernel: Linux 4.1.0-1-amd64
Architecture: x86-64

$ docker --version
Docker version 1.12.0, build 8eab29e

$ docker-compose --version
docker-compose version 1.8.0, build f3628c7


Compile Rail Infrastructure Cost Parameters

From the confidential presentation of Bastian, it seems that we will need data on (at least):

topography multiplier (slope)
curve diameter limits (depending on speed)
lifetime
tunneling cost

After some literature review of rail infrastructure publications, we should set up another call with Bastian to confirm we have all the relevant parameters.

After some literature reviewing through the weekend I have a few points on the above bullet points specifically:

There seems to be a general limit of around 3-4% slope for HSR. But I have yet to find any cost factor for within that 0-4% range. The slope limit is considered in the mail I just sent Bastian
Curve diameter limits shouldn't really affect Bastians model since this tiles are roughly 6x6km wide anyone, no?
Lifetime or more specifically operating & maintenance costs can be found in this paper for the San Francisco - LA line. For construction costs per km I will compile an overview tomorrow morning.
I don't think we can consider tunneling with how Bastian's model works, but we can have a chat tomorrow again.

Overall I think Bastian's model will give a good ballpark estimate with the things we sent him now, but further consideration of tunneling for example is workload which I think might be rather directed towards our python tool.


qpdf 10.0.4 vulnerability CVE-2021-25786 for RHEL8 "Will not fix" - consequences for newer versions of qpdf?

I came across a vulnerability which may "allow attackers to crash the system or execute arbitrary code via a crafted .pdf file to the Pl_ASCII85Decoder::write parameter in libqpdf."
https://access.redhat.com/security/cve/CVE-2021-25786#cve-faq
This vulnerability was detectedin 10.0.4 for RHEL7-9 and I was wondering if this vulnerability is also applicable to newer versions? Of has it been fixed in any recent updates?

This was fixed in qpdf 10.1.0.

Great!


Bug: current_url() loses subdomain

Hello!
I set up my site in a way to use subdomains as a language parameter, e.g.:
mydomain.com
de.mydomain.com
fr.mydomain.com
Unfortunately, I had to realize that when I use the return redirect()->to('/anything'); function, it loses the subdomain. I tracked the issue back to the current_url() function. That's where the subdomain goes missing. E.g.:
// you are on https://de.mydomain.com
echo current_url(); // displays https://mydomain.com

I think the default, expected behavior would be to keep the subdomain. The base_url() function already returns the base url from the config, if someone wants that.  Also, I wouldn't want to rewrite every redirect now in all of my controllers after months of work because of this.
According to the docs, current_url() "returns the full URL (including segments) of the page being currently viewed". So, I think it should contain the subdomain as well. Or is there any security reason why it works this way, maybe?

the method use App/Config/App::$baseURL OR .ENV::baseURL

Well, the easiest way is url autodetection to be implemented and the configuration option to be chaged this way:
    //public $baseURL = 'http://localhost:8080/';
    public $baseURL = \DETECTED_BASE_URL;

I know that autodetection is not liked, but I think, a secure and relatively reliable way is possible. $_SERVER['HTTP_HOST'] should not be used, only server controlled variables can do the job. Also, if the site is placed under a subdirectory this case could be autodetected too, it is possible.
Autodectection may not be set by default, it could be proposed in the setting comment with an appropriate warning.

https://github.com/ivantcholakov/starter-public-edition-5/blob/32d6c09eaace3e6eb03b7a7d643e381ad719bdd7/platform/bootstrap/helpers.php#L129
https://github.com/ivantcholakov/starter-public-edition-5/blob/32d6c09eaace3e6eb03b7a7d643e381ad719bdd7/platform/bootstrap/bootstrap.php#L240

@ivantcholakov from what I see in the code you linked you're relying on a $_SERVER['SERVER_NAME']. Sadly this gives you pretty much the same level of security as when using $_SERVER['HTTP_HOST'].
Autodetection will never happen. But we might think about something like allowedHosts variable which can contain allowed hosts (possibly with wildcard support for subdomains?).

Maybe this whole autodetection with a list of allowed baseUrls that would be checked with preg_match() would be better? I want sub-directories to be detected too.

https://expressionengine.com/blog/http-host-and-server-name-security-issues

Here is an additional draft for for restriction of site access to trusted host names only.
https://github.com/ivantcholakov/starter-public-edition-5/commit/caeec137ace6e2e6391b4579a6a04711a4448b3b


Rationalise all our exception handling.

Create a FlutterErrorDetails struct-like class that describes an
exception along with more details that aren't in the exception, like
where it was caught and what was going on when it was caught.

Provide a FlutterError static API for handling these objects:

FlutterError.onError which is called whenever Flutter catches an
error.

FlutterError.reportError() which handles an error.

FlutterError.dumpErrorToConsole() which is the default behavior
for onError.

Removes all the existing exception handler callbacks.

Replaces all the existing places that described exceptions using
debugPrint with calls to FlutterError.reportError().

Extend lockState() to also catch exceptions, so that we catch
exceptions that happen during finalizers.

Make the test framework catch errors and treat them as failures.

Provide a mechanism to override this behavior in the test framework.

Make the tests that used to depend on the exception handler
callbacks use this new mechanism.

Make pump() also support the phase argument.

Improve some tests using these new features.

Fixes #2356, #2988, #2985, #2220.

LGTM
We might consider using Zones for the error handler in the future.  That way you can have different error handlers installed at once for different parts of your app.  In any case, this change is a massive improvement.

I've looked at using zones before (in particular to get better async stack traces) but I've not figured out a good way to do it (in part because I can't find good docs for that API). If you file a bug with more detail about what you want I'm happy to implement it.


Prevent clearing AccessoryInfo files

persistSync() should not be called, before seItem() is ready. In my case, AccessoryInfo files were cleared, which caused recreation and ultimately preventing reconnection. Calling synchronous setItemSync() fixes that.

@mschm thanks for fixing this :) Would you mind to also replace the setItem at here and I'll merge them in one PR.

Awesome :)

Thanks!!


Update backend tests

Why
To fix the failing tests
What
Here are the failing tests

How
...

Development fixes are already done.
This ticket is pending the Allure fixes here:

https://github.com/IntersectMBO/govtool/pull/1057

Backend tests are now passing.
Here is the link to the dashboard
https://intersectmbo.github.io/govtool-test-reports/backend/1/#


Fix OBJ_create() to tolerate a NULL sn and ln

In 1.0.2 and before OBJ_create() allowed the sn or ln parameter to be NULL.
Commit 52832e47 changed that so that it crashed if they were NULL.
This was causing problems with the built-in config oid module. If a long
name was provided OBJ_create() is initially called with a NULL ln and
therefore causes a crash.
Fixes #3733

Pushed. Thanks.


Make bin/hubot Warn about unknown options

Previously the bin/hubot script would silently ignore options it was passed that it didn't know about. So the following would start hubot:
hubot --adaptor something

but wouldn't load the specified adapter as --adaptor not --adapter was passed as an option. There was no feedback to indicate that the option was unknown so a small mistake like this could lead to some frustrating debugging.
This changes bin/hubot to log a warning to the console if an unknown option is specified.
This could be more strict and stop hubot from starting at all if an unknown option has been passed, but that has the potential to break existing installations.

Thanks!


WSDL not working with implementation

The provided wsdl's do not correspond to the implemented web services. Specifically, the arguments are not passed correctly.

The issue was solved in the following commit 82bb9ada6e1d825ad4653c1311041128f1763643


World reset

Is there some way to reset the world back to its originally loaded state without restarting the GUI?

I am confused. I don't see the changes from #270 on the main branch.

They should be... Check that you maybe don't have the package pip installed from PyPi, as the latest version there (3.0.0) does not have this button.

@analog-cbarber -- did you find a way to resolve this, or anything else I can help with?

I released 3.1.0 yesterday, so you should be good to upgrade right now!


Experiment with an asyncio based service that doesn't use CancelToken

This is me running with an idea.  Here's an asyncio based service that doesn't use a CancelToken and yields clean shutdowns and resilient exception handling (the same pattern used in the TrioService).  I'm not really sure what this proves but it might be a way to reduce or eliminate our use of cancel tokens...
What was wrong?
How was it fixed?
To-Do

[ ] Clean up commit history

[ ] Add entry to the release notes

Cute Animal Picture

So this came from a few connected rabbit holes.
I wanted to experiment with using asyncio-run-in-process to replace the usage of multiprocessing within our Component API.  This lead to me realizing that there wasn't a clean way for me to enter an async execution.
So, I went to look at the trinity.extensibility.ComponentManager to see if there was a clear way to cleanup the Component lifecycle, simplify the Component API and allow components to define async entry points.
This lead me to look into whether the ComponentManager could be replaced by a service since services already have mechanisms in place for managing the lifecycle of multiple concurrent background tasks....
And this brought me to re-examine the TrioService API since I wanted to use that same API for the ComponentManager.  After looking through the TrioService it seemed feasible to reproduce the same API.
So here it is, a different shaped service abstraction that is asyncio friendly and that I think might manage clean cascading shutdowns of hierarchical nested services without needing the cancel token....


Integrating Tables & Ontology editor

In 2023, we added two new features: the Ontology editor, and the Table editor. Both of these allow users to create and edit a data model. I think it's a good thing that both of these have a different UI, as their usecases are different, too. However, we should also consider how both of these could be integrated.
Consider some scenarios:

After creating a nice model in your ontology, you want to make instances. You can do this using the "new" forms, but it's kind of cumbersome without the table editor.
You made a table, and use it for important data. You want to document your model and share it with others. How can you do this?

"Create table" button from Class

Add a button to a class in the Ontology viewer / editor to "create a table" for that class
The properties should be linked, so if the user adds a column to the table, it should be added to the Class + Ontology

One default ontology per drive - all classes stored there

Every drive could have (at least) one Ontology, created by default when creating the drive
When a table is created, that class is added to the ontology
The owner of the class + properties is the Ontology, not the table

After creating a nice model in your ontology, you want to make instances. You can do this using the "new" forms, but it's kind of cumbersome without the table editor.

I don't think this is the case at all, I'd rather create a blogpost in a full page form than in a table row for example. Tables only make sense for things that are semantically already row-like. For example rows on an invoice, but even then they only hold meaning when taken together as part of a whole invoice and lose that meaning when all invoice rows of all invoices are thrown into the same table.

You made a table, and use it for important data. You want to document your model and share it with others. How can you do this?

Technically you can already do this by manually adding the table's class and properties to the ontology but the UX for this is bad and could be improved.

Add a button to a class in the Ontology viewer / editor to "create a table" for that class

This could be nice but one problem we face is "Where do we put this table" since the location of the table can hold semantic meaning e.g. a recipe table in a folder called "Things I like" would mean something different when the folder was called "Allergy problems"
I think it would make more sense to let the user choose existing classes when making a table

Every drive could have (at least) one Ontology, created by default when creating the drive
When a table is created, that class is added to the ontology
The owner of the class + properties is the Ontology, not the table

This is a good idea and would make it more like how most CMS's work. Only small problem we'd have to solve is what we name the ontology as this has some significance in semantics and when generating types.


HHH-13845 - Work for refactor in StatelessSessionImpl for unused meth…

StatelessSessionImpl has a public method afterOperation(boolean success).
The method parameter success was used and passed as a parameter in afterNonTransactionalQuery().
Since the change was done long time back, the success variable is not being used now, and being passed by its caller in the same class now. In order to avoid that, a refactor can be done.
Since it is a public method, this might have an impact as well. But if not, this is fixed in this pull request.
Thoughts and input is most welcome.

btw, I saw you created many tickets of similar natures. maybe it is better
to combine them and theirs PRs into one so we can make better use of time,
energy and resource. Reviewing similar PRs again and again seems boring and
unnecessary. Steve is super busy and we can avoid bothering him again and
again. Just random thoughts.
On Thu., Feb. 6, 2020, 17:32 The Geeky Asian<EMAIL_ADDRESS>wrote:

@thegeekyasian commented on this pull request.
In
hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java
https://github.com/hibernate/hibernate-orm/pull/3221#discussion_r376119601
:

  }

  temporaryPersistenceContext.clear();
  return results;

}

public void afterOperation(boolean success) {

public void afterOperation() {

Sure. Merging it into wip/v6.0 sounds like a good idea to me. If
@sebersole https://github.com/sebersole thinks that is doable and makes
sense, I can then update the base branch for this PR.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hibernate/hibernate-orm/pull/3221?email_source=notifications&email_token=AB6UYAW2THTMN2VFZV7AA3TRBSFZPA5CNFSM4KQ3CSHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUTB7ZQ#discussion_r376119601,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB6UYATXTBEJR3D7SB2JJALRBSFZPANCNFSM4KQ3CSHA
.

btw, I saw you created many tickets of similar natures. maybe it is better to combine them and theirs PRs into one so we can make better use of time, energy and resource. Reviewing similar PRs again and again seems boring and unnecessary. Steve is super busy and we can avoid bothering him again and again. Just random thoughts.
…
On Thu., Feb. 6, 2020, 17:32 The Geeky Asian, @.> wrote: @.* commented on this pull request. ------------------------------ In hibernate-core/src/main/java/org/hibernate/internal/StatelessSessionImpl.java <#3221 (comment)> : > } temporaryPersistenceContext.clear(); return results; } - public void afterOperation(boolean success) { + public void afterOperation() { Sure. Merging it into wip/v6.0 sounds like a good idea to me. If @sebersole https://github.com/sebersole thinks that is doable and makes sense, I can then update the base branch for this PR. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3221?email_source=notifications&email_token=AB6UYAW2THTMN2VFZV7AA3TRBSFZPA5CNFSM4KQ3CSHKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCUTB7ZQ#discussion_r376119601>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6UYATXTBEJR3D7SB2JJALRBSFZPANCNFSM4KQ3CSHA .

Sure. I think HHH-13845, HHH-13847 and HHH-13852 could be merged into a single PR as all three of them are done as an improvement for in wip/v6.0
I'll close the PRs for other two tickets and merge both of them in this one, while I update the description in the ticket associated for this ticket. Would that suffice?

Closing this PR as the method has already been left unused in the wip/v6.0 which leaves the ticket/issue irrelevant. In order to make any other improvement regarding this method, another ticket/issue could be reported.
Thanks


[Enhancement] Do some code optimization.[EventMeshTcpMessageDispatcher]

Search before asking

[X] I had searched in the issues and found no similar issues.

Enhancement Request

located at:
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/EventMeshTcpMessageDispatcher.java line 58,89-105,139-145
analysis and explanation:
a. Field 'eventMeshTCPServer' may be 'final'
b. use switch instead.
c. Replace this if-then-else statement by a single return statement.
Condition 'cmd != null' covered by subsequent condition 'Command.REQUEST_TO_SERVER == cmd || Command.ASYNC_MESSAGE_TO_SERVER == cmd || Command.BROADCAST_MESS ...'
Describe the solution you'd like
a.add final

b. use switch instead.

c. 'if' statement can be simplified

Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

I want to fix this issue! Please assign it to me. Thanks.

Of course, you're very welcome, and you can start by submitting a pr.

@Codeprh are you still working on this?

I want to work on the issue. Please assign me.

@shubhamind08 you can submit a pull request.

@HattoriHenzo Okay, you can start by submitting a pr.

@shubhamind08  are you still working on this?

@shubhamind08 The task cycle is two weeks overdue and other contributors are welcome to complete it.


DO NOT MERGE: switch slot derivation to poseidon2 instead of pedersen

#8801  👈
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @dbanks12 and the rest of your teammates on  Graphite


Write steps to create a Slack app in a Slack instance (for testing)

The Arqivist is first and foremost a Slack bot, thus we need a Slack integration to test it.
We need to have:

a step-by-step guide on how to create the slack app in slack, generate the necessary api keys
a slack account for testing

Is this the slack setup guide you are looking for?
https://practical.li/clojure-web-services/projects/slack-app/create-slack-app/

Yes this looks good! We can link to it in the README, with additional info on:

scopes needed: commands, channels:history, channels:join, channels:read, chat:write, chat:write.public, groups:history, groups:read, users:read
setup slash command and interactivity endpoints


Difficulties to Sign In

Hello Chris,
thank you for making this App open source. I'm just trying to get it to work but no success until now. The App compiles and runs to the Sign In screen. Then it seems that I cannot get authenticated, I think because i took wrong settings for AuthClientId and MobileCenterId. It's not clear to me which IDs should be entered there in Constants.cs. Which App should be registered in Azure active directory? Any registered App? Where can I see the MobileCenterId in the Visual Studio App Center? An ID for a special App? It would be kind if you could give more detailed explanations (examples).
Kind regards
Roland.
P.S. Perhaps you are interested in my App: https://azuretabstorclient.wordpress.com/

Got it working with registrating the App AzureStorageExplorer in Azure Portal and setting the Redirect URI to urn:ietf:wg:oauth:2.0:oob.
In the Azure Portal, click Azure Active Directory, then --> AppRegistration --> +New application registration --> Name: AzureStorageExplorer, Application type: Native, Redirect URI: urn:ietf:wg:oauth:2.0:oob --> Create