Global evolver instance at the app layer

Currently, we have:
# evolver.app.main

app = FastAPI()
evolver = Evolver()

This won't work when running the app from uvicorn using multiple workers, they'll each get their own copy that won't be the same instance. It's possible that this may not matter, however, I expect that multiple serial connections will not work. Oh, and the main loop def won't work as desired.
For the app on the box, we probably don't want to run with multiple workers anyhow.
Running the app elsewhere though, should still be ok as this would have to go indirectly using the web app connection rather than the serial connection.
From my understanding either way, the more correct FastAPI way to do this, is to stash it in app, though I'm not yet sure of what happens there.
# evolver.app.main

app = FastAPI()
app.evolver = Evolver()

I agree that there is no case for running multiple workers, there should only be a single evolver (manager) process due to both the serial and control functionality to not conflict.
I don't quite understand the latter part. What would be the reason the evolver instance should be stored in a property of the app? I doubt that property would ever end up being something used in fastapi internals (but could, I suppose), also wondering what problems it would solve?

Global scope just isn't sufficient here, for example, if evolver.app.main.evolver was ever nullified (for whatever reason), from evolver.app.main import evolver wouldn't work as this refs the state of evolver at import time, not when it was updated (nullified) as it's not a pointer.
A more obvious scenario is that addressed in #76  where it's more correct to instantiate the instance of evolver in the startup event, in which case it's not even present at import time.
It also just makes it easier to assign to rather than having to do something like globals()["evolver"] = ... from path funcs in evolver.app.main.

See https://github.com/ssec-jhu/evolver-ng/pull/73#discussion_r1619464865

I see now what is going on here. I think the correct location is under app.state (e.g. app.state.evolver), which is a starlette State datastructure (https://github.com/encode/starlette/blob/master/starlette/datastructures.py#L680) and is meant for arbitrary app/request state. This way it avoids potential to conflict with app internals


Feature/336 upgrade to veramo

upgraded all packages

upgraded tsconfig.json and bundler to be ready for pure ESM imports
upgraded to use latest @tonomy/tonomy-id-sdk interface. See https://github.com/Tonomy-Foundation/Tonomy-ID-SDK/pull/396
removed use of @tonomy/did-... packages to use the DIF packages directly
fixed breaking changes and type errors

install veramo pre-requisits that did not already exist according to https://veramo.io/docs/react_native_tutorials/react_native_1_setup_identifiers
migrated to new eslint config format
removed irrelevant testAntelopeDid()
upgraded to use pure corepack enable yarn binary

closed in favour of https://github.com/Tonomy-Foundation/Tonomy-ID/pull/1055


Issues compiling on slc6 against ROOT 6.10/04

Hi,
I'm having troubles compiling RooUnfold (trunk) against ROOT 6.10/04 on a SLC6 machine. First of all, the makefile looks for a (blabla)/test/Makefile.arch file but it seems located under (blabla)/etc/Makefile.arch . But that's an easy fix. However, the compilation stops because of an incompatibility with the class TBuffer. Is there a known workaround, or can you fix it?
Cheers,
Riccardo
Compiling /home/disipio/local/src/RooUnfold-1.1.1/src/RooUnfold.cxx
/home/disipio/local/src/RooUnfold-1.1.1/src/RooUnfold.cxx: In member function 'virtual void RooUnfold::Streamer(TBuffer&)':
/home/disipio/local/src/RooUnfold-1.1.1/src/RooUnfold.cxx:969:11: error: invalid use of incomplete type 'class TBuffer'
   if (R__b.IsReading()) {
           ^
In file included from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/include/TObject.h:17:0,
                 from /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/include/TNamed.h:25,
                 from /home/disipio/local/src/RooUnfold-1.1.1/src/RooUnfold.h:15,
                 from /home/disipio/local/src/RooUnfold-1.1.1/src/RooUnfold.cxx:65:
/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/root/6.10.04-x86_64-slc6-gcc62-opt/include/Rtypes.h:38:7: note: forward declaration of 'class TBuffer'
 class TBuffer;
       ^~~~~~~
make: *** [/home/disipio/local/src/RooUnfold-1.1.1/tmp/linuxx8664gcc/obj/RooUnfold.o] Error 1

Same issue for me also.


WIP - new api

Here is where I'm headed with the new api thoughts from https://github.com/quantopian/alphalens/pull/110 so to review creating a tear sheet would be a two step process.

format the data
call for the tear sheet

where all of the tear sheets take a factor_data dataframe that looks something like

Right now the main blocking issue is the event-study-esque plots as that function requires raw prices. I think that the number of plots and the uniqueness of what they are saying probably merits them getting a separate tear sheet (which would be able to take raw prices).

This looks like a great start. Did you start from recent master? Seems like there are conflicts.

Your changes look good to me. I agree with you that the event-study-esque plots could go in a separate tear sheet. Still dropping prices after the initial data formatting process means we are losing information and it might become a problem for the development of future features. But this is just a minor issue and It might not be a problem at all, I just wanted to highlight this.
A side note regarding the data, we are probably not following the tidy data guidelines you mentioned in #110 (thanks for the article, that was interesting). But we can fix it later on I guess, if we really want to do it.

@luca-s Which part of tidy data are we missing? The fact that the forward returns periods should actually be a hierarchical index?

My understanding is that the forward returns periods should not be columns headers but rather values in a  dedicated column. So we would have only two columns for the forward returns: a column whose values are the number of periods (1, 5, 10 or whatever) and another column with the forward return values for each periods.

yes, except that your first column should also be an index, I think. Btw. now is the time to think about this.

@twiecki I opened the branch last Friday so I think I'm about 5 commits behind.
Luca I'm not so sure, the author defines a value as

Value: The actual measurement or attribute. 152 cm, 80 kg, female, etc.

The number of periods are not a measured attribute of the factor, they are part of the measurement process of forward returns. So I'd argue that they should be incorporated into the column header.

@jameschristopher it seems to me the example of the 'Income" column really matches our use case. Also I believe the number of periods should be a column because I have already faced the problem of needing the number of periods as a parameter and I ended up reading it from the column name. That cannot be tidy data :) If you think about it, we don't have that information in our DataFrame expect for the column names. Maybe those are weak points but I just wanted to make them clear anyway so we can take the best decision.

Those are weak points. That is an excellent point and something I've also thought about. A common issue that I ran into with this PR is getting the forward returns columns over and over again. You can see in the code that I use a regex to do this - not so elegant.

I think it should definitely be an index-level (or column, but it's not really data, it's an identifier). Not separate columns as it is now.

Thomas can you provide an illustration of what you mean? Something like this?

@jameschristopher exactly like that.

yes as would 'group' and 'quantile'

After some more thought I'd like to submit a multilevel column as the approach we should take

I think that's the best solution so far. @luca-s do you agree?

That's fine with me. We have already had the chance to discuss all the relevant points, so I certainly trust James choice if he thinks that's the best way to go. Let's go with that then.

Did you remove the hierarchical column again?

But I think otherwise this looks great. @luca-s can you take a quick look too?

Sure, I will.

Great work, I like the new api.
I only have few comments:
1 - 'quantile_factor.max()'  (used to fetch the number of quantiles/bins) should be replaced with 'int(quantile_factor.max())' because quantiles/bins values might be float, depending on quantiles/bins arguments and that would break the code.
2 - We don't have quantile statistics anymore. I found them very useful when using non default quantiles/bins arguments.

3 - Could you please add the call to 'create_event_returns_tear_sheet' in the 'predictive_vs_non-predictive_factor' NB? As the purpose of that NB is to show what to expect in each plot in the cases of  predictive and non-predicvive fators it would be useful to have all the plots there.
4- I miss to have mean return and event style return plots side by side, but there is no much we can do about it.

I noticed another little issue at here. When calling util.quantize_factor it is possible that some of the factor values are dropped, depending on the quantiles/bins arguments. This is a feature, as it could be useful to drop top/bottom values as a measure to remove outliers. So we don't want to keep factor entries whose values are NaN, this means a second call to
merged_data = merged_data.dropna() is required after calling util.quantize_factor

Yes Thomas the hierarchical columns weren't workable.
If there are no further comments I'd like to merge this PR, wait a week to see what bugs come up, fix those bugs and push an official release v0.1 to PyPi.

This was not an easy one -- thanks @jameschristopher and @luca-s!

thanks @jameschristopher


Replace str.format() and string concatenation in samples with f-string

In PR https://github.com/googleapis/python-retail/pull/160, there is a review comment requesting to replace all str.format() or string concatenation in samples with an f-string. I'm going to track this as a separate work item because it affects all retail samples. See https://github.com/googleapis/python-retail/pull/160#discussion_r812097695

@tetiana-karasova Please could you take a look?

I will fix this


Organize code into a more accessible API

There's a lot of stuff I'd like to be able to contribute to the bot- I have some really good ideas about how to improve decision making, but the code is frankly a mess.
Could you spend a bit of time on refactoring the bot codebase and providing thorough documentation for the functionality present?  There should be a lot you can do to reduce coupling and provide a clear interface to functions that supply data about the bot's environment.

+1!!!

+2

There's already an API. I just didn't write any documentation for it.

The code could still be a lot better organized.

There's an API - no documentation yet. Possible duplicate of #99.

@ErmiyaEskandary Having an API != having source code that's clear enough to grok and contribute to with sufficient ease.

Never said it was. Just said there is an API but no documentation* That's why I didn't close #99 as it's valid.

@zsck open an issue for the suggestions and ideas you have. We will surely take them into  account.


Is it possible to refresh WaveSurfer on toggling DOM existence of the container element?

Hello!
I am using the awesome package wavesurfer.js to display waves of audio files in a table. The expandable rows that show the waves are added and removed from the DOM. So the container for the WaveSurfer instance is removed from the DOM, not hidden with css.
Is there a way to "refresh" the WaveSurfer waves after the container (with the same id, of course) is in the DOM again?
I don't want to download the file twice by just creating a new WaveSurfer instance and loading the file again and putting it in the new container.
See this codepen for what I mean exactly.

With a little change, I think I was able to achieve what you are looking to do.
Idk if you can see the changes I made in the codepen but here's what I did:

Riiight! If I get it right, I need to keep the instantiation to the element out of the toggle function, so it references the original. And we can append the original element to the DOM again. Makes sense since we pass objects by reference in JS.
Thank you a lot for your help.

Not a problem!
Please go ahead and close this issue if no further discussion is required.


AWS::IAM::Policy supported?

The docs provide a list of the resource-based policies, but no identity-based policies are listed.  Is the AWS::IAM::Policy resource supported?
For example, with this template
arameters:
  policyName:
    Type: String
    Default: example-policy
  groupName:
    Type: String
    Default: example-group
Resources:
  cfnPolicy:
    Type: 'AWS::IAM::Policy'
    Properties:
      PolicyName: !Join [ '-', [ !Ref groupName, !Ref policyName ] ]
      PolicyDocument:
        Version: "2012-10-16"
        Statement:
          - Effect: Allow
            Action:
              - 'cloudformation:Describe*'
              - 'cloudformation:List*'
              - 'cloudformation:Get*'
            Resource: '*'
      Groups:
        - !Ref groupName

the version number in the policydocument is wrong, but it is not identified as a problem
$ cfn-policy-validator parse \
        --template-path policy-example.yaml \
        --region us-east-1 \
        --parameters policyName=sample-policy groupName=all-users --enable-logging
2022-06-28 22:22:03,543 - cfn-policy-validator - INFO - Parsing template policy-example.yaml
2022-06-28 22:22:04,559 - cfn-policy-validator - INFO - Parsing resource type AWS::IAM::Policy with logical name cfnPolicy..
{
    "Region": "us-east-1",
    "Account": "XXXXXXXXXXX",
    "Partition": "aws",
    "Roles": [],
    "PermissionSets": [],
    "Users": [],
    "Groups": [],
    "Resources": [],
    "OrphanedPolicies": []
}

$ cfn-policy-validator validate \
        --template-path policy-example.yaml \
        --region us-east-1 \
        --parameters policyName=sample-policy groupName=all-users --enable-logging
2022-06-28 22:22:24,330 - cfn-policy-validator - INFO - Validating template policy-example.yaml
2022-06-28 22:22:25,303 - cfn-policy-validator - INFO - Parsing resource type AWS::IAM::Policy with logical name cfnPolicy..
{
    "BlockingFindings": [],
    "NonBlockingFindings": []
}

is this the expected behavior for this example?

All of the CloudFormation resources that allow you to create identity-based policies should be supported, yes.
It looks like this is a bug that appears when the resource that the inline policy is attached to (AWS::IAM::Policy) is in a separate CloudFormation template.  I'll go ahead and get this fixed.
Thank you for opening the issue!

Pushed release v0.0.15 to fix this issue.  Thank you for reporting and let me know if this did not resolve your problem.


Broken Link

Broken Link
The PWA Features link in the Adobe PhoneGap section in the document is broken.

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

ID: b0871c51-df56-1e27-b56b-cbc902bdc5ae
Version Independent ID: c108f0e5-dd13-c10b-8376-6289b0e64519
Content: PWA approach to Android development on Windows
Content Source: hub/android/pwa.md
Product: dev-environment
Technology: windows-android
GitHub Login: @mattwojo
Microsoft Alias: mattwoj

Interesting! Thanks for filing this issue @sercansebetci -- it looks like Adobe is ending their support of PhoneGap: https://blog.phonegap.com/update-for-customers-using-phonegap-and-phonegap-build-cc701c77502c
I'll update this section to reflect the change. Thanks again!

Interesting! Thanks for filing this issue @sercansebetci -- it looks like Adobe is ending their support of PhoneGap: https://blog.phonegap.com/update-for-customers-using-phonegap-and-phonegap-build-cc701c77502c
I'll update this section to reflect the change. Thanks again!

Just filed a PR to reflect the discontinuation of PhoneGap support in this doc: https://github.com/MicrosoftDocs/windows-uwp-pr/pull/1248

Just filed a PR to reflect the discontinuation of PhoneGap support in this doc: https://github.com/MicrosoftDocs/windows-uwp-pr/pull/1248

I opened a new thread on this issue. Thank you for your interest.

I opened a new thread on this issue. Thank you for your interest.


Presence of default value for an object property should not imply required.

According to the json schema specification, the default keyword is a meta-data annotation for "documentation and user interface display purposes" ^1. The schema reference states that "...default is typically used to express that if a value is missing, then the value is semantically the same as if the value was present with the default value." ^2
Based on this, I would expect that the default value would be entirely ignored by this library, as it is a purely semantic marker which tells users that an undefined value will be treated by the tool as if it were the given value, but there is no requirement that processing tools substitute undefined for the default value.
Given the following schema definition this library correctly produces an object where foo is required but bar is optional.
type test = FromSchema<{
    type: "object",
    additionalProperties: false,
    required: ["foo"],
    properties: {
        foo: { type: "string" },
        bar: { type: "string" }
    }
}>;

type test = {
    bar?: string | undefined;
    foo: string;
}

If we alter bar to include a default value, the resulting type no longer accepts undefined as a valid value, despite it still being an allowed value per the spec.
type test = FromSchema<{
    type: "object",
    additionalProperties: false,
    required: ["foo"],
    properties: {
        foo: { type: "string" },
        bar: { type: "string", default: "abcd" }
    }
}>;

type test = {
    foo: string;
    bar: string;
}

It depends on the perspective. If you have an API request following this schema and you then use the data, it will be present. If you are on the other side and you need to fulfil a given API spec (JSON schema), then it sould be optional.

While APIs are permitted to apply default values to incoming or outgoing requests, it is not mandated by the specification and APIs are free to send or omit default values. Unless you pass your incoming or outgoing data through some kind of function to apply default values, it is not safe to assume that a value will ever be defined just because it has a default field.

@nhollander-alert Good point. There's already a keepDefaultedPropertiesOptional option to revert this, but the default is false.
I could reverse it and rename it requireDefaultedProperties. That would be a breaking change but there's not been any breaking change for a while so I'm actually fine with it.


⚠ Samsung has degraded performance

In 8b6e49c, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 3602 ms

Resolved: Samsung performance has improved in c9a08af.


scipy.special.wofz and np.float128

scipy.special.wofz generates an error when given an input array of type np.float128.
Reproducing code example:

import numpy as np
from scipy.special import wofz

x1 = np.linspace(100, 200, 352, dtype=np.float64)
wofz(x1)
print('ok')

x2 = np.linspace(100, 200, 352, dtype=np.float128)
wofz(x2)
print('ok2')

Output:

ok
Traceback (most recent call last):
  File "test.py", line 9, in <module>
    wofz(x2)
TypeError: ufunc 'wofz' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Scipy/Numpy/Python version information:

1.1.0 1.15.4 sys.version_info(major=3, minor=7, micro=1, releaselevel='final', serial=0)

Unfortunately the issue is pretty much what it says--we don't have an implementation of wofz for np.float128. (Most of our implementations are double-precision only.) Creating one would likely be a large undertaking too (and there's all the annoyance around np.float128 meaning different things on different platforms), so it's unlikely to happen.

One notes that a previous PR adding long double implementations for different functions was not met with enthusiasm: https://github.com/scipy/scipy/pull/8079, so it's not clear that it's something we even want to support.

Yeah, I'd prefer not to support float128. We could cast them to float64, but perhaps an error is just clearer - then the user knows what precision they get, and casting by hand is not a big burden

Closing as a won't do.


Start working on the Versionable option.

Just defined the Versionable option, then the goal will be.

Draftable - Versionable as already implemented where we can Save / Publish the new draft version.

Not Draftable - Versionable as already implemented where we can only Publish the temporary draft.

Not Draftable - Not Versionable. Here we will update directly the latest published item without creating a new draft (so no new version). Here i think we can keep Publish for the only one button because, even the item is already published, we are still "publishing" new data.

Draftable and Not Versionable. Here we would need to save a draft as before.
a) Then when publishing a draft, as proposed by Sebastien, we could hard delete the previous published version. Here we would need to know (in the shared EditPost()) we are in the context of a Publish.
b) When editing and publishing an already published item, we could do as for 3. but here also we would need to know we are in the context of a Publish action.
Not sure it's good to create then hard delete versions, so one suggestion would be to only implement b). Then, if you only use Publish you will not create versions, only if you Save and Publish a draft. Here we still need to know we are in the context of a Publish action or create 2 EditPost().
So, let me know if it is worth to implement b), or just implement a), or maybe just not implement 4.

Question: can we safely hard delete a version in O2?
Best.

Looks simple, I like it ;)
Can you add a few unit tests to it? I'd like to help too, I think this is very important for this component. I also want to add some on how content items are updated using Apply, Alter and anything dealing with parts in general as this is different than in O1 and since I also refactored it last month.
The tests should use YesSql directly to ensure the content items documents are correctly saved in the db, not more and not less. We should also have tests for the events to ensure that they are called in the correct order, which will also let us document which ones are called based on each event in the UI or in the API.

Ok for the tests but i would need some directions.
But, to finish with the implementation, still one question related to the last problematic option.
Draftable and Not Versionable (as implemented in the last commit but not yet tested)

When editing and publishing an already published item, no new version is created. Here, in the shared EditPost() i needed a new publishPost parameter to know if we are doing a Publish action.

When editing and publishing a draft, we hard delete the previous published version. Here, in PublishAsync(), i needed a new versionable parameter, this to hard delete the previous version.

So, please review how the previous published item is hard deleted. If it's not good to do this, we could just implement 1. Then versions would be created but only when publishing a draft.
Best.

Looking at the hard delete, it seems complicated ... I will try it to see if I can understand why.

For me too, that's why i was asking for, so for infos.

We don't need the hard delete for the Not Draftable and Not Versionable option because we create a draft version only once which is directly published. Then we always act on this published item.

We would need it just for the Draftable and Not Versionable option because here we can save a new draft version, and you said that when we publish it we have to delete the previous published item.

So, one suggestion with this last option is to do the same as 1 when we publish an item which is already published. But doing the same as before when a new draft has been saved and then published.
So, with this suggestion we still have new versions but only when saving and then publishing a draft. Otherwise we need to delete this version at some point, e.g when we publish another draft.
Or maybe just implement Not Draftable and Not Versionable, but not Draftable and Not Versionable.

It works but from the beginning i think it's not so good to hard delete versions.
So, for the Not Draftable and Not Versionable no problem. Then with Draftable and Not Versionable where you still can save drafts which create versions, i think i have a better solution.
Here, the only one problem is when you edit the latest which is published and you save it as a draft, so a new version is create. We would need to query and use the "latest but not published" version, but through the content manager you can only get the latest (which is published or not).
But just realize that i can try to get the previous version number related to the currently published version, then use it if it exists otherwise create a new version as before.
I'll try it this way and if ok i will describe and commit this solution.

@sebastienros
So, i needed to fix other issues (see #537) i've integrated here (while it is not merged).

Then, for the last problematic Draftable and not Versionable option, i've implemented in the controller the 2 cases which only happen with this option, this without any hard delete.

You can still create a version but only if through the admin list you Unpublish an item. So, when editing and publishing a draft, we can't re-use an existing published version which doesn't exist anymore.

The above can be easily fixed with a little more code to get another existing version. Let me know.

Otherwise seems to work but needs more tests.
Best.

I have an error when I edit a Content Type without any fields (I try to check Versionnable), in Orchard.ContentTypes\Services\ContentDefinitionService, method AlterPartFieldsOrder line 336 because fieldNames is null

Oh yes i know, i fixed it in a separate PR #526.
Here, would need to rebase on the last master.
Thanks for trying it.

Rebase done on the last master.

Can I say that I don't think there is any simple solution, and the whole idea to decide if a content item can be versioned or not is more complicated than what we had thought?
And looking at the changes necessary I would prefer to have a module that would remove old versions based on retention settings. Thoughts?

@sebastienros
Working on this, i was about to opt to a simpler solution because i also don't like to switch the latest version.
So, in the much simpler solution not Versionable would mean that no new version is created but only when publishing an already published item. But as soon as you save a draft, a new version is created.
This is how it was 1st implemented before having to implement not Versionable but also Draftable.
Then it would be the same through the API.
Best.

@sebastienros

Just remember that it was already compatible with the API because in the controller we use the versionable option (from type settings) only to choose the version on which data will be updated.

Changes in DefaultContentManager and DefaultContentManagerSession is only to improve things when we query the latest. They are independent of the versionable option, can be considered separately.

So, maybe already ok but in the last commit i propose a much simpler solution but where.

not Versionable means no new version is created when publishing an already published item. But a new version is still created when you save a draft.

So, if you also use not Draftable no new version will be created because the Save Draft button is not displayed. But if you also use Draftable then versions can be created but only when you save a draft.

If both solution are not ok, that would mean, as suggested, that Draftable implies Versionable.
Best.

Do you plan to handle version history in the future? #506

@sebastienros
In the last commit i propose a full implementation of Versionable, maybe too complex but almost everything is done through DefaultContentManager and by using the same logic pattern.

If not Versionable, the same pattern means that, if DraftRequired and the latest item is published, we use a "new" draft version. The difference here is that we switch between only 2 versions.

This through a new StageRequired option including DraftRequired. Here, the "next" draft version number is computed by using modulo 2. If it exists it is queried and loaded, if not it is created as before.

If too complex remember there are limited but simpler solutions.
Best.

I see one drawback here.
So, when not versionable we switch between 2 versions. So, the lastest (draft or published) may not have the higher version number. So, if we select again the versionable option, creating a new version may produce a duplicate version number.
This because BuildNewVersionAsync() assumes that the latest updated item has the higher version number, which makes sense in the context where a new version is created as soon as we save as a draft and which can be published later. Note: when we re-publish an item a temporary draft (so a new version) is created.
So, not so simple. Maybe easier if a draft always uses the same version number (e.g 0) and then a new version is created only on publishing and based on the higher and existing version number + 1. So, if not versionable, save draft would be the same, and publish would just update the higher existing version.
So, there are solutions but not a simple one without changing the version management. So, i close this PR, maybe better to find a simpler way just to have the ability to update an already published item (see #576) without creating a new version (which was the 1st goal).


Fixed Craft 3.2 compatibility

Someone came across an issue where Preparse wasn’t saving the correct asset URLs when saving an entry for the first time in Craft 3.2.
For a little context, in Craft 3.2 when you create a new entry, a new entry draft is immediately created, and then Craft starts autosaving it as you make changes to it. Throughout that time, any assets you upload to an Assets field with a dynamic subpath will be placed in a temp folder.
When you click “Save entry”, Craft will save the draft one last time to make sure it has all the latest form data (EntryRevisionsController.php:361), and then it will save it again, this time actually converting the draft to a real entry (EntryRevisionsController.php:372). This is the time that will signal to Assets fields that it’s safe to start creating new folders based on their dynamic subpath settings, and move the assets over to them from the temp folder.
The bug with Preparse is that it’s currently guarding against ever processing the same entry for the same site twice. So it will update its field values correctly the first time the draft is saved, but not the second time when the draft is being converted to an entry. So if there are any asset URLs in the value, they won’t get updated correctly with the real asset locations.
I’m assuming that the reason Preparse is guarding against processing the same element/site combo more than once is so you avoid nested calls, and if that’s the case then it should be safe to stop worrying about it once it’s done processing. So that’s what this PR does. You might have a better idea of how to fix it though.

Worth mentioning that I’m not really sure about the performance implications here. Maybe another way to do this would be for Preparse to just flat out ignore elements when they are drafts or revisions. Craft 3.2 has an ElementHelper::isDraftOrRevision() method that you could check for that.
if (
    version_compare(Craft::$app->version, '3.2.0-beta.1', '>=') &&
    ElementHelper::isDraftOrRevision($element)
) {
    // ignore this element for now
}

Thanks a lot for this @brandonkelly :)
I'm going to need a little bit of time to test stuff and think the issue through, but I'll either merge the PR or implement your suggestion to ignore drafts+revisions very soon.

@brandonkelly I've tested this now, and I'm not able to recreate.
I've create a preparse field that outputs an assets url using {{ element.image | length ? element.image.one().getUrl() }}. The asset field (image), has a "Default Upload Location" of {slug} (also tested {author.username}). I'm creating a new entry, dragging a new file to the asset field, and then saving. The result is as expected, the preparse field shows the url, with the correct path.
Did I misunderstand the use-case, or was this what the user reported?
Also, not sure I understand this comment:

I’m assuming that the reason Preparse is guarding against processing the same element/site combo more than once is so you avoid nested calls, and if that’s the case then it should be safe to stop worrying about it once it’s done processing.

Yes, since preparse field calls saveElement in EVENT_AFTER_SAVE_ELEMENT this is to safeguard against an endless loop. Are you saying that this is no longer an issue in 3.2?

To reproduce you would need to set your Assets field to restrict uploads to a single folder, with an unresolvable file path that forces it to be stored in a temp location up until it is fully saved, such as {{ not object.getIsDraft() ? 'foo' }}.

Are you saying that this is no longer an issue in 3.2?

Not saying that at all, just stating my understanding of the code, and that my PR still accounts for it, however I don’t think there’s any reason why that cache has to stay cached after the Preparse field is done doing its thing.


Can you provide more documentation?

I realize this is new but this is awesome and i would like to read more.
I have wanted to have music on my website, hosted like an html5 player, embedded.  Is that something this can do?  If so, what port does it run on?  Sorry I am a bit of a newb idk if this accomplishes that.

mopidy is a music daemon. it connects to some audio output and some libraries. for example local files or with this plugin to a emby library. it runs headless and you can control it through alot of interfaces. also html5 web interfaces or command line tools.


DroppedSpan causing AttributeError

Describe the bug: celery tasks are now failing with attribute errors caused by APM
Environment (please complete the following information)

OS: Linux
Python version: 3.8.5
Framework and version [e.g. Django 2.1]: Django 3.2.3, Celery 5.0.5
APM Server version: 7.13
Agent version: 6.2.2

Could be related to #468
Traceback:
Traceback (most recent call last):
......
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/celery/app/task.py", line 421, in delay
return self.apply_async(args, kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/celery/app/task.py", line 561, in apply_async
return app.send_task(
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/celery/app/base.py", line 749, in send_task
amqp.send_task_message(P, name, message, **options)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/celery/app/amqp.py", line 523, in send_task_message
ret = producer.publish(
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/kombu/messaging.py", line 175, in publish
return _publish(
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/kombu/connection.py", line 525, in _ensured
return fun(*args, **kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/kombu/messaging.py", line 197, in _publish
return channel.basic_publish(
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/kombu/transport/virtual/base.py", line 605, in basic_publish
return self._put(routing_key, message, **kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/kombu/transport/SQS.py", line 294, in _put
c.send_message(**kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/elasticapm/instrumentation/packages/base.py", line 210, in call_if_sampling
return self.call(module, method, wrapped, instance, args, kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/elasticapm/instrumentation/packages/botocore.py", line 91, in call
span_modifiers[service](span, args, kwargs)
File "/aimful/shared/virtualenv/lib/python3.8/site-packages/elasticapm/instrumentation/packages/botocore.py", line 174, in modify_span_sqs
trace_parent = span.transaction.trace_parent.copy_from(span_id=span.id)
AttributeError: 'DroppedSpan' object has no attribute 'transaction'

Hey @HonzaKral! Great catch, I opened #1170 with a fix (and took the opportunity to also close some gaps in testing the SQS instrumentation).


Line Wrapping Bash Linux Debian 9

S.O. GNU/Linux Debian 9
VS CODE Version: 1.17.1
ISSUE:
When I use Integrated Terminal (bash) the lines appears cropped in horizontal.

Adding image for reference. Changing font size and/or height does not improve it.

@jorgerabello3 @mpartipilo do you have a custom font by chance? I cna't reproduce on Debian 8

The default font may have changed in 9. This is similar to what happened on Fedora due to the default font there, you should try using a different monospace font in the meantime.

Kali Linux also suffers from this issue

Debian 9. Same problem. Changing fonts/fontSizes does not help. Default font is monospace.

Upstream issue: https://github.com/xtermjs/xterm.js/issues/1170

Resolvido ao atualizar para a última versão !


Should we add support for property hooks in the package denormalization feature.

Feature Request

Q
A

New Feature
yes

BC Break
yes

Issue
class UserIdentity
{
    public function __construct(
        private string $firstName,
        private string $lastName
    ) {
    }

    public string $fullName {
        get => $this->firstName . " " . $this->lastName;
        set {
            [$this->firstName, $this->lastName] = explode(' ', $value, 2);
        }
    }
}

How should the deserialization feature works with this class ?

Should the Deserialization feature of the package even try to work correctly with a class containing property hook ?
The current Deserialization mechanism is geared toward simple DTO. The moment you add Property hooks or any advanced feature in PHP to your class you are better of using a fully fledge Serializer package and there are many of them in PHP land. So should Property hook even be supported by the feature ?

@nyamsprod IMO, this package should not try to support advanced deserialization. As you said, there are many other packages available for those use cases.

Just added this text to the documentation I hope this is explanatory enough. I will close this issue as resolved

I am happy to report that the package serializer is able to handle property hook and aviz without having to change a single line of code so my worries are no more I will even probably remove the warning which are false. The feature supports PHP8.4 features without any seen issue.


[API] 1.1.1 Introduces significant breaking changes without deprecation warnings

Some breaking changes (SheetState -> UseCaseState and rememberSheetState -> rememberUseCaseState, removal of the CalendarTimeline) were introduced in 1.1.1 version without any of these indications about breaking changes:

Bumping a major version
Introducing deprecation warnings first
Providing typealiases
Providing an alpha-suffixed version with changes
Providing a documented migration path

This led to significant amount of build failures in our project upon upgrading.
Suggestion:
Next time, as this library is stable now, please give users time to migrate to the new API by using a combination of the common practices mentioned above.

Given the extensive scope of the library and the limited free time available to most adults, I have decided not to include deprecation warnings or alpha versions. Although changes were communicated in the release notes, I acknowledge that I could have been more specific about breaking changes and provided migration guides alongside major dependency version upgrades. Rest assured, I will strive to improve my communication in the future to make it easier for devs to adapt to any changes.


validation: title-missing-fixes-8

Docs Build status updates of commit 4a96540:
:warning: Validation status: warnings

File
Status
Preview URL
Details

Skype/UCWA/derivedConversation_ref.md
:warning:Warning

Details

Skype/UCWA/myGroupMembership_ref.md
:warning:Warning

Details

Skype/UCWA/participant_ref.md
:warning:Warning

Details

Skype/UCWA/removeContactFromAllGroups2_ref.md
:warning:Warning

Details

Skype/UCWA/startOnlineMeeting_ref.md
:warning:Warning

Details

Skype/Trusted-Application-API/docs/ReferenceLibrary.md
:bulb:Suggestion

Details

Skype/UCWA/AudioTranscriptStatus_ref.md
:bulb:Suggestion

Details

Skype/UCWA/LobbyBypassForPhoneUsers_ref.md
:bulb:Suggestion

Details

Skype/UCWA/OnlineMeetingRel_ref.md
:bulb:Suggestion

Details

Skype/WebSDK/docs/PTGroupsAddContact.md
:bulb:Suggestion

Details

Skype/UCWA/derivedConversation_ref.md

Line 48, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/myGroupMembership_ref.md

Line 52, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/participant_ref.md

Line 76, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 89, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 125, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 161, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/removeContactFromAllGroups2_ref.md

Line 39, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/startOnlineMeeting_ref.md

Line 44, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/Trusted-Application-API/docs/ReferenceLibrary.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/AudioTranscriptStatus_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/LobbyBypassForPhoneUsers_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/OnlineMeetingRel_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/WebSDK/docs/PTGroupsAddContact.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@lindalu-MSFT
The Content & Learning team is fixing build validation errors on docs.microsoft.com for the rest of H2. This will eliminate potential accessibility, security, and usability issues. This PR includes only build validation fixes and does not change other content. Please review within five business days and merge or comment in the PR with any changes you’d like to see. Thank you!

Docs Build status updates of commit dc5a550:
:warning: Validation status: warnings

File
Status
Preview URL
Details

Skype/UCWA/derivedConversation_ref.md
:warning:Warning

Details

Skype/UCWA/myGroupMembership_ref.md
:warning:Warning

Details

Skype/UCWA/participant_ref.md
:warning:Warning

Details

Skype/UCWA/removeContactFromAllGroups2_ref.md
:warning:Warning

Details

Skype/UCWA/startOnlineMeeting_ref.md
:warning:Warning

Details

Skype/Trusted-Application-API/docs/ReferenceLibrary.md
:bulb:Suggestion

Details

Skype/UCWA/AudioTranscriptStatus_ref.md
:bulb:Suggestion

Details

Skype/UCWA/LobbyBypassForPhoneUsers_ref.md
:bulb:Suggestion

Details

Skype/UCWA/OnlineMeetingRel_ref.md
:bulb:Suggestion

Details

Skype/WebSDK/docs/PTGroupsAddContact.md
:bulb:Suggestion

Details

Skype/UCWA/derivedConversation_ref.md

Line 48, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/myGroupMembership_ref.md

Line 52, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/participant_ref.md

Line 76, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 89, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 125, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 161, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/removeContactFromAllGroups2_ref.md

Line 39, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/startOnlineMeeting_ref.md

Line 44, Column 1: [Warning: table-syntax-invalid - See documentation] Table syntax is invalid. Ensure your table includes a header and is surrounded by empty lines.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/Trusted-Application-API/docs/ReferenceLibrary.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/AudioTranscriptStatus_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/LobbyBypassForPhoneUsers_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/UCWA/OnlineMeetingRel_ref.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

Skype/WebSDK/docs/PTGroupsAddContact.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Implement standalone webview ndk

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Docs
[ ] New Binding issue #___
[ ] Code style update
[ ] Refactor
[x] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change?

[ ] Yes, and the changes were approved in issue #___
[x] No

Checklist

[x] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
[x] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
[x] I have added a convincing reason for adding this feature, if necessary

Other information

This PR will rewrite whole android stack.
The benefit from it is whole workflow on android will be just like others.
The downside is I need to write many webview code into tao since they are under the event loop.
@lucasfernog @amrbashir Do you have any opinion on this?
This is like we alter to gtk stack on Linux. I change the implementation on Android to be more webview specific.

Yeah that's my concern too.
But we still need this one way or another. winit's android port is pure NDK.
We can't even define any class in that way, and this is hard requirement to implement IPC.
I think the reasonable choice would be android and linux port in tao will end up remain, and we maintain these ourselves. For the rest platforms, we will re-export from winit.
Does this match what you plan on moving back to winit?

yeah that sounds about right.
I just thought we were gonna create a winit_gtk crate and have it under rust-windowing umbrella since the winit team offered to do so but I guess keeping gtk and android-webview in tao and reexport winit on other platforms is the optimal choice.

Oh right, we can still propose winit_gtk. But that might not be the case on Android. Our implementation will be very webview specific.
On maintenance side, it contains around ~2000 LOC. It's fairly maintainable IMHO.


Add TypeScript type definitions

They would be useful for those of us using TS.
Here's the current definition I'm using:
declare module 'mention-hashtag' {
  export enum ExtractionType {
    MENTION = '@',
    HASH_TAG = '#',
    ALL = 'all',
  }
  export type ExtractionOptions = { type: ExtractionType; unique: boolean; symbol: boolean };
  export type ExtractionResult = { mentions: string[]; hashtags: string[] };

  function extract(text: string, options: ExtractionType.ALL): ExtractionResult;
  function extract(
    text: string,
    options: ExtractionOptions | ExtractionType.MENTION | ExtractionType.HASH_TAG,
  ): string[];

  export default extract;
}

I'm not sure if its the best approach, but it does the work. Are you OK with a PR for this?

Of course! Thanks!

They would be useful for those of us using TS.
Here's the current definition I'm using:
declare module 'mention-hashtag' {
  export enum ExtractionType {
    MENTION = '@',
    HASH_TAG = '#',
    ALL = 'all',
  }
  export type ExtractionOptions = { type: ExtractionType; unique: boolean; symbol: boolean };
  export type ExtractionResult = { mentions: string[]; hashtags: string[] };

  function extract(text: string, options: ExtractionType.ALL): ExtractionResult;
  function extract(
    text: string,
    options: ExtractionOptions | ExtractionType.MENTION | ExtractionType.HASH_TAG,
  ): string[];

  export default extract;
}

I'm not sure if its the best approach, but it does the work. Are you OK with a PR for this?

been a couple of years, but do you want to do that PR?

@mattbodman It's been a while since I last used this package, but, sure, I can do it

Cool.. looked like you were 90% there so I thought it would be easy... No
pressure though!
On Mon, 28 Jun 2021 at 23:33, Francis Brito @.***>
wrote:

@mattbodman https://github.com/mattbodman It's been a while since I
last used this package, but, sure, I can do it
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lmfresneda/mention-hashtag/issues/4#issuecomment-869689313,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPG6BJ2JLYTJLBPZODC7QTTVB22ZANCNFSM4FGT35NQ
.


request size did not match content length

Description
I just replaced the express server with the uwebsocket-epxress. I am getting "request size did not match content length" for some of the our APIs. And those APIs are working fine with express. Anyone have chance to looked into it? It is blocking some of the priority Task. Thanks in advance :)

Hi @jaythakor-ai, we need a reproduction scenario to investigate. Either as a test case, or as a full app example that reproduces the issue.

Here is the code. We are trying to load a test on post API from Jmeter. Issue occurred and its failed most of the APIs
@endel
   var uWebSockets_js_1 = require("uWebSockets.js");
    var uwebsockets_express_1 = require("uwebsockets-express");
    var uwsApp = uWebSockets_js_1.App();
    var app = (0, uwebsockets_express_1.default)(uwsApp);

    var compression = require('compression');
    app.use(compression({ filter: shouldCompress }))
    function shouldCompress(req, res) {
      if (req.headers['x-no-compression']) {
        // don't compress responses with this request header
        return false
      }
      // fallback to standard filter function
      return compression.filter(req, res)
    }

    http.createServer(function (req, res) {
          app(req, res); /*loggerMod(req, res);*/
        });`

     app.listen(1880, function (err) {
          if (err) {
            log.error(log._("server.unable-to-listen", {  }));
          } else {
            // register routes
            app.get("/test_endpoint", function (req, res) {
              res.json({ hello: "world!" });
            });

    uwsApp.get('/internal_healthcheck', (res, req) => {
      res.writeStatus('200 OK').writeHeader('IsAlive', 'Yes').end('{"status":"active","time":"' + Date.now() + '"}');
    })

    app.get('/healthcheck', (req, res) => {
      res.setHeader('Content-Type', 'application/json');
      res.send('{"status":"active","time":"' + Date.now() + '"}');
    });

    app.post("/postAPI", auth.needsPermission("nodes.read"), (req, res)=> {
          //here get an error (not every time, sometimes), currently we are load test on this API with jmeter
    });
 }

@endel Please note that this error only comes when the request payload size is big. In our case, payload size is 34 kb.
The uwebsocket-express version we are using is 1.3.1.

Hi @endel any updates on this?? We are block on it.

Thanks for the pull-request.

@endel  Welcome!


The memory cgroup is not enabled.

I appended  cgroup_enable=memory cgroup_memory=1 to cmdline.txt file in each node and reboot but it not working.
microk8s inspect
Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Service snap.microk8s.daemon-proxy is running
  Service snap.microk8s.daemon-kubelet is running
  Service snap.microk8s.daemon-scheduler is running
  Service snap.microk8s.daemon-controller-manager is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster

WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm
Building the report tarball
  Report tarball is at /var/snap/microk8s/1669/inspection-report-20201027_221452.tar.gz

I think some rpis linux distro is in /boot/firmware/nobtcmd.txt
https://microk8s.io/docs/install-alternatives#heading--arm

I think some rpis linux distro is in /boot/firmware/nobtcmd.txt
https://microk8s.io/docs/install-alternatives#heading--arm

I added cgroup_enable=memory cgroup_memory=1 to/boot/firmware/nobtcmd.txt as well, but it's doesn't work.
ubuntu@ubuntu:/$ cat boot/firmware/nobtcmd.txt
cgroup_enable=memory cgroup_memory=1

microk8s inspect
WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm
Building the report tarball
  Report tarball is at /var/snap/microk8s/1669/inspection-report-20201102_155946.tar.gz

@UsernameAlvarez just to confirm could you attach the inspection tarball?

Hello @ktsakalozos is a raspberry pi 4 model B
inspection-report-20201102_155946.tar.gz

In the API server logs I see:
Nov 02 15:01:25 ubuntu microk8s.daemon-apiserver[1993946]: Error: start node: raft_start(): io: load closed segment<PHONE_NUMBER>312357-0000000013312881: found 524 entries (expected 525)
Nov 02 15:01:25 ubuntu systemd[1]: snap.microk8s.daemon-apiserver.service: Main process exited, code=exited, status=1/FAILURE

@freeekanayaka may have more insight on this error.
@UsernameAlvarez could you remove microk8s and reinstall it from the latest edge channel. We have a number of fixes in that channel and we will be releasing them soon.
sudo snap remove microk8s --purge
sudo snap install microk8s --classic --channel=1.19/edge

@ktsakalozos Thanks, I did it but is not working.
microk8s (1.19/edge) v1.19.3 from Canonical✓ installed

microk8s inspect
WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm
Building the report tarball
  Report tarball is at /var/snap/microk8s/1783/inspection-report-20201104_230237.tar.gz

Inspection-report
inspection-report-20201104_230237.tar.gz

@UsernameAlvarez can you cat the file /boot/firmware/cmdline.txt. And cat /proc/cgroups

@balchua yes.
$ cat /boot/firmware/cmdline.txt
net.ifnames=0 dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc
cgroup_enable=memory cgroup_memory=1

$ cat /proc/cgroups
#subsys_name	hierarchy	num_cgroups	enabled
cpuset	5	1	1
cpu	8	1	1
cpuacct	8	1	1
blkio	3	1	1
memory	0	113	0
devices	9	104	1
freezer	10	2	1
net_cls	2	1	1
perf_event	6	1	1
net_prio	2	1	1
pids	4	111	1
rdma	7	1	1

I also have this problem, and have applied the 1.19/edge.
sudo snap install microk8s --classic --channel=1.19/edge
microk8s (1.19/edge) v1.19.4 from Canonical✓ installed

# Warning: iptables-legacy tables present, use iptables-legacy to see them
WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm

cat /boot/firmware/cmdline.txt
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc quiet splash

cat /proc/cgroups
#subsys_name    hierarchy       num_cgroups     enabled
cpuset  3       1       1
cpu     2       1       1
cpuacct 2       1       1
blkio   4       1       1
memory  0       117     0
devices 8       108     1
freezer 5       2       1
net_cls 9       1       1
perf_event      6       1       1
net_prio        9       1       1
pids    10      115     1
rdma    7       1       1

Same issue here with Ubuntu 20.04.2 on Raspberry Pi 4.
Is any workaround to enable cgroup memory?

Same setup here (20.04.2 on Raspberry Pi 4), with latest 1.19
$ snap info microk8s | tail -1
installed:          v1.19.9             (2098) 184MB classic

$ sudo lshw | grep Rasp
    product: Raspberry Pi 4 Model B Rev 1.2

Was there a solution found for this? I am running into the same issue but on an amd64 debian 10 machine. I have added the kernel parameters to my /etc/default/grub file.

I have enabled cgroups memory and microk8s does not want to see it.
# cat /proc/cgroups #subsys_name	hierarchy	num_cgroups	enabled cpuset	0	360	1 cpu	0	360	1 cpuacct	0	360	1 blkio	0	360	1 memory	0	360	1 devices	0	360	1 freezer	0	360	1 net_cls	0	360	1 perf_event	0	360	1 net_prio	0	360	1 hugetlb	0	360	1 pids	0	360	1 rdma	0	360	1
`# microk8s inspect
Inspecting Certificates
Inspecting services
Service snap.microk8s.daemon-cluster-agent is running
Service snap.microk8s.daemon-containerd is running
Service snap.microk8s.daemon-apiserver is running
Service snap.microk8s.daemon-apiserver-kicker is running
Service snap.microk8s.daemon-control-plane-kicker is running
Service snap.microk8s.daemon-proxy is running
Service snap.microk8s.daemon-kubelet is running
Service snap.microk8s.daemon-scheduler is running
Service snap.microk8s.daemon-controller-manager is running
Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
Copy processes list to the final report tarball
Copy snap list to the final report tarball
Copy VM name (or none) to the final report tarball
Copy disk usage information to the final report tarball
Copy memory usage information to the final report tarball
Copy server uptime to the final report tarball
Copy current linux distribution to the final report tarball
Copy openSSL information to the final report tarball
Copy network configuration to the final report tarball
Inspecting kubernetes cluster
Inspect kubernetes cluster
Inspecting juju
Inspect Juju
Inspecting kubeflow
Inspect Kubeflow
Warning: iptables-legacy tables present, use iptables-legacy to see them
WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm
Building the report tarball
Report tarball is at /var/snap/microk8s/2213/inspection-report-20210601_104319.tar.gz
`
My OS is Debian Sid

Can confirm this issue with Debian 11, with microk8s 1.20.7 and 1.21.1

I have enabled cgroups memory and microk8s does not want to see it.
# cat /proc/cgroups
#subsys_name	hierarchy	num_cgroups	enabled
cpuset	0	360	1
cpu	0	360	1
cpuacct	0	360	1
blkio	0	360	1
memory	0	360	1
devices	0	360	1
freezer	0	360	1
net_cls	0	360	1
perf_event	0	360	1
net_prio	0	360	1
hugetlb	0	360	1
pids	0	360	1
rdma	0	360	1

My OS is Debian Sid

You probably didn't.
Did anyone tried adding cgroup_enable=memory cgroup_memory=1 into /etc/default/grub to GRUB_CMDLINE_LINUX_DEFAULT then reinstalling grub with update-grub?
Also, try cat /proc/cmdline to see if the option got there.

Yes, I tried.
Output of microk8s inspect attached.
$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.10.0-7-amd64 root=/dev/mapper/Rennschnecke-root ro cgroup_enable=memory cgroup_memory=1 quiet

$ microk8s inspect
Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Service snap.microk8s.daemon-kubelite is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster
Inspecting juju
  Inspect Juju
Inspecting kubeflow
  Inspect Kubeflow

# Warning: iptables-legacy tables present, use iptables-legacy to see them
WARNING:  The memory cgroup is not enabled.
The cluster may not be functioning properly. Please ensure cgroups are enabled
See for example: https://microk8s.io/docs/install-alternatives#heading--arm
Building the report tarball
  Report tarball is at /var/snap/microk8s/2210/inspection-report-20210622_082450.tar.gz
[inspection-report-20210622_082450.tar.gz](https://github.com/ubuntu/microk8s/files/6691600/inspection-report-20210622_082450.tar.gz)

@mkesper i can see based on the inspect output, that the cluster seems to be in working condition.
Perhaps the microk8s output is the bug, which does not affect the cluster operation.

It seems so:
$ mount|grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)

scripts/inspect.sh
186:  if ! mount | grep -q 'cgroup/memory'; then
187:    printf -- '\033[0;33mWARNING: \033[0m The memory cgroup is not enabled. \n'
188:    printf -- 'The cluster may not be functioning properly. Please ensure cgroups are enabled \n'

About cgroup error, my solution is add  cgroup_enable=memory cgroup_memory=1 into  the cmdline.txt of boot partition in SDCard, it's work, and my operating system is rpios 64.
But the problem of iptables-legacy tables present, use iptables-legacy to see them remains unresolved.

I've been trying to get microk8s 1.21/stable working on Ubuntu 21.10 arm64 working on Pi-4  and it seems that perhaps microk8s doesn't like the new default in Ubuntu 21.10 ( from the release notes )
systemd is being switched to the “unified” cgroup hierarchy (cgroup v2) by default. If for some reason you need to keep the legacy cgroup v1 hierarchy, you can select it via a kernel parameter at boot time:
systemd.unified_cgroup_hierarchy=0 (bug 1850667 29)
So - after adding systemd.unified_cgroup_hierarchy=0  the issue with the memory cgroup error, goes away.
To see which ( V1 or V2 ) you have configured -
stat -c %T -f /sys/fs/cgroup
V1 —  tmpfs
V2 — cgroup2fs
If you get errors about iptables or iptables-legacy:
sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F &&  sudo iptables -X
sudo iptables-legacy -F && sudo iptables-legacy -t nat -F && sudo iptables-legacy -t mangle -F &&  sudo iptables-legacy -X
systemd, strikes again.

I've been trying to get microk8s 1.21/stable working on Ubuntu 21.10-arm64 on Pi-4 and it seems that perhaps microk8s doesn't like the new default in Ubuntu 21.10 ( from the release notes )
systemd is being switched to the “unified” cgroup hierarchy (cgroup v2) by default. If for some reason you need to keep the legacy cgroup v1 hierarchy, you can select it via a kernel parameter at boot time: systemd.unified_cgroup_hierarchy=0 (bug 1850667 29)
So - after adding systemd.unified_cgroup_hierarchy=0 the issue with the memory cgroup error, goes away. (don't forget to rebuild the initramfs! sudo update-initramfs -u )
...
systemd, strikes again.

This is not a long time solution but a workaround for the fact that microk8s (at least 1.21 which isn't the most up to date anymore) does not support cgroup v2 properly and uses iptables-legacy for its whole network configuration.
NB: The cluster worked for me apparently with cgroup v2 but there was this irritating message.

Hello,
I'm running Ubuntu 22.04 on arm64 (m1 in parallels) and in my case /boot/cmdline.txt or /boot/firmware/cmdline.txt simply don't exist. Any ideas where I'm supposed to be adding the settings related to cgroups? I'm encoutering the exact same issue when trying to use microk8s 1.19.

in my case /boot/cmdline.txt or /boot/firmware/cmdline.txt simply don't exist. Any ideas where I'm supposed to be adding the settings related to cgroups?

I have tried enabling the cgroup memory by adding it to the kernel parameters in grub, but it doesn't make any difference.

There. I mean, those are kernel parameters, the cmdline.txt is just way how to get it to grub. If you are not sure what kernel parameters actually got into running kernel, look into /proc/cmdline.
(Note: I gave up on kubernetes for now and hope that when I will have time for them again it will be in better shape.)

@hkmaly you can always use a higher version though. It works without any issues. This is a special case.

@lethargosapatheia ... higher version of what? You mean like microk9s? :smile:

Yes.

Here is a fix for this in ubuntu 22.04. Open the file /etc/default/grub in an editor. Find where the string GRUB_CMDLINE_LINUX is set. Add cgroup_enable=memory cgroup_memory=1 to that string. Save the file and exit the editor. Then run sudo update-grub. Here is how my grub file looks like:
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 swapaccount=1 systemd.unified_cgroup_hierarchy=0"

Then you may restart your computer.

GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 systemd.unified_cgroup_hierarchy=0"

I needed all three of these.

same issue
installed on Ubuntu core 22.04 LTS - Raspberry pi
cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
mount |grep cgroup cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
microk8s version MicroK8s v1.25.2 revision 4054
sudo microk8s inspect WARNING:  The memory cgroup is not enabled.  The cluster may not be functioning properly. Please ensure cgroups are enabled  See for example: https://microk8s.io/docs/install-alternatives#heading--arm  Building the report tarball   Report tarball is at /var/snap/microk8s/4054/inspection-report-20221023_225317.tar.gz

its not working on 22.10. I need to go back to LTS .... had the same problem on amd64

Same here, amd64 working fine before Ubuntu upgrade, should I try to change cgroups to v1?

This issue has been been fixed by https://github.com/canonical/microk8s/pull/3518.

Still getting the error on Ubuntu 22.0.4 & 1.25.

For anyone installing MicroK8S here is a link to the steps I took to install it on Ubuntu 22.04
Microk8s setup on ubuntu 22.04

What about debian? Or devuan?

Have you experienced the same issue on them? Enabling Cgroups should generally work the same way for server-based OSs.  Once you have added the following and updated your grub and initramfs. You should be good to go.
GRUB_CMDLINE_LINUX="cgroup_enable=memory cgroup_memory=1 systemd.unified_cgroup_hierarchy=0"

What about debian? Or devuan?

I had the same issue in Raspberry Pi 4 B even after adding cgroup_enable=memory cgroup_memory=1.
Then I installed docker and reboot and tried to start again there was an error showing:
WARNING:  Docker is installed. File "/etc/docker/daemon.json" does not exist. You should create it and add the following lines: {     "insecure-registries" : ["localhost:32000"] } and then restart docker with: sudo systemctl restart docker
I did that and sudo reboot and the error is gone.
Not sure what is the relationship, but you may try also and feeback!

Hi @armanfatahi, the warning printed and the suggested fix is for the local deployment of docker to be able to push to the local registry you can enable with microk8s enable registry. I do not see how this could be related to the cgroup issue.

I have a similar issue:
I have  microk8s cluster in raspberry pi 4 with rasbian
node1: master (and also worker) with kernel: 5.15.76-v8+
node2: worker only with kernel: 5.15.84-v8+
If I add a memory limit to a deployment and if it starts in worker node I get this error (only if memory limit is on)
Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: process_linux.go:508: setting cgroup config for procHooks process caused: openat2 /sys/fs/cgroup/kubepods/burstable/pod13a4b4e3-c07f-4178-8b8c-1d801660d60d/fetcher/memory.max: no such file or directory: unknown
It it starts on the master node the pod starts successfully.
[microk8s inspect

Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running

  Service snap.microk8s.daemon-containerd is running
 FAIL:  Service snap.microk8s.daemon-k8s-dqlite is not running
For more details look at: sudo journalctl -u snap.microk8s.daemon-k8s-dqlite
  Service snap.microk8s.daemon-kubelite is running
  Service snap.microk8s.daemon-traefik is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster
Inspecting juju
  Inspect Juju
Inspecting kubeflow
  Inspect Kubeflow
Inspecting dqlite
  Inspect dqlite

Building the report tarball
  Report tarball is at /var/snap/microk8s/4600/inspection-report-20230215_004055.tar.gz]

inspection-report-20230215_004055.tar.gz

I just ran into this oddity on 22.04, microk8s 1.25. Claims that memory cgroup is not enabled when it clearly is. I've applied all the suggested "fixes" and it didn't change anything. I don't think there's anything wrong with my cluster, but that the check is broken.

I just ran into this oddity on 22.04, microk8s 1.25. Claims that memory cgroup is not enabled when it clearly is. I've applied all the suggested "fixes" and it didn't change anything. I don't think there's anything wrong with my cluster, but that the check is broken.

am having the same issue too, and I am on 1.27 and Ubuntu 22.04.....why does this keep happening? cgroups2 is most definitely enabled


Dump sim state as JSON

This change updates the simulator state dump to output in a JSON compatible format. It also updates the non-QIR API to be a Rust pub fn that accepts a writer for better compatibility in scenarios without stdout.

Closing this PR in favor of a simple removal of the non-QIR API. How to return internal simulator state across API boundaries and what JSON formats to use can be left for later design discussions rather than checking in something quick and simple now!


[Refactor] Use correct HF model type for MBart-like models

This PR fixes an issue where models like MBart, that are Seq2Seq but can be loaded via both AutoModelForCausalLM and AutoModelForSeq2SeqLM, would be treated as causal decoders.

This looks right to me but I haven't run it. If you've run GPT-2, MBART, and T5 and they all work correctly feel free to merge.


Media Library: More strict file and folder name validation, fixes #6748

Fixing that some special characters were accepted in file and folder names.

@BenedekFarkas, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, DNFBOT;

Can we ask @hannan-azam to test this fix? He's the most knowledgeable about this feature after you ;)

Sure!

Sure, I'll do the testing and will get back with results.

@sebastienros @BenedekFarkas During the testing i found another issue with a recent commit 2440e68 (13th April) in media-library.js line 385. Please see the attached screen shot:

Script is trying to call a method "contains" which doesn't exist in standard string prototype and causes a javascript error. We should use indexOf method and the return value -1 or positive to write the conditional statement.

The Script has a glitch. While using Azure Media Storage, it concludes wrong directory separator for the top level folders. For example in current scenario i had Azure Media Storage turned on. I clicked the top level folder "Users". With the condition 'Users'.contains('/') ? '/' : '\\' it will always conclude the directory separator to be \\ instead of /.

Because of this error, the screen keeps showing the loading icon and stops working.

                        var separator = deepestChildPath.contains('/') ? '/' : '\\';

Hm, I tested that one quite extensively though, but you're right about the JS problem anyway. That change btw will be unnecessary once #6756 is fixed - I applied it as a temporary solution, because it was easier to make it work there first (to be able to use the Media Library properly with Azure Storage and test other things).

Regarding the actual issue, below are my findings and recommendations:
I read this article https://perishablepress.com/stop-using-unsafe-characters-in-urls/ which references RFC 1738 http://www.ietf.org/rfc/rfc1738.txt with recommendations on not using the characters `blank/empty space and " < > # % { } | \ ^ ~ [ ] `` for the URIs. I have pasted the description from RFC on why these characters are unsafe at the end.
The article also suggests that there are many others characters which should be URL ENCODED if they are used in urls. For example character ranges 00-1F hex (0-31 decimal) and 7F, 80-FF hex (128-255 decimal.) Reserved charcaters $ & + , / : ; = ? @. Everything should be URL Encoded.
Following are my recommendations:

We are using Path.GetInvalidFileNameChars to get a list of unsafe characters for file system. This is very nice since we make sure that file will have no issues while storing on file system.

The HttpUnallowed should include the Unsafe characters mentioned in the RFC. Spaces/Blanks should either be removed or converted to underscores.

We should finally URL Encode the filename to make sure that the url will have no issues later on. Azure Blob always does URL Encoding. For example download §.jpg will be saved as download%20%C2%A7.jpg. Why not make it consistent and we also store the url encoded file name internally as well. The only drawback i see with this approach is that even on File System we will have files with URL Encoded names and not the special chars. But on the other hand using such special chars in file names is a rare scenario and on top of that it will save us from conversions later on.

Unsafe:
Characters can be unsafe for a number of reasons.  The space
character is unsafe because significant spaces may disappear and
insignificant spaces may be introduced when URLs are transcribed or
typeset or subjected to the treatment of word-processing programs.
The characters "<" and ">" are unsafe because they are used as the
delimiters around URLs in free text; the quote mark (""") is used to
delimit URLs in some systems.  The character "#" is unsafe and should
always be encoded because it is used in World Wide Web and in other
systems to delimit a URL from a fragment/anchor identifier that might
follow it.  The character "%" is unsafe because it is used for
encodings of other characters.  Other characters are unsafe because
gateways and other transport agents are known to sometimes modify
such characters. These characters are "{", "}", "|", "", "^", "~",
"[", "]", and "`".
All unsafe characters must always be encoded within a URL. For
example, the character "#" must be encoded within URLs even in
systems that do not normally deal with fragment or anchor
identifiers, so that if the URL is copied into another system that
does use them, it will not be necessary to change the URL encoding.

Conflicts. Do we still need it?

I've bee meaning to come back to this. I'll try to check it soon and see what to do.


expm precision inconsistency for multiples of pi

Description
When I'm using cupyx.scipy.linalg.expm on a 2x2 complex matrix, there is a small (~3e-6) absolute error wrt the correct value and wrt scipy.linalg.expm.
To Reproduce
from scipy.linalg import expm
import cupy as cp
from cupyx.scipy.linalg import expm as cuexpm
import numpy as np

def test_expm(theta):
    dtype = "complex128"
    X = np.rot90(np.eye(2)).astype(dtype)
    eP1 = np.eye(2) * np.cos(theta) + 1j * X * np.sin(theta)
    eP2 = expm(1j * theta * X)
    eP3 = cuexpm(1j * theta * cp.asarray(X)).get()
    assert np.allclose(eP1, eP2, atol=1e-10)
    assert np.allclose(eP1, eP3, atol=1e-10) # fails here

if __name__ == "__main__":
    for v in [0.2, np.pi, 2 * np.pi, 3 * np.pi, np.pi / 2, np.pi / 4]:
        try:
            test_expm(v)
            print(f"v Test for theta={v} passed")
        except AssertionError:
            print(f"x Test for theta={v} failed")

Output:
python ~/scipy_expm_repro.py
v Test for theta=0.2 passed
x Test for theta=3.141592653589793 failed
x Test for theta=6.283185307179586 failed
x Test for theta=9.42477796076938 failed
x Test for theta=1.5707963267948966 failed
v Test for theta=0.7853981633974483 passed

Installation
Wheel (pip install cupy-***)
Environment
OS                           : Linux-5.15.0-88-generic-x86_64-with-glibc2.35
Python Version               : 3.10.12
CuPy Version                 : 13.3.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 1.26.4
SciPy Version                : 1.14.0
Cython Build Version         : 0.29.36
Cython Runtime Version       : 0.29.33
CUDA Root                    : /usr/local/cuda
nvcc PATH                    : None
CUDA Build Version           : 12060
CUDA Driver Version          : 12020
CUDA Runtime Version         : 12060 (linked to CuPy) / 12010 (locally installed)
CUDA Extra Include Dirs      : []
cuBLAS Version               : (available)
cuFFT Version                : 11002
cuRAND Version               : 10302
cuSOLVER Version             : (11, 4, 5)
cuSPARSE Version             : (available)
NVRTC Version                : (12, 1)
Thrust Version               : 200600
CUB Build Version            : 200600
Jitify Build Version         : <unknown>
cuDNN Build Version          : 8801
cuDNN Version                : 8902
NCCL Build Version           : 21602
NCCL Runtime Version         : 22005
cuTENSOR Version             : 20002
cuSPARSELt Build Version     : None
Device 0 Name                : NVIDIA A100 80GB PCIe
Device 0 Compute Capability  : 80
Device 0 PCI Bus ID          : 0000:22:00.0
Device 1 Name                : NVIDIA A100 80GB PCIe
Device 1 Compute Capability  : 80
Device 1 PCI Bus ID          : 0000:26:00.0
Device 2 Name                : NVIDIA A100 80GB PCIe
Device 2 Compute Capability  : 80
Device 2 PCI Bus ID          : 0000:9B:00.0
Device 3 Name                : NVIDIA A100 80GB PCIe
Device 3 Compute Capability  : 80
Device 3 PCI Bus ID          : 0000:9F:00.0

Additional Information
No response

@danlkv CuPy does not ensure complete compatibility with numerical values from NumPy. CuPy may adopts algorithms distinct from those of SciPy for parallel execution, and larger errors compared to SciPy might be unavoidable in such a case.


terratest not found

Hey guys, Terratest isn't exist anymore.

Terratest exists, but we haven't had time to open source it yet. Hopefully soon!

How can we contribute to this module when terratest is not available?
I'm trying to follow https://github.com/hashicorp/terraform-aws-vault/blob/master/test/README.md#running-the-tests
cd test
glide install
...
[WARN]	Unable to checkout github.com/gruntwork-io/terratest
[ERROR] Update failed for github.com/gruntwork-io/terratest

You have a valid point. Officially, after you open a PR, we'd run tests in our own CircleCI account which does have access to Terratest. Admittedly, this is not a great solution.
The challenge with releasing Terratest is that it will take some time internally for us to make the code suitable for public consumption, and we'd need to be prepared to allocate time to respond to GitHub Issues and Pull Requests submitted by the community. We're concerned that just open sourcing what we have without allocating the resources it needs to thrive will give everyone a worse experience than nothing at all.
We are actively discussing this one, and hope to have an official position on opening up Terratest in the next month or two. Sorry I don't have a better answer for you, but hopefully candor is appreciated.

@josh-padnick thanks for the explanation about the plans for open sourcing terratest.  Until such time that it is made available, should we follow these steps when contributing?

File a GitHub issue
Update the documentation
~3. Update the tests~
Update the code
Create a pull request
Merge and release

@sclausson Your proposed flow sounds good, though you're welcome to take a stab at tests, knowing you won't even be able to compile them, or alternatively, add placeholder comments for the tests you think should be added.
In any case, PRs are welcome!

Also, I'm going to rename this issue to something clearer. We'll leave it open to reflect our having made a commitment to declare an official intention around Terratest at some point in the near future.

Hope this hasn't been forgotten about! :) - I'd also love to see terratest generally available.
Thanks for all your hard work.

Not forgotten about :)
We are planning how to get it open source and hoping to have something in early 2018.

I can't wait to have terratest in my hands and hopefully contribute.

just saw an announcement on terragrunt that terratest has been open sourced - https://blog.gruntwork.io/open-sourcing-terratest-a-swiss-army-knife-for-testing-infrastructure-code-5d883336fcd5 - Cc: @brikis98

Ah, thanks for the reminder @saurabh-hirani. Terratest is indeed open source now: https://github.com/gruntwork-io/terratest. This repo has been updated to the latest version, so everyone should be able to run the tests now.


SC plugin manager and Add service-center error codes.

New features

SC plugin manager.

Changes

JAV-486 Changes: Add service-center error codes.

Coverage increased (+0.2%) to 70.336% when pulling b0dd522079b9d64dcec67d9b3ad10bf2f9b7ea3c on little-cui:dev into 1626c3d23acc3d7f1037b9d9c767ec03f99cee8e on ServiceComb:master.

Codecov Report

Merging #167 into master will increase coverage by 0.29%.
The diff coverage is 59.37%.

@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
+ Coverage   65.76%   66.06%   +0.29%
==========================================
  Files          18       18
  Lines        4466     4452      -14
==========================================
+ Hits         2937     2941       +4
+ Misses       1343     1329      -14
+ Partials      186      182       -4

Impacted Files
Coverage Δ

server/service/util/heartbeat_util.go
33.33% <ø> (ø)
:arrow_up:

server/service/util/util.go
100% <ø> (ø)
:arrow_up:

server/service/util/schema_util.go
90% <ø> (ø)
:arrow_up:

server/service/util/rule_util.go
78.32% <ø> (ø)
:arrow_up:

server/service/util/microservice_util.go
61.19% <0%> (ø)
:arrow_up:

server/service/util/domain_util.go
76.71% <100%> (ø)
:arrow_up:

server/service/util/tag_util.go
63.63% <100%> (ø)
:arrow_up:

server/service/governservice.go
69.67% <25%> (+1.08%)
:arrow_up:

server/service/util/dependency.go
47.93% <42.85%> (ø)
:arrow_up:

server/service/util/instance_util.go
50.26% <50%> (ø)
:arrow_up:

... and 7 more

Continue to review full report at Codecov.

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


AB tests using the growth-book-redux-connector are not reliable

Describe the Issue
Although there is no difference between the variants in the 'aa-test' that used in growth-book-redux-connector, the current result shows that one variant is doing significantly better in converting users to donate.
Expected behavior
The number of donations should be close to one another in both variants
Screenshots

Any chance this just happened to be the pool of users? That is, 20 more from one group just happened to be more likely to donate.
Whilst it might look like 50% fewer donated from one group, in reality a difference of 20 users out of 200_000+ is not enough to draw a conclusion from.
Specifically, if you want a definitive control test to see if your AB algorithm works, I suggest something where the conversion involves 50_000+ users in each group. Then, a difference of 50% (~25_000) is noticeable - you would ignore 20 more users in one group, but would not ignore 25_000 more conversions from one group.
I hope that made sense

@ShaunSHamilton it's definitely possible this sampling error, but it seems unlikely. I've not analysed it carefully, but plugging these numbers into https://abtestguide.com/calc/ suggests that we're looking at a bit over 95% confidence.

@ShaunSHamilton, @ojeytonwilliams, the conversion convention is about 150, so I could wait a little bit longer before calling the experiment.
The reason I was suspicious of the results is that I got a very strong win on the first AB test (display_progress_modal_multiple_times experiment) that I implemented using the growth-book-redux-connector.
Here is the results:
A 258 / 145,759
B 301 / 146,045
chances to beat control is 96.36%

How is a "user" in that instance determined?

@naomi-lgbt, in this example refers to google analytic's user_pseudo_id. It is a cookie based identifier.

Do we deterministically derive the groups (A vs B) from the cookie? Or, is it a bit more random?
Also, what is given to Campers blocking GA?
I realise I could dig into the code, but appreciate the high-level overview first

@ShaunSHamilton, growthbook is currently only configured for signed in users.
Since all signed in users have emails, we encrypt  users emails to create unique identifiers and pass them as ids to growthbook.
Then, growthbook decides which users are assigned a certain variation based on their ids.
Campers who block GA are shown a variation based on their email, but their data is not collected and not analyzed.

in this example refers to google analytic's user_pseudo_id. It is a cookie based identifier.

So if I were to, say, sign in to two different devices, but only had ad-block on one of them, I could potentially get different results because one is based on my email and one is based on my GA? But still be the same user?

@naomi-lgbt, if you signed in from two different accounts, you would still still the same variant. however, since you would have different psudo ids based on your devices, you would end up with two different psudo user records.

I ran an in component AA test where I usually execute the donation AB tests. And the results seem reasonably evenly divided so far.

Closing with Ahmad's permission


⚠ Samsung has degraded performance

In 84eea65, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2231 ms

Resolved: Samsung performance has improved in df6ed41.