Add 'import_uuid' & 'gnis:import_uuid' to discarded tag list

These tags don't appear to serve any real purpose, and the wiki discourages their use. It seems they were intended to act like a changeset ID before changesets were introduced. They have been used 224k and 52k times respectively. The discarded list already contains tiger:upload_uuid which appears to have the same intended purpose.

I really dislike such keys - but has anyone asked local communities (for NHD and gnis it is probably USA) whatever silent removal of such tags is OK?
Can you link discussion confirming this? In some cases tags seemed to be utterly useless to me, but some people protested and gave good arguments for some of them.
Silent discarding of tags should be limited to cases where there is no controversy.
Note that discussion about deprecating tag is not sufficient - there should be discussion confirming that silently discarding them is OK.
I would be happy to make PRs for that (I want such tags to be not present and removed), but only after confirmation that it is OK.

I really dislike such keys - but has anyone asked local communities (for NHD and gnis it is probably USA) whatever silent removal of such tags is OK?
Can you link discussion confirming this? In some cases tags seemed to be utterly useless to me, but some people protested and gave good arguments for some of them.
Silent discarding of tags should be limited to cases where there is no controversy.
Note that discussion about deprecating tag is not sufficient - there should be discussion confirming that silently discarding them is OK.
I would be happy to make PRs for that (I want such tags to be not present and removed), but only after confirmation that it is OK.

For example I wanted to describe nhd:reach_code as deprecated and it was resisted: https://wiki.openstreetmap.org/wiki/Key:nhd:reach_code

Note that discussion about deprecating tag is not sufficient - there should be discussion confirming that silently discarding them is OK.

So one should post to talk-us, probably also to Slack US.

For example I wanted to describe nhd:reach_code as deprecated and it was resisted: https://wiki.openstreetmap.org/wiki/Key:nhd:reach_code

Note that discussion about deprecating tag is not sufficient - there should be discussion confirming that silently discarding them is OK.

So one should post to talk-us, probably also to Slack US.

And to get back to two initial tags:
https://wiki.openstreetmap.org/w/index.php?title=Key:gnis:import_uuid&redirect=no
https://wiki.openstreetmap.org/w/index.php?title=Key:import_uuid
wiki is not describing them as deprecated. Please, ask local community whatever they support mass removal and hiding of this tag.

And to get back to two initial tags:
https://wiki.openstreetmap.org/w/index.php?title=Key:gnis:import_uuid&redirect=no
https://wiki.openstreetmap.org/w/index.php?title=Key:import_uuid
wiki is not describing them as deprecated. Please, ask local community whatever they support mass removal and hiding of this tag.

For the NHD: tags, there is #235. So let's limit this issue to the _uuid tags in the original post.

Can you link discussion confirming this? […] Silent discarding of tags should be limited to cases where there is no controversy.

In principle, I agree with @matkoniecz here. But FWIW: JOSM already discards these tags for a while now and nobody seems to have complained yet. :thinking:


API change

It seems VW changed something today. It's not working anymore.

Actually Car-Net is migrating to We Connect. On the Web maintenance time is up to 8th Juli 23:59. Let's see if API is available afterwards. Otherwise we need to know the changes by We Connect....

Is it working for you again?

Have the same error since 8th July. I have the following error in the log - and username + password are correct:
error: vw-carnet.0 CarNetLogin: 401 Username or PW are incorrect =>{"statusCode":401,"body":{"error":"invalid_grant","error_description":"Error authenticating"},"headers":{"x-auth-error-code":"AC001","x-auth-error-message":"Provided Login or Passcode is not valid","x-fs-tracking-id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx","x-fs-error-code":"GW054","content-type":"application/json;charset=utf-8","content-length":"82","date":"Fri, 02 Aug 2019 22:09:33 GMT","connection":"close","server":"www"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"msg.volkswagen.de","port":443,"hostname":"msg.volkswagen.de","hash":null,"search":null,"query":null,"pathname":"/fs-car/core/auth/v1/VW/DE/token","path":"/fs-car/core/auth/v1/VW/DE/token","href":"https://msg.volkswagen.de/fs-car/core/auth/v1/VW/DE/token"},"method":"POST","headers":{"accept":"application/json","x-app-name":"eRemote","clientid":"CarNetApp","x-app-version":"4.6.1","user-agent":"okhttp/3.7.0","content-type":"application/x-www-form-urlencoded","content-length":91}}}
Is there any solution for this problem?

The endpoints and behaviors outlines in this git are working for me today, as a United States customer of Car-Net. But I'm not sure if this works in other regions:   https://github.com/thomasesmith/vw-car-net-api

Have you been able to use your car-net app through mitmproxy? At least with the myAudi App it is not working due to the SSL pinning feature I guess... I just get a Network Error message while using the proxy even if most of the other websites and apps are working! So I fear they implemented their CA hardcoded into the app..

Have you been able to use your car-net app through mitmproxy?

Yes, the Car-Net mobile app connects fine when connecting through an mitm proxy. At least the U.S. iOS app does. I can't speak for other versions/markets though.

I was able to connect via mitmproxy on my old Android phone with an xposed module which disables the ssl pinning :) Now I can see the requests and auth token of the myaudi app!
If someone is interested in working on this topic - feel free to contact me!

I tried to connect via url https://cns.vw.com/mps/v1/login but the only answer it got is:
504 Gateway Time-out The server didn't respond in time.
Sadly it's not that easy to login via App system...

504 Gateway Time-out

This is how it behaves if you try to load the url in a browser. Is that what you're attempting? This URL is an API endpoint that expects a JSON payload in the body of the request and a particular header. It will always respond 504 when you try to simply load the URL in a browser.

Yes, I know that is an API
I did it via JavaScript:
   var myUrl = 'https://cns.vw.com/mps/v1/login';     var myFormdata = {'email': CARNET_USERNAME,                       'password': CARNET_PASSWORD};     var myHeader = {'Content-Type': 'application/json'}     request.post({url: myUrl, form: myFormdata, headers: myHeader}, function(error, response, result){         log("error: " + error + " result: " + result + " response: " + response);
So, perhaps there's a need for additional headers or so...
In my browser I can even request the page and I'm getting a JSON with an error.

Okay, good yeah, I just wanted to be sure there wasn't a misunderstanding.
Weird, I am connecting fine to that endpoint from USA. But I just changed my workstations VPN to connect to a server in Germany (where GitHub tells me you are located) and then tried again and I now get 504 responses back from it too. Make of that what you will.

Yes, I'm located in Germany. So there's a geofance probably. I also tried the american login screen and my credentials are not working.
I guess there are different systems in EU and US ...

I am currently working on fixing the API change at least for the Audi part. I am again able to login and receive the information about my car.
The problem I am struggling with is lock/unlock the car for example as I do not only need the access token but also a security token.
The security token procedure uses the personal 4-digit PIN and a challenge string which looks like a SHA256 hash. The PIN is somehow hashed into probably a SHA512 string in combination with the challenge hash but I struggle with finding out HOW they do it...
Example with a Demo PIN (0000):
{
    "securityPinAuthentication": {
        "securityPin": {
            "challenge": "B23054E10DFE4E1A050D695BC00A6B74F7162ADC4EE19A10C47D628BDC608723",
            "securityPinHash": "9E798E836593028D8A8177B26871E6F13E9366042228438C1B6470275C02131C85F3855B8B1D84A77CC185895AF5FD31549E63653219D777305A13E4E01F3C1D"
        },
        "securityToken": "TOO LONG"
    }
}

Any idea from someone?

Did you manage to login by the App API or by web API? If App API it would be great to share this code to be able to make the carnet adapter work again.
Sadly I have no information about the challenge. If you logged in via web API: is it possible to lock/unlock the car from the website? Otherwise this could be the problem.

I was able to decrypt the API calls of the myAudi app via mitmproxy and an unlocked Android phone with xposed and a module to disable ssl pinning. So I use the App API for my calls!
E.g. this is the access_token call for Audi:
curl \
-H "Accept:application/json" \
-H "Content-Type:application/x-www-form-urlencoded" \
-d "username=USER&password=PASSWORD#&scope=openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write&client_id=mmiconnect_android&grant_type=password" \
-X POST https://id.audi.com/v1/token

I tried the audi connect with my E-Golf but then I get "invalid credentials"...
But if someone should be able to identifiy the correct login url for VW we could get into the system.
Would it be much effort for you to do the same with "We Connect" for VW. I can provide you some temporary credentials if you want.

Not a problem at all! I can at least try :)
Everything is prepared already so if you provide credentials I can test it with my setup and give you the API Calls!
Just send me a mail to massa [at] partyheld de

Am 21.09.2019 um 16:38 schrieb Volker Sengler<EMAIL_ADDRESS>
I tried the audi connect with my E-Golf but then I get "invalid credentials"...
But if someone should be able to identifiy the correct login url for VW we could get into the system.
Would it be much effort for you to do the same with "We Connect" for VW. I can provide you some temporary credentials if you want.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

I am currently working on fixing the API change at least for the Audi part. I am again able to login and receive the information about my car.
The problem I am struggling with is lock/unlock the car for example as I do not only need the access token but also a security token.
The security token procedure uses the personal 4-digit PIN and a challenge string which looks like a SHA256 hash. The PIN is somehow hashed into probably a SHA512 string in combination with the challenge hash but I struggle with finding out HOW they do it...
Example with a Demo PIN (0000):
{
    "securityPinAuthentication": {
        "securityPin": {
            "challenge": "B23054E10DFE4E1A050D695BC00A6B74F7162ADC4EE19A10C47D628BDC608723",
            "securityPinHash": "9E798E836593028D8A8177B26871E6F13E9366042228438C1B6470275C02131C85F3855B8B1D84A77CC185895AF5FD31549E63653219D777305A13E4E01F3C1D"
        },
        "securityToken": "This is a temporary security token you get when a first GET requests the security PIN authentication.  This Example is the second step [POST| for the actual authentication where you get the actual security token as a response"
    }
}

Any idea from someone?
BTW: I am willing to help with VW as well, but I can´t test with my own car. So I can just offer to work together with a EU VW customer!

Any idea on this is still highly appreciated! Feel free to contact me at "massa [at] partyheld de"

New informations on logging into new We Connect. @massa007 helped me by logging login procedure of We Connect app via mitmproxy. Here are my conclusions
Start login via GET https://identity.vwgroup.io/oidc/v1/authorize?client_id=9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com&scope=openid%20profile%20mbb%20cars%20birthdate%20nickname%20address%20phone&response_type=id_token%20token%20code&redirect_uri=carnet%3A%2F%2Fidentity-kit%2Flogin&nonce=e9dae820fc268756f559aca9cadec3c29dcfab634ef73bb2999c37ca8795a6da&state=6791eff1-15a8-474d-af48-a04ac0700da3&code_challenge=c-b2lf1f7kbAfV6jDU2Yl65R2Xsbhx5Ksji_x4mFCRw&code_challenge_method=s256
client_id 9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com seems to be constant for We Connect App. You also need to provide a CookieJar.
In the answer (response 302) you will find a relayState in response.location url.
With this you can proceed to send userid via GET https://identity.vwgroup.io/signin-service/v1/signin/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com?relayState=bf38ed96b0fa704f99ce7ddeb4357be1b97bb8c5
The answer will be 200, rest seems to be irrelevant.
Next is a POST to https://identity.vwgroup.io/signin-service/v1/9496332b-ea03-4091-a224-8c746b885068@apps_vw-dilab_com/login/identifier.
Here you have to pass the following forms data:
_csrf:      9795ed61-9b99-4a8d-931d-32a46c45d11e relayState: bf38ed96b0fa704f99ce7ddeb4357be1b97bb8c5 hmac:       b4c36f72ed5a35cda9ad50c140f29b7864e0199130d33f0aadc66cd7338e7da2 email:      <userid/email>
The answer should be 303.
Here starts my problem... how to get hmac and _csrf? I see some additional values like nonce and challenge being passed, but how to get hmac and _csrf? In the weblogin they are part of some forms data presented by VW but here? Any help is appreciated to continue mods for We Connect...
I can also provide mitm data since onyl a temporary user was used.

Solution is found with this adapter: https://github.com/TA2k/ioBroker.vw-weconnect/
It is able to requast all data by app login with a bunch of additional informations.

Making a request like this curl -X POST
https://cns.vw.com/mps/v1/login
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-d '{
"email"<EMAIL_ADDRESS>"password": "******"
}
Got response like this
{
"message": "Unauthorized"
}
Is there any change in request header or url because credential is working fine with provider side

Making a request like this curl -X POST
https://cns.vw.com/mps/v1/login
-H 'cache-control: no-cache'
-H 'content-type: application/json'
-H 'postman-token: 6975fa50-0e2c-e304-02ae-c8912b29ec6e'
-d '{
"email"<EMAIL_ADDRESS>"password": "******"
}
Got response like this
{
"message": "Unauthorized"
}
Is there any change in request header or url because credential is working fine with provider side

I was able to decrypt the API calls of the myAudi app via mitmproxy and an unlocked Android phone with xposed and a module to disable ssl pinning. So I use the App API for my calls!
E.g. this is the access_token call for Audi:
curl \
-H "Accept:application/json" \
-H "Content-Type:application/x-www-form-urlencoded" \
-d "username=USER&password=PASSWORD#&scope=openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write&client_id=mmiconnect_android&grant_type=password" \
-X POST https://id.audi.com/v1/token

Can you still decrypt API calls from myAudi? I have no unlocked device to escape the SSL Pinning.

Didn‘t try since the day I posted that ^^ Do you need anything?

Am 12.05.2020 um 14:15 schrieb Mr-Staffman<EMAIL_ADDRESS>
I was able to decrypt the API calls of the myAudi app via mitmproxy and an unlocked Android phone with xposed and a module to disable ssl pinning. So I use the App API for my calls!
E.g. this is the access_token call for Audi:
curl
-H "Accept:application/json"
-H "Content-Type:application/x-www-form-urlencoded"
-d "username=USER&password=PASSWORD#&scope=openid profile email mbb offline_access mbbuserid myaudi selfservice:read selfservice:write&client_id=mmiconnect_android&grant_type=password"
-X POST https://id.audi.com/v1/token
Can you still decrypt API calls from myAudi? I have no unlocked device to escape the SSL Pinning.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Didn‘t try since the day I posted that ^^ Do you need anything?
Yes, I need to know how the payload looks like when starting Clima on my Car. None of the three standard settings work, auxiliary, automatic or electric. Stop Clima works fine.

Maybe if I add you as a user of my car and and you can help me? Please reply on gmail staffan.spjuth

Hi all, I'm trying to use carnet with German login. It seems the carnet API has the same structure as the audi API. While Audi is working for me, carnet doesn't authenticate. Am I right assuming that carnet is no longer functional and you are in the process of deciphering weconnect?


Adds 'Settings' to Context and uses it as a cache of parameters

Rewrite of https://github.com/microsoft/FeatureManagement-Dotnet/pull/180
This PR adds a filter parameters binder interface to allow feature manager to cache bound feature filter and feature variant assignment parameters for performance optimization.
Why
Feature filters are given filter parameters in the form of IConfiguration that instruct them how to perform feature evaluation. Often these parameters are bound to a strongly typed settings object before use. Observed cost of binding IConfiguration to perform feature evaluation is high. By caching the result of the binding, a noticeable performance increase can be achieved. This PR gives Implementers of IFeatureFilter and IFeatureVariantAssigner the option to cache these settings with the help of the feature management system. This is possible through the IFilterParametersBinder and IAssignmentParametersBinder interfaces.
/// <summary>
/// An interface used by the feature management system to pre-bind feature filter parameters to a settings type.
/// <see cref="IFeatureFilter"/>s can implement this interface to take advantage of caching of settings by the feature management system.
/// </summary>
public interface IFilterParametersBinder
{
    /// <summary>
    /// Binds a set of feature filter parameters to a settings object.
    /// </summary>
    /// <param name="parameters">The configuration representing filter parameters to bind to a settings object</param>
    /// <returns>A settings object that is understood by the implementer of <see cref="IFilterParametersBinder"/>.</returns>
    object BindParameters(IConfiguration parameters);
}

Example Usage
Filters offered in this library will benefit from this caching change for anyone using this version moving forward. For custom filters, the class must implement the IFilterParametersBinder interface. Below is an example.
class MyFilter : IFeatureFilter, IFilterParametersBinder
{
    public object BindParameters(IConfiguration filterParameters)
    {
        //
        // Called before evaluation occurs, only if settings are not already in cache.
        return filterParameters.Get<FilterSettings>();
    }

    public Task<bool> EvaluateAsync(FeatureFilterEvaluationContext context, CancellationToken cancellationToken)
    {
        //
        // Get pre-bound/cached settings
        FilterSettings settings = (FilterSettings)context.Settings;

        //
        // Use them for evaluation
        ...
    }
}

Breaking Change
This PR introduces a possible breaking change for custom feature definition providers that implement IFeatureFlagDefinitionProvider. To ensure that any filters that implement IFilterParametersBinder see updates to feature filter parameters when they are changed, definition providers should ensure a new object reference is used for the parameters in the feature definition. Otherwise, the filters will continue to use the same settings from the cache.
Perf
Rough performance assessment showed improvements of ~100 times at least for complex settings objects.

This is our first option that can be invalid (ttl < 0). Do you mind to add some validation in FeatureManager to validate that cache ttl is greater or equal to 0.

Added validation for TTL. Added an error type and a validation method. https://github.com/microsoft/FeatureManagement-Dotnet/pull/229/commits/95abd6897fc0179dc7049e0928888a2c59ddb044
Let me know if you prefer a different structure or a different error name.

Added validation for TTL. Added an error type and a validation method. 95abd68
Let me know if you prefer a different structure or a different error name.

For constructor error I'd expect simple ArgumentException to suffice.

I just realized that this cacheing doesn't work well with multiple filters. Essentially, we cache FeatureName -> Filter.Parameters.
If I have a 2 Targeting Filters on a single Feature. The parameters of the first one get cached, and then the second filter busts the cache (because the key is the same, but "Parameters" are not the same ref) and it writes a new cache item for those parameters.
A solution here could be to cache parameters for each Filter, not for the Feature. Something like "Feature.1" pointing to the first filter? That should be safe because we know the ref's will be different on each Parameters object, so even if the order of Filters gets moved around, the cache would bust accordingly.
What do y'all think?

This is ready for review again.
Solved the multiple filters cache problem by adding a "FilterIndex" and appending it to the key of the cache.
Also added an internal interface that allows us to cache params only from only our providers. Had to expose this internal interface to the Tests project via InternalsVisibleTo and sign the tests project as well.


CSS conflicts integrating with existing applications and styles

Affected package
@carbon/ibm-cloud-cognitive@latest
Description
Carbon global and utility styles
Importing the package CSS into an existing application can cause unintended side effects originating from global and utility styles from Carbon as a dependency - depending on the import order, this also takes precedence over any Carbon style or version that an application may already consume.
As an example, see an exploration finding from integrating the CSS into Cloud Pak for Security's application boilerplate:

Before
After

Reduced test case - https://codesandbox.io/s/cranky-galileo-7cqlz?file=/src/index.scss
Carbon component styles
There are many different solutions for removing Carbon global and utility styles, for example, toggling all global flags off as per https://github.com/carbon-design-system/ibm-cloud-cognitive/compare/SimonFinney:css-snapshot...SimonFinney:remove-carbon-utility , but there are still challenges with the package outputting styles from underlying Carbon components that conflict with the existing styles of an application.
An example is the CSS overriding the theme for the CodeSnippet:

Viewport
Code

Reduced test case - To come
Styles public API testing
As an aside, throughout the course of the exploration, we found the styles changing unexpectedly between 2 versions of this package causing side effects that added significant noise to debugging the issues outlined above.
For an example, see https://github.com/SimonFinney/ibm-cloud-cognitive/blob/css-snapshot/packages/cloud-cognitive/src/tests/snapshots/styles.test.js.snap#L2354 - any token before this line is output as hexadecimal, while anything after is output as a CSS custom property.
This brings up a need to have a better understanding and control over the stability of the public API of the package's styles, especially as teams from different parts of the organization begin to consume this package in varying ways - see #571 as a potential means of how this could be managed.

So here's a proposed path forward based on our discussion the other day @SimonFinney @lee-chase:

The recommended way to use our SCSS entry points is as follows:

FIRST set any carbon feature flags and/or cloud-cognitive feature flags (if we have any).
THEN load cloud-cognitive (NB yes, before carbon. This ensures any settings we require are made) -- this can either be the whole cloud-cognitive package, or it could be one or more individual cloud-cognitive component SCSS.
THEN load carbon. This can either be the whole carbon package, or it could be one or more individual carbon component SCSS.
If we are loaded in a different order, one or more of the carbon components we use may be imported without the settings we need, and thus things may not work as we intended: this is a decision that users of cloud-cognitive can make if they choose, so long as they are aware of this.

PS thoughts/suggestions on the exact names of those built CSS files also welcome!

PPS -- we could then include a snapshot/test for index-without-carbon-released-only.css, to alert a developer to any changes that will affect styles for released components. The styles for non-released components can be presumed to still be volatile, but we should be careful about changes to released components, since even small CSS changes can be breaking (as we see regularly with carbon versions!). This would be my proposed adjustment to #571 opened by @SimonFinney.

Thanks for putting this together! I feel it covers a significant portion of what we discussed.
To briefly add to this - Sass Carbon settings should as most as is reasonable, be defined by the consumer, and the library should aim to respect that. This would help prevent situations in which the settings of one entry point could potentially override the settings of another, as well as remove the need to import them in an explicit order.
For example, if a consumer chooses to toggle off CSS custom properties within their application, and this library decides to toggle that back on, it may cause unintended behavior that is difficult to debug. I agree that documentation would definitely draw awareness to this, but as discussed, the library should aim to work agnostic of Carbon features defined in feature flags where possible.
One thing we didn't have time for that we should continue to discuss here was how Carbon dependencies should be treated in this library's package.json - it currently includes Carbon as production dependencies, but any existing applications and libraries already managing Carbon will likely conflict with this unless the versions all match up. In this case, does it make sense to reconcile Carbon dependencies as peers within a range, and lock the versions that the library is tested against? For example:
"peerDependencies": {
  "@carbon/icons-react": "^10.24.0",
  "@carbon/import-once": "^10.5.0",
  "carbon-components": "^10.30.0",
  "carbon-components-react": "^7.30.0",
  "carbon-icons": "^7.0.7",
  ...
},
"devDependencies": {
  "@carbon/icons-react": "10.24.0",
  "@carbon/import-once": "10.5.0",
  "carbon-components": "10.30.0",
  "carbon-components-react": "7.30.0",
  "carbon-icons": "7.0.7",
  ...
},

I agree that peer dependencies make more sense for carbon and for react. I've pulled the carbon version we use forward to 10.32, since there are changes in that version that PageHeader will depend upon, but I've made them peer dependencies, so it's up to our user what actual versions we are paired with. On the whole, minor changes in Carbon shouldn't make much difference, but on the other hand with CSS and DOM changes even minor changes have the potential to be breaking -- that's one of the challenges of web app building with multiple frameworks.

I agree that peer dependencies make more sense for carbon and for react. I've pulled the carbon version we use forward to 10.32, since there are changes in that version that PageHeader will depend upon, but I've made them peer dependencies, so it's up to our user what actual versions we are paired with. On the whole, minor changes in Carbon shouldn't make much difference, but on the other hand with CSS and DOM changes even minor changes have the potential to be breaking -- that's one of the challenges of web app building with multiple frameworks.

I think this is a challenge that leaves risk for visual issues potentially arising, but I wonder if that's dependent on how the library constructs styles with components from Carbon. For example, I would expect little issue with the library positioning something like a button, but overriding its 'internal' styles could cause breakages through untested minor increases.
That's a very basic example, but are there other cases that need to be considered for that approach?

Did you all reach a resolution offline or should we keep this issue open?


project cleanup

Project cleanup

Coverage increased (+2.5%) to 95.439% when pulling 74433a37313e74486f62a7cf7769c98d6440216e on development into 55968a33b9dd23cf42eb8eba648ea6628b6f95b5 on master.


Spring boot 2.0.0 with Mongo Java Driver 3.4.2

Hello Team,
Need input how to auto create Index with spring boot application connecting with Azure Cosmos DB(Mongo API).
Application Details

Below are dependencies defined
buildscript {
ext {
springBootVersion = '2.0.0.RELEASE'
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
implementation 'org.springframework.boot:spring-boot-starter-undertow'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-cloud-connectors'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.cloud:spring-cloud-starter-config:2.0.0.RELEASE'
Mongo DB driver
implementation ('org.mongodb:mongo-java-driver:3.4.2') {
force = true
}
In the pojo model, annotate @indexed on the property(for which, index to be created) and model is decorated with @document. No explicit code for mapping or creating the document.

public class MongoConfiguration extends AbstractCloudConfig { @Bean public MongoDbFactory mongoDbFactory() { return connectionFactory().mongoDbFactory(); } }
My understanding is that Auto creation of index is disabled by default. What changes are required to enable the index creation. Any suggestions would be great help.

Hi @cpatil7,
Are you facing any issue with one of our articles and/or its codebase?


Juno syncing from multiple nodes

Initial Juno sync process:

Implement the ability for Juno node to run in one of two modes:

"bootstrap node" sync - syncing from from Feeder gateway,

...while it already participates in p2p communication

...it serves/gossips information
...it does not pull information from other p2p nodes (ie. it only syncs from Feeder gateway)

"normal node" sync - syncing from other nodes, incl. the bootstrap node

"Block sync" design & implement logic to request information from other peers

make sure to validate the signatures on the received messages

Add telemetry metrics (eg. number of p2p peers known? ping times for peers?)

There isn't a separate milestone like "getting to sync from a single peer first"
We will always sync from all the peers that we are connected to.

This issue was already implemented


Dataform encountered an error: Could not find a recent installed version of @dataform/core in the project. Ensure packages are installed and upgrade to a recent version.

Feature description
Reproducer:
id: dataform_plugin
namespace: qa

tasks:
  - id: wdir
    type: io.kestra.core.tasks.flows.WorkingDirectory
    tasks:
      - id: clone_repo
        type: io.kestra.plugin.git.Clone
        url: https://github.com/dataform-co/dataform-example-project-bigquery

      - id: transform
        type: io.kestra.plugin.dataform.cli.DataformCLI
        beforeCommands:
          - dataform compile
        commands:
          - dataform run --dry-run

We need to find a proper way to install dataform core.

there's no need to cd into the project directory, the git clone task already does it
the problem here are only dataform core dependencies


removed the need for mahotas

Removed the need for mahotas by eliminating the use of Otsu's method for calculating an amplitude threshold.  The threshold is now calculated using a heuristic based on amplitude.  This method worked well for my well curated bengalese finch song, but it may not work well for zebrafinch song.  In the future, we will try to switch this back to using Otsu's method buy taking advantage of the implementation in skimage.

@dgmets looks good to me!
I put a TODO in the code that references the issue about using scikit-image, and then removed the dependency on mahotas from pyproject.toml.
I confirmed "by hand" that after making these changes I was able to install the package.
I.e., by running nox -s dev as explained in the README -- I didn't get the error about building mahotas and I was able to call songdkl inside the activated virtual environment and get the help message.
Still need to get some continuous integration tests going (as in #6) but this fix makes it at lot easier to develop and test locally


--secure option not respected by Ctrl-Q

What version of Ctrl-Q are you using?
3.15.1
What version of Node.js are you using? Not applicable if you use the standalone version of Ctrl-Q.
20
What command did you use to start Ctrl-Q?
na
What operating system are you using?
na
What CPU architecture are you using?
na
What Qlik Sense versions are you using?
na
Describe the Bug
Turns out Ctrl-Q has never looked at the --secure command line flag...
Not the end of the world, but as security is import it should be fixed.
So far Ctrl-Q has always looked the other way when connecting to a Sense server where the certificates were unauthorised.
For example:

A Sense server has a fully qualified domain name of senseserver.company.com and an IP address of <IP_ADDRESS>.
The certificate exported from the QMC is issued in the name of senseserver.company.com. Specifically, the IP address is not included in the certificate.
If Ctrl-Q connect to this server using the IP address and --secure true, that has worked just fine even though it should have resulted in an error, as the IP address is not included in the certificate.

In theory this opens up for man-in-the-middle attacks, but in reality it's very unlikely to be a problem as the QRS and QPS services of Sense servers are very rarely exposed to the Internet, and even so - Ctrl-Q is used by Sense admins who know their QS environments.
Expected Behavior
Given the example server above, the desired functionality is:

If connecting to senseserver.company.com with --secure true, Ctrl-Q will connect correctly and securely.
If connecting to <IP_ADDRESS> with --secure true, Ctrl-Q will refuse to connect.
If connecting to <IP_ADDRESS> with --secure false, Ctrl-Q will disregard the unauthorised certificate and connect anyway.

This was the intended behaviour all along, so far Ctrl-Q has been too generous wrt accepting unauthorised certificates.
To Reproduce
No response

A consequence of fixing this bug is that CA cert specified by the --auth-root-cert-file option will be used when connecting to the Sense server (previously it was not used at all).
That file must thus be available (it is exported together with the two client certificate files as part of the certificate export from the QMC).


Add a license to the repository

I recently came across your project qiskitproject1 and I noticed that the repository github.com/vasanthv07/qiskitproject1 currently does not have a license specified.
Why Adding a License is Important?
As GitHub documents

Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you'll need to license it so that others are free to use, change, and distribute the software.

Would be possible to add a valid license to this repository? Probably something really OpenSource such as the Apache 2.0 license would fit really well.
Thanks!

Thank you for bringing this to my attention. I've now added the Apache 2.0 license to the repository. Please feel free to use, modify, and contribute to the project under this license.
If you have any further suggestions, please don't hesitate to reach out. I appreciate your interest and support!
Thank you

Thanks!


samples: sensor: bq274xx: Read Gauge Channel Individually.

Read Gauge Channel Individually.
Fixes #28383.
Signed-off-by: NavinSankar Velliangiri<EMAIL_ADDRESS>

@jrananth1032 we don't have hardware. Test the sample at you end and confirm

sure , i will test and comfirm

@jrananth1032 we don't have hardware. Test the sample at you end and confirm

It is working perfectly

Please, check commits messages and content, doesn't seem to be right.

changed the commit message.

@gmarull @MaureenHelm ping.

@MaureenHelm @gmarull patch rebased.

@MaureenHelm @gmarull patch rebased.


Allow user to save files from the editor.

Finished in https://github.com/parallaxinc/ChromeIDE/commit/e4e21eff6f506de8cbbb2fd91f5c68d196d08821


feat: ignoreBrowserWarnings option to ignore browser console warnings

Users will sometimes go into devtools when we're using module federation and may see some warnings about non-strict singleton versions. There's currently not a way to hide these in production. Then some of our customers thought there was something wrong who knows. With an extra option ignoreBrowserWarnings that operates basically like ignoreWarnings we can hide these warnings in production while also preserving them in other environments.
https://github.com/webpack/webpack/issues/16374

What kind of change does this PR introduce?
New webpack option similar to ignoreWarnings, but only operates on browser console warnings and is only an array of regex's
Did you add tests for your changes?
Yes copied two existing tests and added the option in webpack
Does this PR introduce a breaking change?
No
What needs to be documented once your changes are merged?

Should go in docs right by here: https://webpack.js.org/configuration/other-options/#ignorewarnings
Also since these are really for module federation, there's probably a page there that would benefit from mentioning the option

Can you fix rebase?

Is this just a flaky test on Windows? Not sure what to make of this as it runs in every other environment and nothing around this was changed.
FAIL test/ConfigCacheTestCases.longtest.js (155.512 s, 749 MB heap size)
  ● Console

    console.log
      12

      at Object.257 (output-module-issue-16040-0-D:/a/webpack/webpack/test/js/ConfigCacheTestCases/output-module/issue-16040/main.mjs:39:9)
          at async Promise.all (index 0)

    console.log
      Done with reading records.

      at Timeout._onTimeout (test/configCases/records/with-readRecords-hook/ReadRecordsPlugin.js:5:13)

    console.log
      Done with reading records.

      at Timeout._onTimeout (test/configCases/records/with-readRecords-hook/ReadRecordsPlugin.js:5:13)

    console.log
      Done with reading records.

      at Timeout._onTimeout (test/configCases/records/with-readRecords-hook/ReadRecordsPlugin.js:5:13)

    console.log
      Done with reading records.

      at Timeout._onTimeout (test/configCases/records/with-readRecords-hook/ReadRecordsPlugin.js:5:13)

  ● ConfigCacheTestCases › loaders › options › options should compile

    InfrastructureLog 0: message = Pack got invalid because of write to: Compilation/modules|D:\a\webpack\webpack\test\con... doesn't match message = /^Pack got invalid because of write to: Compilation\/modules.+loaders[/\\]options[/\\]e...

      124 | 				return (
      125 | 					done(
    > 126 | 						new Error(
          | 						^
      127 | 							`${upperCaseKind} ${i}: ${explain(
      128 | 								array[i]
      129 | 							)} doesn't match ${explain(expected[i])}`

      at checkArrayExpectation (test/checkArrayExpectation.js:126:7)
      at onCompiled (test/ConfigTestCases.template.js:3[78](https://github.com/webpack/webpack/actions/runs/4682306495/jobs/8320722610?pr=16388#step:9:79):10)
      at test/ConfigTestCases.template.js:692:13
      at lib/HookWebpackError.js:7[80](https://github.com/webpack/webpack/actions/runs/4682306495/jobs/8320722610?pr=16388#step:9:81):5
      at _done (eval at create (node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
      at eval (eval at create (node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:22)```

Is this just a flaky test on Windows? Not sure what to make of this as it runs in every other environment and nothing relating to this was changed.

@alexander-akait is there something I need to do for the one integration test so this can get merged? It seems I will need to rebase this one more time

@indeediansbrett Yeah, let's rebase, then I will move it for ready to merge/review

@indeediansbrett Yeah, let's rebase, then I will move it for ready to merge/review

@alexander-akait ah thank you! Just rebased it. Only difference was the WebpackOptions.check.js schema file and reran that. The types.d.ts got regenerated, but left it so the only changes were those ignoreBrowserWarnings typings

@alexander-akait Is this good to merge?

Yeah, I am fine with it, moved to Ready to merge to other developers will review it soon

Yeah, I am fine with it, moved to Ready to merge to other developers will review it soon

Great! Thanks so much

@indeediansbrett would you mind working with @chenxsan if he needs assistance with documenting this feature. There is an issue linked here (https://github.com/webpack/webpack.js.org/issues/6777) where that discussion can be had. 👏

@indeediansbrett would you mind working with @chenxsan if he needs assistance with documenting this feature. There is an issue linked here (webpack/webpack.js.org#6777) where that discussion can be had. 👏

@TheLarkInn will do! Thanks so much!

Was there any documentation on how to use ignoreBrowserWarnings? I can see ignoreWarnings on the main site only.

Is in progress, but it's a boolean in the output section
https://github.com/webpack/webpack.js.org/pull/6785

Not sure whether ignoreBrowserWarnings is a good naming, since module federation also works in other target like node.js

@ahabhgk Any ideas for a better name? We can do it using soft deprecation

Currently I don't have a specific name, only some ideas:
ignoreRuntimeWarnings? ignoreConsoleWarnings? ignoreTargetWarnings? or something else that make ignoreXxxWarnings target-agnostic
or just output.ignoreWarnings? but users may confuse with the top-level ignoreWarnings.

@ahabhgk I am fine with another name, we can make a soft deprecation (just a message) or we can just add TODO for webpack@6
Maybe even ignoreModuleFederationsWarnings


Dialog box with disabled modal mode is hidden behind the flash-object

This issue was imported from Closure Library's previous home at http://closure-library.googlecode.com
The link to the original issue is:
https://code.google.com/p/closure-library/issues/detail?id=424

This issue is being closed as a preparation step before archiving the repository.  See the README for more detail.


fix: added button icon to primary button in modal info view

Add button icon to primary button in ModalInfoViewController
Checklist
Before raising your pull request:

[ ] Ran the app locally ensuring it builds
[ ] Ran the tests locally ensuring they pass on Build
[ ] Pull request has a clear title with ticket ID and a short description about the feature or update
i.e. DCMAW-222: Added ReadID SDK to iOS app
[ ] Created a draft pull request if it is not yet ready for review

Before your pull request can be reviewed:

[ ] Met all of the acceptance criteria specified in the user story on Jira

[ ] Reviewed your own code to ensure you are following the style guidelines

[ ] Ran the app and tested the feature on a range of device sizes
Please include iPod Touch, iPhone SE and iPhone 11 as a minimum.

[ ] Written Unit and Integration tests if needed

[ ] Met all accessibility requirements?

[ ] Checked dynamic type sizes are applied
[ ] Checked VoiceOver can navigate your new code
[ ] Checked a user can navigate only using a keyboard around your new code

Before merging your pull request:

[ ] Ensure that the code coverage and SonarCloud checks have passed
[ ] Actioned and resolved all comments, reaching out to reviewers for clarifications if necessary.
[ ] Ran the app to ensure that no regressions have been caused by changes during code review.
[ ] Targeted the correct branch; develop, release or main

@amopatel1234 this passed the quality gate with 50% coverage, surely that should fail?

@amopatel1234 this passed the quality gate with 50% coverage, surely that should fail?

Your right it should have done, will create another pr adding tests for the uncovered lines


Allow recognizerOptions when calling DialogContext.prompt

Is your feature request related to a problem?
I need to set recognizeNumbers and recognizeOrdinals in options when calling stepContext.prompt(id, options) in a step of a WaterfallDialog.
When calling DialogContext.prompt(id: string, options: PromptOptions) method, it ends calling ChoicePrompt.onRecognize with the options param, but then it only uses options.choices, and ignore the rest of the properties when calling const results = recognizeChoices(utterance, choices, opt); here, as it uses const opt = this.recognizerOptions || {}; here.
Describe the solution you'd like
When calling ChoicePrompt.onRecognize(context: TurnContext, state: any, options: PromptOptions), those options could be merged to this.recognizerOptions when assigning to opt, something like:
const opt = Object.assign({}, options.recognizerOptions, this.recognizerOptions);

Being options.recognizerOptions a new property in PromptOptions type.
Describe alternatives you've considered
On my dialog with a choice prompt, I could:
const myPrompt = new ChoicePrompt(id);
myPrompt.recognizerOptions = {
  recognizeNumbers: false,
  recognizeOrdinals: false
};
super.addDialog(myPrompt);

But this is not as flexible, as the object will have the same values in every call to stepContext.prompt(id, options), as those options cannot contain recognizer options.
On the other hand, those options are not stored in dialog state (within dialog stack) to be accessed if required, as it is our case.
Additional context
Using botbuilder 4.13.3

Hi @greuze, sorry we can't take this PR at the moment, would you be able to elaborate on this sentence: On the other hand, those options are not stored in dialog state (within dialog stack) to be accessed if required, as it is our case.
I'm trying to understand why you would need to change RecognizerOptions depending on the stepContext. Can you provide a concrete use case where this is useful? If you consider other prompts, would you have the need to change those in a waterfall step too?
Thanks again.

Closing as "no activity".


Feature request: "type": "module" in package.json

Feature request
What is the expected behavior?
.js files inside a package with "type": "module" in package.json should be treated as ES modules.
See the Node docs for more information.
What is motivation or use case for adding/changing the behavior?
As of yesterday, Node LTS now offers this feature unflagged so it would be good for webpack to support it too.
Additionally this would help alleviate bundle bloat in cases similar to #10889
Officially ES Modules support in Node is still classified as experimental, but there is a strong expectation the key mechanisms will remain stable.  Mostly it's things like error message wording that may change.
How should this be implemented in your opinion?
However Tobias sees fit.  If it could land in webpack 4 that would be amazingly useful, but I would understand if it were webpack 5 only.
Are you willing to work on this yourself?
Guy tells me Tobias has already begun implementation.  But I could not find any related issue or thread.  Therefore I'm mostly raising this as a tracking issue so that everyone can see the status.

I've posted https://github.com/webpack/webpack/issues/10971 which is also related to Node.js interop here.

Node for webpack@5, babel has bugs https://github.com/webpack/webpack/issues/11467


Implement Tezos node RPC access via secret link

We need to be able to provide access to private/permissioned chains
via node RPC.
One approach is to set up user access to the private
network where chain operates. This works, but is fairly
complex. Consider, for example, setup with ZeroTier:

user signs in to ZT with a 3rd party account or creates a ZT account
user downloads and installs ZT software
user receives invitation to join ZT network and joins the network
ZT admin approves newly joined user

Another approach might be to authenticate access to RPC endpoints via
some HTTP authentication scheme, however most tools in the ecosystem
don't appear to support any and do not expose HTTP enough to do even
basic things like adding custom headers to requests.
Also, user account managements with a 3rd party or a custom system in
addition to Tezos accounts adds to overall complexity.
Thus we propose to implement a system that provides access to Tezos
node RPC via a secret URL - unique, unguessable URL that embeds access
token issued to a tz address after confirming tz address ownership.
In this system there is a web service ("vending machine") that issues the secret
URLs and a client who requests the secret URL to be issued to them
(multiple implementations possible, but initially some combination of standard tools - tezos-client, command
shell and curl)
Workflow to receive secret URL:

Client initiates the conversation:
curl -X POST https://vending-machine/$CHAIN_ID
Note that vending machine URL itself is a secret link emebedding chain id that needs to be shared with the client.

Vending machine responds with a GUID, e.g.
63a2096b01774122807a44e7695e5a9f
This GUID serves as both conversation identifier and nonce that will
be used to confirm ownership of a tz address

Client signs the guid and posts the guid, signature and public key

  TZ_ALIAS=key20200625
  GUID=63a2096b01774122807a44e7695e5a9f
  SIGNATURE=$(tezos-client -p PsCARTHAGazK sign bytes 0x05${GUID} for ${TZ_ALIAS} | cut -f 2 -d " ")
  PUBLIC_KEY=$(tezos-client show address ${TZ_ALIAS} 2>/dev/null | grep "Public Key:" | cut -d: -f2)
  curl -X POST -d "guid=${GUID}" -d "signature=${SIGNATURE}" -d "${PUBLIC_KEY}"  https://vending-machine

Server

verifies that guid was previously issued by this vending machine
validates signature
if signature is not valid returns error, otherwise
calculates tz address by hashing the public key
generates access token for the tz address
derives Tezos node RPC URL with the access token embedded, e.g.
https://tezos-node-rpc/{ACCESS_TOKEN}
returns the URL to the client

Client uses provided secret URL to access Tezos node RPC, e.g.
tezos-client --endpoint=${SECRET_URL} (with tezos 8.0)

@itkach @harryttd these specifications require adding more persistent storage into the infra. I see in PR#36 that the current implementation uses redis for this purpose.
Maybe we can do without?
People need to prove their ownership of a tz address as part of the auth flow, because this address contains tokens - either assigned at genesis or transfered by the private chain operator.
Here is a workflow that would (I think) eliminate the need for redis by using the chain itself as persistent storage:
Workflow to receive secret URL:

Client initiates the conversation:
curl -X POST https://vending-machine/$CHAIN_ID
Note that vending machine URL itself is a secret link emebedding chain id that needs to be shared with the client.

Vending machine responds with a GUID, e.g.
63a2096b01774122807a44e7695e5a9f
This GUID serves as both conversation identifier and nonce that will
be used to confirm ownership of a tz address

Client signs the guid and posts the guid, signature and public key

  TZ_ALIAS=key20200625
  GUID=63a2096b01774122807a44e7695e5a9f
  SIGNATURE=$(tezos-client -p PsCARTHAGazK sign bytes 0x05${GUID} for ${TZ_ALIAS} | cut -f 2 -d " ")
  PUBLIC_KEY=$(tezos-client show address ${TZ_ALIAS} 2>/dev/null | grep "Public Key:" | cut -d: -f2)
  curl -X POST -d "guid=${GUID}" -d "signature=${SIGNATURE}" -d "${PUBLIC_KEY}"  https://vending-machine

Vending machine

validates signature
if signature is not valid returns error, otherwise
calculates tz address by hashing the public key
verifies that balance associated with the public key is not zero, returns error otherwise
generates predictable access token based on public key: ACCESS_TOKEN=HASH(PUBLIC_KEY,CHAIN_SECRET). CHAIN_SECRET is a unique, predictable string associated with the private chain, generated at chain inception.
derives Tezos node RPC URL with the access token embedded, e.g.
https://tezos-node-rpc/{PUBLIC_KEY}_{ACCESS_TOKEN}
returns the URL to the client

Client uses provided secret URL to access Tezos node RPC, e.g.
tezos-client --endpoint=${SECRET_URL} (with tezos 8.0)

RPC server:

verifies that ACCESS_TOKEN=HASH(PUBLIC_KEY,CHAIN_SECRET), returns error otherwise
puts the endpoint in RAM so all subsequent requests are whitelisted

To make secret URL shorter, one could also consider using a substring of public key.
Then you basically permission people by sending tokens to what they claim is their address. You could also build a faucet on top of that (any pubkey works, and the vending machine sends tokens to the key as part of the handshake).


Fix the Polygon contains method

We couldn't click on things. This change (to align with the mentioned algorithm from substack) fixed it for us.

Good catch, I think this deserves a hotfix (master merge).

FYI, this change is already in the dev branch via: https://github.com/pixijs/pixi.js/commit/93714a9dd46c353a4a51b00c6b287d3bae24d392#diff-fddecedb5f4e12741286f6a3c3211feb

Ha, oops. Forgot we hit this already. My bad! Good catch @themoonrat.


Test smart contract events

Description

We want to have an example of how to test the events emitted by a contract.

Steps

Add a test file to check if the smart contract events are emitted properly.

References

https://foundry-rs.github.io/starknet-foundry/testing/testing-events.html

Dependencies

This issue can be worked on after #21 is completed.

Hey @danielcdz can I work on this issue when the Od hack starts

Will write a basic test for events emitted by a contract.
ETA: 2 hours.

Can I be assigned to this?

can i take up this issue @danielcdz ?

I would like to work on this issue

I’d like to help with this.
My name is Gideon Bature, a Software Engineer with experience building Starknet based smart contracts, using Cairo. If given this issue, I should be able to send my first PR within 48 hrs.
Thank you!

Please is this issue still available, can I go on ahead with it, or suggest other issues?
I graduated from the recent cairo bootcamp batch and I've studied the cairo book and the starknet books extensively. I would sincerely like to give back to the community as what the community has impacted on me.

Can I work on this, please?

Can I contribute to this one?

I'd be happy to do this. Please assign.

can i please tackle this task

Hi, I am proficient Blockchain developer  expert in Cairo , Rust and Solidity  and also in web development.
I have  contributed many cairo ,rust  projects like chainevents , arkprojects etc  .   please /assign  this issue .
Thank You

May I handle this issue?  Am a web 2 frontend developer, a solidity smart contract developer/auditor and a cairo smart contract developer. Am a graduate of Starknet Cairo Bootcamp. I have successfully done tasks assigned to me in OnlyDust. If assigned this i would complete it within 1 day.

Hi, I am proficient Blockchain developer  expert in Cairo , Rust and Solidity  and also in web development.
please /assign  this issue .
Thank You

Is it okay if I tackle this?

@danielcdz
I wanna let you know that i am still working on this. Thanks


Number of users and movies are different from the data?

Hi,
In Readme, it indicates that there are 6000 users and 4000 movies in the small movielens data. But When I follow the exact steps you've described in the Readme, I get 3706 movies and 6040 users. I get these numbers from the rows of model.V and model.U matrices,  as well as model.item_to_index.
Any insights would be helpful. Thanks!

The numbers quoted in the README are likely estimates


Add scope option to dup relationships

Add a scope option to dup relationships.
This could be usefull, for example, to ensure that objects are created given a certain order (for example, by their ids).
Given the treasure model:
  scope :ordered, -> { order(id: :desc) }
Usage:
pirate.deep_clone  include: { treasures: {}, scope: :ordered }
What do you think?

Hi, thanks for your PR! I'm not sure if it is really useful though. AR already gives you the possibility to scope associations by specifying a second argument, I thought it was something like:
class Pirate < ActiveRecord::Base
  has_many :treasures, ->{ order(id: :desc) }
end

Is there a case in which it would be useful to specify a different order scope than the one provided in the association? If there is, it's fine with me to merge this in. We should add some tests for it first in that case.


404 error

Logging in directly goes into a 404 error

Have you followed "Setup Environment" (https://github.com/pockethub/PocketHub#setup-environment)?

I can confirm the same thing happened to me as well.
Even after following Setup Environment, could someone clarify those steps further?

Closed due, assumed user error.


Jest is "stuck" on only generating coverage for tested files, instead of all files

🐛 Bug Report
I recently setup codecov, and then setup jest to generate coverage reports for it.
Initially, it was setup to collect coverage from all files via the jest config (see below).
Later, I wanted to have a separate jest command minus the coverage report, so I moved the collect coverage command from the jest options to the cli (see below).
After doing this, jest no longer gives coverage for the entire src folder, but only for the files tested. Okay, no problem, I'll just undo this change.
Here's where I am getting frustrated - no attempts to revert this seem to work. I can revert to the previous config, and it no longer works for all files, only the ones being tested. Same config, different results. I've tried running it with --clearCache or --no-cache and neither work. I've tried creating a whole new config, one with coverage and one without, and then just running the base command, and that doesn't work either.
When running, it takes much longer than it used, displays the 'generating coverage for untested files' message, and then still only returns the coverage for tested files only.
To Reproduce
I had a config with the following (this worked fine):

with a command that looked like this:

I removed the collectCoverage and collectCoverageFrom options from the jest config, and created a separate command that looked like this:

I realize now that the above command never worked for all files. Regardless, after reverting to the original setup, jest no longer works the way it used to, and is instead "stuck" on just reporting coverage for the tested files only. Even though it displays the "generating coverage for untested files" message.
Expected behavior
I would expect that when coverage is set to true, and collectCoverage is passed a glob for all files in the repo, that the generated coverage report would be for all files. I would expect this behavior to be consistent.
Run npx envinfo --preset jest
Paste the results here:
System:
    OS: macOS 10.14.4
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
  Binaries:
    Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
    Yarn: 1.7.0 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
  npmPackages:
    jest: ~24.1.0 => 24.7.1

Could you provide a minimal reproduction we could download and investigate?

Coverage report for all files worked fine in v23 but seem like it has regressed in v24 - I'm only seeing coverage for tested files.

Apologies - this stripped down example repo shows it working as expected.
https://github.com/charliekassel/test-jest-coverage

@charliekassel huh, thanks for that comment. we recently updated to version 24. after downgrading to version 23, everything works again

gonna close this issue since my problem is resolved. but seems like something cache related possibly might have regressed in v24

I'm experiencing this too. Is there a workaround? I can even list file paths explicitly, and the file is not included in the coverage.

I had the same problem. But I find an exclude rule that not exclude the subdirectories :```    collectCoverageFrom: [
'**/.{js,jsx}',
'!dist/',
So the coverage was ran on big JS files. I suppose it is too much for coverage calculation.
I change `!dist/*` to `!dist/**` to really exclude the files. And it worked

I am having the same/similar problem.  I am passing --collectCoverageFrom 'src/**/*{js,jsx,ts,tsx}' and many files in src/ are being excluded from the total coverage.
@rwwagner90 Did you end up finding a solution to this?

@bigwoof91 I think we just opted for passing a lot more paths instead of one glob. See https://github.com/shipshapecode/shepherd/blob/master/jest.config.js#L11-L17

Appreciate the quick response @rwwagner90 . Tried passing more glob patterns. Unfortunately it didn't do the trick (using<EMAIL_ADDRESS>-- although, I'm happy it worked for you!
FWIW
We are running jest, specifying to test only certain files, then trying to collect coverage on the entire src directory. I've read through this issue... tried several things with no avail. My team might raise the issue again.
Any tips are welcome -- otherwise, thanks again!

@bigwoof91 I think you will have to do like we did and pass many different globs, instead of one for the whole directory. I could not get the one for the whole directory to work.

Hi everyone, Tom from Codecov here. I wanted to know if I could be useful here, but we recently released a feature called Carryforward Flags, which allows users to only upload coverage reports for code that changes.
Here are a bunch of resources that might help:
Blog
Documentation
[Webinar])https://www.youtube.com/watch?v=VqtaqITCfHI)
If this can be useful, I'd love to see how I can help. Please let me know.

Can this s#^% be fixed? It was first raised way back in 2016 as part of https://github.com/facebook/jest/issues/1211, like @bigwoof91 mentioned.
Like...do you jest folks even get the point of coverage!? Wtf's the point if I add new files to directories that I've included under collectCoverageFrom, but only have those that are touched by tests get included in coverage?
I can add a whole bunch of new files with no tests and get 100% coverage. FFSakes, there goes my automated pipeline checks - onto manual inspection.
Absolute joke.

Can this be fixed? It was first raised way back in 2016 as part of #1211, like @bigwoof91 mentioned, and people are still having this same issue.
Like...do you jest folks even get the point of coverage!? What's the point if I add new files to directories that I've included under collectCoverageFrom, but only have those that are touched by tests get included in coverage?
I can add a whole bunch of new files with no tests and get 100% coverage.

Hey guys, I think I find the answer.
I encountered with this issue. And I found my directory structure as:
· tests/
· src/
· jest.config.js
The test files is listed outside of source files. However, my previous jest config's roots property only had the tests/ directory. When I added the src/ directory to roots. Jest gave coverage of all wanted files in src/. I hope this would help.

@FunkyLambda

@cyphernull Thank for helping, following is my package.jsonconfig that worked
"jest": {
    "collectCoverageFrom": [
      "src/**/*.js"
    ],
    "collectCoverage": true,
    "verbose": true,
    "testTimeout": 30000,
    "roots": [
      "<rootDir>/tests",
      "<rootDir>/src"
    ],
    "testRegex": "((\\.|/*.)(test))\\.js?$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }

@cyphernull Thank for helping, following is my package.jsonconfig that worked
"jest": {
    "collectCoverageFrom": [
      "src/**/*.js"
    ],
    "collectCoverage": true,
    "verbose": true,
    "testTimeout": 30000,
    "roots": [
      "<rootDir>/tests",
      "<rootDir>/src"
    ],
    "testRegex": "((\\.|/*.)(test))\\.js?$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ]
  }

Thank you! roots with two paths, move back my tests folder outside src and collectCoverageFrom without <rootDir> fix that "issue" for me

Hey guys, I think I find the answer.
I encountered with this issue. And I found my directory structure as:
· tests/
· src/
· jest.config.js
The test files is listed outside of source files. However, my previous jest config's roots property only had the tests/ directory. When I added the src/ directory to roots. Jest gave coverage of all wanted files in src/. I hope this would help.

this solved my problem! Thanks for sharing your experience!


Update Project.toml compat session

update compat session of Project.toml

Did you actually test it?  See for example #56 about CSV compats.

no, I thought the pull request would have triggered the test suite and any problem (if any) would have been caught at this time, sorry


Support for PostgreSQL 13

Based on https://docs.microsoft.com/en-us/azure/postgresql/concepts-version-policy Flexible Server supports PostgreSQL 13

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

#label:"aq-pr-triaged"

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


Cannot install TensorFlowLiteSwift with CocoaPods

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS High Sierra
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version: 1.12
Python version: 3.6.5
Installed using virtualenv? pip? conda?: pip
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A

I'm excited to see that TensorFlow Lite for Swift is available!
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/experimental/swift
I tried installing it with CocoaPods using the instructions at the link above, but I get the following error. Is the CocoaPod available yet? Thanks!
[!] Unable to find a specification for TensorFlowLiteSwift

Hi eospi, thank you for trying out the TensorFlow Lite Swift library. Unfortunately, the CocoaPod is not yet available. Will remove the instructions from the README. Sorry for the confusion.

Thanks, @temrich. I will close this issue then.

Hi, it seems these instructions have been added back as it says you should put this line in your podfile:
pod 'TensorFlowLiteSwift'
But seems that it's still not available.  The instructions came back in this commit 76e879d1c18c74ee5cbc5a1162ff254a0cfb221b
Maybe I'm just jumping the gun and this will show up in CocoaPods after a nightly build or something?

Hey Jesse,
At the moment the CocoaPods have not been pushed publicly. Hoping to do that soon.
In the meantime (if you want), you can play around with the pods locally.
You will need to configure the TensorFlowLiteC podspec which requires building the TensorFlowLiteC.framework. You can do that using Bazel by following these steps.
Then you will need to push the TensorFlowLiteC.podspec to a local CPDC repo and point your Podfile to the local cpdc source and local TensorFlowLiteSwift or TensorFlowLiteObjC pods, which will be located in the root tensorflow directory after you follow the Getting Started steps.
If you decide to test locally, please let me know if you run into any issues. Again, hoping to push these pods to public CPDC over the next few days.

Hi @temrich I followed your steps (thank you) with the following results:

Building TensorFlowLiteC.framework worked fine
The first two steps under the "Bazel" section seem like they're for after you get the TFLSwift library built, so I skipped them.  The next step bazel build tensorflow/lite/experimental/swift:TensorFlowLite went fine, but I wonder if it's not supposed to have a switch to build for multiple CPU archs like the C framework had?  In any case, the bazel test ... step failed with the following output (snipped to relevant section I hope)

File "/private/var/tmp/_bazel_jpangburn/820d999d6733d6499781c2d354fc5533/execroot/org_tensorflow/bazel-out/host/bin/external/build_bazel_rules_apple/tools/codesigningtool/codesigningtool.runfiles/build_bazel_rules_apple/tools/codesigningtool/codesigningtool.py", line 107, in _filter_codesign_output
for line in codesign_output.split("\n"):
TypeError: a bytes-like object is required, not 'str'

I'm new to bazel so maybe there's some obvious signing step I should have implicitly done, like configuring a wildcard provisioning profile or something.  So I hoped the bazel test ... step was unnecessary and proceeded.

Next I used the generate_xcodeproj.sh script to generate that Xcode project which went fine.  Opened that project in Xcode 10.1 and it was pointed at a scheme for a framework named "tensorflow-lite-experimental-swift-TensorFlowLite" with the device set to a connected iPad.  Tried to run the build but it failed:

ERROR: /Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/BUILD:17:1: Compiling Swift module TensorFlowLite failed (Exit 1): bazel_xcode_wrapper failed: error executing command
(cd /private/var/tmp/_bazel_jpangburn/820d999d6733d6499781c2d354fc5533/execroot/org_tensorflow &&
exec env -
APPLE_SDK_PLATFORM=iPhoneOS
APPLE_SDK_VERSION_OVERRIDE=12.1
XCODE_VERSION_OVERRIDE=10.1.0
bazel-out/host/bin/external/build_bazel_rules_swift/tools/wrappers/bazel_xcode_wrapper bazel-out/host/bin/external/build_bazel_rules_swift/tools/wrappers/swift_wrapper /usr/bin/xcrun swiftc '-Xwrapped-swift=-ephemeral-module-cache' @bazel-out/ios_arm64-dbg/bin/tensorflow/lite/experimental/swift/TensorFlowLite.swiftmodule-0.params @bazel-out/ios_arm64-dbg/bin/tensorflow/lite/experimental/swift/TensorFlowLite.swiftmodule-1.params)
Execution platform: @bazel_tools//platforms:host_platform
/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:59:69: error: value of optional type 'CVaListPointer?' must be unwrapped to a value of type 'CVaListPointer'
let message = String(cFormat: cFormat, arguments: arguments)

So I edited the Interpreter.swift file and commented out lines 54-67 because the problem was occurring inside a section about error logging (nice to have of course, but I assumed not critical) and I am pretty new to Swift so I didn't know the right way to fix this.  The build completed, successfully it appears as it says it produced this library file:

Copying libTensorFlowLite.a to /Users/jpangburn/Library/Developer/Xcode/DerivedData/TensorFlowLite-adluxtrdxpqerubkxpcnjtavgswx/Build/Products/Debug-iphoneos/libtensorflow-lite-experimental-swift-TensorFlowLite.a

In the root of my tensorflow directory, I now see symlinks to TensorFlowLiteObjC.podspec and TensorFlowLiteSwift.podspec.  I'm not sure what a CPDC repo is (Googled, no luck) but I'm guessing it's something like a CocoaPods private repo.  I guess the point is for the Podfile to find the Swift podspec and for the Swift podspec to then find the C podspec, so I added the following to a Podfile I made for a test Xcode project:

pod 'TensorFlowLiteC', :path => '/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/c/'
pod 'TensorFlowLiteSwift', :path => '/Users/jpangburn/Documents/tensorflowlite/tensorflow/'

Then I did a pod install --repo-update and it generated an Xcode workspace file.

Opening that workspace file after restarting Xcode, the build fails and says:

no such module 'TensorFlowLiteC'

It appears the Swift code can't import that module.  So my workaround for not knowing what CPDC is and instead doing the above thing in the Podfile didn't really work- just allowed it to make that workspace file but not for it to really work.  Being new to CocoaPods I'm guessing here but figured the vendored_frameworks line in the TensorFlowLiteC.podspec file needs to actually point at the framework.  So copied TensorFlowLiteC.podspec to the root tensorflow directory and copied the framework file there too and changed that line to:

s.vendored_frameworks = 'TensorFlowLiteC.framework'

Changing the Podfile to point the TensorFlowLiteC path also to the root tensorflow directory, this time when I generated the workspace the TensorFlowLiteC pod actually showed the framework inside it.  But when I tried to run the project I got:

:1:9: note: in file included from :1:
#import "Headers/TensorFlowLiteC.h"
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:9: note: in file included from /Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:
#import "c_api.h"
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/c_api.h:24:10: error: 'tensorflow/lite/context.h' file not found
#include "tensorflow/lite/context.h"
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:16:8: error: could not build Objective-C module 'TensorFlowLiteC'
import TensorFlowLiteC
^

So I guess that framework that got built doesn't include the necessary .h files?  Tried to work around this by adding a -I flag in the xcconfig file for the TensorFlowLiteSwift pod, but then the error changes to:

/Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:9: note: in file included from /Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:
#import "c_api.h"
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.framework/Headers/c_api.h:24:10: error: include of non-modular header inside framework module 'TensorFlowLiteC.c_api': '/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/context.h'

Seems to be that it doesn't like having stuff in the framework include headers that are outside the framework.  So I'm guessing the framework isn't built correctly and it needs to include that context.h header and whatever other headers are chained from there.
Stopping for right now on this, hope the above comments are useful.  At least the early problems like the "bazel test" problem and the "CVaListPointer" problem.  Thanks again for your help!

You will only need Bazel to generate the TensorFlowLiteC.framework, which will produce a zip file. Once you have the zip file, you can unzip it in the root TensorFlow directory that contains the TensorFlowLiteC.podspec (assuming you moved the podspec there, I can update the configure script to do this automatically in the future).
In the root directory move the TensorFlowLiteC.framework inside a Frameworks sub-directory, so the podspec can find the framework, i.e. link.
This line will need to be updated to point to your local TF git repo that contains the TensorFlowLiteC.podspec and the TensorFlowLiteC.framework. Update to the following:
`s.source = { :git => '/Users/path/to/local/tensorflow/.git' }
Regarding local CPDC, you are correct, was referring to a local repo, for example:
cd ~/.cocoapods/repos
pod repo add <local_repo_name> /Users/path/to/local/tensorflow
At this point, you should be able to push the TensorFlowLiteC.podspec to your local CocoaPods repo, for example:
pod repo push <local_repo_name> Users/path/to/local/tensorflow/TensorFlowLiteC.podspec
In your Podfile, you will need the following:
`source '/Users//.cocoapods/repos/<local_repo_name>'
Point your Podfile to the TensorFlowLiteSwift or TensorFlowLiteObjC podspecs:
pod 'TensorFlowLiteSwift', :path => '/Users/path/to/local/tensorflow'
or
pod 'TensorFlowLiteObjC', :path => '/Users/path/to/local/tensorflow'
Hopefully these steps will help, but please let me know if you still are running into build issues. Really appreciate you trying this out!

OK, here are the steps I took and results.

Moved TensorFlowLiteC.framework into a new Frameworks directory in the root of my tensorflow (same level as the .git directory).  Reverted the TensorFlowLiteC.podspec's s.vendored_frameworks to 'Frameworks/TensorFlowLiteC.framework', and updated the s.source as directed above with my own path.

Did cd ~/.cocoapods/repos and pod repo add localtfrepo /Users/jpangburn/Documents/tensorflowlite/tensorflow.  Then pod repo push localtfrepo /Users/jpangburn/Documents/tensorflowlite/tensorflow/TensorFlowLiteC.podspec failed saying:

ERROR | [iOS] file patterns: The vendored_frameworks pattern did not match any file.

Double checked spelling then tried pod lib lint TensorFlowLiteC.podspec and it doesn't have the error, just a warning that "Git sources should specify a tag".

Tried committing the Frameworks/TensorFlowLiteC.framework's child files to my local tensorflow git repository then running the pod repo push ... command again.  It copied those framework files to the local repo and created the podspec file there too, then gave an error about pushing to "origin master".  I assume this error is fine since all I care about is having the files in the local repo.

Updated my Podfile to set source at the top level (same level as platform) to "source '/Users/jpangburn/.cocoapods/repos/localtfrepo'" which is the name of my local repo.  Removed the "pod 'TensorFlowLiteC' ..." line since it should be found in the local repo now.  Left the other line as:

pod 'TensorFlowLiteSwift', :path => '/Users/jpangburn/Documents/tensorflowlite/tensorflow/'

Executed pod install --repo-update (cleaned out old files first) and it was successful.  Strangely, it cloned my local repo while it did this:

$ pod install --repo-update
Updating local specs repositories
Cloning spec repo /users/jpangburn/.cocoapods/repos/localtfrepo-1 from /Users/jpangburn/.cocoapods/repos/localtfrepo

Tried the build again, but unfortunately it's the same result:

:1:9: note: in file included from :1:
#import "Headers/TensorFlowLiteC.h"
^
/Users/jpangburn/Documents/Xcode_projects/TestWorkspace/TFLiteSwiftCocoaPodTestApp/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:9: note: in file included from /Users/jpangburn/Documents/Xcode_projects/TestWorkspace/TFLiteSwiftCocoaPodTestApp/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/Headers/TensorFlowLiteC.h:1:
#import "c_api.h"
^
/Users/jpangburn/Documents/Xcode_projects/TestWorkspace/TFLiteSwiftCocoaPodTestApp/Pods/TensorFlowLiteC/Frameworks/TensorFlowLiteC.framework/Headers/c_api.h:24:10: error: 'tensorflow/lite/context.h' file not found
#include "tensorflow/lite/context.h"
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:16:8: error: could not build Objective-C module 'TensorFlowLiteC'
import TensorFlowLiteC
^

The only difference now from before is that under the "Development Pods" group in the Xcode Pods project- the TensorFlowLiteC pod has moved out of there and into the "Pods" group.  The "TensorFlowLiteSwift" pod remains in the "Development Pods" group.  Ultimately, the problem seems the same because the TensorFlowLiteSwift pod's Interpreter.swift imports the TensorFlowLiteC module which causes the compiler to import the TensorFlowLiteC.h file in the TensorFlowLiteC.framework, which imports c_api.h which imports the "tensorflow/lite/context.h" which is not visible to the compiler.  I was hoping this line in the Podfile that you mentioned was going to cause that to be set properly "source '/Users/jpangburn/.cocoapods/repos/localtfrepo'" but it didn't seem to matter.  I also tried moving that line under the target in the Podfile but no change.  I assume if I change the compiler flags to look at my tensorflow directory for includes that I'll just get the "non-modular header" import problem again.  Last time, I tried the setting to allow non-modular headers in both the Pods and my app build settings, but it made no difference.
I'm happy to try some more, or wait for the pod so as not to take up more of your time.  For me, this project will save me having to make ObjC bridge files and map data to unsafe pointers to feed data to my model.  So it's worth playing with :-)  Thanks again for your time!

I was able to repro the issue you are running into for a Swift project. Doesn't appear to be an issue with an Objective-C project. The TensorFlowLiteC framework needs to be updated a bit to make it modular. Right now, the framework depends on tensorflow/lite/context.h and tensorflow/lite/c/c_api_internal.h that are not located in the tensorflow/lite/experimental/c directory. We can configure this when we generate the TensorFlowLiteC.framework for the public TensorFlowLiteC CocoaPod, but it's a bit of a pain when developing locally. Working on a fix for that.
In the meantime, you can do the following to get this working locally:

Update the ios_static_framework target, then regenerate the framework:
ios_static_framework(
name = "TensorFlowLiteC_framework",
hdrs = [
"c_api.h",
"//tensorflow/lite:context.h",
"//tensorflow/lite/c:c_api_internal.h",
],
bundle_name = "TensorFlowLiteC",
minimum_os_version = "9.0",
version = ":TensorFlowLiteC_version",
deps = [":c_api"],
)

When you get to the stage where you are ready to build the Swift project, you will still hit compiler errors with not being able to find the context.h and c_api_internal.h headers. You just need to strip the the tensorflow/lite and tensorflow/lite/c paths from those includes and it should build. Reason is that the TensorFlowLiteC.framework adds its public headers to the TensorFlowLiteC.framework/Headers directory and doesn't maintain the TF directory structure.

Please let me know if you still run into any issues.

That worked on the simulator, thanks a lot!  After it built successfully I was able to init an Interpreter object using an absolute path to a tflite model file, and called .allocateTensors() and .invoke() on it with no errors.  So it was able to process my model (with whatever default values were inside the tensors after the allocation).  For me, this is enough for now as I have plenty to do learning this API and the rest of the project to use it from.
That said, you might want to take a look at the following items as you make the public version:

Doesn't compile for real device.  Commenting Interpreter.swift lines 54-67 resolved that.
Doesn't link for real device.  I got the following build error:

ld: '/Users/jpangburn/Documents/tensorflowlite/tensorflow/Frameworks/TensorFlowLiteC.framework/TensorFlowLiteC(c_api.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

On the simulator, I can init the Interpreter with a model on an absolute path, but having trouble with a relative path.  Probably my mistake, but I added my model file to the "build phases" "copy bundle resources" and I see the model.tflite file at the top of the generated .app.  I've tried "model.tflite", "./model.tflite", and "TFLiteSwiftCocoaPodTestApp/model.tflite" and it always says "Could not open ...".

Again, thanks for your help, very excited to play with this!  Don't worry about these last items on my behalf unless you want to :-) If you do, I'll gladly test it.  But I imagine for me and anyone else following along at this point, we'll have our hands full on the simulator- unless someone is using a camera to gather data I guess, which I'm not.

That's great to hear! Regarding not compiling/linking on a real device, we will definitely look into that before pushing the pod public. Appreciate the feedback.
For loading the model via a relative path, can you provide the code you are using?

Also, for "Doesn't compile for real device. Commenting Interpreter.swift lines 54-67 resolved that.", is that only when Bitcode is enabled for your app? If you disable Bitcode (temporarily), does the app build successfully on a real device?
If that's a separate issue, can you provide the compiler error that you see prior to commenting out lines 54-67?
Thank you!

Yes, disabling Bitcode allowed the app to build/run on a real device.
The compiler error prior to commenting out 54-67 is that CVaListPointer error:

/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:59:69: error: value of optional type 'CVaListPointer?' must be unwrapped to a value of type 'CVaListPointer'
let message = String(cFormat: cFormat, arguments: arguments)
^
/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:59:69: note: coalesce using '??' to provide a default when the optional value contains 'nil'
let message = String(cFormat: cFormat, arguments: arguments)
^
?? <#default value#>
/Users/jpangburn/Documents/tensorflowlite/tensorflow/tensorflow/lite/experimental/swift/Sources/Interpreter.swift:59:69: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
let message = String(cFormat: cFormat, arguments: arguments)
^
!

For loading the model, here's the code I use that works- for now just changed the viewDidLoad in the ViewController for a default Single Page iOS app)
override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    do {
        let interpreter : Interpreter = try Interpreter(modelPath: "/Users/jpangburn/Documents/Xcode_projects/TestWorkspace/TFLiteSwiftCocoaPodTestApp/TFLiteSwiftCocoaPodTestApp/vggish_converted.tflite")
        try interpreter.allocateTensors()
        try interpreter.invoke()
    } catch {
        print("caught exception initing model")
        return
    }
    print("completed viewDidLoad")
}

The actual model name is "vggish_converted.tflite".  Changing it to those relative paths doesn't work, and the debugger won't go down into the C code to see why (.e.g the path is relative from somewhere else).

For the Bitcode issue, mind regenerating the framework with the following (see Bazel CROSSTOOL change to support Bitcode):
bazel build tensorflow/lite/experimental/c:TensorFlowLiteC_framework -c fastbuild --ios_multi_cpus=x86_64,armv7,arm64 --apple_bitcode=embedded
For the compiler error for CVaListPointer? type, can you replace the call to the ErrorReporter with the following (appears to be a Swift compiler bug):
TFL_InterpreterOptionsSetErrorReporter(
  cOptions,
  { (_, format, args) -> Void in
    let optionalArgs: CVaListPointer? = args
    guard let cFormat = format,
          let arguments = optionalArgs,
          let message = String(cFormat: cFormat, arguments: arguments)
    else {
      return
    }
    print(String(describing: InterpreterError.tensorFlowLiteError(message)))
  },
  nil
)

We will push these updates shortly. For the relative path to model issue, still looking into this.

The compiler error fix to CVaListPointer? worked great!
The Bitcode issue was not resolved on my machine.  I took the following steps:

deleted tensorflow/Frameworks/TensorFlowLiteC.framework
bazel clean
Cut'n'paste your updated bazel command, it completed with no errors
copied the new TensorFlowLiteC.framework to tensorflow/Frameworks/TensorFlowLiteC.framework
edited the c_api.h and context.h to fix those include paths
clean and build the project in Xcode

Got the same linker error but the compiler error was gone (as mentioned above).  Disabled Bitcode on the project to verify the app still starts up and it does.  I see that change is relatively new, so I checked my bazel version and it's 0.23.2 which appears to be released nearly a month after that commit and I checked bazel help build | grep apple and I see the apple_bitcode flag with embedded option so I don't see any issue there.  Not sure what else to try for that?

Can you try also passing --copt=-fembed-bitcode?
bazel build tensorflow/lite/experimental/c:TensorFlowLiteC_framework -c fastbuild --ios_multi_cpus=x86_64,armv7,arm64 --apple_bitcode=embedded --copt=-fembed-bitcode

Looks like that worked!  Bitcode is enabled on my project and it compiled and executed on a real device.  I checked to make sure it didn't break the simulator and it works fine there too.
So the relative path thing is all you have left to figure out before you publish the pod?  Or maybe you have a laundry list :-)  Either way, pretty exciting stuff.

That's good to hear that everything is working now! Thanks again for your all your help with testing out the pipeline!
Regarding loading a mode file, are you trying to load the file from the main bundle or a custom bundle? Did you try something like this:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/experimental/swift/TestApps/TensorFlowLiteApp/TensorFlowLiteApp/ViewController.swift#L95

Yeah, sorry my prior iOS work was with Cordova, I'm just starting out on Swift.  I know nothing of bundles, and figured I could just use a relative path.  I had been playing with this example SpeechCommands and mistakenly thought it was a simple relative path to the model file.  After your comment I dug into it and it also uses this bundle thing.  Looks straightforward to use.  Sorry for the ignorant mistake!
BTW, I checked the tensor sizes reported with this Swift API vs what that example was writing into unsafe pointers and they match up perfectly.  So I don't see any obvious issues left.  You're welcome for the help testing, looking forward to making apps with the cocoapods for this- so easy!

No problem at all! Please feel free to open up a new issue if you run into any new problems.
Hoping to push the new CocoaPods public over the next week or two.

The switches on that last bazel command that allow bitcode to work on the framework compilation are horrible for performance from my initial tests- you may want to investigate this a bit before pushing those CocoaPods.  I converted the SpeechCommands sample that I linked above to use this Swift API and tested the latency to run the interpreter.invoke() on the model from that sample with this code:
    dateBefore = Date()
    try interpreter.invoke()
    dateAfter = Date().timeIntervalSince(dateBefore) * 1000.0

Using the framework compiled with bitcode support on a real device it took ~1200 ms vs ~72 ms without the bitcode support.  On a simulator it was ~400 ms with bitcode support vs ~11 ms without.  These are all debug builds running from Xcode.

Are you running in Release or Debug mode when targeting a real iOS device? Also, the command to generate the framework is using -c fastbuild rather than -c opt, which may affect performance as well. We need to wait for Bazel 0.24 to be able to use -c opt and bitcode.

I was running in Debug mode for both.  I edited my scheme to use Release mode for running, cleaned and rebuilt, and the performance is about the same.  I'll open a new issue, thanks!

@temrich is there a rough estimate of when we might see a publicly available TensorFlowLiteSwift pod made available?

Hoping to push them to public CPDC this week. Will post here once they have been pushed.

The TensorFlowLiteSwift and TensorFlowLiteObjC pods are now available!
Please note that these libraries are still under "experimental," so the APIs may change.
Known issue: installing the ObjC or Swift pod into your project for the first time may take a bit longer than normal as CocoaPods has to clone the entire TensorFlow git repo so that it can grab the source_files that are defined in each podspec.
If you run into any other issues or would like to provide general feedback, please use the comp:lite label.
Thank you!

Congrats :-) I tested the publicly available TensorFlowLiteSwift pod just now with the SpeechCommands example project that I converted to Swift and it worked great.  Looks like you got that bitcode performance problem resolved too!  Runs at the same speed now whether or not bitcode is enabled.

@jpangburn thank you for testing and verifying!


Create {Alexbug1987#4637}{Flow Non-Fungible Token (NFT) Standard}{1…

…2-12-2023}.cdc

Invalid Cadence Code: no contract / transaction / scripts.


get possible queryBuilder columns

With objection 2.2.0, I would like to find all possible orderBy fields of a given querybuilder, before it is executed. Maybe that's also relevant for objection-find, in order to prevent leaking db details?
I thought about collecting the related model columns (see below). But actually, I would like to get the selects (aliases) of the built query. What would be the best way for that?
const peopleQuery = Person.query()
  .withGraphJoined('children.[pets, movies]');

const modelClasses = [];
peopleQuery._operations.filter(({ name }) => name === 'eager')
.forEach(({ expression }) =>
  expression.forEachChildExpression(this.modelClass(), function recursiveTableName(childExpr, relation) {
    modelClasses.push(relation.relatedModelClass);
    childExpr.forEachChildExpression(relation.relatedModelClass, recursiveTableName);
  })
);
// fetchTableMetadata to get possible columns, if needed...

There's no way to do that using the public API. _operations is a private field that shouldn't be accessed.

I understand that it gets very complicated with general alias, aggregates, froms and so on.
For regular simple queries, it would be helpful to expose for example RelationJoiner.getSelectionsForNode() with corresponding tableTree.
These aliases could be used to validate a users sorts or filters before hitting the db

Exposing such API wouldn't be a good idea. It would only work on some special cases and would be a constant source of issues and bugs


[JsonApiSerializer] Relationship metadata and pagination (for many-to-many)

From the JSON API documentation:

A “relationship object” MUST contain at least one of the following:

links: a links object containing at least one of the following:

self: a link for the relationship itself (a “relationship link”). This link allows the client to directly manipulate the relationship. For example, removing an author through an article’s relationship URL would disconnect the person from the article without deleting the people resource itself. When fetched successfully, this link returns the linkage for the related resources as its primary data. (See Fetching Relationships.)
related: a related resource link

data: resource linkage
meta: a meta object that contains non-standard meta-information about the relationship.

A relationship object that represents a to-many relationship MAY also contain pagination links under the links member, as described below.

It seems meta information like pagination is lost when side-loading resources in a many-to-many relationship. It works correctly in a one-to-many relationship though. According to the spec, it should be possible to serialize this information, although the documentation is vague on how to paginate included resources in a many-to-many-relationship. Custom meta values should not be a problem.
My use case is that I have a list of contractors, and each of them have projects. When I list contractors, I also want to fetch (side load) a small sample of projects (one page), and display how many more there are (the "total" key from the pagination metadata).
GET /contractors?include=projects&fields[projects]=name,cost,image

I didnot get meta in one to many relationship as well.Is this issue ??


Do not ignore --features when --all-features is present

This allows to specify dependency features when using --all-features, for example:
$ cargo run --example example --all-features --features="tracing/log"

You can test this in this repository: https://github.com/WaffleLapkin/cargo_all_some_features, it contains an example with required-features = [..., "tracing/log"] that is impossible to run with --all-features without this patch.
An attempt to fix #10333

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon.
Please see the contribution instructions for more information.

CI seems to fail due to changes in cli help formatting, but I didn't change anything there 🤔

for fixing broken tests on CI, rebase to master 😄
ref: https://github.com/rust-lang/cargo/pull/10336

@weihanglo thanks!

@alexcrichton I've added a test

@bors: r+
Thanks!

:pushpin: Commit b7e5186701c02262cea0d8f27cb2c5b65c1698ed has been approved by alexcrichton

:hourglass: Testing commit b7e5186701c02262cea0d8f27cb2c5b65c1698ed with merge bb3d4e1c3ed75f32057d2e858f042f9fa00da94d...

:broken_heart: Test failed - checks-actions

@bors: retry

:hourglass: Testing commit b7e5186701c02262cea0d8f27cb2c5b65c1698ed with merge ea259a07f5afc04daedc3833e736a2b4a29b707e...

:sunny: Test successful - checks-actions
Approved by: alexcrichton
Pushing ea259a07f5afc04daedc3833e736a2b4a29b707e to master...


test: allow for easier mocking of requests

The way http.request is currently being included makes it a huge pain to mock the api requests with something like nock, since the request function cannot be stubbed the way it's being included.
This PR changes the way .request is being included, to allow for easier mocking.
I am using this change locally with nock to test some upcoming module additions to libp2p.

For reference, testing in libp2p, here is a failed build of me using nock without this change https://ci.ipfs.team/blue/organizations/jenkins/libp2p%2Fjs-libp2p/detail/feat%2Fpeer-content-routing/3/pipeline
And an all green build of this branch using package.json resolutions for yarn: https://ci.ipfs.team/blue/organizations/jenkins/libp2p%2Fjs-libp2p/detail/feat%2Fpeer-content-routing/4/pipeline


DB-2993: export used direct memory

I redirected the JVM NIO direct buffer allocations to PlatformDependent so long as these buffers were  cleaned via PlatformDependent.
I've also  changed PlatformDependent to measure allocated memory even when using the JVM NIO direct allocations. I then exported the memory allocated with PlatformDependent.usedDirectMemory(). The idea is to read this value in our own native memory metrics.
@sbtourist or @tjake would you be able to review?
cc @snazy

Any reason not to do this on main netty repo?

Any reason not to do this on main netty repo?

The patch adds JVM allocations to DIRECT_MEMORY_COUNTER, therefore changing its semantic functionality. I'm not so sure they'll accept this change in 4.1. Also, I wanted to merge DB-2993 relatively quickly. We can merge it without the metric if needed, I just thought it would be useful information to have.

Thanks for the review. I've renamed the allocate and free methods and bumped the version.


Add files via upload

@behnam1394 I am sorry, the domain uregina.ca is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).