@auth on two 1-many connections

** Which Category is your question related to? **
AppSync
** What AWS Services are you utilizing? **
Cognito, AppSync
@aws-amplify/cli v1.8.4
aws-amplify v1.1.32
** Provide additional details e.g. code snippets **
I have 2 tables with differing levels of auth on them, and I have a table which joins connections between the two.
The Brand model has dynamic group auth, which is assigned to a user in Cognito (e.g. "brand-1, brand-2, brand-3") and then each row has one or more of those groups in the groups field.  Users are also assigned to a generic "brand" group in Cognito, which means they can read everything from the Event model.
type Brand @model @auth (rules: [
	{ allow: groups, groups: ["admin"], operations: [create, read, update, delete] },
	{ allow: groups, groupsField: "groups", operations: [read, update] }
]) {
	id: ID!
	name: String!
	groups: [String!]
	eventBrands: [EventBrand!] @connection(name: "EventBrandBrand")
}

type Event @model @auth (rules: [
	{ allow: groups, groups: ["admin"], operations: [create, read, update, delete] },
	{ allow: groups, groups: ["brand"], operations: [read] }
]) {
	id: ID!
	name: String
	brands: [EventBrand!] @connection(name: "EventBrandEvent")
}

type EventBrand @model {
	id: ID!
	event: Event! @connection(name: "EventBrandEvent")
	brand: Brand! @connection(name: "EventBrandBrand")
}

For arguments sake I have entered two brands, and two events. I have then added an EventBrand for brand-1/event-1, and I have added a second EventBrand for brand-2/event-2.
When I query the EventBrand model, I get results back, which is great - but instead of ignoring items with connections I'm not authorised to retrieve, it simply returns a null item and generates an error for each of those connections.
This doesn't really suit our use case, as our users could in theory be paging through empty page after empty page until they get theirs.
Response:
{
   "data":{
      "listEventBrands":{
         "items":[
            null,     // <---- NULL ITEM HERE
            {
               "id":"2eb450cd-3b27-4657-89a4-f4cf709757b4",
               "event":{
                  "id":"15cd1ab9-051c-4a2b-9709-ff81dcb63cb8",
                  "name":"Event 1",
               },
               "brand":{
                  "id":"1c66565b-af2f-4dc4-97a8-043be12b0de0",
                  "name":"Brand 1",
                  "groups":[
                     "brand-1"
                  ]
               }
            }
         ],
         "nextToken":null
      }
   },
   "errors":[
      {
         "path":[
            "listEventBrands",
            "items",
            0,
            "brand"
         ],
         "data":null,
         "errorType":"Unauthorized",
         "errorInfo":null,
         "locations":[
            {
               "line":19,
               "column":7,
               "sourceName":null
            }
         ],
         "message":"Not Authorized to access brand on type EventBrand"
      }
   ]
}

I then tried adding @auth directive to the EventBrand model, and targeting the brand.groups field. The response mapping template looks correct, but I get nothing returned.
Model:
type EventBrand @model @auth (rules: [
	{ allow: groups, groups: ["admin"], operations: [create, read, update, delete] },
	{ allow: groups, groupsField: "brand.groups", operations: [read] }
]) {
	id: ID!
	event: Event! @connection(name: "EventBrandEvent")
	brand: Brand! @connection(name: "EventBrandBrand")
}

Response mapping template:
## [Start] If not static group authorized, filter items **
#if( ! $isStaticGroupAuthorized )
  #set( $items = [] )
  #foreach( $item in $ctx.result.items )
    ## [Start] Dynamic Group Authorization Checks **
    #set( $userGroups = $util.defaultIfNull($ctx.identity.claims.get("cognito:groups"), []) )
    #set( $isLocalDynamicGroupAuthorized = false )
    ## Authorization rule: { allow: groups, groupsField: "brand.groups" } **
    #set( $allowedGroups = $item.brand.groups )
    #foreach( $userGroup in $userGroups )
      #if( $util.isList($allowedGroups) )
        #if( $allowedGroups.contains($userGroup) )
          #set( $isLocalDynamicGroupAuthorized = true )
        #end
      #end
      #if( $util.isString($allowedGroups) )
        #if( $allowedGroups == $userGroup )
          #set( $isLocalDynamicGroupAuthorized = true )
        #end
      #end
    #end
    ## [End] Dynamic Group Authorization Checks **

    ## No Owner Authorization Rules **

    #if( ($isLocalDynamicGroupAuthorized == true || $isLocalOwnerAuthorized == true) )
      $util.qr($items.add($item))
    #end
  #end
  #set( $ctx.result.items = $items )
#end
## [End] If not static group authorized, filter items **

Result:
{"data":{"listEventBrands":{"items":[],"nextToken":null}}}

I have tried debug the Request Mapping template, but have had no success/can't figure out how to do it.
I also tried querying the Event or Brand models and passing a filter where brand/event connection is null, but the brand is not part of the ModelEventFilterInput type.
export type ModelEventFilterInput = {
  id?: ModelIDFilterInput | null,
  name?: ModelStringFilterInput | null,
  and?: Array< ModelEventFilterInput | null > | null,
  or?: Array< ModelEventFilterInput | null > | null,
  not?: ModelEventFilterInput | null,
};

export type ModelBrandFilterInput = {
  id?: ModelIDFilterInput | null,
  name?: ModelStringFilterInput | null,
  groups?: ModelStringFilterInput | null,
  and?: Array< ModelBrandFilterInput | null > | null,
  or?: Array< ModelBrandFilterInput | null > | null,
  not?: ModelBrandFilterInput | null,
};

So my questions are:

Am I implementing the auth correctly?
If I am, is there a way to ignore the null items from the response?
Do I have an option 3?

@struct78
I reproduced what you reported here.
Not to say you should update your schema like this, just to test things out, if you update the schema and remove ! for the Brand in the type EventBrand like this
type EventBrand @model {
	id: ID!
	event: Event! @connection(name: "EventBrandEvent")
	brand: Brand @connection(name: "EventBrandBrand")
}

You will see the event part is returned and the brand part is null with the Unauthorized error.
{
  "data": {
    "listEventBrands": {
      "items": [
        {
          "event": {
            "id": "27569136-5911-48fc-8b5d-230aa4b2652b",
            "name": "event1"
          },
          "brand": {
            "id": "c9faa3d9-d75b-44f7-aa81-2fd6bb24c261",
            "name": "brand1"
          }
        },
        {
          "event": {
            "id": "8264731b-8413-4d5e-89d8-ed38ab6c2dc2",
            "name": "event2"
          },
          "brand": null
        }
      ]
    }
  },
  "errors": [
    {
      "path": [
        "listEventBrands",
        "items",
        1,
        "brand"
      ],
      "data": null,
      "errorType": "Unauthorized",
      "errorInfo": null,
      "locations": [
        {
          "line": 58,
          "column": 7,
          "sourceName": null
        }
      ],
      "message": "Not Authorized to access brand on type EventBrand"
    }
  ]
}

I will mark this as a bug.
For now you will have to insert your own logic to avoid showing this to your customers.

@UnleashedMind We have gone back to just using the listBrands query, which works with the auth just fine, and we get back the following structure:
[{
  id: "...",
  name: "Brand A",
  eventBrands: {
      items: [{
          brand: {
              id: "8a757fce-4e5d-4822-b025-3c638aa35ac6",
              name: "Brand A",
          },
          event: {
              id: "bc6b9cc4-0d35-4c28-8fe7-3fa7e162458b",
              name: "Event A",
          }
      }]
  },
  groups: ['7b01b2e6-48b5-4c2d-8c8c-759daf609973']
}]

It doesn't seem like I can write a filter to filter by a particular event ID, because the ModelBrandFilterInput type doesn't allow me to:
export type ModelBrandFilterInput = {
  id?: ModelIDFilterInput | null,
  name?: ModelStringFilterInput | null,
  groups?: ModelStringFilterInput | null,
  and?: Array< ModelBrandFilterInput | null > | null,
  or?: Array< ModelBrandFilterInput | null > | null,
  not?: ModelBrandFilterInput | null,
};

I tried updating the model so that a brand had a string array of event IDs, so my model looks like this:
type Brand @model @auth (rules: [
	{ allow: groups, groups: ["admin"], operations: [create, read, update, delete] },
	{ allow: groups, groupsField: "groups", operations: [read, update] }
]) {
	id: ID!
	name: String!
	events: [String!]
	groups: [String!]
}

I then tried to pass it a few filters:
    filter: {
        events: {
            contains: 'bc6b9cc4-0d35-4c28-8fe7-3fa7e162458b',
        },
    }

    filter: {
        events: {
            eq: 'bc6b9cc4-0d35-4c28-8fe7-3fa7e162458b',
        },
    }

None of which return any items. Looking at the updated ModelBrandFilterInput type, events has a ModelStringFilterInput type:
export type ModelBrandFilterInput = {
  id?: ModelIDFilterInput | null,
  name?: ModelStringFilterInput | null,
  events?: ModelStringFilterInput | null,
  groups?: ModelStringFilterInput | null,
  and?: Array< ModelBrandFilterInput | null > | null,
  or?: Array< ModelBrandFilterInput | null > | null,
  not?: ModelBrandFilterInput | null,
};

Which doesn't seem to be support arrays, just strings:
export type ModelStringFilterInput = {
  ne?: string | null,
  eq?: string | null,
  le?: string | null,
  lt?: string | null,
  ge?: string | null,
  gt?: string | null,
  contains?: string | null,
  notContains?: string | null,
  between?: Array< string | null > | null,
  beginsWith?: string | null,
};

I attempted to write a custom resolver, but I quickly hit the limits of my talent and my understanding of the documentation. I don't know GraphQL that well, but I wanted to understand the problem a bit better — is this a GraphQL problem, or an Amplify problem? Is this a feature that could be introduced in the future? Am I just doing something wrong? Is there a workaround?
For now my solution is to set the limit parameter on the query to a very big number and do the record paging and filtering on the client, which kind of defeats the purpose of using Appsync in the first place.

@struct78 @UnleashedMind
Just to add some clarity on the original two issues here:
Example 1
type EventBrand @model {
	id: ID!
	event: Event! @connection(name: "EventBrandEvent")
	brand: Brand! @connection(name: "EventBrandBrand")
}

query test {
  listEventBrands { <-- Scan / Query on The EventBrand join table.  No Auth is defined on the model, so this will return every item.  Each item will have eventBrandId, eventId, and brandId
    items {
       id
       event { # <-- GetItem on Event.  Auth is applied.  If they don't have access then it will error and return null for the item.  This cascades upwards because the EventBrand model has Event marked as non-nullable.
         id
         name
       }
       brand {  # <-- GetItem on Brand.  Auth is applied.  If they don't have access then it will error and return null for the item.  This cascades upwards because the EventBrand model has Brand marked as non-nullable.
           id
           name
       }
    }
  }
}

Example 2
Here you are trying to reference a nested field as the groupName in the @auth directive.  This won't work because brand is not resolved when the response mapping VTL that is generated by amplify is executing.
   #set( $allowedGroups = $item.brand.groups )
$allowedGroups will always be nothing here.

@nathan-quinn, about Example 2 -
I understand the problem, but what should be the solution:
I'd like to define the groups value on the main model (let say "Account"), and "child" models (e.g. "projects") should inherit somehow the same group values of the parent.
Do I have to add the same groups value on all models?

I had this issue. It was because I had generated the schema with @model(queries: null) or something along those lines, which was not adding @aws-api-key to my models when amplify creates the actual build schema. I use api keys to make requests. Remove the (queries: null) part of the models to generate queries and then amplify push to update your backend.

@rahul-nath that was a huge help, thank you.  I'm not sure why (queries: null) drops the authorization attributes but I saw the same with @aws_iam and @aws_cognito_user_pools
Another workaround I found on SO (https://stackoverflow.com/questions/59588247/why-cant-i-read-relational-data-when-i-use-iam-for-auth-but-can-read-when-auth) was to explicitly define the connection and its associated attributes.  I think dropping the (queries: null) is cleaner but if someone can't use that then add an explicit type like:
type ModelComputedConnection @aws_cognito_user_pools @aws_iam {
  items: [Computed]
  nextToken: String
}

which you can take straight out of the compiled build/schema.graphql and just append your @aws_* directives as needed.


Fixed rare crash in PFQuery related to weakify/strongify.

In some rare scenarios (e.g. Parse is being torn down), the query will lose all references to it, and the strongify will yield nil. When that happens, we cannot read or write to any instance variables in that context.

Single nit, otherwise LGTM.
Crazy find.


SMTP variables non-functional

Test user registrations with both Amazon SES and Mailgun have both resulted in zero emails sent. Are these variables functional?

This is also user error.


Navigation not working

After adding
showNav: true I am able to see Home and About tabs but the click event on them is not working.
Are we required to add extra configurations for that? Also can we please update the documentation on how to use navigation in the config file. I am not able to make that work as well.

It's there in the README. Check navigation under the Usage section.
Let me know if you have any doubts!

I am also seeing issues with the navigation. I have the following in my _config.yml:
texture:
  ...
  showNav: true
  navigation:
    - title: About
      url: "/about"
    - title: Resume
      url: "/resume"

The nav bar shows Home and About and both have the default link.

It seems to be working fine. Are you using the latest version? (from the repo and not the gem)

Thank you, that was my problem! The version on master is working as expected
in Gemfile:
gem "texture", :git => "https://github.com/samarsault/texture"

Great!


Handle pending transaction

Fixes https://github.com/trustwallet/blockatlas/issues/683
Now pending transactions returned

Test fails due to slow response from aion explorer, reported to the team to fix it, merging for now


Routing Error: No route matches [GET] "/en/contacts"

After submitting contact form with some errors (e.g. empty email) the action create in controller ContactsController renders this route: http://localhost:3000/en/contacts and shows form errors. Witch is nice.
If you refresh the page now, you will get: Routing Error: No route matches [GET] "/en/contacts"
_Routes match in priority from top to bottom:
...
contacts_path POST	(/:locale)/contacts(.:format)
contact_us/contacts#create {:locale=>/en|de/}
new_contact_path	GET	(/:locale)/contacts/new(.:format)
contact_us/contacts#new {:locale=>/en|de/}
contact_us_path	GET	(/:locale)/contact-us(.:format)
contact_us/contacts#new {:locale=>/en|de/}_
You have only [POST] contacts_path, but no any [GET] on this route.

This is the normal CRUD behavior in Rails controllers.  If you want to allow the page to be reloaded you can add a route to the route file, but users should not have to.


Remote validation calling server-side Action with inconsistent parameter name

We are using Remote Model validation which is great in AspNetCore since the server-side logic no longer needs to live in the attribute itself, which led to circular dependencies in the past.
What we are now missing is being able to use generic validation on things like dates, phone numbers etc where between multiple view models the property names are different.
We would like to try and avoid having an action per property name and rather bind based on property type rather than name. Is this possible currently as from the docs it looks like it isn't?
Our current alternative is to remove the properties from the action method and gather the them from the HttpContext query using ElelmentAt[x].Value assuming that the order is consistent when using additional columns.
A built in solution would be great.

Thanks for contacting us, @armitagemderivitec.
This is not something we plan to add to the framework.


Production ready client generation

Generate only one file with all client documents as discussed #1085

Sample client app needs to be compiled with this changes. See ./templates folder

Sample client app needs to be compiled with this changes. See ./templates folder

Templates use ./src/graphql/**/**.graphql as document inputs. The input still match ./src/graphql/graphback.graphql

Yep.. yarn codegen needs to be run on the client to see if nothing changed.
This will give us feedback if that approach works.

CC @machi1990 - This can also affect (hopefully positively OVP)

CC @machi1990 - This can also affect (hopefully positively OVP)

Will be part of 0.14.0?

Yes. Once this lands I will release new dev version.
This will have huge impact on the changes. We no longer will need schema generation as well.

I need help with the runtime-workflow test in integration. Something might be wrong with my setup. My tests hang on this line

Integration tests require running database. CI runs it. check docker compose for mongo to run it locally

Integration tests require running database. CI runs it. check docker compose for mongo to run it locally. You might need to change ports in test

The integration tests uses Postgres with knex. I have a local Postgres server running and I still can't run the test. Knex only supports SQL databases so I can't use it with Mongo. I would have to change the code to use my mongodb server

My fault. you are right https://github.com/aerogear/graphback/blob/master/integration/tests/runtime-workflow.ts#L32
Now why tests are failing. Any error?

Now why tests are failing. Any error?

I get three
TypeError:  Cannot read property 'destroy' of undefined line 73
and
  console.log
    TypeError: pointerOptions.unixify is not a function
        at Array.collectGlob (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:221:31)
        at next (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\utils\helpers.js:28:23)
        at Array.collectDocumentString (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:218:5)
        at C:\Projects\graphback\node_modules\graphql-config\dist\core\src\utils\helpers.js:31:15
        at collectSources (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:28:9)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at loadTypedefs (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs.js:12:21)
        at Object.loadSchema (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\schema.js:6:21)

      at tests/runtime-workflow.ts:65:13
          at Generator.throw (<anonymous>)

 console.error
    Unhandled error

      at process.uncaught (../node_modules/jest-jasmine2/build/jasmine/Env.js:248:21)

  console.error
    TypeError: pointerOptions.unixify is not a function
        at Array.collectGlob (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:221:31)
        at next (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\utils\helpers.js:28:23)
        at Array.collectDocumentString (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:218:5)
        at C:\Projects\graphback\node_modules\graphql-config\dist\core\src\utils\helpers.js:31:15
        at collectSources (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs\collect-sources.js:28:9)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at loadTypedefs (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\load-typedefs.js:12:21)
        at Object.loadSchema (C:\Projects\graphback\node_modules\graphql-config\dist\core\src\schema.js:6:21)

      at process.uncaught (../node_modules/jest-jasmine2/build/jasmine/Env.js:249:21)

Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

Ok. This is kinda well known issue of the integration tests. When something is failing in before it will not print error at all. It is probably failing to connect to the database - usually port or username issue. If you run one from docker-compose in our template it has different port

@wtrocki  I was able to get the integration tests running.
There is a new problem. What do we do about gqlwithfragment format? It's no longer needed as all documents are now in one file. Currently, generating all documents in one file using this format causes duplicate fragments to be generated

I would not call it a problem. Do we need any other formats? What js the value of ts format?

Do we need any other formats?

Apart from ts? I don't think so

What js the value of ts format?

I don't understand this
Can I remove the gqlwithfragment format? It will require a change to docs.

But what is the value of the ts format when we have GraphQL one?

We don't need any format apart from graphql; since we will use graphql-codegen to generate the ts types.

I tried to rebase and ended up messing the branch.
@wtrocki  can you merge it like this or should I create a new branch.

I see a comment about generating ts for backwards compatibility here.
Should I leave the gqlwithfragment format for backwards compatibility too.

I think the simplest then better.
We can have ts and graphql format with the single file save.
GraphQLWithFragment makes no sense.

Requires rebase

Let's also some single page sentence to release-notes.md

We should enable all CRUD flags in this PR. Without that we can't really test it properly. Also types here were generated with all crud enabled.

Seee https://github.com/aerogear/graphback/blob/master/templates/ts-apollo-postgres-backend/.graphqlrc.yml#L13-L16

@wtrocki  review before I rebase

Not sure what you mean. Do you mean me chekcing not rebased PR.I normally do review on rebased code that has all issues resolved

I see that we added ts format. We should keep grahql format and the same model.

Not sure what you mean. Do you mean me chekcing not rebased PR.I normally do review on rebased code that has all issues resolved

ok

I see that we added ts format. We should keep grahql format and the same model.

Not sure what you mean. Should I remove the ts format? I thought you need to verify that it works

Yes.. But we do not want this on master as we use codegen

Were you able to run client app?

Yes.

Ready for review

Looks good. Have you tried to run sample app with backend?

Yes. I ran the sample app. It worked perfectly.

@Eunovo @wtrocki I gave this a shot here https://github.com/aerogear/OpenVolunteerPlatform/pull/93 and it work nicely. This is really good work.
I have a couple of comments:

While the upgrade will work out of the box, the old generated gql query / fragment files will be there, dangling in user source codes (see the amount of deleted files in the PR I linked).  I'd have loved to see a good message in the console indicating which files can be deleted but a mention in the release note / docs that crud files can be deleted.

It seems to me that gqlwithfragment is no longer supported https://github.com/aerogear/graphback/pull/1297/files#diff-68c63497d04c1e9533c6b395ed2a788fR31 but docs on the master do not reflect that https://github.com/aerogear/graphback/blob/06ea54ebd4650586a6d20830b467fdf687ddd676/docs/plugins/graphback-client.md#plugin-config

Actually we have zero info in release notes and docs
@Eunovo Can you help with this?

graphback.(graphql | ts)

is name hardcoded? I got that we will get option to control what name will be used and default will be graphback or generated.graphql/ts

Actually we have zero info in release notes and docs
@Eunovo Can you help with this?

This will be awesome.

graphback.(graphql | ts)

is name hardcoded? I got that we will get option to control what name will be used and default will be graphback or generated.graphql/ts

Yes, it is hardcoded in the meantime https://github.com/aerogear/graphback/pull/1297/files#diff-a4d6c30af7374831c26dbbed7db947c6R15, having an option to change it will be welcomed.

Actually we have zero info in release notes and docs
@Eunovo Can you help with this?

graphback.(graphql | ts)

is name hardcoded? I got that we will get option to control what name will be used and default will be graphback or generated.graphql/ts

@wtrocki I can change the code to use the outputPath so that generated code if
outputPath = "src/graphql(.ts | .graphql | no extension)" generated code will be in src/graphql(ts | graphql)

Yep. And documentation should be updated as well


What will be the fate of neovim-remote now with neovim/neovim#17439 ?

So I was wondering are whether there will be backwards incompatible changes for this project now that https://github.com/neovim/neovim/pull/17439 is merged. Or perhaps this project will become obsolete?
Thanks.

This was discussed in a previous issue: https://github.com/mhinz/neovim-remote/issues/169
If the plugin works, I guess stick with that until Neovim 0.7 comes out. Or forget the plugin and use Neovim nightly which has the 'remote' features: https://github.com/neovim/neovim/releases
You can download the .AppImage file and test it if you're on Linux... or use MacOs 'brew'.
wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
chmod +x ./nvim.appimage
:help remote.txt

nvim 0.7 has been released!

At the moment the usage of --remote in Nvim is still a bit cumbersome, some features miss, and nvr can still be used in :terminal to open files without starting a nested nvim process.
I'll try fixing a few low-hanging fruits in the next days, but don't expect me to put too much time into this project. I'll update it for nvim master and then go on.
The goal is that, in the long run, nvim supports everything nvr does natively. (But that still might take a while.)


Provide a controller for Azure IaaS

Hi @pujarisat
please raise your pull request to fb_azure_adapter.

@pujarisat
Hello,
in the next two weeks I am going to write a new manual for the Azure controller similar to the ones we already have for AWS, VMWare, ROR etc.
As an input, could you please provide some basic information on the Azure integration:

which components of CT-MG/APP and Azure are involved and how do they interact?
which usage scenarios are supported?
Information similar to the one provided in Section 1.1 and 1.2 of all our existing integration guides would be very helpful for a start, just 1-2 pages. And of course: the sooner the better.
Thanks in advance

The controller has been delivered to pointed out branch.


(Q?) Large file size

I was comparing litedb against sqlite and noticed a rather large comparative file size. I have a 21mb sqlite db (30mb of sql) with an index on the string key, ended up as 64mb before I even got to add the index. (data is mostly like:
db.keyword.insert { data: [10,"java.applet.Applet.Applet() constructor",0]}
)
Is this something expected or am I doing something wrong?

I don't know how SQLite implements storage system, but LiteDB is a not optimezed for use less space, it´s optimazed to be fast as possible. LiteDB uses pages (4kb) to store documents. When an page use more than 50% of size (2kb) the next document will use another page. All empty page area are reserved for document updates.
So, if you need change a document with extra bytes, the document will keep all in some page and will still fast to get this document. If you document needs grow more than this page area, will be created an Extended Page. Take a look on this class (I know this class in not easy, but I tried to comment as must as possible)
https://github.com/mbdavid/LiteDB/blob/master/LiteDB/DbEngine/Services/DataService.cs
So, 3500 bytes document will use 1 data data. And 5000 bytes document will use 1 data page (as entry pointer) and 2 extended pages.

Ah that does explain things. My documents are very small, on average they look like:
{data: [10,"java.applet.Applet.Applet() constructor",0]}
so they'd use 4k for just this entry and in the end the file ends up large?

In 4K page, LiteDB will use (for small documents) like 2kb of data (so, if you document is 200 bytes size, will have ~ 10 document per page). The rest of 2kb on page will keep empty and next document will use another page. This 2kb empty area will be used in case that you update that documents.
So, when you insert only 1 document in an empty database LiteDB creates:
1 Header Page (page # 0) [1 per database]
1 Collection Page (will keep all informations about this page) [1 per collection]
1 Data Page (with your document in BSON format) [1 per N documents]
1 Index Page (with you document ID referenre) [1 per N indexes entry / per collection]
4 pages = 20kb
Pages are reused. If you delete a document, next document can use this empty space. But are rules for that: One datapage has only document from same collection. On indexpage has only indexes tree for one collection/index.  Only when you empty a whole page, this page can be used for any other collection.


Add tagging to network-addr

Note that I also changed the id to be the AllocationId rather than the
PublicIp, since the tagging action needs this. I'm not sure if this can
affect any other operations; I don't think so, but I'm new to c7n ;-)

Closes #1912


[BUG] No challenges is showing - Chiadog 0.6 fix

Machinaris v0.3.0 is not showing any challenges, this is most certainly due to Chiadog problems.
They seem to have fixed it in v0.6 which is just released.
From Chiadog changelog:
Found proof notifications (again)
https://github.com/martomi/chiadog/blob/main/CHANGELOG.md

No issue. Problem was at my end.


Weird Dark boxes around text

So, I don't really know what's going on, but I'm kind of salted because I got this terminal and fell in love, like great work, all around. being somebody who loves material design on things, i searched for a material design theme for this, and lo and behold, I saw one that looked fan-freakin-tastic. I followed the instructions and was saddened to find it not work like it said on the picture.. https://www.npmjs.com/package/hyperterm-material
This is what it looks like:

With tmux:

I mean, it's not the end of the world, but it would be awesome to see how I could fix it! Have a great day!

Maybe it is better to post this issue on hyperterm-material repository ? https://github.com/dperrera/hyperterm-material
Compatibility issue with recent version of hyperterm ?

I can't reproduce it 😨

Have you tried a cmd + shift + R?

Sadface.jpeg.
UPDATE:
Visual studio code has same issue? Probably shouldn't be on this thread anymore, but if you could help, I would extremely appreciate it. It was fine yesterday (vscode)

WTF 😱 I would try restarting macOS 😰

I stayed up most of the night trying to fix this, and I think it's worth it to wipe macOS and restart just to get this terminal working as intended. Beautiful software guys. <3

Feel free to reopen if needed!! 😄


Should this repo be a template repo?

Hello and thanks for sharing this repo! I am wondering what is the best way of using it for developing new lessons. I can fork it and rename it, but the forking relationship is not exactly "correct": most of the contents will be removed or reworked in an incompatible manner. Importing it is also an option, I guess, but it seems templates automatize this process somewhat. What are your suggestions?

We have a separate template repository here:
https://github.com/coderefinery/sphinx-lesson-template/
This has the minimum amount of stuff to start a new project (though you probably need to copy certain examples from sphinx-lesson itself, since the template is very empty - but has all the framework).
I think you might be the first user from outside the developer circle - if you find things that need improving, we are very eager to hear right now.

A-ha! I should have googled better :) I will for sure report any problems or thoughts for improvement. Thanks for putting this out here!

Roberto is still part of the family though :-) (now working with Thor)


Problem using truffle migrate

This article helps truffle migrate.
https://besu.hyperledger.org/en/stable/HowTo/Develop-Dapps/Truffle/
But truffle test(web3 1.x send transaction) does not work in my environment.
Error: Transaction has been reverted by the EVM:
...
(The test code works well for Geth.)
I got the following error messages.
besu | 2020-04-24 00:00:00.000+00:00 | vert.x-worker-thread-10 | ERROR | JsonRpcHttpService | Error processing JSON-RPC requestBody
besu | java.util.NoSuchElementException: No value present
besu | at java.util.Optional.get(Optional.java:148) ~[?:?]
besu | at org.hyperledger.besu.ethereum.mainnet.ValidationResult.getInvalidReason(ValidationResult.java:40) ~[besu-core-1.4.3.jar:1.4.3]
besu | at org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.EthEstimateGas.errorResponse(EthEstimateGas.java:103) ~[besu-api-1.4.3.jar:1.4.3]
…

@shemnon
I specified the parameter gas for web3 send function, and it works fine.
(In the case of Geth, the send function worked well without specifying the gas.)

Hi @shemnon, have you tried this again recently? Can you confirm the bug still exists?

I never used truffle, I was posing an error from chat to make sure it didn't get lost.  Someone else needs to own this as I don't have enough context to do it justice.

got it, thanks

closing and will create a new ticket if this resurfaces


feat: Multi-AZ Cluster performance insights

Description
Adds cluster performance insights for multi-az clusters.
Adds argument restore_to_point_in_time.source_cluster_resource_id.
Motivation and Context
https://github.com/hashicorp/terraform-provider-aws/pull/29415
https://github.com/hashicorp/terraform-provider-aws/pull/38540
Breaking Changes
No.
How Has This Been Tested?

[x] I have updated at least one of the examples/* to demonstrate and validate my change(s)
[x] I have tested and validated these changes using one or more of the provided examples/* projects

[x] I have executed pre-commit run -a on my pull request

This PR is included in version 9.8.0 :tada:


Add support for user-specified content filters

This PR is a follow up to #12 which takes a different approach in introducing support for content-filtered topics by trying to simplify the implementation and overcome some issues that arose during development of that PR, particularly with respect to concurrency.
The main problem introduced by #12 is the need to delete and re-create the DDS DataReader if the content-filter expression of the associated ROS2 Subscription is modified. Specifically, if the reader was associated with a content-filtered topic and the expression is empty, the reader must be recreated on the base, unfiltered, topic, and viceversa (if the reader didn't have a filter and must now use one, it will be deleted and recreated on a new content-filtered topic).
Beside introducing a whole lot of concurrency problems, a big issue with this strategy is that it makes "enabling/disabling filtering" a very expensive operation both locally (because the existing reader must be finalized and a new one created, causing potentially a whole lot of memory deallocation/allocation), and remotely/on the network (since the deletion of reader will be announced to other participants in order to unmatch it from any remote writer that was communicating with it, and then the new reader will need to be announced and re-matched again).
This is an unfortunate byproduct of the existing DDS API which differentiates between "regular topics" and "content-fitlered topics" instead of making the "filter" a property of the DataReader: if it were possible to create a content-filtered topic with an empty expression (which would cause it to behave like the base unfiltered topic), it would be possible for rmw_connextdds to always create a content-filtered topic for every new subscription, even when no filter expression is specified by the user.
In order to enable this use case, we take advantage of RTI Connext DDS' ability to register custom content-filter implementations and create a new custom content-filter which extends the built-in SQL-like filter included in Connext by adding the ability to handle empty filter expressions.
All DataReaders created by rmw_connextdds now use a content-filtered topic, and the ROS2 layer can easily manipulate the filtering expression.
The custom content filter is encapsulated in a new package, rti_connext_dds_custom_sql_filter.
The filter supports writer-side filtering but it might introduce some minor overhead in the case of an empty expression. This overhead should be characterized through performance testing to make sure any degradation is within an acceptable range.
The branch for this PR was created off of the current master (944da9d) with the addition of the implementation for new RMW APIs and some changes to existing internal functions to create content-filtered topics that were introduced by @iuhilnehc-ynos in #12.

@ivanpauno i will review tomorrow.
@iuhilnehc-ynos can you also do final check the implementation just in case.
CC: @asorbini

@asorbini @iuhilnehc-ynos
https://github.com/ros2/design/pull/282#issuecomment-1065393977 is failing because of rti_connext_dds_custom_sql_filter.
could you check on that?

@asorbini
Could you help check these unstable cases that happened in rmw_connextdds, please?

@asorbini
Could you help check these unstable cases that happened in rmw_connextdds, please?

@iuhilnehc-ynos I'll try to reproduce and investigate and get back to you. Thank you for the notification!

@asorbini sorry to bother you, please could you check https://github.com/ros2/rmw/pull/302#discussion_r828725552? the interface expression_parameters has been changed a bit from review.

@fujitatomoya @iuhilnehc-ynos I rebased the branch, updated the interfaces and fixed an error that was occurring while finalizing things upon error.
I also checked the failures in the content-filter tests in rclcpp/test_subscription, and realized that the tests should wait for a little bit (e.g. sleep) when they change the filter, to allow the new filter to be propagated to the writer. Otherwise the writer will filter out the new sample before receiving the new filter from the reader, and the sample will not be received because by default historical samples are not re-filtered and repaired (which would also only happen if TRANSIENT_LOCAL durability was used anyway).
I can submit a PR to fix those two tests in rclcpp if you want.
I would appreciate if you could verify that branch asorbini/cft of rmw_connextdds works for you and let me know if you have any more problem preventing the CFT feature from being merged.

I don't know if I messed up the review when I rebased the branch, but I now see that all the commits that were added to the repository since the branch was created now show up in the changes, which is pretty annoying.
Not sure if this will create problems with merging the branch back to master, but so far git/GitHub seem all happy about it...

@asorbini it still fails with rti_connext_dds_custom_sql_filter , https://ci.ros2.org/job/ci_linux-aarch64/10981/console
20:41:01 CMake Error at CMakeLists.txt:11 (find_package):
20:41:01   By not providing "Findrti_connext_dds_cmake_module.cmake" in
20:41:01   CMAKE_MODULE_PATH this project has asked CMake to find a package
20:41:01   configuration file provided by "rti_connext_dds_cmake_module", but CMake
20:41:01   did not find one.
20:41:01
20:41:01   Could not find a package configuration file provided by
20:41:01   "rti_connext_dds_cmake_module" with any of the following names:
20:41:01
20:41:01     rti_connext_dds_cmake_moduleConfig.cmake
20:41:01     rti_connext_dds_cmake_module-config.cmake
20:41:01
20:41:01   Add the installation prefix of "rti_connext_dds_cmake_module" to
20:41:01   CMAKE_PREFIX_PATH or set "rti_connext_dds_cmake_module_DIR" to a directory
20:41:01   containing one of the above files.  If "rti_connext_dds_cmake_module"
20:41:01   provides a separate development package or SDK, be sure it has been
20:41:01   installed.

@iuhilnehc-ynos @ivanpauno @wjwwood do you have any clue about this failure?

CI in arm64 ignore the package rti_connext_dds_cmake_module even if CI_USE_CONNEXTDDS is enable in ci_launcher.
# BEGIN SUBSECTION: ignored packages
11:38:45 Trying to ignore the following packages:
...
11:38:45 - rmw_connext_cpp
11:38:45 - rosidl_typesupport_connext_c
11:38:45 - rosidl_typesupport_connext_cpp
11:38:45 - rmw_connext_dynamic_cpp
11:38:45 - connext_cmake_module
11:38:45 - rmw_connext_shared_cpp
11:38:45 - rti_connext_dds_cmake_module
11:38:45 - rmw_connextdds_common
11:38:45 - rmw_connextdds
11:38:45 - rmw_connextddsmicro
11:38:45 - rmw_fastrtps_dynamic_cpp

@asorbini it still fails with rti_connext_dds_custom_sql_filter , https://ci.ros2.org/job/ci_linux-aarch64/10981/console

Like @iuhilnehc-ynos noticed, the problem stems from the fact that on arm64 rmw_connextdds is added to a "black list" because we currently don't provide a package with libraries for that architecture (although we should probably reconsider this going forward, since Connext does support arm64 of course). The black listing causes all packages in ros2/rmw_connextdds to be ignored.
I had forgot about this behavior when encapsulating the custom SQL filter in a new separate package.
One solution would be to update ros2/ci to also include package `rti_connext_dds_custom_sql_filter" in the ignored packages. I don't think that change would require to recreate the plans on the Jenkins server, but I'm not 100% sure. @clalancette and @nuclearsandwich, any thoughts on how feasible this would be with the code freeze coming up?
Another options, possibly easier (at the "expense" of not encapsulating this code in a separate package), would be to get rid of the separate package and just move the code inside rmw_connextdds_common.
For now I'll move forward with this second strategy, but for future reference it would be good to know how costly it would be to update that CI script if needed.
Anyway, once again apologies for not considering this problem when introducing a new package. Lesson learned for the future!

@asorbini i just started CI https://github.com/ros2/rmw/pull/302#issuecomment-1073137065, hope this works!

@fujitatomoya thank you for starting another run of CI, but I would try with the commit I just pushed (d7d211c).
While investigating the failures I realized there was a big problem in my strategy when it came to supporting Windows: I had used an internal Connext function which is not exported by the DLLs and thus not available on Windows.
I now overcame that problem by registering the custom filter as a user filter instead of built-in one (using a public function) and to do so, I had to disable writer-side optimizations on Windows.
Nevertheless, this should resolve the build issues on Windows. Fingers crossed and sorry for asking to restart the test!

@asorbini thanks for checking on this!

CI again with https://github.com/ros2/rmw_connextdds/pull/68 (see https://github.com/ros2/rmw_connextdds/pull/68#issuecomment-1073074721)

Linux
Linux-aarch64
Windows

I started another Windows build since I should have now resolved the build issues:

@asorbini i will go ahead to merge the stub version https://github.com/ros2/rmw_connextdds/pull/77 to push the interface for CFT.

@iuhilnehc-ynos if you have time, could you take a look at this?

looking at https://ci.ros2.org/job/ci_windows/16746/, i think we just have cpplint minor error https://ci.ros2.org/job/ci_windows/16746/testReport/junit/(root)/projectroot/cpplint/. all the others are unrelated to this PR.

@asorbini i rebased this branch on master with removing stub functions for CFT, and also addressed cpplint error. i will retry the whole CI for this branch.

CI requires default rmw implementation, https://ci.ros2.org/job/ci_linux-aarch64/10995/console.
retry with rmw_fastdds and rmw_connextdds:

Linux
Linux-aarch64
Windows

@fujitatomoya thank you for addressing the linter errors! It looks like the arm64 build failed because no RMW was enabled

CI requires default rmw implementation

We don't support Connext in aarch64, so no need to run that one.
In linux/windows we could cancel one of the two jobs that are running, and only keep one.

@asorbini there are still unstable errors, https://ci.ros2.org/job/ci_linux/16388/

windows also unstable,

https://ci.ros2.org/job/ci_windows/16760/msbuild/folder.-1571461178/ these warnings for rmw_connextdds.
https://ci.ros2.org/job/ci_windows/16760/msbuild/folder.-696170516/ has been addressed with https://github.com/ros2/rmw_fastrtps/pull/592

I pushed fixes for the warnings and started a new Windows job to confirm it:

@asorbini there are still unstable errors, https://ci.ros2.org/job/ci_linux/16388/
sometimes I see the core crash with the following back trace.
test_init__rmw_connextdds
and if i do not see the coredump, i meet the bunch of following errors in console.
./build/rcl/test/test_init__rmw_connextdds
...
[ERROR] [1647897965.816402612] [rmw_connextdds]: failed to lookup from environment: var=RMW_CONNEXT_USE_DEFAULT_PUBLISH_MODE, rc=some string error
DDS_DomainParticipantFactory_get_participants:ERROR: Bad parameter: self
DS_DomainParticipantFactory_unlockI:!precondition: self == ((void *)0)
DDS_DomainParticipantFactory_get_participants:!unlock factory
[ERROR] [1647897965.816418234] [rmw_connextdds]: failed to list existing participants
[ERROR] [1647897965.816420902] [rmw_connextdds]: failed to finalize participant factory
[ERROR] [1647897965.816422478] [rmw_connextdds]: failed to finalize RMW context

i think this is really hard to debug on our side since it seems related to DDS implementation.

Thank you for pointing this out, I will investigate and try to fix it. I believe it has to do with error handling code in the RMW more than internal Connext code. It seems like the RMW is trying to list the local participants, but the DDS factory has not been initialized yet. It might be as easy as adding a check for factory != NULL in that code path.

Testing fix for test errors:

One solution would be to update ros2/ci to also include package `rti_connext_dds_custom_sql_filter" in the ignored packages. I don't think that change would require to recreate the plans on the Jenkins server, but I'm not 100% sure. @clalancette and @nuclearsandwich, any thoughts on how feasible this would be with the code freeze coming up?

I'm getting to this quite late, and so the code freeze deadline is something you'll want to take up with @clalancette but in terms of general feasibility the logic in https://github.com/ros2/ci/blob/9815af79f8edca8a89e3ad913bb6bc5b7a5fb906/ros2_batch_job/main.py#L699-L721 just needs to be updated to include additional packages around rmw_connextdds and that does not require a re-deploy as long as the new package does not add any additional dependencies at the system level. If it does add new dependencies, then that is definitely an rmw freeze problem and at this stage I would say it would be best not to do that for Humble.

... we currently don't provide a package with libraries for that architecture (although we should probably reconsider this going forward, since Connext does support arm64 of course). The black listing causes all packages in ros2/rmw_connextdds to be ignored.

There are several steps to making this happen and I'd love to complete our RHEL support for Connext as well. When you've got cycles for this @asorbini I'd suggest opening an "extending platform support" or similarly phrased issue on rmw_connextdds. The current way we're distributing Pro artifacts is pretty much at its breaking point so I'd like not to add more (such as for arm64) to it without refactoring it.

@asorbini confirmed that https://github.com/ros2/rmw_connextdds/pull/68#issuecomment-1074496290 is also solved with my local environment. thanks!

@fujitatomoya that's great to hear. I think the PR should be ready for being merged 🚀
@nuclearsandwich Thank you for replying and confirming the changes. I ended up getting rid of that additional module since it didn't add much other than several (albeit minor) headaches. Probably not right away, but I'll follow up on your suggestion to track changes to platform support in an issue, and I'm happy to discuss existing issues and possible solutions either there on in a separate email thread whenever you want.

@asorbini thanks for the fix, this has been merged!


Get UDP working

(*KerberosProxy).forward attempts UDP first as per the Kerberos RFC (https://www.rfc-editor.org/rfc/rfc4120#section-7.2.2) however this is not working based on my tests so far.

The behavior seems to be identical to https://github.com/latchset/kdcproxy so closing for now


Pytorch DirectML integration in Pytorch Lightning

Is there a plan to integrate DirectML into the Pytorch Lightning project?
This could broaden the base for DirectML fast.

@Adele101

Hi @sto1,
Thank you for the great request, we will consider this for an upcoming release of pytorch-directml, and will update this thread when more information is available.

is there any update?

I would also welcome an update.

I started implementing a prototype of the integration as a hobby project: https://github.com/Lightning-AI/lightning/issues/18188

Maybe it can be down as a device plugin, I opened a new pr related to this: https://github.com/Lightning-AI/pytorch-lightning/pull/20349


Feature/client synchronization

@TalhaAli00 Pipeline seems to fail on compiling the code after commit

Can you do a rebase to develop? It's hard to review right now


Wrong dependancy

Hi! According to README package.json should declare ember dependency like this:
'ember': '>1.12.0'

should I do sent a PR?

Sure!


Plugin code cleanup 2

Mostly merged. I don't know exactly what changes you had locally, but the core bot code should be stable (other than a few minor adjustments here and there that could possibly be needed).
This branch splits plugins off into it's own project. Still under the same git root. Might need a separate repo for plugins at some point.
ircbot - executable jar that is a dependency for plugins, and therefor has to be built first.
plugins - contains all plugins and 1 dependency for joda-time. Need to add dependency and point to your built ircbot.jar. When done with dependency, export to jar, only select top two options (src and resources). Don't need test src or anything else. Then export to jar. Have to move the plugin.json to the root of the jar for the plugins to be loaded when you start the bot. I need to figure out how to build this automatically so no modifications are needed.

Closing. Going to merge experimental instead.


add Typescript handbook

What does this PR do?
Add resource
For resources
Description
The TypeScript Handbook is intended to be a comprehensive document that explains TypeScript to everyday programmers.
Why is this valuable (or not)?
Is the official free handbook for every typescript developer.
How do we know it's really free?
Is open source and accessible without paying or registering.
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[X] Read our contributing guidelines.
[X] Search for duplicates.
[X] Include author(s) and platform where appropriate.
[X] Put lists in alphabetical order, correct spacing.
[X] Add needed indications (PDF, access notes, under construction).
[X] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

This resource is already added in  #7936 . Please check for duplicates before adding a new resource

Try to collaborate where possible


Move method to appropriate struct

Reviewer: @jfurrow

thanks! this has been bothering me for a while 😛

Retest this please


Merge Trace.vi and vi?

We currently maintain two copies of vi, one stored in Trace, another is passed to model through keyword arguments. Perhaps we should merge this vi's to reduce confusion.
Ref: #247, #246, #248

How can we bind randomness to Trace then?

Related https://github.com/TuringLang/Turing.jl/issues/1019


Do we want to replace anonymous functions with arrows (=>)?

The Google JavaScript style guide recommends using arrows (=>) instead of the function keyword. So instead of:
page.getUsers().then(function (users) {
            expect(users.length).toBe(2);
});

we'd use
page.getUsers().then((users) => {
            expect(users.length).toBe(2);
});

There are a lot of instances of anonymous functions with the function keyword, so switching to match this guideline would be quite a lot of work. I doubt we want to do it this semester, but the question then is whether we want to do it at all? Should there be an issue here that asks us to do this at some point down the road?

Yes - I think we should match that suggestion. It may be present in many places, but I bet it would be easy to update. Do you want me to tackle this? I think we should be sure to include a note somewhere for the students so that if they encounter either, they will know a little about what they are seeing. I'm happy to do this - it's my favorite kind of task - repetitive! :)

By all means have a go at it! I'll create an issue quick and assign it to you. :smile:


Email Draft Duplicator

Hi!
Your wonderful extension is giving out this bug. Very much hope for a fix.
"An error occurred.
TypeError: Cannot read property 'length' of null"

There is an issue with v1.5.3, so I will revert the store listing to v1.5.2 for now.


chore(test): add test cases for regex literals extracted from test262

This PR adds test cases for regex literals extracted from the test262 repository.
https://github.com/tc39/test262
Also, I added a workflow that periodically checks for updates with GitHub Actions.
I think those test cases are useful for checking which literals are affected by the new syntax support.

It's been over a month and no one seems to have time to review this. Also, this change is a test change, so merge it.


Support new versions of pip

Pip stopped vendoring the six package in May 2024, https://github.com/pypa/pip/commit/692b7f00440ca6e225f94cb665696c20d27bfea9

+1 still causing an issue for us


chore: adaptations for nightly-2024-10-28

bors merge

Sorry: I should really check if a PR build before approving. Setting awaiting-CI accordingly.

test/MinImports.lean needs an update


NX Cannot find module '@swc/types'

When running
nx build web
The error is
NX Cannot find module '@swc/types'
This might be setup or inexperience with NX
FYI - nx serve web works fine

Hi there @metasal1 - could you try this again with version 3.0.5 I just promoted to latest?
If that doesn't work, would you mind sharing the output from the commands and the repo it generated so I can investigate? Cheers!
(base<EMAIL_ADDRESS>solana-local $ pnpx create-solana-dapp@latest "test-swc"
 WARN  3 deprecated subdependencies found<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Packages: +131
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 140, reused 131, downloaded 0, added 131, done
<EMAIL_ADDRESS><EMAIL_ADDRESS>Running postinstall script, done in 419ms
┌  create-solana-dapp 3.0.5
│
◆  Project name: test-swc
│
◇  Select a preset
│  Next.js
│
◇  Select a UI library
│  Tailwind
│
◇  Select an Anchor template
│  Anchor Counter program with tests
│
◆  Anchor program name: test-swc
│
◇  Successfully created workspace with pnpm.
│
◇  Successfully installed preset<EMAIL_ADDRESS>│
◇  Installation successful! ─────────────────────────────────────╮
│                                                                │
│  That's it!                                                    │
│                                                                │
│  Change to your new directory and start developing:            │
│                                                                │
│  cd ./test-swc                                                 │
│                                                                │
│  Start the Next.js app:                                        │
│                                                                │
│  pnpm run dev                                                  │
│                                                                │
│  Run Anchor commands:                                          │
│                                                                │
│  pnpm run anchor build | test | localnet | deploy              │
│                                                                │
│  Generate more features using the following command:           │
│                                                                │
│  pnpm run feature                                              │
│                                                                │
│  Found Anchor version 0.30.1. Expected Anchor version 0.30.0.  │
│                                                                │
│  https://www.anchor-lang.com/release-notes/0.30.0              │
│                                                                │
├────────────────────────────────────────────────────────────────╯
│
└  Good luck with your project!

(base<EMAIL_ADDRESS>solana-local $ cd test-swc
(base<EMAIL_ADDRESS>test-swc (main) $ pnpm nx build web

   ✔  1/1 dependent project tasks succeeded [0 read from cache]

   Hint: you can run the command with --verbose to see the full dependent project outputs

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————

> nx run web:build:production

   ▲ Next.js 14.0.4

🌼   daisyUI 4.11.1
├─ ✔ 2 themes added		https://daisyui.com/docs/themes
╰─ ❤ Support daisyUI project:	https://opencollective.com/daisyui

 ✓ Creating an optimized production build
 ✓ Compiled successfully
   Skipping linting
 ✓ Checking validity of types
 ✓ Collecting page data
   Generating static pages (0/8)  [=   ]bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
 ✓ Generating static pages (8/8)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

Route (app)                              Size     First Load JS
┌ ○ /                                    613 B           249 kB
├ ○ /_not-found                          869 B          82.9 kB
├ ○ /account                             1.35 kB         229 kB
├ λ /account/[address]                   559 B           249 kB
├ ○ /api/hello                           0 B                0 B
├ ○ /clusters                            452 B           249 kB
└ ○ /test-swc                            2.39 kB         251 kB
+ First Load JS shared by all            82.1 kB
  ├ chunks/771-2ce65bc9d22348e2.js       26.7 kB
  ├ chunks/9fbbc2ce-23a1d89630bc4ddb.js  53.3 kB
  ├ chunks/main-app-245333a16b7443df.js  216 B
  └ chunks/webpack-16f47013c1a91d94.js   1.86 kB

○  (Static)   prerendered as static content
λ  (Dynamic)  server-rendered on demand using Node.js

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Successfully ran target build for project web and 1 task it depends on (16s)

Gm! Yesterday we announced a new version of this cli which should fix this issue. Please give it a spin and comment here if the issue persists so I can investigate.


Update windows_devices_sensors.md

@MancunianBandit : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

#sign-off


CircleCI job "deployment" might not work

In PR #81 we left out the deployment job in .circleci/config.yml. It is neither included in the jobs section nor is it contained in a workflow. I suspect the command will currently not work. We need to test this and potentially correct this.
https://github.com/roboll/helmfile/blob/master/.circleci/config.yml#L76

@cmeury Yes. It must be ignored by CircleCI as unsupported according to the CircleCI doc!

@cmeury Submitted #100 for this.


Improve documentation

some typos and grammar
What is it?

[ ] Feature / enhancement
[] Bug
[x] Docs / tests

Description
fix some typos, improve grammar, add a link.

Thanks again!!


How to discard arguments?

Hi,
I am trying to re-train this network that uses sacred inside an amazon sagemaker instance.
I run everything inside a docker container and the entrypoint is this:
ENTRYPOINT ["python", "Training.py", "with", "cfg.full_44KHz"]
I get this error:
Traceback (most recent call last):
File "Training.py", line 159, in <module>
@ex.automain
File "/usr/local/lib/python3.5/dist-packages/sacred/experiment.py", line 137, in automain
self.run_commandline()
File "/usr/local/lib/python3.5/dist-packages/sacred/experiment.py", line 260, in run_commandline
return self.run(cmd_name, config_updates, named_configs,
{}
, args)
File "/usr/local/lib/python3.5/dist-packages/sacred/experiment.py", line 208, in run
meta_info, options)
File "/usr/local/lib/python3.5/dist-packages/sacred/experiment.py", line 433, in _create_run
None))
File "/usr/local/lib/python3.5/dist-packages/sacred/initialize.py", line 364, in create_run
ncfg_updates = scaff.run_named_config(cfg_name)
File "/usr/local/lib/python3.5/dist-packages/sacred/initialize.py", line 88, in run_named_config
nc = self.named_configs[config_name]
KeyError: 'train'

Apparently, sagemaker adds some other argument to that entrypoint, making sacred confused on which configuration to choose.
What it runs is:
['with', 'cfg.full_44KHz', 'train']
So I am asking if is there a way to discard that train argument somehow.
Thanks a lot!

Hmm, not sure what a clean solution to this would be, but as a workaround you could either:

add an empty named config called train which would make sacred accept train as a configuration argument.
instead of using automain you could manually call ex.run_commandline with a modified sys.argv.

Thanks for the tips.
I kind of solved for now by creating a custom config as the one I wanted for that specific training.
Then:
from Training import ex
r = ex.run()

So I am running this other .py file instead as entrypoint and this time it does not care about the weird sagemaker additions.


New settings for the default HTML

What does this PR do?
On homer0/projext#12 projext added support for a "default HTML" so browser targets won't need an HTML file in order to be bundled.
Now, the webpack build engine added support for it on homer0/projext-plugin-webpack#10 by implementing the new targetsHTML service, which exposes a few events in order to modify the template of the HTML code that will be used.
This PR uses the events from targetsHTML to automatically add the ng-app and other few settings to the HTML code.
On the list of modified files for this PR you'll see changes on the README.md, you can read that in order to fully understand how to manage the new settings the plugin implements.
How should it be tested manually?

Try to build and run a target without an HTML file.
Run the tests.

Are there any related PRs?

homer0/projext#12
homer0/projext-plugin-webpack#10

Pull Request Test Coverage Report for Build 18

24 of 24 (100.0%) changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 17:
0.0%

Covered Lines:
79

Relevant Lines:
79

💛  - Coveralls


New Validated content for infra.windows_ops

Type of repository request
New Repository
Requested name for the repository
infra.windows_ops
Repository Description
Ansible Roles for managing Windows Resources
Associated CoP
Automation CoP
Admin Access
validated-content-curators
Write Access
validated-content-curators
Read Access
validated-content-curators
Additional details
This will also hold Automation Experiences for the next AAP release
The following should be members of the validated-content-curators if not already.
shahargolshani
ronger4
p3ck
Yaish25491

Review request:
cc: @redhat-cop/container-cop-core

I think this should be instead named infra.windows_ops as the initial use cases are very operationally focused (patching, start/stop services, and setup IIS). infra.windows might be too generic

I think this should be instead named infra.windows_ops as the initial use cases are very operationally focused (patching, start/stop services, and setup IIS). infra.windows might be too generic

I updated the request to include _ops.  Thanks Martin

@shahargolshani @ronger4 are not part of the CoP and haven't linked their GH to Rover:

https://source.redhat.com/departments/it/it-information-security/wiki/details_about_rover_github_information_security_and_scanning

@Yaish25491 isn't part of the CoP

Resolved via #941

I see the repo is created...  But I'm not able to initialize it..

@p3ck can you confirm access now that the automation has completed and the policies have been applied?

Yes,
Thank you.  All set now
On Wed, Nov 20, 2024 at 3:07 PM Andrew Block @.***>
wrote:

@p3ck https://github.com/p3ck can you confirm access now that the
automation has completed and the policies have been applied?
—
Reply to this email directly, view it on GitHub
https://github.com/redhat-cop/org/issues/935#issuecomment-2489449208,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAUPZOFF6MVHWMAP6HY4FZL2BTTZDAVCNFSM6AAAAABRHL6HG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBZGQ2DSMRQHA
.
You are receiving this because you were mentioned.Message ID:
@.***>


User available average subpage

Created user available average subpage
Created avg_time util function
Move import views from run.py to init.py for unify running app and tests
Added tests for newly created code

bugzilla: https://bugzilla.stxnext.pl/show_bug.cgi?id=5957

Why I am the author of your commit? Think something is wrong here.

@mjelonek92 year little bit strange. I change it manually but i have no idea how it is happened

Why you change filename? Tab should be named presence start end


⚠ Quirk Club Argentina (API endpoint) has degraded performance

In 250eb4b, Quirk Club Argentina (API endpoint) (https://us-central1-quirkclub-dev.cloudfunctions.net/api/check/api) experienced degraded performance:

HTTP code: 200
Response time: 9241 ms

Resolved: Quirk Club Argentina (API endpoint) performance has improved in 0596c0d.


Eliminate extraneous allocation and dynamic dispatch in PlainEditor

I started by wanting to eliminate Arc<str>. Then I noticed that vello_editor was allocating temporary Vecs for the PlainEditorOps. Finally, it occurred to me that we could probably do something altogether more efficient than PlainEditorOp. I think my refactored version, with separate functions in PlainEditorTxn, will be nicer to maintain as well.

Thanks, this looks great. I'll give it a quick check.


print output to console by default

I think we should print the output to the console by default.
I spent the last hour trying to figure out how to do this, but I failed, because I don't know any javascript, and could only figure out so much in an hour.
Here is my best attempt: 85619439b0ce2611db7a2b1cfc19a0c78f270d6c. I tried to invert the meaning of the cookie, because an non-existing cookie is interpreted as false. But after this change, if the value of the cookie is false (meaning that you set the option "print output to console" to true), and you reload the page, the option "print output to console" is false again.
Could you do this Soonho (if you agree that this is a better default value)?

Could you do this Soonho (if you agree that this is a better default value)?

No problem.

Thanks!
Basic javascript question: in the line
print_output_to_console: $.cookie("leanjs_print_output_to_console") || true,

|| is just the boolean or, right? So basically now you ignore the value of the cookie?

|| is just the boolean or, right?

Right.

So basically now you ignore the value of the cookie?

No. It's using short-circuit semantics of ||. When a user is not set the value of leanjs_print_output_to_console, we have $.cookie("leanjs_print_output_to_console") = undefined which is interpreted as false. Then the whole expression gives true.
However, when the value of the cookie leanjs_print_output_to_consloe is set, it returns either "true" or "false". Note that both of them are non-null strings and interpreted as the Boolean value true. Because of the short-circuit semantics of ||, it simply returns the value of the cookie.
In short, we have three cases:

$.cookie("leanjs_print_output_to_console") || true => "true" || true => true
$.cookie("leanjs_print_output_to_console") || true => "false" || true => false
$.cookie("leanjs_print_output_to_console") || true => undefined || true => true

Ah, that makes sense (but I would have never guessed it myself). Thanks for the explanation. If you don't mind a follow-up question: do you mean

"true" || true => "true"
"false" || true => "false"
undefined || true => true

or am I still misunderstanding it?

That's what I meant (I updated my comment after I posted it).
In short, the following is the case

All false, 0, empty strings '' and "", NaN, undefined, and null are always evaluated as false; everything else is true.

FYI, another interesting example which shows the oddity of JS is https://dorey.github.io/JavaScript-Equality-Table . It should be the case that only the diagonal elements are green. But in the world of JS, it's not the case..

Thanks! and LOL!

I "like" how == is not transitive and a==b doesn't imply that if(a) and if(b) do the same thing.
One last question: If the value of print_output_to_console is "false", doesn't that mess up the test
if (myModule.print_output_to_console)
because "false" is coerced to true? This looks like what is happening: if I set the option to false and refresh the page, then the value is still false, but the output is printed to the console.

I see. I'll check it.

@fpvandoorn: when a JS value is saved into cookie, its string representation is saved. As a result, we may have two choices for the type of myModule.print_output_to_console -- either string or boolean. I think it's better to keep it as boolean. To do so, when we load a cookie value for print_output_to_console, we cast a loaded value (: string) into boolean. See e7658c4.


[KARAF-2511] Add karaf-soap-example

I added the client part. This PR is ready for a review. Thanks !

Updated, ready for a new review round.

LGTM
Can you squash please ?

Done, thanks.


Compile Error when cargo build

Hi, I am a beginner of RUST,when I try to use nova-scotia = "0.5.0" and nova-snark = "0.37.0", I met two error.
The first was:
(base) PS D:\ZKP_file\Work\project_1> cargo build --release
   Compiling pasta-msm v0.1.4
The following warnings were emitted during compilation:

warning<EMAIL_ADDRESS>Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU
warning<EMAIL_ADDRESS>Compiler family detection failed due to error: ToolFamilyMacroNotFound: Expects macro `__clang__`, `__GNUC__` or `__EMSCRIPTEN__`, `__VXWORKS__` or accepts cl style flag `-?`, but found none
warning<EMAIL_ADDRESS>cl: ������ error D8021 :��Ч����ֵ������/Wno-unused-function��

error: failed to run custom build command for `pasta-msm v0.1.4`

Caused by:
  process didn't exit successfully: `D:\ZKP_file\Work\project_1\target\release\build\pasta-msm-33270b74460bbfc5\build-script-build` (exit code: 1)
  --- stderr

  error occurred: Command "nvcc" "-ccbin=C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64\\cl.exe" "-Xcompiler" "-nologo" "-Xcompiler" "-MD" "-Xcompiler" "-O2" "-Xcompiler" "-Brepro" "-I" "C:\\Users\\WANGLU\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\semolina-0.1.4\\src" "-I" "C:\\Users\\WANGLU\\.cargo\\registry\\src\\index.crates.io-6f17d22bba15001f\\sppark-0.1.10\\sppark" "-Xcompiler" "-W4" "-Xcompiler" "-Wno-unused-function" "-arch=sm_70" "-DTAKE_RESPONSIBILITY_FOR_ERROR_MESSAGE" "-D__ADX__" "-o" "D:\\ZKP_file\\Work\\project_1\\target\\release\\build\\pasta-msm-aca72caebecc5d3d\\out\\0c0a7217c765217b-pallas.o" "-c" "cuda/pallas.cu" with args nvcc did not execute successfully (status code exit code: 2).

And when I switch to rustup default stable-x86_64-pc-windows-gnu, this happened
The following warnings were emitted during compilation:

warning<EMAIL_ADDRESS>Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU
warning<EMAIL_ADDRESS>Compiler family detection failed due to error: ToolFamilyMacroNotFound: Expects macro `__clang__`, `__GNUC__` or `__EMSCRIPTEN__`, `__VXWORKS__` or accepts cl style flag `-?`, but found none

error: failed to run custom build command for `sppark v0.1.10`

Caused by:
  process didn't exit successfully: `D:\ZKP_file\Work\project_1\target\release\build\sppark-d53db918cf6e85b1\build-script-build` (exit code: 101)
  --- stdout
  cargo:ROOT=C:\Users\WANGLU\.cargo\registry\src\index.crates.io-6f17d22bba15001f\sppark-0.1.10\sppark
  cargo:rerun-if-env-changed=NVCC
  cargo:rerun-if-env-changed=HIPCC
  OPT_LEVEL = Some(3)
  OUT_DIR = Some(D:\ZKP_file\Work\project_1\target\release\build\sppark-314519af72447ce2\out)
  TARGET = Some(x86_64-pc-windows-gnu)
  HOST = Some(x86_64-pc-windows-gnu)
  cargo:rerun-if-env-changed=CXX_x86_64-pc-windows-gnu
  CXX_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CXX_x86_64_pc_windows_gnu
  CXX_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_CXX
  HOST_CXX = None
  cargo:rerun-if-env-changed=CXX
  CXX = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=NVCC_x86_64-pc-windows-gnu
  NVCC_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=NVCC_x86_64_pc_windows_gnu
  NVCC_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_NVCC
  HOST_NVCC = None
  cargo:rerun-if-env-changed=NVCC
  NVCC = None
  cargo:warning=Compiler family detection failed since it does not define `__clang__`, `__GNUC__`, `__EMSCRIPTEN__` or `__VXWORKS__`, also does not accept cl style flag `-?`, fallback to treating it as GNU
  cargo:warning=Compiler family detection failed due to error: ToolFamilyMacroNotFound: Expects macro `__clang__`, `__GNUC__` or `__EMSCRIPTEN__`, `__VXWORKS__` or accepts cl style flag `-?`, but found none
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some(false)
  CARGO_CFG_TARGET_FEATURE = Some(cmpxchg16b,fxsr,sse,sse2,sse3)
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64-pc-windows-gnu
  CXXFLAGS_x86_64-pc-windows-gnu = None
  cargo:rerun-if-env-changed=CXXFLAGS_x86_64_pc_windows_gnu
  CXXFLAGS_x86_64_pc_windows_gnu = None
  cargo:rerun-if-env-changed=HOST_CXXFLAGS
  HOST_CXXFLAGS = None
  cargo:rerun-if-env-changed=CXXFLAGS
  CXXFLAGS = None
  nvcc fatal   : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions between 2017 and 2019 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.

  --- stderr
  thread 'main' panicked at C:\Users\WANGLU\.cargo\registry\src\index.crates.io-6f17d22bba15001f\sppark-0.1.10\build.rs:123:68:
  impossible: Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Could you help me with that?
Thanks!

The build script is programmed to not pass Wno-unused-function argument on Windows, so this shouldn't happen. Though it's assumed that user uses the msvc toolchain to compile. This is assumed to be safe bet, because Nvidia support exclusively Microsoft compiler. What does rustup toolchain list print on your computer?

Hi！
Thanks for your reply.
Below is the result from running the rustup toolchain list

I still did not run cargo build --release  successfully.
Looking forward to your reply!
Thanks.
ps: BTW, can I use nova-scotia = "0.5.0" and nova-snark = "0.37.0" only on Windows computer with Nvidia GPU? Is macos supported?

So assertion is that with msvc as default toolchain pasta-msm build.rs script passes -Wno-unused-function to cl compiler. This shouldn't be possible and I can attest that  it works for me. "Works" in sense that on my computer the build script in question does not pass the problematic option. This is where my troubleshooting stops. If I can't reproduce it, user is on their own. I'd suggest to perform fresh Rust installation with all default settings.
Formally speaking one can make a case for making the build.rs be more nuanced and handle this edge case. The problem is that I still don't understand what is the case and would need to reproduce the problem...


Update Set-MpPreference.md

Default value for disablecatchup scans is True, meaning we don't run a catchup scan.
When no value is given, the value is true, so updated the doc accordingly.
See: https://osgwiki.com/wiki/Windows_Defender/Service_Configurations

Docs Build status updates of commit d1f1194:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docset/windows/defender/Set-MpPreference.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel

@dariomws @get-itips @tseward
Peer review needed for this PR. Thanks.


Why is this marked obselete?

Thanks so much for writing this implementation @MerHS. Why is it marked obsolete in the description?

Thank you for your attention, but right now, I can't afford to spend time on ML applications, so I can't fix implementation errors in this repository.
Please see this repo if you really interested in this topic.
Thanks.

@MerHS Thanks!


Show dashboard view in command question, add, opponent.

Summary
Solves #29
This PR makes the dashboard view always be shown in command question, add, opponent.
You can consider that these commands no longer clear the view.
Also, the view is not cleared at the phase of inputting answer.

In the command add, question cards in the field and those in the deck are displayed at the same time.
It is very confusing that the index numbers are shown at both of them, so at the dashboard they are now hidden.
Instead, the total number of question cards in the field is shown at the dashboard.
And for the consistency, the total number of available questions is also shown in the command question and opponent.


autotools: distribute the template service file instead of the genera…

…ted one
This fixes a bug in distribution tarballs created via make dist, that
caused the installed systemd service file to always contain paths
pointing to /usr/local/... instead of the actual prefixes used during
configure time.
Signed-off-by: Matthias Gerstner<EMAIL_ADDRESS>

this PR must be merged by creating a merge commit


double check that the address and chainId are correct.

0x8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx on chain 1, double check that the address and chainId are correct.
at fetchContractMetadataFromAddress (contract-publisher-29ba9ed4.browser.esm.js:4854:11)

You can fix that issue by doing some changes on main.jsx
File Path
client/src/main.jsx

First run this command on your client directory
npm install @thirdweb-dev/chains

Then import it just as I did, Replace desiredChainId with activeChain, & remove the ChainID It will solves your issue
import React from 'react';
import ReactDOM from 'react-dom/client';
import { BrowserRouter as Router } from 'react-router-dom';
import { ChainId, ThirdwebProvider } from '@thirdweb-dev/react';
import { Sepolia } from "@thirdweb-dev/chains";

import { StateContextProvider } from './context';
import App from './App.jsx';
import './index.css';

const root = ReactDOM.createRoot(document.getElementById('root'));

// root.render(
//     <ThirdwebProvider desiredChainId={ChainId.Sepolia}>  // before your code looks like this
//         <Router>
//             <StateContextProvider>
//                 <App />
//             </StateContextProvider>
//         </Router>
//     </ThirdwebProvider>
// )

root.render(
    <ThirdwebProvider activeChain={Sepolia}>  // Now you have to write this
        <Router>
            <StateContextProvider>
                <App />
            </StateContextProvider>
        </Router>
    </ThirdwebProvider>
)


receive, don't export hosts/groups with dynamic sources

When exporting an inventory which hass hosts or groups defined from a dynamic source do not export the groups or hosts.

@christoph-kluge sorry for the delay, we should be able to close this now.


Missing file

Dear author, where is the file 'metadata.json'? It is needed in the inference step.

It is done now. The problem was because numpy version 1.11.2 is needed.


Support for ranges and custom types

Feature request
Is your feature request related to a problem? Please describe.
When generating types columns that use a range are being generated with unknown.
For example:
CREATE TABLE public.sample_table (
	duration tstzrange NULL
);

Will generate:
sample_table: {
        Row: {
          duration: unknown | null
        }
        Insert: {
          duration?: unknown | null
        }
        Update: {
          duration?: unknown | null
        }
      }

As there are already several range types in Postgres these should be supported.

While this issue is specifically around range types, I'd love to see a way to be able to handle columns that come from any extension in a generic way. In my case, I have a username column using the citext extension which in turn is reported as unknown in the generated types. I'm aware of this extension and what type it should be generated as, so best case for me is a way to tell the command, "when you encounter x column type, output y as the type".
I've personally been working around this by hand-editing my type definition files, but as I move to a more automated type generation, and specifically type checks as suggested by the environments document, I can't hand-edit the types the CI generates to check for uncommitted changes. This leaves me with choosing between scripting the changes with a tool like sed or manually casting from unknown in the code. Both totally workable, but not ideal. Something that let's me tell the CI tool how to define "unknown" column types would go a very long ways in supporting extensions in the type gen.

I've got a workaround that allows me to type my citext columns correctly without manually editing the generated interfaces.
Say you use citext in the company.name, user.name and user.email columns.
If you currently generate your files into database.ts, instead write the generated code to _generated_database.ts and replace the content of database.ts with this:
import { Database as GeneratedDatabase, Json } from "./_generated_database";

export type { Json };

type Override<
  Table extends keyof GeneratedDatabase["public"]["Tables"],
  Column extends keyof GeneratedDatabase["public"]["Tables"][Table]["Row"],
  RowType,
  InsertType = RowType
> = {
  public: {
    Tables: {
      [T in Table]: {
        Insert: { [C in Column]: InsertType };
        Update: { [C in Column]?: RowType };
        Row: { [C in Column]: RowType };
      };
    };
  };
};

export type Database = GeneratedDatabase &
  Override<"user", "name" | "email", string> &
  Override<"company", "name", string>;

The purpose of the 4th generic parameter (InsertType) is to allow you to specify a different type for inserts. You'll need to do this if your field is non-nullable and has a default value, in which case it needs to be non-optional in the row and optional in the insert.

FYI - for ranges, I found this advice from Postgrest - https://postgrest.org/en/stable/how-tos/working-with-postgresql-data-types.html?highlight=range#casting-a-range-to-a-json-object

FYI - for ranges, I found this advice from Postgrest - https://postgrest.org/en/stable/how-tos/working-with-postgresql-data-types.html?highlight=range#casting-a-range-to-a-json-object

This might also work for GeoJSON objects using postgis. I'm not sure if casting with a function will change the type generation, but combining this with @BernieSumption's solution might help us find a good fix. I'll test this in a few weeks and let you know how it goes.
I also think it's a big problem that the CLI can't change type generation. This forces TypeScript developers to either use unknown types, which isn't great, or come up with tricky workarounds.


Change defaults

Thanks Eswara! I merged this along with some other changes.
Can you please still add tests and update the console help text.


BUG: Do not try to find dlfcn.h

Removing include since this breaks the build for a lot of users (which is weird because it is in a CMake test

I encountered similar errors while trying to build SimpleElastix on Windows with Visual Studio 2017 as mentioned in #126 with missing dlfcn.h errors and tried applying the changes in this PR. After re-running the build, I ran into errors such as:
cmaketmp\link_flags\no_flag\module\shared\src\main.c(18): error C2065: 'RTLD_LAZY': undeclared identifier

which appear to be related to variables from dlfcn.h. Is this file necessary for building on Windows?

This issue appears to have been fixed by upgrading to SimpleITK v1.1.


[SPARK-48454][PS] Directly use the parent dataframe class

What changes were proposed in this pull request?
Directly use the parent dataframe class
Why are the changes needed?
code clean up
Does this PR introduce any user-facing change?
No
How was this patch tested?
CI
Was this patch authored or co-authored using generative AI tooling?
No

Nice cleanup, thank you!

Merged to master.


Issue while bringing up the Drupal-VM image in Windows 10 with WSL2

Issue Type

Bug Report / Support Request

Your Environment

Your OS

Windows 10

Summary
I'm currently using Windows 10 with WSL2 and I'm trying to use the Drupal-VM image but it keeps showing the message:
drupalvm: Warning: Connection refused. Retrying...
But the site never comes up.

Forgot to add, vagrant is: 2.2 and VirtualBox is 6.1

Forgot to add, vagrant is: 2.2 and VirtualBox is 6.1

I got the same issue, however after cancelling and running vagrant up again i get the message:
==> drupalvm: Your Drupal VM Vagrant box is ready to use! ==> drupalvm: * Visit the dashboard for an overview of your site: http://dashboard.drupalvm.test (or http://<IP_ADDRESS>) ==> drupalvm: * You can SSH into your machine with vagrant ssh. ==> drupalvm: * Find out more in the Drupal VM documentation at http://docs.drupalvm.com
But when i try to go to http://dashboard.drupalvm.test i can't bring up the dashboard. Did not change anything to the default.config.yml file. The vagrant up command did not make a drupal/ directory aswell.
Your Environment

VirtualBox 6.1.16
Vagrant 2.2.14 (both Windows and WSL)
WSL2

Your OS

Windows 10

I got the same issue, however after cancelling and running vagrant up again i get the message:
==> drupalvm: Your Drupal VM Vagrant box is ready to use! ==> drupalvm: * Visit the dashboard for an overview of your site: http://dashboard.drupalvm.test (or http://<IP_ADDRESS>) ==> drupalvm: * You can SSH into your machine with vagrant ssh. ==> drupalvm: * Find out more in the Drupal VM documentation at http://docs.drupalvm.com
But when i try to go to http://dashboard.drupalvm.test i can't bring up the dashboard. Did not change anything to the default.config.yml file. The vagrant up command did not make a drupal/ directory aswell.
Your Environment

VirtualBox 6.1.16
Vagrant 2.2.14 (both Windows and WSL)
WSL2

Your OS

Windows 10


Wrong import for types in useSelection

https://github.com/reaviz/reaflow/blob/b399e01188505bdd666abd562079dcb18f9d9a1f/src/helpers/useSelection.ts#L3
You're importing import { EdgeData, NodeData } from 'types';
Node thinks you're trying to import a module named types instead of types file on your root.

Thanks! Resolved in 2.6.4

Thanks! Resolved in 2.6.4


[FLINK-25134][test] Remove unused RetryRule from KafkaConsumerTestBase

What is the purpose of the change
Before this commit the RetryRule actually prevented retries of tests
inheriting from KafkaConsumerTestBase. Now, the retries are handled by
KafkaTestBase and all subclasses have the same retry behaviour.
Brief change log

Remove unused retry rule from KafkaConsumerTestBase

Verifying this change
I manually invoked an exception and hit the timeout of a test in KafkaITCase to verify the test is retried.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

The parent class KafkaTestBaseWithFlink extends KafkaTestBase where the RetryRule and retry behaviours will be inherited from.
LGTM


App crash on Android with threeDSecureParams

Hello there,
I handled the 3DSecure flow on my Expo app, perfectly working on iOS.
But the app crash on start on Android.
I needed to change to my code in order to make it work on Android. It is the threeDSecureParams which makes the app crash.
Here is my code:
 <StripeProvider
      publishableKey={config?.STRIPE_KEY}
      threeDSecureParams={
        Platform.OS === 'ios'
          ? {
              backgroundColor: card,
              timeout: 5,
              label: {
                headingTextColor: darkMode && '#fff',
                textColor: darkMode && '#fff',
              },
              navigationBar: {
                headerText: t('3d_secure.title'),
                buttonText: t('3d_secure.cancel_button'),
                textColor: darkMode && '#fff',
                barTintColor: card,
                barStyle: 1,
              },
              footer: {
                backgroundColor: background,
                headingTextColor: darkMode && '#fff',
                chevronColor: primary,
                textColor: darkMode && '#fff',
              },
              submitButton: {
                backgroundColor: primary,
                cornerRadius: 12,
                textColor: '#fff',
                textFontSize: 14,
              },
              cancelButton: { textColor: danger },
              nextButton: {
                backgroundColor: primary,
                cornerRadius: 12,
                textColor: '#fff',
                textFontSize: 14,
              },
              resendButton: {
                backgroundColor: primary,
                cornerRadius: 12,
                textColor: '#fff',
                textFontSize: 14,
              },
              continueButton: {
                backgroundColor: primary,
                cornerRadius: 12,
                textColor: '#fff',
                textFontSize: 14,
              },
            }
          : null
      }
    >
      {children}
    </StripeProvider>

@stripe/stripe-react-native: "0.1.4"
Any idea why?
Thanks

What do the crash logs say? You may want to try this on a newer version of stripe-react-native

Closing for inactivity, it's likely this issue only existed on an older version of the library (which would explain why I can't reproduce it so far)


api_key not included when using IOperationFilter

Hello,
I've been using swashbuckle successfully, when I could type in an api key in the swagger ui and that would be submitted as api_key url parameter with every api call.
Recently I need to add file upload, which I did as described here:
https://github.com/domaindrivendev/Swashbuckle/issues/120
Unfortunately for this particular call api_key is no longer added to the url from SwaggerUI!
How can I get it back?

Looks like it's swagger ui issue that is not really related to swashbuckle. I can reproduce it even without swashbuckle. I'll keep it open here for a few more days in case anyone has any good ideas and then I'll close it.


feat: add all the migration scripts in one place to be able to run with migrate-mongo

Description
Adding all database migration scripts in one place.
Motivation
Previously we had shell scripts and migrate-mongo scripts for initial database migration and needed two different ways of running them.
Fixes:

https://jira.esss.lu.se/browse/SWAP-2982

@martin-trajanovski : I think we can change this PR to "ready"