Flow doesn't check type in switch when case is a variable

Flow doesn't do any type checking on variable passed as a case in a switch operator.
🔴  Flow reports no errors: expected to have errors on the 2nd and 3rd cases
type Status = 'A' | 'B';
const unsupportedStatus = { c: 'C' };

const process = (status: Status): number => {
 switch (status) {
   case 'A': {
     return 1;
   }
   case unsupportedStatus: {
     return 2;
   }
   case unsupportedStatus.c: {
     return 3;
   }
   default: {
     return 0;
   }
  }
}

Try it
✅  Flow reports an error when directly using a string not in the union type:
type Status = 'A' | 'B';

const process = (status: Status): number => {
 switch (status) {
   case 'A': {
     return 1;
   }
   case 'C': {
     return 2;
   }
   default: {
     return 0;
   }
  }
}

Try it

I have a simpler error case:
From the docs, and confirmed in 0.54.1 (https://flow.org/en/docs/types/objects/#toc-optional-object-type-properties):
// @flow
var obj = { foo: "bar" };
// $ExpectError
obj.bar; // Error! property `bar`. Property not found in object literal

Used in a switch statement:
// @flow
var obj = { foo: "bar" };
switch('abc') {
  // $ExpectError
  case obj.bar: // Should be same error, but is not!
}

Interestingly enough, this minor modification makes flow behave:
// @flow
var obj = { foo: "bar" };
switch('abc') {
  // $ExpectError
  case obj.bar.a: // Error! property `bar`. Property not found in object literal
}

If the second case would validate as expected, it would make the use of constants in switches much more safe.
From my experience, it does not matter what we switch over. In real code, we would switch over a variable, but I hardcoded it here for the sake of simplicity.

Ever find a solution to this? @tvilon @fizker


Update developers.json

Thank you for the website! 🙌

Thank you! 🙌 😁

Thanks for submitting yourself! The Threads API is broken right now, so the directory isn't building. As soon as the outage is over and I can trigger a fresh build, your profile should appear :)

Thanks mate, I was just going to say something was wrong, Maybe some caching solution is needed 🤔


problems variable name shadows / conflicts with struct name

It's in the directive validator: https://github.com/suborbital/atmo/blob/main/directive/directive_validator.go#L16

Could you provide more details? I'd like to take a crack at this

Hi! Thanks for the offer 🙂
Yes, you're right, the variable and the type should not be named the same.

@javorszky Can you review it?


Mini toolbar

What
Create a small size toolbar that can be used in iframes when desired
Why
Closes #159
Preview

Codewise it looks really awesome, only thing I am missing is some documentation on how to include it into an iFrame. Make sure to mention mixed content warnings when serving via HTTP. This helps people set it up properly and make the most out of the small toolbar.

One small thing to think about: I miss the color glow on the small toolbar. It could be smaller than the 50px of the normal toolbar but something like 10-20px would still be nice I guess.

@eXistenZNL brought back the background glow for the small toolbar, plus I've created documentation of embedding the compact mode. Also updated the structure of the docs while I was at it.

Very nice!


Kubeconfig file modified when using Azure OIDC

We have started to use Azure OIDC to authenticate to our clusters. Whenever I execute kube-capacity command for a cluster, it modifies my kubeconfig file and removes a setting (environment: AzurePublicCloud) which makes kubectl not work with the authentication anymore.
Original content of kubeconfig:
...
users:
- name: oidc_user
  user:
    auth-provider:
      config:
        access-token: <TOKEN>
        apiserver-id: <APISERVER ID>
        client-id: <CLIENT ID>
        environment: AzurePublicCloud
        expires-in: "3599"
        expires-on: "1579869933"
        refresh-token: <REFRESH TOKEN>
        tenant-id: <TENANT ID>
      name: azure
...

kubeconfig contents after running kube-capacity:
...
users:
- name: oidc_user
  user:
    auth-provider:
      config:
        access-token: <TOKEN>
        apiserver-id: <APISERVER ID>
        client-id: <CLIENT ID>
        expires-in: "3599"
        expires-on: "1579869933"
        refresh-token: <REFRESH TOKEN>
        tenant-id: <TENANT ID>
      name: azure
...

Same bug seems to be in Stern: https://github.com/wercker/stern/issues/119
A Stern fork seems to have fixed the issue by upgrading to a newer Kubernetes API.

Hey @juhtie01, this should be fixed in 0.4.0, let me know if you run into issues. Thanks!

Works perfectly. Thank you!


Credential provider does not send [valid] User-Agent to AAD when performing auth via ADAL/MSAL

Hey folks,
My org is rolling out some new Conditional Access policies for Azure AD, and the Azure Artifacts provider appears to be causing some unexpected behavior with AAD.
For context, I'm using the credential provider with PowerShellGet/PackageManagement, which appears to be chaining the netcore variant. I'm prompted to do device-code auth as expected, but doing the actual authentication via eSTS yields a conditional-access policy error:

(Contrary to what the error suggests, this is a managed device)
After doing a little digging with another engineer, it looks like the credential provider is sending a blank user agent to AAD when performing device-code auth. This causes AAD to fail OS detection and classify the device as "Other" instead of Windows, which subsequently causes eSTS to block the login per our CA policies.
From what I can tell, enabling MSAL via NUGET_CREDENTIALPROVIDER_MSAL_ENABLED has no effect.
Tampering with the AAD requests via Fiddler and inserting the default user-agent built via NuGetCredentialProvider.Program.UserAgent with an appropriate OS comment (e.g. (Windows NT 10.0; Win64; x64)) appears to work.
I'm not 100% sure if this is a bug with MSAL or the credential provider proper, but given the number of MSAL-backed apps that are otherwise functioning normally in our tenant I doubt it's an MSAL bug.

See internal ICM 224085642

See internal ICM 224085642

@johnterickson Is this the reason why my dotnet restore --interactive call keeps failing to authenticate against our private feed with this error?
C:\Program Files\dotnet\sdk\3.1.405\NuGet.targets(128,5): error : Unable to load the service index for source https://pkgs.dev.azure.com/microsoft/_packaging/Xbox.Streaming/nuget/v3/index.json.
C:\Program Files\dotnet\sdk\3.1.405\NuGet.targets(128,5): error :   Response status code does not indicate success: 401 (Unauthorized).

We have been using the Artifacts Credentials Provider without issues for several months but we started running into this recently out of nowhere. I'm using an AAD joined machine and all coding happens within VS Code, no Visual Studio.

@johnterickson Is this the reason why my dotnet restore --interactive call keeps failing to authenticate against our private feed with this error?
C:\Program Files\dotnet\sdk\3.1.405\NuGet.targets(128,5): error : Unable to load the service index for source https://pkgs.dev.azure.com/microsoft/_packaging/Xbox.Streaming/nuget/v3/index.json.
C:\Program Files\dotnet\sdk\3.1.405\NuGet.targets(128,5): error :   Response status code does not indicate success: 401 (Unauthorized).

We have been using the Artifacts Credentials Provider without issues for several months but we started running into this recently out of nowhere. I'm using an AAD joined machine and all coding happens within VS Code, no Visual Studio.

I am seeing the same behavior as @julioct for internal feeds, any guidance? Also running in VSCode and sometimes even triggering the build from a commandline script. Maybe also worth noting, we are not using the default dotnet build tasks, but rather our own that calls a separate build script.

I am seeing the same behavior as @julioct for internal feeds, any guidance? Also running in VSCode and sometimes even triggering the build from a commandline script. Maybe also worth noting, we are not using the default dotnet build tasks, but rather our own that calls a separate build script.

I'm seeing the same issue. Windows 10, managed device, .NET 5. It's a show-stopper for us trying to set up a private nuget feed in ADO Artifacts so we can share libraries between teams.

@richardtallent the workaround mentioned in this issue seems to have fixed it for us: https://github.com/microsoft/artifacts-credprovider/issues/233
That being said it should have been fixed by now, so unsure if it'll still work if you still run into these symptoms.

Oops sorry, I just noticed I replied to the wrong thread that mentions NUGET_CREDENTIALPROVIDER_MSAL_ENABLED has no effect, my mistake...

@julioct @richardtallent My second-hand understanding is that if you are using the device code flow, then the result authentication will always count as "not a managed device" because you are effectively authenticating a different device.
The best bet is to avoid the the device code flow in the first place.

I'm still getting 401 issues and device code flow problems so I added an item to the Developer Community to try and capture it. I'm not sure if my issue is specifically this one, though I do find NUGET_CREDENTIALPROVIDER_MSAL_ENABLED=true works for me and it doesn't for everyone.


Typo: Missing Semicolon

Bro, I don't know if this is intended to be like this or what but i find this as error..

pH7-Social-Dating-CMS/static/PFBC/ckeditor/ckeditor_php4.php line 240

just add a "; after of $js .= "CKEDITOR.replaceAll( function(textarea, config)
and at line 396 after $_config['on'][$eventName] = '@@function (ev) you forgot to add ';
same at

pH7-Social-Dating-CMS/static/PFBC/ckeditor/ckeditor_php5.php at line 236 and 390

@pH-7 :octocat:

@pH7Software :octocat:

This has been fixed.

https://github.com/pH7Software/pH7-Social-Dating-CMS/commit/32c57706480497898fe33cbc2590144a364d4773
https://github.com/pH7Software/pH7-Social-Dating-CMS/commit/2e87bcfd6c4db2e8421302fb62be1b6e5be320cd


open-variant | does not iterate in folder in versions >= v0.6.17

As the title says.
command
openvar groupby /workspace/projects/intogen_plus/fixdatasets-20220321/intogen-plus/test/pipeline/ -g  "DATASET" --show --header

from v 0.7.5 to v. 0.6.18
it doesn't give any output. It does not iterate in the folder.
v 0.6.17
output:
Traceback (most recent call last):
  File "/home/fbrando/miniconda3/envs/intogenHM/bin/openvar", line 5, in <module>
    from openvariant.commands.openvar import openvar
  File "/home/fbrando/miniconda3/envs/intogenHM/lib/python3.7/site-packages/openvariant/__init__.py", line 4, in <module>
    from openvariant.tasks import cat, count, group_by
  File "/home/fbrando/miniconda3/envs/intogenHM/lib/python3.7/site-packages/openvariant/tasks/__init__.py", line 1, in <module>
    from .cat import cat
  File "/home/fbrando/miniconda3/envs/intogenHM/lib/python3.7/site-packages/openvariant/tasks/cat.py", line 9, in <module>
    from openvariant.find_files.find_files import find_files
ImportError: cannot import name 'find_files' from 'openvariant.find_files.find_files' (/home/fbrando/miniconda3/envs/intogenHM/lib/python3.7/site-packages/openvariant/find_files/find_files.py)

v 0.6.16
The output is the one expected.

I created a pull request with a quick fix (although pretty sure it might break other things) so that David can tackle the issue from there.
If you still want to use the groupby function, a workaround is to specify either the path where the file is located or the path of the file itself.

Thanks Carlos!
The problem is it is the very first step in intogen and we point to a parent folder to reach every dataset.
I solved it by using the v.0.6.16 for now.

I think part of the problem is that open-variants does not iterate in the basepath since the generator _find_files is not properly called at line 86.
As I understood, since it is a generator it needs to be called in a loop, otherwise it would not use the function.
something like:

def findfiles(base_path: str, annotation_path: str or None = None) -> Generator[str, Annotation, None]:
    """Get each file and its proper annotation object.

    Parameters
    ----------
    base_path : srt
        Base path of input folder/file.
    annotation_path : str or None
        Path of annotation file.

    Yields
    -------
    str
        Input file's name.
    Annotation
        The proper schema of each input file.
    """
    annotation, fix = (Annotation(annotation_path), True) if annotation_path is not None else (None, False)
+   for f, a in _find_files(base_path, annotation, fix):
+         yield f, a
-   return _find_files(base_path, annotation, fix)

@dmartmillan

Moreover, I think there is an indentation that shouldn't be there.
In fact, when an annotation path is not present, the else condition in _find_files has inside a for loop that calls the Annotation() . Inside the for loop there is another for loop that call the _scan_files() generator. If I am not mistaken the second for loop should be outside of the first one:
def _find_files(base_path: str, annotation: Annotation or None, fix: bool) -> Generator[str, Annotation, None]:
    """Recursive exploration from a base path distinct if there's a fix annotation or no"""
    if not fix:
        if isfile(base_path):
            annotation_path = dirname(base_path)
        else:
            annotation_path = base_path
        for annotation_file in glob.iglob(join(annotation_path, "*.{}".format(ANNOTATION_EXTENSION))):
            annotation = Annotation(annotation_file)

+       for f, a in _scan_files(base_path, annotation, fix):
+           yield f, a
-            for f, a in _scan_files(base_path, annotation, fix):
-                yield f, a
    else:
        for f, a in _scan_files(base_path, annotation, fix):
            yield f, a


Optimize the api_private_stats endpoints

This changes a little bit the meaning of the stats queries as it considers the time in which a measurement is uploaded instead of the time in which it was run.
I think this is pretty consistent with what we present in the UIs and it's significantly faster to do it this way so I think it's ok.
The performance gain for these queries is in the order of 10-100x.

I did some tests to see how different the numbers are between the old and the new method.

I think the reason for this is that previously we were counting the number of reports in a time period, while now we are counting the number of measurements, hence the count is going to be significantly larger.
Maybe what we can do is preserve the legacy behaviour for the runs, but adjust OONI Explorer to display the measurements in a month instead of the runs.

So I have ended up restoring the behaviour of the runs_by_month endpoints and moved the measurement_by_month count into the global_overview API endpoint.
@sarathms is it hard to change how explorer gets data for the chart on the landing page to get it from /api/_/global_overview (which it's already using for the global stats in the landing page) instead of the /api/_/runs_by_month, /api/_/networks_by_month etc.?

@hellais It is not difficult to use /api/_/global_overview to fetch chart data. The biggest difference is that this call happens on the server side, so it can affect the perceived performance of the page. Specifically, that it might take longer to start rendering the page. Now, we render the page, make the API calls, re-render the section.

The biggest difference is that this call happens on the server side, so it can affect the perceived performance of the page. Specifically, that it might take longer to start rendering the page. Now, we render the page, make the API calls, re-render the section

That is a very good point. I am going to move these into a separate endpoint then, but still as part of a single API call.

but still as part of a single API call

And that should already make it better than what we have now.


Enable creation of a non-default service account for the workload

Currently, pods use either the default service account or, if Vault is enabled, the service account name configured for Vault. However, the chart does not have the ability to create this service account and requires that it has been created externally. In a cluster where workloads are separated by namespace, there would not be a named service account in the namespace to use for Vault. Ideally, I would like the ability for the release to create a named service account for the workload rather than requiring additional setup for the workload on the cluster side.

@jjustinic Isn't the service account created 1 time for the namespace?  Are you asking for the ability to customize the annotation "vault.hashicorp.com/service"?
If you could provide an example of what values.yaml you'd like to include and how that would be reflected in the annotations.
As far as serviceAccount, isn't that created once, for example, when a namespace is created?

I think I can best describe it by referencing what happens in the Vault Helm chart for a complete picture.
When Vault is installed, it creates a couple service accounts in the namespace it is installed in. The first is used by the Vault Agent Injector pod, which is a mutating webhook controller. This service account is granted numerous permissions because it effectively has to add to and modify whatever comes in. Second, another service account is created for the Vault server. This service account only needs to validate other service accounts, so the permissions are limited to the TokenReview API. Effectively, each workload that runs has a different identity / service account that can be assigned only the permissions required. It never uses the default service account for anything and creates one to represent each unique workload.
When I run a workload, such as PingFederate and PingDirectory, I really want the same thing. I don't want to use the default service account and I may want to treat PingFederate pods differently from PingDirectory pods to maintain the principal of least privilege. For the Vault use case, I can authorize those service accounts to the appropriate secrets on Vault independently of any cluster action. What I really want is a unique identity for the workload that is also managed by the Helm chart.
The default behavior when I start using Vault is to use a service account called vault-auth. This avoids not using the default service account for Vault roles, as recommended, but it requires separate management of that service account. I would end up running a kubectl apply with a separate file that's tightly coupled my values.yaml to work around this, which is why I would definitely rather it's just handled by the chart.
The vault-auth service account feels like an odd default actually. When using Helm to install Vault, there is no vault-auth service account. The service account called vault-auth is just called vault. This is the service account that has the permission to call the TokenReview API that is used by the Vault server. So, it feels weird that the default is either to use a service account that has unnecessary permissions and is designed for a different component or for the installation to fail.
I don't really care about the default behavior though. I just want to have a way to configure the chart to be self-contained. This is already true for the other charts I have to install as setup (like the Vault injector itself).

To directly address the question about the service account being created with the namespace:
Yes, the default service account is created when a namespace is created. However, the recommendation is not to elevate the permissions of the default service account and instead use a unique service account for the workload that can be granted only the required permissions. I might have a ping namespace, but could run multiple PingIdentity products in that namespace. I would want the service account used by each one managed by the chart, not speculatively created ahead of time or as a separate process.

@tsigle Added a PR with an example of the functionality desired to help continue the conversation.

@jjustinic Very helpful with your additional comments and your PR.  I'm going to be getting in release 0.4.4 and will look closer at this, and probably get it in.  I'll reply back here to you if I have additional questions.  Thanks a lot!

Thanks for the prompt attention @tsigle. I will note that I didn't really expect for the PR to be immediately production ready. I'm perfectly happy if it doesn't make it into the most imminent release and takes a few extra cycles to get something that ultimately serves more use-cases without introducing any concerns.

We have another request for this. Are we still looking to implement this?
Value on new request is that it can be used for assigning permissions from cloud provider to an SA.

This might not have been the case when this issue was first opened, but currently the basic chart generated from the helm create command does exactly what should be needed for these use cases.
There's probably a couple modifications necessary to make it align with the global vs. specific product merging done in this chart, but you can see how it works. It falls back to the default service account created with the namespace in absence of another value, but generates a relevant name (or allows an override) if it is desired to create one for the specific release. This allows only the necessary permissions to be assigned for the specific workload whether it be for the cloud provider's IAM, Vault access, K8s API access, or anything else.

This is definitely something needed!
At the moment we have to create an extra ServiceAccount with the AWS arn annotation needed and patch the deployments after the helm install. Is an extra step that takes time and can be avoided if we can add it in the helm chart.

In the latest release we've added support for RBAC including generating service accounts. See the release notes - https://helm.pingidentity.com/release-notes/currentRelease/


Refactor: remove d3 selection multi

d3-selection-multi monkey patches d3-selection, this does not work well
with federated modules, since another provider may provide a semver
compatible d3 that is unpacked. This causes issues with jupyterlab in combination with other widgets/extensions that use (and thus can provide) d3.
Related: #1245 #1222
It seems https://github.com/bqplot/bqplot/pull/1222/files#diff-e51a40ac250c9696142466f114f754161e7e5102c0cdb5354548b757deb272f6R89 does not work at all, I may have been lucky in thinking it did before, or this is a regression in some tooling, in any case, we should get rid of this monkey patching library.
Note: there are many more uses of .styles and .attrs, opening this soon to get feedback.

I'm totally in favor of this approach. Besides, d3-selection-multi has been archived and is not maintained anymore.

It seems #1222 (files) does not work at all

Does this mean https://github.com/bqplot/bqplot/releases/tag/0.12.20 is broken on jlab3?

It works when no other federated module provides d3, so by itself bqplot works. It might not work when others are installed.

Thanks! Sorry for not merging earlier!


Fixes in Scheduler.cron()

This PR includes fixes in Scheduler.cron():

added description argument
added some tests
added timeout argument - it includes #114 prepared by @csaba-stylight
result_ttl default to -1 - it includes #115 prepared by @csaba-stylight

Those are not included as it turned out it doesn't make sense (as discussed below):

added result_ttl argument
added ttl argument

Allowing the result_ttl to be set by the caller provides the maximum flexibility, but what is the use case behind it?
Scheduler.cron is meant to be used for periodic tasks. If result_ttl >= 0, the caller must make sure that the job period is small than result_ttl, otherwise the job gets executed only once. At the very least this should be noted in the docstring.
I recommend having -1 as the default value for result_ttl, so that calls like
cron('*/15 * * * *', job_func)
work as expected. With result_ttl=None the job above would get executed only once (because result_ttl=None actually means "use the default result TTL", which is 500 sec).

Won't setting result_ttl=-1 result in keeping all cron results infinitely?

Hm... ok, I think now I get it. We can default to -1 because we always use same job id so it will be just one result kept in redis.

Yes, but for periodic jobs we need that. The Scheduler.schedule does the same thing if interval is set, see https://github.com/ui/rq-scheduler/blob/master/rq_scheduler/scheduler.py#L137.
This all boils down to this: https://github.com/nvie/rq/blob/master/rq/worker.py#L608
The main problem here is, that the job and the job result is the same thing. You want to cancel the job result, you need to cancel the job. rq will problably change this in the future.

Ok, so it does not make any sense to set result_ttl to something different from -1.
Hm... just wondering why we have result_ttl in Scheduler.schedule? Just for the case we do not provide inverval?
What do You think about others ttl and description in case of Scheduler.cron()?

The TTL stuff makes sense when Scheduler.schedule is used to schedule non-periodic jobs. With periodic jobs is like trying to shoot yourself in the foot ;).
Setting TTL values via Scheduler.cron currently doesn't make sense because the bad support for periodic jobs from rq.
As for description: looks fine.

@csaba-stylight: Ok that make sense.
Hm... If You want I can base on Your PR so we could close Yours?

Sure, go ahead.

@csaba-stylight what do You think now? I've included #114 and #115 + added description arguments and some tests...
Do You think we can close #114 and #115 and leave this one open?

Thanks for the PR!

Hello!

added timeout argument

Perhaps worth documenting in readme? Took me a while to find out that this possibility exists.


NC data feature engineering, traintest split, preprocess

We now have a most complete dataset constructed in build_dataset, and our holdout dataset (active_sentences). Both can be found on google drive.
The purpose of this ticket and associated notebook (features_split_preprocess) is to carry out the following:

explore features we already have and create new ones
once that is done, carry out an appropriate train/test/validate split - taking temporal validation into account
pre processing (impute missingness separately for train/test/validate, normalize, etc)

The end goal of features_split_preprocess is to have our final datasets ready for analysis. The code should then be moved into our .py files so the notebook and intermediate datasets can eventually be deleted

Pushed my pipeline.py file, but will likely need to edit/add functions.

Awesome thanks! Where is the file saved / which branch? I couldn't see it, possibly missing something obvious

Ah no, it was a quirk of my laptop - the push never went through but it should be up now.


Set-AzureADMSGroup no longer sets the SPOSite title

Set-AzureADMSGroup used to set the title property for the SPOSite for UnifiedGroup objects when the group name changed.   This is no longer the case. Is this expected behaviour?
Also should probably fill out the placeholders in this doc :)
https://docs.microsoft.com/en-us/powershell/module/azuread/set-azureadmsgroup?view=azureadps-2.0

I noticed that site titles will eventually be consistent with the Unified Group display name.  Others take a few minutes while others take hours.  If you can also comment on a timeframe expectation and whether the site titles will reach eventual consistency, that would be great (related to #1555).

Hi @fredericklin
Thank you for your issue submission. Unfortunately, this appears to be a problem with the cmdlt and a support issue. Issues in this repo are for documentation issues. You can try one of the following links for additional help.
Microsoft Support: https://support.microsoft.com/
Azure AD forums: https://social.technet.microsoft.com/Forums/en-US/home?forum=windowsazureaditpro
Stackoverflow: https://stackoverflow.com/
Bill


update to kubernetes 1.27.4

Hello @kelseyhightower
thank you very much for this project.
In this pull request I updated all components, fixed all broken links, simplified some steps and while I was at it fixed some minutiae. I tested my changed thoroughly on Linux.

This pull request obsoletes at least the following pull requests:

https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/741
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/738
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/736
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/733
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/732
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/731
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/728
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/726
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/719
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/713
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/710
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/708
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/701
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/700
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/699
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/696
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/694
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/693
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/692
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/691
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/690
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/689
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/685
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/683
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/681
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/680
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/678
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/672
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/671
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/665
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/660
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/658
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/651
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/649
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/645
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/641
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/638
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/633
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/624
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/623
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/620
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/619
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/602
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/600
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/593
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/577
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/546
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/545
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/544
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/540
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/535
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/519
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/515
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/508
https://github.com/kelseyhightower/kubernetes-the-hard-way/pull/494

This pull request fixes at least the following issues:

https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/739
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/737
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/718
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/703
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/698
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/687
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/684
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/664
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/662
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/659
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/612
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/611
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/596
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/595
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/585
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/569
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/559
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/537
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/520
https://github.com/kelseyhightower/kubernetes-the-hard-way/issues/497

This PR does work as expected better than main branch.


Bug with ckeditor integration (UploadController.php)

Operating system : Windows 7

Laravel version : Laravel 5.7

CKEDitor version: 4.12.1

Package version : 2.0.0

Steps to reproduce your issue :
Using the "upload tab" from ckeditor doesn't work on a fresh install.
It uploads the file but says there is a problem.

The problem was solved with the following steps:
Step 1
UploadController line 56, change
return $response;
to
return response()->json($response);
see #872
Step 2
UploadController line 51/52, change:
 $response = view(Lfm::PACKAGE_NAME . '::use')
->withFile($this->lfm->setName($new_filename)->url());

to
$response = ['fileName' => $new_filename,
                             'uploaded' => 1,
                             'url'      => $this->lfm->setName($new_filename)->url()];

Step 3
in the html where ckeditor is launched, add the csrf_token (logical, but it wasn't specified in the docs)
filebrowserImageUploadUrl: '/custom_url/upload?type=Images&_token={{ csrf_token() }}',
filebrowserUploadUrl: 'custom_url/upload?type=Files&_token={{ csrf_token() }}'
Thanks !

I think better extend the UploadControler to do this part .
for error part , on line 50
$response = [
'uploaded' => 0,
"error" => [
"message" => $response
]];


There is no basic_winnt_string::starts_with(basic_winnt_string_view)

Closed by https://github.com/DymOK93/KTL/pull/84


CIV-4969 enable citizen ui to download pdf without authentication

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/CIV-4969
Change description
add api path to white list
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[ x] No

reopen for testing


scaleio driver: volumes are not allowed multimap

in a mesos conainerizer environemnt, failover fails as scaleio volumes are not exposed using allowmultimap to the initial sdc

@bottkars There is a configurable parameter for preemption that would cover this here.
There are lots of failure scenarios to cover here.  In the case of a volume being requested for any reason by another host, the pre-emption feature will enable that requesting host to take control of the volume forcefully and remote the access from the existing host.  It sounds like you need to enable this feature to get the functionality you are expecting.  Otherwise the volume must be unmounted properly before it is requested by another host.

ok, will check that. thought preemtion is only doing the OS unmaount, if it also do the disconnect i am fine

Yes it is the whole workflow.
Host 1 owns volume, Host 2 requests it with pre-emption enabled, Host 2 initiates forced detach from Host 1, Host 2 attaches to himself...

Great! Checked into my cookbook and will Test tonite


Barometer Forecast incorrect (due to Domoticz documentation error)

Issue description
Barometer Forecast incorrect (due to Domoticz documentation error)
In temperature_humidity_barometer_sensor.py there is a reference to the incorrect values of the forcast. type 84 subtype 16 has the folowing forecast values. So calculations should get other values.
Forecast: 0 = Heavy Snow, 1 = Snow, 2 = Heavy Rain, 3 = Rain, 4 = Cloudy, 5 = Some Clouds, 6 = Sunny, 7 = Unknown, 8 = Unstable, 9 = Stable
    if (value < 966):
        return 3  # Rain
    elif (value < 993):
        return 4  # Cloudy
    elif (value < 1007):
        return 5  # Some Clouds
    elif (value < 1013):
        return 6  # Sunny
    else:
        return 7  # No Info

Do you know what barometer value should be used for each state?

I put the correct values in the calculation.
To extend with snow: If temp < 1 degree Celsius rain will change in snow.  I checked in the Domoticz source code but could not find good calculations of the other values.

Just for info, found the domoticz source code of the right calculation, but it depends on the pressure change rate. So you will need some extra work to handle this.
https://github.com/domoticz/domoticz/blob/c997900e7c92c62946f600ec863b97fab16fbe61/main/BaroForecastCalculator.cpp
So for the time being the basic calculation as already present in temperature_humidity_barometer_sensor.py is fine it only needs other state id's (as indicated in the first post).
The device type in barometer.py is a different one ( TypeName="Barometer") and there the weathers states are fine.


🐛 BUG: --experimenta-local mode fails with: can't use ".." to break out of starting directory

What version of Wrangler are you using?
2.1.8
What operating system are you using?
Mac
Describe the Bug
When I init a new project with fetch handler and typescript I get the following error (after fixing the compat date issue #1948):
npx wrangler dev --experimental-local

 ⛅ wrangler 2.1.8
-------------------
⎔ Starting an experimental local server...
[NPXI] @miniflare/tre not available locally. Attempting to use npx to install temporarily.
[NPXI] Installing... (npx --prefer-online -y -p @miniflare/tre@latest)
[NPXI] Installed into /Users/iminar/.npm/_npx/760b1d87e1a3d24e/node_modules.
[NPXI] To skip this step in future, run: npm install --save-dev @miniflare/tre@latest
Running the 🦄 Cloudflare Workers Runtime 🦄 natively ⚡...
workerd/jsg/util.c++:375: error: e = kj/filesystem.c++:315: failed: expected parts.size() > 0 [0 > 0]; can't use ".." to break out of starting directory
stack: 104c2cdab 104c28c83 104c28b17 1028bffd7 102a7efab 102b48307 102b57eaf 102b57d7f 10289c72f 1028a260b 1028a4377 102894da3 102894bfb 104c4bf93 104c4c1f3 104c2600f 104c4a4cb 10288c1a3 10786108b; sentryErrorContext = jsgInternalError
service core:user:workerd-test: Uncaught Error: internal error
✘ [ERROR] local worker: MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.

      at #waitForRuntime
  (/Users/iminar/.npm/_npx/760b1d87e1a3d24e/node_modules/@miniflare/tre/dist/src/index.js:4770:13)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async #init
  (/Users/iminar/.npm/_npx/760b1d87e1a3d24e/node_modules/@miniflare/tre/dist/src/index.js:4680:9)
      at async startLocalWorker
  (/Users/iminar/Development/workerd-test/node_modules/wrangler/wrangler-dist/cli.js:144649:9)
  {
    code: 'ERR_RUNTIME_FAILURE',
    cause: undefined
  }

Thank you!


Fixed code style issues in lib/P2p

!WARGNING! This is still a work in progress! Please, don't merge it yet.
Fixed code style issues in lib/P2p folder.
More inforamtion about code style changes can be found in issue #67.

@nnian please, merge this PR once you see that all CI builds are green.


XProNet Model Code and WandB Integration - Ayush - Vijay

What does this PR do?
Summary
We are using the code from the XProNet repository for our model analysis, improvement, and productization.
The PR involved modules and model code as described by the Paper and shell scripts to run the models for various datasets.
New Additions

Environment Yaml file for Conda library
Integrated WandB Logging
Added Code for EfficientNet Support
EfficientNet model shown to perform better

Authors

Ayush
Vijay Kalmath

Looks good, merging the running Xpronet to Main for further dev


Add support for upstream's 'edition' flag

Needs to be merged after https://github.com/laumann/compiletest-rs/pull/181

Now that #183 has superseeded #181, could you perhaps rebase this PR so we can merge it?

@Munksgaard this needs https://github.com/laumann/compiletest-rs/pull/171 first, to make use of the nightly only testsuite for async.

I've gone ahead and merged #171, so with a rebase perhaps we can merge this PR as well?

@Munksgaard yup, I will rebase later today, thanks for the reminder!

@Munksgaard yup, I will rebase later today, thanks for the reminder!

No worries, I only just merged your other PR :grin:

Rebased and added 41ec893 to move the added test to the nightly test suite.

Thanks!


delete expire date isue

there is a bug on expiry date function
after add expire date.if want to remove expire date and enter nothing .return message as invalid date format.

I cannot produce this. Have a look (this is in Ubuntu 18.04 in vmware):

Also if you look at here, it seems that the date format check is done only if the input is not empty:
https://github.com/HirbodBehnam/MTProtoProxyInstaller/blob/466ccc46c34e4788f9319e7b73ebb57e7cd044f6/MTProtoProxyInstall.sh#L416-L426
What operating system are you using?

i use this :  Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-124-generic x86_64)

Are you sure that you are using the latest version of script? There used to be a bug with the thing you said which is patched in<PHONE_NUMBER>2ea05f343868e66d9b38685a6202bd

I'm closing this issue due to inactivity. As I said, I think you are using an older version of script.


[vcpkg] Pass no parallel build command to execute_process when parallel build is disabled

Really run non parallel build when DISABLE_PARALLEL was set

Which triplets are supported/not supported? all

Have you updated the CI baseline? no

Does your PR follow the maintainer guide? yes

This LGTM, thanks for the fix!


[release-4.10] OCPBUGS-4755: Fix amq router race condition: update vendors only

Signed-off-by: Jack Ding<EMAIL_ADDRESS>

/bugzilla refresh


feat: Support changing cluster_by on a new column

Move the cluster_by logic when updating a table to take place after columns are added.
This fixes https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1507
Test Plan
Relying on CI here, don't think we need to update any existing tests
References
N/A

Hey @sfc-gh-swinkler I fixed the PR title so hopefully all good?

this loos good @michael-robbins thanks!


Fop native failures due to pdfbox 3 upgrade

Bug description
Since pdfbox was upgraded from 2.x to 3.x in camel (https://issues.apache.org/jira/browse/CAMEL-19796), some native failures happen. The native profile is disabled until the issue is fixed.
I encountered following error:
2023-08-31T11:20:48.9327060Z Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.apache.fontbox.cff.CFFParser.parse(byte[]). This error is reported at image build time because class org.apache.fop.fonts.truetype.OTFFile is registered for linking at image build time by command line

and (if above one is fixed)
Error: Classes that should be initialized at run time got initialized during image building:
 java.awt.Toolkit the class was requested to be initialized at run time (from feature io.quarkus.runner.Feature.beforeAnalysis with 'java.awt'). To see why java.awt.Toolkit got initialized use --trace-class-initialization=java.awt.Toolkit
java.awt.Rectangle the class was requested to be initialized at run time (from feature io.quarkus.runner.Feature.beforeAnalysis with 'java.awt'). To see why java.awt.Rectangle got initialized use --trace-class-initialization=java.awt.Rectangle

Once issues are fixed, native profile should be restored,

Good morning.
Any news on this issue? @JiriOndrusek @aldettinger @ppalaga?
(Sorry for desturbing, I mentioned the issue assignee and the latest committers : https://quarkus.io/extensions/org.apache.camel.quarkus/camel-quarkus-fop/?tab=community)
Would be nice to have it working again.
Thanks in advance.


Revert breaking changes to mocks (restoreAllMocks, spy changes) since 29.3.0

Summary
A series of commits to jest-mock that landed in Jest 29.4.0-29.4.3 introduced breaking behaviour changes. Per semver, and especially because Jest's multi-package architecture make it difficult to "pin" to an old version, these kind of changes should be held until at least Jest 30.
Changes reverted:

https://github.com/jestjs/jest/pull/13692
https://github.com/jestjs/jest/pull/13866
https://github.com/jestjs/jest/pull/13867

In practice, we found this broke a few things, but the biggest by far was the change to restoreAllMocks such that it became equivalent to calling mockRestore on every mocked function. Note that this contradicts the docs:

Beware that jest.restoreAllMocks() only works for mocks created with jest.spyOn() and properties replaced with jest.replaceProperty(); other mocks will require you to manually restore them.

Mocks created "manually" by assigning jest.fn(), eg const myMock = jest.fn().mockReturnValue('foo') or global.setImmediate = jest.fn(cb => cb()) lost their implementation when restoreAllMocks was called. (Note that they're not really "restored" to any state they had previously, and they're still mocks). In particular this breaks legacy fake timers, and mocks created during setup to emulate an environment (popular for requestAnimationFrame, etc).
(Suggestion: If we do bring these changes back for Jest 30, it'd be great to have a restoreAllSpies() that does what the current restoreAllMocks() does - that'd make the migration much easier)
Related / fixes

https://github.com/jestjs/jest/issues/13925
https://github.com/jestjs/jest/issues/14390
https://github.com/jestjs/jest/issues/13916

https://github.com/jestjs/jest/issues/13229 should be reopened if this is merged
Test plan

Ran this (replacing jest-mock in an otherwise Jest 29.6.2 installation) against ~28k tests at FB, and everything passes that passed in 29.2.1
Preserved the unit tests that were added in the reverted changes, with expectations reflecting the pre-existing behaviour

This PR is somewhat puzzling for me.

perhaps Sapling support should be reverted as well, because that introduction "breaking changes" for Steam Locomotive users? See https://github.com/jestjs/jest/issues/14046

also adding symbol keys support for .toMatchObject() looks like another good revert candidate. It just broken Jest for jsdom users. See: https://github.com/jestjs/jest/issues/14133 and also https://github.com/jestjs/jest/issues/14375

Those aren’t just "our tests are not passing" problems. These are in the level "Jest does not run for us anymore". So would a revert PRs be considered as well?

Yeah, I'd consider those revert candidates. Semver is pretty clear on this:

Major version X (X.y.z | X > 0) MUST be incremented if any backward incompatible changes are introduced to the public API.
https://semver.org/#spec-item-8

As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backward compatibility.
https://semver.org/#what-do-i-do-if-i-accidentally-release-a-backward-incompatible-change-as-a-minor-version

Maybe it'd be worth considering moving development of a major onto branches as soon as a major is cut (eg, any commits that are 29.x candidates are made to a 29.x branch) rather than releasing off main, to avoid this kind of thing?

Thanks for bringing in those lines from Semver spec here. They answered all questions I had.
Somehow I was sure that any bug fix can be released as a patch, but the spec talks about "backward compatible bug fixes" only. That sounds smarter than I was thinking.

I don't really think the steam locomotive case should warrant a revert (even though it's weird Sapling itself doesn't provide an alternative binary) - it's people trolling themselves. But the symbol thing sounds like it probably should be reverted.

IMO, any "backward incompatible changes" is too broad, but it's very good general advice. But if you rely on a bug, and change to its behaviour shouldn't necessarily lead to a new major.
Extreme example, but obligatory: https://xkcd.com/1172/

@mrazauskas would you be up for preparing a PR essentially reverting this one again so we remember to reland for v30?

Thanks both!
Re the restoreAllMocks() change - the biggest break in practice seems to be one that might've been accidental, and isn't clearly beneficial - just wanting to reiterate that in case re-reverting accidentally brings it back :)
https://github.com/jestjs/jest/pull/14429/files#diff-7ae0bd704c3c2789b19abe2bbf94aca3505e2a6b3823d85c7f6b316b216d37c9L1461-L1464
This, and in particular this._mockConfigRegistry = new WeakMap(); makes restoreAllMocks reset non-spies. restoreAllMocks() is explicitly documented to have no effect on non-spies (I'd be in favour of keeping but renaming it in v30).

That's fair - I think we can agree that the docs on this are not unambiguous. The current behaviour does match "no effect on non-spies" though, and has done for a long time. If that's to change, it might be worth considering giving folks an easy migration path.
FWIW, this broke almost every test using restoreAllMocks in the codebase I look after, which represents different developers across different teams over several years - that suggests that actual use in the wild of restoreAllMocks a) may break if it starts resetting non-spies and b) finds its current behaviour useful.


Playground style updates

TODO:

Change "Private Variables" to "All Variables"
Change "Exports" to "Exported Variables"
Maybe, later, show imports in the "All variables" list, as they sort of are variables.


Changed alert-box to use Umbraco styling

This fixes issue #29.

Looking great! Much better than what I had originally. Thank you


[Bug] prevent existing names for blocks and trains

Describe the bug
There is currently nothing that prevents creating a train or block with a name that already exists, this will certainly lead to issues.
Expected behavior
display an error when trying to do this

with #122 we might not strictly need unique names, so maybe this can be deprioritized or closed

closing this due to #122


Add demo of testing with Page Object Pattern and Espresso

Basic examples are good but large test suites need architecture and order to prosper.
A very good pattern is to organize test code and make it reflect the actual user interface with the Page Object Pattern. In a nutshell, the tests contain objects with API to interact and test each view, so test scenarios become independent of testing details like wich button id is pressed to login.
The pattern is explained in these links and examples:

http://martinfowler.com/bliki/PageObject.html
http://docs.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern
https://medium.com/@sebaslogen/the-evolution-journey-of-android-gui-testing-f65005f7ced8
https://realm.io/news/kau-jake-wharton-testing-robots/

These are the API samples, so we won't be adding more layers. There are other samples like android-architecture that would be a better fit for this.

Actually I was not sure on which of the two projects I should open this, I'll move it to the other, thanks!

That said, I don't think it's an issue. It's a nice practice if you need it, but I don't think we would benefit that much from it. Maybe you can prove a point in a PR.


x/tools/go/types/typeutil: gut Hasher

Thinking about https://github.com/golang/go/issues/67161, I wanted to know whether the the new API should include Hasher. It complicates the API because it turns reads (lookups in typeutil.Map) into writes (memoization of hash values). Is it an effective optimization, or does it increase memory contention (and potentially the need for locking)?
I gutted its implementation, removing both memoization maps, and simplifying the implementation of Hasher.hashPtr to just reflect.ValueOf(ptr).Pointer() (which assumes a non-moving GC) and Hasher.hashTypeParam to a hash of t.Index(), making Hasher a stateless empty struct. Then I ran BenchmarkRTA, modified to analyze all of gopls, not just net/http.
The results:
before
200805483 ns/op
203918225
206312775
207155800
209421367
219960417

after
201373042
203830142
204368642
208747200
206170792
208873431

N	min		max		sum		mean		stddev
6	2.00805e+08	2.1996e+08	1.24757e+09	2.07929e+08	6.58822e+06 // before
6	2.01373e+08	2.08873e+08	1.23336e+09	2.05561e+08	2.94797e+06 // after

It is slightly faster and has lower variance. Whatever problems a stateful Hasher once solved, we have no further need for it.
Let's make it an empty struct, and disregard it when considering #67161.
@timothy-king @findleyr

#54670 was accepted. Once it is available, we could use that.

@timothy-king do you mean to use Comparable for hashPtr, rather than relying on a non-moving GC?

@timothy-king do you mean to use Comparable for hashPtr, rather than relying on a non-moving GC?

maphash.Comparable does the same thing as our code (reflect.Value.Pointer). The only difference is that, being std code, it is morally permitted to assume a non-moving GC, but once the updated https://github.com/golang/go/issues/67161 lands, we can use the types.Hash, which will have equal moral license.


Remove commands without code blocks

Which issue does this fix?
Closes #65
Describe the solution
Recursively remove commands that do not have any code block and have no subcommands. Retain root level command with level == 1.

If this recursive pruning of the command tree is an acceptable solution. I can add a few test cases and fix ones that conflict with this change.

@twitu thanks for the PR! I like the solution, it's very clean 👍
If you can add some tests, that would be great.
Also looks like one test is failing, does_not_add_verbose_optional_flag_to_command_with_no_script but we can delete that test as it's no longer needed with this fix.

I have modified two test cases to fit pruning of commands. However there are also three tests in subcommands_test.rs that are failing. I am not sure if these tests are relevant any longer. How to handle them?
Also I have a question regarding additional tests. Should I write tests that simulate user input or ones that simply check the command_tree structure for retained commands? Also which file is the most appropriate place to put these tests?

@twitu this is great! I'll get a new version released soon.

I'll release this after I figure out this https://github.com/jakedeichert/mask/pull/64 👍


IBM Cloud Account Setup Issue

Hello, I cannot proceed to the link of IBM cloud setup. Could you correct the link?

Now it is fixed.


rc/1.1.0

MockDescription now has targetPath as fourth argument.

@rexk I usually have a rule of thumb.
If I have a function that takes more than 3 args, then I see if I can make the third or fourth arg an options object.
Makes it easier to see what the hell a function does when calling it.
MockDescription('MyMock', 'Mock of My own making', mockGenerator, {targetPath: '/path/to/foo'})

This way, if you need to add more and more params/args, you can add them to the opts object. This has the added benefit of giving you context about what the /path/to/foo string does.


Rename IdentifierKeyword into Keyword

I was surprised to see we have the name IdentifierKeyword because
keywords are not identifiers in the compiler/tokenizer APIs that I have
used in the past.
Test plan
See the newly generated protobuf bindings.

Sounds good to me. I think when we did this we were thinking more for syntax highlighting, so we were just adding identifier to a lot of stuff. :shipit:


Don't register folding ranges

Not supported by ST.

It's supported on LSP main but not released yet.


Remove stats span

Stats calls are called quite often and the spans created could flood the logs. This change is removing the spans for stats calls.
The following spans are being removed:
time="2024-11-22T06:19:59.305267800Z" level=info msg=Span duration="708.4µs" endTime="2024-11-22T06:19:59.305976200Z" name=containerd.task.v2.Task.Stats parentSpanID=0000000000000000 spanID=e9bfa06a09bb9548 spanKind=server startTime="2024-11-22T06:19:59.305267800Z" traceID=ddf4f2231ce67194bd833c15a4c73fcf
time="2024-11-22T06:19:59.304139100Z" level=info msg=Span duration=2.1059ms endTime="2024-11-22T06:19:59.306245000Z" name=Stats parentSpanID=30ddb65909c4d7f1 pod-id=83162ca3a00729c49df470140aab6a966c0e2950d4e7267eb488f203ac06cf19 spanID=914dea16815abd59 startTime="2024-11-22T06:19:59.304139100Z" tid=4b2c96383294ae1a2ae8d764fb4518c8b5dbbe1b745da379623aa30f154374ca traceID=a207fe1ca8efe6033aaa7ba74ae4fb5c

@ambarve @helsaawy @kevpar thoughts?

I think it's probably best if span filtering is implemented in the logrus exporter. This would allow us to still get the spans if we use another exporter, such as one where the span volume is not as big of an issue.
I'd also suggest implementing this as a configurable option for which spans to filter. That way it can be set dynamically rather than needing to hardcode it.


Examples are still failing

Great job on 1.0. An hour ago I tested the alpha version that was released and it seemed the onSuccess' weren't called.
Didn't check 1.0 yet but the examples have onSuccess in them but they are currently broken this this issue.

Hmm. Why don't we do this in a codesandbox so we can get things isolated. Would you be willing to set up a reproduction importing 1.0.0?

This sandbox seems to be working fine. Adding a todo is refetching all of the todo lists, which means that onSuccess is getting called. https://codesandbox.io/s/laughing-mclean-i9qel

It was my bad, I accidently pulled in 0.4.3 when I wanted to test the latest alpha version.
Currently integrating 1.0, I will let you know when I come accros any bugs.

Nice :)


[TW#12609] components/driver/spi_master: RX data not delivered in half-duplex mode (IDFGH-3551)

I'm testing the half-duplex mode of the spi_master driver and stumbled upon an issue where RX data is not delivered to the user application.
Test setup
W25Q16 flash chip connected to the ESP32:

SCLK at 19
/CS at 22
MOSI at 23
MISO at 22

Application shall retrieve manufacturer and device IDs. This is done by sending command 0x90 and address 0x000000 (24 bits). The device will return 2 bytes.
Problem description
When using half-duplex mode to first send 4 bytes for command & address and subsequently receive 2 bytes, the received data is always 0x00, 0x00. Even though the LA trace below shows that the flash chip provides 0xef, 0x14 at the correct bit slots.

Example
The following example project exercises 3 transactions with identical MOSI and MISO patterns (checked with LA).

Command and address fields are used to generate 4 bytes on MOSI. 2 bytes on MISO are received in half-duplex mode.
Result OK: 0xef 0x14 reported by the test.
Data buffer is used to generate 6 bytes on MOSI. 6 bytes on MISO are received in full-duplex mode.
Result OK: 0xex 0x14 reported by the test.
Data buffer is used to generate 4 bytes on MOSI, 2 bytes on MISO are received in half-duplex mode.
Result not OK: 0x00 0x00 reported by the test.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "driver/spi_master.h"
#include "soc/gpio_struct.h"
#include "driver/gpio.h"

#define PIN_NUM_MISO 25
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK  19
#define PIN_NUM_CS   22

void app_main()
{
  esp_err_t ret;
  spi_bus_config_t buscfg={
    .miso_io_num=PIN_NUM_MISO,
    .mosi_io_num=PIN_NUM_MOSI,
    .sclk_io_num=PIN_NUM_CLK,
    .quadwp_io_num=-1,
    .quadhd_io_num=-1
  };
  //Initialize the SPI bus
  ret = spi_bus_initialize(HSPI_HOST, &buscfg, 1);
  assert(ret == ESP_OK);

  while (1) {

    {
      // ********************************************************************
      // Test case 1:
      // Use command and address, receive in halfduplex mode.
      //
      spi_device_handle_t dev;
      spi_device_interface_config_t devcfg = {
        .clock_speed_hz = 1000000,
        .mode = 0,
        .spics_io_num = PIN_NUM_CS,
        .queue_size = 1,
        .command_bits = 8,
        .address_bits = 24,
        .flags = SPI_DEVICE_HALFDUPLEX
      };
      //
      ret = spi_bus_add_device(HSPI_HOST, &devcfg, &dev);
      assert(ret == ESP_OK);

      spi_transaction_t trans = {
        .flags = SPI_TRANS_USE_RXDATA,
        .command = 0x90,
        .address = 0x000000,
        .length = 0,
        .rxlength = 2 * 8
      };
      //
      ret = spi_device_transmit(dev, &trans);
      assert(ret == ESP_OK);

      printf("Manufacturer ID: 0x%02x, Device ID: 0x%02x\n", trans.rx_data[0], trans.rx_data[1]);

      spi_bus_remove_device(dev);
      assert(ret == ESP_OK);
    }

    {
      // ********************************************************************
      // Test case 2:
      // Send MOSI with plain data, receive in fullduplex mode.
      //
      spi_device_handle_t dev;
      spi_device_interface_config_t devcfg = {
        .clock_speed_hz = 1000000,
        .mode = 0,
        .spics_io_num = PIN_NUM_CS,
        .queue_size = 1
      };
      //
      ret = spi_bus_add_device(HSPI_HOST, &devcfg, &dev);
      assert(ret == ESP_OK);

      uint8_t tx_data[] = {0x90, 0x00, 0x00, 0x00, 0x00, 0x00};
      uint8_t rx_data[6];
      spi_transaction_t trans = {
        .length = 6 * 8,
        .tx_buffer = tx_data,
        .rx_buffer = rx_data
      };
      //
      ret = spi_device_transmit(dev, &trans);
      assert(ret == ESP_OK);

      printf("Manufacturer ID: 0x%02x, Device ID: 0x%02x\n", rx_data[4], rx_data[5]);

      spi_bus_remove_device(dev);
      assert(ret == ESP_OK);
    }

    {
      // ********************************************************************
      // Test case 3:
      // Send MOSI with plain data, receive in halfduplex mode.
      //
      spi_device_handle_t dev;
      spi_device_interface_config_t devcfg = {
        .clock_speed_hz = 1000000,
        .mode = 0,
        .spics_io_num = PIN_NUM_CS,
        .queue_size = 1,
        .flags = SPI_DEVICE_HALFDUPLEX
      };
      //
      ret = spi_bus_add_device(HSPI_HOST, &devcfg, &dev);
      assert(ret == ESP_OK);

      spi_transaction_t trans = {
        .flags = SPI_TRANS_USE_RXDATA | SPI_TRANS_USE_TXDATA,
        .length = 4 * 8,
        .rxlength = 2 * 8,
        .tx_data = {0x90, 0x00, 0x00, 0x00}
      };
      //
      ret = spi_device_transmit(dev, &trans);
      assert(ret == ESP_OK);

      printf("Manufacturer ID: 0x%02x, Device ID: 0x%02x\n", trans.rx_data[0], trans.rx_data[1]);

      spi_bus_remove_device(dev);
      assert(ret == ESP_OK);
    }

    while (1);
  }
}

Interesting. Will look into this after the weekend, thanks for the clear test case.

Thanks for taking care, Jeroen!
If I remove the while at the end and let the 3 tests run in a loop, then every other iteration fails completely:
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 1
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 1
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 1
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 2
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 2
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 2
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 3
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 3
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 3
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 4
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 4
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 4
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 5
Manufacturer ID: 0xef, Device ID: 0x14     <--- iteration 5
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 5
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 6
Manufacturer ID: 0xef, Device ID: 0x00     <--- iteration 6
Manufacturer ID: 0x00, Device ID: 0x00     <--- iteration 6

I confirm the same problem in half duplex. Logic analyzer does return the correct values but the data is not received in the buffer.
MB85RS512T Fram chip.
Logic Analyzer capture is perfect. Expected four 0x63 bytes as seen.

The data in the routine/code is incorrect. Received two 0x63 and two 0 bytes. Its random at best.

BTW, old library (without spi-slave,etc) does not have this error. Code was not changed when doing this test, except for the printf line.

Regards.
Robert

Hi Spritetm.
Is there a date to look forward to for an update. Im stuck on the previous esp-idf version cause I need the SPI Master but I need the wear-leveling filing system and it only works in version 2.0-2.1.
br

I have a similar problem with the spi master after merging spi-slave support.
My app has multiple spi sensors and only one chip select is asserted with the recent version of idf.  Even for the device of which /cs is correctly asserted, the RX data is broken somewhere.
FYI, all works well again for me if the DMA is disabled when initializing spi:
-    ret=spi_bus_initialize(VSPI_HOST, &buscfg, 1);
+    ret=spi_bus_initialize(VSPI_HOST, &buscfg, 0);

Regards,
kaz

Working on it right now... went down the rabbit hole a bit, though, running into some other kind of bug. Hope to have this figured out and fixed in a few days at max.

Thanks. Ill try disabling DMA and report

Actually it works with dma disabled. Performance would be another issue, but thanks.
br

Also, must not send more than 32 bytes in a transfer, read or write.

Any news?

Hi spritetm,
Any updates on the issue ? are you currently working on this.

I'm afraid there's something wrong and cannot be fixed in a short time.
The issue occurs when DMA is enabled in half-duplex mode and use MISO phase after a MOSI phase.
To quickly get around this issue, you may try one of the following method:

use full-duplex mode instead
disable the DMA by set the last parameter to 0 in bus initialization function just as belows: ret=spi_bus_initialize(VSPI_HOST, &buscfg, 0);
this may forbid you from transmitting and receiving data longer than 32 bytes.
try to use command and address field to replace the MOSI phase. They should be used at the same time, so the TX length is restricted to 1+1 bytes at least and 2+8 bytes at most.

@ginkgm so the fact that this was reported working in earlier versions was just coincidence due to the fact DMA was not enabled for small transfers ?

@negativekelvin no, it was not a coincidence. As you may have seen, the code in IDF v2.0 always use memcpy rather than DMA to get data shorter than 32 bytes, though DMA channel is assigned in the initialization process. That's the difference between IDF 2.1 and earlier version.
We're going to add some warnings and asserts to help users get around the issue temporarily.

I struggled some time trying countless variants of device and transaction settings, but ended up googling, and finding this issue. I think it describes my problem.
I can not find any way to read more than 32 bytes from sram, I am using a command and address fragment  as suggested above, but no useful data is transferred. My logic analyser does show the correct data to be on the bus, but the data does not end up in the (DMA) buffers.
Not being able to read SPI using DMA looks like a serious bug.

@johanvdp
Some fixs for RX DMA is uploaded to the master branch (commit ed1d084aeae and before). Though the RX DMA in half-duplex mode with both MOSI and MISO phase issue will not be solved very soon, the update in IDF already helps some users to solve their problem.
I hope you can have a try and come back if the problem still exists.

@ginkgm I am glad to report the SPI read using DMA now works in my case (I am using both command and address fields, and transfer data in one direction only. I did not test SDI or SQI transfers but assume that these do not work as these transfers are half-duplex by nature.

glad to help you :)

@johanvdp @ginkgm   Please share the spi master and slave code for SPI half duplex using DMA.I need to transfer more than 32 bytes.

The project is not complete, but this part works
https://github.com/johanvdp/net-radio/blob/master/components/mem/spi_mem.c

FYI, I'm seeing problems that seem to be related to this in ESP-IDF v4.0.1 with multiple SPI devices. Specifically, I have one device where I use full-duplex transactions and one where I use half duplex, both on the same SPI bus (hspi or vspi, makes no difference). If I only use the full-duplex device it works great, the moment I perform one transaction on the half duplex device the full-duplex one ceases to receive the results of its transactions (read fails). I see the correct signals in a logic analyzer but the rx buffer is messed-up. Sometimes the first 4 bytes appear, sometimes a prefix is zeroed and then the first 4 bytes, but never do I get the correct data.
Unfortunately I don't have simple test case to publish due to using MicroPython and special C bindings.

esp32c6 全双工仅支持 1bit , QIO使用半双工 总失败...


Assess how to collect insights from the field to generate / monitor KPIs.

Related: #23
In order to improve the service to deliver, we will constantly need to collect feedbacks from users. This means:

Asking feedback
Collecting / stocking insights
Reporting / monitoring KPIs

I think that the rating system will provide good feedback and can act as a KPI.
We can also ask periodically for feedback for both sides of the service (Volunteers and PINs)
The feedback regarding the organizations will be collected now that we have a name/domain and I'll update this issue


How to trigger a build step for branch deletion

I am using buildkite to do Google Protobufs.
Protobuf (repo1) -> lang1-genproto (repo2), lang2-genproto(repo3) ....
When team creates experimental branch in protobut it gets reflected in the genproto repos too.
I am able to handle creation well, but how do I handle branch deletion? I want to trigger a cascading deletion of branches when that happens. So:
Branch del in Protobuf (repo1) -> branch del in lang1-genproto (repo2) .... so on.
If my question is not clear I am happy to share the config files for details.

Hi @snktagarwal, I'm afraid this one slipped through the cracks, mind dropping us an email at<EMAIL_ADDRESS>if you still have questions around this?


Error running on google colab

NameError                                 Traceback (most recent call last)

[<ipython-input-42-77feb2eb4300>](https://localhost:8080/#) in <module>
      1 from transformers import AutoTokenizer, OPTForCausalLM
      2 tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-125m")
----> 3 model = OPTForCausalLM.from_pretrained("facebook/galactica-125m", device_map="auto")

[/usr/local/lib/python3.8/dist-packages/transformers/modeling_utils.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
   2357             init_contexts = [deepspeed.zero.Init(config_dict_or_path=deepspeed_config())] + init_contexts
   2358         elif load_in_8bit or low_cpu_mem_usage:
-> 2359             init_contexts.append(init_empty_weights())
   2360
   2361         with ContextManagers(init_contexts):

NameError: name 'init_empty_weights' is not defined

I've installed the latest version of accelerate and transformers, no other libraries

The same error occurs if I install galai and try to run it like that:
NameError                                 Traceback (most recent call last)

[<ipython-input-45-baaf28fb626d>](https://localhost:8080/#) in <module>
      1 import galai as gal
----> 2 model = gal.load_model("standard")
      3 model.generate("Scaled dot product attention:\n\n\\[")

2 frames

[/usr/local/lib/python3.8/dist-packages/transformers/modeling_utils.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
   2357
   2358                 model = load_flax_checkpoint_in_pytorch_model(model, resolved_archive_file)
-> 2359             except ImportError:
   2360                 logger.error(
   2361                     "Loading a Flax model in PyTorch, requires both PyTorch and Flax to be installed. Please see"

NameError: name 'init_empty_weights' is not defined

Further things I tried were:

Install accelerate<=0.15.0 since I assume the latest release might be causing issues
Set num_gpus=0 since I assumed the colab env not having GPUs might also be the issue

Nevermind, there was a caching issue, accelerate<=0.15.0 installed before transformers (not 100% sure this is needed but the other way around didn't seem to work) fixed this for me. Will make a PR just in case, feel free to drop it if you don't think it's appropriate. I have my hack and I can move froward with it.


Curriculum update needed on project_sign_up_form.md

The Odin's file, project_sign_up_form.md is updated. Please update the Kampus' file, checkout file here project_sign_up_form.md
Latest commits:

Remove words intermediate html css (additions: 1, deletions: 1) on Feb 10 2024, 07:27 UTC

New commits have been made to the Odin's file. Please update the Kampus' file.
Latest commits:

Fix signup form tips (#27688) (additions: 1, deletions: 1) on Mar 26 2024, 01:27 UTC
Forms & Intro to Grid: Corrected the link and provided more accessible, descriptive links (#27843) (additions: 1, deletions: 1) on Apr 23 2024, 14:35 UTC

New commits have been made to the Odin's file. Please update the Kampus' file.
Latest commits:

Sign-up Form: Reword last item to discourage JS form validation + linting (#28056) (additions: 12, deletions: 10) on May 26 2024, 13:27 UTC


Update Dockerfile's gcloud and helm versions

There are some security patches for helm and such that I think make sense and I recall there are some clear recommendations to not use helm versions older than 2.15.
For the gcloud bump I'm not sure what has happened since and it just felt like a good idea to not have it quite outdated. I can imagine this could cause some breaking change but I have not tested anything about it.

This is great, tyvm @consideRatio!


[FEATURE] New bind system

Make a better bind system add the ability to bind two keys; for example: (LSHIFT + D) and make it possible to bind MOUSE5 and MOUSE4 i.e. the side mouse buttons

I want this

i still cant bind with mouse side buttons :sob:

i still cant bind with mouse side buttons 😭

if it hasn't been done yet, you can use a spoofer to spoof your mouse buttons as a keyboard button you don't use much


Fix request tests

Hi there, here are two small fixes

Not setting content type in test_put_single_without_content_type
test_get_accepting_multiple_content_types is testing multiple accept types, suggest to rename it.

@shunwen Thanks!


[feature] wildcard per type

Unless I've missed something, I don't think it's supported:
It would be great to handle wildcard middlewares as in graphql-shield.

@syffs, I agree! I'll try to find some time to implement this. It worked great so far with graphql-shield. If you find some time, I'd love to merge a PR!

+1 on this

Any update on this feature? It's a time saver using Shield, would be great to have for custom middleware.


land_detector

when  simulating in gazebo,I set AUTOLAND mode,and the iris lands on a static car or a block instead of ground.But why will the iris takeoff automatically? why cannot the iris stay on the car  or a block steadily?

Can you share a log or a screenshot of what you mean?

Closed because there was no follow up.


Load historic data giving unique constraint violated: Table(DB_COMMERCIALMEASURES)

Thanks for contributing to this project. I followed the instructions and successfully set up all apps running. However, I get a unique constraint error when I try to do a historical load.

Hi @rvr2020 ,
Thank you for reaching out. This shouldn't happen, but to explore the cause, I'd like to know the following:

Is this a new installation or did you try to 'upgrade' from a version 1.x deployment? (this is not supported)
Do you have more than 1 global account connected (default is 1)
Is this a pure BTPEA/CPEA account, or is it a mixed Subscription/Consumption global account?

You can reach me on teams or via email to resolve as well (willem.pardaens-at-sap.com)

After investigation the issue was due to a change in naming from SAP side where the name "PostgreSQL, hyperscaler option" changed over time to "PostgreSQL, Hyperscaler Option" (with capitals) and instances with both naming versions were active in the account. A fix will be published. Thank you for your feedback.


Multi image fixes

Misc. multi-image related build fixes:
Add an IMAGE prefix to new targets that have been introduced and ensure that variables are initialized before de-referenced.
This fixes the build issues with nrf91ns+userspace.

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

@mbolivar : Review needed

Sorry to have been late to review.
The commit sauce should have been [nrf noup], not [noup].
Where is the corresponding west.yml change in the nrf repository?

There is no corresponding west.yml change, I figured I'd get this in first.
I'll do a manifest change PR now.


[Feature]: SGX2 enarxcalls

Is there an existing issue for this?

[X] I have searched the existing issues

Description

TrimSgxPages(addr, length)
RemoveSgxPages(addr, length)
ResetSgxPermissions(addr, length)

More information:
https://github.com/enarx/enarx/issues/1531
Acceptance Criteria
No response
Suggestions for a technical implementation
No response

@rvolosatovs these will also need probably that fallible passthrough.

Because there are so many, should the calls be prefixed with Sgx instead, and perhaps also existing ones?

Because there are so many, should the calls be prefixed with Sgx instead, and perhaps also existing ones?

I think it's fine as-is, but it probably does not matter much. What do we get by using the prefix?

To be scheduled for the 0.5 release.

Because there are so many, should the calls be prefixed with Sgx instead, and perhaps also existing ones?

I think it's fine as-is, but it probably does not matter much. What do we gain by using the prefix?

Prefixes are a bit easier to grep from logs.


I thought this issie https://github.com/spyder-ide/spyder/issues/13822 should be fixed in 4.2. But it's not? what's the point of updating??

Issue Report Checklist

[ ] Searched the issues page for similar reports
[ ] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[ ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[ ] Tried basic troubleshooting (if a bug/error)

[ ] Restarted Spyder
[ ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[ ] Tried the other applicable steps from the Troubleshooting Guide

[ ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
issue https://github.com/spyder-ide/spyder/issues/13822 is not fixed in 4.2
What steps reproduce the problem?

What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

Spyder version:
Python version:
Qt version:
PyQt version:
Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

Hey @yomoko, thanks for reporting. That issue is already fixed but it'll be part of our 4.2.1 version, to be released in a month.
Thanks for your patience.


Fix issue #30

Fixes issue #30

Codecov Report

Merging #40 (5d0d3d6) into master (3dbbf54) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #40   +/-   ##
=========================================
  Coverage     72.15%   72.15%
  Complexity      399      399
=========================================
  Files            70       70
  Lines          1232     1232
  Branches        125      125
=========================================
  Hits            889      889
  Misses          311      311
  Partials         32       32

Continue to review full report at Codecov.

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


Selection history navigation with Alt+[ and Alt+] keys should filter out empty selections

filters empty selections made by select tool  before adding in the selection history

!build

@0SlowPoke0 @0HyperCube can you both please confirm that my simplification commit c362e26f97b4d21f40bbcf5e05b47dd126d2a81d is indeed equivalent? I don't understand why it was so complicated before, and I'm pretty sure the changes I made are correct, but I'm asking to make sure I didn't miss any subtleties that explained why the previous code was so complicated.

!build

This PR breaks the editor (unable to draw more shapes, unable to select layers, etc.) after you've drawn the first shape.

!build

@Keavon  I think this solves the issue can you please review the build, thanks.

Superseded by #2138


chore: update tooling packages to the latest versions

Configurations are updated to accommodate for breaking changes.

@devoto13 is this still a work in progress?

@jginsburgn It is ready, but CI is not running because travis-ci.org was shut down recently. I wonder if we should migrate to travis-ci.com? Or maybe migrate from both Travis and AppVeyour to GitHub Actions to have a single CI system for all platforms. What do you think?

My suggestion would be to use GitHub Actions for both Windows and Linux.

I think that the effort to migrate to circle-ci.com would be much less than to do it to another platform. I will take a look at this soon :)


Issue with sending messages, getting repeated 401.

Using Python/Pip 3 in Linux Ubuntu.

I have installed all required dependencies and tried changing the post URL. All I get is 401.
Thank you.

same issue on windows bash (don't mind my cmd text color)

Seems like an invalid token.

Does this look like correct notation?

'username:password,token'

Got it, I don't read documentation apologies.


draft: remove support for style property in favor of named style override properties

The Problem
As we've written more components and begun to test them in client applications, it's become clear that supporting node.style in our components isn't maintainable. This PR explores the removing support for the generic style property in favor of providing specific style properties that can override the styles that would also be provided by themes. I've updated the Badge as an example of how this would work, open to any feedback on this setup
Changes

removes the style property from BadgeProps
removes all references to props.style in the component markup
BadgeProps is updated to an intersection of BadgeProps and BadgeStyleProperties
the styles defined in BadgeStyleProperties are explicitly mapped to the relevant property in the component

ex. props.iconColor is assigned to Badge.Icon.color

Testing

import the Badge into an application(or storybook), ensure the style properties work as expected
ensure components render as expected in storybook

one issue with this approach is one-off state-based styling - state can only be styled via the style object. so if, for example, a user wanted to hide a menu when it's not focused they'd need to do this via a component config, or by updating the component's alpha based on state changes. This entirely defeats the purpose of the state styling system

we're going to have to entirely revisit the current implementation, closing this


export accounts to use in geth

This might be a really newbie question but I have problems importing the acconts generated by pyethapp to geth. Is there a procedure for that?

I copied the keystores from ~/Library/Application Support/pyethapp to ~/Library/Ethereum/keystore but it can't see the files, I guess it indexes the addresses somewhere else too, and the only difference between geth generated address and pyethapp ones are the filenames (geth adds timestamp at the beginning of the filename)

somehow after generating a new address with geth, it could identify the other addresses.
cp keystore/* ~/Library/Ethereum/keystore/

but still can't unlock the imported addresses:
could not unlock signer account
    at InvalidResponse (<anonymous>:-60926:-175)
    at send (<anonymous>:-124886:-175)
    at sendTransaction (<anonymous>:-113803:-175)
    at <anonymous>:1:1

You have to rename the file to follow geth's naming convention (UTC--<timestamp>--<address>). UTC--0--<address> should work.
If this does not help, could you check the password in geth's console with personal.unlockAccount? This would print a more helpful error message.

changing the name worked. thanks


UP-4790:  (master branch) Cache entries that establish a user's group affiliations ar…

…e not invalidated when that user authenticates
https://issues.jasig.org/browse/UP-4790

Checklist

[x] the individual contributor license agreement is signed
[x] commit message follows commit guidelines

Description of change

We have some use cases that involve passing parameters to the login process that drive user attributes and (in turn) group affiliations.  We are having trouble because group affiliations are very aggressively cached.
In other words, your attributes may be different from one authentication to the next, but the changes are ignored as far as calculating you group affiliations... because the group affiliations are not recalculated (they are taken from cache).
Just like the layout DOM and a few other items in the portal, we need to remove the cache elements that tie you to groups whenever you authenticate.

Coverage decreased (-0.03%) to 23.006% when pulling 6d6da59f0b125feeb7e7b650011d278045729165 on drewwills:UP-4790 into 9a9bd804a07642372b3eab9754815c153ee85501 on Jasig:master.

Coverage decreased (-0.02%) to 23.007% when pulling e2fe4318fbb2765593b3445cd4f4727cc98c3838 on drewwills:UP-4790 into 9a9bd804a07642372b3eab9754815c153ee85501 on Jasig:master.

Folks -- I tidied up several things from the conversation so far.


"Could not connect to R session on RStudio server" error

Followed all steps on an iMAC M1 and get this error message after launching localhost etc. in Safari or Chrome.
Any idea what's wrong?
Best,
Nicolaus

Hi Nicolaus,
Please share:

More details of what worked preceding this. Do you see the RStudio screen when you visit localhost:4120?

A full screenshot when you see this message, for context.

And any other information to help me replicate your situation.
Thanks

Closing due to lack of reply. Please reopen if I can be of assistance.


TerraFirmaCraft Food Compatibility for MetaItems

Allows for MetaItem food to give hunger and saturation as usual with TerraFirmaCraft installed, as well as have nutrition and heating properties.
This is done through the ITFCFoodComponent interface, which gives TFC's CapabilityFood to ItemStacks with this component. Implementations of this are expected to include a call to player.getFoodStats().addStats(null, stack) within their onFoodEaten() overrides, so that TFC can access the capability.
Add-ons (such as my own GTFO) will have to either implement this interface, or extend its default implementation, TFCFoodComponent, when creating their own FoodStats.

Sorry to get back so late; I think an IMC setup would probably work much better (especially given how it's hard to make a PR here every time I want to update nutrition stats for GTFO items). I'll try my hand at putting in the IMC myself.


Font has excessive gaps between characters

Additional details
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-

;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!

;; Personal default keybindings
(map!
 :leader
 "SPC" #'counsel-M-x
 "p l" #'projectile-switch-project
 "w w" #'ace-window
 "w n" #'evil-window-next
 "w p" #'evil-window-previous
 "g s" #'magit-stage-file
 "g S" #'magit-stage-modified
 "g p" #'magit-pull
 "g P" #'magit-push
 "p /" #'+ivy/project-search
 "TAB TAB" #'indent-rigidly
 )

;; Handle window splitting and size
;; REF: https://www.reddit.com/r/emacs/comments/a7wsp6/resize_frame_when_creating_new_windows/
; Set default frame size
(setq default-window-width 99) ; space included for fci-mode rule, ultimately comes to 79 characters, the PEP8 default
(when window-system (set-frame-size (selected-frame) default-window-width 48))

; Resize frame when opening new windows hor1izontally
(defun delete-other-windows-and-resize ()
  "delete and reset width"
  (interactive)
  (when window-system
    (progn (set-frame-width (selected-frame) default-window-width)
           (delete-other-windows))))

(defun delete-window-and-resize ()
  "delete this window and reset width"
  (interactive)
  (when window-system
    (progn (delete-window)
           (set-frame-width (selected-frame)
                            (- (frame-width) default-window-width 1))
           (balance-windows))))

(defun split-window-right-and-resize ()
  "split and increase width"
  (interactive)
  (when window-system
    (progn (set-frame-width (selected-frame)
			     (+ (frame-width) default-window-width 1))
	    (split-window-right)
	    (balance-windows))))

(map!
 :leader
 "w d" #'delete-window-and-resize
 "w f" #'delete-other-windows-and-resize
 "w \"" #'split-window-right-and-resize
 "w %" #'split-window-vertically)

;; ivy edit mode made easier
;; TODO: Fix this, it hangs for some reason
(defun ivy-edit ()
  "Runs ivy-occur then ivy wgrep at the same time"
  (interactive)
  (progn (ivy-occur)
         (ivy-wgrep-change-to-wgrep-mode)))

(map!
 :leader
 "/ /" #'+ivy/project-search
 )

(after! ivy
  (define-key ivy-minibuffer-map (kbd "C-c e") 'ivy-edit)
  (define-key ivy-minibuffer-map (kbd "C-c o") 'ivy-occur)
  (define-key ivy-minibuffer-map (kbd "C-c q") 'ivy-wgrep-change-to-wgrep-mode)
)

;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets.
(setq user-full-name "Ryan Peach"
      user-mail-address<EMAIL_ADDRESS>
;; Doom exposes five (optional) variables for controlling fonts in Doom. Here
;; are the three important ones:
;;
;; + `doom-font'
;; + `doom-variable-pitch-font'
;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for
;;   presentations or streaming.
 You generally only need these two:
(setq doom-font (font-spec :family "monospace" :size 14 :average-width 8 :space-width 8 :max-width 8))

;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one)

;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")

;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type "relative")

;; Here are some additional functions/macros that could help you configure Doom:
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;;   this file. Emacs searches the `load-path' when you load packages with
;;   `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c g k').
;; This will open documentation for it, including demos of how they are used.
;;
;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how
;; they are implemented.

I tried this
(setq doom-font (font-spec :family "monospace" :size 14 :average-width 8 :space-width 8 :max-width 8))

and it didn't do anything.
My describe-font screens are in the imgur.
Surprisingly, if there is a bug in this code (like i put in a syntax error), doom goes back to default and everything is fine text wise.

This is a common issue. monospace is not the name of a font. It's the name of a family of fonts, and by selecting it, your OS will use the first valid font in that family. What font does it select? That's entirely up to your local fontconfig settings and what fonts you have installed.
The problem is that whatever font it's choosing is either broken, corrupt, incompatible, or not actually a monospaced font (i.e. fontconfig couldn't find a valid fonts in the monospace family, so it fell back to another unknown family).
TL;DR: Either:

Change your doom-font to an specific font,
(setq doom-font (font-spec :family "Fira Code" :size 14))

Remove the (setq doom-font ...) statement entirely and let your system choose a font for you.

Fix your fontconfig configuration. There's a decent line up of common issues and example configuration in this entry of the Arch wiki.

As this is not a Doom issue I will close this, but feel free to follow up here.


Update to Build & Release - Targets [netstandard2.0, netstandard2.1, net9.0]

You will need to revert your last two commits to sync for merge!
I have corrected the CI/CD and the build targets.
NOTE
I use self-hosted runners w/ latest compiler version and windows patches.
In addition to this, I have custom build.props & build.targets locally which automate all my projects, including auto-generating the README file!
I have taken much of what you had to put into the README_Body.md.
The header gets pre-pended with MSBuild automatically, including building the NuGet packages for release.
-Enjoy!

Hi,
Thank you for your interest in contributing to this project. However, I noticed that your fork has changed the license from Apache License 2.0 to MIT, and the original attribution to the project has been removed. Additionally, I see that donations are being collected without crediting the original work.
As this project is licensed under Apache License 2.0, it's crucial to adhere to the following terms:

The original Apache 2.0 license must be retained.
Proper attribution to the original authors (myself included) must be given.
Any changes made to the original project should be clearly noted.
Since this pull request does not comply with these requirements, I will decline this PR.

I kindly ask that you:

Restore the Apache License 2.0 in your fork.
Provide proper attribution to the original project and authors.
Remove the donations link, as it pertains to work that I originally created.
If these conditions cannot be met, I ask that you consider removing the forked repository. Please feel free to reach out if you have any questions or need assistance.

Thank you for your understanding.


[SharedCache] Fix handling of relative selectors in macOS shared caches

Find the relative selector base address in the Objective-C optimization data pointed to by the shared cache header, rather than via __objc_scoffs. That section is only present on iOS, and not for every iOS version that encodes selectors via direct offsets.
This also includes some related improvements:

Direct selectors get their own pointer type so they're rendered correctly in the view.
Method lists encoded as lists of lists are now handled.
The dyld_cache_header type added to the view is truncated to the length of the header in the loaded cache. This ensures it is correctly applied to the view.
A couple of methods that process method IMPs and selectors are updated to check whether the address is valid before attempting to process them. They would otherwise fail by throwing an exception if they proceed. Checking for validity is quicker and makes exception breakpoints usable for investigating incorrect behavior.

Additionally, SharedCache now tracks whether non-image regions are data vs code. This means it can avoid marking some regions as containing code when they don't, reducing the amount of analysis work that has to be done.

This requires the fixes from https://github.com/Vector35/binaryninja-api/pull/6172. Without those fixes a lot of the class / method data isn't handled correctly.

thank you for the PR, I'll be looking at getting this merged today.

This is currently being stalled by an issue happening "at some point" during de-serialization that results in an uncaught exception when re-opening a bndb.
The relevant part of traceback is here:
Terminating with uncaught exception
Here's a stack trace (hopefully):
0   libc++abi.dylib                     0x000000018d61fa9c _ZSt11__terminatePFvvE + 16
1   libc++abi.dylib                     0x000000018d622a48 __cxa_get_exception_ptr + 0
2   libc++abi.dylib                     0x000000018d6229f4 _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
3   libsharedcache.dylib                0x000000010bd18b48 _ZN2VM15AddressIsMappedEy + 0
4   libsharedcache.dylib                0x000000010bd08a74 BNDSCViewGetAllImages + 388
5   libsharedcacheui.dylib              0x000000011d9c27fc _ZN14SharedCacheAPI11SharedCache9GetImagesEv + 48
6   libsharedcacheui.dylib              0x000000011d9da658 _ZN9QtPrivate15QCallableObjectIZN13DSCTriageViewC1EP7QWidgetN11BinaryNinja3RefINS4_10BinaryViewEEEE4$_15NS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb + 144
7   QtCore                              0x00000001052de008 _Z10doActivateILb0EEvP7QObjectiPPv + 1332

It is not immediately clear to me what could trigger this issue and there doesn't appear to be a codepath between BNDSCViewGetAllImages and _ZN2VM15AddressIsMappedEy at a brief glance.
This could be the result of an improperly resolved merge conflict, and I'll be able to investigate it more deeply tomorrow.

The backtrace is probably misleading because of the failed exception throw. I'd guess VM::MappingAtAddress is throwing MappingReadException. It's immediately prior to AddressIsMapped in the source.
I think this can happen with the problem mentioned at https://github.com/Vector35/binaryninja-api/pull/6192#discussion_r1863798667. If the 64-bit fields of dyld_cache_mapping_info are (correctly) serialized as 64-bit integers but (incorrectly) deserialized as 32-bit integers, they'll be truncated on load and result in bogus addresses.

I rebased this PR onto dev. I've confirmed it analyzes a shared cache and can save and then re-open the analysis database.