Allow setting breakpoints in plan optimizers

I'm not sure I understand the need for this. Whenever I need to set breakpoints in the optimizer, I do it in the LogicalPlanner loop or inside IterativeOptimizer. I also don't like the extra complexity from the new abstractions (CompositePlanOptimizer, PlanOptimizers implementing the PlanOptimizer interface, the optimizer builders, etc)

Use case is that during my work on https://github.com/prestosql/presto/pull/3228 I'd set breakpoints in PredicatePushDown.
Then I would consult stacktrace to check which instance of PPD I am currently in, which optimization "phase" it is.

I have another change in a branch that I've been using for this. Basically, every optimizer gets a name. I've also been working on some ideas to expose the optimization process as part a new EXPLAIN type and as trace events when that change goes in, so being able to name them is important.

Does the naming answer "which instance of PPD I am currently in, which optimization "phase" it is" question?
BTW  this change is very mechanical besides PlanOptimizers. I don't think it's complex.

Does the naming answer "which instance of PPD I am currently in, which optimization "phase" it is" question?

Yes, because each optimizer would be instantiated with a different name.

BTW this change is very mechanical besides PlanOptimizers. I don't think it's complex.

The change is not complex, but it introduces additional complexity and abstractions that I'm not sure are necessary.

note: additional advantage of this change is that under a debugger one can rearrange optimizers without restarting the server.

Yet another advantage is that for cases like below, the stacktrace would indicate which optimizer group is looping.
java.lang.RuntimeException: The optimizer exhausted the time limit of 180000 ms
	at io.prestosql.testing.AbstractTestingPrestoClient.execute(AbstractTestingPrestoClient.java:114)
	at io.prestosql.testing.DistributedQueryRunner.execute(DistributedQueryRunner.java:443)
	at io.prestosql.testing.AbstractTestQueryFramework.computeActual(AbstractTestQueryFramework.java:110)
	at io.prestosql.testing.AbstractTestQueryFramework.computeActual(AbstractTestQueryFramework.java:105)
	at io.prestosql.testing.AbstractTestIntegrationSmokeTest.assertExplainAnalyze(AbstractTestIntegrationSmokeTest.java:213)
	at io.prestosql.testing.AbstractTestIntegrationSmokeTest.testExplainAnalyze(AbstractTestIntegrationSmokeTest.java:187)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.prestosql.spi.PrestoException: The optimizer exhausted the time limit of 180000 ms
	at io.prestosql.sql.planner.iterative.IterativeOptimizer$Context.checkTimeoutNotExhausted(IterativeOptimizer.java:291)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreNode(IterativeOptimizer.java:129)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreGroup(IterativeOptimizer.java:105)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreChildren(IterativeOptimizer.java:190)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreGroup(IterativeOptimizer.java:107)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreChildren(IterativeOptimizer.java:190)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreGroup(IterativeOptimizer.java:107)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreChildren(IterativeOptimizer.java:190)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.exploreGroup(IterativeOptimizer.java:107)
	at io.prestosql.sql.planner.iterative.IterativeOptimizer.optimize(IterativeOptimizer.java:96)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:198)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:187)
	at io.prestosql.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:182)
	at io.prestosql.execution.SqlQueryExecution.doPlanQuery(SqlQueryExecution.java:393)
	at io.prestosql.execution.SqlQueryExecution.planQuery(SqlQueryExecution.java:381)
	at io.prestosql.execution.SqlQueryExecution.start(SqlQueryExecution.java:336)
	at io.prestosql.execution.SqlQueryManager.createQuery(SqlQueryManager.java:237)
	at io.prestosql.dispatcher.LocalDispatchQuery.lambda$startExecution$7(LocalDispatchQuery.java:132)
	at io.prestosql.$gen.Presto_333_21_g41642c9__testversion____20200507_193547_622.run(Unknown Source)
	... 3 more


Invalid lock icon char

Fixes #1167
It seems the wrong unicode char was being used.
Now it looks like this

Thank you for the fix!


Allocate things per KestrelThread instead of per listener

Moved things that have loop affinity to KestrelThread like
WriteReqPool, MemoryPool and the ConnectionManager
Changed on the listeners to only kill the ListenSocket, not the
connections on dispose
Moved connection disposal to KestrelThread.Stop
Simplify the connection manager logic so it's possible to walk and
wait in a single call

Opened a new PR /cc @halter73 @cesarbs

What's the difference to the previous PR?

I had to rebase since it was based on top of my other pr. I also added the a new type WriteReqPool and used the timeout passed into stop for waiting on connections to close.

🆙 📅

fail: Block being garbage collected instead of returned to pool
fail:    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
fail:    at System.Environment.get_StackTrace()
fail:    at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage)
fail:    at System.Diagnostics.Debug.Assert(Boolean condition, String message)
fail:    at Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure.MemoryPoolBlock.Finalize() in

errrr

🆙 📅

Ping @cesarbs @halter73

LGTM.


Update Swagger Authentication

User Story

As the Swagger documentation page, I need to provide users a simple way to authenticate so the API calls will actually work on staging and production.
Description/Use Case

Presently, the API programmers guide covers TWO ways authentication can happen:

Method 1: Token-based authentication with a public/private key pair (Note: This method is the recommended best practice.)
Method 2: Shared secret API key (This is the Azure Function authentication scheme where you can generate a static API KEY in azure for a specific azure function and use that to authenticate. This is less secure than Method1 and is not encouraged)

The Swagger page has an "authorize" button. When the user clicks this, they should be able to at least use the second part of Method 1 to authenticate. Then, when they execute an endpoint in Swagger, the bearer token they entered will be sent in the header. Note, it would be nice to be able to do part one of Method 1 as well, requesting the token that is used in part 2 of Method 1, but they can separately use the swagger page for the api/token endpoint to do that part if needed. So, this means the user flow could potentially be:

User navigates to the /api/token swagger page and executes endpoint to get bearer token
User navigates to the swagger page containing the endpoint they want to use
User clicks "authorize" and enters the bearer token returned in step 1
User executes the desired endpoint and the bearer token is sent in the header

The downsides of this is that its kind of cumbersome on the user since the token will expire (every 5 min?). It would be really nice if the /api/token call was able to be configured in the same "authorize" window and can happen automatically. This seems to be how the default swagger Okta auth0 works?
Risks/Impacts/Considerations

Should be as user friendly as possible

This should also be tested locally. By default, the auth step will get skipped on a local env if no key is provided. If you provide the key in the header, the auth step WILL run. See flow below for more detail:

AuthenticateClaims.authenticate gets called at the top of the azure function
getAccessToken gets called at the top of AuthenticateClaims.authenticate
isLocal gets called right after getAccessToken and if the returned value of getAccessToken is not null auth will be executed. See isLocal for more details.

Dev Notes

Acceptance Criteria

[ ] User auth flow for Swagger designed and implemented (but should be documented in swagger doc)
[ ] "Authorize" button works with server-server auth and tested locally (on the api keys page)
[ ] Optionally, "Authorize" button works with x-functions key (on the api keys page)

Prerequisites:
hosting RS API docs swagger UI on RS server
#9302

Hey team! Please add your planning poker estimate with Zenhub @arnejduranovic @jack-h-wang @JessicaWNava @JFU-NAVA-PBC @luis-pabon-tf @mkalish @thetaurean

Quote some setup and okta provisioning steps here for convenience:
`This PR:
Enabled Authorization on API Docs swagger UI, the supported authorizations:
OAUTH2
Server2Server
Azure API Key
Test Steps:

Checkout the PR to local machine and start report stream server as per README
At the completion of the RS server start up, the swagger UI of API docs should be provisioned
Go to Azure Storage Explorer and copy the URL of swaggerUI index.html, on local setup, it is:
http://<IP_ADDRESS>:10000/devstoreaccount1/apidocs/index.html
Paste it into a browser, and you will see:
On top of the page: there is external Docs link - currently I put Report Stream API Programmer's Guide link there ( can also use the new UP documents "Swagger UI" mark down as the entry point )
Click "Authorize" button to bring up authorization panel where the following auth methods are available:
"primeSecurityServerToServer  (http, Bearer)" Method 1 - the process of obtaining the token using primeCLI commands or the python sample program remain as the recommended practice: just keep the legacy process since it worked well and mostly is only used by internal developers
"primeSecurityAPIKey (apiKey)" Method 2 - Only available on Azure
"primeSecurityOAUTH (OAuth2, authorizationCode)" - associated with OKTA Staging (hhs-prime.oktapreview.com)
For OAUTH2 to work, the swagger UI needs to be in a browser started with CORS disabled
e.g on Mac, start chrome as below:
open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security
Note, this PR mostly deal with swagger UI API Docs on a local setup, on PROD and LLEs, there is a ticket #10621

On auth server side add the redirect url to the redirect URI list.
For local dev test:
http://<IP_ADDRESS>:10000/devstoreaccount1/apidocs/oauth2-redirect.html
Changes

Added swagger annotations to enable authorizations supported: server 2 server, azure API key

Checklist
Testing

[X] Tested locally?
[ ] Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
[ ] (For Changes to /frontend-react/...) Ran npm run lint:write?
[X] Added tests: manual tests: see the setup notes above, after Okta login close the swagger UI auth dialogue and call API  end points, e.g. GET public key for an org, to verify access token is checked, either turn on DEBUG logging and check the logging showing Oauth authentication passed, or put a break point at the authentication point in the end point:
e.g. AuthenticatedClaims.authenticate(request) <=== verify the header has "Authorization bearer: ....." with token value

`

FYI,
For reviewers:
the Okta app I used for testing: hhs-prime.oktapreview.com, simple_report (localdev)

How to test OAUTH2 authentication and authorization flow from swagger UI:
Steps:

OKTA side preparations:
Login into your OKTA account, and on your home dashboard, you will see apps who will participate in oauth2 authn & authz flow that are associated to you (your account), see screen shot:
3.Private Zenhub Image

NOTE:
If not doing OAUTH2 from a browser with CORS disabled, you will get 401 Error after OKTA login:
Auth ErrorError: response status is 401, error: invalid_client, description: Browser requests to the token endpoint must use Proof Key for Code Exchange.
See OKTA error message explanation link below:
https://support.okta.com/help/s/article/Browser-requests-to-the-token-endpoint-must-use-Proof-Key-for-Code-Exchange?language=en_US
Long story short: OKTA reject token exchange request from any non-server agent.


[question] Bypassing ServiceWorker for certain URL requests

Hi,
I have a web app that I'm serving from Azure. I have written a redirection rule where if any URL ends with a '/' route, it will be redirected to its non-slash counterpart so that the app doesn't serve same pages from different routes. If I don't use workbox, the redirection works as expected and I get my non-slash route when I request for its with-slash counterpart. But if I use workbox, the request goes through the SW and my redirection doesn't get reflected in the url and it serves both the slash and non-slash URLs. This affects SEO for my website. Is there a way to bypass the service worker for the with-slash requests so that it gets 301 redirection to its non-slash counterpart?
Thanks in advance.

Hi,
could you share some more infos how you use workbox? I could not confirm it. I testet it and requested /storage and got correctly redirected to /storage/. The workbox debug output is:
workbox Precaching found no match for /storage
workbox Precaching found no match for /storage/

Btw you can also use <link rel="canonical" href="/yourpage/" /> in case 2 urls serve the same content.

I'm using the SSG Gatsby and its plugin "gatsby-offline".
My workbox config:
{
        importWorkboxFrom: `local`,
        cacheId: `gatsby-plugin-offline`,
        globDirectory: 'public/en-ca',
        globPatterns: ['index.html'],
        // Don't cache-bust JS or CSS files, and anything in the static directory,
        // since these files have unique URLs and their contents will never change
        dontCacheBustUrlsMatching: /(\.js$|\.css$|\/static\/)/,
        runtimeCaching: [
          {
            // Use cacheFirst since these don't need to be revalidated (same RegExp
            // and same reason as above)
            urlPattern: /(\.js$|\.css$|\/static\/)/,
            handler: `cacheFirst`,
          },
          {
            urlPattern: /^https?:.*\/$/,
            handler: `networkOnly`,
          },
          {
            urlPattern: /^https?:.*[^/]$/,
            handler: `networkFirst`,
          },
          {
            // Add runtime caching of various other page resources
            urlPattern: /^https?:.*\.(png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/,
            handler: `staleWhileRevalidate`,
          },
          {
            // Google Fonts CSS (doesn't end in .css so we need to specify it)
            urlPattern: /^https?:\/\/fonts\.googleapis\.com\/css/,
            handler: `staleWhileRevalidate`,
          },
        ],
        skipWaiting: true,
        clientsClaim: true,
      },

I am already using canonical urls in my pages.
I have mentioned my redirection rule in web.config:
<rule name="Remove trailing slash" stopProcessing="true">
          <match url="(.*)/$" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="false" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="{R:1}" />
        </rule>

Can you tell me where I am going wrong with this?

 But based on the following answer https://stackoverflow.com/questions/27287982/remove-trailing-slash-from-the-url
your web.config should look like this:
<rewrite>
  <rules>

    <!--To always remove trailing slash from the URL-->
    <rule name="Remove trailing slash" stopProcessing="true">
      <match url="(.*)/$" />
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
      </conditions>
      <action type="Redirect" redirectType="Permanent" url="{R:1}" />
    </rule>

  </rules>
</rewrite>

Can you confirm the redirect is working? (In Firefox for example, you can bypass the service worker with CTRL + F5)

Ok, I'll take a look at this. Whenever I removed the plugin, my url redirections would work. I'll do a deeper analysis and see what's up. But in the meanwhile, if there's any way to bypass SW for certain requests, I'd love to have it.

But in the meanwhile, if there's any way to bypass SW for certain requests, I'd love to have it.

When a service worker is active, it intercepts all requests, and whatever routing logic you've applied will be run every time.

I'm going to close this issue, primarily since web crawlers will not visit your site while controlled by a service worker.
I don't think there's anything specifically more that we can do.


⚠ Samsung has degraded performance

In 6b42f86, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2673 ms

Resolved: Samsung performance has improved in a79ea60.


Bring ZCPU back onto mainline

I'm willing to maintain ZCPU for the foreseeable future and handle security issues. As ZCPU was removed due to people not being willing to maintain it I think this should allow for it to be brought back onto the mainline repo

whos gonna tell them

Bring back ZGPU with extension support then we’re talking

Changes look fine. I was pretty sure my changes before it was removed fixed the sanitization issues so as long as this has those changes, then it should be ok.

Once again want to say that efforts toward a new cpu chip would always be very much appreciated..
qmcpu was very close but author wasn't happy about the structure is making a new compiler I believe.

very well


Problem in bitmap test ?

https://github.com/NOAA-MDL/grib2io/blob/f1643e3a84bc8d740481fd72ccef9a440c64220a/src/grib2io/_grib2io.py#L922
Shouldn't this line check that bitmap attribute is None ?
The bitmap attribute may always exists as it is set to None in the post_init function
https://github.com/NOAA-MDL/grib2io/blob/f1643e3a84bc8d740481fd72ccef9a440c64220a/src/grib2io/_grib2io.py#L716

The fix remove the bitmap attribute assignment and delete it when flush is called if it has been assigned

Thanks for reporting.  It is the desire to always have bitmap attribute to exist.  It was an oversight to still use hasattr() for the bitmap.

The file has been changed since my first patch : now, the line to change is : https://github.com/NOAA-MDL/grib2io/blob/master/src/grib2io/_grib2io.py#L928 with a check to None of the bitmap attribute.


Fixing the Wasm blocker for Parser - try 2

Rust has a bug when compiling a project for Wasm (with --target wasm32-unknown-unknown flag), these changes are a workaround.
These changes are only supposed to fix the SWC Parser, not the whole SWC project. This is because I only need the Parser at the moment, also fixing the whole SWC Project would be a nightmare for me, a newbie in SWC. Maybe later.

bors r+

It's great enough. Note that parser is special in swc, as it should be usable from stable rust, and as an ecmascript parser. Some rust projects uses it already.

@kdy1 that's good to hear! I suspected that this should be the case, because the parser alone seems to be of incredible usefulness!

Can you run cargo fmt --all?

I think the rustfmt error is related to alphabetical sorting.

Yep, it was the case. Now fixed. Do you by any chance know, is there an easier way in such situations than creating a new pull request every time?

Pushing a new commit to the pr branch would update the pr.

Oh I think it will fail again because of CRLF thing...

@anurbol Thank you for the pr!! I merged it.

Great!!! Thanks for merging, Dong Yoon (I hope it's correct)!

It's correct :)

@kdy1 Lol, I now see https://github.com/swc-project/swc/pull/479/files#diff-b052edc95cbba2d88ad873bdb3551146 was the "culprit" :D (no blame intended)


Autorest Regen Preview to 3.0.0-alpha.20230926.5 by Dapeng Zhang from refs/pull/3775/merge

Triggered from https://github.com/Azure/autorest.csharp/pull/3775

API change check
API changes are not detected in this pull request.


Latest BE build 7z archive contains two seperate 'plugins' directories

General information
Project issue is for:
Modules
This breaks out-of-the-box support on case-sensitive filesystems.
How to reproduce

Open SPT-BLEEDINGMODS-3.8.0-29197-xxx.7z archive
Go to BepInEx directory
See two separate plugins directories

Screenshots

Attachments

grafik.png (4 KiB)

Originally written by MadByte

Where did you download this 7z from dev-core channel?

Originally written by Kaeno

Where did you download this 7z from dev-core channel?

correct 👍

Originally written by MadByte

this is what my zip looks like from Dev-core everything looks normal

Attachments

image.png (7 KiB)

Originally written by Kaeno

i would delete both existing plugins folder and reinstall.

Originally written by Kaeno

well that's weird. I re-downloaded the archive from dev-core just now, and checked on both Windows 11 (virtual machine) and Linux (Mint) - both do have two plugins directories on my end. Might be some weird edge case with the changed archive format..
I also believe that all directories in BepInEx are supposed to be lowercase by default - as it is for me on 3.7.6 stable files. But with the new version Patchers and Plugins begin with an uppercase letter as seen on your screenshot.

Originally written by MadByte

In build.ps1, dir names for Plugins and Patchers begin with a uppercase letter
In Release-Packager.csproj dir names begin with a lowercase letter.

That might be the issue here.

Attachments

bepinex_configmanager.png (11 KiB)

Originally written by MadByte


When using cloud SDK google.auth.default returns token that results in odd 403 message

Relevant portion of my script
scopes = ['https://www.googleapis.com/auth/analytics']
credentials, project = google.auth.default(scopes=scopes)
print(f'scopes: {credentials.scopes}')
session = AuthorizedSession(credentials)
url = 'https://analyticsreporting.googleapis.com/v4/reports:batchGet'
resp = session.post(url, json=body)
print(f'Response:\n{resp.json()}')

Case 1
I run gcloud auth application-default login --scopes=https://www.googleapis.com/auth/analytics on the terminal, then run the above script.
My script prints the following:
scopes: None
Response:
{'error': {'code': 403, 'message': 'Google Analytics Reporting API has not been used in project usable-auth-library before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com/overview?project=usable-auth-library then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.', 'status': 'PERMISSION_DENIED', 'details': [{'@type': 'type.googleapis.com/google.rpc.Help', 'links': [{'description': 'Google developers console API activation', 'url': 'https://console.developers.google.com/apis/api/analyticsreporting.googleapis.com/overview?project=usable-auth-library'}]}]}}

What's odd here is the 403 message "Google Analytics Reporting API has not been used in project usable-auth-library before or it is disabled" which is different from the message in case 2
Side note
When I use the token generated by the credentials from this case in the OAuth2 Playground I receive the same error message
Case 2
I run gcloud auth application-default login on the terminal
My script prints:
scopes: None
Response:
{'error': {'code': 403, 'message': 'Request had insufficient authentication scopes.', 'status': 'PERMISSION_DENIED'}}

Case 3
When I run this with GOOGLE_APPLICATION_CREDENTIALS set with service account credentials, and run my script, there is no error in the response and
scopes: ['https://www.googleapis.com/auth/analytics']
My questions

Is this expected behavior of google-auth?
If so, do you have any insights why the first and second cases would produce such different error messages?

This is due to the way that credentials are issued to the Google Cloud SDK. Running gcloud auth application-default login grants your user credentials (the principal is you) to the Cloud SDK project (the credentials project is the Cloud SDK).
When google-auth uses these credentials to access APIs, the API backend looks up the project that was issued these credentials to perform quota and billing (for resourceless APIs). In the case of Cloud SDK credentials, this project is the Cloud SDK's project, not your project. The Cloud SDK project does not have all APIs enabled and has limited quota that is shared across all Cloud SDK users.
Because of this, you should either use a service account or obtain user credentials using your own project (see here).

@jonparrott Thank you for the quick and thoughtful response!


Update iOS install instructions for new GoogleSignIn pod

@gvillenave I haven't tested this yet, but is this backward compatible or breaking?

No, there's no impact besides renaming the header. The previous Google pod is now deprecated.

@gvillenave
Just upgraded to the latest Google SignIn SDK for iOS. (npm version 1.0.16)
Please follow new instructions carefully.
https://github.com/joonhocho/react-native-google-sign-in#ios
Also refer to ExampleApp if something is not working. I've tested ExampleApp and is working fine.
Feel free to reopen this issue if you cannot get it working.


add data.json with basic information about me

Thank you for your contribution, but this is intentionally not a static generator (many such projects exist). This was to demonstrate the ability to use the browser as a WYSIWYG editor directly


Communication error

I'm seeing an occasional "Communication error" with 1.1.5. Unfortunately, i can't reproduce it when I want to using "ab".
Each php request involves a crdt/counter get and increment.  Retries is set to 1, connection pool size is 1. Riak backlog is set to 64 but according to our sysadmin, the load is really low (about 1 request per second).
Any suggestions to further diagnose?

It is expected to happen if the cluster is loaded, but at 1 req/s I can't imagine thats the issue.
What riak version are you running against?

1.4.12
Given the light load, could it be a problem with a stale connection?

Could be php_riak will reconnect if its keepalive timer has expired, but if the connection is stale or cut of by riak or a load balancer it will get communication error and then reconnect next time or right away if auto retry is on.


28 prototype expo secure store for key did

Switched from old branch referenced in https://github.com/roots-id/rootswallet/pull/28 to this PR.
closes #32

Note: the name is misleading.  it saves the DID by passphrase, not key.  will tackle the key in a new issue.

It may be interesting to explore secureOptions->requireAuthentication: https://docs.expo.dev/versions/latest/sdk/securestore/#securestoreoptions


use flask-profiler in wsgi production environment

Hi, for my flask application https://github.com/zimmerst/DmpWorkflow, i started using your brilliant profiler -- first off, thanks a lot for doing all the hard work for me. But I seem to be unable to use the flask profiler in the wsgi-production environment but only when i initialize the application by hand typing "python core/manage.py runserver"
For reference, here's the relevant code piece that includes the profiler:
from DmpWorkflow.config.defaults import cfg
import flask_profiler
from DmpWorkflow import version
from socket import getfqdn
kind = cfg.get("global", "installation")

if kind == 'server':
    from flask import Flask
    from flask.ext.mongoengine import MongoEngine
    app = Flask(__name__)
    app.config.update(LOGGER_NAME="core")
    app.config['MONGODB_DB'] = cfg.get("database", "name")
    app.config['MONGODB_USERNAME'] = cfg.get("database", "user")
    app.config['MONGODB_PASSWORD'] = cfg.get("database", "password")
    app.config['MONGODB_HOST'] = cfg.get("database", "host")
    app.config['MONGODB_PORT'] = int(cfg.get("database", "port"))
    # make connection numbers unbound
    app.config['MONGODB_MAXPOOLSIZE'] = None
    # time out after 100ms
    app.config['MONGODB_WAITQUEUETIMEOUTMS'] = 100
    app.config["DEBUG"] = True
    app.config["flask_profiler"] = {
        "enabled": app.config["DEBUG"],
        "storage": {
            "engine": "sqlite",
            "FILE": "/tmp/flask-profiler.sql"
        },
        "basicAuth":{
            "enabled": True,
            "username": "myuser",
            "password": "mypassword"
        }
    }

    db = MongoEngine(app)

    def register_blueprints(app):
        # Prevents circular imports
        from DmpWorkflow.core.views import jobs
        from DmpWorkflow.core.admin import admin
        app.register_blueprint(jobs)
        app.register_blueprint(admin)

        if app.config['flask_profiler']['enabled']: app.logger.info("started flask profiler")
    register_blueprints(app)
    flask_profiler.init_app(app)

    def main():
        app.logger.info("started DmpWorkflow Server Version: %s on %s",version,getfqdn())
        app.run()
else:
    def main():
        pass

if __name__ == '__main__':
    if kind == 'server':
        main()

and yes, when running the wsgi application, it runs fine, except that the profiler seems to be unable to handle multiple connections to the sql database:
[Thu Nov 17 09:49:24.257431 2016] [wsgi:error] [pid 21519] started flask profiler
[Thu Nov 17 09:49:24.257440 2016] [wsgi:error] [pid 21519] --------------------------------------------------------------------------------
[Thu Nov 17 09:49:48.635678 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512] mod_wsgi (pid=21519): Exception occurred processing WSGI script '/var/www/flask_dev/workflow.wsgi'.
[Thu Nov 17 09:49:48.635867 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512] Traceback (most recent call last):
[Thu Nov 17 09:49:48.635979 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
[Thu Nov 17 09:49:48.636587 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     return self.wsgi_app(environ, start_response)
[Thu Nov 17 09:49:48.636651 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
[Thu Nov 17 09:49:48.636709 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     response = self.make_response(self.handle_exception(e))
[Thu Nov 17 09:49:48.636737 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
[Thu Nov 17 09:49:48.636828 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     reraise(exc_type, exc_value, tb)
[Thu Nov 17 09:49:48.636844 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
[Thu Nov 17 09:49:48.636864 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     response = self.full_dispatch_request()
[Thu Nov 17 09:49:48.636878 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
[Thu Nov 17 09:49:48.636898 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     rv = self.handle_user_exception(e)
[Thu Nov 17 09:49:48.636913 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
[Thu Nov 17 09:49:48.636932 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     reraise(exc_type, exc_value, tb)
[Thu Nov 17 09:49:48.636965 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
[Thu Nov 17 09:49:48.636986 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     rv = self.dispatch_request()
[Thu Nov 17 09:49:48.637000 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
[Thu Nov 17 09:49:48.637018 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     return self.view_functions[rule.endpoint](**req.view_args)
[Thu Nov 17 09:49:48.637033 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask_profiler/flask_profiler.py", line 113, in wrapper
[Thu Nov 17 09:49:48.637121 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     return wrapped(*args, **kwargs)
[Thu Nov 17 09:49:48.637140 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask_profiler/flask_profiler.py", line 92, in wrapper
[Thu Nov 17 09:49:48.637162 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     collection.insert(measurement.__json__())
[Thu Nov 17 09:49:48.637176 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/flask_profiler/storage/sqlite.py", line 128, in insert
[Thu Nov 17 09:49:48.637288 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512]     name))
[Thu Nov 17 09:49:48.637321 2016] [wsgi:error] [pid 21519] [remote <IP_ADDRESS>:512] OperationalError: attempt to write a readonly database

is there a way to make sure that the profiler can access the db for my multiple instances of the wsgi app?
Thanks!

@zimmerst i had exact same issue and i have sorted it out to not using sqlite as DB for profiler in production and used mongo instead. You are already using mongo so it should be easy for you to switch

@zimmerst for your purpose, MongoDB or MySQL is a better choice as @VojtechBartos suggests. have you tried this yet?

Hi @muatik  & @VojtechBartos , thanks for the suggestions. My DB resides on a different host, so i have to convey all the information of mongodb to the profiler.
app.config["flask_profiler"] = {
        "enabled": app.config["DEBUG"],
        "storage": {
            "engine": "mongodb",
            "MONGO_URL": "mongodb://{user}:{password}@{host}:{port}".format(user=cfg.get("database","user"), password=cfg.get("database","password"),
                                                                            host=cfg.get("database","host"), port=cfg.get("database","port")),
            "DATABASE": cfg.get("database","name"),
            "COLLECTION_NAME": "profiler"
        },
        "basicAuth":{
            "enabled": True,
            "username": "admin",
            "password": "secret"
        }
    }

but although the URL looks okay, following: https://docs.mongodb.com/manual/reference/connection-string/
I get an authentication error.
[Sun Nov 20 17:46:15.270072 2016] [wsgi:error] [pid 14341] [remote <IP_ADDRESS>:512]   File "/opt/virtualenvs/DAMPE/lib/python2.7/site-packages/pymongo/helpers.py", line 196, in _check_command_response
[Sun Nov 20 17:46:15.270384 2016] [wsgi:error] [pid 14341] [remote <IP_ADDRESS>:512]     raise OperationFailure(msg % errmsg, code, response)
[Sun Nov 20 17:46:15.270427 2016] [wsgi:error] [pid 14341] [remote <IP_ADDRESS>:512] OperationFailure: auth fails

While i try to work around this, may i suggest to add additional keywords to the mongodb storage engine (i can contribute that if you think it's helpful) to make this kind of configuration easier for a user?
Thanks!
-Stephan

actually, after a bit of playing around, i got it to work with this configuration:
app.config["flask_profiler"] = {
        "enabled": app.config["DEBUG"],
        "storage": {
            "engine": "mongodb",
            "MONGO_URL": "mongodb://{user}:{password}@{host}:{port}/{db}".format(user=cfg.get("database","user"), password=cfg.get("database","password"),
                                                                                host=cfg.get("database","host"), port=cfg.get("database","port"), db=cfg.get("database","name")),
            "DATABASE": cfg.get("database","name"),
            "COLLECTION_NAME": "profiler"
        },
        "basicAuth":{
            "enabled": True,
           ...
        }
    }

what i would suggest is to create the MONGO_URL based on keywords, though if you think this is clear enough, maybe it's sufficient to just add the relevant MONGO_URL example line to your documentation.


The vertical scroll is displayed after clicking the "TX" item

Description
The vertical scroll is displayed after clicking the "TX" item
Preconditions:

The user is logged in
The user used "Claim" transaction on the account

Steps to reproduce:

Click the "TX" item
Swipe down
Pay attention to the page

Actual result: The vertical scroll is displayed after clicking the "TX" item
Expected result: The vertical scroll is absent after clicking the "TX" item
Supporting data
Env https://goodqa.netlify.com
iPhone6 12.3.1, Safari
https://www.screencast.com/t/zlHlmuAyf

https://www.pivotaltracker.com/story/show/166106974

It's fixed in the PR https://github.com/GoodDollar/GoodDAPP/pull/311, waiting for merge

Checked on https://goodqa.netlify.com/
iPhone6 12.3.1, Safari
Fixed
https://www.screencast.com/t/uUOtjfPQ
There is an issue https://github.com/GoodDollar/GoodDAPP/issues/324


⚠ Samsung has degraded performance

In 21b93e2, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2222 ms

Resolved: Samsung performance has improved in 142efb2.


org.freedesktop.Avahi.NotSupportedError error

Any thoughts on this error?
forego      | starting cname.1 on port 17100
cname.1     | Traceback (most recent call last):
cname.1     |   File "/usr/src/app/cname.py", line 93, in <module>
cname.1     |     main()
cname.1     |   File "/usr/src/app/cname.py", line 81, in main
cname.1     |     status = publisher.publish_cname(cname, True)
cname.1     |   File "/usr/local/lib/python3.9/site-packages/mpublisher/mpublisher.py", line 117, in publish_cname
cname.1     |     group.AddRecord(avahi.IF_UNSPEC, avahi.PROTO_UNSPEC, dbus.UInt32(0), cname.encode("ascii"),
cname.1     |   File "/usr/local/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
cname.1     |     return self._proxy_method(*args, **keywords)
cname.1     |   File "/usr/local/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
cname.1     |     return self._connection.call_blocking(self._named_service,
cname.1     |   File "/usr/local/lib/python3.9/site-packages/dbus/connection.py", line 634, in call_blocking
cname.1     |     reply_message = self.send_message_with_reply_and_block(
cname.1     | dbus.exceptions.DBusException: org.freedesktop.Avahi.NotSupportedError: Not supported

Nope, first guess would be to check what name you were trying to use, but other than that it will be digging in the avahi dbus doc/src

Maybe you're trying to use it on a macOS host?
https://stackoverflow.com/questions/44078097/how-do-i-advertise-and-browse-mdns-from-within-docker-container


Parse and serialize produces unexpected "undefined" string

What version of Ajv are you using? Does the issue happen if you use the latest version?
Using version 8.11.0
Ajv options object
const ajv = new Ajv()

JSON Type Definition (JTD)
{
  "properties": {
    "foo": { "type": "string" }
  }
}

Sample data
{}

Your code
const serialize = ajv.compileSerializer(schema)
const parser = ajv.compileParser(schema)
parser(serialize({}))

What results did you expect?
{
  foo: undefined
}

But got:
{
  foo: "undefined"
}

compiled serialiser does not validate the data, it assumes the data is valid according to the provided schema (it can be enforced with types). In this case an empty object is not valid, because foo is required property. If you tried to parse "{}" it would fail.

This decision is based on the fact that the application has control of the data it produces – it can be achieved with types in Typescript. Serialiser could have done validation of course (this is what you are suggesting), but it would be at the cost of performance, so the decision was to assume that the passed data is consistent with the schema you used to compile this serializer (and in TypeScript the serialiser won't even accept incorrect data type - see the example here). This would be the same in every other language that has type-based marshalling/unmarshalling of data into JSON strings.
If you need to validate the data you can do it as a separate step (e.g. you could have it in debugging mode, or during development, there is no need to include validation into serialisation).
Also see this: https://ajv.js.org/api.html#ajv-compileserializer-schema-object-data-any-string

I see, thanks for the explanation


Clarified how bounds should be used

Added a clue for future users indicating 'how far in each direction` does not mean necessarily mean each value should be positive.

Mistake in understanding how a calculated offset interacts with the bounding box.


About Todo list updates

I have observed two pending tasks on your to-do list that align with my interests. May I inquire if it would be convenient for you to share the associated configurations, weightings, and the code at this time?

[ ] config and pretrained weight for high resolution
[ ]  train and test code for CVT and BEVFusion

Currently, we are primarily focusing on the development of video generation and subsequent tasks, so these to-dos will be released later. For downstream perceptual tasks, we will release part of the bevformer code used for video generation evaluations in this week for the W-CODA2024 challenge. You can refer to the progress of the challenge in the meantime.

All checkpoints released!


Previews for unrelated documents break on null data with FIELD_VALUE_TYPE_PATH_MISMATCH_MSG

Versions

gatsby-source-prismic: 4.1.2
gatsby-plugin-prismic-previews: 4.1.3
node: 16.1.0

Reproduction
When content relationship fields are null due to improperly linked data in a certain document (and it seems, specifically when the content relationship is a newly added field to the custom type, for which there are pre-existing documents), previews break across the board, even for unrelated documents that are loaded on the same page (which I assume is because all documents are "loaded/processed" in a preview context, and have refineFieldValue run on their nodes, even if they are not the document under preview?)
This doesn't seem like desirable behaviour for two reasons:

I don't expect previews for a document to break because of null values in an unrelated document
I don't expect previews for a document to completely break because of type mismatches due to null values; isn't it Prismic philosophy that we can never assume that values will not be null, and thus should handle null failures gracefully?

In my case, the documents render perfectly fine in non-preview mode, since I do a null-check and render a default value if the field is indeed null.
After some more investigation, it seems like null fields don't break once you have explicitly set it to some value and then set it back to null. I'm not entirely sure what's the difference when a new field is added to a custom type with pre-existing documents (and hence defaults to some kind of null value) vs. someone going in and explicitly removing the value on that field.
Steps to reproduce
Create a custom type and  documents of that type. Then add a content relationship field to the custom type and don't update any of the documents.
Attempt to render the document, and the linked document based on that content relationship field, but with null check logic.
To be more concrete, I have the following custom types set up:
Article, which has a slice zone that allows you to create Dividers, by linking to a Divider document with the corresponding type of Divider image. My code for rendering the dividers in an article is as follows (I check for null or empty object documents, and default to a default image if no divider document was linked):

export const ArticleDivider = ({ primary }) => {
  const { type } = primary
  const image =
    type.document && Object.keys(type.document).length !== 0 ? type.document.data.image : null

  return (
    <Divider
      type={image ? null : DividerType.DEFAULT}
      image={image}
      styles={{ ...theme.articlePageStyles.containedElement, my: 3 }}
    />
  )
}

ArticleDivider.propTypes = ArticleDividerPropTypes

I didn't really do a solid reproduction of the issue after I "fixed" it by explicitly updating the new content relationship field in my documents. Nonetheless I thought documenting this behaviour in this issue might be helpful in saving others from frustration when encountering a similar problem, and there is probably a way to prevent this weirdness from happening when a new field is added to custome types?
What is expected?
Document previews don't break.
What is actually happening?
When the new content relationship field is not updated, document previews break with the FIELD_VALUE_TYPE_PATH_MISMATCH_MSG, for the given problematic documents and for completely unrelated documents. (eg. although it was some of my article documents that were having the issue, previews for my Footer document were also broken; I wish I could provide a screenshot, but I neglected to take one when the problem surfaced and I ended up fixing the issue by explicitly updating the fields; the problem does not occur even when I explicitly remove the field's value now)

@tjjjwxzq Thank you for providing a detailed report!
I understand what you're describing. I will do some tests and find a fix.
You are correct in assuming that all previews fail because all documents are processed even when previewing just one document. For some background info, the plugin does this because we need all documents during a preview in order to support content relationships. We can't just query and process the one document being previewed.

@tjjjwxzq Here is what I tested:

Create a Custom Type with any field.
Create a document of that type.
Add a Link field to the Custom Type.
Go back to the document and preview it. Do not edit or publish any changes.

The preview works. The document will not have a data field for the new field (e.g. if you add a "my_link" field, "my_link" will not be a property within data).
Next, do this:

Make any change in the document, save, and publish. The change does not have to be for the new field.
Preview the document.

Now you will see the new link field is present within data, even if you did not edit it (e.g. if you add a "my_link" field, "my_link" will be a property within data).
At this point all documents of that type will contain the new field.
This happens because publishing a new document version creates a new "ref" for your repository. You can think of it clearing the cache for all your documents and saving a version for them.

This is how you can trigger the FIELD_VALUE_TYPE_PATH_MISMATCH_MSG message.

Delete an existing field from a Custom Type. Do not edit any documents.
Restart your Gatsby server with the updated Custom Type.
Preview an existing document.

The FIELD_VALUE_TYPE_PATH_MISMATCH_MSG error will display since the document still contains the old field. Because the field was removed from the Custom Type, the plugin has no knowledge of the field.
Here's how you fix it:

Make any change in any document, save, and publish.

At this point all documents of that type will no longer contain the removed field.
Just like before, this happens because publishing a new document version creates a new "ref" for your repository. You can think of it clearing the cache for all your documents and saving a version for them.

Does this address the issue you are experiencing? I was unable to reproduce exactly what you described, but the two scenarios I described above may be related.
To reiterate: Can you edit any document (you can just delete a character a re-type it) and publish it? All of your documents will use the updated Custom Type now.

Thanks @angeloashmore for looking into it and the detailed test cases + underlying explanation of behaviour. I do think it was scenario 1 that broke for me even though you say that saving any document of a specific custom type should clear the cache for all documents of that custom type and previews should work thereafter. However, I was transitioning between gatsby-plugin-prismic-preview versions when this was happening; or more specifically, I had added the new field to the custom type while on an older version (v4.0.0-beta), and previews were working perfectly fine (and I definitely did save + publish some of the documents under that custom type), then upgraded to v4.1.3, after which I started encountering this error. So it could be very well be a bug that was occuring from the upgrade that required me to touch and save one of the documents again on the new version to rectify it.
Nonetheless give me some more time to confirm the behaviour again on the latest version, and if all is good and working as expected I'll close this issue :)


Do you think it could work with a search function?

E.g. getting only results matching the term on a page:
https://www.facebook.com/search/str/politics/keywords_search?filters_rp_author=134486075205
or
https://www.facebook.com/search/str/search%2Bterm/keywords_search?filters_rp_author=public-feed
Thanks for sharing the app! :)

As far as I know, Facebook disabled keyword searching through its API awhile back. If anyone knows differently, point me to the documentation and I'll add it to the script. /DEEN

Unfortunately no, I don't think there's a good way to get to it from the graph API. Good luck with other things!


Errors have incorrect stack traces

I think the comment explaining how stacktraces will be correct is not actually true. I consistently see stack traces representing the source file of the error class, and the chain of modules that required the error class itself, rather than runtime information.
In a REPL:
> const MaxRetryExceededError = require('falcor/lib/errors/MaxRetryExceededError')
undefined
> new MaxRetryExceededError().stack
'MaxRetryExceededError\n    at Object.<anonymous> (/Users/jon/dev/project/node_modules/falcor/lib/errors/MaxRetryExceededError.js:15:35)
  at Module._compile (module.js:541:32)
  at Object.Module._extensions..js (module.js:550:10)
  at Module.load (module.js:456:32)
  at tryModuleLoad (module.js:415:12)
  at Function.Module._load (module.js:407:3)
  at Module.require (module.js:466:17)
  at require (internal/module.js:20:19)
  at repl:1:13
  at REPLServer.defaultEval (repl.js:272:27)'

If I tweak the implementation somewhat I can achieve a correct stack trace:
function MaxRetryExceededError() {
    this.message = "The allowed number of retries have been exceeded.";
    Error.call(this);
    Error.captureStackTrace(this, this.constructor);
}

require('util').inherits(MaxRetryExceededError, Error);

MaxRetryExceededError: The allowed number of retries have been exceeded.
  at repl:1:1
  at REPLServer.defaultEval (repl.js:272:27)

I'm currently performing issue triage as we get ready to perform a proper release, and closing/tagging as I go.
Thanks for reporting this, we'll take a look at it soon but for now I'll flag it as a bug.

I opened up a PR (#907) that should address this.


Alter Element._cache_artifact so it uses the virtual directory system

See original issue on GitLab
In GitLab by [Gitlab user @jmacarthur] on Nov 26, 2018, 15:49
Background
At the moment, Element._cache_artifact exports files from the Sandbox's virtual directory to a real file system, creates some other directories around it, and adds in logs and other metadata YAML files, and then creates an Artifact from that directory.
We should be able to do all this using the virtual directory system, possibly writing the metadata and logs to a real directory then importing that into the new virtual directory, thus avoiding having to extract the majority of the artifact and recreate it.
Task description

[ ] Modify _cache_artifact to use the virtual directory system.

Acceptance Criteria
Equivalent functionality verified by a remote execution test.

In GitLab by [Gitlab user @jmacarthur] on Dec 4, 2018, 12:12
assigned to [Gitlab user @jmacarthur]

In GitLab by [Gitlab user @jmacarthur] on Dec 4, 2018, 12:13
This has raised some interesting issues with symlinks again. I have an implementation good enough to build freedesktop-sdk, but it fails our unit tests.

In GitLab by [Gitlab user @jmacarthur] on Dec 5, 2018, 17:38
mentioned in merge request !991

In GitLab by [Gitlab user @jmacarthur] on Dec 19, 2018, 15:44
Currently stalled as there are some good questions being raised about how we handle symlinks in general. I'm going to raise a separate issue/MR to address the symlink issue and link it with this.

In GitLab by [Gitlab user @LaurenceUrhegyi] on Dec 20, 2018, 10:38
marked this issue as related to #830

In GitLab by [Gitlab user @juergbi] on Feb 18, 2019, 11:18
closed via merge request !991

In GitLab by [Gitlab user @juergbi] on Feb 18, 2019, 11:18
mentioned in commit ef85e3b295bdec7ad8c0b34e16c56034073d5031


Auto Import do not support interface/type

VSCode Version: 1.18.0

Steps to Reproduce:

git clone https://github.com/Lxxyx/auto-imports-cnpm.git
open project, edit index.js
type Network, but get nothing.

Interface:

Result:

Why
In flow.js project, I can use interface and type.
And in ts project, import interface or type is frequently.

Reproduces without extensions: No

This is by design for JS. We only show type/interface suggestions when you are in a context that supports them, such as a JSDoc comment. TypeScript also only will show interface suggestions when you are in context where they make sense
We don't provide flow support out of the box, so anything specific to that language is out of scope


Threescale 669: Export apicast configuration file

New proxy-config subcommand: export.
 Must be 'sandbox' or
                                  'production' (default: sandbox)
    -o --output=<value>           Output format. One of: json|yaml

ready for review @miguelsorianod

This PR was opened 18 days ago with no review yet. Deadline 20 days. Otherwise will be merged automatically.
cc @miguelsorianod

Hi @eguzki,
Sorry for the delay. I've taken a look at it.
Looks good to me at functionality level.
I want to talk about the "semantics" of the command.
For what I see the command exports the proxyconfig for all services of a provider (remote in this case).
I've noticed the other "proxy-config" commands are at service level.
Would it make sense to have an "export" command for a single service? In case the answer is affirmative:

Should we think about what name to give to both of them in case in the future we want to implement the service-level one? two different commands to export, at service level or at tenant level. Or maybe in the future add a service parameter as optional?
What would be the difference with the show command when the export is at service level instead of at provider level?

Should we think about what name to give to both of them in case in the future we want to implement the service-level one? two different commands to export, at service level or at tenant level. Or maybe in the future add a service parameter as optional?

I think that optional service parameter can be a future enhancement if there is any request about it. The apicast configuration itself also has allows service filtering

What would be the difference with the show command when the export is at service level instead of at provider level?
Show command dumps 3scale proxy object entity. The export command is meant to convert it to apicast configuration object. Currently the differences are small, but critical for the apicast, as it will not work without the update process.


repl.setupHistory

I could be wrong but I believe history can be setup using just the repl itself
repl = REPL.start({ .. })

repl.setupHistory(`${process.env.HOME}/.repl_node_history`, err => err && console.log('Repl history error:', err))

So I'm basically asking if this lib still has a point? it does at a .history command but you can do that with repl.registerCommand, something like that.

@Thomazella ahh, it was not obvious to me from the docs that I needed to call repl.setupHistory()... I read in a few places that it was supposed to keep history automatically, so I was continually confused about why it wasn't working. So yeah I just replaced this lib after having used it for a few years with repl.setupHistory(). 😄


fix(clerk-js): Add localization for password input in SignInFactorOnePasswordCard component

Description
This PR adds formFieldInputPlaceholder__password to the placeholder of the password input in the <SignInFactorOnePasswordCard/> component.

Checklist

[X] npm test runs as expected.
[X] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[X] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

Packages affected

[X] @clerk/clerk-js
[ ] @clerk/clerk-react
[ ] @clerk/nextjs
[ ] @clerk/remix
[ ] @clerk/types
[ ] @clerk/themes
[ ] @clerk/localizations
[ ] @clerk/clerk-expo
[ ] @clerk/backend
[ ] @clerk/clerk-sdk-node
[ ] @clerk/shared
[ ] @clerk/fastify
[ ] @clerk/chrome-extension
[ ] gatsby-plugin-clerk
[ ] build/tooling/chore

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.


Profiler Time only show two decimals

Godot version:
Godot 3.2.3 stable
Issue description:
There was a regresión in profile time information, in older godot versions show five decimals in time column, now show two, which isn't useful considering a frame at 60 fps is 0.016 ms, worse in 144 fps setups (0.00694 ms), so most of the frame times are below the two decimal range and the editor shows 0.00 for everything.

Looking at source code, the culprit is this line:
https://github.com/godotengine/godot/blob/3.2.3-stable/editor/script_editor_debugger.cpp#L877
label = rtos(value * 1000).pad_decimals(2) + " ms";
Where someone hardcoded the decimal number. My proposal to fix this issue is expose the decimal number in editor settings using 5 as default value.
Steps to reproduce:
Open profiler and profile a scene, then look at the time values.

Time is now shown in milliseconds rather than seconds. Therefore, you now see nearly as much information as before, as time was previously shown in seconds.

Time is now shown in milliseconds rather than seconds. Therefore, you now see nearly as much information as before, as time was previously shown in seconds.

Oh understood, still as you see in my screenshot for example shows 0.15 ms for all scripts and the methods 0.00, So I can't evaluate the performance weight of each method. I'm assuming they are in the 0.00x range. A third decimal can be useful in this case, so the point about a configuration variable for decimals still is valid, maybe with default value of 2 instead of 5.

Oh understood, still as you see in my screenshot for example shows 0.15 ms for all scripts and the methods 0.00, So I can't evaluate the performance weight of each method. I'm assuming they are in the 0.00x range. A third decimal can be useful in this case, so the point about a configuration variable for decimals still is valid, maybe with default value of 2 instead of 5.

I'm assuming they are in the 0.00x range. A third decimal can be useful in this case, so the point about a configuration variable for decimals still is valid, maybe with default value of 2 instead of 5.

It's more likely that the profiler simply isn't able to trace at this level of precision. I doubt the GDScript profiler was designed for high levels of accuracy, since that would impact performance too much.

I'm assuming they are in the 0.00x range. A third decimal can be useful in this case, so the point about a configuration variable for decimals still is valid, maybe with default value of 2 instead of 5.

It's more likely that the profiler simply isn't able to trace at this level of precision. I doubt the GDScript profiler was designed for high levels of accuracy, since that would impact performance too much.

Update:
I increased the limit of profiled methods to 512 (as is dangerously hardcoded limit to this value) and now the profiler show more coherent values:

So this means the methods between the method limit aren't ordered by frame time, so the algorithm can cut methods causing bottlenecks using the default values. Worse the script function total time seems to be using only the frame time between the method limit.
@Calinou Should I create a new issue for this problem? Idk what should be the best solution, maybe default to a higher value the limit?

Update:
I increased the limit of profiled methods to 512 (as is dangerously hardcoded limit to this value) and now the profiler show more coherent values:

So this means the methods between the method limit aren't ordered by frame time, so the algorithm can cut methods causing bottlenecks using the default values. Worse the script function total time seems to be using only the frame time between the method limit.
@Calinou Should I create a new issue for this problem? Idk what should be the best solution, maybe default to a higher value the limit?


Create an example test script

What problem are you facing?
kubectl apply -f examples works for most resources but some of the require manual steps, such as domain name registration. That makes it really hard to test whether examples are broken quickly.
How could Crossplane help solve your problem?
We can have a script that does those manual steps as well as kubectl apply -f examples so that we can test all examples quickly. The main use case is to automate CNCF conformance tests https://github.com/cncf/crossplane-conformance/issues/4

@AaronME mentioned in conversation today that if we had something like this (a script that could spin up all of our example resources) then that plus the provider conformance test suite would serve as a decent integration test suite for the provider.


save() Callback Returning Record Inconsistent with Database

This issue appears similar to 975 as well as 2073, but it is different in that while the save() call fails to persist the local data to the database, waterline throws no error. Essentially, when making several nested find()'s, then calling add() and remove() on different collections in the returned records and then nesting the save() calls, the local copies of the records returned by save() are correct, but the data is not updated on the database. The records returned by save() are inconsistent with the records found at localhost:1337/modelName. Is this a bug, or am I misusing save()?
Here are the relevant models:
In Card.js:
attributes: {
  rank: {type: 'integer'},
  suit: {type: 'integer'},
  deck: {model: 'game'},
  scrap: {model: 'game'},
  hand: {model: 'player'},
  points: {model: 'player'},
  runes: {model: 'player'},
  stackedTwo: {model: 'game'},
  targetId: {type: 'integer'},
  attached: {model: 'card'},
  attachments: {collection: 'card', via: 'attached'},

  class: {type: 'string', defaultsTo: 'card',}
}

In Player.js:
attributes: {
  socketId: {type: 'string'},
  currentGame: {model: 'game'},
  pNum: {type: 'integer'},
  hand: {collection: 'card', via: 'hand'},
  points: {collection: 'card', via: 'points'},
  runes: {collection: 'card', via: 'runes'},
  frozenId: {type: 'integer', defaultsTo: null},
  tempString: {type: 'string', defaultsTo: ''},
}

Below is the action in our controller:
It is supposed to find two players, one of which is the 'thief' and one of which is the 'victim'. The 'theif' player removes a jack from his hand collection and adds that jack to the 'attachments' collection of a card in the 'victim' player's runes collection. The chosen card is then removed from the victim's runes and added to the 'thief' player's runes. Both players are then saved in a nested fashion, so that the callback passed to the innermost save() has access to all of the fully updated records, for the purpose of running a publishUpdate() that we do not currently call. the lines console.log(savedP0) and console.log(savedP1) print the exact expected data, but checking the database at localhost:1337/player reveals that the only change made on the database was removing the jack card from the 'thief' player's hand. None of the add() calls, nor the other remove() calls, besides the one on the 'thief' player's hand, persist on the database.
jackBug: function (req, res) {
		Player.find([req.body.thiefId, req.body.victimId]).populateAll().exec(function (erro, players) {
			Card.findOne(req.body.targetId).populate('attachments').exec(function (err, targetCard) {

				if (players[0].id === req.body.thiefId) {
					var thiefIndex = 0;
					var victimIndex = 1;
				} else if (players[1].id === req.body.thiefId) {
					var thiefIndex = 1;
					var victimIndex = 0;
				}

				//Remove the jack from the theif player's hand and add the target card to the thief player's points
				players[thiefIndex].runes.add(targetCard.id);
				players[thiefIndex].hand.remove(req.body.jackId);

				//Remove the target card from the victim player's runes
				players[victimIndex].runes.remove(targetCard.id);

				//Add the jack card to the target card's attachments
				targetCard.attachments.add(req.body.jackId);

					players[0].save(function (e, savedP0) {
						players[1].save(function (e6, savedP1) {
							targetCard.save(function(e7, savedTarget) {
								console.log(savedP0);
								console.log(savedP1);
							});
						});
					});
			});
	});
},

Are you using mongo by any chance? https://github.com/balderdashy/sails-mongo/issues/300

I am using sails-disk, not mongo. Looking at the linked issue, my problem seems different insofar as the code inside the cb passed to save actually does execute, it is only the writing to the database that appears to fail.
I am new to posting issues to github. What does the 'needs failing test' tag mean? That I should write a test using (sails-generate-test)[https://github.com/balderdashy/sails-generate-test/blob/master/FAQ.md]?

Hi @itsalaidbacklife, "needs failing test" means this issue need a failing test PR'ed against waterline tests or waterline-adapter-tests (if you think it's an issue with the adapter). I don't know sails-generate-test but  it looks sails related, not waterline.

Thank you! First, I want to make sure that this is actually the place to post my issue. The project that has had this issue is actually a sails.js project. The readme for sails.js mentioned that the platform is compartmentalized into different modules and suggested posting issues related to a specific module on the corresponding github page, rather than on sails.js, itself. I posted this here because the issue appears to be with .save(), which is a part of waterline, but I am unsure whether I am having a broader issue with sails.js, itself. Should I post to the sails.js issues page, if I am unsure?
Second, I am new to testing, in general, and would greatly appreciate any resources that you could point me towards for getting sufficiently immersed to post an adequate test. Should my tests simply emulate the action that is failing, by implementing the same logic? Or should they actually lift the server, make a request, and evaluate the response? This guide to testing sails.js applications recommends using supertest to test controller actions by making http assertions; is that what I should be using?

Hey @dmarcelino and @particlebanana,
I have been working on getting a failing test to pull request against the waterline tests, but I am having a problem, where my controller action behaves differently during the test, than during normal use. I am using mocha, with supertest for making http requests, and bluebird for promises.
I have refactored the jackBug action, using promises for the find() calls, and when I run the application, and use the UI to request the action, the server's local copies of the appropriate records returned in the save() callback, still have the expected values, but these changes are still not being persisted on the database, itself. However, when I use mocha to test the action, by instantiating temp data and  making a request, the data returned to save() is different than when I run the application manually. This is preventing me from writing a test that adequately captures exactly what is breaking, under normal circumstances.
Here is the new action (with promises):
	jackBug: function (req, res) {

	var thiefIndex;
	var victimIndex;
	var promisePlayers = new Promise(function (resolve, reject) {
		//Promise that finds both players
		Player.find({}).populateAll().exec(function (error, players) {
			if (players[0].id === req.body.thiefId) {
				thiefIndex = 0;
				victimIndex = 1;
			} else if (players[1].id === req.body.thiefId) {
				thiefIndex = 1;
				victimIndex = 0;
			}
			var sortedPlayers = [ players[thiefIndex], players[victimIndex] ];
			resolve(sortedPlayers);
		});
	});

	//Promise that finds the rune card being moved from victim.runes to thief.runes
	var promisePoints= new Promise(function (resolve, reject) {
		Card.findOne(req.body.targetId).populate('attachments').exec(function (error, rune) {
			resolve(rune);
		});
	});

	//When both promises resolve, this function executes the logic with the returned records
	Promise.all([promisePlayers, promisePoints]).then(function (values) {

		var players = values[0];
		var thief = players[0];
		var victim = players[1];
		var rune = values[1];

		thief.runes.add(rune.id);
		thief.hand.remove(req.body.jackId);
		victim.runes.remove(rune.id);
		rune.attachments.add(req.body.jackId);

		thief.save(function (error, savedThief) { //When run with the UI, savedThief is correct
			                                      //When run with mocha, savedThief is undefined
			victim.save(function (erro, savedVictim) { //savedVictim is correct when the action is run through mocha, or through the UI
				rune.save(function (err, savedRune) {  //Saved rune is correct when run with the UI, and incorrect when run with mocha
					if (thiefIndex === 0) {
						players = [thief, victim];
					} else {
						players = [victim, thief];
					}
					res.send({players: players, rune: rune});
				});
			});
		});

	});
},

Here is what we are doing with mocha. First we call a bootstrap file (bootstrap.test.js):
var Sails = require('sails'),
  sails;

before(function(done) {
  this.timeout(5000);
  Sails.lift({
  }, function(err, server) {
     sails = server;

     if (err) return done(err);
     done(err, sails);
  });
});
after(function(done) {
  sails.lower(done);
});

We then run the test file: gameController.test.js (by making it the second argument of the command line):
gameController.test.js:
var Promise = require('bluebird');
var request = require('supertest');

var agent = request.agent('localhost:1337'); //superTest will be used to make requests

describe('GameController', function() {
	describe('Emulation', function() {

	  var player0;
	  var player1;
	  var jack;
	  var rune;

	  before(function instantiateRecords(done) {
		  //Promise to create a temp player for testing
		  var promisePlayer0 = new Promise(function(resolve, reject) {
			  Player.create({pNum: 0}, function(error, createdPlayer0) {
				  return resolve(createdPlayer0);
			  });
		  });

		  promisePlayer0.then(function (createdPlayer0) {
			  player0 = createdPlayer0;
		  });

		  //Promise to create a second temp player
		  var promisePlayer1 = new Promise(function (resolve, reject) {
			  Player.create({pNum: 1}, function (error, createdPlayer1) {
				  return resolve(createdPlayer1);
			  });
		  });

		  promisePlayer1.then(function (createdPlayer1) {
			  player1 = createdPlayer1;
		  });

		  //Promise to create a jack card to be added to player0's hand collection
		  var promiseJack = new Promise(function (resolve, reject) {
			  Card.create({suit: 3, rank: 11}, function (error, createdJack) {
				  return resolve(createdJack);
			  });
		  });

		  promiseJack.then(function (createdJack) {
			  jack = createdJack;
		  });

		  //Promise to create a King card to be added to player1's runes collection
		  var promiseRune = new Promise(function (resolve, reject) {
			  Card.create({suit: 3, rank: 13}, function (error, createdRune) {
				  return resolve(createdRune);
			  });
		  });

		  promiseRune.then(function (createdRune) {
			  rune = createdRune;
		  });

		  //When all players and cards are created, add the cards to the appropriate hand and runes collections of the players
		  Promise.all([promisePlayer0, promisePlayer1, promiseJack, promiseRune]).then(function (values) {

			  player0.hand.add(jack.id);
			  player1.runes.add(rune.id);

			  player0.save(function (error, savedPlayer0) {
				  player1.save(function (erro, savedPlayer1) {
					  player0 = savedPlayer0;
					  player1 = savedPlayer1
					  done();
				  });
			  });

		  });

	  });
          //After all record initialization, request the jackBug action
	  it('should jack a rune', function(done) {
		  agent.post('/game/jackBug').send({thiefId: player0.id, victimId: player1.id, targetId: rune.id}).end(function (error, res) {
			  console.log(res.body);
			  done();
		  });
	  });

  });
});

When the test runs, the jackBug action behaves differently. The records are still found properly, at the beginning, but inside of the save() callbacks, the first record to be saved (in this case, savedThief), is undefined. Am I approaching the testing wrong, fundamentally? Should I be making a request, having the server send back a response with various records and apply logic to determine if the test failed in gameController.test.js?
Is it fundamentally wrong, to nest the save() calls like this, in order to gain access to all updated records in the scope of one function? If so, how am I supposed to do that? I have tried using a different promise for each save() call, and using a Promise.all() to return the updated records into one function, but this has also not worked. When I did this, the records returned to the Promise.all() were incorrect in the same way that the database is always incorrect. This made the local server data consistent with the database, but it still didn't properly update the values.

Okay, I have figured it out! There are two issues that were occurring: First and foremost, I had a confusion about how .add(), .remove(), and .save() work in tandem. The fundamental problem is that each player's runes collection was  a one-to-many association with the various card records, and I was calling .add() and .remove() on two different players' runes collections and moving the same card with both calls. This doesn't work because both of those collections are associated via the same foreign key on the card record. What I didn't understand is that what .remove() actually does is cue up a cb (that is fired when .save() is called) that goes to the associated (the card) record and deletes the foreign key to the record (the player) in whose collection the removed record (the card) resides. This means that my .add() call was being overwritten by my .remove() call, because .add() was instantiating a foreign key from the card to the player, and then .remove() was deleting that foreign key, even though it no longer pointed to the player from whose runes collection I was attempting to remove the card. The fix is very simple: simply don't call .remove() at all, as using .add() to push the card into one player's runes collection automatically removes it from the other player's runes by overwriting the foreign key.
There was a second, and indirect problem that this brought to my attention, however, which is that a record returned inside a .save() callback is not always consistent with the changes made to the database. I believe that the issue was that .save() was returning a populated player record that matched what we would expect the database to look like, based on the .add() and .remove() calls, but it was failing to take into account the faulty logic that I was using, and it therefore returned a record that looked right, even though the database was wrong. Is this what was happening, and should .save() be tweaked to always return exactly what the database has stored?
I have been able to make the record returned by .save() match the database (even when the .add and remove calls overwrite each other), by leveraging promises with Bluebird.js. There is probably a better way to do it, but I make a new promise for each .find(), return the found record when the promise fulfills, use a Promise.all() to wait for all records to be found before continuing with the logic, then use a .spread() to perform all the saves, and wait for them to return before calling the publishUpdate. It seems that noone else has had my foolish problem, so this pattern may not prove helpful to anyone, else, but I'm closing the issue now that it seems to be all figured out!


Add config option to customise release title

Hi there,
Currently this action prepends the repo (or package?) name to the semver tag to create the release title i.e. example-repo v1.0.0.
It would be great if this could be toggled on or off so the release titles could just be the semver tag. 😄

@Fdawgs could you share the configuration you're using? Unless you set --monorepo-tags to true, it shouldn't include the package name in the tag, this is only done to differentiate between libraries if there are multiple libraries in one repository.

I found one of your repos:
https://github.com/Fdawgs/test-gh-actions/releases/tag/v1.0.2
I follow now, the issue isn't the tag, it's the title for the release 👍

I found one of your repos:
https://github.com/Fdawgs/test-gh-actions/releases/tag/v1.0.2
I follow now, the issue isn't the tag, it's the title for the release 👍

Brilliant, thanks @bcoe, that's what I meant!

How much work would it be to add this? The repo/package name in the release title is redundant, so it would be nice to be able to remove it.

@mayank99 I haven't thought through this problem, so I'm not sure how much work it would be.
The changes would be here: https://github.com/googleapis/release-please

If it's okay, I will try to work on this and create a PR if I'm successful. Hopefully it's not too complicated 🤞

@mayank99 I would take a look at title-pattern and see if it does what you're looking for.
If so, I would happily take a patch accepting this parameter.

Seems it now uses version name by default and doesn't include package name. So this is fixed!


How to Install and Use Vagrant on Linux

Introduction
Vagrant is an open-source software product that allows you to create and maintain flexible virtual software design platforms using VirtualBox, VMware, Hyper-V, Docker containers, KVM, and AWS. It aims to make virtualization configuration management easier in order to boost major progress.
What I will cover
-Advantages of using Vagrant
-Vagrant installation on different Linux Distributions
-Vagrant Usage

After some careful consideration, it struck us that this topic may be a bit over-saturated throughout other blog sites and official documentation.
Please feel free to suggest an alternate topic to explore. And always use our template.


Better information regarding Web sdk bootstrap versions

According to this page of the documentation, version 1.2.15 should be used. https://msdn.microsoft.com/Skype/WebSDK/docs/GettingStarted
However, it looks like the latest version is 1.2.36 (can't be sure at this point).
The changelog seems to reference subcomponents versions but doesn't provide version information for the bootstrap. https://msdn.microsoft.com/Skype/WebSDK/docs/skypewebsdkversionupdatenotifications
Including the bootstrap version information in the changelog would help a great deal identifying whether or not we're using latest.

Great comment.  I'll see about updating the GettingStarted page.

Any update on the most up-to-date version?
Currently "https://swx.cdn.skype.com/shared/v/1.2.15/SkypeBootstrap.min.js"
Returns --> Skype Web SDK Production v0.4.545
-Alan

Any progress on this @JohnAustin-MSFT?  It's been almost a year...

Polling the CDN for lots of version numbers reveals that versions 1.2.1 through 1.2.36 exist, but apparently no others.
https://swx.cdn.skype.com/shared/v/1.2.36/SkypeBootstrap.min.js

@GufNZ I've looked at 1.2.36 but still can't seem to get Screen Share working anywhere. Having issues with audio/video invitations in Chrome and a/v in Firefox overall... Have you used the sdk?

@Wadge91 Just starting out, and I'll only be using it to schedule meetings.
So far I've learned that a/v stuff requires HTTPS in Chrome or you don't get access to them, and I read somewhere recently that a/v is only supported in a few browsers, but I forget where.  Might have been in the GA/Preview comparison page, or somewhere else near the getting started pages.  I haven't read further than that yet.

@GufNZ if all you need is to schedule a meeting you might save a lot of headache using straight UCWA.
Use Fiddler to walk through the process and then build it into your application. The sdk seems to be more of a hassle to set up compared to authenticating with UCWA and it can't do anything but create a meeting right now anyways. I set up the sdk partially for meetings and set up test meetings then couldn't delete or modify them without using UCWA manually anyways lol.

This issue has still not been addressed. Its quite frustrating that the only way we can find the latest bootstrap is trial and error. What happens if you jump version numbers from say 1.2.36 to 1.4.30?
We would never be able to find or use the latest version.

@dmahugh Hi Doug, can you take a look at this and direct it to the appropriate person? Thanks...


Build for windows

Is it feasible to try and update the recipe to build on windows? Is that platform supported by the upstream developers?

ROOT does have "preview" releases for Windows but last I heard it wasn't possible to build for 64 bit Windows due to hard to fix issues in cling. That said conda-forge does have 64-bit Windows binaries for vanilla cling so I'm not sure what actually blocks it. I'll ask.

From the ROOT team:

There is no ROOT build on Win64, which is not supported for the time being. It requires deep changes in ROOT, due to pointer to long casting (the long type is 32 bit on Win64...)

I'm going to close this for now. If someone is interested enough to try and get it working I'm happy to reopen this issue and support the effort.
I do know quite a few people that use Windows Subsystem for Linux with the Linux conda-forge binaries so maybe that is an option for you use case?
Alternatively, if you only need to be able to read/write ROOT files, uproot is an excellent alternative which supports effectively any platform.

Thanks @chrisburr; I am interested in building out a scientific (LIGO/GW) stack on Windows mainly to aid in outreach and teaching (effectively 'all' of which happens on windows) - and WSL isn't reliable enough yet (as far as I have seen).
uproot is the best solution for most cases (postprocessing etc), so I'll look more into that.
Thanks again.

I've used WSL last october for a workshop teaching new PhD students, where their laptops were a roughly even mixture of Windows/macOS/Linux. It worked well but it's a bit heavy for outreach.
I've seen JSROOT work well for this kind of thing and it's really nice being able to do everything from within a static webpage: https://root.cern.ch/js/

Note that WSL 2 is now out. And next they plan to integrate graphics with GPU acceleration support. They are also adding a windows package manager.
Medium article: https://towardsdatascience.com/dual-boot-is-dead-windows-and-linux-are-now-one-27555902a128

@chrisburr FYI, ROOT builds and is available on Windows x64 since quite a while now...

Just pinging here as well (https://conda.discourse.group/t/windows-installers-for-root/568/3)
Would it be possible to add windows installers to https://anaconda.org/conda-forge/root/ 1 given that ROOT now builds on Windows x64  ?
This would be a huge help for teaching purposes where students have a mix of operating systems including Windows.
Thanks!


is that possible to sync all remote locally

is that possible to sync all remote locally   for example before a trip to sync all site and when i get internet again upload changes syncing local and remote

ah ic, yea sure, however ftp is multi user server.
this mean, idk who edit to the file.
if that happen, then local and remote file is not much.
yea I know, "the server used by only me",
I will try, this function append to the extention asap,
but first I have must thing, major update.
plz wait.


Perspective.el wipes out perspectives when a emacsclient frame is closed.

The backdrop
When using emacs in daemon mode if you open a emacsclient frame and open a file and delete frame without killing buffer then next emacsclient frame you open will have that buffer in it. This is the behaviour of emacs daemon. I heavily rely on this behaviour for emacs workflow.
The problem
After learning about perspective.el I thought it will help my workflow terendously and tried it out. It works well in most respects except one case i have come upon which i will make a separate issue about. The problem is when i open emacsclient for the first time and create some perspectives and  open some files and then close the frame to open a new one, all the files and perspective are gone. Now this may be useful when you are not using emacs in daemon mode but it kill the purpose of daemon mode when this behavior happens.
The solution?
i am not sure why perspective.el behaves like this when using emacs in daemon mode. I see how that behavior is useful when opening many non emacsclient frames so maybe perspective.el should not kill all perspectives when emacs in running in daemon mode. If this is not possible to do could I at least have some hack-able solution.

Actually this seems to have been talked about in some open issues. I normally check both closed and open issues for my own issues before opening one but i seem to have forgotten check the open ones. I will not close this straight away as i am still interested in the future of this issue/enhancement and wish to know when it may be implemented or if there is some temporary solution to this as my own temporary solution have not worked.

Daemon mode is poorly supported in Perspective because perspectives are tracked inside frame(-specific) parameters. Refactoring this a long-term goal of the project. See #41, #91, and #186.


query database using natural language

Issue you'd like to raise.
Where given a question in a natural language it has to convert to sql query and then operate on the sql data base then has to return the answer.
Here I want to catch sql query generated and also the reponse to the question
Earlier I did by using SQLDatabaseChain
But now I couldn't find this in your document.
So what are all supported here for my use case?
Suggestion:
No response

I got this error when I executed the code which you given

@dosu-bot
code -
db = SQLDatabase.from_uri(postgres_url) llm = OpenAI(model_name="text-davinci-003", temperature=0.0) db_chain = SQLDatabaseChain(llm=llm, database=db, verbose=False) query = "List the total runs per country. Which country's runs has the most?" output, sql_cmd = db_chain.run(str(query))
Error -
ValueError                                Traceback (most recent call last)
Cell In[29], line 5
3 db_chain = SQLDatabaseChain(llm=llm, database=db, verbose=False)
4 query = "List the total runs per country. Which country's runs has the most?"
----> 5 output, sql_cmd = db_chain.run(str(query))
ValueError: too many values to unpack (expected 2)

@dosu-bot
Why i have to give sql query , As i'm already using SQLChain to convert natural language to SQL.
I will give query in natural language it has convert it into SQL query then query the SQL database.
So here I want to written both SQL query and final answer as output

@dosu-bot
See there is no wrong in the connection issues, all are correct.
There is wrong in your code
I could able to generate output

The below snippet is when i set the parameter return_sql to True

The below code which you gave -

so Im getting error at the line -
output, sql_cmd = db_chain.run(str(query))
Error -
ValueError: too many values to unpack (expected 2)
Here what I want to achieve is i want to get the SQL query and answer both from the model, tell me how to achieve that

@dosu-bot
How to add prompt here to the above code?

@dosu-bot
Can you give brief code for my use case
instead like this
class SQLDatabaseChain:
# ...
def run(self, command: str, return_sql: bool = False):
    # ...
    # After generating the SQL query and the final answer
    if return_sql:
        return sql_query, final_answer
    else:
        return final_answer

@dosu-bot
After making this change
def _call(self, inputs: Dict[str, Any], run_manager: Optional[CallbackManagerForChainRun] = None) -> Dict[str, Any]:
# ... existing code to generate SQL query and final answer ...
if self.return_sql:
    return {self.output_key: sql_cmd, 'final_answer': final_result}
else:
    return {self.output_key: final_result}

It is not reflecting
Getting this error
Error -
ValueError: run supported with either positional arguments or keyword arguments but not both. Got args: ("List the total runs per country. Which country's runs has the most?",) and kwargs: {'return_sql': True}.

🤖
Hello,
Thank you for reaching out. Based on your request, you want to modify the run method to return both the SQL query and the final answer when a return_sql parameter is set to True. However, in the LangChain framework, the equivalent of the run method seems to be the _call method in the SQLDatabaseChain class.
Here's how you can modify the _call method to achieve your goal:
def _call(self, inputs: Dict[str, Any], run_manager: Optional[CallbackManagerForChainRun] = None) -> Dict[str, Any]:
    # ... existing code to generate SQL query and final answer ...

    if self.return_sql:
        return {self.output_key: sql_cmd, 'final_answer': final_result}
    else:
        return {self.output_key: final_result}

In this code, return_sql is an attribute of the SQLDatabaseChain class. If return_sql is True, the method returns both the SQL query and the final answer. Otherwise, it only returns the final answer.
Regarding your second question about adding a prompt, you can use the PromptTemplate class in the langchain.prompts.prompt module. Here's an example of how you might add a prompt for the user's name:
from langchain.prompts.prompt import PromptTemplate

prompt_template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.

{context}

Question: {question}
Helpful Answer:

Please enter your name: {name}"""
prompt = PromptTemplate.from_template(prompt_template, input_variables=["context", "question", "name"])

In this code, {name} is a placeholder for the user's name. The input_variables list in the PromptTemplate.from_template method has been updated to include "name".
Please note that these modifications should be done in your local copy of the LangChain framework and may not be compatible with future updates of the framework.
I hope this helps! If you have any other questions, feel free to ask.
Best, Dosu
Sources
* [libs/langchain/langchain/chains/retrieval_qa/prompt.py](https://github.com/langchain-ai/langchain/blob/-/libs/langchain/langchain/chains/retrieval_qa/prompt.py)

* [libs/langchain/langchain/prompts/prompt.py](https://github.com/langchain-ai/langchain/blob/-/libs/langchain/langchain/prompts/prompt.py)

* [libs/experimental/langchain_experimental/sql/base.py](https://github.com/langchain-ai/langchain/blob/-/libs/experimental/langchain_experimental/sql/base.py)

* [libs/langchain/langchain/utilities/sql_database.py](https://github.com/langchain-ai/langchain/blob/-/libs/langchain/langchain/utilities/sql_database.py)

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with
@dosu-bot.
How can I make that particular change ?

@dosu-bot
If I change also how could it reflect on github of langchain?

🤖
Hello,
Based on the changes you've made to the _call method in the SQLDatabaseChain class, it seems like you're trying to have the method return both the SQL query and the final answer when a return_sql parameter is set to True.
To reflect these changes on the LangChain's GitHub repository, you would need to follow the "fork and pull request" workflow. Here are the steps:
1. **Fork the LangChain repository** to your own GitHub account. This creates a copy of the repository under your account.

2. **Clone the forked repository** to your local machine. This allows you to work on the code locally. You can do this with the following command:
   ```
   git clone https://github.com/<your-username>/langchain.git
   ```

3. **Create a new branch** for your changes. It's a good practice to create a new branch for each set of changes (or "feature") you're working on. This keeps your changes organized and separate from each other. You can create a new branch with the following command:
   ```
   git checkout -b <branch-name>
   ```

4. **Make your changes** in the new branch. Based on your description, you've already done this step.

5. **Commit your changes**. This saves your changes to the Git history. Before you do this, you can check which files have changed with `git status`.

6. **Push your branch** to your forked GitHub repository. This uploads your changes to GitHub. You can do this with the following command:
   ```
   git push origin <branch-name>
   ```

7. **Create a pull request** from your forked repository (the "head repository") to the original LangChain repository (the "base repository"). To do this, go to your forked repository on GitHub, switch to your branch, and click the "New pull request" button.

When opening pull requests, follow the checked-in pull request template, note related issues, and tag relevant maintainers. Your pull request cannot land without passing the formatting, linting, and testing checks first.
If you fix a bug, add a relevant unit or integration test when possible. If you make an improvement, update any affected example notebooks and documentation. If you add a feature, add a demo notebook in docs/modules and add unit and integration tests.
Here is the code to install requirements and run common tasks:
# To install requirements
poetry install --with test

# To run formatting for this project
make format

# To run linting for this project
make lint

# To check spelling for this project
make spell_check

# To get a report of current coverage
make coverage

# To run unit tests
make test

# To run integration tests
make integration_tests

For more details, refer to the CONTRIBUTING.md file in the .github directory of the LangChain repository.
I hope this helps! If you have any other questions, feel free to ask.
Best, Dosu
Sources
* [DOC: Get only the sql query not the output of the query in SQLDatabaseChain](https://github.com/langchain-ai/langchain/issues/4853)

* [Support (optional) direct return on `SQLDatabaseChain` to prevent passing data to LLM](https://github.com/langchain-ai/langchain/issues/821)

* [.github/CONTRIBUTING.md](https://github.com/langchain-ai/langchain/blob/-/.github/CONTRIBUTING.md)

* [docs/docs_skeleton/docs/community.md](https://github.com/langchain-ai/langchain/blob/-/docs/docs_skeleton/docs/community.md)

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
@dosu-bot.
While trying to push the code getting the below error
remote: Permission to langchain-ai/langchain.git denied to Kuramdasu-ujwala-devi.
fatal: unable to access 'https://github.com/langchain-ai/langchain.git/': The requested URL returned error: 403