Gateway Deployment Using Kubernetes (k8s)

Description
We need to set up a gateway deployment using Kubernetes (k8s) for our project.
Goals

Configure an API gateway.
Implement routing and load balancing for incoming requests.
Ensure high availability and scalability.

Expected Outcome
A fully functional API gateway accessible within our Kubernetes cluster.
Acceptance Criteria

[ ] Kubernetes manifests for the gateway deployment.
[ ] Load balancing configuration.
[ ] Integration with our microservices.
[ ] Proper error handling and logging.

Mockups / Wireframes
N/A
Product Name
Beckn
Domain
DevOps
Tech Skills Needed

Kubernetes
API gateway tools (e.g., Ambassador, Kong)
Networking concepts (load balancing, routing)

Complexity
Medium
Category
Infrastructure
Sub Category
Gateway Deployment

We have created the k8s deployment files for gateway deployment along with new docker images to support the k8s deployment.

We have created new instances for the Postgres server, which we will use for gateway deployment.
As the current h2 database will not support k8s deployment setup.


fix ride states

ℹ Change description:
Nothing here
templates

[templates: bug, feature]

location watcher not needed?

location watcher not needed?

No, we don't need it


Binary operators

While we're on the subject of operators in view of v1, why don't we continue with the binary operators ?
Since we already have operators like >> and << for bin_shifts, I'd suggest we add the remaining ones, namely:

& for bin_and
| for bin_or
^ for bin_xor
~ for bin_not

Maybe even their combination with an assignment as operators might be a valuable addition ?

If related to #1267 it could make sense.
No other crazy operator requests guys?

Yes, related to #1267 and #1262 since Unicode integration requires a lot of bitwise manipulations, this might help making the code more readable and remove parts that were written in C for cumberness (and a bit of performance-related fears) reasons.

Question: What about being able to unarying all the binary operators (no only + and -)?
Good idea of bad idea?

Interesting... So I could build a regular expression like x*? Neat, but then I also want the concatenation binary operator x y.

I'm not against the possibility of having them, though I can hardly find a relevant example of such use for what are usually binary operators.

@egagnon oh, I didn't think about that. I just thought about making only prefix unary operators since there is already 2 of them (+ and -) and a third one asked here by @R4PaSs (~). Currently, the only postfix operator is [] and it already has a special syntax.
Having both prefix and postfix operators will require to choose some global precedence in the grammar (and since + is prefix, it will be hard to justify that * is postfix).
For the empty operator, unfortunately this will make the grammar ambiguous I think, since we accept things like parenthesis-less calls, eg. print hello.

@R4PaSs for instance, in C++, the prefix unary operator * is often used for dereference and the prefix unary operator & is often use for reference. Hum, suddenly this doesn't seem to be a good idea :)

@privat I was having a little fun. There's the whole problem of operator precedence that shows up as soon as one wants to allow wide operator syntax. I don't think that it would be a good idea to stray too far from a very conservative and classical presentation of the few standard operators (+, -, *, ...) using fixed, predefined precedence and associativity.

Unrelated to bitwise ops but some languages (python and eiffel at least if i remember correctly) have an integer division operator // (two slashes). Do you want it?
There is also the generalized sloppy comparator of ruby === (three equals). Or the pattern matching operator of perl =~.
Note: I am fine if you say that you do not want them :)

The more operators you add, the more cryptic programs could become. Some programmers like to abuse operators.
Think of C++'s standard use of the shift operators  << and >> for streams. Some people obviously like that. I don't.

On the other extreme, you could look at APL which provided a very wide array of operators.

@privat : Sure, I guess me being sick I forgot those elementary uses, and yes in this case I guess this is not such a good idea for Nit :)
Though I guess leaving the possibility to be redefined later in case someone has the use for it might be good idea ?
Why not leave the possibility for willing users to refine it should they need it for whatever purpose ?
Sure, there might be some bad uses of it all, but, regardless of whether we allow it or not, as you said

As for the operators you proposed:

// => What's the difference with a simple / when called on an Int ?
=== if the semantic's the same as JavaScript, I'm not at all convinced, it might be useful in a dynamic-typed language but in our case, I don't think it is appropriate
=~ this one I'll need explanation, is it some kind of sloppy equivalence operator ?

@egagnon : Ouch, APL is so brutal, I'm not sure we should even take a look at this :)
But I'll give it to them, the fact that they invented a keyboard for their needs proves their imagination !

@R4PaSs In PERL, the =~ and =! operators are used to pattern matching:
print "matches" if $myvar =~ /foo/;
print "does not match" if $myvar =! /foo/;

But I'm following @egagnon with the fact that this kind of operators will make the programs less readable.


Deactivate selections

Hey!
I've been experimenting with your extension today and I LOVE it!
I have been wanting the ability to do this for some time and I think the idea of "inactive selections" is a pretty good solution.
I have some thoughts about some new features that really make this work well for me.
I added a proxy command that "deactivates" the current active selections.

using "Undo" moves the selections back to their original location when they were placed, which I didn't like but I understand why it is that way and  I think it is a useful feature. This just make it not work very well if you want to deactivate the cursors after having made changes.

and using "PlaceInactiveSelections", turned all the selections to Inactive, but it leaves an active cursor at each position, this also did not feel quite right because it requires you to hit (escape) to clear them before you can make any useful adjustments.

kcs.deactivateSelections
adds an inactiveSelection at each position and then clears all secondary cursors
The keybinding is set to the same thing as kcs.activateSelections so it becomes very intuitive to use, it now works more like a toggle. activating and deactivating selections.
I solved this first just by creating a sequence in Commands.Commands extension but I think it is a fitting enough feature to be worth adding natively.
This Feature ties into my next PR to make a very smooth workflow!
thanks for putting this extension together!

Hi, thank you for the appreciation!
To dive right into it, there are two PRs that you made. The other one is "Cycle through inactive selections", but i'd like to start with this one im commenting on, "Deactivate selections", because its a little complex for me to understand it at a first glance and also just by text.
As i see it, this issue/request's description has 3 parts:
First:

using "Undo" moves the selections back to their original location when they were placed, which I didn't like but I understand why it is that way and I think it is a useful feature. This just make it not work very well if you want to deactivate the cursors after having made changes.

Second:

and using "PlaceInactiveSelections", turned all the selections to Inactive, but it leaves an active cursor at each position, this also did not feel quite right because it requires you to hit (escape) to clear them before you can make any useful adjustments.

Third:

kcs.deactivateSelections adds an inactiveSelection at each position and then clears all secondary cursors

So, if its not much, the same as you did for the Cycle feature, could you make a video in which it is shown what you meant, at least for the first and second parts of the issue? In other words, to show the actions you wanted to make and couldnt do with the current state of the published extension.
Thank you!

yes certainly!
to clarify, I'm not saying there is an "issue" that needs to be fixed.
I just think there is a different behavior that is useful.
The Goal is creating a way to turn the cursors on and off
When there are multiple cursors you can "make them inactive" by using the placeInactiveSelection command.
it creates the inactive selections, but it leaves an active cursor at each position like this:
https://github.com/user-attachments/assets/a019bcd7-8cfc-4ae0-a4f0-4340ffcdb582
you can place the inactive selections back in the document, using "undo", but it puts the inactive cursors at the end of the changes, which is not always where the active cursor is. like this:
https://github.com/user-attachments/assets/ec305568-c437-430f-81b5-1f45de77df04
Deactivate Selections
With the new deactivateSelections command. The active selections can be made inactive and the extra cursors are removed.
This is the behavior that feels natural to me:
https://github.com/user-attachments/assets/b3613ba2-fa96-45dc-84d7-c8fced4451ac
using the keybindings:
         {
            "command": "kcs.activateSelections",
            "key": "pageup",
            "when": "editorTextFocus && inactiveSelections"
         },
         {
            "command": "kcs.deactivateSelections",
            "key": "pageup",
            "when": "editorTextFocus && !inactiveSelections"
         },

we can now quickly toggle the selections active and inactive:
https://github.com/user-attachments/assets/64b3b356-2503-418e-856d-f9a5482c4e87

I think i fully understand now what you are suggesting.
I wanted to think this very thoroughly, as did before with the other suggestions that were submitted. So Ive drawn some conclusions:

It seems that this behavior is not conflicting, changing, or making impossible any other behavior or feature of the extension.
Previously, when there were no current inactive selections on the document, the Activate Selections command did not do anything. Now with your suggested additional behavior, when there are no inactive selections, Activate Selections acts like a shortcut for Place Inactive Selection --> Escape (which in this case was getting rid of the additional active selections).

Im leaning heavily towards including this behavior into the extension.

In the other PR, about the default keybindings that you suggested for the commands, the idea is that other persons may have different keybindings which for them they work best, thats why the solution is to be assignable to whatever they'd like.

Regarding the "Cycle through selections" feature:
I thought about it when i was heavily developing the extension, but i guess i kind of waited for some requests about it, to see if other people may need it. Hence i guess i'll include this too in the next update.

Though, if i didnt fully understand the situation as i thought, please notify me.

Yes I think you understand. That is exactly how I am using this. Thanks for taking the time to consider it!


NPM peer error when using React v18 - npm ERR! Could not resolve dependency:

My project uses<EMAIL_ADDRESS>and I get the following error: npm ERR! Could not resolve dependency: peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>when trying to install this package.
Should  I install it by force or maybe a bump in React version is coming in a future update ?

It doesn't work on React v18

I have also the same problem with React 18

I also have "react": "^18.2.0". I just used
$ npm install --save react-chat-widget --legacy-peer-deps

When I install with --legacy-peer-deps, it worked on my local, but it wasn't able to build later on

i get error when i installed dep with --legacy-peer-deps
error - ReferenceError: self is not defined
at Object. (/Users/myproject/node_modules/react-chat-widget/lib/index.js:1:333)

i get error when i installed dep with --legacy-peer-deps
error - ReferenceError: self is not defined
at Object. (/Users/myproject/node_modules/react-chat-widget/lib/index.js:1:333)

I just ran into the same issue.

e and I was using

me too


minification broken - wrong directive definitions

two directives don't get defined correctly:
--> change to:
  tagsInput.directive('tiTranscludeAppend', [function() {
  tagsInput.directive('tiBindAttrs', [function() {

this is critical - we cannot ship our production code without this.

@mbenford any update?

@mbenford any update?
in case you're busy: who else can help add the code changes / merge pull requests?

Sorry for not replying sooner.
I don't quite understand the problem you are experiencing. The source code of all directives (and services, for that matter) is concatenated, annotated and compressed (minified) at build time, and everything has been working just fine so far. You can actually check that out by taking a look at the build artifacts generated by Travis after each successful build.
I wonder if you could clarify your issue better?

Background: explicit dependency injection helps track dependency injection bugs

I use turned off implicit dependency injection - using the ng-strict-di directive
http://stackoverflow.com/questions/18782324/angularjs-minify-best-practice/26734698#26734698
the why: "the application will fail to invoke functions which do not use explicit function annotation (and are thus unsuitable for minification), as described in the Dependency Injection guide, and useful debugging info will assist in tracking down the root of these bugs."
http://stackoverflow.com/questions/17238759/angular-module-minification-bug/24659782#24659782

Situation: ngTagsInput v3.0.0 uses explicit dependency injection for almost all methods
e.g.:
tagsInput.directive('tagsInput', ["$timeout", "$document", "$window", "tagsInputConfig", "tiUtil", function($timeout, $document, $window, tagsInputConfig, tiUtil) {

Problem: Few methods lack explicit dependency injection
We do minify ngTagsInput in our own build process
A few methods lack explicit dependency injection - e.g.
tagsInput.directive('tiTranscludeAppend', function() {

tagsInput.directive('tiBindAttrs', function() {

Impact: breaks ngTagsInput minification in strict mode
This  breaks the minification with turned on strict dependency injection.
Solution

change

tagsInput.directive('tiTranscludeAppend', function() {
-->
tagsInput.directive('tiTranscludeAppend', [function() {

change

tagsInput.directive('tiBindAttrs', function() {
-->
tagsInput.directive('tiBindAttrs', [function() {

Sorry, I assumed too much from the context - since almost all methods use explicit dependency injection, I thought the two missing ones are an small oversight..
Does this shed some light on the situation?

Thanks for the clarification.
As I mentioned, at build time ngAnnotate ensures that explicit dependency injection is used wherever it is required. Those particular directives (tiBindAttrs and tiTranscludeAppend) don't have any dependencies, so as far as I know they don't need any annotation for minification to work. In fact, ngAnnotate leaves them untouched for that very reason.
I've created these examples (here and here) to show that only components with external dependencies need to be annotated so they work with strict DI mode, and one of them uses ngTagsInput.

This issue was selected to be spring-cleaned by a script. More information can be found here.
If anyone thinks this was a mistake and this issue should be reopened, please leave a message below explaining why. Before doing so, please consider reading the CONTRIBUTING file.


File Loader Needed?

I keep getting the error "../twitter/package.json Unexpected token (2:9)" and then "You may need an appropriate loader to handle this file type."
Do I need to install anything else to use this package?

@jesskrich can you provide more detail here?  That sounds like a webpack issue to me?

@jesskrich I'm guessing you at least need the json-loader, but it may not work with webpack at all depending how you mean to use it.

might be related to this: https://github.com/node-influx/node-influx/issues/174


Only allow for one client instance

This checks if AudioSwitcher client is already running and closes it if so, kept the dialog pretty basic but can of course expand on that :)

This was done initially, but if multi people use a computer then it requires multiple instances of the application to be open.
There was an issue a long time ago to remove the single client instance, so it won't be included back in at this stage.

Ah I see, so this was done for RDP sessions :)
What could be possible is to check if one or more is running as the current user if you want, that way it still allows multiple instances if the computer has multiple active accounts.

Yeah RDP was one use case. There are also multi use PC's, where user's will switch in and out without "logging out" as such, and the application stays open.
Yeah there's a bit that could be done to make it single instance, but it there any huge downsides to running to instances of the application?
The settings get a little dodgy, but for the most part it's ok.

Yeah except for the settings part it works fine, I had it overwrite it from another instance which got launched by mistake recently which isn't a big dea and less commonl tbh :)


chore: split transfer AppModule/IBCModule

Description

Splitting the ics20 transfer module into ibc_module.go (ics26 handlers and helper funcs)
Renamed module_test.go -> ibc_module_test.go

closes: #XXXX

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against correct branch (see CONTRIBUTING.md)
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Code follows the module structure standards.
[ ] Wrote unit and integration tests
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
[ ] Added relevant godoc comments.
[ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
[ ] Re-reviewed Files changed in the Github PR explorer
[ ] Review Codecov Report in the comment section below once CI passes

Was there an issue associated with these module splitting tasks?
https://github.com/cosmos/ibc-go/issues/472

Should I include a changelog entry as this requires changes to app.go? Should one be added retrospectively for testing/mock?
Yes please. Will external users be affected by the splitup of mock? If so, then yes

Nice, good stuff! I think with this we can close #472 then, as it's already done for ica and fee also.
Added a changelog for transfer, I don't think mock affects externals.


Adding test cases for RaftMsgExecute

Why you need it?
将io.seata.server.cluster.raft.execute包下的global，branch，lock三个部分添加相关测试用例，可每个部分提交一个pr
Add relevant test cases to the global, branch, and lock sections under the io.seata.server.cluster.raft.execute package, and submit one pr for each section.
How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.
Other related information
Add any other context or screenshots about the feature request here.

It's interesting, let me try 🙋♂

It's interesting, let me try 🙋♂

Good job, looking forward to your pr

@funky-eyes Ready to review ;)


Refactoring: Bindings and woking Coroutines

add @Bindable and remove LiveData
implement custom change callbacks for binding property changes for use in code
melted brain to 1450°C

Hi, I have been really busy and I couldn't help much. I you could send me the Play Store images designs I could also translate that.
Thanks

@Ismael034 Okay, release went kind of good, had 2 critical bugs in there , but newest version 1.0.2 is stable so far. The play store images are temporarily for now. If I have a definitive version of them, I will translate them to german and you can send me a spanish version of the texts as well.
If you want, you can have a look at the current spanish translation, as I had to use google translator for the lasts bits, before release.


CLI Internal Error when Configuring ACR Integration with Existing AKS Cluster

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az aks update Extension Name: aks-preview. Version: 0.5.5.
Errors:
'NoneType' object has no attribute 'get'
Traceback (most recent call last):
Local\Temp\pip-unpacked-wheel-lhx4371t\knack\cli.py, ln 215, in invoke
azure\cli\core\commands\__init__.py, ln 654, in execute
azure\cli\core\commands\__init__.py, ln 718, in _run_jobs_serially
azure\cli\core\commands\__init__.py, ln 711, in _run_job
AppData\Local\Temp\pip-unpacked-wheel-7avbl0u7\six.py, ln 703, in reraise
azure\cli\core\commands\__init__.py, ln 688, in _run_job
azure\cli\core\commands\__init__.py, ln 325, in __call__
pip-unpacked-wheel-c8n8j8wo\azure\cli\core\__init__.py, ln 784, in default_command_handler
.azure\cliextensions\aks-preview\azext_aks_preview\custom.py, ln 1657, in aks_update
    azure_keyvault_secrets_provider_addon_profile = instance.addon_profiles.get(CONST_AZURE_KEYVAULT_SECRETS_PROVIDER_ADDON_NAME, None)
AttributeError: 'NoneType' object has no attribute 'get'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

az aks update -n {} -g {} --attach-acr {}

Expected Behavior
Successful integration of container registry to AKS cluster
Environment Summary
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.13.0 *

Extensions:
aks-preview 0.5.5
log-analytics Unknown

Additional Context

route to service team

This is a known problem.  Please upgrade your aks-preview to the latest version and this issue will be mitigated.


Environment Request for Wardship

Environment details
Application Name
wardship
Description of application
The Wardship Registers is a non-critical business application that allows Royal Courts of Justice High Court authorised staff to view wardship entries previously created within the application. Wardship applications can still be issued by the High Court, however there is no longer any requirement to record and process Wardship applications. There are occasional requests for searches on the Wardship Registers application for historic applications.
GitHub team slug
dts-legacy
Environments

Environment
Access level

[X] Development
[ ] view-only[ ] developer[X] sandbox

[ ] Test
[ ] view-only[ ] developer

[X] Preproduction
[ ] view-only[X] developer

[X] Production
[ ] view-only[X] developer

Tags

tag
value

application
Wardship

business-unit
HMCTS

infrastructure-support
<EMAIL_ADDRESS>

owner
<EMAIL_ADDRESS>

Networking options
Subnet sets

[X] General - this application will use the same subnet as other applications in your business unit
[ ] Isolated - this application has highly sensitive data which must have its own isolated subnet with no network connectivity

How do users connect to the application?

[X] Over the public internet
[ ] With a purple cabled device (please give details)
[X] With a MoJ Official device

Connectivity to other applications or external parties

Additional features

[ ] Additional VPC Endpoints
[ ] Extended DNS Zones
[ ] Other - please specify

Other information

Definition of done

[ ] account created
[X] customer informed

PR #4549

Account created


Cannot Edit and Save Variable List

We get an error when trying to make changes to a variable favourites list.

I've managed to make a small change to fix this the first time, but if I try to edit the same variable list, i get a server error.
To reproduce:

Create variable favourite list. Save.
Edit list by adding variable. Save.

This leads to a ValueError: invalid literal for int() with base 10: 'None'

Error on updating variable list already created

working


Be stricter about throttling expensive tests on recursive functions

Right now, test throttling is only based on time already consumed by test functions. But in inner recursive calls, we don't yet know how much time will be spent in postconditions of the outer calls. There's an inherent tension here, and currently, if there is no debt at the start, the code may commit to running all of the tests of all the recursive calls, which could be bad if they are all expensive and there are hundreds of them.
Currently, the code doesn't even store setup debt until the end of the postconditions, so even expensive setups don't lead to any throttling before the recursive calls start exiting.
So we need to refactor the system to make at least two fixes:

Store setup debt before the main function, so we can throttle due to slow setup.
Add a special case where postconditions on outer calls can be canceled if we accumulated too much debt from other expensive postconditions during the outer call's body.

But of course, we don't want to create a situation where doing lots of expensive setup means all the postconditions get canceled. This will take some design work.

But of course, we don't want to create a situation where doing lots of expensive setup means all the postconditions get canceled. This will take some design work.

And also, it seems like the outermost postcondition is generally the most important; there should probably be a rule that at least the outermost postcondition never gets canceled.


new screencast, covering 1.0 usage

@errordeveloper The screencast is ancient! Needs updating to match what's in the current README.

https://github.com/weaveworks/weave/commit/19ddb65036beaaf738bac5bf5e35991cd4fcd348


enable override of httpListenAddr flag

According to
https://github.com/VictoriaMetrics/operator/blob/10a53e58c8dcb388e7dda62db836513fb0618e90/controllers/factory/vmcluster.go#L520
the command line argument -httpListenAddr=:%s is hardcoded for the vmselect pods. This makes it impossible, for example, to force listening only on the loopback interface by launching vmselect with -httpListenAddr=<IP_ADDRESS>:<port>, which is useful when using a TLS-terminating or authn/authz proxy launched as a sidecar container.
A possible fix to this may be to replace lines 519--521 with the following:
	args := []string{}
	if _, ok := cr.Spec.VMSelect.ExtraArgs["httpListenAddr"]; !ok {
		args = append(args, fmt.Sprintf("-httpListenAddr=:%s", cr.Spec.VMSelect.Port))
	}

i.e. if the user explicitly specified httpListenArgs among the map of extraArgs, there should be no need to set the default value.

Changes was included to the v0.24.0 release. Feel free to re-open the issue if it doesn't solve it.


TypeError: this.model.getRepository is not a function

Hello,
I've been using AdminBro with Sequelize for a while now but I wanted to try it with TypeORM.
I've followed the doc step by step, but I get this error:

TypeError: this.model.getRepository is not a function
at Resource.prepareProps (C:\nodejs\test\ORM\typeorm\node_modules@admin-bro\typeorm\src\Resource.ts:120:36)
at new Resource (C:\nodejs\test\ORM\typeorm\node_modules@admin-bro\typeorm\src\Resource.ts:21:29)
at Database.resources (C:\nodejs\test\ORM\typeorm\node_modules@admin-bro\typeorm\src\Database.ts:15:22)

Here is my code:
import "reflect-metadata";

import express from "express";
import { Connection, createConnection } from "typeorm";

import AdminBro from "admin-bro";
import AdminBroExpress from "@admin-bro/express";
import * as AdminBroTypeORM from "@admin-bro/typeorm";

const app = express();
const PORT = process.env.PORT || 8080;

const main = async (connection: Connection) => {
        // init admin bro
	AdminBro.registerAdapter(AdminBroTypeORM);
	const adminBro = new AdminBro({
		databases: [connection],
		rootPath: "/admin",
	});
	const router = AdminBroExpress.buildRouter(adminBro);

        // start express server
	app.use(adminBro.options.rootPath, router);
	app.listen(PORT, () => console.log("Listening on", PORT));
};

createConnection()
	.then(main)
	.catch((error) => console.log(error));

Thanks in advance

I too have this error, this is because the Model class use the datamapper aproach and not the active record.
The method https://github.com/SoftwareBrothers/admin-bro-typeorm/blob/7ff78547db5eb0c8344692c92577a973593437d7/src/Resource.ts#L25 this.model.getRepository() needs the model to extends the BaseEntity from typeorm

I have the same problem. The base implementation without any resources fails with the mentioned issue

Is there support for the datamapper approach planned?

I'm having the same issue and worked on a patch circumventing the issue, you can get it here (apply with patch-package): https://gist.github.com/TPXP/ac29ad0fbf126b8470858ede6d8b6cdb
I haven't tested it against Data Mapper entities, so take extra care if your project mixes both types of entities.


store.getState().oidc.user.access_token, access_token is null

Hi,
I followed the example, get access_token from store.getState().oidc.user.access_token, then call a service API in componentWillMount.
it will success if I logon first, then go to the React Component;
but it will failed (access_token is null) if I use the URL (with the route of the component) directly;
is there any way I can make sure oidc user is loaded, so I can get the access_token to call the service API ?
Thanks a lot !

Make sure you render your routes (except for the callback) only when a valid user is present. This way, the UI which is dependent on the token will only be displayed when a valid token is present.

See this line in the example app to understand what I mean.

oh, I guess I understood, I need build a mechanism make sure user is logged in before render any component.

thanks a lot @maxmantz

I found redux-auth-wrapper that should what I need :)


Block placement api

Updates to the block placement code/api. It allows for easier block updates with custom blocks.
I added default/vanilla block mechanics for some blocks. This feature is optional. Use "VanillaBlocks.registerBlocksInstance(instance)" on the instance that you want to have vanilla mechanics. Chests work partially.
The old API remains, but the block placement listener now uses the new methods.

Closed due to inactivity. Feel free to open again.


Support custom field names without @map

Problem
Currently, using a schema like the one bellow will trigger the generator's default dmmf validation preventing using the name schema.
datasource client {
    provider = "sqlite"
    url = "file:db.sqlite"
}
generator client {
  provider             = "prisma-client-py"
  interface            = "asyncio"
  recursive_type_depth = 5
}

model Entity {
  id    Int     @id @default(autoincrement())
  email String  @unique
  schema  String?
}

When running poetry run prisma push
Suggested solution
Create fields with {reserver_name}_ for example, schema_ for the above case, and use Pyndantic aliases.
Alternatives
Create a custom generator.py, but run into problems:

Creating the dmmf needs the generator's class _on_request to be overridden (assumed to be part of the internal API)
To enable accept the {reserver_name}_ to {real column} looks like the substitution could go in the class QueryBuilder.get_default_fields, but then again, seems to be part of the internal API, not meant for override.

Additional context
In my use case, the schema file is coming from a TypeScript project and I want to keep compatibility with it without changing the file.

If you weren't aware, this is achievable at the client level, without needing to perform db migrations with @map but this would mean you need to update your TypeScript project to use that field name as well.
I would not want automatically rename the field but supporting something like this would likely work quite well
model Entity {
  id    Int     @id @default(autoincrement())
  email String  @unique
  /// @Python(field_name: "schema_field")
  schema  String?
}


Sync: ID Mutation

Support a basic ID mutation workflow within the SDK.

At its core we need to review the ID coming back from the server with the ID we sent on a POST (insert).  In the event that the ID has changed we need to:

Remove the old record in the table, and add the new record in the table
Notify the developer that we have did this so they can update all instances in memory in the app

this is also harder for languages not doing mutation, etc, hopefully though most devs would know if their tables can mutate IDs in their own logic

Figure out updates in progress (behind lock (managed), in queue (iOS)) and how they should be modified
When the mutation is INTO an existing record ID:
is the record already local, if so, we need may need to trigger some type of conflict resolution if our local copy is not clean
Will it be possible for the ID to mutate, but the change set not be accepted?  (conflict)  Similiar to above story, we basically can end up w/a 3 way merge we need to let the dev handle.

Assuming ID mutation is limited to creation for this

Hey everyone, please have a look at the Readme section for the future of Azure Mobile Apps. Closing this issue for now.


Consul KV store acl tokens ?

My consul KV store is protected with acl_token  and encrypt key.
Does treafik support using those? Can't find this part in manual.
So far only getting errors connecting consul KV store:
Leadership election error failed to acquire lock: Unexpected response code: 403 (Permission denied), retrying in 469.561715ms

Same problem :(
I tried to look if it's easy to implement but traefik seems to use libkv for consul and libkv does not support ACL token yet....(see https://github.com/docker/libkv/issues/29)

Finally it's possible to pass a consul token with the environment variable CONSUL_HTTP_TOKEN because both traefik (for consulcatalog provider) and libkv (for consul provider) used hashicorp api which supports this env var !

@cyrilgdn I guess the same applies for CONSUL_HTTP_AUTH, right?

@mcapuccini From what I see in the code, yes.

@cyrilgdn I tried and it doesn't seem to have any effect for some reason. Could you point me to the code please?
If you are familiar with Kubernetes, that's what I did:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: traefik-ingress-controller
  namespace: kube-system
  labels:
    k8s-app: traefik-ingress-lb
    kubernetes.io/cluster-service: "true"
spec:
  template:
    metadata:
      labels:
        k8s-app: traefik-ingress-lb
        name: traefik-ingress-lb
    spec:
      hostNetwork: true # workaround
      terminationGracePeriodSeconds: 60
      containers:
      - image: traefik:1.1.2-alpine
        name: traefik-ingress-lb
        imagePullPolicy: Always
        env:
        - name: CONSUL_HTTP_AUTH
          value: "user:xxxx"
        - name: CONSUL_HTTP_SSL
          value: "true"
        volumeMounts:
          - mountPath: /etc/traefik
            name: traefik-volume
            readOnly: false
        resources:
          requests:
            cpu: 1
            memory: 1G
        args:
        - --web
        - --kubernetes
        - --configFile=/etc/traefik/traefik.toml
        - --logLevel=DEBUG
      volumes:
        - hostPath:
            path: /etc/traefik
          name: traefik-volume
      nodeSelector:
        role: edge

@cyrilgdn this may be simpler to reproduce:
docker run -v $PWD:/conf -e "CONSUL_HTTP_AUTH=user:test" -e "CONSUL_HTTP_SSL=true" traefik:1.1.2-alpine --configFile=/conf/traefik.toml
2017/03/14 09:42:58 Error loading configuration: Unexpected response code: 401

traefik.toml
[consul]
endpoint = "consul.mydomain.com"
watch = true
prefix = "traefik"

I'll close this issue, because I think the question is answered, but feel free to continue the conversation.


[fr] Releases page in French is blank

This is a Bug Report

Problem:
https://kubernetes.io/fr/releases/ is blank for the main page content.
Proposed Solution:
Delete https://kubernetes.io/fr/releases/ (fall back to English)
Page to Update:
https://kubernetes.io/fr/releases/

Additional Information:
/language fr

/triage accepted

@sftim It have to be deleted https://kubernetes.io/fr/releases/
and what do you mean by fall back to english? Could you please elaborate?

I guess falling back means the menu link of the French website should lead to /releases/ (i.e. its English version) instead of /fr/releases/ since there is no content in the French version.
However, I don't understand what is the source of this URL (/fr/releases/). The navbar-version-selector.html partial seems to be incorrect as it always links to the /releases/ page (despite the website's language currently in use), isn't it?
https://github.com/kubernetes/website/blob/2b53353e1eb688e028231a7ccdb217de4dc059a4/layouts/partials/navbar-version-selector.html#L6
E.g., there is the /releases/_index.md content for the pl locale, but the navigation menu on https://kubernetes.io/pl/ still leads to the /releases/ page, not /pl/releases/.

/assign

There are 2 issues here:

I took a look and indeed, this addition introduced the issue since it added a new page under the releases subfolder.
Moreover, @shurup is correct, you can get to these translation by going on the page https://kubernetes.io/releases/ and clicking the language dropdown, and selecting Français but the navbar-version-selector.html always redirect to the English version.

/area localization

There are 2 issues here:

I took a look and indeed, this addition introduced the issue since it added a new page under the releases subfolder.
Moreover, @shurup is correct, you can get to these translation by going on the page https://kubernetes.io/releases/ and clicking the language dropdown, and selecting Français but the navbar-version-selector.html always redirect to the English version.

Both issues were resolved and merged!
https://github.com/kubernetes/website/pull/36901
https://github.com/kubernetes/website/issues/36903


Conflit between Freddy 3.0.2 & 3.0.3 Cocoapods

Hello,
I have found an issue with Freddy by using Cocoapods.
When I specify the version Freddy 3.0.2, cocoapods installs the version 3.0.3.
Below my Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'SuperApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for SuperApp
  pod 'Freddy', '~> 3.0.2'

  target 'SuperAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'SuperAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end
end

When I run pod install:
Analyzing dependencies
Downloading dependencies
Installing Freddy (3.0.3)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `SuperApp.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

[!] Automatically assigning platform ios with version 10.3 on target test because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

I have the same issue with my pods development :
s.dependency 'Freddy', '~> 3.0.2'
pod install:
...
Installing Freddy 3.0.3 (was 3.0.2)
...

Thanks,
YM

If you just want 3.0.2, then say 'Freddy', '3.0.2'.
As-is, it works as expected for the ~> 3.0.2 version specifier:

In addition to the logic operators CocoaPods has an optimistic operator ~>:

'~> 0.1.2' Version 0.1.2 and the versions up to 0.2, not including 0.2 and higher

https://guides.cocoapods.org/using/the-podfile.html#specifying-pod-versions


Archive Project

seems it was surpassed by some others

Would you suggest a few alternatives? Thanks.

It still works. I still use it, but if you insist on being a on newer version of bootstrap and some maintenance, I'd use strapdown-zeta, or even maybe showdownjs. Otherwise there's also a newer fork (with a commit from 8 months ago): https://github.com/Naereen/StrapDown.js/
There are also forks and pull requests with bootstrap v3 and possibly v4...

cough cough https://github.com/obedm503/bootmark


az webapp log config --application-logging false doesn't turn it off

Issue
az webapp log config --application-logging false doesn't turn it off
Default state

Turn on
Run az webapp log config --application-logging true -n mvpsdkdemoapp -o yaml to turn on
applicationLogs:
  azureBlobStorage:
    level: 'Off'
    retentionInDays: null
    sasUrl: null
  azureTableStorage:
    level: 'Off'
    sasUrl: null
  fileSystem:
    level: Error
detailedErrorMessages:
  enabled: false
failedRequestsTracing:
  enabled: false
httpLogs:
  azureBlobStorage:
    enabled: false
    retentionInDays: 7
    sasUrl: null
  fileSystem:
    enabled: false
    retentionInDays: 7
    retentionInMb: 100
id: /subscriptions/25fd0362-aa79-488b-b37b-d6e892009fdf/resourceGroups/mvpsdkdemorg/providers/Microsoft.Web/sites/mvpsdkdemoapp/config/logs
kind: null
location: West US
name: logs
resourceGroup: mvpsdkdemorg
type: Microsoft.Web/sites/config

Turn off
To turn off I run the following:
az webapp log config --application-logging false -n mvpsdkdemoapp -o yaml
But the UI doesn't show it as disabled:

and the same output is returned.
applicationLogs:
  azureBlobStorage:
    level: 'Off'
    retentionInDays: null
    sasUrl: null
  azureTableStorage:
    level: 'Off'
    sasUrl: null
  fileSystem:
    level: Error
detailedErrorMessages:
  enabled: false
failedRequestsTracing:
  enabled: false
httpLogs:
  azureBlobStorage:
    enabled: false
    retentionInDays: 7
    sasUrl: null
  fileSystem:
    enabled: false
    retentionInDays: 7
    retentionInMb: 100
id: /subscriptions/25fd0362-aa79-488b-b37b-d6e892009fdf/resourceGroups/mvpsdkdemorg/providers/Microsoft.Web/sites/mvpsdkdemoapp/config/logs
kind: null
location: West US
name: logs
resourceGroup: mvpsdkdemorg
type: Microsoft.Web/sites/config

Please note that the applicationLogging: fileSystem only has "level", it doesn't have have "enabled"

CLI version

command-modules-nspkg              2.0.3
core                               2.2.0
nspkg                              3.0.4
telemetry                          1.0.4

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'     Extensions directory 'C:\Users\JonGallant\.azure\cliextensions'

Python (Windows) 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]```

thanks for reporting, we'll have a look

@yungezz - Did you get a chance to look at this?

@jongio  thanks for reporting we will look at this.


Getting OpenSSL::SSL::SSLError on staging machine with existing SSL protection

Hi -- we have submitting a payment working on a development machine (well, taking us to the sandbox to login, which is as far as we've tested). This development machine is running with HTTPS.
However, when we try to run the same code on a staging server that has a valid SSL certificate in place, and so uses HTTPS for the actions to do with paying for orders, we get the following error:
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):
/usr/lib/ruby/1.8/net/http.rb:586:in connect'     /usr/lib/ruby/1.8/net/http.rb:586:in connect'
/usr/lib/ruby/1.8/net/http.rb:553:in do_start'     /usr/lib/ruby/1.8/net/http.rb:542:in start'
/usr/lib/ruby/1.8/net/http.rb:1035:in request'     /usr/lib/ruby/1.8/net/http.rb:845:in post'
/var/lib/gems/1.8/gems/paypal_adaptive-0.2.7/lib/paypal_adaptive/request.rb:88:in post'     /var/lib/gems/1.8/gems/paypal_adaptive-0.2.7/lib/paypal_adaptive/request.rb:75:in wrap_post'
/var/lib/gems/1.8/gems/paypal_adaptive-0.2.7/lib/paypal_adaptive/request.rb:29:in pay'     /app/controllers/orders_controller.rb:63:in pay'

Could you possibly advise us as to where we should look, next?
We have the correct values filled in in our paypal_adaptive.yml config file, and have downloaded the key from paypal.
My guess is that the SSL certificates are clashing, or that maybe I need to register our certificate with paypal somewhere?
Sorry to bug you with this, by the way, we've been hacking it together all day (getting it to work with a Rails 2.1 app), and could really use a little guidance, if possible.
Thanks,
Doug.

Hi -- just to keep this up-to-date, I'm not getting this error when I run locally with SSL enabled.
So I guess it's a server issue? Perhaps I need to know a little more about how the server handles SSL certificates.
I'm going to investigate an approach like this, for now: http://martinottenwaelter.fr/2010/12/ruby19-and-the-ssl-error/


Added some new readme items

packer build prod

Successfully built AMIs:
ami-03d0aa44e618fc480 (us-east-1) ami-0377bcbea81d506e2 (us-west-2)
Please fixup and submit you PR for approval. :tada:

packer build prod

Successfully built AMIs:
ami-0b96e5a633f9646dd (us-east-1) ami-0d63bad84400669c1 (us-west-2)
Please fixup and submit you PR for approval. :tada:

homer

homer


About configs

Hi， I found there are only cifar's config files of combinations . Can you please offer  imagenet and inaturalist's config files of combinations?  I couldn't find some import parameters , for example, cfg.DATASET.CAM_NUMBER_THRES which is needed when I train on imagnet and iNat. Thank you!

Hi! Sorry for replying late.. The 'cfg.DATASET.CAM_NUMBER_THRES's for ImageNet and iNat are 100 and 50, respectively. The codes have been reorganized so the whole config files need to be rewritten and tested.  But I'm busy finding my jobs these days,  I will finish the above things as soon as possible.

Thank you for replaying. I trained on imagenet with cfg.DATASET.CAM_NUMBER_THRES=100 but not got the error rates 56.87 offered in the paper, I'm looking forward to the config files of imagnet and iNat. Thank you again. 看你的名字像是中国人，如果是的话，可以用中文回复我。

作者你好，请问epochs of first_stage+second_stage+third_stage: 160+40+20=220, 与原论文中描述的90epochs不一样了吧？那么原论文中的ImageNet-LT，ResNet-10， 56.87的结果也是220个epochs得到的吗？如果是，那epochs = 90的结果应该是多少呢？谢谢

Hi，关于训练细节的描述可以参考论文的supp，值得注意的是应用mixup的时候，epoch需要double


Include more files in generated tarballs

Add documentation files and test files to setuptools generated tarball for PyPI consumption.
Fixes #32

[Current coverage][cc-pull] is 100%

Merging [#43][cc-pull] into [master][cc-base-branch] will not change coverage

@@           master   #43   diff @@
===================================
  Files           1     1
  Lines         104   104
  Methods         0     0
  Messages        0     0
  Branches        0     0
===================================
  Hits          104   104
  Misses          0     0
  Partials        0     0

Powered by Codecov. Last updated by [70cd085...d7746e0][cc-compare]
[cc-base-branch]: https://codecov.io/gh/txels/ddt/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/txels/ddt/compare/70cd085c8e5a4aecdd953c2a5049dd610cf976be...d7746e025005ff4d212be8ae9ec07cc941ec2961
[cc-pull]: https://codecov.io/gh/txels/ddt/pull/43?src=pr

Release in 1.1.1
Apologies for the delay in releasing.


Support days/weeks/months in time duration

This applies to flags such as --gt and --lt.

Dropping the plan to support months.


What about flexibleServers/configurations ARM Template

I was able to update the Server Configuration with the following ARM template. However, I get an error when deploying.
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "<IP_ADDRESS>",
  "functions": [],
  "variables": {
    "namePrefix": "mysqlf2",
    "name": "[format('{0}-{1}', variables('namePrefix'), uniqueString(resourceGroup().id))]"
  },
  "resources": [
    {
      "type": "Microsoft.DBforMySQL/flexibleServers/configurations",
      "apiVersion": "2020-07-01-preview",
      "name": "[format('{0}/collation_server', variables('name'))]",
      "properties": {
        "source": "user-override",
        "value": "UTF8MB4_BIN"
      }
    }
  ]
}

deploy it.
az deployment group create -g kinmugi-bicep01 -n deploy-17213207 \
        -f mysqlfconfig.test.json  2>&1
ERROR: Deployment failed. Correlation ID: d1b84e80-436c-4a38-b389-255f4f683d11. {
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The response for resource had empty or invalid content."
  }
}

In portal.
before

It looks like it was successful right after deploy.

I'll be back in a few minutes.

In Activity Log looks like this.

Very strange.
One more thing, there is no documentation.
https://github.com/MicrosoftDocs/azure-docs/issues/70600

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

ID: 93405ac1-2a34-1652-cd8d-53f725e5d6c0
Version Independent ID: f42d487a-a579-f84d-86d8-8949eacec4a1
Content: Quickstart: Create an Azure DB for MySQL - Flexible Server - ARM template
Content Source: articles/mysql/flexible-server/quickstart-create-arm-template.md
Service: mysql
GitHub Login: @mksuni
Microsoft Alias: sumuth

@takekazuomi
Thanks for your feedback! We will investigate and update as appropriate.

@takekazuomi Thanks for pointing out the issue. I am able to repro it with the same error message. I tried the same update through ARM template for Single server and interestingly it worked fine and the parameter got updated accordingly.
As flexible server is still in preview and some features could be in development as of now, this might be the reason.
However I have escalated it to the product group already and will be updating this thread based on their response.

Thank you. Flexible servers are an exciting new feature. I enjoy watching that growth.

@takekazuomi Thanks for your patience. We have received the response back from the product group. Please find it below:
“The engineering team has confirmed it is a bug and investigating it further. Until that time, if you are blocked on creating the server programmatically, we recommend to leverage azure cli and set collation_server and character_set_server together using the command below. Once the issue is identified and fixed, we will let you and your template should work. We sincerely appreciate you reaching out to us and taking the time out to report this bug. Let us know if you have any other feedback for us on flexible server. Feel free to reach out to Ask Azure DB for MySQL<EMAIL_ADDRESS>if you have questions or feedback to product group on this topic ”
az mysql flexible-server parameter set --subscription <sub-id> --resource-group <resource-group> --server-name <server-name> --name character_set_server --value UTF8MB4
az mysql flexible-server parameter set --subscription <sub-id> --resource-group <resource-group> --server-name <server-name> --name collation_server--value UTF8MB4_BIN
Please be noted, character_set_server  and collation_server both parameters must be set to consistent value, otherwise it could result in values being reset or server restart failing.
Please let us know if this helps or else you can reach out to above email for further queries.
@savjani

@takekazuomi We will now proceed to close this thread. If there are further questions regarding this matter, please comment and we will gladly continue the discussion.

This issue will be fixed in production on May 21st 2021

@Bashar-MSFT is this issue fixed? It seems like it's still outstanding.


Add editor configurations for our formatting line length

This adds configuration for JetBrains editors and other editors respecting .editorconfig files to use the 120 character line length rule introduced in #61.

It seems to me that Android Studio adds its own rules to the formatting, beyond what flutter format does. I don't really want to encourage people to use its formatter, unless we have it do the same thing as barebone console command.

True, Android Studio is annoyingly using it's own rules when you use the default formatting command and there is no way to disable that, but at least it moves the visual max line indicator in the editor. Also there is a Reformat with "dart format" command that does respect our settings.
I wouldn't say this encourages using the Android Studio formatter, this doesn't really change anything in that regard, it just improves the editing experience.


Release latest irsa-operator

Not needed anymore. Phoenix is going to release a new version of the operator.


SPA routing and not found status code

I'm building a SPA and I want every page to return the index.html file and the status code 200 is this possible with static websites. Currently if I set the error page to index.html the site will work but each call returns 404.

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

ID: dcd3f99a-f522-6edb-6d39-eac1bb917956
Version Independent ID: 69e9c1e5-8deb-8092-46f4-6646d076fbe4
Content: Static website hosting in Azure Storage
Content Source: articles/storage/blobs/storage-blob-static-website.md
Service: storage
Sub-service: blobs
GitHub Login: @normesta
Microsoft Alias: normesta

@daniellittledev Thanks for your question. We are checking on this and will respond to you soon.

@daniellittledev  I'd recommend posting your question in Azure community since it's not directly related to the documentation. We'll follow up there. We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.
I would also request you provide more  information when you are posting your question in Azure community forum

@ daniellittledev Did you find a solution, create a User Voice or similar and have a link you can share here?

@StefanSchoof No, last time I checked I did not find a way to change the status code. A few people seem to be living with the 400 code. I still think the documentation needs to mention they it does not support this (@SumanthMarigowda-MSFT).
I ended up using netlify which does support the capability.

Thanks, for the info.
I found the User Voice: https://feedback.azure.com/forums/217298-storage/suggestions/34802224-static-website-error-handling-change-404-to-200


demos: tidy up makefiles, fix warnings

Update makefiles so that consistent patterns are used.  Object files are compiled from source using an implicit rule (but using our CFLAGS); for linking, we give an explicit rule.  Ensure that "make test" works in each subdirectory (even if it does not actually run any applications).  The top-level demo makefile now works.
The makefiles are not make-agnostic.  e.g. they use the variable $(RM) in "clean" recipes, which is defined in gnu-make but may not be defined in others.
Part of #17806 (eventually, we want the demos to be built and executed as part of our CI)
Testing:
$ cd demo
$ make test

Checklist

[x ] documentation is added or updated

(demos are considered part of the documentation)

This pull request is ready to merge

Merged to the master branch. Thank you.

Can this, or at least the part renaming demos/sslecho/makefile to demos/sslecho/Makefile, please be backported to 3.2?
This fixes trouble switching between branches on a case-insensitive file system (such as MacOS).

@DDvO that seems reasonable to me, but we will need a separate issue for that, can you open one and mark it as branch:3.2?  Bonus points if you're willing to submit the PR :)


Revert "Update to ACK runtime v0.23.0, code-generator v0.23.0"

Reverts aws-controllers-k8s/lambda-controller#77

/verify-owners


Update to rust-lightning:0.0.117

The highlight in terms of code changes in rust-dlc is:
Use new LDK Channel ID struct
Start to use newly introduced ChannelId struct. With a stronger type we are less likely to mix up LN ChannelIds, DLC channel IDs and contract IDs. To that end, we've renamed the old ChannelId type alias to DlcChannelId since it is now only supposed to be used for (temporary or final) DLC channel IDs. We should consider introducing a struct at some point.
To ensure backwards-compatibility we're still serialising the LN channel IDs into bytes, but we now have to use the serialize_with attribute since LDK's ChannelId doesn't implement serde itself. The same applies to deserialisation.

Use new LDK Channel ID struct
Start to use newly introduced ChannelId struct. With a stronger type we are less likely to mix up LN ChannelIds, DLC channel IDs and contract IDs. To that end, we've renamed the old ChannelId type alias to DlcChannelId since it is now only supposed to be used for (temporary or final) DLC channel IDs. We should consider introducing a struct at some point.
To ensure backwards-compatibility we're still serialising the LN channel IDs into bytes, but we now have to use the serialize_with attribute since LDK's ChannelId doesn't implement serde itself. The same applies to deserialisation.

I feel it'd be cleaner to just define our own structs, and implement From<ldk::ChannelId> for the SubChannelId one. Then we could derive the serde::Serialize, and also have a more consistent naming. I feel it can be confusing that Channel structs use DlcChannelId while SubChannel use ChannelId. Unless there is some advantage that I'm not seeing?

Use new LDK Channel ID struct
Start to use newly introduced ChannelId struct. With a stronger type we are less likely to mix up LN ChannelIds, DLC channel IDs and contract IDs. To that end, we've renamed the old ChannelId type alias to DlcChannelId since it is now only supposed to be used for (temporary or final) DLC channel IDs. We should consider introducing a struct at some point.
To ensure backwards-compatibility we're still serialising the LN channel IDs into bytes, but we now have to use the serialize_with attribute since LDK's ChannelId doesn't implement serde itself. The same applies to deserialisation.

I feel it'd be cleaner to just define our own structs, and implement From<ldk::ChannelId> for the SubChannelId one. Then we could derive the serde::Serialize, and also have a more consistent naming. I feel it can be confusing that Channel structs use DlcChannelId while SubChannel use ChannelId. Unless there is some advantage that I'm not seeing?

I think what you propose is even better, but I wasn't sure if you wanted to go that far since before this PR we were just using type aliases everywhere. I can work on adding a couple of newtypes like you suggest.

@Tibo-lg: I've tried to address your comment.
It's probably not perfect because it was a pretty painful process, so let me know if I can make it better.
I had to move some stuff around so that the new structs could be used in all the necessary places. I also left a couple of TODOs and a NOTE. Let me know what you think about those too.


<EMAIL_ADDRESS>hash check failed

Downloading new version
Bypass.zip (3.9 MB) [=========================================================================================] 100%
Checking hash of Bypass.zip ... ERROR Hash check failed!
App:         dorado/bypass
URL:         https://www.bypass.cn/api/download?name=Bypass.zip#/dl.7z
First bytes: 50 4B 03 04 14 00 00 00
Expected:    5bc76f1ea12a58b36f0f34a6b0e4f9fbc3910b1ffa3490c4d7452c52e7b5d3e4
Actual:      5f486602c30f58b5b1c3b1d4a03c9e642ad0fbd555a115263b53f74727429ea4

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/h404bi/dorado/issues/new?title=bypass%401.13.84%3a+hash+check+failed

5f486602c30f58b5b1c3b1d4a03c9e642ad0fbd555a115263b53f74727429ea4

bypass最近更新频繁，年底大家都在抢票。出现hash错误等它更新新版自动修复吧，我懒得手动改。。


Add Android Support

Thank You for sharing such a nice and awaited feature
Description of the issue :
Currently it seems that it doesn't support Android
It doesn't let change "Animation Export Directory" of the "Animation Retargeting" Node from res:// which is not accessable when exported to Mobile Platform

I have to admit I have zero Android experience. I don't use it at all and have not a single android device to test so I never considered Android support.
That said, this doesn't mean that I wouldn't support it, if other people test it and tell me what is required to make it work for them.
Animation Export Directory is currently hardcoded to be a "res://" path but this can be changed. Is there any use case with exporting animations at runtime on Android? Last time I tested animations stored outside of the "res://" system they wouldn't work correctly on the exported game (the reason why "res://" path was hardcoded).

 Returned: -1
04-27 04:04:17.617  5899  6002 E godot   :    At: platform/android/file_access_android.cpp:128:get_buffer() - Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.872  5899  6002 E godot   : **ERROR**: Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.872  5899  6002 E godot   :    At: platform/android/file_access_android.cpp:128:get_buffer() - Condition "!p_dst" is true. Returned: -1
04-27 04:04:17.876  5899  6002 E godot   : **ERROR**: Cannot get class 'AnimationRetargeting'.
04-27 04:04:17.876  5899  6002 E godot   :    At: core/class_db.cpp:1342:is_class_enabled() - Condition "!ti" is true. Returned: false
04-27 04:04:17.876  5899  6002 E godot   : **WARNING**: Node AnimationRetargeting of type AnimationRetargeting cannot be created. A placeholder will be created instead.
04-27 04:04:17.876  5899  6002 E godot   :    At: scene/resources/packed_scene.cpp:168:instance() - Node AnimationRetargeting of type AnimationRetargeting cannot be created. A placeholder will be created instead.
04-27 04:04:22.803  2059 10263 I PackageManager.DexOptimizer: Running dexopt (dexoptNeeded=1) on: /data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk pkg=org.godotengine.test isa=arm64 dexoptFlags=boot_complete,debuggable,public,enable_hidden_api_checks targetFilter=quicken oatDir=/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/oat classLoaderContext=PCL[]
04-27 04:04:22.804  1280  2240 V installd: DexInv: --- BEGIN '/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk' ---
04-27 04:04:22.863  6206  6206 I dex2oat : /apex/com.android.runtime/bin/dex2oat --input-vdex-fd=-1 --output-vdex-fd=11 --call-from-installd=1 --resolve-startup-const-strings=true --max-image-block-size=524288 --compiler-filter=quicken -j6 --debuggable --classpath-dir=/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA== --class-loader-context=PCL[] --generate-mini-debug-info --compilation-reason=unknown
04-27 04:04:24.060  1280  2240 V installd: DexInv: --- END '/data/app/org.godotengine.test-HLE9AYJjjV8zP1jMc0oTJA==/base.apk' (success) ---
04-27 04:04:24.061  2059 10263 I PackageManagerServiceInjector: FirstUseActivity Pinning optimized code org.godotengine.test

Android seems to require different build parameters. So far I couldn't find something valuable for this error or how to fix it. Maybe if someone from the Android crowd moves by and knows what to do that would be great.

Added to the feature tracker.


Heresy!?

https://github.com/troglobit/uemacs/blob/2549a330b45fe8111ccc24a9b00a9fcae138b379/src/sys/unix/Makefile#L39
xemacs? Really? 😹

Heh, I noticed that too.  Decided to keep it though because I wanted to keep the repo as pristine and close to the original as possible.  The Makefile was actually as close to the Ultrix original as I could keep it, really surprised me that the name was xemacs!  The Atari version is also called XEMACS[.TOS] but the VMS version is called UEMACS.EXE ...
I chose uemacs as the repo name because of the orig. tarball from https://github.com/larsbrinkhoff/emacs-history/tree/sources/Dave Conroy, so I'm leaning towards using uemacs as the binary name as well.
The MicroEMACS v3.6 repo (the one developed from this code base by Daniel Lawrence) use the binary name me.
What do you think?

In the conversion to configure, just now, I changed the binary name to match the repo name; uemacs.
What do you think, should we attempt to go for an shorter one instead, like ue maybe?

The word xemacs is something I've typed a million times in shells (a long time ago). It didn't feel right, as it's a different (although related) program. Does anybody use xemacs these days? 🤔
uemacs vs ue - well, I'm a sucker for clarity. ue was something called UltraEdit back in the days on Windows too. Damn shame the character µ isn't on regular/western keyboards. :)

OK, uemacs it is then! :-)
... closing issue ...


Support flake attr nixosModule

Support extracting module options defined via flake attr nixosModule (see nix/flake.cc).
These options are currently ignored by nixos-search.
nixosModule options are now exported with a flake attr of the form [ flake ] (instead of [ flake moduleName ], which is currently used for options defined via nixosModules.moduleName).
TODO
This change must also be reflected in the Elm and Rust layers.
Field flake of struct NixOption currently consists of both a flake and a module name.
@ysndr, @ncfavier, could you have a look at this?
Here's what I'd propose for displaying the options in the web interface:
# Current format
github:foo/bar#mymodule -> services.bar.enable

# Possible format for options defined via `nixosModule`
github:foo/bar -> services.bar.enable

Thank you
I’ll look into it

Looks good to me in general
Im just concerned with Option duplications in case a flake does have nixosModules.moduleA and nixosModule=nixosModules.ModuleA
Regarding the rust and elm layer I don’t see much of a hurdle

Good point. A possible fix:
If nixosModules.moduleA is identical to nixosModule (by comparing the results of lib.optionAttrSetToDocList), export moduleA as nixosModule.
Should I implement it like this?

This is a bit messy. I don't think we should support nixosModule because I don't think it makes sense for a flake to export a nixosModule that's not in its nixosModules. nixosModule is there as a shorthand, in my opinion.

I don't think we should support nixosModule

Only defining nixosModule is common for flakes that define only one NixOS module.
But we can indeed ignore the case where nixosModule is not also included in nixosModules.
So we could simply export nixosModule when nixosModules is empty.

I agree, assuming the nodeModule is also a key of nodeModules makes sense to me.
Have you tested whether the rust side complains? It should iisc as it expects a 2-tuple

nixosModule is now conditionally exported.

Have you tested

No, because the Rust type is obviously incompatible.

I did a quick adaption of the rust and elm side

Minor nitpick:
The module path will always have either one or two components, so we should make this explicit by using types like (str (optional str)) or ((str) or (str str) in Rust and Elm, but only if this doesn't complicate the pattern matching and the serde importing.

Yes the vec solution was mostly just the quickest way but given that flakes are flat i guess its right to specialize for that

Ok we got a rust type now
I left the elm repr as a list for now as its easier to work with

LGTM. Can we get a netlify demo?

Can we get a netlify demo?

Apparently thats not possible on forks as they dont have accesst to the netlify credentials..

that being said we haven't imported any flake with nixosModule yet so the change would not be visible

I've squashed the fixups.

There's one issue remaining:
Right now, the search index only contains the part after the pound sign of each option path (e.g. weblate#weblate -> services.weblate.enable for github:ngi-nix/weblate#weblate -> services.weblate.enable).
Because for all flakes in the index the module name is identical to the flake name, it's currently possible to list all options of a flake by searching for the flake name (Example).
This will no longer be possible for flakes that only define nixosModule. Can we add the flake name to the search index to fix this?

We do in fact index the flake {name, url, description}
Yet with or without the moduleName this field hasn't been indexed at all so far and if i understand elastic right was therefore never subject to search.
Actually, none of the flake information is explicitly queried even, but elastic might take it into consideration regardless - i'm not sure about that.

Yes, I was talking about the elastic search backend. How can we find out if it includes the flake name when searching for options?

it is indexed
but not queried
I assume ES only look into fields explicitly queried

I think it would make sense to include flake_name in the query, with a ranking weight lower than option_description.

I think it would make sense to include flake_name in the query, with a ranking weight lower than option_description.

I agree but for me thats a separate PR

Alright, we can merge this then.


total noob question: how do I use /sbin/install_clean?

my Dockerfile looks like
# see https://github.com/phusion/baseimage-docker (Ubuntu 16.04 LTS)
FROM phusion/baseimage:0.9.22

ENV ZUKEEPER_ROOT /var/www/htdocs/www-zulily-event-management

RUN apt-get update
RUN add-apt-repository -y ppa:ondrej/php
RUN add-apt-repository -y ppa:nginx/stable

# install_clean is from phusion/baseimage - cleans up apt cache after installing so the
#   apt-install cache doesn't bloat the image
RUN /sbin/install_clean -y \
  wget net-tools nginx gcc g++ php5-cli \
  php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl\
  php5-gd php5-mcrypt php5-intl php5-imap php5-tidy

but when run it fails on the last line:
...
Step 6/21 : RUN /sbin/install_clean -y   wget net-tools nginx gcc g++ php5-cli   php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl  php5-gd php5-mcrypt php5-intl php5-imap php5-tidy
 ---> Running in a8d2f4c2d36d
/bin/sh: 1: /sbin/install_clean: not found
The command '/bin/sh -c /sbin/install_clean -y   wget net-tools nginx gcc g++ php5-cli   php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl  php5-gd php5-mcrypt php5-intl php5-imap php5-tidy' returned a non-zero code: 127

I think you probably need to build the image yourself, as it's not yet in
0.9.22, I think.
On 9 December 2017 at 22:32, Bee<EMAIL_ADDRESS>wrote:

my Dockerfile looks like
see https://github.com/phusion/baseimage-docker (Ubuntu 16.04 LTS)
FROM phusion/baseimage:0.9.22
ENV ZUKEEPER_ROOT /var/www/htdocs/www-zulily-event-management
RUN apt-get update
RUN add-apt-repository -y ppa:ondrej/php
RUN add-apt-repository -y ppa:nginx/stable
install_clean is from phusion/baseimage - cleans up apt cache after installing so the
apt-install cache doesn't bloat the image
RUN /sbin/install_clean -y
wget net-tools nginx gcc g++ php5-cli
php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl
php5-gd php5-mcrypt php5-intl php5-imap php5-tidy
but when run it fails on the last line:
...
Step 6/21 : RUN /sbin/install_clean -y   wget net-tools nginx gcc g++ php5-cli   php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl  php5-gd php5-mcrypt php5-intl php5-imap php5-tidy
---> Running in a8d2f4c2d36d
/bin/sh: 1: /sbin/install_clean: not found
The command '/bin/sh -c /sbin/install_clean -y   wget net-tools nginx gcc g++ php5-cli   php5-fpm php5-mysql php5-pgsql php5-sqlite php5-curl  php5-gd php5-mcrypt php5-intl php5-imap php5-tidy' returned a non-zero code: 127
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/phusion/baseimage-docker/issues/457, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAeKj_Sor22RclVQ-VX0yCEOfnr4WA18ks5s-vx0gaJpZM4Q8Qjq
.

@littlebee yes, the install_clean command has been added after the latest release published on docker hub.
But you can easily add it yourself, it's a simple script indeed: https://raw.githubusercontent.com/phusion/baseimage-docker/c41f837f82b4d8780f78fed1770c4b9bfd5af181/image/bin/install_clean.sh


Add item tapped / clicked function

held boolean to allow the dragged item to be set instantly
Store a moved boolean as clicks should not occur if the pointer has moved
If a hold time is set then allow the itemClicked function
Check if callback &  itemClicked are functions before executing

gh-pages

Display the clicked item's name

:hankey:

I'll take that as a :sparkles: :P


Size mismatch for rpn model when evaluate by pre_train model

I have run the evaluate by the pre_train model provided by @traveller59 successfully in colab.but when i run it in my pc ,there a error like:
File "/home/algorithm/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 777, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for VoxelNet:
Unexpected key(s) in state_dict: "rpn.blocks.1.1.weight", "rpn.blocks.1.2.weight", "rpn.blocks.1.2.bias", "rpn.blocks.1.2.running_mean", "rpn.blocks.1.2.running_var", "rpn.blocks.1.2.num_batches_tracked", "rpn.blocks.1.4.weight", "rpn.blocks.1.5.weight", "rpn.blocks.1.5.bias", "rpn.blocks.1.5.running_mean", "rpn.blocks.1.5.running_var", "rpn.blocks.1.5.num_batches_tracked", "rpn.blocks.1.7.weight", "rpn.blocks.1.8.weight", "rpn.blocks.1.8.bias", "rpn.blocks.1.8.running_mean", "rpn.blocks.1.8.running_var", "rpn.blocks.1.8.num_batches_tracked", "rpn.blocks.1.10.weight", "rpn.blocks.1.11.weight", "rpn.blocks.1.11.bias", "rpn.blocks.1.11.running_mean", "rpn.blocks.1.11.running_var", "rpn.blocks.1.11.num_batches_tracked", "rpn.blocks.1.13.weight", "rpn.blocks.1.14.weight", "rpn.blocks.1.14.bias", "rpn.blocks.1.14.running_mean", "rpn.blocks.1.14.running_var", "rpn.blocks.1.14.num_batches_tracked", "rpn.blocks.1.16.weight", "rpn.blocks.1.17.weight", "rpn.blocks.1.17.bias", "rpn.blocks.1.17.running_mean", "rpn.blocks.1.17.running_var", "rpn.blocks.1.17.num_batches_tracked", "rpn.deblocks.1.0.weight", "rpn.deblocks.1.1.weight", "rpn.deblocks.1.1.bias", "rpn.deblocks.1.1.running_mean", "rpn.deblocks.1.1.running_var", "rpn.deblocks.1.1.num_batches_tracked".
size mismatch for rpn.deblocks.0.0.weight: copying a param with shape torch.Size([128, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([128, 128, 1, 1]).
size mismatch for rpn.deblocks.0.1.weight: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for rpn.deblocks.0.1.bias: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for rpn.deblocks.0.1.running_mean: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for rpn.deblocks.0.1.running_var: copying a param with shape torch.Size([256]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for rpn.conv_cls.weight: copying a param with shape torch.Size([2, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([2, 128, 1, 1]).
size mismatch for rpn.conv_box.weight: copying a param with shape torch.Size([14, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([14, 128, 1, 1]).
size mismatch for rpn.conv_dir_cls.weight: copying a param with shape torch.Size([4, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([4, 128, 1, 1]).
I run it in pytorch 1.0,cuda 10,and python3.6.5

Anyone know the reason?Hope for your help~

I also met the same problem.
I switched to the "car_lite" model in "simple-inference.ipynb", then this issue was gone, but then it crashed at the network inference.

I also met the same problem.
I switched to the "car_lite" model in "simple-inference.ipynb", then this issue was gone, but then it crashed at the network inference.
thank you! there is no error when i used pre-trained model by my pc~

I found car.fhd.config actually corresponds to car_onstage


Update snippet_test.go

Fixed issue in official samples for cursor paging where the same task object was copied into the final array over and over again without clearing its internal state.
Description
Currently the official documentation for cursor paging contains a little bug, where the task object pertains old values between the iterations. For instance if Task had an optional pointer property called Foo *Bar then Foo would pertain its value from the previous iteration if the next data record doesn't override it.
My change proposes a small fix in the sample where each iteration instantiates a new object of type Task and hence avoids this bug.
Another alternative would have been to insert task := Task{} inbetween the append and it.Next call inside the for loop:
// Read the tasks.
var tasks []Task
var task Task
it := client.Run(ctx, query)
_, err := it.Next(&task)
for err == nil {
        tasks = append(tasks, task)
        task = Task{}
        _, err = it.Next(&task)
}
if err != iterator.Done {
        log.Fatalf("Failed fetching results: %v", err)
}

Having said that I think my modification in this PR makes the code simpler by following the same iterator pattern as it was done in previous examples, with a single it.Next inside the for loop.

Hi @dustinmoris
Thank you for your really great finding, explanation, and suggested fix.
I could reproduce the problem and can confirm that your fix is solving it:

type Task struct {
	Category        string
	...
	...
	Foo             *Bar
}

type Bar struct {
	Value int
}

func (t Task) String() string {
	if t.Foo == nil {
		return fmt.Sprintf("[%s]", t.Category)
	}
	return fmt.Sprintf("[%s, %d]", t.Category, t.Foo.Value)
}

func TestSnippetIterator_Cursor(t *testing.T) {
	...
	...
	t.Log(tasks)

	...

Before fix
% go test -v -run=TestSnippetIterator_Cursor
=== RUN   TestSnippetIterator_Cursor
    snippet_test.go:550: [[CatC, 111] [CatA, 111] [CatB, 111]]

Value 111 showing up 3 times, which is incorrect.
After fix
% go test -v -run=TestSnippetIterator_Cursor
=== RUN   TestSnippetIterator_Cursor
    snippet_test.go:553: [[CatC, 333] [CatA, 111] [CatB]]

Correct

@Deleplace Done:


The link in the getting started section on the readme is not available

As the title say, the link

Usage
Tutorial: Using Distiller to prune a PyTorch language model
in the section "getting started" give me 404 message. Can you move or update these links?
Thanks.

Thanks @stvreumi!
I fixed the documentation bug.
Cheers,
Neta

Hi,
I'm afraid that the link dies again.

Thanks @Slicerkao,
We didn't notice that a new version of mkdocs changed some of the page links.
Hopefully I got them all.
Cheers,
Neta


Is it normal to have different test results on same model and data?

Hello @tianyic,
I was running the sanity_check tests on test_convnexttiny.py and got different results despite using a fixed dummy_input.
dummy_input = 0.5 * torch.ones(size=(1, 3, 224, 224), dtype=torch.float32)

Test Run 1
Maximum output difference :  1.452776312828064
Size of full model        :  0.10655930824577808 GBs
Size of compress model    :  0.01566738821566105 GBs
FLOP  reduction (%)       :  0.5265925908672965
Param reduction (%)       :  0.8535776291678294

Test Run 2
OTO graph constructor
graph build
Maximum output difference :  1.4196803569793701
Size of full model        :  0.10655930824577808 GBs
Size of compress model    :  0.02001185156404972 GBs
FLOP  reduction (%)       :  0.5471079567314201
Param reduction (%)       :  0.8127864514599561

Test Run 3
OTO graph constructor
graph build
Maximum output difference :  1.5195997953414917
Size of full model        :  0.10655930824577808 GBs
Size of compress model    :  0.04547972418367863 GBs
FLOP  reduction (%)       :  0.4412873512719674
Param reduction (%)       :  0.5736049577741684

The difference is quite big so i want to ask if it's normal.

@iamanigeeit
In general, if all minimally removal structures are zero-invariant, then the output deviations should be nearly as 0, as you might have seen in other DNN sanity checks. (Reference Section 3 in OTOv3 manuscript).
For convnexttiny, we provided two cases of sanity checks, one for pretraining kept, another one for vanilla network. The difference is disabling one singleton nn.Parameter, i.e., gamma and avoiding a few node groups from pruning. In my memory, both versions should yield the nearly closed to zero deviation. But when I double checked, the pretraining is fine, yet the vanilla one yield similar amount deviation as yours. It is indeed a bit abnormal.
My gut feeling is due to the vanilla network considers the consideration of pruning over grouped conv, as I mentioned in another issue. It may have some places broken in some previous commit to such large difference. :(
In addition, for transformer, all of MLP layers that I met are zero-invariant. Attention layers are case-by-case, e.g., Bert's is zero-invariant, LLAMA is not, TNLG is Phi-2 is, etc.

@tianyic
I should only care about the maximum output difference, right? It's around 1e-6 or less.
For the pretrained model, i still get variation in flop / param reduction.

Model
FLOP
Param

ConvNextTiny
15-30%
30-55%

ResNet18
55-80%
65-90%

If it's normal, i can close the issue.


getCurrentTrack returns null

i got null when calling getCurrentTrack (song is playing)
let state = await TrackPlayer.getState(); // return state
let trackId = await TrackPlayer.getCurrentTrack(); // return null

platform Android
react-native 0.49.3
react 16.0.0-beta.5

got the same issue.

i am getting same issue.am i handling promise in wrong way.

Are you still facing this issue in 1.0.0?

@Guichaguri yeah i am still facing issue i am able to get play state and other progress variables but not able to get current track.plz guide me .i am working on android.

same issue

I'll be closing this issue. Feel free to reopen it if you're still having problems.


ERC721 transfer unique nonce validator

The PR implements Validator for transferring ERC721 tokens based on UniqueNonceDedup for replay protection and an incremental counter for determining the next token id to transfer.

Needs to be able to read uint256[] arrays from the immutable args. So the following PR on the respective library has been opened - https://github.com/wighawag/clones-with-immutable-args/pull/5/files


Updating from 6.2.0 -> 6.4.2 is a breaking change for us: "Do not define "id". Instead, rely on the database to generate it."

Description
We are modeling tree structures in with UUID primary keys. We specifically chose UUID as type because among other benefits we can generate those IDs in the application and send whole trees to the database in a single transaction without having to go back and forth for each new node we are inserting.
Reproduction Steps
We have this factory:
factory :root_node, class: 'Tree' do
  id { SecureRandom.uuid }
  root_id { id }
end

Expected behavior
The instance should be constructed with identical values for id and root_id (as was the case with FactoryBot 6.2.0). Alternatively we would be fine with overriding this behavior but browsing the Readme or the web for "Do not define "id". Instead, rely on the database to generate it." didn't yield any helpful results.
Actual behavior
Creating instances worked just fine with FactoryBot 6.2.0, but since at latest 6.4.2 this results in the following error:
     FactoryBot::AttributeDefinitionError:
       Attribute generates "id" primary key for Tree"
       Do not define "id". Instead, rely on the database to generate it.

System configuration
factory_bot version:   6.4.2
rails version:  7.0.8
ruby version: 3.2.2

I general, if one uses DDD or event sourcing, the IDs generation is an application concern, not DB. Is it possible to make this check optional please?

https://github.com/thoughtbot/factory_bot_rails/blob/54c72541ac8d9afa2c94274d80597c24112ce054/README.md?plain=1#L168C1-L168C57 should help.

Within the context @pyromaniac, I think we can close this "bug". It's more like a configurable feature.
p.s. this feature was a surprise to me, too.

I'm happy that there is a feasible way to revert back to the old behavior and this has addressed my personal needs. I do however agree with @BiggerNoise : a more prominent mention would be very helpful. What about either:

Mentioning the config value in the error message?
Mention the error message in the Readme?

Agree that being able to revert to the previous behavior has met my needs as well.
I think @MarcusRiemer documentation suggestions would be very helpful, would a P/R be helpful?

One issue with turning off via config.factory_bot.reject_primary_key_attributes = false is that for Rails engines this needs to go in the dummy app, not in say spec_helper.

Seems like the kind of breaking change that should warrant a major version number increment.


no need to use lodash/assign while Object.assign() is available

Any benefits to use lodash and have extra dependency while function is already available at no extra cost?
https://github.com/nicksp/redux-webpack-es6-boilerplate/blob/master/src/client/assets/javascripts/features/friends/friends.js#L94

haha, no need actually. Will change accordingly.
Thanks for pointing this out :-)


whereIn stopped producing parenthesis (in 0.14.5) for pg when a scalar is passed

Environment
Knex version: 0.14.6 (but the issue was introduced in 0.14.5)
Database + version: Postgres 9.6
OS: Windows & Linux
Bug

Explain what kind of behaviour you are getting and how you think it should do

knex.select('foo.*').whereIn('something', 1).toSQL().sql now produces select * from "y" where "x" in ?
and is missing parenthesis that existed in version 0.14.4

Error message: An invalid syntax error from the pg lib.

Reduced test code, for example

const Knex = require('knex');
const knexPg = Knex({
  client: 'pg'
});
console.log(
  knexPg()
    .select('foo.*')
    .from('foo')
    .whereIn('something', 1)
    .toSQL().sql
)

Missing / erroneus documentation
The previous behavior was undocumented, but no breakage was indicated as this change was undocumented too.

@elhigu Why can't we change what the valid parameters are? It is intuitive that this usage would work; to the extent that I would bet most people never even looked at the docs to figure it out. As an interface knex.js is relatively intuitive, so I'm a little unclear why we can't consider scalars valid and update the docs?

Because passing scalar to that API is unintuitive. It would give a hint that also  .whereIn('something', 1,2,4) would be valid arguments (which is an API I don't like either). Where in in SQL is operation for an array of value and I believe knex should reflect that in its API like it currently does.
So it all boils down to that in my opinion it is a bad API to allow passing non array literal there. Of course if there are huge demand for that I have to think about it again.


New Prototypes and Properties to Tw2TransformParameter

These changes do not effect anything currently using this Constructor
Added @function eulerToQuat which converts a vec3 to quat4
Added @function quatToEuler which converts a quat4 to vec3
Added @property _transform which holds an un-transposed version of the worldTransform
Added @property _target which stores an optional wrapped SpaceObject
Added SetTarget, GetTarget and ClearTarget prototypes
Added GetScale and SetScale prototypes
Added GetPosition and SetPosition prototypes
Added GetRotation and SetRotation prototypes (vec3 rotation)
Added GetOrientation and SetOrientation prototypes (quat4 rotation)
Added GetCenter and SetCenter prototypes
Added GetTransform prototype which returns an untransposed transform
Added GetWorld prototype which returns the current world transform

These changes work as expected but I found a small use case where the targetting wasn't flexible enough. Will resubmit when I solve this.


Convert custom assember stats into metrics

There is a custom stats struct that is part of TcpAssembler that is updated while receiving & decoding TCP data. These would be better suited to a metrics solution (eg OTel metrics when we get there).

We do this now! ᕕ( ᐛ )ᕗ


Convert MPT checkpoints to FT format

A script to convert MPT checkpoints to FT format. A script to run with FasterTransformer is coming soon in a followup PR.
Partially fixes #67
Thanks @bheilbrun for sharing your code.

To avoid nesting too many folders, can we remove the ft folder and just put this in the root directory of inference ?

@hanlint : I created a folder for two reasons 1) There will be at least one another script so all FT related stuff can stay in a single folder 2) Readme of this folder can explain all the FT related stuff in a single place.

would it be ok to move this script a folder and append the short README.md here to llm/inference/README.md

moved it to the inference folder.


challengeWindowSize seems not in the offical documentation

Describe the bug
Config: {size: '05'} is not working for handleAction method.
Base on the official document:
If you are using the Card Component, pass the action object to the handleAction event of your existing Card Component and skip to step 5
and
// Optional configuration for the challenge window size
--
  | const threeDSConfiguration = {
  | size: '01'
  | // Set to any of the following:
  | // '02': ['390px', '400px'] -  The default window size
  | // '01': ['250px', '400px']
  | // '03': ['500px', '600px']
  | // '04': ['600px', '400px']
  | // '05': ['100%', '100%']
  | }

and the PR: https://github.com/Adyen/adyen-web/pull/620,
We thought pass {size: '05'} to handleAction method will make the 3DS challenge window responsive, but it doesn't.
And after we dug into the source code and noticed we should use challengeWindowSize, but it seems not in the official documentation.
So wonder if it's the correct setting for handleAction? If so, could you update your documentation? (If it was already somewhere, maybe make it more obvious)

Hi @JustinLiang90 ,
Our docs are now updated showing the challengeWindowSize property. Thanks for the feedback!


Override static styles within a Lit component based on an external property

Should this be an RFC?

[X] This is not a substantial change

Which package is this a feature request for?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description

This was originally a StackOverflow question.

I'm trying to specify a theme as a property, and then override the static styles property on the Lit element.
This would be handy because then I could share an interface with my users such that they would have a type-safe way of composing custom themes of my web components for their own apps.
However, when I change the static styles property, Lit doesn't seem aware of the change, nothing actually happens. I've tried doing it in both the constructor and connectedCallback methods, but neither worked. In my real-world use case, it's slightly more complicated because I have a BaseComponent being inherited with its styles by other components, but let's leave it aside for this question, I guess.
Is this really possible? Or should I stick to using styleMap, classMap and regular CSS custom properties.
On the Lit's Discord server, another user mentioned that I might need to use Constructable Stylesheets — and it's apparently what Lit uses under the hood — but I'm not sure where to even start with that.

You can take a look at this example on Lit's playground here.

I think part of the problem is that I just can't seem to change the stylesheet part of components (static styles) during runtime, only at compile (transpile) time.
Lit Component:
import {html, css, unsafeCSS, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';

type Color = string;
interface CustomTheme {
  primary: Color;
}

const customTheme = {
  primary: "orange"
}

function themeToLitCss(theme: CustomTheme) {
  return css`
    p {
      color: ${unsafeCSS(theme.primary)}
    }
  `
}

@customElement('hello-world')
export class HelloWorld extends LitElement {
  static styles = [];

  @property({
  attribute: 'custom-theme',
  converter: (attrValue: string | undefined) =>
    attrValue ? JSON.parse(attrValue) : undefined,
  })
  customTheme?: CustomTheme;

  override connectedCallback() {
    super.connectedCallback();

    // Overriding the styles with an external theme specified by the user
    if (this.customTheme) HelloWorld.styles = [this.customTheme];
  }

  render() {
    return html`<p>Hello World</p>`;
  }
}

The HTML would look like this:
<hello-world custom-theme='{"primary": "orange"}'></hello-world>

Alternatives and Workarounds
The current workarounds are:

styleMap
classMap
regular CSS custom properties.

static styles are always applied for the entire class. Dynamically setting them would not apply to existing element instances, but would apply to all future element instances.
If you want something custom per-instance, you need to use a

Hello World
`;
  }

Hi @justinfagnani, it just so happens that I do want to apply on every instance of a class.

But you theme is set as an instance property. Do you want the last instance to get a theme set to effect every other instance no matter what their theme was?
Also modifying the static styles won't do that, since existing instances will have already had their styles set.
If you want a global theme switch to effect all instances, then you also need a way to notify all instances on changes. I would use something like context for that.

@justinfagnani, thank you very much for your comments! After clearing my head a bit, I think the  solution you proposed pretty much fills all of my requirements. (I do think that having something like what I had sketched for static styles natively on Lit would be a nice feature though.)
Here's the adapted example with it:
import {html, css, unsafeCSS, LitElement} from 'lit';
import {customElement, property} from 'lit/decorators.js';

type Color = string;
interface CustomTheme {
  primary: Color;
}

function themeToLitCss(theme: CustomTheme) {
  return css`
     p {
       color: ${unsafeCSS(theme.primary)}
     }
  `
}

@customElement('hello-world')
export class HelloWorld extends LitElement {
  static styles = [];

  @property({
  attribute: 'custom-theme',
  converter: (attrValue: string | undefined) =>
    attrValue ? JSON.parse(attrValue) : undefined,
  })
  customTheme?: CustomTheme;

  render() {
    return html`

Hello World

    `;
  }
}

It works on a per instance basis indeed:
<hello-world custom-theme='{"primary": "orange"}'></hello-world>
<hello-world custom-theme='{"primary": "red"}'></hello-world>

Here is the link to it on Lit's playground.

Would you like to use this to post an answer on StackOverflow and gain some points?

Oh, I don't care much about the points. Thanks for copying this over!


Update tasktable to show next steps in paused tasks

Coverage remained the same at 92.548% when pulling 01c3aadf5817e374dd619cb8f9454cc3dbe86633 on show-paused-todos into c51eb72de0ea8c404ec57f3c73aed0ac95868ef1 on main.