Add a flexible mechanism to combine user and default plugins

🎉 New feature
Closes https://github.com/gazebosim/gz-sim/issues/796
Summary
Implementation based on https://github.com/gazebosim/gz-sim/issues/796#issuecomment-2248821768
TODO:

[x] Cleanup
[ ] Tests

Test it

Checklist

[ ] Signed all commits for DCO
[ ] Added tests
[ ] Added example and/or tutorial
[ ] Updated documentation (as needed)
[ ] Updated migration guide (as needed)
[ ] Consider updating Python bindings (if the library has them)
[ ] codecheck passed (See contributing)
[ ] All tests passed (See test coverage)
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

@iche033 Based on your suggestion, I've simplified the various options available.

For Server plugins, I've removed all of the options and plugins are simply appended to the list. The user can then used the <gz:system_priority> to configure the order the plugins.
For GUI plugins, since the order of plugins is important but there is no mechanism similar to <gz:system_priority>, I've implemented the following behavior:

If the a plugin from the SDF also exists in the default configuration, the plugin from SDF will replace the one in the default configuration at the position/order of the plugin in the default configuration.
Otherwise, it's appended to the end

this test failure looks related:
/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

this test failure looks related:
/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

my understanding is that an increase in no. of systems is expected due to behavior change. I increased the expected system count to fix the test, in the same way it was done to fix other Server tests.
a0c23f2

this test failure looks related:
/Users/jenkins/jenkins-agent/workspace/gz_sim-ci-pr_any-homebrew-amd64/gz-sim/src/Server_TEST.cc:514
Expected equality of these values:
  2u
    Which is: 2
  *server.SystemCount()
    Which is: 5
    ```

my understanding is that an increase in no. of systems is expected due to behavior change. I increased the expected system count to fix the test, in the same way it was done to fix other Server tests. a0c23f2

INTEGRATION_multiple_severs failed because we were loading the physics systems, but the test explicitly does not want it as indicated by TestWorldSansPhysics. My guess is that by including physics, it gets loaded twice and we run into https://github.com/gazebosim/gz-sim/issues/18

gz_sim-ci-pr_any-noble-amd64 picked up many new warnings - looks like they are false positives from the new console log msgs. I'm going to merge this since all tests are passing but we should ticket an issue on this

gz_sim-ci-pr_any-noble-amd64 picked up many new warnings - looks like they are false positives from the new console log msgs. I'm going to merge this since all tests are passing but we should ticket an issue on this

#2555 https://github.com/gazebosim/gz-sim/issues/2555


VSCode tunnel cannot use new environment variables

I started the VSCode tunnel service on the server, and then installed a Node.js application on the server side. It works fine when used directly through PowerShell on the server, but when I connect to the server's tunnel from my local machine and use the terminal in VSCode, it prompts that the command is not found. I have restarted the tunnel service, but it still doesn't work. What should I do?

my problems are very similar to yours. I can not see new environment variables in my laptop(win10 24h2) after I changed these environment variables in server(win10 24h2).

Hey @kirning there are multiple moving pieces involved here, so mind providing clear step-by-step instructions on how to reproduce the issue? That will help us to assist you effectively.

but when I connect to the server's tunnel from my local machine

Do you mean that you create a tunnel for the SSH server port on the server and then connect to it from the local machine using vscode? Do you connect directly from the terminal or using a Remote (tunnel/SSH) functionality?

PATH discrepancy on tunnels connected machine? Maybe related to the shell environment not being sourced correctly on the server side?

Yes, if the tunnel is installed as a service, you will want to make sure your environment variable modifications are made in a place where the service will also receive them. Or set them in a dotfile so that they're applied whenever you open a new terminal.


Use explicit stopping state when stopping triggered by Ankaios

Issues: #
This fixes an issue introduced by the changes for #48
Definition of Done
The PR shall be merged only if all items mentioned in CONTRIBUTING.md have been followed. In case an item is not applicable as described, please provide a short explanation in the description.

[ ] All steps in CONTRIBUTING.md have been handled

@krucod3: I think the state diagram must be adapted, right?

@inf17101, yeah ... I had the same issues. At the end I decides it would be best to simplify it and only show the transitions between the major states. A new version is available, please take a look. Thanks!


numjs guaranteed?

Is numjs guaranteed or trusted for production?!

We know that MATLAB is guaranteed for production, And what is it about numjs?!

@rezamarzban this project is licensed with MIT license. This basically says, that there is no warranty or anything the like (See https://github.com/nicolaspanel/numjs/blob/master/LICENSE). That being said, many open source project have this or a similar license. Whether or not you can use this in some production environment depends on the project and its guidelines.


Upstream rebase to 2.11.2

Create a rebase tree using rebasebot:

rebasebot --source https://github.com/kedacore/keda:release/v2.11 --dest openshift/keda:main \
          --rebase joelsmith/keda:rebase --tag-policy=strict --update-go-modules --dry-run \
          --github-user-token <(yaml2json ~/.config/hub | jq -r '."github.com"[0].oauth_token')

cd .rebase
Update .ci-operator.yaml and squash into existing carry commit
Clean up carry commits, update OWNERS,  squash where appropriate
Add verify history drop commit to use upstream's release/v2.11 branch as the merge base
Push to own fork, open PR

Instruction for reviewer(s):
Compare with upstream (in reverse order): https://github.com/kedacore/keda/commits/release/v2.11
First 116 commits here (9797830..517ed30) are the top 116 there. Beyond verifying that this is the case, no review is required of these commits (already reviewed upstream).
Compare the merge commit d811855 to its upstream parent 517ed30 to verify they are identical, showing that the rest of our chnages are reverted by this merge commit.  https://github.com/openshift/kedacore-keda/compare/517ed30...d811855 (Files changed: 0)
Verify that remaining commits (prefixed with UPSTREAM:) are all the carry patches re-applied post-rebase and that drop patches are not.
Compare with currently-carried patches (in reverse order): https://github.com/openshift/kedacore-keda/commits/main

FYI, this PR adds a new UPSTREAM: <drop>: commit, 93acaebe7f9c25ddae197cdb238849b0db9b618a, so that the CI job cma-verify-history will pass. This change will get dropped on the next upstream rebase (and we'll go back to aiming at the main branch.


Redirects for Microservices topics

OPS Build status updates of commit 22f32d8:
:clock10: Preparing: average preparing time is 46 sec(s)

OPS Build status updates of commit 22f32d8:
:clock10: Incremental building: average incremental building time is 23 sec(s)

OPS Build status updates of commit 22f32d8:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error] Redirection info is incorrect for following documents: microservices

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

 Details: Could not find a part of the path 'T:\j0yx\bread\toc.json'.

toc.json

[Warning] Error happen when converting toc.json to Pdf. Details: Could not find file 'T:\j0yx\toc.json'.

building-blocks/extending-templates/toc.json

[Warning] Error happen when converting building-blocks/extending-templates/toc.json to Pdf. Details: Could not find a part of the path 'T:\j0yx\building-blocks\extending-templates\toc.json'.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


added attachment ID info

Per Issue #325

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/add-ins/use-rest-api.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Support for go modules

When running glice in a project using go modules, not in the regular gopath you get the error:
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
main.main()
	/home/tommy/go/src/github.com/ribice/glice/main.go:64 +0x758

Yup, aware of this issue. #9 is the same.
Will need to rewrite large portions of glice to support Go modules, as currently it's tightly coupled to GOPATH.

I'm getting same issue with go-mod app

I have the same issue when using glice in a workflow action and found a simple workaround to set the basedir to the fullpath and only call strings.split if the fullpath contains "src/", i.e.
basedir := fullPath
if (strings.Contains(fullPath, "src"+fs)) {
basedir = strings.Split(fullPath, "src"+fs)[1]
}
This returned all the same dependencies & license info as the original when run under GOPATH. The only issue is that it also returns the project I ran glice against as a dependency on itself.

Resolved with 2eb4a07b38e4b9fdbdce9808773b1de79c1f6574.


Automatic form submission

The form is not submitted due a bug in reactjs here
i will fix it soon

Did you get this working / did you happen to see which version of React ChatGPT is using?

Hey steve,
Yes this is fixed in this commit
Its not about chatgpt react version, but as i faced this issue i had to google it see whats wrong exactly and i found that link i provided above

If you have this issue, just download the code again


Spring Consul not deregistering from Consul in  Docker Datacenter deploy

Hi,
I have seen a few similar issues but my scenario did not seem quite the same.
Currently we have Consul deployed as a container to a Docker Datacenter cluster.  We have built Java microservices using Spring Cloud Consul framework.  The applications register with Consul just fine:
Registering service with consul: NewService{id='cit-user-profile-gateway-e5899ed3191f9cdd8c94fe9a5427e49e', name='cit-user-profile-gateway', tags=[], address='<IP_ADDRESS>', port=8080, enableTagOverride=null, check=Check{script='null', interval=10s, ttl=null, http=http://<IP_ADDRESS>:8080/health, tcp=null, timeout=null, deregisterCriticalServiceAfter=null, tlsSkipVerify=null}, checks=null}
However, when we run a deployment via Docker Datacenter's UCP, the command: docker stack deploy, Spring Consul does not deregister the service from Consul.  This is leading to issues when other services are attempting to lookup various other services via Service Discovery.   I can provide more detail on this if needed.
We have done some testing around the /shutdown endpoint with Spring Boot.  This will shutdown the service gracefully but I have concerns around operationalizing this approach.
Is there a recommended approach with how to deregister Spring Cloud services running in a Docker container deployed to Docker Datacenter?
Please let me know if there is any further information I can provide.  If this is the incorrect place to post this I apoligize in advance!

Exactly like this issue I think [https://github.com/gliderlabs/docker-consul/issues/108]

Consul has a deregister timeout you might use. Otherwise, I don't see what we can do.

First off thank you for the quick response!
Is there a linux signal that spring cloud (or maybr spring boot) looks for to perform a graceful shutdown that spring consul has hooks into?  If there is documentatipn you could point me to that wpuld be great.
Thanks for these great frameworks!

If the spring boot app is shutdown gracefully, spring cloud will deregister.

We were able to figure out our issue, it was not Spring-Cloud-Consul related, as @spencergibb was pointing out.  The issue we had was that we were running our spring boot jar from within an inline shell script like so:
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
The problem with this is the shell script was receiving the SIGTERM signal and not propagating it to the Java process that was spawned via the shell script, therefore Spring Boot could not exit gracefully.
After a bit of research we stumbled onto this blog, http://veithen.github.io/2014/11/16/sigterm-propagation.html, which pointed us to running the command via exec, which will replace the shell process, and the SIGTERM will get propagated to Spring Boot.   Our ENTRYPOINT now looks like so:
ENTRYPOINT [ "sh", "-c", "exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
Thanks again for the great support!

can i use deregisterCriticalServiceAfter option on yml ?

@gabrielfsousa please stop spamming all of these issues with your same question. Join us on gitter to ask.

We were able to figure out our issue, it was not Spring-Cloud-Consul related, as @spencergibb was pointing out. The issue we had was that we were running our spring boot jar from within an inline shell script like so:
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
The problem with this is the shell script was receiving the SIGTERM signal and not propagating it to the Java process that was spawned via the shell script, therefore Spring Boot could not exit gracefully.
After a bit of research we stumbled onto this blog, http://veithen.github.io/2014/11/16/sigterm-propagation.html, which pointed us to running the command via exec, which will replace the shell process, and the SIGTERM will get propagated to Spring Boot. Our ENTRYPOINT now looks like so:
ENTRYPOINT [ "sh", "-c", "exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
Thanks again for the great support!

This was more helpful than all other think's Thanks a lot :)


Migrate from PSP to PSS

Ah and please update the values schema JSON using helm schema-gen or at least put the added key in alphabetical order.


Any plan to support node ESM?

I'm submitting a...

[ ] Bug report
[x] Feature request
[ ] Question

Current behavior
The default generated migrations are all CJS files and can not be used in a ESM node project (type="module" in package.json).
It seems that node-db-migrate hardcoded the .js suffix. If I change the migration files extension to .cjs, it can't recognize them at all.
Expected behavior
Provide an option to generate ESM migration code or recognize .cjs migration files.
Environment

db-migrate version: 1.0.0-beat.14
plugins with versions: none
db-migrate driver with versions: sqlite3 0.4.0

Additional information:
- Node version: 15.5.0
- Platform:  Mac

not sure what you're hoping here for. you're never loading the migrations yourself. db-migrate does, so it would only matter that if you want to use db-migrate programatically, to access it it like that. Can you elaborate your use case more, what and why do you need that?

not sure what you're hoping here for. you're never loading the migrations yourself. db-migrate does, so it would only matter that if you want to use db-migrate programatically, to access it it like that. Can you elaborate your use case more, what and why do you need that?

however custom migration parsers are target for plugins for long time already. so you could just write a plugin to enable that. See the coffee script plugin as an example https://github.com/db-migrate/plugin-coffee

however custom migration parsers are target for plugins for long time already. so you could just write a plugin to enable that. See the coffee script plugin as an example https://github.com/db-migrate/plugin-coffee

I am sorry to be ambiguous, let me clarify this.
I have a project, and I set it up to be an ESM project, that is the type field in package.json is module.
I use the migrations directory the store the auto-generated migration files.
When I do the migration, I got this error:
[ERROR] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/cj/Documents/Work/pdb-api/migrations/20210110045153-init.js
require() of ES modules is not supported.
require() of /Users/cj/Documents/Work/pdb-api/migrations/20210110045153-init.js from /Users/cj/Documents/Work/pdb-api/node_modules/db-migrate/lib/file.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename<PHONE_NUMBER>5153-init.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/cj/Documents/Work/pdb-api/package.json.

The reason is that node-db-migrate is trying to require the migration file but the file is considered to be an ESM module (due to the type filed in the root package.json file). Obviously, one can't load an ESM module using require.
Back then I was busy writing the code so I didn't give too much time to think about it but filed this issue.
For future references, there are several ways to solve this problem without any modification of node-db-migrate.

Create a package.json file in the migrations directory and set its type filed to be anything except module. This is probably the easiest way.
Remove type="module" in root package.json and manually change all file extensions of our code from .js to .mjs.

I am sorry to be ambiguous, let me clarify this.
I have a project, and I set it up to be an ESM project, that is the type field in package.json is module.
I use the migrations directory the store the auto-generated migration files.
When I do the migration, I got this error:
[ERROR] Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /Users/cj/Documents/Work/pdb-api/migrations/20210110045153-init.js
require() of ES modules is not supported.
require() of /Users/cj/Documents/Work/pdb-api/migrations/20210110045153-init.js from /Users/cj/Documents/Work/pdb-api/node_modules/db-migrate/lib/file.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename<PHONE_NUMBER>5153-init.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/cj/Documents/Work/pdb-api/package.json.

The reason is that node-db-migrate is trying to require the migration file but the file is considered to be an ESM module (due to the type filed in the root package.json file). Obviously, one can't load an ESM module using require.
Back then I was busy writing the code so I didn't give too much time to think about it but filed this issue.
For future references, there are several ways to solve this problem without any modification of node-db-migrate.

Create a package.json file in the migrations directory and set its type filed to be anything except module. This is probably the easiest way.
Remove type="module" in root package.json and manually change all file extensions of our code from .js to .mjs.

I also ran into this - thanks for the workarounds suggested here. I think it would be best if db-migrate would call import() instead of require() when loading migration files, since import() works for both ES and CJS modules

no best is backwards compatibility, when versions of node without support become old enough it will be considered

It seems you're against the feature, which is okay, but one thing to note is that it's very possible to implement it in a backwards compatible way. The mocha and jest libraries have done so by try/catching the require(), checking the error, and doing import() only if it's ERR_REQUIRE_ESM.
See https://github.com/mochajs/mocha/blob/9878f32a5a5394f100834aa26bb52144e07d7374/lib/esm-utils.js#L33 and https://github.com/facebook/jest/blob/f9132f9106e3f1b3ae6f81d1f36222055c3fe111/packages/jest-config/src/readConfigFileAndSetRootDir.ts#L41-L46, which show this.

well honestly. i don't care, it doesn't provide any benefit and I don't use it anywhere that might be true. But I don't care, the difference between me the maintainer and you the user is: I have responsibility. And that is backwards compatibility. Native es modules, and with that "import", in node "just" arrived and your example you're providing shows you didn't understand the problem. This is about backwards compatibility. Just introducing the work import anywhere in the code will break it for thousands of users, with not benefit at all for them (nor anyone else es modules really have no real benefit over require (at least if you know what you are  doing).
And before the question comes up to introduce a transpiler to the project such as babel. The answer is no, there is no use other than being incapable of waiting until maturity for using babel. It just introduces latency while the development effectively destroying flow and productivity.
So a small simple comprehension here: There will be absolutely no support for "import" and es modules in db-migrate until not 99% of all users dropped node v12 and upgraded.

Just introducing the word import anywhere in the code will break it for thousands of users

Adding an unused import() does not throw an error in any LTS versions of NodeJS, starting with Node 10. Does db-migrate support node@9? That's the latest version of Node that throws an error when it sees a dynamic import() in a file. I see that the package.json says that node >= 8 is supported on the master branch for version 1.0.0-beta.14 - if that's true then yes it would be a breaking change.

wouldn't mind to introduce it if it brings any benefit

The main benefit I see is not throwing errors when users have set "type": "module" in their package.json. "Don't use ES Modules" is an arbitrary and unnecessary restriction to place on users.
Alternative solution
Another solution would be to generate migration js files with the .cjs extension when inside of a package that has "type": "module", and then have db-migrate look for either .js or .cjs when calling require(). This solution would work in Node 8 as far as I know, so it could be a good solution if backwards compatibility with Node 8 is needed.

node 8 is still supported (the breaking changes label announces also node breaks). While node 8 can be dropped the support by now, it is now one year after the end of the lts period, most users and even most slow enterprises will have managed to update it, the support for import and es modules was not there until node 13.
however db-migrate wont use es modules internally anywhere soon, if ever since there is nothing wrong with require, but definitely not before 2023, due to backwards compatibility though.
such problems are usually also moved out of db-migrates core into plugins, however the file loading itself is not yet available as a hook, it is simply done here this way https://github.com/db-migrate/node-db-migrate/blob/41ab6717f4d27be104c7c9084390400c3fba5304/lib/file.js#L84
The easiest solution however would be to

Create a package.json file in the migrations directory and set its type filed to be anything except module. This is probably the easiest way.

Which @cj1128 wrote and maybe do that by default through db-migrate itself. Or add a plugin to register the cjs extension. All in all what the node developer team did here with the module system change is a mess, done quite ugly without really a good reason but complying to a standard module system. While I understand the movement, the execution is poor, if not terrible.  However, this is not about my opinion. If there is a solution that neither needs a lot of maintenance, nor breaks any version until node 8 I would be fine with it, as long as I don't have to invest my own time on it.

however db-migrate wont use es modules internally anywhere soon, if ever since there is nothing wrong with require, but definitely not before 2023, due to backwards compatibility though.

There's no need to refactor db-migrate to be in ESM. I think there's been some miscommunication here - I have not suggested using babel, nor rewriting db-migrate to use ES Modules, nor making a breaking change. My proposal is to keep db-migrate written in CJS, but to be compatible with projects using db-migrate that are written in ESM. The pull request for each of the solutions I suggested would be ~50 lines of code and not change any tooling/compilation for db-migrate - it would not be a rewrite. I agree that CJS works great and there's no need to engage in a huge refactor of db-migrate.
My hope is for db-migrate to be usable by projects whose package.json has "type": "module". To accomplish that, I think the "Alternate solution" I proposed above is the least invasive approach. To summarize it:

db-migrate create checks if the package.json nearest to the migrations directory has "type": "module". If so, db-migrate creates <timestamp>-<name>.cjs instead of <timestamp>-<name>.js files. The generated contents of the file are completely unchanged.
db-migrate up and db-migrate down call require() on migrations/<timestamp-<name>.js OR migrations/<timestamp>-<name>.cjs - whichever one can be loaded. This way, it can keep using require() and doesn't have to switch to import()

One other option that occurred to me, that might be even less invasive:
db-migrate create creates a migrations/package.json file whose contents are {"type": "commonjs"}, if that file doesn't exist. This is just putting @cj1128's excellent solution into db-migrate itself, so that other users don't encounter the error and have to come to this github issue to find a workaround.

would be fine with that, since that would be the better solution, the first suggestion would suffer from scenarios where users switched to this configuration during the process and there are already js migrations that are in the worst case already executed in production, db-migrate already reads the package.json for installed plugins. feel free to shoot me a PR.

👍🏿  I've created #724 which addresses this for the 1.x beta versions.


Support for Numeric character references

Hi,
Is it possible to add support for numeric character references?
For example: <   is the same as < and the same as <
More info about it here: https://www.w3.org/TR/html4/charset.html#h-5.3
Regards,
David

Sorry this has fallen through the cracks.  :-(
Release 0.0.4 now has support for < and &x3c.
So closing this issue.


Deploy code from GitHub

I followed the tutorial and everything is working fine.
However when I try to use DefaultAzureCredential instead of AzureCliCredential, All steps are working except the last one when deploying code from GitHub repository. I get this error:
Operation returned an invalid status 'Not Found'
Content: {"Code":"NotFound","Message":"Cannot find SourceControlToken with name GitHub.","Target":null,"Details":[{"Message":"Cannot find SourceControlToken with name GitHub."},{"Code":"NotFound"},{"ErrorEntity":{"ExtendedCode":"51004","MessageTemplate":"Cannot find {0} with name {1}.","Parameters":["SourceControlToken","GitHub"],"Code":"NotFound","Message":"Cannot find SourceControlToken with name GitHub."}}],"Innererror":null}
The credential is authenticating as a service principal using a client secret with access control to the subscription with role Owner
Do I need another role with more access? because it works when I login with az login and use AzureCliCredential.

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

ID: 1ded5425-f840-6dc7-ee03-8d9745bba378
Version Independent ID: 1ded5425-f840-6dc7-ee03-8d9745bba378
Content: Create and deploy a Python web app to Azure App Service using the Azure SDK libraries - Python on Azure
Content Source: articles/python/sdk/examples/azure-sdk-example-web-app.md
Service: azure-python
GitHub Login: @bobtabor-msft
Microsoft Alias: rotabor

Hi @Hasanofal -- Apologies for the tardy response on this issue, we had an internal mix-up and lost track of a few issues. I've also tried this scenario using DefaultAzureCredential with a service principal and have also experienced problems. I had both owner and contributor roles configured at the subscription level on my service principal and still got an error. I think the issue is related to configuring the Azure service principal to authenticate with GitHub. I've reached out to our product team for help with this.
Can you let me know whether you were able to A) resolve the issue, or B) find a suitable work-around?
Thanks, and again, apologies for the delayed response,
Jimaco

Related to https://github.com/MicrosoftDocs/azure-dev-docs/issues/1248

Hi, thanks for your response.
I haven't found a solution yet but I managed to find a workaround.
First, I download the code from Github as a ZIP file using python requests library.
Then I deploy to Web App from the zip file using Kudu RestAPI.

@JimacoMS4 self reference for tracking

#assign:JimacoMS4

#assign:@JimacoMS4

Hi @Hasanofal -- I reached out to the App Service documentation team and their take is that, currently, you need to go through the portal flow to authorize App Service Build Service with your GitHub account. That would seem to exclude the use of a service principal to set up CI/CD on a web app. That said, you can manually set up CI/CD to use GitHub Actions with a service principal to authenticate with GitHub. This also involves making manual changes to the GH Action workflow in your repo. Once everything is set up, CI/CD will occur running under your service principal. Please see the links in my previous message for more information.
I modified the topic to use External Git deployment rather than CI/CD. Because this form of deployment does not require any authentication or authorization with GitHub as long as it is configured against a public repo, the modified script will work when using DefaultAzureCredential running under both developer credentials (Azure credentials) and a service principal. Please see your other issue for details: https://github.com/MicrosoftDocs/azure-dev-docs/issues/1248. I've left that issue open for any follow up you may have. At this time, I'm going to close this issue.
Thanks very much for your feedback. It really did lead us to making a necessary change in the topic, and it's very much appreciated.
-Jimaco


[settings] loading powerpreview module from subfolder

Summary of the Pull Request

Powerpreview.dll output path changed. this PR loads the dll from the updated output folder.

References

PR Checklist

[x] Applies to #xxx
[] CLA signed. If not, go over here and sign the CLA
[x] Tests added/passed
[x] Requires documentation to be updated
[x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

verified changes in the son file and loading of modules from specified folders.

@laviusmotileng-ms How is this working without this.  Also don't we need the launcher directory?  What is the issue that your seeing?

@enricogior can you look at this too, this is touching runner.

@laviusmotileng-ms How is this working without this. Also don't we need the launcher directory? What is the issue that your seeing?

@ryanbodrug-microsoft you raised an issue that the powerpreview settings were not persisting. When I traced it, I found out that the powerpreview.dll was not loaded, when I checked why, i found out the path to which it is deployed has changed to module/FileExplorerPreview. I updated the runner to load the dll from that sub-directory and it worked. If you're saying that the issue is fixed from the build-features branch then this is not needed.

@laviusmotileng-ms How is this working without this. Also don't we need the launcher directory? What is the issue that your seeing?

Yes, just noticed that Launcher also deploys in a subfolder. I will need to do it for the Launcher too.

@laviusmotileng-ms How is this working without this. Also don't we need the launcher directory? What is the issue that your seeing?

The Microsoft.Launcher.dll which contains the dllmain code is generated under the modules/ directory and not modules/launcher which is why it still gets loaded. In #2589 the output folder for preview pane dlls was changed to avoid the conflict with FZ, but runner only loads the PowerToyModule dlls from the modules folder and not from subfolders by default.

@laviusmotileng-ms How is this working without this. Also don't we need the launcher directory? What is the issue that your seeing?

Yes, just noticed that Launcher also deploys in a subfolder. I will need to do it for the Launcher too.

The Microsoft.Launcher.dll is not created in a subfolder so I don't think it is needed for that case.

I'm sorry I wasn't aware that the toggle option was not working due to this reason. If we don't want to modify the runner I could move the four main dlls (SvgPreviewHandler.dll, PreviewHandlerCommon.dll, MarkdownPreviewHandler.dll and powerPreview.dll) directly under the modules folder and other dependent dlls which were conflicting with Fancyzones to the FileExplorerFolder, just like in launcher.

I'm sorry I wasn't aware that the toggle option was not working due to this reason. If we don't want to modify the runner I could move the four main dlls (SvgPreviewHandler.dll, PreviewHandlerCommon.dll, MarkdownPreviewHandler.dll and powerPreview.dll) directly under the modules folder and other dependent dlls which were conflicting with Fancyzones to the FileExplorerFolder, just like in launcher.

okay, I will abandon (close without merging) this PR then.

@laviusmotileng-ms.  I don't think we need to abandon it.  I just wasn't clear if you were fixing the same issue that we talked about with the settings.   It would be great if you could put a bit more explanation into the description of the PR.  What is the issue (this should be captured in an issue).   I also understand that it couldn't find the dll, that's obvious from the fix.  But whats not clear to me is why this fix impacts the settings.  Also if it can't find this dll why is the preview pane functionality working at all?

@alekhyareddy28 .  I"ll defer to @enricogior here, but I think we want to have the dlls as isolated as possible.   I think your fix in #2589 is valid, we just need to make the runner logic, and folder structure consistent across all powertoys.

@alekhyareddy28 . I"ll defer to @enricogior here, but I think we want to have the dlls as isolated as possible. I think your fix in #2589 is valid, we just need to make the runner logic, and folder structure consistent across all powertoys.

Sounds good.

Isolating the DLLs is a good thing, we didn't have that problem in the beginning, but at present I think each module should be in a subfolder.
This PR is in the right direction, so please go ahead with the change, I'll open an issue to complete the work for other modules in 0.19.

@laviusmotileng-ms can you put this in master.


x/tools/gopls : Prompted with [cannot find package] error in first time import package

What version of Go are you using (go version)?

$ go version go1.15.6 linux/amd64

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
WSL, ubuntu 20.04
neovim, coc.nvim
go env Output
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ngpong/.cache/go-build"
GOENV="/home/ngpong/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ngpong/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/ngpong/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build249756604=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Prompted with [cannot find package] error in first time import package. E.g import "fmt" and prompted with [could not import fmt (cannot find package "fmt" in any of \ /usr/local/go/src/fmt (from $GOROOT) \ /home/ngpong/go/src/fmt (from $GOPATH))]
However, when I exit vim and re-enter, the error message disappears
What did you expect to see?
Don't prompted with [cannot find package] error when i import package in the fist time.
What did you see instead?
When I import some package in the first time, I received this error message in following pic

However, when I re-enter vim, the error messages was disappears

log
-logfile Output
[Trace - 14:23:40.914 PM] Sending request 'initialize - (0)'.
Params: {"processId":31296,"rootPath":"/home/ngpong/go/src/mine","rootUri":"file:///home/ngpong/go/src/mine","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"contextSupport":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true,"parameterInformation":{"labelOffsetSupport":true}}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]}},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"declaration":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{"usePlaceholders":true},"trace":"off","workspaceFolders":[{"uri":"file:///home/ngpong/go/src/mine","name":"mine"}],"clientInfo":{"name":"coc.nvim","version":"0.0.79"},"workDoneToken":"6568a714-9fcd-4259-844a-042d9b9c3ac5"}
[Trace - 14:23:40.915 PM] Received response 'initialize - (0)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["gopls.generate","gopls.fill_struct","gopls.regenerate_cgo","gopls.test","gopls.tidy","gopls.update_go_sum","gopls.undeclared_name","gopls.go_get_package","gopls.add_dependency","gopls.upgrade_dependency","gopls.remove_dependency","gopls.vendor","gopls.extract_variable","gopls.extract_function","gopls.gc_details","gopls.generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{"path":"golang.org/x/tools/gopls","version":"v0.6.1","sum":"h1:vD171EDBkyUVyp9B45IYXklV/VEfbHgX0FKw0Q0dO30=","deps":[{"path":"github.com/BurntSushi/toml","version":"v0.3.1","sum":"h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ="},{"path":"github.com/google/go-cmp","version":"v0.5.1","sum":"h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k="},{"path":"github.com/sergi/go-diff","version":"v1.1.0","sum":"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0="},{"path":"golang.org/x/mod","version":"v0.3.0","sum":"h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4="},{"path":"golang.org/x/sync","version":"v0.0.0-20201020160332-67f06af15bc9","sum":"h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck="},{"path":"golang.org/x/tools","version":"v0.0.0-20201217163546-c88dec5c6b05","sum":"h1:4hzTNH658xirWc4MvAx9HK2/2hY6z42i1+lRK8OzeJE="},{"path":"golang.org/x/xerrors","version":"v0.0.0-20200804184101-5ec99f83aff1","sum":"h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE="},{"path":"honnef.co/go/tools","version":"v0.0.1-2020.1.6","sum":"h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc="},{"path":"mvdan.cc/gofumpt","version":"v0.0.0-20200927160801-5bfeb2e70dd6","sum":"h1:z+/YqapuV7VZPvBb3GYmuEJbA88M3PFUxaHilHYVCpQ="},{"path":"mvdan.cc/xurls/v2","version":"v2.2.0","sum":"h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A="}]}"}}
[Trace - 14:23:40.917 PM] Sending notification 'initialized'.
Params: {}
[Trace - 14:23:40.917 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}
[Trace - 14:23:40.918 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go","languageId":"go","version":1,"text":"package main;\n"}}
[Trace - 14:23:40.923 PM] Sending response 'window/workDoneProgress/create - (1)' in 5ms.
Result:
[Trace - 14:23:40.923 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}
[Trace - 14:23:40.923 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///home/ngpong/go/src/mine","section":"gopls"}]}
[Trace - 14:23:40.924 PM] Sending response 'workspace/configuration - (2)' in 0ms.
Result: [null]
[Trace - 14:23:41.032 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/12/20 14:23:41 go env for /home/ngpong/go/src/mine\n(root /home/ngpong/go/src/mine)\n(go version go version go1.15.6 linux/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOPRIVATE=\nGOFLAGS=\nGOCACHE=/home/ngpong/.cache/go-build\nGOMODCACHE=/home/ngpong/go/pkg/mod\nGOPATH=/home/ngpong/go\nGOPROXY=https://proxy.golang.org,direct\nGO111MODULE=on\nGOSUMDB=sum.golang.org\nGOMOD=/dev/null\nGOINSECURE=\nGONOPROXY=\nGONOSUMDB=\nGOROOT=/usr/local/go\n\n"}
[Trace - 14:23:41.095 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/12/20 14:23:41 initial workspace load failed: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./... builtin]: exit status 1: go: cannot find main module; see 'go help modules'\n: packages.Load error\n"}
[Trace - 14:23:41.095 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"end","message":"Finished loading packages."}}
[Trace - 14:23:41.095 PM] Received request 'window/workDoneProgress/create - (4)'.
Params: {"token":"8674665223082153551"}
[Trace - 14:23:41.095 PM] Received request 'client/registerCapability - (3)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 14:23:41.095 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/12/20 14:23:41 go/packages.Load: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./... builtin]: exit status 1: go: cannot find main module; see 'go help modules'\n\n\tsnapshot=0\n\tdirectory=/home/ngpong/go/src/mine\n\tquery=[./... builtin]\n\tpackages=0\n"}
[Trace - 14:23:41.096 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/12/20 14:23:41 errors loading workspace: go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./... builtin]: exit status 1: go: cannot find main module; see 'go help modules'\n: packages.Load error\n\tsnapshot=0\n\tdirectory=file:///home/ngpong/go/src/mine\n"}
[Trace - 14:23:41.096 PM] Sending response 'window/workDoneProgress/create - (4)' in 0ms.
Result:
[Trace - 14:23:41.096 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"begin","title":"Error loading workspace","message":"go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./... builtin]: exit status 1: go: cannot find main module; see 'go help modules' : packages.Load error"}}
[Trace - 14:23:41.101 PM] Sending response 'client/registerCapability - (3)' in 5ms.
Result:
[Trace - 14:23:41.102 PM] Received request 'client/registerCapability - (5)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}
[Trace - 14:23:41.102 PM] Sending response 'client/registerCapability - (5)' in 0ms.
Result:
[Trace - 14:23:41.275 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/12/20 14:23:41 go/packages.Load\n\tsnapshot=1\n\tdirectory=/home/ngpong/go/src/mine\n\tquery=[file=/home/ngpong/go/src/mine/main.go]\n\tpackages=1\n"}
[Trace - 14:23:41.275 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/12/20 14:23:41 go/packages.Load\n\tsnapshot=1\n\tpackage_path="command-line-arguments"\n\tfiles=[/home/ngpong/go/src/mine/main.go]\n"}
[Trace - 14:23:41.526 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"end","message":"Done."}}
[Trace - 14:23:41.783 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":2,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"rangeLength":0,"text":"\n"}]}
[Trace - 14:23:41.936 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":3,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"rangeLength":0,"text":"\n"}]}
[Trace - 14:23:42.137 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":4,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"rangeLength":0,"text":"p"}]}
[Trace - 14:23:42.138 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":4,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found p"}]}
[Trace - 14:23:42.240 PM] Sending request 'textDocument/completion - (1)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":1},"context":{"triggerKind":1}}
[Trace - 14:23:42.240 PM] Received response 'textDocument/completion - (1)' in 0ms.
Result: {"isIncomplete":false,"items":[]}
[Trace - 14:23:42.258 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":5,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":1},"end":{"line":2,"character":1}},"rangeLength":0,"text":"a"}]}
[Trace - 14:23:42.258 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":5,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pa"}]}
[Trace - 14:23:42.382 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":6,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":2},"end":{"line":2,"character":2}},"rangeLength":0,"text":"c"}]}
[Trace - 14:23:42.383 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":6,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pac"}]}
[Trace - 14:23:42.465 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":7,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":3},"end":{"line":2,"character":3}},"rangeLength":0,"text":"k"}]}
[Trace - 14:23:42.466 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":7,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pack"}]}
[Trace - 14:23:42.565 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":8,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":4}},"rangeLength":0,"text":"a"}]}
[Trace - 14:23:42.566 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":8,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found packa"}]}
[Trace - 14:23:43.685 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":9,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":5}},"rangeLength":1,"text":""}]}
[Trace - 14:23:43.686 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":9,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pack"}]}
[Trace - 14:23:43.814 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":10,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":3},"end":{"line":2,"character":4}},"rangeLength":1,"text":""}]}
[Trace - 14:23:43.816 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":10,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pac"}]}
[Trace - 14:23:43.960 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":11,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":2},"end":{"line":2,"character":3}},"rangeLength":1,"text":""}]}
[Trace - 14:23:43.960 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":11,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found pa"}]}
[Trace - 14:23:44.080 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":12,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":1},"end":{"line":2,"character":2}},"rangeLength":1,"text":""}]}
[Trace - 14:23:44.081 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":12,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found p"}]}
[Trace - 14:23:44.206 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":13,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":1}},"rangeLength":1,"text":""}]}
[Trace - 14:23:44.207 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":13,"diagnostics":[]}
[Trace - 14:23:44.327 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":14,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"rangeLength":0,"text":"i"}]}
[Trace - 14:23:44.328 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":14,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found i"}]}
[Trace - 14:23:44.433 PM] Sending request 'textDocument/completion - (2)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":1},"context":{"triggerKind":1}}
[Trace - 14:23:44.434 PM] Received response 'textDocument/completion - (2)' in 0ms.
Result: {"isIncomplete":true,"items":[{"label":"import","kind":14,"preselect":true,"sortText":"00000","filterText":"import","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":1}},"newText":"import"}}]}
[Trace - 14:23:44.468 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":15,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":1},"end":{"line":2,"character":1}},"rangeLength":0,"text":"m"}]}
[Trace - 14:23:44.468 PM] Sending request 'textDocument/completion - (3)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":2},"context":{"triggerKind":3}}
[Trace - 14:23:44.468 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":15,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found im"}]}
[Trace - 14:23:44.469 PM] Received response 'textDocument/completion - (3)' in 0ms.
Result: {"isIncomplete":true,"items":[{"label":"import","kind":14,"preselect":true,"sortText":"00000","filterText":"import","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":2}},"newText":"import"}}]}
[Trace - 14:23:44.614 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":16,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":2},"end":{"line":2,"character":2}},"rangeLength":0,"text":"p"}]}
[Trace - 14:23:44.614 PM] Sending request 'textDocument/completion - (4)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":3},"context":{"triggerKind":3}}
[Trace - 14:23:44.615 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":16,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found imp"}]}
[Trace - 14:23:44.615 PM] Received response 'textDocument/completion - (4)' in 0ms.
Result: {"isIncomplete":true,"items":[{"label":"import","kind":14,"preselect":true,"sortText":"00000","filterText":"import","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":3}},"newText":"import"}}]}
[Trace - 14:23:44.739 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":17,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":3},"end":{"line":2,"character":3}},"rangeLength":0,"text":"o"}]}
[Trace - 14:23:44.739 PM] Sending request 'textDocument/completion - (5)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":4},"context":{"triggerKind":3}}
[Trace - 14:23:44.739 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":17,"diagnostics":[{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":0}},"severity":1,"source":"syntax","message":"expected declaration, found impo"}]}
[Trace - 14:23:44.739 PM] Received response 'textDocument/completion - (5)' in 0ms.
Result: {"isIncomplete":true,"items":[{"label":"import","kind":14,"preselect":true,"sortText":"00000","filterText":"import","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":0},"end":{"line":2,"character":4}},"newText":"import"}}]}
[Trace - 14:23:44.889 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":18,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":4},"end":{"line":2,"character":4}},"rangeLength":0,"text":"rt"}]}
[Trace - 14:23:44.890 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":18,"diagnostics":[{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"severity":1,"source":"syntax","message":"expected ';', found 'EOF'"}]}
[Trace - 14:23:45.252 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":19,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":6},"end":{"line":2,"character":6}},"rangeLength":0,"text":" "}]}
[Trace - 14:23:45.439 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":20,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"rangeLength":0,"text":"""}]}
[Trace - 14:23:45.439 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":20,"diagnostics":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"severity":1,"source":"syntax","message":"invalid import path: ""}]}
[Trace - 14:23:45.655 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":21,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":8}},"rangeLength":0,"text":"f"}]}
[Trace - 14:23:45.656 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":21,"diagnostics":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"severity":1,"source":"syntax","message":"invalid import path: "f"}]}
[Trace - 14:23:45.756 PM] Sending request 'textDocument/completion - (6)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":9},"context":{"triggerKind":1}}
[Trace - 14:23:45.768 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":22,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":9},"end":{"line":2,"character":9}},"rangeLength":0,"text":"m"}]}
[Trace - 14:23:45.834 PM] Received response 'textDocument/completion - (6)' in 77ms.
Result: {"isIncomplete":true,"items":[{"label":"flag"","kind":9,"detail":""flag"","preselect":true,"sortText":"00000","filterText":"flag"","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":9}},"newText":"flag""}},{"label":"fmt"","kind":9,"detail":""fmt"","sortText":"00001","filterText":"fmt"","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":9}},"newText":"fmt""}}]}
[Trace - 14:23:45.834 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":22,"diagnostics":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":7}},"severity":1,"source":"syntax","message":"invalid import path: "fm"}]}
[Trace - 14:23:45.835 PM] Sending request 'textDocument/completion - (7)'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"},"position":{"line":2,"character":10},"context":{"triggerKind":3}}
[Trace - 14:23:45.835 PM] Received response 'textDocument/completion - (7)' in 0ms.
Result: {"isIncomplete":true,"items":[{"label":"fmt"","kind":9,"detail":""fmt"","preselect":true,"sortText":"00000","filterText":"fmt"","insertTextFormat":2,"textEdit":{"range":{"start":{"line":2,"character":8},"end":{"line":2,"character":10}},"newText":"fmt""}}]}
[Trace - 14:23:46.348 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"version":23,"uri":"file:///home/ngpong/go/src/mine/main.go"},"contentChanges":[{"range":{"start":{"line":2,"character":10},"end":{"line":2,"character":10}},"rangeLength":0,"text":"t""}]}
[Trace - 14:23:46.555 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/12/20 14:23:46 go/packages.Load\n\tsnapshot=23\n\tdirectory=/home/ngpong/go/src/mine\n\tquery=[file=/home/ngpong/go/src/mine/main.go]\n\tpackages=1\n"}
[Trace - 14:23:46.555 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/12/20 14:23:46 go/packages.Load\n\tsnapshot=23\n\tpackage_path="command-line-arguments"\n\tfiles=[/home/ngpong/go/src/mine/main.go]\n"}
[Trace - 14:23:46.555 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/ngpong/go/src/mine/main.go","version":23,"diagnostics":[{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":12}},"severity":1,"source":"compiler","message":""fmt" imported but not used"},{"range":{"start":{"line":2,"character":7},"end":{"line":2,"character":12}},"severity":1,"source":"compiler","message":"could not import fmt (cannot find package "fmt" in any of \n\t/usr/local/go/src/fmt (from $GOROOT)\n\t/home/ngpong/go/src/fmt (from $GOPATH))"}]}
[Trace - 14:23:47.160 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go","version":23}}
[Trace - 14:23:49.505 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go","version":23}}
[Trace - 14:23:49.507 PM] Sending notification 'textDocument/didClose'.
Params: {"textDocument":{"uri":"file:///home/ngpong/go/src/mine/main.go"}}

It looks like you have set GO111MODULE=on, but you are working in your GOPATH? Does setting GO111MODULE=auto or initializing a module resolve the problem?

It looks like you have set GO111MODULE=on, but you are working in your GOPATH. Does setting GO111MODULE=auto or initializing a module resolve the problem?

Dosen't work, But I found that if the go.mod file exists in the current directory, gopls will run as expected

Yep, initializing a module should resolve the issue. Ok to close this?


Wrapper for asyncio

Hello,
Thank you for your great library and I'm looking forward to new Cython version.
I'm interested in io_uring, and now I've been writing a asyncio wrapper for this library and file operation API.
https://github.com/tree4096/uring_file (forked from https://github.com/qweeze/uring_file)
Can I contribute my code on your library or community of io_uring developers?
After implemeting some optimization, I achieved relatively better performance than other async file I/O libs such as aiofiles, aiofile, and anyio.
The results of performance test as below.
Test code
https://github.com/tree4096/uring_file/blob/master/performance_test.py
Writing Test

Library
Time [s]
Process Time [s]

anyio
10.69
15.62

aiofiles
4.47
6.19

uring_file :star:
1.92
1.88

aiofile*
7.51
15.08

Reading Test

Library
Time [s]
Process Time [s]

anyio
0.482
0.816

aiofiles
0.349
0.623

uring_file :star:
0.118
0.118

aiofile*
0.473
0.828

*aiofile has Linux AIO mode, but does not work on Ubuntu due to the bug. So it run on C threading mode.
Environment
OS: Ubuntu 20.04.4 LTS on WSL2
Kernel ver.: <IP_ADDRESS>-microsoft-standard-WSL2
CPU: AMD Ryzen 7 5800U
SSD: MTFDHBA1T0TDV-1AZ1AABHA
Python ver.: 3.10.5
My library provides simple and efficient APIs to access the io_uring like a database session and the file I/O APIs are written over them.
Here is the sample code.
# Create new Uring
uring = uring_file.Uring(sq_size=8, cq_size=64, session_sq_size=4)

# Get SQE and submit (Open file)
async with uring.session() as session:
    sqe = session.get_sqe()
    sqe.prep_openat(liburing.AT_FDCWD, b"hello.txt", os.O_RDONLY, 0o644)

# Get result of CQE
fd = sqe.result()
print("FD:", fd)

# Close file
async with uring.session() as session:
    # Raw SQE object can be accessed from the _sqe property
    liburing.io_uring_prep_close(session.get_sqe()._sqe, fd)
    # Same expression as session.get_sqe().prep_close(fd)

# Get default Uring
default_uring = uring_file.get_default_uring()

The SQEs of the sessions are automatically merged and submitted together under high frequency access, and I call it "auto bulk submit".
The auto bulk submit is realized by controlling the task scheduling of asyncio in a little hacky way and it makes large performance improvement.
And the overflow protection for the CQ is also implemented by using Semaphore.
I'm not sure because I'm just a beginner but I think these APIs may be useful for developing the io_uring applications on Python.
If you are interested in my library, could you give me some comments or advice?

@tree4096
Sorry for getting back to you so late. I took some time off from coding.
Its great that you have created an asyncio wrapper.
This library is meant to be low level and for developers(such as yourself) to write their own library on top of it.
That being said soon going to be updating this project to cython. Also planning on creating user-friendly library where you can do:

    async with open(path) as file:
        await file.read()


[BUG] Crash When Deleting Header

If you try to delete a header lets say user-agent header with 'd' button. You get this error:
thread 'main' panicked at /home/tahinli/.cargo/registry/src/index.crates.io-6f17d22bba15001f/atac-0.18.0/src/app/business_logic/request/utils.rs:15:60: index out of bounds: the len is 1 but the index is 1

Fixed in https://github.com/Julien-cpsn/ATAC/commit/e3287f2bec54b8088df7bd55699bc4dc787c5eb9


Error pulling image ... ApplyLayer fork/exec ... /usr/bin/docker: cannot allocate memory

Getting the following error once in a while when doing a git push deis:
Aug 09 19:17:13 ip-10-21-1-251.ec2.internal sh[27909]: 8a497e4d8449: Pulling metadata
Aug 09 19:17:14 ip-10-21-1-251.ec2.internal sh[27909]: 8a497e4d8449: Pulling fs layer
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal sh[27909]: 8a497e4d8449: Error downloading dependent layers
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal sh[27909]: 78a282e472b1: Error pulling image (v3) from <IP_ADDRESS>:5000/livenet-blue, endpoint: http://<IP_ADDRESS>:5000/v1/, ApplyLayer fork/exec /usr/bin/docker: cannot allocate memory stdout:  stderr:
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal sh[27909]: 78a282e472b1: Error pulling image (v3) from <IP_ADDRESS>:5000/livenet-blue, ApplyLayer fork/exec /usr/bin/docker: cannot allocate memory stdout:  stderr:
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal sh[27909]: time="2015-08-09T19:17:27Z" level="fatal" msg="Error pulling image (v3) from <IP_ADDRESS>:5000/livenet-blue, ApplyLayer fork/exec /usr/bin/docker: cannot allocate memory stdout:  stderr: "
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal systemd[1]: livenet-blue_v3.web.1.service: control process exited, code=exited status=1
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal systemd[1]: Failed to start livenet-blue_v3.web.1.
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal systemd[1]: Unit livenet-blue_v3.web.1.service entered failed state.
Aug 09 19:17:27 ip-10-21-1-251.ec2.internal systemd[1]: livenet-blue_v3.web.1.service failed.

deis v1.7.3
The machine it is starting on still seems to have memory. The image is relatively large though this appears to be RAM related?
core@ip-10-21-1-251 ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:          7517       7456         60         22        516        700
-/+ buffers/cache:       6239       1277
Swap:            0          0          0

core@ip-10-21-1-251 ~ $ docker -v
Docker version 1.5.0, build a8a31ef-dirty

Well I noticed I posted the same issue here before and since it is probably not an issue with deis itself, going to close this.

It's upstream issue with docker, it's fixed in 1.7.1(?). You have to restart dockerd from time to time, which will result in containers reboot on host.

@szymonpk oh thanks! Any ideas how I would update docker on my CoreOS machines without removing them entirely? (I have 4 machines)

Just don't do it, as I wrote on irc - docker 1.6.2 have issues with pulling(or pushing?) multiple images from private registry. 1.7.1 may fix this but it's in alpha of coreos. @carmstrong wrote, when 1.7.1 is in coreos stable they will test it and there is non-zero chance to see it in 1.10 but no hard promises.

@szymonpk thanks, can wait until later. I'll restart dockerd once in a while as a workaround. Or maybe write a fleet unit that does this for me.

Closing, as this should now be fixed with the latest release.

Great thanks!


cant get your software working :(

I am trying to load a schematic and save it as a X3D file
the usage instruction are incomplete
#!/usr/bin/env python2
import BlockModel
Block_Model = BlockModel.from_schematic_file("./test.schematic", max_size=None)
Block_Model.save_as_x3d("./test.x3d")

Traceback (most recent call last):
File "./test.py", line 2, in
import BlockModel
ImportError: No module named BlockModel
#!/usr/bin/env python2
import blockmodel
Block_Model = blockmodel.from_schematic_file("./test.schematic", max_size=None)
Block_Model.save_as_x3d("./test.x3d")

Traceback (most recent call last):
File "./test.py", line 3, in
Block_Model = blockmodel.from_schematic_file("./test.schematic", max_size=None)
AttributeError: 'module' object has no attribute 'from_schematic_file'

try
from blockmodel import BlockModel
model = BlockModel.from_schematic_file("./test.schematic", max_size=None)
This should work.
blockmodel is the module, BlockModel is a class and from_schematic_file a classmethod on BlockModel

it works :)


Support for image widgets

It would be good to have a proper placement of image widgets, so even if the image button has been removed, an image component can be used without it having to be a button per-se

@balancedwolf Actually image-based buttons were removed from raygui a while ago. Use of external images/textures is out-of-scope for this project. It should be implemented on user side.


Update README.md

This being listed as a feature cost me about 6 hours of searching for why no web clients were connecting.
As someone new to the project, I didn't realize there was another client node with webrtc, and I didn't see this because I wasn't interested in node only features, I wanted to connect to web clients only

Thanks for the PR, and sorry you lost 6 hours. Next time, pop into IRC or Gitter (links in the Readme) and ask for help.

No worries, it happens, it wasn't a full six hours of troubleshooting, but did prevent progress. Other than that snag, WebTorrent has been great to work with! Huge fan of the project.

Awesome!


lobster: fix updateScript, unstable-2020-10-04 -> unstable-2020-12-25

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 112585 run on x86_64-darwin 1

1 package built:

lobster


code 1.26 rpm package is not signed

VSCode Version: 1.26.0
OS Version: opensuse tumbleweed, kernal 4.17.13-1-default x86_64

Steps to Reproduce:

download code-1.26.0-1534177943.el7.x86_64.rpm file from code.visualstudio.com
sudo zypper install code-1.26.0-1534177943.el7.x86_64.rpm

Does this issue occur when all extensions are disabled?: Yes

However I succeed in installing from yum repository following the instructions here: openSUSE and SLE based distributions


Bugfix Stored Cross-Site Scripting (XSS)

📊 Metadata *
Please enter the direct URL for this bounty on huntr.dev. This is compulsory and will help us process your bounty submission quicker.
Bounty URL: https://huntr.dev/bounties/1-npm-list.js
⚙ Description *
Javascript doesn't provide an API to encode HTML so it is needed to implement that conversion from string to HTML entities.
💻 Technical Description *
It converts non-word characters to HTML entities.
For instance  would be converted to <img src=x onerror=alert(1)>,
which code is after interpreted correctly by the browser.
🐛 Proof of Concept (PoC) *

Jonny

Stockholm

🔥 Proof of Fix (PoF) *

Jonny

Stockholm

👍 User Acceptance Testing (UAT)
Run a unit test or a legitimate use case to prove that your fix does not introduce breaking changes.

👋 Hello, @javve. @mluis has opened a PR to us with a fix for a potential vulnerability in your repository. To view the vulnerability, please refer to the bounty URL in the first comment, above. If you want this fix in your repository, a PR will automatically open once you comment:
@huntr-helper - LGTM

☎ Need further support?
Come and join us on our community Discord!

❓@javve - want more fixes like this?
Copy this snippet into your README.md for more vulnerability fixes in the future:
[![huntr](https://cdn.huntr.dev/huntr_security_badge_mono.svg)](https://huntr.dev)


Directory does not fit in FAT16 (capacity 516.06 MB)

Hi @razr,
i'm keeping updated and i have already tried the new patch, following all operations in the README with the correct skd linked above, make operation works fine!
Proceeded on the next section and again followed the instructions, i have just run this command:
First attempt run:
sudo qemu-system-x86_64 -m 512M  -kernel /home/rosdev/Desktop/wrsdk-vxworks7-up2/bsps/itl_generic_2_0_2_1/boot/vxWorks -net nic  -net tap,ifname=tap0,script=no,downscript=no -display none -serial stdio -monitor none -append "bootline:fs(0,0)host:vxWorks h=<IP_ADDRESS> e=<IP_ADDRESS> u=target pw=boot o=gei0" -usb -device usb-ehci,id=ehci  -device usb-storage,drive=fat32 -drive file=fat:ro:./export/deploy,id=fat32,format=raw,if=none
I have put my path to the vxWorks directory, just copied the command directly from the README and i received this error:
qemu-system-x86_64: -drive file=fat:ro:./export/deploy,id=fat32,format=raw,if=none: Directory does not fit in FAT16 (capacity 516.06 MB)
After that i changed something:
qemu-system-x86_64 -m 1024M  -kernel /home/rosdev/Desktop/wrsdk-vxworks7-up2/bsps/itl_generic_2_0_2_1/boot/vxWorks -net nic  -net tap,ifname=tap0,script=no,downscript=no -display none -serial stdio -monitor none -append "bootline:fs(0,0)host:vxWorks h=<IP_ADDRESS> e=<IP_ADDRESS> u=target pw=boot o=gei0" -usb -device usb-ehci,id=ehci  -device usb-storage,drive=fat32 -drive file=./export/example.img,id=fat32,format=raw,if=none
I created example.img, put it on /export/ (/export/example.img) and activated VxWorks, it starts. Inside i've run devs and observed between all devices: /bd0, but i'm still not able to open /export/deploy.
I have also tried different configurations changing file=fat:ro to to file=fat:rw and so on but i can't actually make it start.
Maybe i'm missing something i can't see.
Thanks again for your attention.
Originally posted by @enriLoniterp in https://github.com/Wind-River/vxworks7-ros2-build/issues/14#issuecomment-1169799961

@enriLoniterp this is strange since it shows
$ du -sh export/deploy/
494M    export/deploy/

@enriLoniterp please check my pull request. I think you need to
sudo apt-get install dosfstools

Thanks for reporting it.


No audio when playing video

Hey there.  I've got the most recent release of ACDDokanNet installed on Windows Server 2012 R2 with Dokany 1.0.1.  Everything seems to be working well, with the exception of playing video.
When I start a video, the video plays fine, no issues whatsoever, but there is no audio.  The video player detects the audio track correctly and believes that it's actually playing the audio, but there is no audio that comes through.  Then if I copy that exact same file from the virtual drive to somewhere local (say, my Desktop) and play it, the audio plays fine.
I first noticed the problem when attempting to play a video from Plex, however I've since realized it's not just limited to Plex and actually is an issue in VLC as well.
Is this a known issue by chance?  I have found no other posts online regarding this issue, so I'm at a loss as to where to go from here.  Are there any troubleshooting steps I can take to assist in identifying/resolving the issue?  I've exported the logs and have found that there are no errors or any other events generated when the audio fails to play, so I'm not including it with this issue submission.
Thank you!

If I don't remember wrong Windows Server should not have the audio service
started automatically on boot.
On Nov 10, 2016 5:51 PM, "Connor Kennedy"<EMAIL_ADDRESS>wrote:

Hey there. I've got the most recent release of ACDDokanNet installed on
Windows Server 2012 R2 with Dokany 1.0.1. Everything seems to be working
well, with the exception of playing video.
When I start a video, the video plays fine, no issues whatsoever, but
there is no audio. The video player detects the audio track correctly and
believes that it's actually playing the audio, but there is no audio that
comes through. Then if I copy that exact same file from the virtual drive
to somewhere local (say, my Desktop) and play it, the audio plays fine.
I first noticed the problem when attempting to play a video from Plex,
however I've since realized it's not just limited to Plex and actually is
an issue in VLC as well.
Is this a known issue by chance? I have found no other posts online
regarding this issue, so I'm at a loss as to where to go from here. Are
there any troubleshooting steps I can take to assist in
identifying/resolving the issue? I've exported the logs and have found that
there are no errors or any other events generated when the audio fails to
play, so I'm not including it with this issue submission.
Thank you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Rambalac/ACDDokanNet/issues/36, or mute the thread
https://github.com/notifications/unsubscribe-auth/AF05v-vJXebEPds04TKeZt90WZWihOE1ks5q80uegaJpZM4Ku4wu
.

Wow, you learn something new every day.  That was the fix.  I've been managing Windows machines for quite a while but I had no knowledge of the windows audio service at all.  I started it up and the audio worked like a charm.  Sorry to make an unnecessary issue.  Thanks a ton!

Since when video works fine o_O

The video played fine, it just didn't have audio.  Starting the audio service fixed it though.  I was a bit surprised that I had to enable the audio service because local plex videos play fine without it, but it's working now so I'm not complaining haha


This extension is enabled in the local extension host because it prefers to run there

Hello!
I'm trying to use your great extension within WSL: Ubuntu 20.04, but i can't, there is an "error" message:
"This extension is enabled in the local extension host because it prefers to run there"
An idea ?

I don't use remote. Is it not working if you use it as a UI extension (delete it on the remote).
Or you can try to set in settings.json:
"remote.extensionKind": {
	"usernamehw.errorlens": [
		"workspace",
		"ui"
	],
},


setLinearVelocity doesn't set the linear velocity, instead causes acceleration.

When using setLinearVelocity I would expect the behaviour to immediately set the linear-velocity to the provided value. We are trying to use this to simulate moving a Platformer character with some "Arcade" feel to it, but still using Box2D as it has a lot of great futures we use elsewhere.
Below you can see the testbed code that I used to test this, using the A and D keys to move the character, you can see the Linear Velocity being damped between -2 and 2 even if you set dampening to 0 on the "motor".
https://piqnt.com/space/3OxJmyn3x
/*
 * Copyright (c) 2016-2018 Ali Shakiba http://shakiba.me/planck.js
 * Copyright (c) 2008-2014 Erin Catto  http://www.box2d.org
 *
 * This software is provided 'as-is', without any express or implied
 * warranty.  In no event will the authors be held liable for any damages
 * arising from the use of this software.
 * Permission is granted to anyone to use this software for any purpose,
 * including commercial applications, and to alter it and redistribute it
 * freely, subject to the following restrictions:
 * 1. The origin of this software must not be misrepresented; you must not
 * claim that you wrote the original software. If you use this software
 * in a product, an acknowledgment in the product documentation would be
 * appreciated but is not required.
 * 2. Altered source versions must be plainly marked as such, and must not be
 * misrepresented as being the original software.
 * 3. This notice may not be removed or altered from any source distribution.
 */

planck.testbed('CharacterMovement', function(testbed) {
  var Edge = planck.Edge, Box = planck.Box, Vec2 = planck.Vec2, Circle = planck.Circle, RevoluteJoint = planck.RevoluteJoint;
  var world = new planck.World(Vec2(0, -9.81));

  // Create the floor.
  var floor = world.createBody();
  floor.createFixture(Edge(Vec2(-30, 0), Vec2(30, 0)));
  floor.setPosition(Vec2(0, 0));

  // Create the character.
  // Create the wheel "motor"
  let motor = world.createDynamicBody();
  motor.createFixture(Circle(1), 2.0);
  motor.setPosition(Vec2(0, 1));

  // Create the body
  let torso = world.createDynamicBody();
  torso.setFixedRotation(true);
  torso.setPosition(Vec2(0, 3));
  torso.createFixture(Box(1, 2));

  // Create the join that connects them
  let joint = RevoluteJoint({}, torso, motor, Vec2(0, 1));
  world.createJoint(joint);

  testbed.keydown = function(keycode, label) {
    let currentVelocity = motor.getLinearVelocity();
    switch(label) {
      case 'A':
          motor.setLinearVelocity(Vec2(-2, currentVelocity.y));
        break;
      case 'D':
          motor.setLinearVelocity(Vec2(2, currentVelocity.y));
        break;
    }
  }

  testbed.info('A: Move Left');
  testbed.info('D: Move Right');

  return world;
});

I guess part of the energy is being consumed by the joint and friction/gravity, for example if you set gravity to zero and set velocity to both bodies it works as you expect: https://piqnt.com/space/D5ALkAkCz
One solution without changing gravity is to set velocity in every frame: https://piqnt.com/space/TTggQizXW

I guess part of the energy is being consumed by the joint and friction/gravity, for example if you set gravity to zero and set velocity to both bodies it works as you expect: https://piqnt.com/space/D5ALkAkCz
One solution without changing gravity is to set velocity in every frame: https://piqnt.com/space/TTggQizXW

Thanks for the response, I've managed to get a much better implementation working now using Impulses :) First time working with Physics so it's been an experience!

Thanks for the response, I've managed to get a much better implementation working now using Impulses :) First time working with Physics so it's been an experience!


Fix up package searching rules

There are rules that are meant to be searching for a refences in any way to a particular package. These searches need to be updated to use the new package location to function correctly.
We see these in many of the catchall rules.

requires https://github.com/konveyor/analyzer-lsp/pull/316

https://github.com/search?q=repo%3Akonveyor%2Frulesets **&type=code
and
https://github.com/search?q=repo%3Akonveyor%2Frulesets+.*&type=code
That is list is a decent list to start with


[24.05] Build failure: ffmpeg_7-full

Steps To Reproduce
Steps to reproduce the behavior:

build ffmpeg_7-full on aarch64-darwin.

Build log
CC      tests/checkasm/v210dec.o
1 warning generated.
CC      tests/checkasm/v210enc.o
CC      tests/checkasm/vc1dsp.o
CC      tests/checkasm/vf_blend.o
CC      tests/checkasm/vf_bwdif.o
CC      tests/checkasm/vf_colorspace.o
CC      tests/checkasm/vf_convolution.o
CC      tests/checkasm/vf_eq.o
18 warnings generated.
CC      tests/checkasm/vf_gblur.o
CC      tests/checkasm/vf_hflip.o
CC      tests/checkasm/vf_nlmeans.o
CC      tests/checkasm/vf_threshold.o
CC      tests/checkasm/videodsp.o
CC      tests/checkasm/vorbisdsp.o
CC      tests/checkasm/vp8dsp.o
CC      tests/checkasm/vp9dsp.o
CC      tests/checkasm/vvc_mc.o
AR      libavdevice/libavdevice.a
AR      libpostproc/libpostproc.a
CC      tests/api/api-threadmessage-test.o
CC      tests/api/api-flac-test.o
CC      tests/api/api-seek-test.o
HOSTCC  tests/audiogen.o
HOSTCC  tests/videogen.o
COPY    tests/data/filtergraphs/anequalizer
COPY    tests/data/filtergraphs/firequalizer
COPY    tests/data/filtergraphs/compand
COPY    tests/data/filtergraphs/channelmap_one_int
GEN     tests/data/hls-list.m3u8
GEN     tests/data/hls-list-append.m3u8
COPY    tests/data/filtergraphs/channelmap_one_str
COPY    tests/data/filtergraphs/overlay
COPY    tests/data/filtergraphs/overlay_rgb
make: *** [tests/fate/filter-audio.mak:209: tests/data/hls-list.m3u8] Error 134
make: *** Waiting for unfinished jobs....
make: *** [tests/fate/filter-audio.mak:219: tests/data/hls-list-append.m3u8] Error 134

Additional context
This is an issue something to with ffmpeg internals with nix on aarch64-darwin.
Notify maintainers
@Atemu, @arthsmn @jopejoe1
Metadata
warning: ignoring untrusted substituter 'https://nix-community.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.0.0, macOS 15.0`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.23.3`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

This was fixed on unstable by the following prs #322724 #328424 #329380, but this was not backported to 24.05.

I have updated my channel trying to build the package again.

But I am on unstable anyways so this shouldn't be a problem.

I just had to update my channel and that seemed to fix the issue.
For flake update using nix flake update and non-flakes use nix-channel --update

I also just checked nixos-24.05 just to be sure and ffmpeg_7-full builds just fine.

I also just checked nixos-24.05 just to be sure and ffmpeg_7-full builds just fine.

Strange i was checking hydra and the build for ffmpeg_7-full on darwin-24.05 was failing.
https://hydra.nixos.org/job/nixpkgs/nixpkgs-24.05-darwin/ffmpeg_7-full.aarch64-darwin

Ohhh, darwin. Right.
Not sure whether we want to bother backporting that. I don't think it's worth it personally.

Ohhh, darwin. Right.
Not sure whether we want to bother backporting that. I don't think it's worth it personally.

It's failing at make: *** [tests/fate/filter-audio.mak:209: tests/data/hls-list.m3u8] Error 134 for aarch64-darwin.
x86_64 stripped errors:
libavdevice/avfoundation.m:765:41: error: must use 'enum' tag to refer to type 'AVMediaType'
static NSArray* getDevicesWithMediaType(AVMediaType mediaType) {
                                        ^
                                        enum
libavdevice/avfoundation.m:816:50: error: incompatible integer to pointer conversion sending 'enum AVMediaType' to parameter of type 'NSString *' [-Wint-conversion]
    return [AVCaptureDevice devicesWithMediaType:mediaType];
                                                 ^~~~~~~~~
libavdevice/avfoundation.m:829:54: error: incompatible pointer to integer conversion passing 'NSString *const' to parameter of type 'enum AVMediaType' [-Wint-conversion]
    NSArray *devices       = getDevicesWithMediaType(AVMediaTypeVideo);
                                                     ^~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:830:54: error: incompatible pointer to integer conversion passing 'NSString *const' to parameter of type 'enum AVMediaType' [-Wint-conversion]
    NSArray *devices_muxed = getDevicesWithMediaType(AVMediaTypeMuxed);
                                                     ^~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:865:43: error: incompatible pointer to integer conversion passing 'NSString *const' to parameter of type 'enum AVMediaType' [-Wint-conversion]
        devices = getDevicesWithMediaType(AVMediaTypeAudio);
                                          ^~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:989:52: error: incompatible pointer to integer conversion passing 'NSString *const' to parameter of type 'enum AVMediaType' [-Wint-conversion]
        NSArray *devices = getDevicesWithMediaType(AVMediaTypeAudio);
                                                   ^~~~~~~~~~~~~~~~
libavdevice/avfoundation.m:1002:52: error: incompatible pointer to integer conversion passing 'NSString *const' to parameter of type 'enum AVMediaType' [-Wint-conversion]
        NSArray *devices = getDevicesWithMediaType(AVMediaTypeAudio);
                                                   ^~~~~~~~~~~~~~~~

make: *** [ffbuild/common.mak:87: libavdevice/avfoundation.o] Error 1

We know the cause (it's already fixed on unstable), we're just deliberating whether we should bother to backport because it was broken on 24.05 from the beginning.
Given @jopejoe1 appears to have the same opinion as me, I don't think we will.


Connecting to production server

How would you connect an app to a production server?
I changed this line:
let METEOR_URL = 'ws://localhost:3000/websocket';
to:
let METEOR_URL = 'ws://example.com/websocket';
But it didn't work for me.
Feel like I'm missing something small here.

If you want to connect to the production server you will want to change this line to something like let METEOR_URL = 'ws://example.com/websocket';
However, if the app has been build for deployment for the app stores you want to change this line to something like let METEOR_URL = 'ws://example.com/websocket';

I finally solved the problem, by writing:
let METEOR_URL = 'wss://example.com/websocket';
I had to use wss.


:split file_name displays both file_name and current file

Windows Version: 1903 (OS Build 18362.1256)
Oni2 Version: 0.5.9-nightly | 40b0ffc7
Extensions: Arc+ Theme
Configurations: All default besides activating Arc+ theme.
Issue: Opening a split with :vsplit file_name or split file_name opens a split with two tabs: one with file_name in addition to the file open in the current window. I would expect only file_name to be opened. Note that :vsplit and :split both work as intended when called without any arguments.
Thank you :)

Thanks for logging the issue! Looks like this may be a similar root cause to #2900

Thanks for logging the issue! Looks like this may be a similar root cause to #2900


Layout option is missing when we press the print button.

Layout option is missing when we press the Print button.
The reason for this error is the page size in the css style file.

In the css file on the page I wrote below
If you change the code of @page {size: a3} to @page {size: auto}, the problem goes away.
https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css

Best regards.

For eeference: this css code was added by https://github.com/twbs/bootstrap/pull/25164.

Referans için: bu css kodu # 25164 ile eklendi .
BTW, baskı stillerinin kaldırıldığı v5'te alakasız, ancak v4.6'da hala var.

Thanks Aleksander.

Closing as stale and a won't fix in v4. If someone wants to do the user testing and suggest a change in a PR, we can revisit. However, since this isn't an issue in v5, it's not a priority.


Use Prisma language server for intellisense

Prisma has it's own language server: https://github.com/prisma/language-tools/tree/main/packages/language-server and there is a library for adding LSP support in intellij plugins: https://github.com/ballerina-platform/lsp4intellij
With those it could be reasonable amount of work to build intellisense features on top of Prisma language server.

I absolutely agree with that!