Initial deployment failed to create 	UseCasesTableXXX based on KMS validation error: com.amazonaws.services.kms.model.NotFoundException: Key 'arn:aws:kms:us-east-1:xxx:key/xxxx' does not exist

Describe the bug
Very first attempt to deploy the solution failed, after following the steps (stack name and admin email), the stack failed to deploy the nested stack "DeploymentPlatformStorageDeploymentPlatformStorageNestedStackDe-GKN9DKVAKLTC" based on failure to create the UseCasesTableXXX, resulting in following error:

Resource handler returned message: "KMS validation error: com.amazonaws.services.kms.model.NotFoundException: Key 'arn:aws:kms:us-east-1:xxx:key/xxx' does not exist (Service: AWSKMS; Status Code: 400; Error Code: NotFoundException; Request ID: xxx; Proxy: null) (Service: DynamoDb, Status Code: 400, Request ID: XXX)" (RequestToken: xxx, HandlerErrorCode: InvalidRequest)

To Reproduce
Deploy into us-east-1 with only specifying the Stack Name and Admin Email properties.
Expected behavior
Expect to deploy.
Please complete the following information about the solution:

[x] Version v1.1.1
[x] Region: us-east-1
[x] Was the solution modified from the version published on this repository? NO
[ ] If the answer to the previous question was yes, are the changes available on GitHub?
[ ] Have you checked your service quotas for the sevices this solution uses?
[x] Were there any errors in the CloudWatch Logs? CloudFormation error above is sufficient

Screenshots
If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).
Additional context
Add any other context about the problem here.

@JeremyJonas This is an intermittent issue that we noticed happen as well. The KMS used for the DynamoDB table is created by the DynamoDB service but sometimes takes longer than expected and hence the error. We continue to monitor the issue. I would suggest run it again in us-east-1 (the region where you were trying to deploy) and it should deploy fine. Please let us know if it fails consistently.


Fix for #2085 - "The Detaskening"

PR #2041 ended up introducing a 5% perf regression in the HTTP/1.1 path. After investigating, I tracked it down to the refactoring of parsing logic into a helper function. Prior to #2041, the HTTP/1.1 and HTTP/2 implementations of Frame (what is now HttpProtocol) had their own request processing loops and the parsing was done inline in this function (in fact, much of the logic was done in-line, or in functions that intentionally avoid creating an async state machine until necessary). In #2041, by refactoring the parsing logic into a helper function, an async state machine was created in every request (within the Http1Connection.ParseRequestAsync method).
So, unfortunately this means we can't have nice things and we have to unrefactor that logic. It also means that Http1Connection and Http2Stream (the two implementations of HttpProtocol) have to have mostly-similar ProcessRequestsAsync methods but we can't refactor them up to the base class (because it would create more state machines).
Open to suggestions on how to add the code sharing back in a performant way.
Perf Data:

Hardware
Benchmark
dev
This change
Ratio

Physical
Plaintext
1.246M
1.307M
1.246 / 1.307 = 0.953

Cloud
Plaintext
501,510.91
537,988.42
0.933 (but Cloud data is also a bit volatile)

/fyi @cesarbs, in case you're curious what the fix ended up being ;).

Welp, in tidying this up to focus just on removing the async state machine, I reintroduced the perf regression, indicating it's not actually that specific part of this change that caused the improvement.

False alarm! I'll have an update with the refactor. It preserves the same perf improvement as before (in my benchmarks)

:up: :date: @davidfowl @halter73 @pakrym - Managed to save the refactoring!

:up: :date: (running build/tests right now though, I may have derped something, but I think the feedback has been addressed)

Well, I got an assert about "Concurrent Timeouts not supported" on my build by AppVeyor succeeded. Might have derped something. Investigating.

Looks like there are cases where BeginRead can be called a second time for a single request but _requestProcessStatus will still be RequestPending. Investigating further.

Yep, it seems that if the first buffer is empty this can happen. Not sure what test is causing this situation. Think I might just go back to the InitializeParsing method. Any other solution I can come up with just ends up the same way (with some kind of boolean flag, which may as well just be done via an Initialize method since the caller already knows when the first call is)


add new keywords for constants

The config file constants are all given in the file https://github.com/dtcenter/MET/blob/e903f8fed8916dd5a97536777c48d8c191e2c7d7/met/data/config/ConfigConstants
These should all be included in the syntax highlighting.
// File types
GRIB1          = 1;
GRIB2          = 2;
NETCDF_MET     = 3;
NETCDF_PINT    = 4;
NETCDF_NCCF    = 5;
PYTHON_NUMPY   = 6;
PYTHON_XARRAY  = 7;

// Set Logic
NONE           = 1;
UNION          = 2;
INTERSECTION   = 3;
SYMDIFF        = 4;

// Interpolation method
NONE           = 1;
NEAREST        = 2;
MEDIAN         = 3;
UW_MEAN        = 4;
DW_MEAN        = 5;
LS_FIT         = 6;
BILIN          = 7;
NBRHD          = 8;
NEAREST        = 9;
BUDGET         = 10;
FORCE          = 11;
BEST           = 12;
UPPER_LEFT     = 13;
UPPER_RIGHT    = 14;
LOWER_RIGHT    = 15;
LOWER_LEFT     = 16;
PERC           = 17;
MIN            = 18;
MAX            = 19;
AW_MEAN        = 20;
GAUSSIAN       = 21;
MAXGAUSS       = 22;
GEOG_MATCH     = 23;

// Interpolation types
NONE           = 1;
BOTH           = 2;
FCST           = 3;
OBS            = 4;

// Interpolation Shapes
SQUARE         = 1;
CIRCLE         = 2;

// Track types
NONE           = 1;
BOTH           = 2;
ADECK          = 3;
BDECK          = 4;

// Interp12 types
NONE           = 1;
FILL           = 2;
REPLACE        = 3;

// Output flag values
NONE           = 1;
BOTH           = 2;
STAT           = 3;

// Bootstrapping interval type
PCTILE         = 1;
BCA            = 2;

// Grid weight flag settings
NONE           = 1;
COS_LAT        = 2;
AREA           = 3;

// Duplicate flag settings
NONE           = 1;
UNIQUE         = 2;

// Grid decomposition flag settings
NONE           = 1;
AUTO           = 2;
TILE           = 3;
PAD            = 4;

// Wavelet types
NONE           = 1;
HAAR           = 2;
HAAR_CNTR      = 3;
DAUB           = 4;
DAUB_CNTR      = 5;
BSPLINE        = 6;
BSPLINE_CNTR   = 7;

// MODE merging types
NONE           = 1;
BOTH           = 2;
THRESH         = 3;
ENGINE         = 4;

// MODE matching types
NONE           = 1;
MERGE_BOTH     = 2;
MERGE_FCST     = 3;
NO_MERGE       = 4;

// Distribution types
NONE           = 1;
NORMAL         = 2;
LOGNORMAL      = 3;
EXPONENTIAL    = 4;
CHISQUARED     = 5;
GAMMA          = 6;
UNIFORM        = 7;
BETA           = 8;

// PB2NC event stack
TOP            = TRUE;
BOTTOM         = FALSE;

Well, that last commit seems to break the syntax highlighting. I admit I didn't do anything very careful and don't understand how to specify language syntax, but I'll figure it out. Need to play around with it

Done! MET-syntax 0.0.2 for vscode is now live! 🥳
https://marketplace.visualstudio.com/items?itemName=brian-blaylock.met-syntax


Supplementary material about the paper

Thank you very much for your open source code. You mentioned in your paper that there are detailed network architecture in the supplementary materials, but there are no supplementary materials at the end of the paper. Could you provide them if it is convenient.

Thanks to the author for making the project open source. Can you provide supplementary materials?

Here it is: https://openaccess.thecvf.com/content/CVPR2023/supplemental/Lai_Spherical_Transformer_for_CVPR_2023_supplemental.pdf.


Add GraphQL query to fetch list of payments

In order to display all the payments (incoming and outgoing) in the Admin UI, we need a unified query that has the ability to paginate over all of them.

I've been trying to scope this out. This will take some changes to the db. We can't simply combine incoming/outgoing page results together (results would be wrong, we would have 2 cursors, and front end can already do this anyways). I see a few options which I dont have a strong preference on at the moment:

a new combinedPaymentsView. This view is basically a stored query to combine all the payments via a UNION ALL of incoming and outgoing (with new field specfying incoming/outgoing). The union will happen whenever the view is used so it's more expensive to read from than a table that just has them all combined, but it is a direct extension of our current schema.

slight variation on this is a materialized view which I don't think we want because it trades some payment read-heaviness for write-heaviness and adds some complexity with managing refreshing the view

refactor incomingPayments, outgoingPayments tables to inherit from a new parent payments table. The parent table would have the columns common to both tables and the child tables would have the non-shared columns. You can read/write to the child tables as we currently do but then we can also read from the parent table to get all of them without doing a UNION ALL every time. However, the parent records would not have the non-shared columns (such as incomingPayment.incomingAmountValue) which we probably want. In which case we need to JOIN which probably mitigates that advantage.

With either of these we can make a combined payments model using the view/parent table which we can then use our existing getPage method on.
Initially I prefered the new parent payments table with inheritance until realizing we'd likely need to join against the child tables. Performance-wise I'm not sure there is any meaningful difference, and its probably pre-mature to focus on that anyways. The table inheritance change would be a bit more complicated, although I think it does express a natural relationship between the data.

Some other details shared by Radu in our conversation:
This wil powering a list of payments which should only display the shared fields and they should be filterable by payment pointer and type (incoming or outgoing). From there you can navigate to the individual items which could then use the existing incoming/outcoming resolvers for more details.
Sorting was also discussed but was left out of this as it hasn't been implemented anywhere yet and I wasn't sure what that would take or how complicated that would be in combination with our pagination logic (which controls the sort order in places).


Upgrade jsonwebtoken to address security vulnerability

Packages impacted by this PR
@azure/identity, @azure/web-pubsub, @azure/web-pubsub-express, and @azure/web-pubsub-client
Live tests runs:

Identity
webpubsub

Issues associated with this PR
Fixes https://github.com/Azure/azure-sdk-for-js/issues/24337
Fixes https://github.com/Azure/azure-sdk-for-js/issues/24336
Fixes https://github.com/Azure/azure-sdk-for-js/issues/24334
Describe the problem that is addressed by this PR
There is a security vulnerability in v8 of the jsonwebtoken library. However, I can't shake the vulnerable version off our lock file completely because @azure/msal-node depends on it and they didn't make a release with the upgraded dependency yet, see my comment on their PR.
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
N/A
Are there test cases added in this PR? (If not, why?)
N/A
Provide a list of related PRs (if any)
N/A
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[x] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[x] Added a changelog (if necessary)

when can we expect a new release with this change?

It would be nice if this could be published asap.

I used the npm overrides in our project and ran all of the tests and it
looks good, no issues.
On Tue, Jan 3, 2023, 17:42 Jeff Fisher @.***> wrote:

@.**** approved this pull request.
Changes seem good.
Looking through the migration guide I don't think we'll have issues,
but maybe customers will experience some minor pain so I'm linking it here:
https://github.com/auth0/node-jsonwebtoken/wiki/Migration-Notes:-v8-to-v9
—
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-sdk-for-js/pull/24340#pullrequestreview-1234820095,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAXC456QCRS6SNJDS74WBWDWQRJHJANCNFSM6AAAAAATLARGNU
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<EMAIL_ADDRESS>has been released with the updated dependency. Please let me know if you have any questions.

we are using @azure/identity dependency, can we expect a release of same soon?

@deyaaeldeen Who can we nudge to release a new version for @azure/identity?

@pdurgapr and joaomoreno, jsonwebtoken is a devDependency only in @azure/identity, is a release still needed?

@pdurgapr and @joaomoreno, jsonwebtoken is a devDependency only in @azure/identity, is a release still needed? Also, an @azure/msal-node release is scheduled to happen today.

jsonwebtoken is a devDependency in @azure/identity, but it is also a transitive dependency for @azure/identity via @azure/msal-node. That's why the issues is raise in dependency scanning tools.

@mmajcica My team doesn't own @azure/msal-node but you can find a link in the PR description to a comment chain with them on releasing a patch. They said they're releasing today. You should be able to pick up their release of @azure/msal-node without us releasing @azure/identity.

@deyaaeldeen I know, but @azure/identity depends on @azure/msal-node

@mmajcica Yes, I guess what I was trying to say is that once msal-node releases, you should be able to get it by doing a fresh dependencies installation (e.g. by deleting the lockfile). Let me know if that doesn't work for you and we can try to arrange for a @azure/identity release.

<EMAIL_ADDRESS>has been released.

@mmajcica Yes, I guess what I was trying to say is that once msal-node releases, you should be able to get it by doing a fresh dependencies installation (e.g. by deleting the lockfile). Let me know if that doesn't work for you and we can try to arrange for a @azure/identity release.

Confirming that it doesnt work


Decouple estrategies from unleash client leveraging DI

Decouple strategies from unleash client creation levaraging dependency injection.
A light a discussion on issue from https://github.com/Unleash/unleash-client-core/issues/25 could give some insights

Like something https://github.com/App-vNext/Polly#policyregistry maybe

Constructor overloading could be, for now, a good idea to handle backward compatibility

I don't think you're going to be able to handle #25 without having at least 1 breaking client change on the DefaultUnleash constructor.  UnleashSettings currently contains settings + services (including a context provider).  The IUnleashServices (with the exception of the IUnleashContextProvider) should be a disposable singleton (to stop timers & hopefully avoid ObjectDisposedExceptions at shutdown), the context provider should be request scoped, and the settings (minus services) can be scoped however.  See https://github.com/scottt732/unleash-client-core/blob/master/src/Unleash/DefaultUnleash.cs#L27 vs. https://github.com/Unleash/unleash-client-core/blob/master/src/Unleash/DefaultUnleash.cs#L37

To keep going, create a new project, focusing only with .net-core compatibility, and minding out the idea of compatibility until an first release (of the new project), could keep things going, that seems reasonable @scottt732?
This should allow a more fluid developing...


Added method for clearing the instances of JavaParserFacade. #44

Why do we want to clear the instances of the facade?

I want to clear them because otherwise they build up in memory without any means of getting rid of them (e.g. when the application running the type solver moves on to handle different java files, or a totally different java project.
We had that problem of an ever growing pool of allocated memory with Coati and clearing the facade instances solves this issue.

Ok, that makes sense. I will merge this and add a comment about this reason.


Custom rates for Meter

Added a feature to allow the application to define custom rates for Meters beyond the built-in 1-min, 5-min and 15-min rates.

Something like this will make it into v4, but it's going to be a much larger change, to allow for reporters to report the values.


Implement REST API for IoTDB

I think we need to add demo picture(test result) in this pr to prove


chore: add DartPad Firestore example

Adds DartPad components to MDX:

https://flutter-firebase-docs--pr7344-dartpad-qls1nlc2.web.app/docs/firestore/example

Nice. I'd probably sleep easier if we used a new firebase project for the examples and avoid using react-native-firebase-testing before we make this live - just conscious of users hacking around with these credentials on DartPad and causing issues/rate limiting with e2e tests on RNFB & FF

可以拉取合併嗎？謝謝

可以拉取合併嗎 謝謝


Exception: SNlM0e value not found in response. Check __Secure-1PSID value.

I have this error when trying to make a request. I have checked the __Seecure-1PSID value and it is correct. I know that the Bard developers updated Bard recently, when I tried to log in on my browser it prompted me with a captcha to make sure I wasn't a robot. Will this API be screwed because of this?

Due to recent updates, I am unable to provide accurate answers. There are various situations occurring with functionalities that are not supported in my country and specific to individual accounts. However, if you have entered the correct values, please try restarting your browser or clearing your cookies. Alternatively, you can refer to https://github.com/dsdanielpark/Bard-API#auto-cookie-bard and try using the following code.
Please close all windows and try calling the following method while logged in to your Chrome Incognito browser.
from bardapi import Bard

bard = Bard(token_from_browser=True)
res = bard.get_answer("Do you like cookies?")
print(res)

I was having the same issue. Someone in a previous thread suggested it had something to do with being logged into multiple google accounts and to try an incognito window, logging in and getting the cookie value from there. That worked for me.

@sudipkumarbhattacharya
Please try to use bard first from your browser, and then copy the cookie value and try again from python
If it doesn't work, sign out from all google accounts in your computer, and then sign in to bard from google chrome
after you finish, update bard api library as follow:
pip3 install -U bardapi

And then run this code as is:
from bardapi import Bard

bard = Bard(token_from_browser=True)
res = bard.get_answer("Do you like cookies?")
print(res)

The solution for me was the refresh the cookies in my browser.


corner case in example code

plural = { count ->
        val value = when (count) {
            1, 2 -> "few"
            in 3..10 -> "bunch of"
            else -> "lot of"
        }
        "I have a $value apples"
    }

If put count = 0 it will return "lot of" which is not true.

Good catch! Fixed on README.


Config not generated

Expected behavior
Config should be generated automatically.
Observed/Actual behavior
Config is not generated and an exception is thrown
Steps/models to reproduce
1-Open a server
2-Exception should be thrown
Plugin and Datapack List
None
Folia version
[13:17:04 INFO]: This server is running PaperRecord version git-Folia-"b72f6a1" (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: b72f6a1)
Other
No response

I found it is a bug. It cant generate a config in Linux but works in Windows. I will have to update it when I can. If you add the config manually it will work. For now, you can create a config in the config folder.
ServerSideReplayRecorder.yml
#Config for Server Side Replay Recorder
##WARNING any comments in this file might get deleted
command_op_level: 4
replay_folder_name: "replay_recordings"
server_name: "My Server"
recordable_users: []
recording_enabled: true
assume_unloaded_chunks_dont_change: true
max_file_size:<PHONE_NUMBER>0
debug: false
use_username_for_recordings: true
invert_user_list: false
use_server_timestamps: true
render_distance_fog_fix: false
file_storage_url: "https://file.io/"

Seems on linux it ends up in the folder the server folder is in. (badly used /)


Enabling symlink creation on Windows

This adds symlink creation for Windows for 'latest {Verb}'. Currently os.symlink only works when run with administrator privileges and it will throw an OSError if symlink privileges are not available.

Please address the linter warning and update the corresponding test to not skip Windows.

Is it ok to assume the test will be run with admin privileges on Windows?

I don't know what AppVeyor uses.

Codecov Report

Merging #132 into master will decrease coverage by 0.11%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #132      +/-   ##
==========================================
- Coverage   78.57%   78.45%   -0.12%
==========================================
  Files          51       51
  Lines        2884     2883       -1
  Branches      482      482
==========================================
- Hits         2266     2262       -4
- Misses        592      594       +2
- Partials       26       27       +1

Impacted Files
Coverage Δ

colcon_core/location.py
96.66% <0%> (-3.34%)
:arrow_down:

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 83bf039...004ef7c. Read the comment docs.

Great contribution!

Thanks Dave!
On Wed, Nov 21, 2018 at 3:54 PM Dave Coleman<EMAIL_ADDRESS>wrote:

Great contribution!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/colcon/colcon-core/pull/132#issuecomment-440853636,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA_x-iDtl_-M57C9K0zWLvQNW0ge5dc1ks5uxee5gaJpZM4Yt75-
.

Can you please update the test to also mock the symlink function and raise the expected exception to cover these new lines.

@brawner Friendly ping.

@dirk-thomas In order to raise the exception, the user must be demoted to standard privileges and I cannot find a way to do this on Windows in the middle of a Python script. Changing permissions in the directory to read-only will raise a different exception (PermissionsError).
Are there any other alternatives I'm not thinking about?

Thank you for the patch.


Add binary trees sheet

I have made an extensive sheet for revising binary trees for placement prep in c++ please assign this issue to me

I have created Notes On trees topic in coloured visualize format for better understanding along with code snippet and covered Following Topics :

Max depth of Binary tree
Max depth of N-ary tree
Preorder of binary tree
Preorder of N-ary tree
Postorder of binary tree
Postorder of N-ary tree
Inorder of Binary tree
Merge two binary trees
Sum of root to leaf paths
Uni-valued Binary tree
Leaf similar trees
Binary tree paths
Sum of Left leaves
Path sum
Left view of Binary tree
Right view of Binary tree
Same tree
Invert Binary tree
Symmetric tree
Cousins of Binary tree

Hoping to get assign this task to me : Thank you

please assign this task to me?

I can work on this issue. Please assign this to me


fix [#7368] Caffe converter test fails, causing CI to halt for all PRs

Thanks.
Could you revert this PR https://github.com/apache/incubator-mxnet/pull/7369/files to make sure it works?

Yes, I have test it locally. The fix works
INFO:root:test performance of model: vgg-16
INFO:root:./model/vgg-16_deploy.prototxt exists, skip to downloada
INFO:root:./model/vgg-16.caffemodel exists, skip to downloada
INFO:root:Saved checkpoint to "./model/vgg-16-0000.params"
INFO:root:speed : 145.695274 image/sec
INFO:root:('accuracy', 0.72265625)
INFO:root:('top_k_accuracy_5', 0.8984375)
INFO:root:test performance of model: resnet-50
INFO:root:./model/resnet-50_deploy.prototxt exists, skip to downloada
INFO:root:./model/resnet-50.caffemodel exists, skip to downloada
INFO:root:./model/resnet-50_mean.binaryproto exists, skip to downloada
INFO:root:Saved checkpoint to "./model/resnet-50-0000.params"
INFO:root:speed : 258.344333 image/sec
INFO:root:('accuracy', 0.75390625)
INFO:root:('top_k_accuracy_5', 0.92578125)

Thanks, @joey2014. Please revert the removed test cases.


Unethical behaviour

Please make this repo private or delete it. A lot of importers are using it to clear the course. This is highly unethical behavior.

Clear the course directly with the answer benefits nobody. Mature adults know what should they do.


How can I break the line when the gorm tag is too long

Your Question
My index tag is to long, I try add \ and \n ,but can't use
type BasicChargeSetting struct {
	ID        uuid.UUID `gorm:"primaryKey;uniqueIndex;type:uuid;default:uuid_generate_v4();index:idx_basic_charge_setting_id_organization_id,unique"`
	CreatedAt time.Time `gorm:"not null;default:CURRENT_TIMESTAMP"`
	UpdatedAt *time.Time
	DeletedAt gorm.DeletedAt
	SortIndex int
	// belongs to Organization
	OrganizationId uuid.UUID `gorm:"index;index:idx_basic_charge_setting_id_organization_id,unique;index:idx_basic_charge_setting_organization_id_patient_id"`
	Organization   Organization
	// belongs to OrganizationBasicChargeSetting
	OrganizationBasicChargeSettingId uuid.UUID `gorm:"index;"`
	OrganizationBasicChargeSetting   OrganizationBasicChargeSetting
	// belongs to Patient
}

I want know how can add newline syntax in gorm tag

https://github.com/golang/go/issues/15893

Sorry15893 can't help me,
I use this code, but VSC have this warning
type BillChargeSetting23 struct {
	ID uuid.UUID `gorm:"primaryKey;uniqueIndex;type:uuid;
	default:uuid_generate_v4()"`
}

struct field tag "gorm:"primaryKey;uniqueIndex;type:uuid;\n\tdefault:uuid_generate_v4()"" not compatible with reflect.StructTag.Get: bad syntax for struct tag valuestructtag

golang does not support tag line breaks


update path

Include '/lib' in addpath to make it work

Hi ChuntaoLu,
Thanks for the contribution. I'll merge your pull request soon.

Hi ChuntaoLu,
I merged your branch to develop. It will be available in the master branch in next bugfix release v2.1.1.
Once again, thanks a lot.


"Săcel", "Șoimușu Mare", "Șoimușu Mic", "Uilac" and "Vidacut" are listed in the drop-down menu

Description:
"Săcel", "Șoimușu Mare", "Șoimușu Mic", "Uilac" and "Vidacut" are listed in the drop-down menu alongside its corresponding county and commune, according to the law
Precondition:
The website is up an running.

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Type "Șoimușu Mare" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Șoimușu Mare, HARGHITA (Săcel)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Type "Șoimușu Mic" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Șoimușu Mic, HARGHITA (Săcel)".

Step 6
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 8
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 9
Type "Vidacut" in the search bar.

Expected results
The location is listed in the drop-down menu as "Sat Vidacut, HARGHITA (Săcel)".


istioctl kube-inject is broken in master(0.2)

istioctl kube-inject called without parameters injects by default a proxy with tag 0.1.
This is now broken in istio/istio master, because the pilot agent has recently changed to no longer take the sidecar parameter.
The fix is to change kube-inject to read the hub and tag from the istio config map.
This requires a corresponding fix in istio/istio to change the config map.

I thought I had filled that already but can't find it:
we need to make sure the proxy tag has 3 digits and not 2 so pushing a new one doesn't insta change/break earlier releases
also be extra careful to not modify the 0.1 (0.1.6) image

this is again a problem with two repos. istioctl is built in pilot but needs to use istio.VERSION in istio/istio.

https://github.com/istio/pilot/issues/568
cc @sebastienvas - I recall we used 2 digits (no patch) to avoid having to rebuilt istioctl for each version. At the time it made sense, but in practice we haven't made that many patch releases.

It does not use or need to use istio.VERSION.
Right now, the pilot e2e tests pass because they pass hub and tag to istioctl kube-inject, which override the values read from the configmap.
The PR will be first in pilot, then in istio.

istio.VERSION defines the release target version that needs to be passed to already-compiled istioctl. This is due to backwards build process that we have.

There was no 0.2 release yet, so I am assuming what Jason is saying is correct. We probabaly going to make a release this week to make sure we still can.

this should work in 0.2.0 (reopen if not)


Console application logging always writes messages of category 'application' even if exempt

What steps will reproduce the problem?
Create a console application and use logging. We use logging to a database table.
    'log' => [
        'targets' => [
            [
                'class' => 'yii\log\DbTarget',
                'levels' => ['error', 'warning','info'],
                'except' => [
                   'yii\db\*',
                   'yii\swiftmailer\*',
                   'application'
                 ],
            ],
        ],
    ],

As you can see the category 'application' is exempt from logging.
What is the expected result?
Messages of category 'application' should not be written to the log table/file.
What do you get instead?
Messages of category 'application ' and log level 4 which look like this
$_SERVER = [
'LANGUAGE' => 'en_US:en'
'HOME' => '/root'
'LOGNAME' => 'root'
'PATH' => '/usr/bin:/bin'
'LANG' => 'en_US.UTF-8'
'SHELL' => '/bin/sh'
'PWD' => '/root'
'PHP_SELF' => '/service/engine/yii'
'SCRIPT_NAME' => '/service/engine/yii'
'SCRIPT_FILENAME' => '/service/engine/yii'
'PATH_TRANSLATED' => '/service/engine/yii'
'DOCUMENT_ROOT' => ''
'REQUEST_TIME_FLOAT' =><PHONE_NUMBER>.0434
'REQUEST_TIME' =><PHONE_NUMBER>
'argv' => [
0 => '/service/engine/yii'
1 => 'webserver/process-action-queue'
]
'argc' => 2
]
Additional info

Q
A

Yii version
2.0.6

PHP version
5.5.9ubuntu

Operating system
Linux

Is it the same for non-console?

I only have a console application in Yii2 so I couldn't tell, sorry.

I've verified it works as expected with the config provided i.e. when application is in except logs aren't added to database. Otherwise they are.

@c-schmitz the message you see is created by logVars property of the log target. set that to an empty array to avoid logging this message.

@cebe Setting logVars to en empty array works just fine as a workaround, thank you.
@samdark So you are saying this is fixed in the latest version?

@c-schmitz what was your logVars before you changed it as @cebe suggested?

By default it logs in web/console/everywhere.
The cause is
https://github.com/yiisoft/yii2/blob/64adbd73c626b66e13208a11a0456157954915b4/framework/log/Target.php#L151
This line is called after filtration messages.
$this->messages[] = [$context, Logger::LEVEL_INFO, 'application', YII_BEGIN_TIME, [], 0];
So, this message is always will put in a log file even if you only want to log errors. Nightmare for devops)
The quick fix is logVars = []

Seems it is configurable so closing the issue. Nothing we need to fix.


invalid character 'N' looking for beginning of value

Hi, just trying to test out LFS using Gitlab. I've followed the setup instructions (installed Windows binary, ran git lfs install, no errors). However, when I push:
"C:\Program Files (x86)\Git\bin\git.exe" push -u --recurse-submodules=check --progress "origin" refs/heads/master:refs/heads/master
trace: built-in: git 'push' '-u' '--recurse-submodules=check' '--progress' 'origin' 'refs/heads/master:refs/heads/master'
trace: run_command: 'C:\Program Files (x86)\GitExtensions\PuTTY\plink.exe' '-batch' 'git@XXXXXXXXXXXXXX' 'git-receive-pack '\''alexander.farley/lfstest.git'\'''
trace: run_command: '.git/hooks/pre-push' 'origin' 'git@XXXXXXXXXXXXXX:alexander.farley/lfstest.git'
trace: exec: 'git-lfs' 'pre-push' 'origin' 'git@XXXXXXXXXXXXXX:alexander.farley/lfstest.git'
trace: run_command: 'git-lfs' 'pre-push' 'origin' 'git@XXXXXXXXXXXXXX:alexander.farley/lfstest.git'
trace git-lfs: run_command: git rev-list --objects 220e84f2c702e4893b58a16b98eaea3b75676c65 --not --remotes=origin --
trace git-lfs: run_command: git cat-file --batch-check
trace git-lfs: run_command: git cat-file --batch
trace git-lfs: run_command: 'git' config -l
trace git-lfs: tq: starting 3 transfer workers
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: tq: sending batch of size 1
trace git-lfs: ssh: git@XXXXXXXXXXXXXX git-lfs-authenticate alexander.farley/lfstest.git upload
trace git-lfs: ssh: upload attempted with git@XXXXXXXXXXXXXX.  Error: invalid character 'N' looking for beginning of value
invalid character 'N' looking for beginning of value

invalid character 'N' looking for beginning of value
Git LFS: (0 of 1 files) 0 B / 30.55 MB
error: failed to push some refs to 'git@XXXXXXXXXXXXXX:alexander.farley/lfstest.git'
Done

This is using Gitlab 6.6.5.
git --version:
git version 1.9.4.msysgit.2

Doesn't look like gitlab supports LFS completely. Try using an HTTPS remote instead of SSH. Report back if there's another issue.


rename this package to TIFFFiles?

Yes it's a bit weird for TIFFFiles, but there was a discussion on names when registering PNGFiles
https://github.com/JuliaRegistries/General/pull/9508

TIFFFiles is pretty clunky, I'm not that enamored with any of the names suggested in that thread. What about TaggedImages.jl? Because (besides the basic TIFF IO) this package has types for associating data with slices of a 3D array.
@ianshmean, @DilumAluthge, @timholy thoughts?

I worry that TaggedImages won't be easily discoverable, it depends on having the fact that TIFF=tagged image file format at the tip of your tongue.

Having TIFF in the name seems like a good idea, but for FileIO purposes, if the user tries to load a .tiff they'll be told to install ImageIO so the name won't be visible to them, so discoverability seems more of an advanced user issue?
It's really unfortunate that TIFFFiles feels clunky. I thought it was just quirky.. but it is mildly frustrating to check that there are enough F's in there.
Maybe TIFF is fine as it is? I mean, the acronym does already include "Files"

Personally, I’d recommend something like this:

TIFFFiles.jl
TIFFImages.jl
TiffFiles.jl
TiffImages.jl

I really want to avoid adding new packages to General that are just acronyms/initialisms. Especially if the package name is relatively short.

So I've come around on this and I think the least clunky name is @DilumAluthge's suggestion of TIFFImages.jl. Additionally, I agree with @ianshmean that most people probably won't need to even know about this package (unless there's a bug :cold_sweat:). Also given that the Julia package manager autocompletes package names, discoverability wouldn't be too bad since you could just type julia> add TIFF<tab> to find it.

So I've come around on this and I think the least clunky name is @DilumAluthge's suggestion of TIFFImages.jl. Additionally, I agree with @ianshmean that most people probably won't need to even know about this package (unless there's a bug :cold_sweat:). Also given that the Julia package manager autocompletes package names, discoverability wouldn't be too bad since you could just type julia> add TIFF<tab> to find it.


Update code in comment – .newer → [NEWER]

To match the style of [OLDER] earlier in the same line, and the use of [NEWER] in the many lines above.

In case you want to get this merge, please rebase on latest master and I'd be happy to accept


put_assoc/3 apparently ignores unique_constraint on a deeply nested entity if the passed entity is valid

Elixir version
Elixir 1.16.2 (compiled with Erlang/OTP 26)
Database and Version
PostgreSQL 16.1
Ecto Versions
3.12.4
Database Adapter and Versions (postgrex, myxql, etc)
postgrex 0.19.1
Current behavior
I've lost quite some time on this, but in the hope of helping someone out there, I want to double check this is expected behavior. The following paper cut seems not to be addressed in the forums, nor in the docs (AFAIK!), so maybe it's worth posting it here.
TLDR
I have a 2-steps validation scenario, in which I need to map an intermediate embedded schema to my entity/db schema, as suggested in the docs.
The docs mention mapping the schema into a map (the to_profile bit of that page), but that would require me to cast that map into my db schema again, and I'd like to avoid that; I would avoid casting on internal parameters: indeed, this is internal data, which is validated already, so why would I need casting again!
So, instead of a plain map, I tried building my internal data via put_assoc (after reading this), but I got hurt with a unique_constraint validation, which apparently isn't applied if the inputted schema is valid.
This might make sense at first, because unique_constraint is run only when hitting the db, but it really doesn't click with me if, indeed, hitting a Repo.insert raises instead of returning a {:error, _} changeset (?).
Context
Given that a phone_number already exists on my db, I'm writing a test that expects {:error, _} when creating a %User with the same phone number.
The user creation flow is the following:

The inputted data is validated against an intermediate embedded schema.
The phone number given in the intermediate schema must be validated via an external service (OTP)
I sign up my account on an external auth service, using the info from the intermediate schema (firebase in this case)
Finally, I combine the above (intermediate+OTP+firebase information), so that I can build a User.changeset
I can finally commit via Repo.insert

The flow above  is why I've found the intermediate embedded schema is so useful: I can validate a user email, password, and so on, before ever touching external services, or even worse my db.
To clarify, this is my User schema:
defmodule MyApp.Accounts.Users.User do
  use Ecto.Schema
  import Ecto.Changeset

  @primary_key false

  schema "accounts_users" do
    field :referral_code, Ecto.UUID, writable: :insert

    belongs_to :account, MyApp.Accounts.Account, primary_key: true

    timestamps(type: :utc_datetime)
  end

  # changesets...
end

Now as you can see User is a weak entity; its parent's schema, Account, is the following:
defmodule MyApp.Accounts.Account do
  use Ecto.Schema
  import Ecto.Changeset

  @roles [ ...  ]

  schema "accounts" do
    field :role, Ecto.Enum, values: @roles
    field :firebase_uid, :string, writable: :insert
    field :deactivated_at, :utc_datetime

    has_one :account_info,
            MyApp.Accounts.AccountsInfo.AccountInfo,
            on_replace: :update

    has_one :user, MyApp.Accounts.Users.User
    # ... other has_one relationships

    timestamps(type: :utc_datetime)
  end

  @doc false
  def changeset(account, attrs) do
    account
    |> cast(attrs, [:firebase_uid, :role, :deactivated_at])
    |> cast_assoc(:account_info)
    |> validate_required([:firebase_uid, :role])
    |> unique_constraint(:firebase_uid)
  end
end

Here's the intermediate (embedded) schema.
defmodule MyApp.Accounts.Account.Create do
  use Ecto.Schema
  import Ecto.Changeset

  alias MyApp.PhoneNumbers.PhoneNumber

  embedded_schema do
    field :email, :string
    field :password, :string
    field :phone_number, PhoneNumber # Ecto custom type
    field :first_name, :string
    field :last_name, :string
  end

  def changeset(create, attrs) do
    create
    |> cast(attrs, [:email, :password, :phone_number, :first_name, :last_name])
    |> validate_required([:email, :password, :phone_number, :first_name, :last_name])
    |> validate_length(:password, min: 12)
    |> validate_format(:email, ~r/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/)
  end
end

Finally, Account has_one AccountInfo, another weak entity. This is where I store some of the intermediate data.
Here's its schema:
defmodule MyApp.Accounts.AccountsInfo.AccountInfo do
  use Ecto.Schema
  import Ecto.Changeset

  alias MyApp.PhoneNumbers.PhoneNumber

  @primary_key false

  schema "accounts_info" do
    field :phone_number, PhoneNumber
    field :first_name, :string
    field :last_name, :string

    belongs_to :account, MyApp.Accounts.Account,
      on_replace: :mark_as_invalid,
      primary_key: true

    timestamps(type: :utc_datetime)
  end

  @doc false
  def changeset(account_info, attrs) do
    account_info
    |> cast(attrs, [
      :phone_number,
      :first_name,
      :last_name
    ])
    |> validate_required([
      :phone_number,
      :first_name,
      :last_name
    ])
    |> unique_constraint(:phone_number)  # !!
  end
end

Paper cuts
The above unique_constraint is what gave me a hard time today.
Indeed, as I wrote up above, I'll eventually need to map Account.Create into a User.
To do so, I've tried the following, as mentioned in the cheatsheets:
# given `%{}Account.Create = create` manually build the account
account = %Account{
  firebase_uid: fuid,
  role: :user,
  account_info: %AccountInfo{
    phone_number: create.phone_number,
    first_name: create.first_name,
    last_name: create.last_name
  }
}

# put the account into my user
%User{}
|> change()
|> put_assoc(:account, account)
|> put_change(:referral_code, Ecto.UUID.generate())

But when I run the  above changeset on a Repo.insert, I get:
  ** (Ecto.ConstraintError) constraint error when attempting to insert struct:

  * "unique_accounts_info_phone_number" (unique_constraint)

  If you would like to stop this constraint violation from raising an
  exception and instead add it as an error to your changeset, please
  call `unique_constraint/3` on your changeset with the constraint
  `:name` as an option.

  The changeset has not defined any constraint. (!?)

This is a classic Ecto error: it says I'm violating a constraint without setting a changeset rule, so it defaults to a raise. Which is weird, because you can totally read the unique constraint changeset, above.
I doubled checked both in my migrations and my local test database, and I correctly see unique_accounts_info_phone_number in my DB.
AFAIK this is okay, because Ecto defaults to "#{table}_#{prop}_index" as its naming convention; thus, my unique_contraint should be okay.
Luckily, the last part of the message was very informative (The changeset has not defined any constraint), but it made me think: how could it be Ecto can't see any constraint!?
I can easily solve this, by mapping my intermediate schema into another intermediate plain map, and then cast it to my entity, as if it was external data.
Indeed the following correctly triggers {:error, ...}, mentioning that the phone has already been taken.
attrs = %{
  "account" => %{
    "firebase_uid" => fuid,
    "role" => :user,
    "account_info" => %{
      "phone_number" => create.phone_number,
      "first_name" => create.first_name,
      "last_name" => create.last_name
    }
  }
}

%User{}
|> cast(attrs, [])
|> cast_assoc(:account, required: true)

I think the problem is that since an unique_constraint is checked only against a Repo operation, and since put_assoc is putting an apparently valid entity into the changeset, Ecto skips the unique_constraint entirely.
Is my hypothesis correct?
But most importantly, is this expected behavior?
Expected behavior
I'm not sure, hence this issue.

Hi @lucavenir ,
If I understand correctly, you are doing this
account = %Account{
  firebase_uid: fuid,
  role: :user,
  account_info: %AccountInfo{
    phone_number: create.phone_number,
    first_name: create.first_name,
    last_name: create.last_name
  }
}

# put the account into my user
%User{}
|> change()
|> put_assoc(:account, account)
|> put_change(:referral_code, Ecto.UUID.generate())

And then calling Repo.insert on the result. So you are passing your associations as structs rather than changesets. Ecto won't know about the constraint unless you call this code and then pass the resulting changeset:
def changeset(account_info, attrs) do
    account_info
    |> cast(attrs, [
      :phone_number,
      :first_name,
      :last_name
    ])
    |> validate_required([
      :phone_number,
      :first_name,
      :last_name
    ])
    |> unique_constraint(:phone_number)  # !!
  end

The constraint information is stored on the changeset struct after calling the unique_constraint function. Then the error from Postgres is compared against it. So passing a plain %AccountInfo struct won't have that information.

First of all, I'm so sorry if I've made you waste time. It wasn't my intention.
I've read the docs, like almost every page, especially the "mapping" part and the "cast vs put" parts.
I thought there was something not working on Ecto's end!
But instead I missed this bit on put_assoc/4 inline docs:

The associated data may be given in different formats:

a map or a keyword list [..] the given map (or struct) is not validated in any way and will be inserted as is.
changesets [..] they are treated as the canonical data and the associated data currently stored in the association is either updated or replaced
structs [..] they are treated as the canonical data and the associated data currently stored in the association is replaced

So yeah, that's the problem.
It looks that mapping from an intermediate schema to a concrete schema must pass from an intermediate map / keyword list, else the changeset will short circuit a struct.
Nonetheless, I think we might exploit this issue as a documentation change proposal.
At the end of this paragraph, I read:

Note we have used MyApp.Repo.insert_all/2 to add data to both "accounts" and "profiles" tables directly. We have chosen to bypass schemas altogether. However, there is nothing stopping you from also defining both Account and Profile schemas and changing to_account/1 and to_profile/1 to respectively return %Account{} and %Profile{} structs. Once structs are returned, they could be inserted through the usual MyApp.Repo.insert/2 operation. Doing so can be especially useful if there are uniqueness or other constraints that you want to check during insertion.

The bold quoted part confuses me the most: it's suggested to return structs, so that an insert operation could check for uniqueness. Which is exactly what I've tried.

Very good feedback! We should improve those sections for clarity and mention that they could be further wrapped in their own changesets.

I'd be up for a PR on this, but I fear my lack of expertise might get in the way.

You don't have to worry about that :). We will collaborate with you after the PR is submitted.
But it's entirely you're choice. If you are interested then please go for it:). If not then we will take it up.


🌐 Add French translation for docs/fr/docs/index.md

Hello 👋
This is a PR to translate docs/index.md to french 🇫🇷
As a reminder, I took the previous PRs (https://github.com/tiangolo/fastapi/pull/1973 and https://github.com/tiangolo/fastapi/pull/4203) and combine them into this new PR in order to close the previous ones.
According to the discussion: https://github.com/tiangolo/fastapi/discussions/9185.
Saving you some clicks:

the formatted document: here
the diff from English: here

Thanks for the reviews 🙏

Hi @tiangolo 😊 If this PR receives the two necessary approvals, the PRs https://github.com/tiangolo/fastapi/pull/1973 and https://github.com/tiangolo/fastapi/pull/4203 can be closed.
Thanks 🙏🏻

Hi @rjNemo 😊 I applied your suggestions! Thanks for your returns.

Hi @Viicos 😊 I applied your suggestions! Thanks for your returns.

Awesome, thank you @frabc! :bow:
And thanks for the reviews @Viicos, @axel584, @rjNemo! :coffee:


BUG: text not visible subscribe buttom pricing page

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
text not visible on subscribe buttom in pricing page

Record

[X] I agree to follow this project's Code of Conduct
[ ] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@anuragverma108 @huamanraj, can you please check my PR?


Send an email to the admin whenever there's an approval task

Describe your problem(s)
Currently, there's no way of notifying the admin of the APIM about various approval task he/she has to approve. I think the only way is that admin has to manually login to /admin app and resolve them. Due to this, some time sensitive approvals might go unnoticed, which would potentially cause a business loss.
Describe your solution
Whenever an approval task it added (E.g user account approval,  application or subscription approval), all users of the admin role should be notified via an email. Email body optionally can have a link to approve or reject it without even logging to the admin app.
How will you implement it
This can be done by extending the default functionality of the Workflow executors. An email template should be provided as a part of the implementation.

Hello, is there a workaround to get email notification when someone signs up via self-service signup in Dev Portal?


Bug in the Python version example for attaching a camera

Hi @costashatz, here is an issue associated to the Joss review https://github.com/openjournals/joss-reviews/issues/6771
I tried to attach a camera to the end of the pendulum link and the result was not as expected. After reviewing the sample code in the FAQ (which is the same than the one in cameras.py), I figured out a bug. Here is the original  proposed code:
tf = dartpy.math.Isometry3()
rot =  dartpy.math.AngleAxis(3.14, [1., 0., 0.])
rot = rot.multiply( dartpy.math.AngleAxis(1.57, [0., 0., 1.])).to_rotation_matrix()
tf.set_translation([0., 0., 0.1])
camera.attach_to_body(robot.body_node("iiwa_link_ee"), tf) # cameras are looking towards -z by default

For the C++ version, we have:
Eigen::Isometry3d tf;
tf = Eigen::AngleAxisd(3.14, Eigen::Vector3d{1., 0., 0.});
tf *= Eigen::AngleAxisd(1.57, Eigen::Vector3d{0., 0., 1.});
tf.translation() = Eigen::Vector3d(0., 0., 0.1);
camera->attach_to_body(robot->body_node("iiwa_link_ee"), tf); // cameras are looking towards -z by default

In the C++ version, we can see that tf is initialized with the rotation parameters, which is not the case in the Python version. Then, the Python version created the rot matrix to adjust the orientation of the camera (I think it is to compensate that camera looks towards the -z axis), but it does not use it! Thus, I added the following line in the code between the two last lines, and the result looked as expected:
tf.set_rotation(rot)

Can you confirm my patch is correct and update the example and doc accordingly?
Last question: why do you need to move the camera of 0.1 on the z axis? Is it to be a little bit more far from the node to avoid some kind of artifact if we put the camera exactly on the node?

@c-joly feel free to re-open the issue if #218  did not fix this :) Thanks again!


CXF-8457 Provide OpenTelemetry support

A new module under integration/tracing is introduced to add support for tracing with OpenTelemetry (short OTel).
For few changes have been done:

Add the OTel BOMs in the parent/pom.xml dependency management (too much? should keep only the dependencies that are used?)
The new module is strongly inspired by the integration/tracing/tracing-opentracing module
The tracing systest was enriched with tests dedicated to OpenTelemetry in the JaxRS and JaxWS contexts

Thanks @mederel for the contribution, to help you with question a bit

Add the OTel BOMs in the parent/pom.xml dependency management (too much? should keep only the dependencies that are used?)

It is fine to add CXF deps to BOM (but not external deps like OTEL etc)

Thanks a lot @mederel !


Have the ability to build many to many relationship

Hi, can you provide more details on what you would like moor to support? It is already possible to construct n:m relationships by creating multiple tables and then using joins.

Hi, thank you for your feedback. What i want to construct  is tow tables (person and group) with n:m relationships. you mentioned that is possible to construct this relationships. Could you please provide me example for this case, because I didn't found anything in the documentation.

You could use these tables:
@DataClassName('Person')
class People extends Table {
  IntColumn get id => integer().autoIncrement()();
  TextColumn get name => text()();
}

class Groups extends Table {
  IntColumn get id => integer().autoIncrement()();
  TextColumn get description => text()();
}

class Memberships extends Table {
  IntColumn get person =>
      integer().customConstraint('NOT NULL REFERENCES people(id)')();
  IntColumn get group =>
      integer().customConstraint('NOT NULL REFERENCES groups(id)')();

  @override
  Set<Column> get primaryKey => {person, group};
}

Hard to give examples for queries without knowing what you want to achieve. Here's an example that also uses n:m relationships (by modeling shopping carts): https://gist.github.com/simolus3/b881d1a5cbb308d549dd484204e25776 Maybe that's helpful for you as well, but if you have questions on how to write a specific query in moor just let me know.

@simolus3 I have a question for you.
In my model classes I have relationship between objects like this:
class Article {
  String id;
  String title;
  int shortDescription;
  List<Comment> comments;
}

class Comment {
  String id;
  String text;
  String authorId;
  String authorName;
}

How Can I save the Article model and its comments in the database?

I guess in that case it's a 1:n relationship because a comment only ever belongs to one article, right? In that case, you could have a model like this
@DataClassName('DbArticle') // to avoid name clash with your Article class
class Articles extends Table {
  TextColumn get id => text()();
  TextColumn get title => text()();
  IntColumn get shortDescription => integer()();

  @override
  Set<Column> get primaryKey => {id};
}
@DataClassName('DbComment')
class Comments extends Table {
  TextColumn get articleId => text()(); // the article where this comment was posted
  TextColumn get id => text()();
  TextColumn get text => text()();
  TextColumn get authorId => text()();
  TextColumn get authorName => text()();

  @override
  Set<Column> get primaryKey => {id};
}

// inside your database class that uses both tables:
Future<void> saveArticleAndComments(Article a) {
  return transaction((_) async {
    DbArticle articleForDb = /* you need to turn your model class into the db article here by setting id, title and shortDescription */;
    List<DbComment> commentsForDb = a.comments.map((c) => /* same here, turn model class to row */).toList();
    await into(articles).insert(articleForDb, orReplace: true);
    // delete comments that have already been stored for this article
    await (delete(comments)
          ..where((c) => c.articleId.equals(articleForDb.id)))
        .go();
    // and replace them with the new ones
    await into(comments).insertAll(commentsForDb);
  });
}

(just adapted the example from the shopping carts, not sure if that code is 100% valid, but that's the idea that should work)

Thanks for the tip. I going to try this code soon

@simolus3 Thank you again for this example. It will be nice to include such examples in the documentation.


Windows Search Icon Disappearing when Taskbar Segments is enabled

When I have Taskbar Segments enabled, the windows search icon disappears from the bottom left.
When I have Taskbar Segments disabled, it shows up just as it's supposed to.

I have my native taskbar settings set to Show Search Icon.
What I'm Using:
Edition:	Windows 10 Pro
Version:	22H2
OS build:	19045.2788
Experience:	Windows Feature Experience Pack 120.2212.4190.0

Adding info:

Regular Version
Windows Defender Enabled
No Error Messages popped up
NET 4.8 is installed
No Other Taskbar Tweakers

Taskbar Settings:

I hope this helps, this isn't a huge issue because I can use the Win + S shortcut. It's only ever a problem when Im remoted into my desktop from my phone and cant access Search.

Same issue for me


displaying PDF files leads to black projector

upload this PDF to the files of OS:
test.pdf
display it

result: the projector preview window doesn't show the PDF but is completely black
Since in the projector it is displayed but fullscreen, try to make it smaller:
result: using the zoom button in the projector preview has no effect
Using the zoom buttons in the presentation control elements works and when clicking to zoom out the projector preview is now working

now rotate the PDF via the presentation control elements

result: this works

now zoom in via the presentation control elements

result: the projector preview gets black again, the projector itself is correct.

now press the reset zoom button in the presentation control elements

result: now also the projector is black

Can somebody try updating the version in bower.json, install and check it?

I updated the Version in the bower.json to ~2.0.0, ran yarn and spun up my instance, but it still is black in FF 58.0.2

So i tested the displaying with a bunch of different sized files:
test_010567.pdf
test_022086.pdf
test_027599.pdf
test_033813.pdf
test_040990.pdf
test_048210.pdf
test_055443.pdf
test_069626.pdf
test_074416.pdf
test_081637.pdf
test_088913.pdf
test_095964.pdf
test_102597.pdf
test_108826.pdf
test_119331.pdf
test_120930.pdf
test_122845.pdf
test_125942.pdf
test_127868.pdf
test_130534.pdf
test_131702.pdf
test_132771.pdf
test_139621.pdf
test_162096.pdf
test_171122.pdf
test_183790.pdf
(the numbers behind the files are the size in bytes).
It blinds my eyes to see, that files that are 127kb and below are displayed without any issue in FF, and files of 128kb and above causing the projector to black out. This fine power-of-two-number seems to be to oddly specific to be random. Can one verify that it happens not just on my system (maybe 32 bit systems as well?)

I can confirm it with Firefox 58.0.2 (64bit) on Linux (test_130534.pdf works fine, test_131702.pdf blacks out). I have no idea what could be the reason...

Sure. I will write a small Dockerfile to check out specific commits and do a binary search thorugh the commits from 2.1.1 (bbbad71e2df2615ac33744cf69ee7ad1dfcfd108) until the commits from 28 days ago (the opening date of this issue - b5157cd418577f6d12422d150d71350d4b935e28).

Dockerfile I used: https://github.com/jsaalfeld/OpenSlides-buildCheckout
Commits I tried (in that order):

f0d840148e0ba016c07da1e275aaab0653a989de - doesn't work
074559ba23cb7627697024bb78519f42f4dc4eff - doesn't work
4963bfa7bffeb0521e15217b50023ed3a24c1956  - doesn't work
8c4ec1c218ba63675edd11d6ce79d8729a19d64f - doesn't work
65b51f89756d699cc1edc2022c7f09c897d87c40 - doesn't work
757bbc62e542dba5f0a98f6f7ebdddb7c8d9909e - doesn't work
d758159bffacccf32991c8e6982bdd3fade49e76 - doesn't work

Since d758159bffacccf32991c8e6982bdd3fade49e76 is older than the bbbad71e2df2615ac33744cf69ee7ad1dfcfd108 commit. It can be boiled down to: It's not the code.
So what else could provoke this behaviour? Since it works on the OpenSlides Test-Instance, my take would be, that it is about the architecture. In particular: the Redis Server or Postges Server, since all tests have been made with the "simple" setup and this is the only variable in the mix.

demo.openslides.org (with v2.1.1) works. Here the installed requirements:
$ pip freeze
Django==1.9.3
argparse==1.2.1
beautifulsoup4==4.4.1
cffi==0.8.6
chardet==2.3.0
colorama==0.3.2
cryptography==0.6.1
djangorestframework==3.3.2
html5lib==0.999
jsonfield==1.0.3
natsort==4.0.4
ndg-httpsclient==0.3.2
ply==3.4
pyOpenSSL==0.14
pyasn1==0.1.7
pycparser==2.10
pytz==2012c
requests==2.4.3
six==1.8.0
sqlparse==0.1.13
urllib3==1.9.1
wheel==0.24.0
wsgiref==0.1.2

$ ./node_modules/.bin/bower list
bower check-new     Checking for new versions of the project dependencies...
openslides /home/openslides/openslides-git
├── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ angular-animate#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8 incompatible with 1.5.11 (1.5.11 available, latest is 1.6.9)
├─┬ angular-bootstrap#2.1.4 (latest is 2.5.0)
│ └── angular#1.5.8 (1.6.9 available)
├── angular-bootstrap-colorpicker#3.0.25 (3.0.32 available)
├─┬ angular-chosen-localytics#1.5.1 (latest is 1.8.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── chosen#1.7.0 (1.8.3 available)
│ └── jquery#3.1.1 incompatible with ^2.0.3 (2.2.4 available, latest is 3.3.1)
├── angular-ckeditor#1.0.3
├─┬ angular-file-saver#1.1.3
│ ├── blob-polyfill#1.0.20150320 (latest is 2.0.20171115)
│ └── file-saver.js#1.20150507.2
├─┬ angular-formly#8.4.1
│ ├── angular#1.5.8 (1.6.9 available)
│ └── api-check#7.5.5
├─┬ angular-formly-templates-bootstrap#6.2.0 (latest is 6.3.2)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── angular-formly#8.4.1
│ ├── api-check#7.5.5
│ └─┬ bootstrap#3.3.7 (4.0.0 available)
│   └── jquery#3.1.1 (3.3.1 available)
├─┬ angular-gettext#2.3.9 (2.3.10 available)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-messages#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8
├─┬ angular-pdf#1.3.1 (latest is 2.0.0)
│ ├── angular#1.5.8 (latest is 1.6.9)
│ └── pdfjs-dist#1.5.188 (latest is 2.0.385)
├─┬ angular-sanitize#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8
├── angular-scroll-glue#2.0.7 (latest is 2.2.0)
├─┬ angular-ui-router#0.3.2 (latest is 1.0.15)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-ui-tree#2.22.5 (2.22.6 available)
│ └── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ angular-xeditable#0.5.0 (latest is 0.8.1)
│ └── angular#1.5.8 (1.6.9 available)
├── bootstrap-css-only#3.3.7 (latest is 4.0.0)
├─┬ bootstrap-ui-datetime-picker#2.4.3 (latest is 2.6.1)
│ └── angular-bootstrap#2.1.4 incompatible with ^1.2.0 (1.3.3 available, latest is 2.5.0)
├── ckeditor#4.6.1 (latest is 4.8.0)
├── docxtemplater#2.1.5 (latest is 3.3.1)
├── font-awesome-bower#4.5.0 (latest is 4.7.0)
├── jquery#3.1.1 (latest is 3.3.1)
├─┬ jquery.cookie#1.4.1
│ └── jquery#3.1.1 (3.3.1 available)
├── js-data#2.9.0 (latest is 3.0.2)
├─┬ js-data-angular#3.2.1
│ ├── angular#1.5.8 (1.6.9 available)
│ └── js-data#2.9.0 (2.10.1 available, latest is 3.0.2)
├── lodash#4.16.6 (latest is 4.17.5)
├─┬ ng-dialog#0.6.6 (latest is 1.4.0)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ ng-file-upload#11.2.3 (latest is 12.2.13)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ ngBootbox#0.1.4 (0.1.5 available, latest is 0.2.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├─┬ bootbox#4.4.0
│ │ └── bootstrap#3.3.7 (4.0.0 available)
│ ├── bootstrap#3.3.7 (4.0.0 available)
│ └── jquery#3.1.1 (3.3.1 available)
├─┬ ngstorage#0.3.11
│ └── angular#1.5.8 (1.6.9 available)
├── papaparse#4.1.4 (latest is 4.3.7)
├── pdfmake#0.1.27 (latest is 0.1.35)
└── roboto-fontface#0.6.1 (latest is 0.9.0)

Docker container build with the Dockerfile.old from the above mentioned github repository:
$ pip freeze
appdirs==1.4.3
asgi-redis==1.0.0
asgiref==1.1.2
async-timeout==2.0.0
attrs==17.4.0
autobahn==17.10.1
Automat==0.6.0
bleach==1.5.0
channels==1.0.3
constantly==15.1.0
daphne==1.4.2
Django==1.10.8
django-redis==4.7.0
django-redis-sessions==0.5.6
djangorestframework==3.4.7
html5lib==0.9999999
hyperlink==17.3.1
incremental==17.5.0
jsonfield==1.0.3
msgpack-python==0.5.4
packaging==16.8
psycopg2==2.6.2
pyparsing==2.2.0
PyPDF2==1.26.0
redis==2.10.6
roman==2.0.0
six==1.11.0
Twisted==17.9.0
txaio==2.8.2
zope.interface==4.4.3

$ ./node_modules/.bin/bower list
bower check-new     Checking for new versions of the project dependencies...
openslides /app
├── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ angular-animate#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8 incompatible with 1.5.11 (1.5.11 available, latest is 1.6.9)
├─┬ angular-bootstrap#2.1.4 (latest is 2.5.0)
│ └── angular#1.5.8 (1.6.9 available)
├── angular-bootstrap-colorpicker#3.0.32
├─┬ angular-chosen-localytics#1.5.1 (latest is 1.8.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── chosen#1.8.3
│ └── jquery#3.1.1 incompatible with ^2.0.3 (2.2.4 available, latest is 3.3.1)
├── angular-ckeditor#1.0.3
├─┬ angular-file-saver#1.1.3
│ ├── blob-polyfill#1.0.20150320 (latest is 2.0.20171115)
│ └── file-saver.js#1.20150507.2
├─┬ angular-formly#8.4.1
│ ├── angular#1.5.8 (1.6.9 available)
│ └── api-check#7.5.5
├─┬ angular-formly-templates-bootstrap#6.2.0 (latest is 6.3.2)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── angular-formly#8.4.1
│ ├── api-check#7.5.5
│ └── bootstrap#4.0.0
├─┬ angular-gettext#2.3.10
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-messages#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8
├─┬ angular-pdf#1.3.1 (latest is 2.0.0)
│ ├── angular#1.5.8 (latest is 1.6.9)
│ └── pdfjs-dist#1.5.188 (latest is 2.0.385)
├─┬ angular-sanitize#1.5.11 (latest is 1.6.9)
│ └── angular#1.5.8
├── angular-scroll-glue#2.0.7 (latest is 2.2.0)
├─┬ angular-ui-router#0.3.2 (latest is 1.0.15)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-ui-tree#2.22.6
│ └── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ angular-xeditable#0.5.0 (latest is 0.8.1)
│ └── angular#1.5.8 (1.6.9 available)
├── bootstrap-css-only#3.3.7 (latest is 4.0.0)
├─┬ bootstrap-ui-datetime-picker#2.4.3 (latest is 2.6.1)
│ └── angular-bootstrap#2.1.4 incompatible with ^1.2.0 (1.3.3 available, latest is 2.5.0)
├── ckeditor#4.6.1 (latest is 4.8.0)
├── docxtemplater#2.1.5 (latest is 3.3.1)
├── font-awesome-bower#4.5.0 (latest is 4.7.0)
├── jquery#3.1.1 (latest is 3.3.1)
├─┬ jquery.cookie#1.4.1
│ └── jquery#3.1.1 (3.3.1 available)
├── js-data#2.9.0 (latest is 3.0.2)
├─┬ js-data-angular#3.2.1
│ ├── angular#1.5.8 (1.6.9 available)
│ └── js-data#2.9.0 (2.10.1 available, latest is 3.0.2)
├── lodash#4.16.6 (latest is 4.17.5)
├─┬ ng-dialog#0.6.6 (latest is 1.4.0)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ ng-file-upload#11.2.3 (latest is 12.2.13)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ ngBootbox#0.1.5 (latest is 0.2.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├─┬ bootbox#4.4.0
│ │ └── bootstrap#4.0.0
│ ├── bootstrap#4.0.0
│ └── jquery#3.1.1 (3.3.1 available)
├─┬ ngstorage#0.3.11
│ └── angular#1.5.8 (1.6.9 available)
├── papaparse#4.1.4 (latest is 4.3.7)
├── pdfmake#0.1.27 (latest is 0.1.35)
└── roboto-fontface#0.6.1 (latest is 0.9.0)

This means the differences are:
% diff openslides_docker.txt openslides_demo.txt
2,19c2,10
< appdirs==1.4.3
< asgi-redis==1.0.0
< asgiref==1.1.2
< async-timeout==2.0.0
< attrs==17.4.0
< autobahn==17.10.1
< Automat==0.6.0
< bleach==1.5.0
< channels==1.0.3
< constantly==15.1.0
< daphne==1.4.2
< Django==1.10.8
< django-redis==4.7.0
< django-redis-sessions==0.5.6
< djangorestframework==3.4.7
< html5lib==0.9999999
< hyperlink==17.3.1
< incremental==17.5.0
---
> Django==1.9.3
> argparse==1.2.1
> beautifulsoup4==4.4.1
> cffi==0.8.6
> chardet==2.3.0
> colorama==0.3.2
> cryptography==0.6.1
> djangorestframework==3.3.2
> html5lib==0.999
21,31c12,25
< msgpack-python==0.5.4
< packaging==16.8
< psycopg2==2.6.2
< pyparsing==2.2.0
< PyPDF2==1.26.0
< redis==2.10.6
< roman==2.0.0
< six==1.11.0
< Twisted==17.9.0
< txaio==2.8.2
< zope.interface==4.4.3
---
> natsort==4.0.4
> ndg-httpsclient==0.3.2
> ply==3.4
> pyOpenSSL==0.14
> pyasn1==0.1.7
> pycparser==2.10
> pytz==2012c
> requests==2.4.3
> six==1.8.0
> sqlparse==0.1.13
> urllib3==1.9.1
> wheel==0.24.0
> wsgiref==0.1.2
>
41c35
< ├── angular-bootstrap-colorpicker#3.0.32
---
> ├── angular-bootstrap-colorpicker#3.0.25 (3.0.32 available)
44c38
< │ ├── chosen#1.8.3
---
> │ ├── chosen#1.7.0 (1.8.3 available)
57,58c51,53
< │ └── bootstrap#4.0.0
< ├─┬ angular-gettext#2.3.10
---
> │ └─┬ bootstrap#3.3.7 (4.0.0 available)
> │   └── jquery#3.1.1 (3.3.1 available)
> ├─┬ angular-gettext#2.3.9 (2.3.10 available)
70c65
< ├─┬ angular-ui-tree#2.22.6
---
> ├─┬ angular-ui-tree#2.22.5 (2.22.6 available)
92c87
< ├─┬ ngBootbox#0.1.5 (latest is 0.2.0)
---
> ├─┬ ngBootbox#0.1.4 (0.1.5 available, latest is 0.2.0)
95,96c90,91
< │ │ └── bootstrap#4.0.0
< │ ├── bootstrap#4.0.0
---
> │ │ └── bootstrap#3.3.7 (4.0.0 available)
> │ ├── bootstrap#3.3.7 (4.0.0 available)

is there something in the diffs that could explain that issue? Should i try setup a big environment to test if its something with the external redis/postgres server?

I came along an issue: Why is the Django Version 1.9.3 in the Demo instance, while the requirements state, it should be something above 1.10.4? And I'm sure there are other requirements vs. reality issues.

I got a running version without any PDF issues (https://github.com/jsaalfeld/OpenSlides-buildCheckout/blob/master/Dockerfile.demo-openslides) it has the following details:
$ pip freeze
appdirs==1.4.3
asgi-redis==1.3.0
asgiref==1.1.2
async-timeout==2.0.0
attrs==17.4.0
autobahn==17.10.1
Automat==0.6.0
bleach==1.5.0
channels==1.0.3
constantly==15.1.0
daphne==1.4.2
Django==1.10.8
django-redis==4.7.0
django-redis-sessions==0.5.6
djangorestframework==3.4.7
html5lib==0.9999999
hyperlink==17.3.1
incremental==17.5.0
jsonfield==1.0.3
msgpack-python==0.5.5
packaging==16.8
psycopg2==2.6.2
pyparsing==2.2.0
PyPDF2==1.26.0
redis==2.10.6
roman==2.0.0
six==1.11.0
Twisted==17.9.0
txaio==2.8.2
zope.interface==4.4.3

$ ./node_modules/.bin/bower list
├── angular#1.5.8 (latest is 1.6.9)
├─┬ angular-animate#1.5.8 (latest is 1.6.9)
│ └── angular#1.5.8 (latest is 1.6.9)
├─┬ angular-bootstrap#2.1.3 (latest is 2.5.0)
│ └── angular#1.5.8 (1.6.9 available)
├── angular-bootstrap-colorpicker#3.0.25 (latest is 3.0.32)
├─┬ angular-chosen-localytics#1.5.0 (latest is 1.8.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── chosen#1.8.3
│ └── jquery#3.1.0 incompatible with ^2.0.3 (2.2.4 available, latest is 3.3.1)
├── angular-ckeditor#1.0.3https://github.com/jsaalfeld/OpenSlides-buildCheckout/blob/master/Dockerfile.demo-openslides
├─┬ angular-file-saver#1.1.2 (latest is 1.1.3)
│ ├── blob-polyfill#1.0.20150320 (latest is 2.0.20171115)
│ └── file-saver.js#1.20150507.2
├─┬ angular-formly#8.4.0 (latest is 8.4.1)
│ ├── angular#1.5.8 (1.6.9 available)
│ └── api-check#7.5.5
├─┬ angular-formly-templates-bootstrap#6.2.0 (latest is 6.3.2)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├── angular-formly#8.4.0 (8.4.1 available)
│ ├── api-check#7.5.5
│ └── bootstrap#4.0.0
├─┬ angular-gettext#2.3.7 (latest is 2.3.10)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-messages#1.5.8 (latest is 1.6.9)
│ └── angular#1.5.8
├─┬ angular-pdf#1.3.0 (latest is 2.0.0)
│ ├── angular#1.5.8 incompatible with 1.4.8 (1.4.8 available, latest is 1.6.9)
│ └── pdfjs-dist#1.3.100 (latest is 2.0.385)
├─┬ angular-sanitize#1.5.8 (latest is 1.6.9)
│ └── angular#1.5.8
├── angular-scroll-glue#2.0.7 (latest is 2.2.0)
├─┬ angular-ui-router#0.3.1 (latest is 1.0.15)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ angular-ui-tree#2.22.0 (latest is 2.22.6)
│ └── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ angular-xeditable#0.5.0 (latest is 0.8.1)
│ └── angular#1.5.8 (1.6.9 available)
├── bootstrap-css-only#3.3.6 (latest is 4.0.0)
├─┬ bootstrap-ui-datetime-picker#2.4.0 (latest is 2.6.1)
│ └── angular-bootstrap#2.1.3 incompatible with ^1.2.0 (1.3.3 available, latest is 2.5.0)
├── ckeditor#4.6.1 (latest is 4.8.0)
├── docxtemplater#2.1.5 (latest is 3.3.1)
├── font-awesome-bower#4.5.0 (latest is 4.7.0)
├── jquery#3.1.0 (latest is 3.3.1)
├─┬ jquery.cookie#1.4.1
│ └── jquery#3.1.0 (3.3.1 available)
├── js-data#2.9.0 (latest is 3.0.2)
├─┬ js-data-angular#3.2.1
│ ├── angular#1.5.8 (1.6.9 available)
│ └── js-data#2.9.0 (2.10.1 available, latest is 3.0.2)
├── lodash#4.16.0 (latest is 4.17.5)
├─┬ ng-dialog#0.6.4 (latest is 1.4.0)
│ └── angular#1.5.8 (1.5.11 available, latest is 1.6.9)
├─┬ ng-file-upload#11.2.3 (latest is 12.2.13)
│ └── angular#1.5.8 (1.6.9 available)
├─┬ ngBootbox#0.1.3 (latest is 0.2.0)
│ ├── angular#1.5.8 (1.6.9 available)
│ ├─┬ bootbox#4.4.0
│ │ └── bootstrap#4.0.0
│ ├── bootstrap#4.0.0
│ └── jquery#3.1.0 (3.3.1 available)
├─┬ ngstorage#0.3.11
│ └── angular#1.5.8 (1.6.9 available)
├── papaparse#4.1.2 (latest is 4.3.7)
├── pdfmake#0.1.27 (latest is 0.1.35)
└── roboto-fontface#0.6.0 (latest is 0.9.0)

The differences are still quiet siginificantly. Can you may look at suspicious packages that may broke it?

I found the problematic package: pdfjs-dist!
It works with:
pdfjs-dist#1.3.100 (from angular-pdf#1.3.0)
It does NOT works with:
pdfjs-dist#1.5.188 (from angular-pdf#1.3.1)
@jsaalfeld Please make some more tests with latest versions of angular-pdf and pdfjs-dist and create a pull request of an useful combination.


Weirdness in handling relative URIs containing // or just a query part

Trying to access gemini://drewdevault.com/cgi-bin/hn.py, I am encountering some (in my opinion) wrong handling of the relative links on that page.
A link will typically look like this:
=> web.sh?https%3A//github.blog/2020-11-16-standing-up-for-developers-youtube-dl-is-back/ YouTube-dl's repository has been restored
Clearly, this is a relative link, containing neither a scheme nor an authority section (which would begin with //)
Despite this, when clicking this link, lagrange tries to open gemini://github.blog/2020-11-16-standing-up-for-developers-youtube-dl-is-back/. It appears to me that the // before github.blog is being misinterpreted as the beginning of an authority section.
I had a look at the code and gmutil.c:init_Url seems to be the culprit in this case.
if (!relativeUrlPattern_) {
    relativeUrlPattern_ = new_RegExp("([a-z]+:)?([^?]*)(\\?.*)?", 0);
}
if (matchString_RegExp(relativeUrlPattern_, text, &m)) {
    d->scheme = capturedRange_RegExpMatch(&m, 1);
    d->path   = capturedRange_RegExpMatch(&m, 2);
    d->query  = capturedRange_RegExpMatch(&m, 3);
}

I checked with gdb and it definitely reaches this part. This is, where I don't really grok where the new host comes from. Also, I didn't quite get why the Regex for relative links checks for a scheme, I couldn't think of a case where there is a scheme but not an authority section.
Edit: I have experimented around with the Regex from RFC 3986 Appendix B, using that in init_Url seems to solve this problem, as in the following snippet:
void init_Url(iUrl *d, const iString *text) {
    static iRegExp *urlPattern_;
    if (!urlPattern_) {
        urlPattern_ = new_RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?", caseInsensitive_RegExpOption);
    }
    iRegExpMatch m;
    init_RegExpMatch(&m);
    if (matchString_RegExp(urlPattern_, text, &m)) {
        d->scheme = capturedRange_RegExpMatch(&m, 2);
        d->host   = capturedRange_RegExpMatch(&m, 4);
	d->port   = iNullRange;
        d->path   = capturedRange_RegExpMatch(&m, 5);
        d->query  = capturedRange_RegExpMatch(&m, 6);
    }
}

This doesn't split the port off, should there be any, so this is not a complete solution

Thinking about it, it probably isn't this part that is behaving weird

Also interesting, when you access one of the pages manually and click one of the links there (only containing a different query part like => ?xyz XYZ) lagrange apparently tries to merge those URIs in a way that ends up with gemini://a/b/?xyz instead of gemini://a/b/c?xyz (the base URI being gemini://a/b/c?zyx)

I have experimented around with the Regex from RFC 3986 Appendix B, using that in init_Url seems to solve this problem

Thanks for trying it out! I'll test your code and add the port parsing.

click one of the links there (only containing a different query part)

Hmm, I don't recall testing this case at any point. ☺ I'll check the handling of the relative URLs here.

The commit above should take care of the URL parsing. Seems to work for all the URLs I tried.
I'll still need to look at what happens to the query-only relative URLs.

OK, both issues should be taken care of now. Please test and close the issue if everything seems to work now in the dev branch.

Hi, thanks a lot for implementing this. While Testing, I stumbled upon a few things so far. I have put them in a list:

IPv6-addresses enclosed in square brackets can't be entered so far. RFC 3986 allows this.

Yesterday, I had a regex that handled this Edge case, but couldn't get it to run. Sadly, I lost it. I will see if I can make one.

I haven't tested this, but problems may arise when specifying a username in the authority section (separated with an @)

This probably is a non-issue because Gemini doesn't allow this anyways

Something about relative links feels odd so far. I haven't started to pin this down yet, but the relative links at my page don't work for now (appending the relative path to the Hostname, without a /)

This is my page, I will see if I find something from the client stress test instead: gemini://de.activ.ism.rocks/

Pushed a fix for the last item. A path that begins with ~ is effectively an absolute path, and the code made the incorrect assumption that all absolute paths have a slash in the beginning.

username in the authority section

Lagrange allows opening HTTP links via proxy, those could have a username in the authority?

IPv6-addresses enclosed in square brackets (...) I will see if I can make one.

That would be great. :+1:

Looks good to me now.


notification information (images) as sensors?

Is your feature request related to a problem? Please describe.
I don't know if this is already possible - but the dreame does provide several different pictures with it's notifications.
Is it (already) possible to show them directly on a dashboard?
For example with an image card or something similar?

Describe the solution you'd like
I would like to use the notification provided by the dreamy also somewhere on the dashboard.
Describe alternatives you've considered
it would be required to implement the notification image as a camera img... or - it would be required to get the image sources for the specific errors and create a custom img. card with conditions...
Additional context
Add any other context or screenshots about the feature request here.

ok, thanks :)
I'll try to create it on my own then... 👍


Hide some methods in Autorest-based module in Docs

Hide some methods in Autorest-based module like ToJson(JsonObject, SerializationMode) using attribute System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never

Any special reasons we need to hide these methods. @BethanyZhou

@dolauli ,  sorry, I mean we need hide some method in c# docs.


is it a make sense idea to make one SessionInterface?

Only one interface to the end user and because they share many same arguments, like domain, expiry, httponly, cookie_name, prefix which can be reduced for some lines, like this:
# __init__.py
class SessionInterface:
    def __new__(cls, *args, **kwargs):
        backend = kwargs.pop('backend', 'memory')
        if backend == 'redis':
            interface_class = RedisSessionInterface
        elif backend == 'memcache':
            interface_class = MemcacheSessionInterface
        else:
            interface_class = InMemorySessionInterface

        return interface_class(*args, **kwargs)

class BaseSessionInterface:
    def __init__(self, domain=None, expiry=2592000,
                 httponly=True, cookie_name='session',
                 prefix='session:', **kwargs):
        self.expiry = expiry
        self.prefix = prefix
        self.cookie_name = cookie_name
        self.domain = domain
        self.httponly = httponly

class InMemorySessionInterface(BaseSessionInterface):
    def __init__(self, *args, **kwargs):
        super().__init__(**kwargs)
        self.session_store = ExpiringDict()

class MemcacheSessionInterface(BaseSessionInterface):
    def __init__(self, memcache_connection, *args, **kwargs):
        super().__init__(**kwargs)
        self.memcache_connection = memcache_connection
        # memcache has a maximum 30-day cache limit
        if self.expiry > 2592000:
            self.expiry = 0

class RedisSessionInterface(BaseSessionInterface):
    def __init__(self, redis_getter: Callable=None, *args, **kwargs):
        super().__init__(**kwargs)
        self.redis_getter = redis_getter

# memory
session = SessionInterface(**kwargs)
# redis
session = SessionInterface(redis_getter, backend='redis', **kwargs)
# memcache
session = SessionInterface(memcache_connection, backend='memcache', **kwargs)

I've thought about it, but I would like to keep the API as close to the Flask API as possible. Trying to make a one-size-fits-all class results in excessive amounts of configuration, like in the Flask-Session class: https://pythonhosted.org/Flask-Session/
Keeping the interfaces separate also allow for easier extensibility. I don't really see the benefits of trying to just make a single Session class.

When use InMemorySessionInterface for development and use RedisSessionInterface for production, if no single Session class. The code maybe like this:
# dev
session = InMemorySessionInterface(*args, **kwargs)
# prod
session = RedisSessionInterface(*args, **kwargs)

After a single Session class, I only need update the args and kwargs in the configuration, no need to change the logic code.
# dev
SESSION_ARGS = ()
SESSION_KWARGS = dict(expiry=4 * 3600 * 100, cookie_name='dev')

# prod
SESSION_ARGS = (redis_getter, )
SESSION_KWARGS = dict(expiry=4 * 3600, cookie_name='prod')

session = SingleSessionInterface(*SESSION_ARGS, **SESSION_KWARGS)

And, even single Session added, user still can use individual InMemorySessionInterface, RedisSessionInterface, etc.

I'll think about it, but I don't really see the utility; the same logically decisions are being made, but they're less explicit and more magic, IE passing in a 'redis' string as a backend to a single interface instead of explicitly importing an interface and using that. It also gets away from the Flask convention, which I'd prefer to avoid.


Remove single quotes from NPM format command

Resolves #44

Codecov Report

Merging #45 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master    #45   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          16     16
  Lines         244    244
=====================================
  Hits          244    244

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 88affe3...5e55206. Read the comment docs.


Implement smartStep

For #26
With this we will auto-step through lines in files without mappings in files that have sourcemap. For example, code inserted by TS into a transpiled file that doesn't have source lines associated with it. Skipped frames are also grayed out and marked with "skipped by smartStep".

Will add some tests too


Change HasOnlySupportedRefs to consider OpCopyObject

@greg-lunarg: Hey Greg, I'd appreciate if you can take a look at the second commit to make sure everything is fine. :)

Thanks. Looking...

Good catch and good attempt at fix. I think the following is even "more" what is needed:
 if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) {
   if (!HasOnlySupportedRefs(u.inst->result_id()))
     return false;
 }
 else if (op != SpvOpStore && op != SpvOpLoad && op != SpvOpName)
   return false;

The goal is to make sure that we are restricting to variables which are ultimately only consumed by Loads, Stores or Names in order to simplify data dependence checking. We want to avoid variables consumed by OpFrexp, OpFunctionCall, etc.
We would want this change in both:
local_single_block_elim_pass.cpp
local_single_store_elim_pass.cpp

@greg-lunarg: Gotcha. Thanks for the suggestion! Done. :)

Hey @greg-lunarg, I'll merge this PR if you think it's fine now. :)

Yes. I think it is fine. Thanks for your fixes.


Activating Open Collective

Hi, I'm making updates for Open Collective. Either you or a supporter signed this repo up for Open Collective. This pull request adds backers and sponsors from your Open Collective https://opencollective.com/jscpd ❤
It adds two badges at the top to show the latest number of backers and sponsors. It also adds placeholders so that the avatar/logo of new backers/sponsors can automatically be shown without having to update your README.md. [more info]. See how it looks on this repo.
We have also added a postinstall script to let people know after npm|yarn install that you are welcoming donations (optional). [More info]
You can also add a "Donate" button to your website and automatically show your backers and sponsors there with our widgets. Have a look here: https://opencollective.com/widgets
P.S: As with any pull request, feel free to comment or suggest changes. The only thing "required" are the placeholders on the README because we believe it's important to acknowledge the people in your community that are contributing (financially or with code!).
Thank you for your great contribution to the open source community. You are awesome! 🙌
And welcome to the open collective community! 😊
Come chat with us in the #opensource channel on https://slack.opencollective.com - great place to ask questions and share best practices with other open source sustainers!

This change is

Coverage remained the same at 91.647% when pulling 21bd976bf60ba1eb678312311b49e0edfa93a5ca on opencollective:opencollective into b24360c51ebe69d90fbffbf62273a39139efa79a on kucherenko:master.


JAX Dqn SpaceInvader network params are wrong

Im using the very helpful set of pre-trained JAX agent however in training the Dqn one I found an issue with one of the SpaceInvader network params
For dqn/SpaceInvaders/1/ckpt.199 output layer has 1200 outputs rather than the expected 6
Conv_0 (8, 8, 4, 32) (32,) Conv_1 (4, 4, 32, 64) (64,) Conv_2 (3, 3, 64, 64) (64,) Dense_0 (7744, 512) (512,) Dense_1 (512, 1200) (1200,)
The normal version looks like this (this is dqn/SpaceInvaders/2/ckpt.199)
Conv_0 (8, 8, 4, 32) (32,) Conv_1 (4, 4, 32, 64) (64,) Conv_2 (3, 3, 64, 64) (64,) Dense_0 (7744, 512) (512,) Dense_1 (512, 6) (6,)
This appears to be a Quantile network params as they have 1200 outputs as well
The rest of the dqn/SpaceInvaders network params are completely normal and work fine
I have no idea how or why this would have happened and as a fix, everyone can just use the other 4 agents
Not sure what you want to do with this info, just wanted to report it as a bug
Replication code
import os
import pickle

import flax
import gym
from dopamine.jax.networks import NatureDQNNetwork
from flax.training import checkpoints
import jax.numpy as jnp

os.system('gsutil -m cp -r gs://download-dopamine-rl/jax/dqn/SpaceInvaders .')

env = gym.make('SpaceInvaders-v4')
network_def = NatureDQNNetwork(num_actions=env.action_space.n)
with open(f'SpaceInvaders/1/ckpt.199', 'rb') as file:
    param_data = pickle.load(file)
    network_params = flax.core.FrozenDict({
        'params': checkpoints.convert_pre_linen(
            param_data['online_params']).unfreeze()
    })
    for layer, data in network_params['params'].items():
        print(layer, data['kernel'].shape, data['bias'].shape)

obs = jnp.ones((84, 84, 4))
network_def.apply(network_params, obs)

hi, thanks for reporting this! i'll look into this and get back to you. it's possible i copied over the incorrect checkpoint.


upgrade kotlin and gradle versions

Hey @elyctom, this repository hasn't seen any updates or responses by the owner in a long time. Consider switching to flutter_timezone, which is a fork of this repo.


[FEAT]StatefulActor API

Problem description
There is lack of a convenient API to build a stateful actor. The current design can easily leads to build one if the developer needs to.
Solution description
The goal of this feature is to provide a convenient API to build stateful actors. At the moment one can use eGo to build an event sourcing/CQRS applications. However there are use cases where a simple state management is really necessary which is a common thing in the industry. One just needs react to a command and produce a new state and let that state be persisted into a durable store.
Alternative solutions
Use the current GoAkt features to hack it.
Additional context
Add any other context or screenshots about the feature request here.

closing this feature because it requires some deep thinking. At the moment I really don't have the time to think this through.

@sdil thanks for loving this feature. I have added that feature to eGo which is the best place to have it. The PR has been merged. Yet to cut a release maybe later this week.

@Tochemey I tried it and it looks great! I liked it


Revert to generic ark, bump version

This PR comments  out the hard-coded ARS. It was helpful in understanding where the post callbacks need to be called, and what parts can be done asynchronously (T_exp! and T_lim!). But it's probably best that we now revert to the generic version. Next, we can try out the callbacks in ClimaAtmos for faster turn around, and port them over here.

This development/testing has moved to ClimaAtmos.


Proposal: Add support for proxying p2p connections to/from lnd

We're considering ways to reduce the attack area in LND deployments. In addition to existing work on external signing, we are interested in adding support for decoupling Brontide and using a proxy running in a separate process for peer-to-peer connections. This would enable doing some transport-level checks away from the LND process/hardware, preventing several types of resource exhaustion/denial of service attacks. However, there is also a trade-off in that the node key will need to be copied to the Brontide proxy.
The way we envision this working is to add an option such as proxylisten or proxymux to lnd, which would connect over a single Brontide connection (or TLS or something) to the proxy and allow incoming/outgoing connections to be multiplexed over the connection. The proxy would allow connections only to and from known nodes, verifying ECDH for the connection before decrypting the traffic and proxying it over the multiplexed connection. This draft PR starts with proof of concept brontide proxy which multiplexes multiple connections over a single one.
There are several questions to consider and other TODOs. A non-exhaustive list follows:

Handle large messages, message fragmentation/defragmentation, partial reads, timeouts, reconnections, etc.
Possibly change location of the MessageConnWithPubkey interface (maybe in the peer package?)
Set up more robust/extensible signaling including connection key derivation
Add capability for dialing out
Integrate with the rest of lnd including peer, config, server, etc. code for connecting to a proxy
Create a proxy executable (external project? a binary under /cmd?)
Add means to allow-list peers
Add support for rate and resource limiting (per process, per peer, global)
Improve notifications

We would love feedback on the direction this is taking or additional suggestions. If this looks like it's going in the right direction, I'll keep moving forward with the TODOs listed above under this PR until it's usable.

Hi Alex, very cool stuff! I'm happy to hear y'all are looking into ways to further harden lnd's network stack.

However, there is also a trade-off in that the node key will need to be copied to the Brontide proxy.

So this actually isn't the case. All brontide needs is to be able to do ECDH between a node's public key and the incoming key of the connecting peer
The ECDHRing interface exposes this functionality: https://github.com/lightningnetwork/lnd/blob/9d04b0c3d9577b2ab8c253e140220e80181619b8/keychain/derivation.go#L268-L280
A more restricted version that only works with a single key also exists: https://github.com/lightningnetwork/lnd/blob/9d04b0c3d9577b2ab8c253e140220e80181619b8/keychain/derivation.go#L282-L293
The brontide state machine as is uses the above interface to access the ECDH operation: https://github.com/lightningnetwork/lnd/blob/9d04b0c3d9577b2ab8c253e140220e80181619b8/brontide/noise.go#L394-L395
So today someone could instantiate a proxy that uses the existing brontide package, and the ECDH operation of the signerrpc to create something that accepts connections outside of lnd: https://github.com/lightningnetwork/lnd/blob/master/lnrpc/signrpc/signer.proto#L54-L64.
The missing component here would then be feeding the decrypted messages into lnd itself. One generic way to do that would be to extend the peersrpc sub-server to feed in non-custom messages to the lnd node. Being able to send/recv non-custom messages (below the 65k type) has been requested by ppl working on other external daemons, such as a bolt12 daemon. Here's a relevant comment outlining what it would take to instantiate all gossip handling externally, and then feed in the relevant gossip messages either to a read-only graph copy, or a peerrpc extension.
Today the custom message routing just goes between the endpoint, it would then need to be extended to contextually deliver the message to the relevant sub-system (funding to fundingmgr, channel updates to the link, etc, etc). This switch statement in the peer's readHandler does pretty much this. Also note that the peer object can already be fully instantiated outside of lnd, once the external brontide proxy obtains the connection, it can hand it off to the peer to drive all normal activities (abstracting out the raw channel message deliver to work over gRPC or w/e). There's a pending PR which does a pretty nice refactor of the existing peer+server interaction which should make projects like this a lot easier: https://github.com/lightningnetwork/lnd/pull/5700.
FWIW, will the path laid out (which has a lot of overlap w/ this PR), I don't necessarily think something like this needs to live within lnd, given we can add some extra APIs to make it possible to do it all fully externally. This would let the project move at a quicker pace in its early days, as it finds its sweet spot w.r.t the needs of node operators and services.


about historical data;

about these history statistics such as All Pools、TVL,、Volume 24H、Volume 7D, Total Tokens Locked、24h Fees and so on……
i thinks many other people need it in the same way,
So will you provide these API in the future?
thanks;

Duplicate of #352


support & androidx

Sorry,my English is not very good.
I change the library version to 4.0.0. But the error still persists.
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
How can I solve this problem?
Look forward to your answer.

Read the first answer:
(Specially the refactor part)
https://stackoverflow.com/questions/50782435/android-design-support-library-for-api-28-p-not-working#50800801


chore: bump registration ttl log

Fixes #N/A
Description
We have a system that allow us to raise alerts based on logs. Liveness probe is a useful signal for greater node registration problems on the cluster.
We log at the Info level verbosity. Registration TTL should be more than just debug. I can figure out the nodeclaim is being deleted at 15 minutes but not why. Having this explicit log would be useful for alerting on logs.
How was this change tested?

it wasn't
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.02%) to 78.72%

Files with Coverage Reduction
New Missed Lines
%

pkg/test/expectations/expectations.go
2
95.59%

pkg/controllers/node/termination/terminator/eviction.go
2
88.89%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
8301

Relevant Lines:
10545

💛  - Coveralls

/assign @jonathan-innis