Missing configuration instructions

Thanks for the great work  @njbartlett . It is well presented and explained.
I already used this project to convert existing work I am doing :)
I think it will be good to add information about component configuration (felix.fileinstall)
I was using this bndrun setup for testing modules.
-runproperties: \
    felix.fileinstall.noInitialDelay=true,\
	felix.fileinstall.filter=.*\\.cfg,\
	felix.fileinstall.dir=${.}/src/main/resources/etc

Is there a better/recommended way?

ok, BNDtools maven plugin ver 4.0 was giving me some trubble. ver 3.5 works fine and the config is working.
Essentially, the runproperties are not copied to the launcher properties in ver 4.0.
Did you find the same issues in this project?


round-off errors in generating spectra and other parameters

Hello,
In addition to thanking you for providing this tool, I've been using your source-code for a while now, I'd like to suggest making a minor adjustment to the source-code with respect to calculating the logarithm of variables. When calculating the logarithm of a double value, if the value is too small, the compiler might round that value to zero. This boosts the output of, say for instance, a log function to inf.
This problem was particularly hard for me to track down, because it only comes up when the signal noise level was very low and the compiler some times rounded off the value of a double data point to zero.
This could be easily resolved by simply adding an epsilon value to all variables before computing the logarithm. The instance I found was in vector.c:
log(temp)
in calculating the signal spectrum.
I'm sure there are other instances as well.
Many thanks,
Dev

Hi,
Thanks for using LibXtract and reporting this issue.
LibXtract already includes a check to ensure that log(0) isn't computed in xtract_spectrum(), i.e.
       if ((temp = XTRACT_SQ(real) + XTRACT_SQ(imag)) >
                    XTRACT_LOG_LIMIT)
                temp = log(temp / NxN);
            else
                temp = XTRACT_LOG_LIMIT_DB;

Where XTRACT_LOG_LIMIT is defined as 2e-42 in xtract_macros_private.h.
Actually, I think 2e-42 was set when LibXtract was still single-precision, and is certainly a lot higher than the smallest normal double.
So... before we start adding epsilon values, we need to look at why you're getting inf values in your code. A good starting point would be stepping through with the debugger.
Can you post an example of your source code (and input), which reproduces the issue?
Thanks,
Jamie

I see. I automatically assumed that the log function was the source of the problem.
I've been trying to find the error, but didn't reach any conclusion. I checked XTRACT_LOG_LIMIT and my compiler also recognizes 2e-42 as a non-zero double. I also looked at my own data array, which also seems to be okay.
Whatever this is, it sometimes happens and sometimes doesn't.
Replacing the last entry of the array (i.e. spectrum[BLOCKSIZE/2] = 0.0) seemed to fix it for me, but that's obviously isn't a permanent solution.
Thanks,
Navid

Would you mind sharing a minimum working code fragment that reproduces the problem? Then I can have a go at debugging it.
Thanks,
Jamie

This is the feature extraction code. As you can see, it's pretty much the same as simpletest.cpp, except that I read files from a list of files in the following format:
wav-id /path-to-wav/wavname.wav
The thing is that the problem only happens when I try to extract features for chunks of files (not one file at a time). That's what makes the bug difficult to locate.
#include <iostream>
#include "xtract/libxtract.h"
#include "xtract/xtract_stateful.h"
#include "xtract/xtract_scalar.h"
#include "xtract/xtract_helper.h"
#include <math.h>
#include <fstream>
#include "WaveFile.h"

#define BLOCKSIZE 512
#define MAVG_COUNT 10
#define HALF_BLOCKSIZE 256
#define SAMPLERATE 16000
#define PERIOD 102
#define MFCC_FREQ_BANDS 14
#define MFCC_FREQ_MIN 20
#define MFCC_FREQ_MAX 8000

int main(){
  // Initialize mel filters and Windows:
  double argd[4] = {0}; // argument array (needed for feature/spectrum estimation)
  double spectrum[BLOCKSIZE] = {0};
  double mfccs[MFCC_FREQ_BANDS] = {0};

  //Allocate Mel filters
  xtract_mel_filter mel_filters;
  mel_filters.n_filters = MFCC_FREQ_BANDS;
  mel_filters.filters   = (double **)malloc(MFCC_FREQ_BANDS * sizeof(double *));
  for(uint8_t k = 0; k < MFCC_FREQ_BANDS; ++k)
  {
    mel_filters.filters[k] = (double *)malloc(BLOCKSIZE * sizeof(double));
  }

  // Initialize mfcc features.
  xtract_init_mfcc(BLOCKSIZE >> 1, SAMPLERATE >> 1, XTRACT_EQUAL_GAIN, MFCC_FREQ_MIN, MFCC_FREQ_MAX, mel_filters.n_filters, mel_filters.filters);

  // create the window functions
  double *window = NULL;
  double windowed[BLOCKSIZE] = {0};
  window = xtract_init_window(BLOCKSIZE, XTRACT_HANN);
  // End of initialization

  // Read list of files:
  std::ifstream wavList;
  wavList.open("path/to/file/wav_test.txt");
  std::string line_vals;
  std::string delimiter = " ";
  int nFiles = 0;
  while (std::getline(wavList,line_vals)) {
    nFiles++;
    // RegEx to separate utt-ID from utt-path.
    std::size_t spaceIdx = line_vals.find(delimiter);
    std::string wavId = line_vals.substr(0,spaceIdx);
    std::string wavPath = line_vals.substr(spaceIdx+1);

    // Read audio data from file
    WaveFile wavFile(wavPath);

    int16_t *wavData = (int16_t *)wavFile.GetData(); // assume 16bit signed integer
    std::size_t wavBytes = wavFile.GetDataSize();
    uint64_t wavSamples = wavBytes / sizeof(int16_t);
    double data[wavSamples];
    std::cout << wavSamples << std::endl;
    //    std::cout << nFiles << std::endl;
    for (int n = 0; n < wavSamples; ++n){
      data[n] = (double)wavData[n]/(65535);// This value fixes it. Found it off the internet.
    }

    for (uint64_t n = 0; (n + BLOCKSIZE) < wavSamples; n += HALF_BLOCKSIZE){ // frame and overlap

      xtract_windowed(&data[n], BLOCKSIZE, window, windowed);

      /* get the spectrum */
      argd[0] = SAMPLERATE / (double)BLOCKSIZE;
      argd[1] = XTRACT_MAGNITUDE_SPECTRUM;
      argd[2] = 0.f; /* DC component - we expect this to zero for square wave */
      argd[3] = 0.f; /* No Normalisation */

      xtract_init_fft(BLOCKSIZE, XTRACT_SPECTRUM);
      xtract[XTRACT_SPECTRUM](windowed, BLOCKSIZE, &argd[0], spectrum);
      xtract_free_fft();

      /* THIS IS WHERE I MAKE THE CORRECTION TO THE SPECTRUM */
      spectrum[255] = 0.0;

      /* compute the MFCCs */
      xtract_mfcc(spectrum, BLOCKSIZE >> 1, &mel_filters, mfccs);

      // check for nans
      for (int d = 0; d<MFCC_FREQ_BANDS; d++){
        if (isnan(mfccs[d])){
          // Add breakpoint here for debugging purposes
          xtract_mfcc(spectrum, BLOCKSIZE >> 1, &mel_filters, mfccs);
          d = MFCC_FREQ_BANDS;
        }
      }
    }
  }
}

Thanks,
Navid

Hi Navid, sorry for the slow reply. Would you mind uploading somewhere an example of one of the audio files you're using with this? One of the files that is causing the problem you are experiencing. Then I can debug this and make a fix. Jamie


[DOC] Add support to filter in maps

What do you want to do?

[x] Request a change to existing documentation
[ ] Add new documentation
[ ] Report a technical problem with the documentation
[ ] Other

Tell us about your request. Provide a summary of the request and all versions that are affected.
Maps will support a feature to add filters by drawing object like rectangle, circle and polygon, as local and global filter.
What other resources are available? Provide links to related issues, POCs, steps for testing, etc.
https://github.com/opensearch-project/dashboards-maps/issues/213

Please tag v2.7.0. Thanks


⚠ ClamAV has degraded performance

In 54e2024, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 72 ms

Resolved: ClamAV performance has improved in c59b114 after 5 minutes.


Caprine marked as agent sometimes

I use Caprine and sometimes it gets marked as an agent and is ignored for tiling. I'm not why it does that, but restarting yabai fixes it until I close and reopen Caprine, though that's obviously not ideal.

seconded! I just had this problem

So in yabai I use the following function ProcessInformationCopyDictionary(&psn, kProcessDictionaryIncludeAllInformationMask); to retrieve information about the process, and macOS reports it as an agent application: https://developer.apple.com/documentation/bundleresources/information_property_list/lsuielement?language=objc

I've made some changes on the latest master (#529) that might resolve this issue with Caprine. Would you mind trying that and reporting back? Thanks.

Fixed


status error: points should not be empty

when I running the code of FUEL, which I have facing an issue. and I do not know how do I can fix it. the error as following the picture below.

I am using Ubuntu 20.04. I am a greenman and have just started to come into contact with this software. plz help me to solve this error or plz give me some advices to fix this bug. I'll appreciate you to help me.thank you so much, best wishes!

The error originates from a marker message, which - unexpectedly - has an empty points field.
You should file an issue with the FUEL software package to get this fixed.

hello, thank you to reply. the link is the FUEL code address: https://github.com/HKUST-Aerial-Robotics/FUEL.git. I read the code and problems of the relevant packages, and I still haven't found a good way to solve this problem. So I am looking for help from teachers/scholars here.I would like to apologize to all teachers and scholars if I have disturbed you.

You don't need to fix the problem yourself. Just file an issue at FUEL's github site.


Non Windows store/ Portable versions?

Non Windows store/ Portable versions?

There is no technical challange in building and releasing a portable .exe version using GitHub actions, but I'm just lazy to do it sweat_smile I might do it in the near future tho.

I am sure its not. Be nice if we could have that option. Should I put it on a request list or something?

Should I put it on a request list or something?

No, it's alright in the GitHub issues.

Go to store.rg-adguard.net
Download https://apps.microsoft.com/store/detail/eyes-guard/9PHW0XFKZD7J
Unpack and enjoy:


Don't generate prop if custom prop exists in base

This PR address the following bugs:

If a model contains a spec property that was also added as a custom model in it's base model, the derived model will not generate the property.
if a custom property is added to a model and also includes the CodeGenSerialization attribute, that property is included in serialization.

fixes: https://github.com/microsoft/typespec/issues/4629

API change check
API changes are not detected in this pull request.


Single It block with multiple test cases

Can I tag a single test script  with multiple test cases Id's?
For e.g. I have 3 test cases which i have combined in my test script into single it block like below
 it(`C33651313 C33651310 C33651312  Verify Code value`, async function () {
      Command.log(`Running Test :${locale}`)
      // addTestRailComment(`Locale:\t${locale}`)
      if (local === 'gb') {
        expect(true).to.be.equal(false)
      }
    })
  })

So can i have the test report the test run results to each of the test case id's C33651313 C33651310 and C33651312 ?
Currently when i try this I see the following
[0-0] 2023-07-26T00:33:32.007Z ERROR TestrailReporter: Failed to update test run: Request failed with status code 400
[0-0] 2023-07-26T00:33:32.598Z ERROR TestrailReporter: Failed to update test run results: Request failed with status code 400

@pawankondavatysonos No, that is not supported. Tests should have a 1:1 relationship with the cases in TestRail. Mocha is built around the fact that it is a single test. You either need to combine those 3 tests into a single TestRail case or split the test into 3 it blocks in mocha.


Better Testing/Mocking Practice for Unit Testing

Goals:

Easy to Maintain
Quick to write

Problems:

Mocking/Stubbing AFJ

Was done with #544


Tested, all good


corrected translations of Uzbek language

Please make sure these boxes are checked before submitting your PR, thank you!

[ ] Make sure you follow Element's contributing guide (中文 | English | Español | Français).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

corrected I18N translations of Uzbek language


Interval grouping by Nullable doesn't work properly

See the Filter row does not filter properly for nullable date field ticket for details.
T458279.zip

Test case (in the context of GroupHelperTests):
var data = new[] {
    new { d = new DateTime?(new DateTime(1996, 7, 4)) },
    new { d = new DateTime?() }
};

var groups = CreateHelper(data).Group(data, new[] {
    new GroupingInfo { Selector = "d", GroupInterval = "year", IsExpanded = false },
    new GroupingInfo { Selector = "d", GroupInterval = "month", IsExpanded = false },
    new GroupingInfo { Selector = "d", GroupInterval = "day", IsExpanded = false }
});

@vconst @Alyar666
What behavior we expect?
Should null values be ignored during the calculation of date group intervals?

The null values should not be ignored. The groups array should contains item with key value null. The grid ignores the items property in header filter when key is null.

Do I understand correctly: there must be 3 group levels with null keys?

Yes

Fix will be included in release 1.2.1

Hello,
Header Filter not working with Nullable<DateTime> when RemoteOperations is set to true.
public static object Load<T>(IQueryable<T> source, DataSourceLoadOptionsBase options);
method throws an exception:
Value cannot be null.
Parameter name: constructor

Version 1.2.3

@roman-simionov PTAL

Hello @GiviKDev,
My attempts to reproduce the issue with the sample project were unsuccessful. The header filter works correctly with Nullable<DateTime> and the enabled RemoteOperations options. Would you please update my sample to illustrate the issue.

Hello, I updated your sample project, where you can reproduce current bug.
T458279.zip

@GikiDev, thank you for your reply. Now I see the issue appears when EF is used. We will fix it in the context of this issue

Hi @GiviKDev
Would you please check the fixed NuGet from https://ci.appveyor.com/project/dxrobot/devextreme-aspnet-data/build/244/artifacts ?
You will need the following binding redirect in web.config:
<dependentAssembly>
 <assemblyIdentity name="DevExtreme.AspNet.Data" publicKeyToken="982f5dab1439d0f7"/>
 <bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>"/>
</dependentAssembly>

P.S. How to install a Nuget Package .nupkg file locally

Hello,
Thanks, it's working like a charm.


[Bug] JwtPayload serialisation seems to invoke ToString for complex object claim

Documentation related to component
IdentityModel 7x releases notes.
Please check all that apply

[ ] typo
[ ] documentation doesn't exist
[ ] documentation needs clarification
[ ] error(s) in the example
[x] needs an example

Description of the issue
Hi, I noticed the JWT additional claim serialisation behaviour has changed after upgrading System.IdentityModel.Tokens.Jwt from version 6.x to 7.x. More specifically, when serialising a claim represented by a list of objects, JsonSecurityTokenHandler.WriteToken seems to invoke the object's ToString() method instead of serialising it. The following sample code:
        public static string GenerateJwt()
        {
            var listClaim = new MyClass[] { new() { Name = "test" } };
            var payload = new JwtPayload()
            {
                { "claim", 1.0 },
                { "listClaim", listClaim }
            };

            var securityKey = new RsaSecurityKey(RSA.Create());
            var signingCredentials = new SigningCredentials(securityKey, "RS256");

            var token = new JwtSecurityToken(new JwtHeader(signingCredentials), payload);

            return new JwtSecurityTokenHandler().WriteToken(token);
        }

Generates this JWT payload:
{
  "claim": 1,
  "listClaim": [
    "test_jwt.MyClass"
  ]
}

Previously, the payload was serialised as:
{
  "claim": 1,
  "listClaim": [
    {
      "Name": "test"
    }
  ]
}

The behaviour described above only happens if instantiating JwtPayload with the additional claims dictionary (Dictionary<string, object>). A possible workaround is to instantiate JsonPayload with a list of Claim objects as follows:
            var payload = new JwtPayload(
                new Claim[]
                {
                    new("claim", "1.0"),
                    new("listClaim", JsonSerializer.Serialize(listClaim), JsonClaimValueTypes.Json),
                });

I noticed this behaviour was introduced here. The 7.x releases notes mention some changes to the serialisation behaviour, but doesn't specify the one described above.
Logging as a documentation issue as I am not sure if this behaviour change is expected (and not documented) or a bug.
Thanks.

Indeed this is an intended change. This has more info: https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/2455#issuecomment-1911006805
We will update the docs.


Suggestion : Along with AppID add in the AppSecret capability

[parameter(Mandatory=$false, HelpMessage="Specify the AppRegistration Secret for the Application ID.")]
[ValidateNotNullOrEmpty()]
[string]$AppSecret,

And change the token retrieval:
$Global:AuthToken = Get-MSIntuneAuthToken -TenantName $TenantName -ClientID $ApplicationID -ClientSecret $AppSecret
As long as the custom AppID has appropriate permissions, it SHOULD be remotable.

I'm also trying to tweak it to add the existing machine name -- have it running through remote powershell after making these changes.


Is there a way to update a Paragraph?

Is there a way to create a stateful paragraph or rerender a paragraph with another text again?

What I do is use an application state to store the variable for text and generate spans based on that variable.

What I do is use an application state to store the variable for text and generate spans based on that variable.

This is the way.
From the README:

The library is based on the principle of immediate rendering with intermediate buffers.

which means you have to recreate the ui (including your Paragraph) in every frame.


Can only install nightly

Description

For some reason I cannot install the release version of ALVR. It only lets me install the nightly version on my quest 2.
General Troubleshooting

[x] I carefully followed the instructions in the README and successfully completed the setup wizard
[x] I read the ALVR Wikis here and here

Environement
Hardware
Note: for Linux, an upload to the hw-probe database is preferred: hw-probe -all -upload
CPU:
GPU:
Audio:
Installation
ALVR Version:
SteamVR Version:
Install Type:

[ ] Packaged (exe, deb, rpm, etc)
[ ] Portable (zip)
[ ] Source

OS Name and Version (winver on Windows or grep PRETTY_NAME /etc/os-release on most Linux distributions):

Can you provide the error message you get when you try to install the regular version onto your Quest? If you're using SideQuest, you can click on the tasks page and it should tell you what the error was.


Return from initializer without initializing all stored properties error for optional type

Description
If type of property is noted as Type? or Type!, and the property is declared as var compiler allows such properties to be skipped for initialization. But if type of property is noted as Optional<Type>, then skipping such properties during initialization creates error:

Return from initializer without initializing all stored properties

Reproduction

Create a new swift project/package.
Add the following code and see errorstruct SomeOptionalType {
    var val: Optional<String>

    init() {}
}

Replacing Optional<String> with String? or String! resolves error.

Expected behavior
Code should behave same as scenario with Type? or Type! declaration.
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-<IP_ADDRESS>.10 clang-16<IP_ADDRESS>)
Target: x86_64-apple-macosx14.0
Additional information
No response

NB: https://github.com/swiftlang/swift/pull/26160/commits/25e4ca9a602cedd455df673563fa38900459658c#diff-5a9439f8a77b136c97b430596bfc4263de54fbf7c0616656bbfa75ff2d10d145L2454-L2475

Duplicate of #53322


need to get enough of the Observable code moved into here to run locally as node module & on trial website

Got smallest amount of wellioviz deployed as github pages here: https://justingosses.github.io/wellioviz/


Get all companies not using the correct endpoint

It looks like Hubspot changed their endpoints last year for getting all companies or all deals.  See this announcement: https://integrate.hubspot.com/t/upcoming-changes-to-recent-endpoints-for-companies-and-deals/1121
It seems like the Hubspot::Company.all method should be updated to use the new endpoint URL described here: https://developers.hubspot.com/docs/methods/companies/get-all-companies
I'm sure the same is true for deals, but my issue currently is with companies.

Would love to see this fix merged into this gem as well!

Existing PR for this issue: #76


Explore: how do CF roles and permissions map to the current CRDs?

Background
Currently, CF on VMs relies on a set of roles for authorization, each role having specific permissions. Role permissions are hardcoded and information about which user has which role is stored in the Cloud Controller database.
The Kubernetes way of handling authorization is quite different: the most common method is Role-based Access Control (RBAC). Permissions are expressed as the possibility of performing standard operations (verbs, like get, watch or list) on resources. These permissions are stored in (Cluster)?Roles and bound to users via (Cluster)?RoleBindings.
Questions
Assuming:

Orgs map to clusters and spaces map to namespaces (so we could technically map Org roles to ClusterRoles and Space roles to Roles)
The CF resources are going to look like the current proposal

Then:

Can we model the current CF roles using plain Kubernetes RBAC?
If not:

How far are we? Which changes to resources would we need to make it happen?
Which roles map cleanly and which don't?

Using this document to capture details

We managed to parse most of the roles and their permissions from the cloud_controller_ng docs sources using this script
Some details are outlined in the accompanying README.md

App Environment Access
You need to be a admin, admin-read-only or space developer to access env vars for an app. We believe the plan is to use secrets to store the env vars, so these roles would need access to k8s secrets to GET and LIST them. However, the secrets in a certain workload namespace would not just be env vars. There would be other secrets such as registry credentials that should not be shared with a space developer. So a simple RBAC rule for this roles on secrets is not sufficient.
There is a role property resourceNames to restrict permissions to a list of named objects, so it is theoretically possible to give access only to app env vars. However, whenever an app env var is created or deleted, the role would have to be updated to ensure the name list matches the env vars currently associated with apps. This doesn't feel like a great thing to be doing. It could easily get out of sync, and the list could get large.
OPA is possibly an option, although we are not sure it can restrict GETs or LISTs. Its actions are CONNECT, CREATE, UPDATE, DELETE. So maybe the CONNECT action will be able to do this. An explore is required.

Updating App Properties
Admin, Space Developer and Space Supporter (experimental) roles can set a current droplet on a app. In the cf-on-k8s world, this would mean setting the current app build image to one previously built by a Build object. The Space Supporter role does not however have permission to update an app, which entails modifying labels, annotations and/or lifecycle. This might be an oversight, or the Space Supporter role might not be required for cf-on-k8s, but if it is required as stated, then the current droplet property must be separated into another object if we require using only the coarse build-in RBAC model.
Creating small association objects like this could become quite pervasive. It's not a idiomatic k8s thing to be doing, and could cause problems with performance and database consistency.
If we use custom hooks, or OPA, it is simple to restrict setting a particular property based on roles. So this might be an indication that OPA is required on top of basic RBAC.

List Apps and Implications on the Shim Executing as the Calling User
List Apps retrieves all apps the user has access to. If the user has a global role like admin or admin-read-only, this would be apps from all orgs and spaces. Or if the user only has org or space roles, the list would be restricted by orgs and spaces.
With our assumption of org <-> cluster and space <-> namespace, this is achieved with RBAC rules on listing apps either cluster or namespace scoped.
For a kubectl user, this works well. They can either list apps globally, or in a particular namespace, or get a permission denied error. For the shim, it's more awkward. If the user only has namespaced permissions to list apps, a cluster scoped list will fail. So the code must iterate through namespaces performing the list in each one. This might be inefficient, and also requires being able to work out which namespaces the user can list apps in, to avoid trying all namespaces. That would imply access to role bindings, and knowledge of which role gives access to list apps. The latter is particularly uncomfortable tying the shim code to the name of a role.
So this illustrates a downside of relying on k8s authorisation inside the shim code, and running API calls as the calling user.

App Features
This seems to be an extensible way of enabling things on an app, but there are only two things: ssh access and revisions. I would suggest these to be two boolean fields on App instead.
In this case, the Space Supporter role cannot update ssh access. That would need to be an OPA rule. If Space Supported is not supported, plain RBAC is fine.

We are working on what basic RBAC would look like for the role, focussing on the CRDs present in the parallel exploration. See here

We're stopping after writing example RBAC roles for app, package, build, droplet, process, and task.
Mainly, RBAC is a good fit. But there are several important issues:

Some properties can only be updated by certain roles. For instance, Admins can only update labels and annotations on Apps. To enable this in pure RBAC, the labels and annotations must be stored in a distinct CR, and update permissions for admin removed on Apps. However, this feels like bad k8s design, leading to a clunky interface for kubectl users. If we chose to do that, those separate resources should really be owned by the main resource, so a controller would be responsible for creating the additional resources, forcing a kubectl user creating an App, say, to have to wait for the new additional resources to appear before setting the properties that couldn't be set on the main resource. This is not a declarative flow. Alternatively, authorisation can be enhanced by a component such as OPA which is easily capable of allowing updates to a subset of fields based on role, and that would be our recommended approach for this.
App env vars are stored in a secret. Thus we must give read access (at least) on secrets to roles like Space Developer and Admin. However, with standard RBAC, this would give access to all secrets in the namespace. There are bound to be secrets which should not be visible to a Space Developer, for instance registry passwords. There is no way to restrict access to secrets based on a label, but the resourceNames property on role could allow access to a list of secret names. The difficulty is keeping this list in sync as apps and env var secrets are created and deleted.
When reading processes and tasks, certain fields are redacted for various roles. For example, command on a Task cannot be read apart from by Admin and Space Developer roles. There is no way to do this with the k8s API without separating those fields which might be redacted into one or more distinct resources. As mentioned above, we think this would be a poor k8s design, making kubectl using clunky (e.g. Space Developer must create a Task object and then wait for a TaskCommand object to appear and then update the command property on it, which is not possible in a declarative flow).

To summarise:

we should extend RBAC, mainly for updates, using OPA to restrict fields that can be updated based on role
storing env vars in secrets means Org Admins and Space Developers will have access to secrets they shouldn't see, unless we do an unpleasant hack with the resourceNames role property
restricting access to certain fields in a resource based on role is not possible. Simulating this by splitting objects breaks the ability to have a declarative way of defining CF apps and tasks.
the shim will struggle to implement endpoints listing resources if sending k8s api calls as the requesting user, if the user does not have cluster permissions on the resource. The shim will not know which namespaces the user has the permissions in, and so will have to iterate over all namespace listing the resources, getting errors from all namespace except those with the user's permission. This could be very expensive in a cluster with many namespaces and a user with apps in a single namespace. Any workarounds would introduce authorisation concepts into the shim, which is explicitly to be avoided in the 'use k8s for auth' approach.

See comments in the rbac.yml for roles and resources with problems.

It feels like with CF objects represented in k8s CRs we cannot hide parts of objects (such as task commands) from certain users. Can we drop this requirement for cf-on-k8s?

Aggregated cluster roles provide a way of dynamically aggregating cluster roles by selectors. This pattern would be good for the secret restrictions using resourceNames if only it worked on Roles rather than just ClusterRoles.

Security Groups can be globally enabled or space-scoped. Globally enabled security groups can be seen by any space user. Space-scoped security groups can be seen by users with permissions on the space, including global roles.
So globally enabled security groups must be cluster wide resources. Space scoped security groups probably have to be namespaced. So we need two separate CRDs for global and space-scoped security groups.

Example rbac.yml


Update to syn-2

Thanks!

A new release with this would be great.

I'd accept a PR bumping it to 1.3.1


Misleading comment in decimation filter function

The comment below is out of date, we used to early-return on the happy path but changed this. Remove this incorrect comment.
https://github.com/JordanAceto/Magpie/blob/710b1f07e04fe3cf03bed5014f1b3d6927cb5d44/main_microcontroller_firmware/lib/audio/decimation_filter.c#L78

Fixed in 24aa316


[Certification] 2017 Qual-E Testcase Issue

URL : https://2017-dot-qual-e.appspot.com/

Progressive test
Certification requirements :  Must pass tests #1-25
-> This case is not worked, stop no.15
-> It's same to Chrome browser
-> Please check it
MSE Test
-> 72. AppendH264VideoOutOfOrder fail
-> It's same to Chrome browser and canary (m55)
-> Please check it

Progressive tests on tip have been fixed in: https://github.com/youtube/js_mse_eme/commit/8cb8c5342d2a0287da2165e05e324ca6e2eb4e93
AppendH264VideoOutOfOrder on tip has been made optional in:
https://github.com/youtube/js_mse_eme/commit/c2d8fb5ffeeb55285e5b36520c2751b771e10f4f


QueryValidators not being executed?

First up - great project - I really like the way features co-habitate a smaller part of the project than usual - I'm sure it leads to cleaner PR's too.
I cant figure this out though.. There are Fluent Validators applied to queries in a few places.
        public class QueryValidator : AbstractValidator<Query>
        {
            public QueryValidator()
            {
                RuleFor(x => x.Username).NotNull().NotEmpty();
            }
        }

But the Query classes are instantiated manually in the controllers which I believe means that the validation isn't ever being executed.
// eg
        [HttpGet("{username}")]
        public async Task<ProfileEnvelope> Get(string username)
        {
            return await _mediator.Send(new Profiles.Details.Query() { Username = username });
        }
// and
        [HttpGet("{slug}")]
        public async Task<ArticleEnvelope> Get(string slug)
        {
            return await _mediator.Send(new Details.Query(slug));
        }

The pattern works well with the commands which are bound as part of MVC's request pipeline and have their validation performed before even entering the action..
        public async Task<CommentEnvelope> Create(string slug, [FromBody]Create.Command command)
        {
            command.Slug = slug;
            return await _mediator.Send(command);
        }

presumably because of this registration
    .AddMvc(opt => ......
      .AddFluentValidation(cfg => { cfg.RegisterValidatorsFromAssemblyContaining<Startup>(); });

Am i missing something? Is Mediatr meant to be executing those validators?

If this isn't currently executing, I need to take a look.  The MediatR pipeline is meant to be executing those validators.  I'll have to check when I get some free time soon.  I might have broken it during an upgrade.

Added a MediatR pipeline validator like I've done on another projects.  Things might get validated twice but that's not horrible.  Works in the integration tests


Reduce cpu usage when stdin is not an tty

On Linux stdin could be /dev/null or a pipe for example when using docker or systemd services. This leads to high cpu usage by constant reading null bytes.
To fix this you dont need to spawn the input thread if isatty returns false.
See https://man7.org/linux/man-pages/man3/isatty.3.html

Awesome, this was very much necessary! Good job, merging! :)


Localization

Why there is no any locale at the project? I could help to translate it into several languages.

Translate what?

All the strings marked for translation, for example, https://github.com/yourlabs/django-autocomplete-light/blob/master/src/dal_select2/views.py#L39
Clients complain about such strings.

Agreed, looking forward to review a pull request !

Pull request was sent.

:guitar:

One more thing: does select2 internationalization (https://github.com/select2/select2#internationalization-i18n) is used here in django-autocomplete-light? I asked this because those strings, like "Please enter [3] or more characters", are not translated.

@Q-bart the standard (no standard) used by select2 in translation filenames is the problem, see #746

@Q-bart yep @luzfcb has done most of the work I think you can rebase PR #746 and finish it easy <3

Please add the pt_BR case since this PR was started by our friend from Brazil haha


There is a missing file issue

Hi author, the following error occurs when executing the train.sh file for the cityscapes dataset:

The gtFineInstId file is mentioned in the datasets/cityscapes/val.txt file (shown below), but it is not present in the Cityscapes dataset constructed according to your request, how can this be resolved?

Hi, the files are the ground-truth instance masks of Cityscapes.  They are not used for inference at all.  You can either replace them with some dummy files, or download from here.


How to use @livewire syntax

Hi,
I have a module Components.

This one is working
<livewire:components::blog.blog-preview-component1 />
This one is not working
@livewire('components::livewire.blog.blog-preview-component1')
What is the correct syntax ?

Thanks

@PKDmeDEV Hi, you can try this -
@livewire('components::blog.blog-preview-component1')

Thanks, it worked. Sorry couldn't test it earlier.


Remove ID from groups for Homematic IP Cloud

Description:
This PR remove the id attribute for groups, because groups don't have device id/sgtin, just an ugly uuid that is referenced no where else.
Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

Hi @sander76,
you added the id attribute for all devices a few days before. I'd like to remove this attribute for groups only, because it is just an uuid.
I hope you agree.
BR
Markus

Fine by me.


On making task configuration and task args available to the user without executing

It seems the underlying dpctl API supports dispatching SyclKernel asynchronously and numba_dpex.kernel is a few code lines away of making available to the user tasks that can be fed to SyclQueues and mapped to SyclEvents that embeds a DAG of execution dependencies.
This small test script show how it works, the async_iter function here is five time faster that its sync counterpart.
Would you say that this is a correct take and that it could be interesting to use, would there be a case for exposing corresponding public methods ?

@oleksandr-pavlyk maybe you have insight on this ?

As discussed IRL, this is related to the problem described in:

https://www.iwocl.org/wp-content/uploads/22-presentation-iwocl-syclcon-2022-deb.pdf
https://dl.acm.org/doi/abs/10.1145/3529538.3529990

Based on my understanding we need to make sure that queue.wait() before Python exits. We could achieve with a try / finally in the users' code. Alternatively we could use the Python atexit module to register a callback whenever we use the dpctl queue directly.

If I understand correctly the relevant paragraph is:

A user has to make sure that all tasks, including the host tasks, complete before exiting the script. To do that the user can explicitly wait on the returned events, or wait directly on the used execution queues.

If all what it takes to avoid issues is ensuring a queue.wait() is there really a limitation here ? it doesn't sound unreasonable to expect from users to wait() if it's well documented, and if not expect chaotic behavior. And (apart from brutal terminations like segfaults and sigterms) it's easy to ensure that a wait is issued at shutdown like @ogrisel pointed out (using try/finally, a context-manager, or atexit,...).
I have a doubt about the meaning of the text that follows:

The event-based design for asynchronous execution is needed due to SYCL queues being out-of-order by default. Ordering tasks in such queues requires the use of events. SYCL also support in-order queues, in which the task execution graph is linear and use of events is not needed. In order to support concurrent execution of SYCL kernels by capable hardware, it becomes necessary to use several independent in-order queues built for the same combination of device and context. Synchronizing tasks in different queues, both in-order and out-of-order can be accomplished using the sycl_ext_oneapi_enqueue_barrier extension exposed in dpctl as dpctl.SyclQueue.submit_barrier method.

If I undertand correctly, taking this function as example:

even though in this example there are two independant DAGs, the kernels are in fact going to be executed sequentially, disregarding the device support for concurrent execution, because there's only one queue. (It still might be interesting performance-wise because the dispatching from the python interpreter to the queue will be concurrent to the execution of the dispatched kernels, thus masking the dispatch overhead, but nothing more)
to unlock concurrent execution those two independant DAGs should be inputed using independant  queues
and those queues should have the "in-order" property ?

even though in this example there are two independant DAGs that are submitted to the queue, the kernels are in fact going to be executed sequentially, disregarding the device support for concurrent execution, because there's only one queue.

Is there a way to confirm whether or not numba_dpex/dpctl use an in-order queue in this case? There is no option to use an out-of-order queue with explicit dependencies on the tasks themselves?

@ogrisel sycl queues have an attribute that says if it is in order or not: https://intelpython.github.io/dpctl/latest/docfiles/dpctl/SyclQueue.html#dpctl.SyclQueue.is_in_order

@diptorupd
Hearing about refactoring in https://github.com/IntelPython/numba-dpex/issues/816 I wondered if you also plan to make it easier ? If I understand correctly this feature would unlock the equivalent of cuda streams in numba.cuda and there are various issues that refers to it (e.g. https://github.com/IntelPython/numba-dpex/issues/147 )

@fcharras @ogrisel @oleksandr-pavlyk
The bulk of the internal refactoring that was planned for the kernel API is now in master. PR #1049 is going to remove the support for NumPy arrays as kernel arguments.
Once #1049 is merged, we are free to support returning an event from the kernel submission call. There are certain design questions that should be addressed before that:

How do we ensure the arguments to the kernel are kept alive till the duration of kernel execution. Is it the programmer or the compiler who is responsible?
What happens when the returned event object is not stored in a variable by the user? Should we move the wait call into the SyclEvent destructor?

Thank you for the work @diptorupd
Regarding the design questions here are my thoughts. Those features are interesting for several reasons:

using a custom SyclQueue object rather than letting numba_dpex implicitly decides which SyclQueue a kernel is fed to. This is interesting because different queues can run kernels concurrently.

unlocking the parameters of SyclQueue.submit that are not currently exposed in numba_dpex, currently the only such argument is the dEvents argument, that enable building a computational dependency graph. Then calling a single wait at the end once the graph is registered. This allow kernel execution to run asynchronously with respect to the python interpreter, and it will hide the costs of whatever the python interpreter is doing in the meantime.

and finally, being able to re-use a kernel that has been specialized, with the same inputs, repeatedly, without having to:

query cache every time (the user expects to re-use the same kernel so computing a hash and querying cache should not be needed)
go through validation and unpacking of the inputs every time

The cost of those steps is low but not negligible so it's good if it can be removed once a kernel have been specialized.
To avoid mistakes with cache and input types, I think it's fair to limit the API to specialized kernels. Once a kernel have been specialized there's no reason to probe the cache to call the kernel object later on.
Couldn't it be something as simple as:
# `data_parallel_sum2` will have type `SyclKernel`
@ndpx.kernel([(i64arrty, i64arrty, i64arrty), (f32arrty, f32arrty, f32arrty)], sycl_kernel=True)
def data_parallel_sum2(a, b, c):
    i = ndpx.get_global_id(0)
    c[i] = a[i] + b[i]

a = dpt.ones(1024, dtype=dpt.int64)
b = dpt.ones(1024, dtype=dpt.int64)
c = dpt.zeros(1024, dtype=dpt.int64)

args = data_parallel_sum2.validate_and_unpack(a, b, c)  # needs an utility to manually call input validation once
my_sycl_queue = dpctl.SyclQueue()
my_event = my_sycl_queue.submit(data_parallel_sum2, args, gs=1024, ls=512, dEvent=None)
my_event.wait()

Beside that I think that addressing 1. or 2., by keeping alive inputs as long as a task is not completed, or automatically calling wait on pending events in case of interpreter shutdown (features which probably requires implementing callbacks on task completion), would be dpctl job, and it's fine letting users deal with those issues too if dpctl doesn't provide that, it sounds manageable by users at the python level.
For 1. maybe I fail to see what is at stake here ? Worst case scenario, users could have kernels that read or write arrays that have been de-allocated, and get segfaults (on CPU) or nonsensical results (on GPU). This is already something numba_dpex users will face when writing dpex.kernel kernels anyway, since there's no automated boundaries check on __getitem__ calls in kernels and it seems that gpu kernels can read arbitrary adresses (which if anything is a bit worrying from a security point of view ?).
For 2 I'm not quite sure what is the risk there either ? I've never seen a device task not be cancelled when the interpreter is SIGKILL'd, and for proper termination (SIGTERM) it sounds fine warning the user (with documentation / examples) that he's responsible with calling wait properly (be it in context managers or atexit finalizers...), or else face undefined behavior (maybe segfaults).

@fcharras @ogrisel Asynchronous kernel submission was a feature we have recently added to numba_dpex.experimental.kernel. The user guide and examples still need to be updated, but you can look at the test case: https://github.com/IntelPython/numba-dpex/blob/main/numba_dpex/tests/experimental/test_async_kernel.py for an example on how to use the feature.
We will migrate the feature to our core module once we have tested it out a bit more and few other related changes are also ready to be migrated.

@ZzEeKkAa another one that should be marked as done post #1249

Implemented with https://github.com/IntelPython/numba-dpex/pull/1249 . Usage doc will be provided at https://github.com/IntelPython/numba-dpex/issues/147


Fix unknown device parsing

This fixes #10
Currently tested only on a Netgear WNDR3700v2 with Firmware V<IP_ADDRESS>
@balloob I changed the way of parsing (now splitting at "@" char), as it seems to be the determining char for a attached device in the response. For my router the scheme looks like:
<NewAttachDevice>TOTAL_DEVICES_ATTACHED@DEVICE_#;DEVICE#_IP;DEVICE#_HOSTNAME;DEVICE#_MAC@DEVICE_#;DEVICE#_IP;DEVICE#_HOSTNAME;DEVICE#_MAC</NewAttachDevice>
However, for a router reporting link type and rate a response might look like this:
@4;<IP_ADDRESS>;android-e948fcdcfcf326b;AC:22:0B:AA:AA:AA;wireless;150;72
which rather corresponds to
@DEVICE_#;DEVICE#_IP;DEVICE#_HOSTNAME;DEVICE#_MAC;DEVICE#_LINK-TYPE,DEVICE#_SIGNAL(?),DEVICE#_?
Do you have an Idea what the last two values stand for?
Does DEVICE_# correspond to singnal-strength?
For code-style and linting i tried to follow the HASS guidelines, which is hopefully ok for you.

I no longer have a Netgear router to test this with.
The code looks fine.

From what I can see in your captures, I think the schme for routers with link type/strength is:
@DEVICE_#;IP;HOSTNAME;MAC;LINK-TYPE,LINK-RATE,SIGNAL-STRENGTH

@1;<IP_ADDRESS>;androidda682e3ff4d6b20;10:68:3F:AA:AA:AA;wireless;72;88
@2;<IP_ADDRESS>;odin;C8:9C:DC:AA:AA:AA;wired;;100

Signal Strength does not exceed 100% and is 100% (for all wired devices in your capture).
I'll update the PR accordingly, would be nice if anyone with a different model/firmware could test this as well!

@balloob :eyes:


epic: shades of design system

This PR exists to be able to quickly compare what's on main and what's not + have an easy way to view the storybook with these changes.

Closing this PR since it won't be needed anymore


Add test foer relative urls

cc @jakearchibald  FYI

I think you need to do the same for removed nodes


Fix: default scheme for light mode

Sets the scheme for light mode to default.

As for the third bullet point in the issue, mkdocs.yaml cannot be in docs since mkdocs cannot be run from docs (it must be run from root, where it finds the mkdocs.yaml file and the docs folder). Also, I'm not seeing mkdocs-base.yml, just mkdocs.yaml, is that expected?

hey @rturrado, thanks for reaching out. My 2 cents on this would be:

The distinction between the two files has to do with local and CI/CD setups. For deployment to GitLab/GitHub pages we use Mike. This tool creates versions. However, for local instances, this is highly annoying and you'd much rather have plain mkdocs. With the two file setup you can easily run mkdocs locally and use Mike for pipeline based deployments.
I don't necessarily see the mkdocs file as a polution of the root folder. There are more files in the root that address a specific section (.editorconfig, .markdownlint-cli2.jsonc, .tmuxinator.yml or renovate.json). Of course, we can move it with a plugin. However, I prefer to have less libraries/plugins/dependencies because there would be more risk of breakages. If we upgrade mkdocs at some point, and this plugin is holding us back, do we really want to run that risk? Basically, my question would be; does the file harm (in the broadest sense of the word) anything being in the root. If not, lets just leave it there.

Great, thanks for the quick answer!

Basically, my question would be; does the file harm (in the broadest sense of the word) anything being in the root. If not, lets just leave it there.

No, it doesn't. I just thought it was tidier to be able to have those files within docs.
So, @GuyPuts , in summary:

Let's divide mkdocs.yaml into mkdocs.yaml and mkdocs-base.yaml, as we do for libQASM.
Let's leave those files at the root level, above the docs folder.

@GuyPuts, can we please add the division of the mkdocs.yaml into 2 files to this PR?

Yes of course. Do we want to include Mike in this as well? The mkdocs.yml in LibQASM only contains the following:

extra:
  version:
    provider: mike```

Let's do one thing. Let's keep mkdocs.yaml files as they are for the moment. We can handle this split when we add the GitHub workflows for publishing the docs.

Let's do one thing. Let's keep mkdocs.yaml file as it is for the moment. We can handle this split when we add the GitHub workflows for publishing the docs.

@rturrado alright! I'll remove the contents of mkdocs-base outside of the INHERIT, and I'll merge :)

@rturrado alright! I'll remove the contents of mkdocs-base outside of the INHERIT, and I'll merge :)

No, no. Leave mkdocs.yaml as it was, without an mkdocs-base.yaml.

@rturrado alright! I'll remove the contents of mkdocs-base outside of the INHERIT, and I'll merge :)

No, no. Leave mkdocs.yaml as it was, without an mkdocs-base.yaml.

@rturrado alright!


double free on ARM64

I'm consistently seeing double free errors when using this crate. I am using the channel across threads on ARM64. These errors disappeared when I switched to the oneshot from futures. In my own code, there is very little nearby unsafe.
Will get a minimal reproduction later this week or next.
For now I can provide the context in which I was using this structure:
//! A fixed size resource pool which enables waiting for resources to be returned.

use std::{
    future::Future,
    num::NonZeroUsize,
    ops::{Deref, DerefMut},
    pin::pin,
    task::{ready, Context, Poll},
};

use consume_on_drop::{Consumer, WithConsumer};
use futures_util::{stream::FuturesUnordered, StreamExt};

/// A fixed size pool of resources `T`. This pool can lend a set number of instances
/// of `T`.
///
/// If all of the pool's resources have been lent, the owner of the pool will need to
/// wait for a resource to be returned before another can be lent.
///
/// Lent resources are returned on drop.
pub struct LendingPool<T> {
    pool: FuturesUnordered<RecvOwned<T>>,
}

impl<T: Default> LendingPool<T> {
    /// Create a new lending pool with `cap` instances of `T`, each initialized to
    /// `T::default()`
    pub fn new(cap: NonZeroUsize) -> Self {
        Self::new_with_fn(cap, T::default)
    }
}

impl<T> LendingPool<T> {
    /// Create a new lending pool with `cap` instances of `T`, each initialized to
    /// the value returned by `init`.
    pub fn new_with_fn(cap: NonZeroUsize, mut init: impl FnMut() -> T) -> Self {
        let pool = FuturesUnordered::new();
        for _ in 0..cap.into() {
            let (tx, rx) = multishot::channel();
            pool.push(RecvOwned(Some(rx)));
            tx.send(init());
        }
        Self { pool }
    }

    /// Borrow an instance of T from the pool. If none are available, the caller will
    /// wait until a previously lent instance has been dropped.
    ///
    /// Lent values are not reset in any way when returned, but there is no guarantee
    /// as to which instance will be returned at any particular time.
    ///
    /// For example, you may not assume that values are lent in the same order in which
    /// they were initialized or returned.
    pub async fn borrow(&mut self) -> MustDrop<T> {
        // there should always be at least one future in self.pool when borrow is called.
        // we initialize self.pool with at least one future and after taking from self.pool,
        // should immediately push to it.
        let (mut rx, val) = self.pool.next().await.unwrap();
        // the sender could not have dropped without sending because it is packed into a
        // struct whose drop impl performs that send.
        let val = val.unwrap();
        // the previous sender must have been consumed since the future that produced rx was
        // waiting for its send
        let tx = rx.sender().unwrap();
        // it is fine to push without immediately polling. the multishot structure has no
        // issue completing without access to a Waker.
        self.pool.push(RecvOwned(Some(rx)));
        MustDrop(WithConsumer::new(val, SendingConsumer(tx)))
    }
}

struct RecvOwned<T>(Option<multishot::Receiver<T>>);

impl<T> Unpin for RecvOwned<T> {}

impl<T> Future for RecvOwned<T> {
    type Output = (multishot::Receiver<T>, Result<T, multishot::RecvError>);

    fn poll(mut self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
        let receiver = self.0.as_mut().expect("should not be polled after completion");
        let inner = pin!(receiver.recv());
        let result = ready!(inner.poll(cx));
        Poll::Ready((self.0.take().unwrap(), result))
    }
}

/// Handle to a value borrowed from a [`LendingPool`]. On drop, this value will be
/// returned to that pool.
///
/// **Do not leak this type or hold it for an unbounded amount amount of time.**
#[derive(Debug)]
pub struct MustDrop<T>(WithConsumer<T, SendingConsumer<T>>);

impl<T> Deref for MustDrop<T> {
    type Target = T;

    fn deref(&self) -> &Self::Target {
        &self.0
    }
}

impl<T> DerefMut for MustDrop<T> {
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}

#[derive(Debug)]
struct SendingConsumer<T>(multishot::Sender<T>);

impl<T> Consumer<T> for SendingConsumer<T> {
    fn consume(self, other: T) {
        self.0.send(other)
    }
}

#[cfg(test)]
mod tests {
    use tokio::task::yield_now;

    use super::*;

    #[tokio::test]
    async fn simple() {
        let mut pool = LendingPool::<i32>::new(1.try_into().unwrap());

        let mut a = pool.borrow().await;
        *a = 3;

        let handle = tokio::spawn(async move {
            let b = pool.borrow().await;
            (pool, b)
        });
        for _ in 0..50 {
            yield_now().await;
        }
        assert!(!handle.is_finished());
        drop(a);
        yield_now().await;
        assert!(handle.is_finished());
        let (mut pool, b) = handle.await.unwrap();

        drop(pool.borrow());
        drop(pool.borrow());
        drop(pool.borrow());

        drop(b);

        drop(pool.borrow());
        drop(pool.borrow());
        drop(pool.borrow());

        let _c = pool.borrow().await;
    }
}

The following diff shows my removal of multishot, which solved the problem:
diff --git a/lending_pool/src/lib.rs b/lending_pool/src/lib.rs
index e71f6e8a5b..88218485eb 100644
--- a/lending_pool/src/lib.rs
+++ b/lending_pool/src/lib.rs
@@ -1,15 +1,12 @@
 //! A fixed size resource pool which enables waiting for resources to be returned.

 use std::{
-    future::Future,
     num::NonZeroUsize,
     ops::{Deref, DerefMut},
-    pin::pin,
-    task::{ready, Context, Poll},
 };

 use consume_on_drop::{Consumer, WithConsumer};
-use futures_util::{stream::FuturesUnordered, StreamExt};
+use futures::{channel::oneshot, stream::FuturesUnordered, StreamExt};

 /// A fixed size pool of resources `T`. This pool can lend a set number of instances
 /// of `T`.
@@ -19,7 +16,7 @@ use futures_util::{stream::FuturesUnordered, StreamExt};
 ///
 /// Lent resources are returned on drop.
 pub struct LendingPool<T> {
-    pool: FuturesUnordered<RecvOwned<T>>,
+    pool: FuturesUnordered<oneshot::Receiver<T>>,
 }

 impl<T: Default> LendingPool<T> {
@@ -36,9 +33,9 @@ impl<T> LendingPool<T> {
     pub fn new_with_fn(cap: NonZeroUsize, mut init: impl FnMut() -> T) -> Self {
         let pool = FuturesUnordered::new();
         for _ in 0..cap.into() {
-            let (tx, rx) = multishot::channel();
-            pool.push(RecvOwned(Some(rx)));
-            tx.send(init());
+            let (tx, rx) = oneshot::channel();
+            pool.push(rx);
+            tx.send(init()).ok().unwrap();
         }
         Self { pool }
     }
@@ -55,35 +52,18 @@ impl<T> LendingPool<T> {
         // there should always be at least one future in self.pool when borrow is called.
         // we initialize self.pool with at least one future and after taking from self.pool,
         // should immediately push to it.
-        let (mut rx, val) = self.pool.next().await.unwrap();
+        let val = self.pool.next().await.unwrap();
         // the sender could not have dropped without sending because it is packed into a
         // struct whose drop impl performs that send.
         let val = val.unwrap();
-        // the previous sender must have been consumed since the future that produced rx was
-        // waiting for its send
-        let tx = rx.sender().unwrap();
+        let (tx, rx) = oneshot::channel();
         // it is fine to push without immediately polling. the multishot structure has no
         // issue completing without access to a Waker.
-        self.pool.push(RecvOwned(Some(rx)));
+        self.pool.push(rx);
         MustDrop(WithConsumer::new(val, SendingConsumer(tx)))
     }
 }

-struct RecvOwned<T>(Option<multishot::Receiver<T>>);
-
-impl<T> Unpin for RecvOwned<T> {}
-
-impl<T> Future for RecvOwned<T> {
-    type Output = (multishot::Receiver<T>, Result<T, multishot::RecvError>);
-
-    fn poll(mut self: std::pin::Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
-        let receiver = self.0.as_mut().expect("should not be polled after completion");
-        let inner = pin!(receiver.recv());
-        let result = ready!(inner.poll(cx));
-        Poll::Ready((self.0.take().unwrap(), result))
-    }
-}
-
 /// Handle to a value borrowed from a [`LendingPool`]. On drop, this value will be
 /// returned to that pool.
 ///
@@ -106,11 +86,11 @@ impl<T> DerefMut for MustDrop<T> {
 }

 #[derive(Debug)]
-struct SendingConsumer<T>(multishot::Sender<T>);
+struct SendingConsumer<T>(oneshot::Sender<T>);

 impl<T> Consumer<T> for SendingConsumer<T> {
     fn consume(self, other: T) {
-        self.0.send(other)
+        let _ = self.0.send(other);
     }
 }

Very sorry to dump this on you with very little to go on. Just wanted you to be aware as soon as possible. Again, will get you something better soon. Fairly bandwidth limited this week, so was far more practical to switch structures than give a real go at debugging this.

No problem, thanks for the report, I will take some time to investigate tomorrow and will update this thread within 24 hours.

My lesson here is that I should use non-trivial message types in MIRI tests (such as boxed messages), otherwise MIRI is apparently unable to track the use of uninitialised memory.
I have for now pushed the fix to the fix-uninit-drop branch where I also rewrote the tests so they can catch such issue in the future. If you have the chance to check out this branch, I would be very grateful. I need to head to bed now but will probably make a new release tomorrow and yank the previous versions.

Oops, forgot to commit the changes to the fix-uninit-drop, done now...

@soooch I am back to my computer, so if you have the chance to test the fix within the next 12 hours it would be great. Otherwise I will go ahead with a new release anyway, but I would prefer to be sure that it does correct the problem on your side.
To test the fix, you can just use a git dependency:
[dependencies]
multishot = { git = "https://github.com/asynchronics/multishot.git", branch = "fix-uninit-drop" }

If you don't have the time today then no problem, in any case many thanks again for reporting the issue.

@sbarral that looks to have solved the problem! I no longer see any invalid frees. Super impressed you were able to figure it out from just what I posted.

Perfect, thanks!
I will publish a new version within a couple of hours and will probably yank 0.3.0 and 0.3.1 + maybe file a rustsec advisory.


Enabling dGPU on MacBook Pro

OS: macOS
Issue Descriptions:
After having the app open and listening to some music, a new helper is created, PID:98477, enabling the dGPU in my 2015 MacBook Pro. I am confused as to why it needs the extra horsepower since it sits in the background most of the time.
Steps to Reproduce:
Open app
Start listening to media
15 to 20 mins pass
Helper is initialized
I only know this happens due to the gfxcardstatus app. [https://developer.apple.com/library/content/qa/qa1734/_index.html] Hope this helps.

On all other platforms hardware acceleration is disabled, the issue on macOS is that on newer macbooks you get some really nasty render artifacts (white flashes everywhere) if you don't let it use hardware acceleration.  This unfortunately means that every now and again (even if the app is in the background) it will call on the dGPU for some meaningless task (Chromium plz).  These render issues should be handled in a Chromium update and then we can disable hardware acceleration on all platforms again.
Until then I'm sorry if it launches your dGPU but you really would hate the nasty looking alternative 😆
Gonna close this as a wontfix as it is the lesser of two evils.

On another note I'm pretty sure there is an app somewhere that can stop other apps requesting the dGPU

Fair enough. Thank you for quick reply!


Databases not Syncing

When I run the scan command, it ends without any output at all. I'm trying to replicate two databases in the same host. I tried doing this with two test databases having only one table with two columns. It worked.
I have attached the configuration code below:
RR::Initializer::run do |config|
    config.left = {
    :adapter  => 'postgresql', # or 'mysql'
    :database => '*******',
    :username => 'rubyrep',
    :password => 'rubyrep',
    :host     => '****',
    :encoding => 'utf8',
    :port => '5432'
 }
 config.right = {
    :adapter  => 'postgresql',
    :database => '*******_2',
     :username => 'rubyrep',
     :password => 'rubyrep',
     :host     => '****',
     :encoding => 'utf8',
     :port=>'5432'
 }
 config.options[:sync_conflict_handling] = :left_wins
 config.options[:auto_key_limit] = 3
 config.options[:logged_replication_events] = [
:all_changes
 ]
 config.include_tables /./ # regexp matching all tables in the database'
 config.left[:logger] = "/var/log/rubyrep/rubyrep_left_sql.log"
 config.right[:logger] = "/var/log/rubyrep/rubyrep_right_sql.log"
end

mnm


Test Issue created at Fri, 10 Feb 2023 10:37:12 GMT

Test issue body  Fri, 10 Feb 2023 10:37:12 GMT

Comment on issue at Fri, 10 Feb 2023 10:37:15 GMT


Update BlameableBehavior.php

Added ability to specify default user in BlameableBehavior

what is the use case for this?

When the model changed by application (e.g. cron job) both attributes = null. By means of current property can be avoided of this (Sorry for my english).

why don't you use $value property for this?

too much code

It is not more code:
'value' => function() { return 123; },
vs.
'defaultUserId' => 123,

if ($this->value === null) {
$user = Yii::$app->get('user', false);
return $user && !$user->isGuest ? $user->id : null;
} else {
// there is no verification of the user
// ---------------------------------------------
return call_user_func($this->value, $event);
}


Use a local image

Is it possible to use a local image (manually pulled from navinsider.azurecr.io) ? Or to use an image from this server with username and password login?
Using this commands:
docker login "navinsider.azurecr.io" -u "xyz" -p "abc"
$PSScriptRoot = "D:\Documents\Docker\MyFirstApp"
$mylicense = "D:\license.flf"
$imageName = "navinsider.azurecr.io/dynamics-nav:11.0.21063.0-finnl"
$sourceFolder = Join-Path $PSScriptRoot "Source"
$containerName = Split-Path $PSScriptRoot -Leaf
New-NavContainer -accept_eula                   -alwaysPull -imageName $imageName
-containerName $containerName                  -memoryLimit 3G -auth Windows
-licensefile $mylicense                  -updateHosts
-includeCSide `
-additionalParameters @("--volume ${sourceFolder}:c:\source")
And getting this error:
docker.exe: invalid reference format: repository name must be lowercase.

The above is correct and should work as written.
you can try new-navcontainer -accept_eula -imagename $imagename -containername test
with the above value for imagename - that should just work.
On the error it sounds like you have had a capital letter in the imagename.

It seems something is wrong with -additionalParameters @("--volume ${sourceFolder}:c:\source")
Omitting this line helps. But the question is why.

Do you have a subfolder called Source in the folder from which you are running the script?

I do. I think the problem was the path was too long. I moved everything to a location with a shorter path and now it works.


tests: change ostree boot location for RHEL 8.4

Change BOOT_LOCATION to COMPOSE_URL until GA is released.
This pull request includes:

[ ] adequate testing for the new functionality or fixed issue
[ ] adequate documentation informing people about the change such as

[ ] create a file in news/unreleased directory if this change should be mentioned in the release news
[ ] submit a PR for the guides repository if this PR changed any behavior described there: https://www.osbuild.org/guides/

I think that we should just remove 8.4 from the test suite, I wanted to wait until #1351 is merged but I think we might want to merge the removal earlier.

I think that we should just remove 8.4 from the test suite, I wanted to wait until #1351 is merged but I think we might want to merge the removal earlier.

We still want to at least use it for testing 8.4 RC 1.2 compose qualification...

Then the change should be done in the rhel-8.4.0 branch I think.

I think that we should just remove 8.4 from the test suite, I wanted to wait until #1351 is merged but I think we might want to merge the removal earlier.

Why do you want to remove 8.4 ? Is is because you want to replace with 8.5 or because of other reasons ?

Then the change should be done in the rhel-8.4.0 branch I think.

We aren't (probably) going to release this change immediately but don't we need an approved RHBZ to merge into the branch ?

@henrywang FYI.

Thanks @atodorov. One more question, is COMPOSE_URL defined by CI or ?

Thanks @atodorov. One more question, is COMPOSE_URL defined by CI or ?

$ grep COMPOSE_URL * -R
schutzbot/prepare-rhel-internal.sh:COMPOSE_URL="${COMPOSE_URL:-http://download.devel.redhat.com/rhel-8/nightly/RHEL-8/$COMPOSE_ID}"
schutzbot/prepare-rhel-internal.sh:# in case COMPOSE_URL was defined from the outside refresh COMPOSE_ID file,
schutzbot/prepare-rhel-internal.sh:curl -L "$COMPOSE_URL/COMPOSE_ID" > COMPOSE_ID
schutzbot/prepare-rhel-internal.sh:baseurl=${COMPOSE_URL}/compose/BaseOS/${ARCH}/os
schutzbot/prepare-rhel-internal.sh:baseurl=${COMPOSE_URL}/compose/AppStream/${ARCH}/os
schutzbot/prepare-rhel-internal.sh:            "baseurl": "${COMPOSE_URL}/compose/BaseOS/${ARCH}/os",
schutzbot/prepare-rhel-internal.sh:            "baseurl": "${COMPOSE_URL}/compose/AppStream/${ARCH}/os",
schutzbot/prepare-rhel-internal.sh:            "baseurl": "${COMPOSE_URL}/compose/RT/${ARCH}/os",
schutzbot/prepare-rhel-internal.sh:    "${COMPOSE_URL}/compose/AppStream/${ARCH}/os/Packages/"
test/README.md:flavors (e.g. rel-eng) specify the `COMPOSE_URL` environment variable to point to
test/README.md:!['Define COMPOSE_URL'](./define_compose_url.png)


ADLS read timeouts

This may need passing on to the ADLS Java client team, but I wanted you guys to have a chance to review first as I'm not sure we're on the latest version of the client, etc.
The following stack trace is pretty common when reading many TBs from ADLS, though generally it'll succeed when Spark retries the task. Obviously, random failures such as this will cause stability issues in the long run, as probability says 1 in N jobs will hit the retry limit for sufficiently large N :)
com.microsoft.azure.datalake.store.ADLException: Error reading data from response stream in positioned read() for file <elided>
	at com.microsoft.azure.datalake.store.ADLFileInputStream.readInternal(ADLFileInputStream.java:221)
	at com.microsoft.azure.datalake.store.ADLFileInputStream.readFromService(ADLFileInputStream.java:127)
	at com.microsoft.azure.datalake.store.ADLFileInputStream.read(ADLFileInputStream.java:96)
	at org.apache.hadoop.fs.adl.AdlFsInputStream.read(AdlFsInputStream.java:106)
	at java.io.DataInputStream.readFully(DataInputStream.java:195)
	at org.apache.parquet.hadoop.util.H1SeekableInputStream.readFully(H1SeekableInputStream.java:70)
	at org.apache.parquet.hadoop.ParquetFileReader$ConsecutiveChunkList.readAll(ParquetFileReader.java:1065)
	at org.apache.parquet.hadoop.ParquetFileReader.readNextRowGroup(ParquetFileReader.java:698)
	at org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.checkEndOfRowGroup(VectorizedParquetRecordReader.java:270)
	at org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.nextBatch(VectorizedParquetRecordReader.java:225)
	at org.apache.spark.sql.execution.datasources.parquet.VectorizedParquetRecordReader.nextKeyValue(VectorizedParquetRecordReader.java:137)
	at org.apache.spark.sql.execution.datasources.RecordReaderIterator.hasNext(RecordReaderIterator.scala:39)
	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:105)
	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.nextIterator(FileScanRDD.scala:177)
	at org.apache.spark.sql.execution.datasources.FileScanRDD$$anon$1.hasNext(FileScanRDD.scala:105)
	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.scan_nextBatch$(Unknown Source)
	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.processNext(Unknown Source)
	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$8$$anon$1.hasNext(WholeStageCodegenExec.scala:395)
	at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:438)
	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.processNext(Unknown Source)
	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$8$$anon$1.hasNext(WholeStageCodegenExec.scala:395)
	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.sort_addToSorter$(Unknown Source)
	at org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.processNext(Unknown Source)
	at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
	at org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$8$$anon$1.hasNext(WholeStageCodegenExec.scala:395)
	at org.apache.spark.sql.execution.aggregate.SortAggregateExec$$anonfun$doExecute$1$$anonfun$3.apply(SortAggregateExec.scala:80)
	at org.apache.spark.sql.execution.aggregate.SortAggregateExec$$anonfun$doExecute$1$$anonfun$3.apply(SortAggregateExec.scala:77)
	at org.apache.spark.rdd.RDD$$anonfun$mapPartitionsInternal$1$$anonfun$apply$25.apply(RDD.scala:827)
	at org.apache.spark.rdd.RDD$$anonfun$mapPartitionsInternal$1$$anonfun$apply$25.apply(RDD.scala:827)
	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
	at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
	at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
	at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:323)
	at org.apache.spark.rdd.RDD.iterator(RDD.scala:287)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:96)
	at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:53)
	at org.apache.spark.scheduler.Task.run(Task.scala:108)
	at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:335)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Connection reset
	at java.net.SocketInputStream.read(SocketInputStream.java:210)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
	at sun.security.ssl.InputRecord.read(InputRecord.java:503)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
	at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
	at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:552)
	at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
	at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
	at java.io.FilterInputStream.read(FilterInputStream.java:133)
	at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3393)
	at com.microsoft.azure.datalake.store.ADLFileInputStream.readInternal(ADLFileInputStream.java:212)
	... 43 more

From my digging so far, I can see that ADLFileInputStream is reading from a socket, catches IOException and propagates. There are retries and exponential backoff on submitting the original HTTP request to initiate the read, but once the InputStream has been opened, it seems like the client only gives it one shot then aborts.
Of course, it's tricky to retry at this level, as it would involve keeping track of the position in the stream successfully processed by the client already, but I think it should be doable.
So, arguably an ADLS client bug, but we're not using the latest version by default, so maybe we should update first? If that won't cause dependency hell?

@jaley - spoke with the ADL Client team today. We are working on updating AZTK to work with the latest ADL jars but this requires an update to the underlying version of Hadoop. Hopefully getting off the alpha build will help resolve the issue.


Error for Keras (TF) models

Seems like each of the Keras models need a config.json file.
For e.g.
python -m exporters.coreml --model=keras-io/transformers-qa exported/ works because this model has a config.json but python -m exporters.coreml --model=keras-io/image-captioning exported/ fails with message OSError: keras-io/image-captioning does not appear to have a file named config.json. Checkout 'https://huggingface.co/keras-io/image-captioning/main' for available files.
Is there any workaround or each of the Keras models need a config file for exporter to work?

The exporters tool only works for models from the 🤗 Transformers library. The first model you mentioned is a version of DistilBert from Transformers (has a config.json), but the second model isn't from Transformers (has no config.json).
You still might be able to convert the keras-io/image-captioning model to Core ML but you'll have to write a small script that uses the coremltools library directly.


How to add onEnd event listener

Hi,
Is possible to add some event listener when one sound end?
For example:
this.Signal1 = new Wad({ source: signal_1 });
this,Signal.on('end', ()=> {...})
Thank you.

There isn't an end event, but the play() method returns a promise that resolves when the sound ends.
const signal = new Wad({ source: '/audio/signal.wav' })
signal.play().then(()=>{
    // this function should run when the sound finishes playing
})

There's also an example of this in the docs, using async/await.

HI Rserota.
Thank you very much for you answer and help.
First I did something like this:
signal1.soundSource.onended = function () {
   _this.signal2.play();
};

but your solution with .then(...) is better and more elegant I think.
Can I have one more question, please?
This works quite fine in safari and desktop chromium based browsers (chrome, edge, opera). But there is small issue on Firefox and on android mobile. There is "technical silence" between signal1 and signa2 (when signal1 ended => then => signal2 is played), which I can hear with my ears. Do you have any idea how this issue can be resolve?

I'm not able to reproduce this issue on Firefox. Can you post the actual code you're using, that is causing problems?

Hi Rserota,
thank you for your willingness to look into this issue.
I created very simple example: https://github.com/hajkli/WAD_firefox_test
When you click on button, it plays "Signal 1" then it plays "Signal 2" then "Signal 1" in the infinite loop.
I used the most basic example, only with this kind of signal.  In real production it is much more complex and with much better sound :).
But this "Signal" sound is very good for recording the issue, because it is easy to hear and record the silence between sound segments. It works fine on safari and desktop chrome, but on FF and mobile chrome it works kind of weird. You can hear the "technical silence" between signals.
Thank you.

I tested your example on a few different devices, and in a few different browsers, including the ones you listed. I can't hear any differences on any browser or device. Your issue might be due to quirks of the specific browser or OS version you're using, but I probably can't help you debug that any further.


Align state attributes and context methods

Is your feature request related to a problem?
If you want to access local state in your resolver you have two options:
1
public string Resolver1([LocalState] string key) => ...

2
public string Resolver1(IResolverContext context)
{
    var value = context.GetLocalValue<string>("key");
}

The first thing that bothers me is the different terminology. LocalState vs LocalValue - we should only use one.
The second thing is that they behave differently. The attribute throws an exception if it can't find the key and the context method returns the default value.
This is not cohesive and affects all of the state related APIs.
The solution you'd like
I propose marking the GetXValue methods as obselete and introducing two new methods per state variant, i.e.:
var value = context.GetLocalState<string>("key"); // throws if key does not exist
var value = context.GetLocalStateOrDefault<string>("key"); // returns the default if key does not exist

The main benefits are:

The OrDefault makes the intent clear and should feel familiar to C# developers (LINQ).
[LocalState] and GetLocalState behave exactly the same.
There's probably a lot of code just checking if what GetLocalValue returns is default and then throwing. This would take this responsibility from the user.

To be consistent SetXValue should probably also be deprecated in favor of SetXState.
There's probably not too much code in user land using these context APIs and even if it's a simple rename from GetXValue to GetXStateOrDefault. Same goes for the Hot Chocolate code base - a simple global rename should probably suffice.
Product
Hot Chocolate

It should probably also be called SetGlobalState on the IQueryRequestBuilder instead of SetProperty.

Also is there a use case for SetGlobalState on the IResolverContext? To me it seems like it's never a good idea to set global state from a field / middleware.

to add to the mix:
public string Resolver1([SetScopedState("key")] SetState setKey) => ...

@PascalSenn when would this be useful? If you want to add a resolver argument to the state? I think this is a relatively uncommon case, so sticking with injecting IResolverContext and calling context.SetScopedState should suffice IMO.

public async Task<Customer> GetCustomerByIdAsync(
     [Service] CustomerService serivce,
     IResolverContext context,
     Guid customerId,
     CancellationToken ct)
{
     var customer = await serivce.GetByIdAsync(customerId, ct);
     context.ScopedContextData = context.ScopedContextData.Set("customer", cutomer);
     return customer;
}

vs
public async Task<Customer> GetCustomerByIdAsync(
     [Service] CustomerService serivce,
     [SetScopedState("customer")] SetState setCustomer,
     Guid customerId,
     CancellationToken ct)
{
     var customer = await serivce.GetByIdAsync(customerId, ct);
     setCustomer(cutomer);
     return customer;
}

The second one has a few benefits:
- The user cannot make the mistake to call the scoped context data without reassigning the value (tbh. same thing with SetScopeState)
- The intend is a lot clearer. You do not have to have access to the whole resolver context just to set the scoped context. Firing with a tank on a bird
- The second one would maybe allow for a few execution engine optimizations, as the engine knows that this resolver "just" uses the Scoped state (it also uses a service, which make optimization a lot harder

Ah I misunderstood the intent. I'm not against it now that you've laid out the benefits. It's definitely something that wouldn't come naturally to me as a user, but I think it could also have a real benefit.

I'm not that happy with the name yet. SetScopedState sounds like it's setting something immediately, but in reality we are retrieving a setter (if I understand you correctly). I also don't like that it is not typed.
For me it would be more like:
[ScopedStateSetter("customer")] StateSetter<Customer> setCustomer

Not yet sure how that would translate to an implementation though 😅

Just looked at this.
I agree with changing the name to GetXState and so on ... being consistent here will help with new users. We should mark the old ones obsolete. But we should keep the old ones around for at least another 3 major versions. It does not cost anything to have them but will upset a lot of users if we remove them.
Further, we have GetOrAddXValue which is also quite useful.
Looking through the sources I also found RemoveGlobalValue which we can mark obsolete without replacement.
In general we will keep the name ContextData = GlobalState, ScopedContextData = ScopedState, LocalContextData = LocalState for the dictionaries. In my opinion the cost of also renaming the dictionaries is to high.
I can do a PR tomorrow on this if we all agree.

I agree with not renaming the dictionaries and also keeping the old methods around for a while. :)
If @PascalSenn also agrees I think we can get started on this 🚀

I might be wrong in this assumption, but isn't the ContextData on IRequestContext just the GlobalState of the request? Same for the properties on the IQueryRequestBuilder.
I think there are also too many terms here.
I think we should add Get/SetGlobalState extension methods to the IRequestContext to interact with the ContextData.
I would also like to make AddProperty on the IQueryRequestBuilder obsolete and replace it with SetGlobalState.
I think this will make the whole API more cohesive for users, given my assumption of all of this just being global state is correct of course...


[gui error report] SyntaxError: C:\Users\Administrator.ipfs\config: Unexpected token T in

👉 Please describe what you were doing when this error happened.
Specifications

OS: win32 10.0.19045
IPFS Desktop Version: 0.33.0
Electron Version: 19.1.9
Chrome Version: 102.0.5005.167

Error
SyntaxError: C:\Users\Administrator\.ipfs\config: Unexpected token T in JSON at position 2088
    at JSON.parse (<anonymous>)
    at Object.readFileSync (C:\Program Files\IPFS Desktop\resources\app.asar\node_modules\jsonfile\index.js:52:17)
    at readConfigFile (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\config.js:68:13)
    at checkPorts (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\config.js:332:18)
    at getIpfsd (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\daemon.js:71:16)
    at async startDaemon (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\daemon.js:210:17)
    at async startIpfs (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\index.js:49:17)
    at async setupDaemon (C:\Program Files\IPFS Desktop\resources\app.asar\src\daemon\index.js:116:3)
    at async Promise.all (index 1)
    at async run (C:\Program Files\IPFS Desktop\resources\app.asar\src\index.js:68:5)

I believe there is invalid json in your config file. Can you share your config file contents from C:\Users\Administrator\.ipfs\config?

I believe there is invalid json in your config file. Can you share your config file contents from C:\Users\Administrator\.ipfs\config?

I'm sorry for the no-reply man, this is from a work around account profile.  I had some roadblocks in my normal windows account that were blocking code execution and not notifying me.  I've since got it together, deleted the kubo/webview stuff out of that built in admin account and moved on.  I've got everything running smoothly now.  Sorry again.  :-D


UI bugs with the json editor

first off, we love this extension. It serves our needs perfectly. I am reporting a small UI bug i noticed with the json editor.

There are some non-english characters in the dropdown that switches from tree to text
There are some non-english characters in the breadcrumb after selecting a node

see attached

thanks for your feedback. I use the javascript jsoneditor library. I opened an issue on their github repository : 1342

Fixed in version 2.0.4


book: close iframe tag on global state management page

The MDBook UI doesn't work on the Global State Management page:
https://leptos-rs.github.io/leptos/15_global_state.html
This turned out to be because the iframe tag for the codesandbox embed wasn't closed.
This fixes it.

Thanks!


[$1000] Web - LHN - Concierge displayed as email address for new account

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to staging.new.expensify.com
On log in page put a new username
Click Continue
Go back to your email box and clink on link
Paste link on notepad and add staging to URL
Enter the password
Click Verify account

Expected Result:
Concierge displayed as Concierge name for new account
Actual Result:
Concierge displayed as email address for new account
Workaround:
Unknown
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): any
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

@stephanieelliott can you make an upwork job for this please? :)

Posted to Upwork: https://www.upwork.com/jobs/~01ff02ea9d2d0972d0

^^ DeployBlockerCash label was removed from the linked issue, so no action needed on that.

Issue still occurs waiting for proposals!

2x'd on Upwork! https://www.upwork.com/jobs/~01ff02ea9d2d0972d0

Not sure on refreshing the issue gets resolved.

Verify the first concierge is not created so it's empty.
For the second time, we have a concierge already created so it's available.
When  I create a chat with another user, I can see their details, which were not available on load the first time.
@stitesExpensify Any thoughts could this be the backend?

Hmm it could be backend, I didn't realize that we actually got personal details for it. My first thought was that we should just always check if the name is concierge@ and convert it, but I'm not sure if that's really the best solution. Do you have any thoughts on this @luacmartins

We seem to do that for half check the message has logo set.

This seems to be fixed on staging now @stitesExpensify

Ah this will be a backend issue. @stitesExpensify we check if the user already has a chat with concierge here and create one if needed, but we don't fetch the new personal details for it.

Gotcha, okay. I'll remove the external and help wanted issues, sorry for thinking we could fix this on the front end!

No update

I'm OOO til 10/25, reapplied the label to get a new CME/BZ team member! Thanks @flaviadefaria

I need to catch up to know what needs to be done here. Will try to do that today.

I wasn't able to reproduce this so adding the needs reproduction label.

I'm going to unassign myself to focus on WAQ issues I already have assigned. This is an internal issue as described here

Since this is an internal issue I'll apply the internal label and since @stitesExpensify has been able to reproduce it I'm also adding the demolition label and unassigning myself.

Just double-checked and I should keep myself assigned and switch this back to daily.

Turns out I already fixed this on accident. By making every account have a concierge chat on account creation, we now correctly get the personal details when opening the app. Closing!


NIFI-1563: Federate requests and merge responses from nodes instead o…

Refactoring for the 1.0 baseline that eliminates storage of nodes' stats and bulletins, etc. from NCM and instead replicates the requests to nodes and merges responses inline

Reviewing...

@markap14 Unfortunately, the changeset is too big for me to comment on directly. But in nf-counters-table.js the Ajax request on line 281 does not need to set the nodewise flag to true. We do not currently provide a node by node breakdown of the Counters. When we do offer that, we should add that flag back in.

Also, in nf-cluster-search.js we can delete line 72 and 172. We no longer need to set:
nf.SummaryTable.systemDiagnosticsUrl
Setting the clusterNodeId on the preceding line should be sufficient.

@markap14 Proposed commit for my comments [1]. If this looks good to you, I'll include them in your PR.
[1] https://github.com/mcgilman/nifi/commit/9796e7620cb064653293d8bc0b2293b8b063f3b7

@mcgilman I looked at the commit that you proposed. Looks good! +1. Thanks for jumping in there and fixing that!


feat(plugins): add auto-refetch plugin

Closes #49.
This PR adds a new plugin that enables automatic query refetching when data becomes stale. This provides a simple way to keep data fresh without manual intervention.
Features

Automatically refreshes queries when their staleTime is reached
Can be enabled/disabled globally via plugin options
Can be controlled per-query via autoRefetch option
Cleans up properly when queries are unmounted
Only runs on the client side

Issues and Questions

I am having an issue with one of the tests. To be honest, I am not good with writing tests (this is one of the rare cases where I've written one). So some help would be great!
The refetch timeout is currently set in refresh hook. I also tried fetch but the issue was fetch is not triggered on initial page load but refresh does. So even if the user does nothing regarding the query from initial load, it will be auto-fetched in the background.
To trigger a refresh, I've used queryCache.refresh(entry). I noticed there are also options like fetch, invalidate, and invalidateQueries. I used refresh because I understand it has an internal check on the data to see if it is fresh. I did not want to force it with fetch.
The refetch timeouts are only set on the client. I think this should be the expected behavior, as otherwise the refetch keeps happening on the server, too.

I would love your feedback on this. I am happy to work on this further.

Thanks for the feedback @posva! Sent some commits to refactor based on your comments.

There should also be another test that ensures the timer is reset if a new request is fired before the data becomes stale

Thank you @posva! I've added a new test for this and also accepted & implemented your suggestions. However, two tests are failing:

it automatically refetches when stale time is reached
it resets the stale timer when a new request occurs

In both cases, it seems the query was called one less time than expected. I tried to set stale time to 1ms or advancing time by 10000ms but the number of queries remain the same, so I think something in my tests are wrong but I cannot figure out what exactly. Tried using fetch instead of refresh in the plugin but that also did not work. Would you have any ideas?

All done! The only issue left is the it resets the stale timer when a new request occurs test, which I am not able to pass despite clearing timeouts before scheduling the refetch and at the time of the refetch.


Travis Fails

Travis fails by my last merges, however I am pretty sure these merges are not the reason for this. If you look at the PRs list, you will notice our latest pull requests are always failed with Travis. This log may be meaningful:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.

Do you have any idea about how to accept license agreements?

Interesting, I re-ran the build after @psh submitted the Travis commit hoping it'd fix it, but it doesn't seem to be the case.

Hmmm, seems like it works actually? Build passes now.

The first idea I wrote here (adding explicit acceptance) didn't work, another attempt (adding "android-26") seemed to work. The PR has both.

Cool, thanks. :)

PR #932 fails Travis with the same error - license agreement

We can probably close this issue for now and monitor failures on travis. I will try to make sure that any failures on travis are addressed.

Great, thanks @maskaravivek !

Travis on master fails again :/