Correcting author

@yogkumgit @kenwith

Docs Build status updates of commit 2859c32:
:clock10: Full build: the average full build time is 14 min(s) 19 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit 2859c32:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Get-CsOnlineLisSubnet.md
:white_check_mark:Succeeded
View (skype-ps)

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.

Docs Build status updates of commit 679eb8a:
:clock10: Full build: the average full build time is 14 min(s) 19 sec(s), this is based on the last 1000 build(s) for this repository.

Docs Build status updates of commit 679eb8a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

skype/skype-ps/skype/Get-CsOnlineLisSubnet.md
:white_check_mark:Succeeded
View (skype-ps)

skype/skype-ps/skype/Set-CsOnlineLisSubnet.md
:white_check_mark:Succeeded
View (skype-ps)

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.

Docs Build status updates of commit 29361e8:
:clock10: Full build: the average full build time is 14 min(s) 21 sec(s), this is based on the last 1000 build(s) for this repository.


增加对android service的路由支持

像路由activity一样路由service

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

同问


Add support for IAM instance profile

This is probably a very ugly way to do it, but I'm not experienced in Golang. I've tested it with IAM instance profile attached and with regular environment variables/credential file.

Codecov Report

Merging #1086 into master will decrease coverage by 3.48%.
The diff coverage is 38.46%.

@@            Coverage Diff             @@
##           master    #1086      +/-   ##
==========================================
- Coverage   53.77%   50.28%   -3.49%
==========================================
  Files         117      117
  Lines        8925     8935      +10
==========================================
- Hits         4799     4493     -306
- Misses       3420     3763     +343
+ Partials      706      679      -27

Impacted Files
Coverage Δ

src/restic/backend/s3/s3.go
62.13% <38.46%> (+0.33%)
:arrow_up:

src/restic/backend/b2/b2.go
0% <0%> (-80.59%)
:arrow_down:

src/restic/backend/swift/swift.go
0% <0%> (-73.69%)
:arrow_down:

src/restic/backend/swift/config.go
36.95% <0%> (-54.35%)
:arrow_down:

src/restic/archiver/archiver.go
64.74% <0%> (+0.22%)
:arrow_up:

src/cmds/restic/lock.go
67.79% <0%> (+1.69%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 637de01...3b2648b. Read the comment docs.


[docs] Fix getMockName example of Mock Function document

According to the API documentation of getMockName function ( https://jestjs.io/docs/en/mock-function-api#mockfngetmockname ), the getMockName function should be called via mockFunc.getMockName(), not mockFunc.mock.getMockName().
Is there anything else I need to do?

Codecov Report

Merging #6964 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #6964   +/-   ##
=======================================
  Coverage   66.97%   66.97%
=======================================
  Files         250      250
  Lines       10381    10381
  Branches        4        4
=======================================
  Hits         6953     6953
  Misses       3427     3427
  Partials        1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e90db16...243b98e. Read the comment docs.

Thanks!
I wonder if it makes sense to move all properties to the .mock property to avoid collisions... Not related to this issue though 🙂


DaemonSet updates

Description
DaemonSet template spec can be updated but running pods will not be updated. This change will add option to automate pod updates when daemon spec was changed.
Progress Tracker

[ ] Alpha

[ ] Write and maintain draft quality doc

[ ] During development keep a doc up-to-date about the desired experience of the feature and how someone can try the feature in its current state. Think of it as the README of your new feature and a skeleton for the docs to be written before the Kubernetes release. Paste link to Google Doc: DOC-LINK

[ ] Design Approval

[x] Design Proposal.  https://github.com/kubernetes/community/pull/262 (implementation kubernetes/kubernetes#31693)
[x] Decide which repo this feature's code will be checked into. Not everything needs to land in the core kubernetes repo. https://github.com/kubernetes/kubernetes
[x] Initial API review (if API).  Maybe same PR as design doc. https://github.com/kubernetes/community/pull/262

Any code that changes an API (/pkg/apis/...)
cc @kubernetes/api
cc@kubernetes/sig-apps
@@kubernetes/sig-openstack

[ ] Identify shepherd (your SIG lead and/or<EMAIL_ADDRESS>will be able to help you). My Shepherd is<EMAIL_ADDRESS>(and/or GH Handle)

A shepherd is an individual who will help acquaint you with the process of getting your feature into the repo, identify reviewers and provide feedback on the feature. They are not (necessarily) the code reviewer of the feature, or tech lead for the area.
The shepherd is not responsible for showing up to Kubernetes-PM meetings and/or communicating if the feature is on-track to make the release goals. That is still your responsibility.

[ ] Identify secondary/backup contact point. My Secondary Contact Point is<EMAIL_ADDRESS>(and/or GH Handle)

[x] Write (code + tests + docs) then get them merged.  ALL-PR-NUMBERS

[ ] Code needs to be disabled by default.   Verified by code OWNERS
[x] Minimal testing
[ ] Minimal docs https://github.com/kubernetes/kubernetes.github.io/pull/2878

cc @kubernetes/docs on docs PR
cc @kubernetes/feature-reviewers on this issue to get approval before checking this off
New apis: Glossary Section Item in the docs repo: kubernetes/kubernetes.github.io

[x] Update release notes

[ ] Beta

[ ] Testing is sufficient for beta
[ ] User docs with tutorials

Updated walkthrough / tutorial in the docs repo: kubernetes/kubernetes.github.io
cc @kubernetes/docs on docs PR
cc @kubernetes/feature-reviewers on this issue to get approval before checking this off

[ ] Thorough API review

cc @kubernetes/api

[ ] Stable

[ ] docs/proposals/foo.md moved to docs/design/foo.md

cc @kubernetes/feature-reviewers on this issue to get approval before checking this off

[ ] Soak, load testing
[ ] detailed user docs and examples

cc @kubernetes/docs
cc @kubernetes/feature-reviewers on this issue to get approval before checking this off

FEATURE_STATUS is used for feature tracking and to be updated by @kubernetes/feature-reviewers.
FEATURE_STATUS: IN_DEVELOPMENT
More advice:
Design

Once you get LGTM from a @kubernetes/feature-reviewers member, you can check this checkbox, and the reviewer will apply the "design-complete" label.

Coding

Use as many PRs as you need.  Write tests in the same or different PRs, as is convenient for you.
As each PR is merged, add a comment to this issue referencing the PRs.  Code goes in the http://github.com/kubernetes/kubernetes repository,
and sometimes http://github.com/kubernetes/contrib, or other repos.
When you are done with the code, apply the "code-complete" label.
When the feature has user docs, please add a comment mentioning @kubernetes/feature-reviewers and they will
check that the code matches the proposed feature and design, and that everything is done, and that there is adequate
testing.  They won't do detailed code review: that already happened when your PRs were reviewed.
When that is done, you can check this box and the reviewer will apply the "code-complete" label.

Docs

[ ] Write user docs and get them merged in.
User docs go into http://github.com/kubernetes/kubernetes.github.io.
When the feature has user docs, please add a comment mentioning @kubernetes/docs.
When you get LGTM, you can check this checkbox, and the reviewer will apply the "docs-complete" label.

@lukaszo moving to the next milestone regarding the @bgrant0607 and @kargakis comments here - https://github.com/kubernetes/kubernetes/pull/31693#issuecomment-257348942

ok

I wrote the DaemonSet documentation plan. Join<EMAIL_ADDRESS>to have access.

Implemented in - https://github.com/kubernetes/kubernetes/issues/41116

Happy to help with documentation once this is in Alpha/Beta.

First doc for DaemonSet rolling update https://github.com/kubernetes/kubernetes.github.io/pull/2878
@tonglil thanks! Feel free to comment in DaemonSet documentation plan and send doc PRs to https://github.com/kubernetes/kubernetes.github.io.

I believe that the Stage is incorrect on this feature.  I think it is actually Beta.
The beta qualifications are that we don't knowingly plan to change the API and that the implementation is not expected to destabilize other parts of the system (but have unknown bugs).
We don't plan to change the API, as evidenced by the fact that we used a field and not an annotation.  We had the confidence to do this because we are modeling it after another well-tested API (Deployment Updates).
@lukaszo @janetkuo are there any known issues with code that could destabilize other parts of the system?  I don't think do but checking.
I'm relabeling this as beta, and will comment on the release notes draft.

@erictune do we have strong objections keeping it as alpha? We have already discussed this within the community and people have agreed on "alpha" status.

Yes, I also read/heard somewhere that everything in the extensions group should be considered as alpha.

I also read/heard somewhere that everything in the extensions group should be considered as alpha.

That's not accurate, it's a mix of alpha and beta APIs

@bgrant0607:
extensions/v1beta1 is a grab bag of alpha and beta APIs. It was created (with difficulty) before the full API-group mechanism was developed. For the extensions group, "beta" doesn't necessarily mean beta. [1]

[1] https://groups.google.com/d/msg/kubernetes-sig-api-machinery/o2v-HjAHk0k/W3xJNm0IDAAJ

Yes, I strongly object to keeping it Alpha.

@liggitt that's not the only comment that gave me the impression that extensions are alpha though. The move of the deployments to apps was commented as "move to beta" but I am not sure where that comment is either.

@erictune the feature freeze stage was completed a few weeks ago, and we had enough time to discuss the actual status of the feature, so I'm surprised to see major last-minute changes (even from the marketing perspective, where this feature is already mentioned as "alpha").
Also, even in this thread, I don't see the consensus about "alpha" or "beta".

@lukaszo @janetkuo are there any known issues with code that could destabilize other parts of the system? I don't think do but checking.

No known issues that could destabilize other parts.

The move of the deployments to apps was commented as "move to beta" but I am not sure where that comment is either.

@kargakis deployment was moved from alpha to beta in 1.2. Before 1.2, deployment was extensions/v1beta1 even though it's actually an alpha feature then, due to some known issues.

The feature freeze is intended to prevent introduction of new features at the last minute.  It is not intended to prevent the correction of error or omissions.
Not all features start at alpha.  Some start at Beta.   The alpha label was applied to this issue without discussion, AFAICS.  This oversight was just noticed now.
While not all checkboxes are checked, they have all been met and should be checked.

@erictune ok, understood.
Thank you

@janetkuo @lukaszo as this feature targets 1.7, please, update the feature description to fit the new template.
/cc @kubernetes/sig-apps-feature-requests

I updated the feature description, and left the old description there in case we still need it.

@janetkuo thanks!
Also, please, provide us with the design proposal link and docs PR link (and update the features tracking spreadsheet with it).
cc @kubernetes/sig-apps-feature-requests

@idvoretskyi done

This is done in 1.7. Should we leave it open until DaemonSet is GA or it's fine to close this?

@janetkuo I guess this feature will graduate to stable at the same time DaemonSets do that?
I think this can be closed in that case.


[AKS] az aks create/update: Add --nrg-lockdown-restriction-level parameter to support specifying restriction level on the managed node resource group

Related command
az aks create, az aks update
Description
This PR introduces the --nrg-lockdown-restriction-level argument to allow configuring this value. Allowed values are ReadOnly and Unrestricted. Public doc: https://learn.microsoft.com/en-us/azure/aks/node-resource-group-lockdown
This argument is currently available as extension. This PR ports it to CLI, without any behaviour changes. See: https://github.com/Azure/azure-cli-extensions/pull/5751
Testing Guide
Creating a cluster with NRG lockdown enabled:
$az aks create -n mycluster -g mygroup --nrg-lockdown-restriction-level ReadOnly --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview

Disable NRG lockdown for a cluster:
$az aks update -n mycluster -g mygroup --nrg-lockdown-restriction-level Unrestricted --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/NRGLockdownPreview

History Notes
[AKS] az aks create/update: Add --nrg-lockdown-restriction-level parameter to support specifying restriction level on the managed node resource group

This checklist is used to make sure that common guidelines for a pull request are followed.

[x] The PR title and description has followed the guideline in Submitting Pull Requests.

[x] I adhere to the Command Guidelines.

[x] I adhere to the Error Handling Guidelines.

Thank you for your contribution! We will review the pull request and get back to you soon.

/azp run

Hi, @yanzhudd, @FumingZhang The previous test run discovered there were failed test cases in the 2020-09-01-hybrid profile. I believe I've fixed them and verified it locally. Could you help rerun a full test please? (Not sure if I could just trigger it myself) Thanks~

/azp run

/azp run

Hi @y1hao
Can you merge the latest code from dev to your branch?

@wangzelin007 Thanks. Merged latest dev.

/azp run

/azp run


Generated client gives compilation issue

Description:
import ballerina/http;

# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
public type ClientConfig record {|
    # Configurations related to client authentication
    http:CredentialsConfig auth;
    # The HTTP version understood by the client
    string httpVersion = "1.1";
    # Configurations related to HTTP/1.x protocol
    http:ClientHttp1Settings http1Settings = {};
    # Configurations related to HTTP/2 protocol
    http:ClientHttp2Settings http2Settings = {};
    # The maximum time to wait (in seconds) for a response before closing the connection
    decimal timeout = 60;
    # The choice of setting `forwarded`/`x-forwarded` header
    string forwarded = "disable";
    # Configurations associated with Redirection
    http:FollowRedirects? followRedirects = ();
    # Configurations associated with request pooling
    http:PoolConfiguration? poolConfig = ();
    # HTTP caching related configurations
    http:CacheConfig cache = {};
    # Specifies the way of handling compression (`accept-encoding`) header
    http:Compression compression = http:COMPRESSION_AUTO;
    # Configurations associated with the behaviour of the Circuit Breaker
    http:CircuitBreakerConfig? circuitBreaker = ();
    # Configurations associated with retrying
    http:RetryConfig? retryConfig = ();
    # Configurations associated with cookies
    http:CookieConfig? cookieConfig = ();
    # Configurations associated with inbound response size limits
    http:ResponseLimitConfigs responseLimits = {};
    # SSL/TLS-related options
    http:ClientSecureSocket? secureSocket = ();
|};

public isolated client class Client {
    final http:Client clientEp;
    # Gets invoked to initialize the `connector`.
    #
    # + clientConfig - The configurations to be used when initializing the `connector`
    # + serviceUrl - URL of the target service
    # + return - An error if connector initialization failed
    public isolated function init(ClientConfig clientConfig, string serviceUrl = "https://domain/services/data") returns error? {
        http:Client httpEp = check new (serviceUrl, clientConfig);
        self.clientEp = httpEp;
        return;
    }
    # Get account information
    #
    # + id - Account Id
    # + 'version - version
    # + return - Status Okay
    remote isolated function getAccountById(string id, string 'version) returns AccountInner[]|error {
        string resourcePath = string `/${getEncodedUri('version)}/sobjects/Account/${getEncodedUri(id)}`;
        AccountInner[] response = check self.clientEp->get(resourcePath);
        return response;
    }
}

ERROR [client.bal:(44:52,44:64)] incompatible types: expected 'ballerina/http:2.3.1:ClientConfiguration', found 'ballerina/testopenapi:0.0.0:ClientConfig'

version : 2201.2.0-20220714-175300-1f0ead80
http: 2.3.1-20220714-150000-1869722
Describe your task(s)
As a workaround suppose to add

ProxyConfig? proxy = (); to openapi client config

public type ClientConfig record {|
    # Configurations related to client authentication
    http:CredentialsConfig auth;
    # The HTTP version understood by the client
    string httpVersion = "1.1";
    # Configurations related to HTTP/1.x protocol
    http:ClientHttp1Settings http1Settings = {};
    # Configurations related to HTTP/2 protocol
    http:ClientHttp2Settings http2Settings = {};
    # The maximum time to wait (in seconds) for a response before closing the connection
    decimal timeout = 60;
    # The choice of setting `forwarded`/`x-forwarded` header
    string forwarded = "disable";
    # Configurations associated with Redirection
    http:FollowRedirects? followRedirects = ();
    # Configurations associated with request pooling
    http:PoolConfiguration? poolConfig = ();
    # HTTP caching related configurations
    http:CacheConfig cache = {};
    # Specifies the way of handling compression (`accept-encoding`) header
    http:Compression compression = http:COMPRESSION_AUTO;
    # Configurations associated with the behaviour of the Circuit Breaker
    http:CircuitBreakerConfig? circuitBreaker = ();
    # Configurations associated with retrying
    http:RetryConfig? retryConfig = ();
    # Configurations associated with cookies
    http:CookieConfig? cookieConfig = ();
    # Configurations associated with inbound response size limits
    http:ResponseLimitConfigs responseLimits = {};
    # SSL/TLS-related options
    http:ClientSecureSocket? secureSocket = ();
    # Proxy server related options
    ProxyConfig? proxy = ();
|};

This programming model could have problems with maintainability. So basically adding a new field to the HTTP client config has broken this client as the structural equality is disturb with OpenAPI client config. One reason for doing this could be to learn any such HTTP client config changes fix once broken. So the tooling team is aware of the changes.
But rather depending on the structural equality, config, better to create a http client config using the values in the OpenAPI config as done is here to avoid such breaking.
One drawback is missing new additions to the HTTP client config

Checked with @LakshanSS the scenarios that the client config generates in the tool. It is used to handle Auth-type authentications.
It is required to make auth field required and add the specific value http:BearerTokenConfig or   http:CredentialsConfig  according to the connector.
The reason to make auth is required and give a specific type for auth is to give a clear understanding of the user to put the right auth type there and not to miss auth value.

Solution 01
Therefore we needed to add the code solution as creating an http client config using the values in the OpenAPI config https://github.com/ballerina-platform/openapi-tools/issues/1033#issuecomment-1185406631
but here we encounter one drawback that is missing new additions to the HTTP client config.
Solution 02
To overcome the drawback we can add a type inclusion of  http:ClientConfiguration record and add the required auth field to override the super record auth field.
public type ClientConfig record {|
    *http:ClientConfiguration;
    # Configurations related to client authentication
    http:BearerTokenConfig auth;
|};

But the Above ballerina record gave a runtime error because trying to set the default value from the original type in the new type is not compatible. related issue https://github.com/ballerina-platform/ballerina-lang/issues/32012
error: {ballerina/lang.map}InherentTypeViolation {"message":"invalid value for record field 'auth': expected value of type 'http:BearerTokenConfig', found '()'"}
        at ballerina.http.2.CommonClientConfiguration:CommonClientConfiguration$gen$.<init>(http_types.bal:87)

This issue will fix within the update 3.
@indikasampath2000 , @abeykoon , @NipunaRanasinghe , @hevayo appreciate your input for the further improvements for going solution 01 or solution 02? 🙂

@lnash94, we have to align the connector init config record with the Choreo configuration management feature. When a developer selects a connector, he will be able to make the entire connector init configurable. I have opened an issue to finalize this.
The issue with the record inclusion is that some unnecessary configs come to OpenAPI connectors like http:CookieConfig, and http:FollowRedirects. Also, the http:ClientConfiguration record doesn't support configurable. I opened an issue here.
The Ballerina team will fix the nullable issue. But it has an object type called PersistentCookieHandler in the http:CookieConfig record. I am not sure it is possible to fix it.
This is something we have to think through before doing this change. The Ecosystem team-owned handwritten connectors also have some inconsistencies in the init function. We have planned to have a connector config record defined inside the connector module without importing it from the HTTP module. Some connectors may not be backward compatible with this change. But we have more control over future changes to the http:ClientConfiguration.
My suggestion is OpenAPI connector also should have its own connector config record. OpenAPI connector generated for the API Key authentication will have a backward incompatible issue. But the majority will be compatible.

Suggested design for the issue : https://github.com/wso2-enterprise/choreo/issues/14772

This issue has occurred due to the structural equality miss matching the given two records. This design https://github.com/ballerina-platform/openapi-connectors/pull/737/files was introduced to  avoid the break by adding a new field to the parent record.
Therefore we can close this PR in the favour of this issue https://github.com/ballerina-platform/openapi-tools/issues/1088 and PR https://github.com/ballerina-platform/openapi-tools/pull/1095
This fix available with swanlake 2201.2.3 onwards


发送消息时经常报超时

822392] WARN  RocketmqClient - sendKernelImpl exception, resend at once, InvokeID:<PHONE_NUMBER>175247149, RT: 3000ms, Broker: MessageQueue [topic=****_BUSINESS, brokerName=broker-b, queueId=4]
org.apache.rocketmq.remoting.exception.RemotingTimeoutException: wait response on the channel <10.*.*.*:10909> timeout, 3000(ms)
 at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:386)
 at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:369)

配置是双主双从,  从报异常来看是发送成功了,  但没收到应答,  现在经常报超时,  发送到应答等待时间超过1s的很多, 请问下如果排查这个问题,  怎么入手,  要看服务端那些日志?

@chenld please check the broker.log to make sure the server side have been received this request, and check store.log to check whether error logs appeared.
And issue only used for bug report and new feature request, please subscribe our mailing list, and there are so many member will help you.


Added navigation drawer

Created navigation drawer fragment
Attached it to various activities

I miss top left

It would be nice that you update this PR doing a rebase javabrewery:design

My apolegies on the mess of a pull request. New one submitted with much needed cleanup.


add mips64 reg

Checklist

[ ] Language changes are updated in docs/reference_guide.md
[ ] User-visible and non-trivial changes updated in CHANGELOG.md
[ ] The new behaviour is covered by tests

Thanks for looking at mips support @George-Hu . But can you please keep everything in 1 PR, all the changes seem related.
You can update your PR by pushing to the same branch in your fork. This might require a push --force-with-lease.

fork again


建议增加一个name属性，用于后端区分不同的Hysteria节点

你的功能请求是否与某个问题有关？
后端想要区分不同的Hysteria节点
描述你希望的解决方案
能否在服务端配置文件中增加一个可选配置 name 属性
并在使用 HTTP 验证 时，将 name 属性添加到请求 json 中
这样后端就可以根据 name 来区分不同的 Hysteria 节点
有没有其他替代方案
其他的方案就只能通过节点IP去分辨，但这样要麻烦一点
额外信息
无

可以配置成不同的 URL 啊

if you run a backend with hy2, you can separate your incoming traffic via userid .
in user-level authentication (e.g hy2://userid:pass@address:port/etc) you can use a prefix and handle the traffic for each node/category/etc
for example you have three nodes for

android
iphone
mac/win

then you create there prefixes accordingly

a
i
mw

now your backend will receive

ip - auserid:pass - tx (it comes from android node)
ip - iuserid:pass - tx (it comes from iphone node)
ip  - nwuserid:pass -tx (it comes from mac/win node)

and URLs are:

hy2://auserid:pass@address:port/etc
hy2://iuserid:pass@address:port/etc
hy2://nwuserid:pass@address:port/etc

@shakibamoshiri
This issue is discussing about external authentication API
https://hysteria.network/docs/advanced/Full-Server-Config/#http-authentication

@shakibamoshiri This issue is discussing about external authentication API https://hysteria.network/docs/advanced/Full-Server-Config/#http-authentication

I am using external auth API and I managing multi nodes . I have three servers that had iptable-port-forwarding to hy2 server.

client -----> [ hop 1.1 ] ------
                                |
client -----> [ hop 1.2 ] ------+----> [ hop 2 (hy2 server) ]
                                |
client -----> [ hop 1.3 ] ------

The backend needed to distinguish who is coming from which server ?  I solved it using the way I mentioned , is my solution wrong ? is there a better one ?

sorry, my bad if i misunderstood the questions,
to distinguish hy2 nodes when I request for traffic API  , each node has ether a public or private IP so each node can be separated by a domain or its IP.
if you want to store meta-data for each node, you can update the JSON response from each hy2 node before saving to a database.

@shakibamoshiri
I assume the OP is an owner of a commercial proxy provider (like ExpressVPN). In this case, each user is assigned exactly one username and password, which can be used to connect to a list of services ("nodes"). The backend can use the names of the nodes to limit which username can be used to connect to certain nodes (for "Lite" or "Premium" subscriptions), or to apply a certain fee rate when stats traffic.
The solution provided by Toby is good enough. You can just set this parameter in the url path or query, like http://your.backend.com/auth?node=node-lax-1.

明白了，感谢各位的回复


amplify update function doesn't show full scope of permissions when using existing DDB tables

To Reproduce

amplify add api -> REST
Create a new function and select CRUD + DDB template
Select an existing DDB

Actual: When I run amplify update function, I don't see DDB being listed as an accessible resource
Expected behavior
when I run amplify update function, I see the DDB being an accessible resource
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Mac/Windows/Ubuntu] Mac
Node Version. You can use node -v to check the node version on your system

Additional context
Add any other context about the problem here.

Its under storage

@renebrandel
Did you selected the resource permissions for the function after selecting the CRUD DDB template?

@renebrandel
Did you selected the resource permissions for the function after selecting the CRUD DDB template?

Closing this issue as it seems to be solved

Closing this issue as it seems to be solved


Bug on desktop and ios Safari with big image

When you have a big image to crop and want to get the image back before saving there is an error
https://codesandbox.io/s/react-easy-crop-demo-with-cropped-output-forked-2urjl
When you hit show image on safari, it's not working and we get an error in console :
for desktop safari codesandbox:
getImageData@[native code]
@
asyncFunctionResume@[native code]
@[native code]
promiseReactionJobWithoutPromise@[native code]
promiseReactionJob@[native code]
for my wip website :
     Unable to get image data from canvas. Requested size was 7240 x 7240
     Unhandled Promise Rejection: InvalidStateError: The object is in an invalid state.

No issue on android and desktop chrome/firefox

We just released v4.0.0 that should improve this issue. Please have a look to the latest sandbox 🙂

Thanks a lot I was indeed on an old version.
Safari is working on 4.0.0.

One more issue fixed @trurl-master 👏

https://github.com/ValentinH/react-easy-crop/issues/91#issuecomment-766167263 solved my issue


[MNT] Fail CI on missing init files

Reference Issues/PRs
#1695
What does this implement/fix? Explain your changes.
Adds check to fail unit testing if init files are missing in modules

Yes just added this now, let's see if this actually fails before we merge #1695

Ok, 4ad9060 now fails with the expected error message:

So after merging #1695 and syncing with main, this should be good to go.

#1695 is now merged, the init files are in.
After update from main, this should no longer fail.


Update to new version, add napari runtime constraint

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

@conda-forge-admin, please rerender


Add more table operations to split million IT

To ensure tablet operations do not consume too much memory it would be useful to add more tablet operations to SplitMillionIT
Could add bulk import, tablet export, and table import.

Started experimenting with this here https://github.com/keith-turner/accumulo/tree/accumulo-4645


anchoring default DisplayControls to the video.

Hello Adam,
I am trying to use the video player in a community feed (like facebook). All is working fine, but if I scroll the feed, the displaycontrols are not anchored to the video (I suspect it uses the absolute layout to draw controls). How can I set the anchor/fix it so that the controls scroll with the view.
Another thing is that I wanted to add a full screen option to the controller, which will render the video in landscape mode on demand. How can I achieve this? Is their a way that I can make changes to the default controls?
Thanks,
Rohan

The Android implementation is using Android's VideoView which takes a MediaController that is responsible for the positioning of the player's controls. You should be able to extend VideoPlayerRenderer in your Android project and the corresponding VideoView control that it wraps to achieve the desired effects.
I don't have a lot of experience with the full screen aspect and would require searching for some different code snippets on some variation of "full screen Video View". The same goes for the positioning the controls over the player. A quick search yielded code similar to the below code that you would need to use in your custom renderer's VideoView:
MediaController controller = new MediaController(this);
controller.setAnchorView(this.videoView);
controller.setMediaPlayer(this.videoView);
this.videoView.setMediaController(controller);

I forgot to mention in my original post that I am working on a xamarin forms project. I have no clue about Android native development.


(bug) The Desktop build requires elevation to run on Windows

Describe the bug
UAV/Elevation is required to run the application. This should not be the case
To Reproduce
Steps to reproduce the behavior:
Run the app in its current state.
Expected behavior
UAC/Elevation is not needed on Windows
Desktop (please complete the following information):

OS: Windows 11 x86
Version 24H2

Further testing by @Xlinka indicates this is a problem if a user installs the application to %Program Files%. A workaround is to install to %appdata%.


Install/Uninstall crossplane deployment

This is the first step to get services on public cloud providers.
Next step is #157
Acceptance Criteria

There should be a way to enable the broker functionality after installing Carrier
In the future we may automate that. E.g. when the cluster is a public cloud one, we could automatically install all the crossplane components and enable this feature.  For now we can skip the auto-detection and enable the services feature manually. This is just to keep the needed changes small and split to multiple issues for easier management.

The above should happen with a single command (in the same way carrier install works)

There should be a way to disable this feature.
When that happens the relevant components should be removed from the cluster. Any provisioned services should also be removed (a warning should probably be shown to the user).

It turns out crossplane is not doing what we hoped it does. There are no real abstractions, at least nothing pre-made for us to use. The composition concept is there to allow some team to create the abstraction (called "CompositeXInstance") for the application developers to use. There are no publicly available Composites which we can use in Carrier.
If we were to create those abstractions ourselves (Carrier team), that means we need to write code (or yaml) to support each and every service we want to make available to our users. This is no different from using the upstream controller/crds (e.g. config connector from google or equivalent from Azure and others).
To sum it up, with crossplane:

we don't get access to an arbitrary list of services provided by public cloud providers
we don't get a generic way to provision services on different providers
it's not easier in any way compared to using the upstream controllers/crds

With this in mind, we propose the following plan:

Do #160 first. This means we will be able to create "Services" in the same style as cups in CloudFoundry. The process is a follows:

The user creates a service (e.g. using helm or crossplane or whatever they prefer).
The user creates the "Service" using carrier. This will create a secret and put the provided credentials in there (as it works with cf cups)
The user can now "bind" the service one or more applications. This will mount the above secret as a file or env var.

Use service catalog (instead of crossplane) and implement the local service feature
Add more service brokers to support (some) public cloud providers for as long as they maintain their brokers.

With step 1, we have a way for the user to bind service to the applications, even if they have to provision the services manually. This is already making Carrier useful.
With step 2, we support the local development flow.
With step 3, we support as many public cloud providers as possible. For the rest, the user will have to use the tooling from the cloud provider to manually provision services and bind them as described in step 1 above.

Thanks for looking into it @jimmykarily - it reinforces my doubts about why anyone would want to use something like crossplane as opposed to the provider specific operators if the cross-platform abstraction is too limited/hard to use. The composite construct seems hard to use.
As for our direction, I'd just point out the service brokers from the 3 big players are practically dead so I probably won't want us to to be tied too much into them. From what I've heard from PM on calls with public cloud team, the Azure PM felt OSBAPI did not meet their needs and they were going to focus all their efforts on the operators which seems to be what's happening now across all of the providers. Maybe letting the users "bring their own service" with a simple binding mechanism is good for now.

@jimmykarily @andreas-kupries I asked the question ^ on the crossplane slack channel and they are pointing me to https://crossplane.io/docs/v1.0/getting-started/compose-infrastructure.html as a pre-made composite example. Looks like this does the secret binding as well. Would this work for us?

@satadruroy thank you for asking them for more information. We've seen that page and as you said, these are provider specific resources (so no abstraction). This is what they suggest you to do to get a CloudSQLInstance with Crossplane:
apiVersion: database.gcp.crossplane.io/v1beta1
kind: CloudSQLInstance
metadata:
  name: cloudsqlpostgresql
spec:
  forProvider:
    databaseVersion: POSTGRES_9_6
    region: us-central1
    settings:
      tier: db-custom-1-3840
      dataDiskType: PD_SSD
      dataDiskSizeGb: 10
  writeConnectionSecretToRef:
    namespace: crossplane-system
    name: cloudsqlpostgresql-conn

and this is what you need to do to achieve the same with Google config connector:
  apiVersion: sql.cnrm.cloud.google.com/v1beta1
  kind: SQLInstance
  metadata:
    name: sqlinstance-sample-postgreshighavailability
  spec:
    databaseVersion: POSTGRES_9_6
    region: us-central1
    settings:
      tier: db-custom-1-3840
      availabilityType: REGIONAL

(taken from the docs)
I can't see how crossplane makes it easier. The only was crossplane would make this easier would be if someone went into the trouble of creating a composite for postgres and then the user could use and almost identical yaml to provision a database in various cloud providers. But that's not what we need.

superseded by #169


add support for riscv64

Add support for riscv64 as host architecture.

Closing this PR as requested changes have been unreasonably refused by @etcwilde

To be clear, I didn't ask for you to close the PR, I asked for you to change it so that instead of tacking on new architectures to an ever-growing list, we do something that queries the compiler and will work for any architecture that the compiler supports.

@etcwilde - To be clear.
The purpose of this PR was to "Add support for riscv64 as host architecture."
The code was clean, concise and only impacted swift builds on a riscv64 host.
I reviewed your suggested changes and explained why in the scope of this PR and the Swift on RISCV project I wanted the PR to be accepted without change.
My reasons for this are completely reasonable and justified.
You have stated that you will not accept this PR as is.
So I have closed this PR and moved on.

Hey @futurejones,
I think there was a misunderstanding here. We appreciate your effort to port Swift to riscv64 and are happy to take your PR. @etcwilde just noted that there’s a more general solution here that will scale to other architectures in the future. As these sorts of lists grow, it’s important to generalize them because adding to a tower of if-else branches doesn’t scale indefinitely. Where exactly that tipping point is, is obviously subjective but this change seemed as good as any to generalize since you were touching all repositories already.
If I understand correctly, the reason why @etcwilde marked the PR as “request changes” is because he accidentally hit “accept” beforehand and GitHub doesn’t allow changing a review to the “neutral” style, which we usually use. I don’t think it was because he explicitly disapproved your PR, just suggesting improvements.
Going forward, I would suggest that we merge this PR as you proposed it. Cleaning up the if branches with the code snippet that @etcwilde suggested would be an amazing follow-up PR that would be highly appreciated.

@ahoppen @etcwilde
What's the next step here?


Don't clear REPL when closing UI

When UI is toggled on, the REPL becomes cleared. It would be preferable to have the REPL be persistent.
When opening the REPL using :lua require("dap").repl.open() the REPL does not clear. It only clears when opening using :lua require("dapui").toggle()
Edit: It looks like :lua require("dap").repl.close() is what clears the REPL. Using that function closes the split and clears the history. But just closing the split with :q does not clear the history, such that when re-opening the contents will still be there.
So perhaps I should report this to nvim-dap instead.
Edit 2: Turns out you can call repl.close({ mode="toggle" }) to close the repl without clearing its contents. So this can be fixed within nvim-dap-ui. I'll put up a PR shortly in case this is something you'd be interested in accepting.

Hey that sounds great thank you! :grin:

Setting mode="toggle" does prevent the buffer from getting cleared on close. But looks like one of the other window management calls in dapui's open function causes the buffer to get cleared. I'll try to investigate and get a PR up as soon as I can. But I wouldn't expect it to be until next week, as I won't have the time this weekend.

Thanks for the update, the reason it was still being cleared was the buffer was being deleted. I've added a small change to stop this happening. Please try with the latest commit

That works perfectly, thank you very much! 😄
Sorry for the empty promise on putting up a PR. I was in the middle of moving, so I didn't have any time for hobby coding.

Brilliant! No problem at all, thanks for reporting and investigating :smile:

Maybe this needs to be revisited? Please let me know if you're experiencing this also: my dap-repl does not close when the debugger closes, and even if I leave it open into another debugger session, the contents are not preserved. What is the intended behavior? That the dap-repl closes but the contents are kept for the next time it opens?

The REPL itself is the one from nvim-dap, nvim-dap-ui just handles controlling the window. I believe it is intended that the text is cleared between runs of the REPL. I'm not sure if this is configurable, I suggest opening an issue on nvim-dap to see if you can preserve it :smile:

I'm actually not too attached to the contents of the repl; perhaps I misunderstood the point of this issue and the changes. I was just investigating why my repl wasn't closing when the debugger finished, and was poking around commits around the relevant bits of code in nvim-dap-ui. I'm getting a better understanding of this, I think, and maybe I should be doing the same for the relevant bits of code from nvim-dap. Thanks for your help!

@HudsonMC16 this issue is different from what you're asking about.
This issue was about the contents of the REPL buffer being cleared when you close the ui. It seems you're looking for an option to have the ui automatically close when you close the debugger session.
As far as I'm aware, that's not currently possible. There's an option to have the ui open when the debugger starts, but not the other way around. You could open a separate issue to request that feature.

Alright, I'm a bit confused then. Sorry to pollute an older issue with unrelated conversation, but once I know the intended behavior, I can start to figure out if what I'm seeing is a bug, config issue, or something I can (try to) fix with a PR.
In my case, all of the ui elements do close when the debugger exits (except for the repl and terminal). This appears to be intended behavior based on all the window clean up code in this plugin.
Again, sorry if I'm being dense.

By terminal I assume you mean the integratedTerminal. This is not supported by nvim-dap-ui and is only opened by nvim-dap. Closing that is up to the user, which someone has already automated see https://github.com/rcarriga/nvim-dap-ui/issues/49 and https://github.com/mfussenegger/nvim-dap/issues/278
How are you opening the REPL? If it's opened by the tray/sidebar then it should be closed automatically (if it's not then that sounds like a bug, please open an issue :smile:). If opening manually or using a floating window then you'll have to manually control the window using event listeners
  dap.listeners.before.event_terminated["close_repl"] = function()
    dap.repl.close()
  end

  dap.listeners.before.event_exited["close_repl"] = function()
    dap.repl.close()
  end

It is the regular tray repl, but maybe I should add one point of clarification, as I think I'm not using the correct language. when I say the other UI elements are being closed, I mean the whole nine yards, i.e. the windows are being closed and the buffers deleted/unloaded. For the repl, the window is being closed but the buffer is persisting. This is what I mean when I say it's staying "open". This is the behavior offered by require('dap').repl.toggle() or require('dap').repl.close({mode='toggle'}). So seems like that's the intent, based on the code added to address this issue.
Sorry, I'm getting there! I'll just go ahead and add the hooks you mentioned above to delete the repl buffer in addition to closing the window. Thanks!


Add the possibility of disabling the default data-index-url calculation in the data-index-addon

Description
At the data-index-addon, it was recently introduced the calculation of the dataIndexUrl from the runtime url.
We need to add the possibility disabling this default  calculation on demand to make the dev-ui in k8s environments. For example, when we execute the SWs dev-mode.
Implementation ideas
No response

Fixed by #2084


Example Using Custom and External KNN Graph

Hello,
I tried to find an example of using external KNN graphs with UMAP. I wasn't able to find any so I created one and hope people find this snippet of code helpful. It's largely based on the internal APIs and functions within UMAP itself, but it works well for our purposes. An example of how to use the code is at the end and here is the example data from the Iris dataset:  approximate-knng.txt
Any feedback would be welcomed.
Take care!
from umap.umap_ import compute_membership_strengths, smooth_knn_dist, make_epochs_per_sample, simplicial_set_embedding, find_ab_params
import scipy

# Load graphs created by NGT
def load_knn_graph(ngt_graph):
    knn_indices = []
    knn_dist = []

    nodes_with_no_edges = set()
    with open(ngt_graph, "r") as f:
        while True:
            line = f.readline().strip("\n").strip()
            if not line:
                break
            token = line.split("\t")
            start_node = int(token[0])
            end_nodes = token[1:]

            if end_nodes == []:
                nodes_with_no_edges.add(start_node)
                continue

            knn_entry = []
            knn_entry_dist = []
            for ith in range(0, len(end_nodes), 2):
                try:
                    end_node = int(end_nodes[ith])
                except Exception as e:
                    nodes_with_no_edges.add(start_node)
                    continue
                knn_entry.append(end_node)
                weight = float(end_nodes[ith+1])
                knn_entry_dist.append(weight)
            knn_indices.append(knn_entry)
            knn_dist.append(knn_entry_dist)

    return np.array(knn_indices), np.array(knn_dist)

def knn_fuzzy_simplicial_set(knn_indices, knn_dists, local_connectivity, set_op_mix_ratio, apply_set_operations):

    n_samples = knn_indices.shape[0]
    n_neighbors = knn_indices.shape[1]

    knn_dists = knn_dist.astype(np.float32)

    sigmas, rhos = smooth_knn_dist(
        knn_dists, float(n_neighbors), local_connectivity=float(local_connectivity),
    )

    rows, cols, vals = compute_membership_strengths(
        knn_indices, knn_dists, sigmas, rhos
    )

    result = scipy.sparse.coo_matrix(
        (vals, (rows, cols)), shape=(n_samples, n_samples)
    )
    result.eliminate_zeros()

    if apply_set_operations:
        transpose = result.transpose()

        prod_matrix = result.multiply(transpose)

        result = (
            set_op_mix_ratio * (result + transpose - prod_matrix)
            + (1.0 - set_op_mix_ratio) * prod_matrix
        )

    result.eliminate_zeros()

    return result, sigmas, rhos

def transform(graph, metric="l2", n_components = 2, n_epochs = 500, spread=1.0, min_dist = 0.0, initial_alpha=1.0, negative_sample_rate=5, repulsion_strength=7):
    graph = graph.tocoo()
    graph.sum_duplicates()
    n_vertices = graph.shape[1]

    if n_epochs <= 0:
        # For smaller datasets we can use more epochs
        if graph.shape[0] <= 10000:
            n_epochs = 500
        else:
            n_epochs = 200

    graph.data[graph.data < (graph.data.max() / float(n_epochs))] = 0.0
    graph.eliminate_zeros()

    epochs_per_sample = make_epochs_per_sample(graph.data, n_epochs)

    head = graph.row
    tail = graph.col
    weight = graph.data

    a, b = find_ab_params(spread, min_dist)

    emebedding = simplicial_set_embedding(None, graph, n_components=2, initial_alpha=1.0, a=a, b=b, gamma=repulsion_strength, negative_sample_rate=negative_sample_rate, random_state=np.random, metric=metric, metric_kwds=None, verbose=True, parallel=True, n_epochs=n_epochs, init="random")

    return emebedding

An example usage is a follows:
import numpy as np

knn_indices, knn_dist = load_knn_graph("approximate-knng.txt")

knn_indices = knn_indices - 1

local_connectivity = 1
apply_set_operations = True
set_op_mix_ratio=1.0

graph, sigmas, rhos = knn_fuzzy_simplicial_set(knn_indices, knn_dist, local_connectivity, set_op_mix_ratio, apply_set_operations)

emebedding = transform(graph, metric="l2", n_components = 2, n_epochs = 500, spread=1.0, min_dist = 0.0, initial_alpha=1.0, negative_sample_rate=5, repulsion_strength=7)

Thanks. I can potentially add this to the FAQ if you like.

Oh, that would be wonderful. Thank you! Let me can share how I made the graphs, too. I use a tool called NGT. It can export several different graph approximations. Two of the less well known ones are ANNG and CkNN.
https://arxiv.org/abs/1606.02353
https://arxiv.org/abs/1810.07355
A development branch of NGT located at https://github.com/masajiro/NGT/tree/devel . Let's pull it down and install it.
git clone https://github.com/masajiro/NGT.git NGT_DEV
cd NGT_DEV/
git checkout devel
 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake brew install gcc@9
export CXX=/usr/local/bin/g++-9 export CC=/usr/local/bin/gcc-9
mkdir build
cd build
cmake ..
make
make install

Once you make index you can export using ngt export-graph -k 15 refined-anng > approximate-knng.graph

For the record, I think the implementation of UMAP in scanpy can do this (although initially intended for single-cell data, lol!). You can tell it to embed whatever graph you like in 2D, even those that were not calculated using UMAP's implementation (such as vanilla k-nearest neighbor graphs).


AttributeError: 'NNDescent' object has no attribute '_visited'

my code:
model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
embeddings = model.encode(data.Text, show_progress_bar=True)
umap_embeddings_fit = umap.UMAP(n_neighbors=15, n_components=5,metric = 'euclidean').fit(embeddings)

using below code, I am predicting
embeddings1 = model.encode(test_data.Text[0:200], show_progress_bar=True)
umap_embeddings1 = umap_embeddings_fit.transform(embeddings1)

I checked in pynndescent docs, there is no help.

Yes. I used colab as the running platform. also, I used pickle package to save the model. it didnt work. then I used joblib. it works well. Thanks for the quickest response :)


How many keys supported?

Hi,
What is key limitation & what is impact on performance if has many(50000) keys?
My project model is
Truck1 > 50 POINTS
Truck2 > 100 POINTS
....
What would be the approach?
Thanks in advance.

The keys are stored in a btree (so the performance is O(log n)) and there's no limit to the number of keys.

Thanks @tidwall


Official Website shogun.ml is unavailable

nslookup.exe www.shogun.ml

服务器:  cra-123-dns
Address:  <IP_ADDRESS>
非权威应答:
名称:    shogun.ml
Address:  <IP_ADDRESS>
Aliases:  www.shogun.ml

 ping <IP_ADDRESS>

正在 Ping <IP_ADDRESS> 具有 32 字节的数据:
请求超时。
请求超时。
请求超时。
请求超时。
<IP_ADDRESS> 的 Ping 统计信息:
数据包: 已发送 = 4，已接收 = 0，丢失 = 4 (100% 丢失)，

It now leads to https://paypal.onlinecasino-24.net/novoline a gambling scam...

unfortunately freenom has gotten itself to some troubles hence the renewal of the domain is/was not possible. for details check https://krebsonsecurity.com/2023/03/sued-by-meta-freenom-halts-domain-registrations/

now I found the official site from NumFocus. The link  is
http://www.shogun-toolbox.org
However, it  seems  there is few new activities in  this project for a long time.
Is  Shogun dead?😢😢😢


added semantic query

#32526

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-search-documents


Not possible to change location

I've been trying to set location for cards using .set({lat,long}). The created cards, for some reason, always have Montreal, Canada as the location attached to them; but interestingly the map location being displayed changes (to the actual lat/long I set).
I'm wondering if this is a bug of the api - or if this is something else that can be solved?
Also, I was unable to find any information about the actual api on plague website; how/where did you obtain the information to create the api for the app?
Thank you very much!

In the plague api the actual coordinates and the label for these coordinates are two different things. On the Line118 and Line141 you see how the label for the coordinates are sent through "meta" tag.  These line should be changed.

@zettam I will include a .set parameter tof change the metatag, this will work for you?

I already changed the api to test, however it would be an amazing addition :+1:
Also, now I'm wondering if the "closest n people" algorithm works with true latitude and longitude, or works with custom metatags? I set my location as "Sun" now; do you know if this is anyhow "breaking the rules"?

@zettam @borazslo This enhancament is avaliable in v1.0.6
var plague = require('plague-api').set({
  latitude: -99.999999999999,
  longitude: -99.999999999999,
  administrativeArea: 'Quebec',
  country: 'Canada',
  locality: 'Montreal'
});

@zettam About your question, i belive the algorithm works with latitude and longitude only. And i dont know about the rules =(

thank you very much

@zettam =)


Consider user defined scan_interval for command_line sensor.

Description:
Remove hard coded scan_interval of 60s so the command_line sensor considers either the default value of 30s or a user defined value, as expected according to https://home-assistant.io/topics/platform_options/#scan-interval.

Does this mean that the user can add the add the scan_interval in the config? That will be super.

Yes, exactly. Sorry I didn't include an example config, I thought this was unnecessary because according to the documentation linked in the description, this should have already been possible.

There are other sensors that have a similar restriction (e.g., Rest Sensor). Will it affect them as well?

No, this change is specific to the command_line sensor.

Can you try to make the default 60 seconds?
Adding a PLATFORM_SCHEMA with vol.Optional('SCAN_INTERVAL', default=60) should do the trick (there are many voluptuous PRs currently open that you can use as examples

@bliemli Make @kellerza's change and then this is good to merge in time for 0.27! :+1:

👍

Thank you all for the input/feedback. Will try to do that.

On 27.08.2016, at 05:32, Teagan Glenn<EMAIL_ADDRESS>wrote:
👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I was thinking that it will be nice to make similar changes to the REST sensor (provide user defined scan_interval).  I can create a PR if that is something we would like to see.

Instead of using a schema, just add SCAN_INTERVAL = timedelta(seconds=60) and the entity component will automatically pick it up: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/helpers/entity_component.py#L87-L90

@bliemli When you get @balloob's comment fixed, along with the merge conflict fixed, we can get this merged!

If I understand that right, it's probably the easiest approach to just abort this pull request and open a new one. The merge of pr #2968 fundamentally changed the command_line sensor (and all other command_line components). Other suggestions?

git fetch --all & git rebase upstream/dev should be all you need and then continue

Hmm. My two commits in here are unnecessary as they changed things from the previous version. So even though I'd take out all changes while rebasing, these commits would remain in the logs. Still ok?

Yes, just continue on your branch and make sure the end result is fine. Then we'll squash when you're done and it will look like a single commit

@bliemli Mind fixing merge conflicts?

@Teagan42 No, not at all. I just wanted to be sure it's ok to leave unnecessary commits in there. Thanks :)

I just tested the command_line sensor's behaviour from the dev branch without changing anything. It now considers the scan_interval as expected, so @fabaff's changes to use voluptuous already solved this :)
That also means I'm closing my PR. Thanks everyone for the support!

I can't confirm that this is working correctly, unless I'm missunderstanding how it works.
Take the following sensor as an example:
- platform: command_line
  name: "Hombot Status"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'"
  scan_interval: 10
  value_template: "{{ value | capitalize() }}"

When I run cat /var/log/syslog | grep JSON_ROBOT_STATE, this is what I find:
Sep 25 02:43:50 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'
Sep 25 02:45:00 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'
Sep 25 02:46:10 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'
Sep 25 02:47:20 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'
Sep 25 02:48:30 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_ROBOT_STATE'

Another sensor as an example:
- platform: command_line
  name: "Hombot Battery"
  command: "python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'"
  unit_of_measurement: '%'
  scan_interval: 30

And the output of cat /var/log/syslog | grep JSON_BATTPERC looks like this:
Sep 25 02:45:00 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'
Sep 25 02:46:30 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'
Sep 25 02:48:00 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'
Sep 25 02:49:30 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'
Sep 25 02:51:00 Ra hass[648]: INFO:homeassistant.components.sensor.command_line:Running command: python3 /home/hass/.homeassistant/python/hombot_retrieve_status.py 'JSON_BATTPERC'

So looking at the timestamps above, it turns out the actual interval is scan_interval + 60 seconds. I am running the latest stable version of HASS, being 0.28.2.

Still seeing the same behaviour on 0.29.6. Any feedback on this? Or should I open a new issue myself?

You're right, this is not yet working, I probably tested a cached version...
I'll look into fixing this as soon as I have the time, though I can't say when this will be.

Looking forward to a fix, @bliemli

@bliemli You're more than welcome to fix it if you're up for it. Unfortunately, my PR #3652 was closed. Oh well, I was in way over my head anyway...

Any reason why this PR was closed? I still notice the behavior that the interval is 70 seconds when I specify 10 seconds as scan_interval...


Make synthetic magnitude plots and B-V colour evolution plot

Nice work, and this is some important functionality. I think it really belongs in plotartislightcurve (lightcurve.py) though.
A couple of suggestions:

The filter band files should go in the artistools/data directory, perhaps artistools/data/filters/
Make use of os.path.join() instead of appending strings, or better yet, use pathlib.Path objects and join with the '/' operator. This avoids things like accidental double slashes, and makes the code portable between operating systems.
Add an automated test to test/artistools_test.py. Doesn't need to do much other than generate the plots to make sure no exceptions occur.

And then before we can merge the branch into master, you'll need to merge (or ideally rebase onto) the current master.

Hello @ccollins22! Thanks for updating the PR.

In the file artistools/estimators.py, following are the PEP8 issues :

Line 31:80: E501 line too long (82 > 79 characters)
Line 43:80: E501 line too long (84 > 79 characters)
Line 54:80: E501 line too long (85 > 79 characters)
Line 65:80: E501 line too long (92 > 79 characters)
Line 67:80: E501 line too long (84 > 79 characters)
Line 122:80: E501 line too long (91 > 79 characters)
Line 130:80: E501 line too long (93 > 79 characters)
Line 131:80: E501 line too long (96 > 79 characters)
Line 132:80: E501 line too long (95 > 79 characters)
Line 133:80: E501 line too long (97 > 79 characters)
Line 167:80: E501 line too long (85 > 79 characters)
Line 168:80: E501 line too long (116 > 79 characters)
Line 169:80: E501 line too long (98 > 79 characters)
Line 175:80: E501 line too long (114 > 79 characters)
Line 177:80: E501 line too long (87 > 79 characters)
Line 179:80: E501 line too long (88 > 79 characters)
Line 180:80: E501 line too long (88 > 79 characters)
Line 181:80: E501 line too long (87 > 79 characters)
Line 182:80: E501 line too long (89 > 79 characters)
Line 183:80: E501 line too long (90 > 79 characters)
Line 190:80: E501 line too long (106 > 79 characters)
Line 191:80: E501 line too long (93 > 79 characters)
Line 193:80: E501 line too long (85 > 79 characters)
Line 194:80: E501 line too long (94 > 79 characters)
Line 198:80: E501 line too long (106 > 79 characters)
Line 203:80: E501 line too long (100 > 79 characters)
Line 206:80: E501 line too long (86 > 79 characters)
Line 214:80: E501 line too long (115 > 79 characters)
Line 225:80: E501 line too long (83 > 79 characters)
Line 229:80: E501 line too long (110 > 79 characters)
Line 235:80: E501 line too long (99 > 79 characters)
Line 249:80: E501 line too long (100 > 79 characters)
Line 275:80: E501 line too long (101 > 79 characters)
Line 280:80: E501 line too long (82 > 79 characters)
Line 283:80: E501 line too long (83 > 79 characters)
Line 286:80: E501 line too long (91 > 79 characters)
Line 289:80: E501 line too long (92 > 79 characters)
Line 294:80: E501 line too long (103 > 79 characters)
Line 296:80: E501 line too long (85 > 79 characters)
Line 310:80: E501 line too long (83 > 79 characters)
Line 314:80: E501 line too long (102 > 79 characters)
Line 318:80: E501 line too long (111 > 79 characters)
Line 322:80: E501 line too long (100 > 79 characters)
Line 333:80: E501 line too long (108 > 79 characters)
Line 336:80: E501 line too long (109 > 79 characters)
Line 338:80: E501 line too long (82 > 79 characters)
Line 356:80: E501 line too long (88 > 79 characters)
Line 357:80: E501 line too long (107 > 79 characters)
Line 359:80: E501 line too long (115 > 79 characters)
Line 365:80: E501 line too long (81 > 79 characters)
Line 380:80: E501 line too long (106 > 79 characters)
Line 382:80: E501 line too long (82 > 79 characters)
Line 389:80: E501 line too long (112 > 79 characters)
Line 394:80: E501 line too long (83 > 79 characters)
Line 397:80: E501 line too long (101 > 79 characters)
Line 400:80: E501 line too long (102 > 79 characters)
Line 404:80: E501 line too long (107 > 79 characters)
Line 407:80: E501 line too long (93 > 79 characters)
Line 410:80: E501 line too long (115 > 79 characters)
Line 413:80: E501 line too long (89 > 79 characters)
Line 414:80: E501 line too long (83 > 79 characters)
Line 420:80: E501 line too long (89 > 79 characters)
Line 426:80: E501 line too long (98 > 79 characters)
Line 430:80: E501 line too long (99 > 79 characters)
Line 443:80: E501 line too long (80 > 79 characters)
Line 455:80: E501 line too long (81 > 79 characters)
Line 456:80: E501 line too long (83 > 79 characters)
Line 461:80: E501 line too long (118 > 79 characters)
Line 466:80: E501 line too long (84 > 79 characters)
Line 468:80: E501 line too long (99 > 79 characters)
Line 473:80: E501 line too long (84 > 79 characters)
Line 476:80: E501 line too long (177 > 79 characters)
Line 481:80: E501 line too long (88 > 79 characters)
Line 485:80: E501 line too long (88 > 79 characters)
Line 487:80: E501 line too long (103 > 79 characters)
Line 489:80: E501 line too long (94 > 79 characters)
Line 522:80: E501 line too long (81 > 79 characters)
Line 529:80: E501 line too long (98 > 79 characters)
Line 531:80: E501 line too long (86 > 79 characters)
Line 575:80: E501 line too long (102 > 79 characters)
Line 576:80: E501 line too long (91 > 79 characters)
Line 577:80: E501 line too long (91 > 79 characters)
Line 578:80: E501 line too long (84 > 79 characters)
Line 579:80: E501 line too long (83 > 79 characters)
Line 580:80: E501 line too long (88 > 79 characters)
Line 581:80: E501 line too long (80 > 79 characters)
Line 601:80: E501 line too long (89 > 79 characters)
Line 608:80: E501 line too long (86 > 79 characters)
Line 609:80: E501 line too long (93 > 79 characters)
Line 611:80: E501 line too long (98 > 79 characters)

In the file artistools/lightcurve.py, following are the PEP8 issues :

Line 27:80: E501 line too long (114 > 79 characters)
Line 35:80: E501 line too long (80 > 79 characters)
Line 36:80: E501 line too long (85 > 79 characters)
Line 47:80: E501 line too long (107 > 79 characters)
Line 48:80: E501 line too long (87 > 79 characters)
Line 52:80: E501 line too long (80 > 79 characters)
Line 56:80: E501 line too long (81 > 79 characters)
Line 59:80: E501 line too long (94 > 79 characters)
Line 63:80: E501 line too long (117 > 79 characters)
Line 65:80: E501 line too long (101 > 79 characters)
Line 66:80: E501 line too long (86 > 79 characters)
Line 69:80: E501 line too long (91 > 79 characters)
Line 71:80: E501 line too long (109 > 79 characters)
Line 72:80: E501 line too long (92 > 79 characters)
Line 75:80: E501 line too long (99 > 79 characters)
Line 76:80: E501 line too long (120 > 79 characters)
Line 80:80: E501 line too long (84 > 79 characters)
Line 94:80: E501 line too long (88 > 79 characters)
Line 102:80: E501 line too long (101 > 79 characters)
Line 103:80: E501 line too long (111 > 79 characters)
Line 108:80: E501 line too long (89 > 79 characters)
Line 110:80: E501 line too long (94 > 79 characters)
Line 118:80: E501 line too long (86 > 79 characters)
Line 125:80: E501 line too long (84 > 79 characters)
Line 144:80: E501 line too long (91 > 79 characters)
Line 147:80: E501 line too long (106 > 79 characters)
Line 150:80: E501 line too long (102 > 79 characters)
Line 154:80: E501 line too long (88 > 79 characters)
Line 155:80: E501 line too long (83 > 79 characters)
Line 158:80: E501 line too long (96 > 79 characters)
Line 162:80: E501 line too long (88 > 79 characters)
Line 168:80: E501 line too long (109 > 79 characters)
Line 170:80: E501 line too long (97 > 79 characters)
Line 183:80: E501 line too long (84 > 79 characters)
Line 185:80: E501 line too long (108 > 79 characters)
Line 188:80: E501 line too long (86 > 79 characters)
Line 192:80: E501 line too long (87 > 79 characters)
Line 193:80: E501 line too long (118 > 79 characters)
Line 202:80: E501 line too long (87 > 79 characters)
Line 215:80: E501 line too long (87 > 79 characters)
Line 229:80: E501 line too long (93 > 79 characters)
Line 234:80: E501 line too long (106 > 79 characters)
Line 257:80: E501 line too long (90 > 79 characters)
Line 263:80: E501 line too long (87 > 79 characters)
Line 281:80: E501 line too long (81 > 79 characters)
Line 282:80: E501 line too long (93 > 79 characters)
Line 287:80: E501 line too long (85 > 79 characters)
Line 320:5: E265 block comment should start with '# '
Line 320:80: E501 line too long (100 > 79 characters)
Line 327:80: E501 line too long (94 > 79 characters)
Line 343:80: E501 line too long (87 > 79 characters)

In the file artistools/nltepops.py, following are the PEP8 issues :

Line 19:80: E501 line too long (94 > 79 characters)
Line 22:80: E501 line too long (117 > 79 characters)
Line 46:80: E501 line too long (114 > 79 characters)
Line 54:80: E501 line too long (98 > 79 characters)
Line 58:80: E501 line too long (86 > 79 characters)
Line 62:80: E501 line too long (83 > 79 characters)
Line 64:80: E501 line too long (82 > 79 characters)
Line 67:80: E501 line too long (109 > 79 characters)
Line 68:80: E501 line too long (109 > 79 characters)
Line 72:80: E501 line too long (83 > 79 characters)
Line 79:80: E501 line too long (96 > 79 characters)
Line 80:80: E501 line too long (96 > 79 characters)
Line 96:80: E501 line too long (119 > 79 characters)
Line 112:80: E501 line too long (80 > 79 characters)
Line 117:80: E501 line too long (88 > 79 characters)
Line 124:80: E501 line too long (81 > 79 characters)
Line 136:80: E501 line too long (80 > 79 characters)
Line 138:80: E501 line too long (81 > 79 characters)
Line 146:80: E501 line too long (88 > 79 characters)
Line 154:80: E501 line too long (98 > 79 characters)
Line 161:80: E501 line too long (107 > 79 characters)
Line 166:80: E501 line too long (95 > 79 characters)
Line 180:80: E501 line too long (98 > 79 characters)
Line 181:80: E501 line too long (118 > 79 characters)
Line 200:80: E501 line too long (104 > 79 characters)
Line 211:80: E501 line too long (96 > 79 characters)
Line 212:80: E501 line too long (81 > 79 characters)
Line 213:80: E501 line too long (84 > 79 characters)
Line 218:80: E501 line too long (119 > 79 characters)
Line 221:80: E501 line too long (80 > 79 characters)
Line 223:80: E501 line too long (81 > 79 characters)
Line 233:80: E501 line too long (84 > 79 characters)
Line 255:80: E501 line too long (82 > 79 characters)
Line 308:80: E501 line too long (89 > 79 characters)
Line 318:80: E501 line too long (93 > 79 characters)
Line 334:80: E501 line too long (101 > 79 characters)
Line 341:80: E501 line too long (84 > 79 characters)
Line 347:80: E501 line too long (106 > 79 characters)
Line 349:80: E501 line too long (113 > 79 characters)
Line 352:80: E501 line too long (106 > 79 characters)
Line 356:80: E501 line too long (92 > 79 characters)
Line 361:80: E501 line too long (94 > 79 characters)
Line 363:80: E501 line too long (104 > 79 characters)
Line 364:80: E501 line too long (83 > 79 characters)
Line 377:80: E501 line too long (118 > 79 characters)
Line 379:80: E501 line too long (80 > 79 characters)
Line 380:80: E501 line too long (86 > 79 characters)
Line 382:80: E501 line too long (100 > 79 characters)
Line 385:80: E501 line too long (80 > 79 characters)
Line 386:80: E501 line too long (86 > 79 characters)
Line 388:80: E501 line too long (100 > 79 characters)
Line 391:80: E501 line too long (87 > 79 characters)
Line 396:80: E501 line too long (103 > 79 characters)
Line 398:80: E501 line too long (99 > 79 characters)
Line 406:80: E501 line too long (86 > 79 characters)
Line 409:80: E501 line too long (89 > 79 characters)
Line 416:80: E501 line too long (93 > 79 characters)
Line 425:80: E501 line too long (104 > 79 characters)

In the file artistools/packets.py, following are the PEP8 issues :

Line 36:80: E501 line too long (98 > 79 characters)
Line 42:80: E501 line too long (104 > 79 characters)
Line 47:80: E501 line too long (83 > 79 characters)
Line 48:80: E501 line too long (84 > 79 characters)
Line 49:80: E501 line too long (81 > 79 characters)
Line 50:80: E501 line too long (80 > 79 characters)
Line 58:80: E501 line too long (89 > 79 characters)
Line 61:80: E501 line too long (80 > 79 characters)

In the file artistools/radfield.py, following are the PEP8 issues :

Line 24:80: E501 line too long (86 > 79 characters)
Line 30:80: E501 line too long (89 > 79 characters)
Line 37:80: E501 line too long (85 > 79 characters)
Line 38:80: E501 line too long (88 > 79 characters)
Line 41:80: E501 line too long (92 > 79 characters)
Line 48:80: E501 line too long (107 > 79 characters)
Line 56:80: E501 line too long (97 > 79 characters)
Line 70:80: E501 line too long (95 > 79 characters)
Line 73:80: E501 line too long (96 > 79 characters)
Line 75:80: E501 line too long (82 > 79 characters)
Line 84:80: E501 line too long (105 > 79 characters)
Line 88:80: E501 line too long (99 > 79 characters)
Line 91:80: E501 line too long (103 > 79 characters)
Line 94:80: E501 line too long (87 > 79 characters)
Line 105:80: E501 line too long (115 > 79 characters)
Line 110:80: E501 line too long (104 > 79 characters)
Line 111:80: E501 line too long (83 > 79 characters)
Line 124:80: E501 line too long (83 > 79 characters)
Line 139:80: E501 line too long (118 > 79 characters)
Line 148:80: E501 line too long (86 > 79 characters)
Line 152:80: E501 line too long (83 > 79 characters)
Line 157:80: E501 line too long (107 > 79 characters)
Line 158:80: E501 line too long (83 > 79 characters)
Line 164:80: E501 line too long (81 > 79 characters)
Line 167:80: E501 line too long (85 > 79 characters)
Line 168:80: E501 line too long (96 > 79 characters)
Line 173:80: E501 line too long (111 > 79 characters)
Line 179:80: E501 line too long (97 > 79 characters)
Line 191:80: E501 line too long (99 > 79 characters)
Line 193:80: E501 line too long (91 > 79 characters)
Line 199:80: E501 line too long (116 > 79 characters)
Line 204:80: E501 line too long (118 > 79 characters)
Line 207:80: E501 line too long (106 > 79 characters)
Line 210:80: E501 line too long (89 > 79 characters)
Line 214:80: E501 line too long (113 > 79 characters)
Line 223:80: E501 line too long (99 > 79 characters)
Line 227:80: E501 line too long (83 > 79 characters)
Line 237:80: E501 line too long (90 > 79 characters)
Line 244:80: E501 line too long (103 > 79 characters)
Line 246:80: E501 line too long (82 > 79 characters)
Line 254:80: E501 line too long (90 > 79 characters)
Line 261:80: E501 line too long (95 > 79 characters)
Line 262:80: E501 line too long (103 > 79 characters)
Line 263:80: E501 line too long (84 > 79 characters)
Line 273:80: E501 line too long (109 > 79 characters)
Line 277:80: E501 line too long (103 > 79 characters)
Line 280:80: E501 line too long (98 > 79 characters)
Line 281:80: E501 line too long (107 > 79 characters)
Line 287:80: E501 line too long (125 > 79 characters)
Line 290:80: E501 line too long (83 > 79 characters)
Line 291:80: E501 line too long (104 > 79 characters)
Line 294:80: E501 line too long (83 > 79 characters)
Line 295:80: E501 line too long (86 > 79 characters)
Line 302:80: E501 line too long (103 > 79 characters)
Line 305:80: E501 line too long (85 > 79 characters)
Line 306:80: E501 line too long (96 > 79 characters)
Line 308:80: E501 line too long (96 > 79 characters)
Line 317:80: E501 line too long (82 > 79 characters)
Line 322:80: E501 line too long (95 > 79 characters)
Line 323:80: E501 line too long (83 > 79 characters)
Line 329:80: E501 line too long (95 > 79 characters)
Line 330:80: E501 line too long (80 > 79 characters)
Line 331:80: E501 line too long (91 > 79 characters)
Line 338:80: E501 line too long (117 > 79 characters)
Line 340:80: E501 line too long (105 > 79 characters)
Line 341:80: E501 line too long (113 > 79 characters)
Line 343:80: E501 line too long (97 > 79 characters)
Line 345:80: E501 line too long (100 > 79 characters)
Line 352:80: E501 line too long (92 > 79 characters)
Line 372:80: E501 line too long (89 > 79 characters)
Line 414:80: E501 line too long (94 > 79 characters)
Line 416:80: E501 line too long (87 > 79 characters)
Line 423:80: E501 line too long (85 > 79 characters)
Line 435:80: E501 line too long (92 > 79 characters)
Line 449:80: E501 line too long (83 > 79 characters)
Line 451:80: E501 line too long (94 > 79 characters)
Line 458:80: E501 line too long (88 > 79 characters)
Line 461:80: E501 line too long (115 > 79 characters)
Line 463:80: E501 line too long (105 > 79 characters)
Line 464:80: E501 line too long (91 > 79 characters)
Line 469:80: E501 line too long (83 > 79 characters)
Line 470:80: E501 line too long (99 > 79 characters)

In the file artistools/spectra.py, following are the PEP8 issues :

Line 56:80: E501 line too long (96 > 79 characters)
Line 69:80: E501 line too long (82 > 79 characters)
Line 79:80: E501 line too long (84 > 79 characters)
Line 92:80: E501 line too long (99 > 79 characters)
Line 111:80: E501 line too long (111 > 79 characters)
Line 129:80: E501 line too long (104 > 79 characters)
Line 130:80: E501 line too long (113 > 79 characters)
Line 131:80: E501 line too long (95 > 79 characters)
Line 147:80: E501 line too long (85 > 79 characters)
Line 152:80: E501 line too long (108 > 79 characters)
Line 154:80: E501 line too long (115 > 79 characters)
Line 160:80: E501 line too long (86 > 79 characters)
Line 163:80: E501 line too long (109 > 79 characters)
Line 165:80: E501 line too long (82 > 79 characters)
Line 170:80: E501 line too long (84 > 79 characters)
Line 179:80: E501 line too long (114 > 79 characters)
Line 180:80: E501 line too long (83 > 79 characters)
Line 183:80: E501 line too long (92 > 79 characters)
Line 188:80: E501 line too long (94 > 79 characters)
Line 189:80: E501 line too long (82 > 79 characters)
Line 193:80: E501 line too long (85 > 79 characters)
Line 212:80: E501 line too long (84 > 79 characters)
Line 213:80: E501 line too long (101 > 79 characters)
Line 220:80: E501 line too long (84 > 79 characters)
Line 221:80: E501 line too long (101 > 79 characters)
Line 224:80: E501 line too long (115 > 79 characters)
Line 226:80: E501 line too long (91 > 79 characters)
Line 231:80: E501 line too long (92 > 79 characters)
Line 246:80: E501 line too long (113 > 79 characters)
Line 250:80: E501 line too long (89 > 79 characters)
Line 256:80: E501 line too long (80 > 79 characters)
Line 259:80: E501 line too long (89 > 79 characters)
Line 263:80: E501 line too long (109 > 79 characters)
Line 265:80: E501 line too long (95 > 79 characters)
Line 271:80: E501 line too long (91 > 79 characters)
Line 277:80: E501 line too long (83 > 79 characters)
Line 278:80: E501 line too long (87 > 79 characters)
Line 282:80: E501 line too long (112 > 79 characters)
Line 285:80: E501 line too long (119 > 79 characters)
Line 290:80: E501 line too long (97 > 79 characters)
Line 291:80: E501 line too long (88 > 79 characters)
Line 292:80: E501 line too long (93 > 79 characters)
Line 297:80: E501 line too long (104 > 79 characters)
Line 299:80: E501 line too long (82 > 79 characters)
Line 314:80: E501 line too long (118 > 79 characters)
Line 328:80: E501 line too long (105 > 79 characters)
Line 331:80: E501 line too long (113 > 79 characters)
Line 348:80: E501 line too long (114 > 79 characters)
Line 356:80: E501 line too long (82 > 79 characters)
Line 363:80: E501 line too long (93 > 79 characters)
Line 365:80: E501 line too long (89 > 79 characters)
Line 382:80: E501 line too long (103 > 79 characters)
Line 390:80: E501 line too long (88 > 79 characters)
Line 397:80: E501 line too long (83 > 79 characters)
Line 398:80: E501 line too long (83 > 79 characters)
Line 400:80: E501 line too long (99 > 79 characters)
Line 406:80: E501 line too long (108 > 79 characters)
Line 409:80: E501 line too long (109 > 79 characters)
Line 411:80: E501 line too long (90 > 79 characters)
Line 413:80: E501 line too long (97 > 79 characters)
Line 419:80: E501 line too long (101 > 79 characters)
Line 420:80: E501 line too long (101 > 79 characters)
Line 426:80: E501 line too long (97 > 79 characters)
Line 427:80: E501 line too long (97 > 79 characters)
Line 433:80: E501 line too long (99 > 79 characters)
Line 436:80: E501 line too long (95 > 79 characters)
Line 440:80: E501 line too long (107 > 79 characters)
Line 457:80: E501 line too long (118 > 79 characters)
Line 459:80: E501 line too long (99 > 79 characters)
Line 472:80: E501 line too long (90 > 79 characters)
Line 473:80: E501 line too long (112 > 79 characters)
Line 474:80: E501 line too long (81 > 79 characters)
Line 476:80: E501 line too long (107 > 79 characters)
Line 478:80: E501 line too long (92 > 79 characters)
Line 480:80: E501 line too long (94 > 79 characters)
Line 482:80: E501 line too long (99 > 79 characters)
Line 484:80: E501 line too long (88 > 79 characters)
Line 487:80: E501 line too long (103 > 79 characters)
Line 499:80: E501 line too long (105 > 79 characters)
Line 509:80: E501 line too long (115 > 79 characters)
Line 517:80: E501 line too long (88 > 79 characters)
Line 521:80: E501 line too long (104 > 79 characters)
Line 525:80: E501 line too long (95 > 79 characters)
Line 539:80: E501 line too long (99 > 79 characters)
Line 541:80: E501 line too long (88 > 79 characters)
Line 545:80: E501 line too long (89 > 79 characters)
Line 554:80: E501 line too long (85 > 79 characters)
Line 562:80: E501 line too long (94 > 79 characters)
Line 564:80: E501 line too long (87 > 79 characters)
Line 568:80: E501 line too long (119 > 79 characters)
Line 574:80: E501 line too long (91 > 79 characters)
Line 580:80: E501 line too long (91 > 79 characters)
Line 585:80: E501 line too long (91 > 79 characters)
Line 593:80: E501 line too long (98 > 79 characters)
Line 596:80: E501 line too long (86 > 79 characters)
Line 598:80: E501 line too long (99 > 79 characters)
Line 605:80: E501 line too long (86 > 79 characters)
Line 615:80: E501 line too long (119 > 79 characters)
Line 631:80: E501 line too long (105 > 79 characters)
Line 633:80: E501 line too long (98 > 79 characters)
Line 638:80: E501 line too long (90 > 79 characters)
Line 640:80: E501 line too long (91 > 79 characters)
Line 661:80: E501 line too long (101 > 79 characters)
Line 672:80: E501 line too long (116 > 79 characters)
Line 692:80: E501 line too long (84 > 79 characters)
Line 709:80: E501 line too long (84 > 79 characters)
Line 711:80: E501 line too long (95 > 79 characters)
Line 714:80: E501 line too long (98 > 79 characters)
Line 728:80: E501 line too long (82 > 79 characters)
Line 729:80: E501 line too long (85 > 79 characters)
Line 732:80: E501 line too long (85 > 79 characters)
Line 747:80: E501 line too long (108 > 79 characters)
Line 750:80: E501 line too long (107 > 79 characters)
Line 756:80: E501 line too long (95 > 79 characters)
Line 781:80: E501 line too long (117 > 79 characters)
Line 789:80: E501 line too long (90 > 79 characters)
Line 797:80: E501 line too long (87 > 79 characters)
Line 836:80: E501 line too long (98 > 79 characters)
Line 838:80: E501 line too long (102 > 79 characters)
Line 840:80: E501 line too long (94 > 79 characters)

In the file tests/artistools_test.py, following are the PEP8 issues :

Line 36:80: E501 line too long (89 > 79 characters)
Line 38:80: E501 line too long (94 > 79 characters)
Line 42:80: E501 line too long (82 > 79 characters)
Line 45:80: E501 line too long (85 > 79 characters)
Line 46:80: E501 line too long (84 > 79 characters)
Line 51:80: E501 line too long (113 > 79 characters)
Line 59:80: E501 line too long (91 > 79 characters)
Line 61:80: E501 line too long (111 > 79 characters)
Line 68:80: E501 line too long (88 > 79 characters)
Line 72:80: E501 line too long (109 > 79 characters)
Line 80:80: E501 line too long (100 > 79 characters)
Line 81:80: E501 line too long (81 > 79 characters)
Line 86:80: E501 line too long (89 > 79 characters)
Line 87:80: E501 line too long (106 > 79 characters)
Line 90:80: E501 line too long (114 > 79 characters)
Line 91:80: E501 line too long (114 > 79 characters)
Line 99:80: E501 line too long (90 > 79 characters)
Line 100:80: E501 line too long (80 > 79 characters)
Line 101:80: E501 line too long (81 > 79 characters)
Line 102:80: E501 line too long (80 > 79 characters)
Line 122:80: E501 line too long (106 > 79 characters)
Line 126:80: E501 line too long (82 > 79 characters)

Coverage increased (+0.6%) to 73.98% when pulling e90bc74d4185b9a372553411c09fc5730809749f on synthetic_magnitude_plots into 7ea435feb920281a177b1de3b1d00c34861a5ddc on master.


Test failures on first install against master

Hi,
Just reinstalled the codebase after a long hiatus from the project.

I ran the "hard way" setup and am running on bare metal.
Elasticsearch and Mongo appear to be running.
I get numerous test failures, many relating to permissions.

Do I need to run indexing on Elasticsearch or anything like that? I already ran rails db:setup
Failures:

  1) UsersController should show all users on index if the current user is admin
     Failure/Error: expect(assigns(:users)).to match_array([public_user, user, private_user])

       expected collection contained:  [#<User _id: BSON::ObjectId('589cee7f72683d222a000012'), admin: true, agree: nil, created_at: Thu, 09...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:40 UTC +00:00>]
       actual collection contained:    [#<User _id: BSON::ObjectId('589ce8e872683d1223000000'), admin: true, agree: nil, created_at: Thu, 09...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:40 UTC +00:00>]
       the extra elements were:        [#<User _id: BSON::ObjectId('589ce8e872683d1223000000'), admin: true, agree: nil, created_at: Thu, 09...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:38 UTC +00:00>]
     # ./spec/controllers/users_controller_spec.rb:49:in `block (2 levels) in <top (required)>'

  2) UsersController should only show public users on index
     Failure/Error: expect(assigns(:users)).to match_array([public_user, user])

       expected collection contained:  [#<User _id: BSON::ObjectId('589cee8272683d222a00001e'), admin: false, agree: nil, created_at: Thu, 0...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:43 UTC +00:00>]
       actual collection contained:    [#<User _id: BSON::ObjectId('589ce8e872683d1223000000'), admin: true, agree: nil, created_at: Thu, 09...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:43 UTC +00:00>]
       the extra elements were:        [#<User _id: BSON::ObjectId('589ce8e872683d1223000000'), admin: true, agree: nil, created_at: Thu, 09...lse, level: 0, mailing_list: false, sash_id: nil, updated_at: Thu, 09 Feb 2017 22:34:40 UTC +00:00>]
     # ./spec/controllers/users_controller_spec.rb:40:in `block (2 levels) in <top (required)>'

  3) Api::V1::TagsController lists tags
     Failure/Error: expect(json.length).to eq(2)

       expected: 2
            got: 6

       (compared using ==)
     # ./spec/controllers/api/api_tags_controller_spec.rb:16:in `block (2 levels) in <top (required)>'

  4) Api::V1::CropsController lists crops.
     Failure/Error: expect(json['data'].length).to eq(1)

       expected: 1
            got: 21

       (compared using ==)
     # ./spec/controllers/api/api_crops_controller_spec.rb:17:in `block (2 levels) in <top (required)>'

Finished in 7 minutes 3 seconds (files took 4.23 seconds to load)
114 examples, 4 failures, 7 pending

Failed examples:

rspec ./spec/controllers/users_controller_spec.rb:43 # UsersController should show all users on index if the current user is admin
rspec ./spec/controllers/users_controller_spec.rb:35 # UsersController should only show public users on index
rspec ./spec/controllers/api/api_tags_controller_spec.rb:13 # Api::V1::TagsController lists tags
rspec ./spec/controllers/api/api_crops_controller_spec.rb:14 # Api::V1::CropsController lists crops.

Other errors have been removed for brevity.

@RickCarlino You end up sorting this out?


WGSL: Functions cannot be called at module scope

Failing tests:

tests/language-feature/constants/static-const-in-generic-interface.slang

Example output:
WGPU error: Error while parsing WGSL: :8:24 error: functions cannot be called at module-scope
const result_0 : i32 = EnsureCompileTimeEval_getValue_0();
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 - While validating [ShaderModuleDescriptor]
 - While calling [Device].CreateShaderModule([ShaderModuleDescriptor]).

@csyonghe I haven't looked into this yet, but from the name it sounds like Slang is emitting code where EnsureCompileTimeEval_getValue_0() is supposed to be evaluated by WGSL at compile time.
Is this something Slang does? WGSL has some support for something similar to "constexpr", but I think they have to be explicitly marked as such.

I think this is supposed to be inlined and evaluated by slang so it never actually appears in the generated wgsl code.

For some reason I cannot reproduce by the problematic code by just doing a stand-alone compilation:
slangc -o test.wgsl -target wgsl -stage compute -entry computeMain static-const-in-generic-interface.slang

This produces the following code:
@binding(0) @group(0) var<storage, read_write> outputBuffer_0 : array<i32>;

fn EnsureCompileTimeEval_getValue_0() -> i32
{
    return i32(4);
}

@compute
@workgroup_size(1, 1, 1)
fn computeMain(@builtin(global_invocation_id) dispatchThreadID_0 : vec3<u32>)
{
    outputBuffer_0[i32(0)] = EnsureCompileTimeEval_getValue_0();
    return;
}

I'll debug a bit to see why slang-test somehow comes up with different code, and what the complete generated code looks like.

This is the code that actually gets used to create the WebGPU shader module.
It has the problem that the error message is complaining about
@binding(0) @group(0) var<storage, read_write> outputBuffer_0 : array<i32>;

fn EnsureCompileTimeEval_getValue_0() -> i32
{
    return i32(4);
}

const result_0 : i32 = EnsureCompileTimeEval_getValue_0();
@compute
@workgroup_size(1, 1, 1)
fn computeMain(@builtin(global_invocation_id) dispatchThreadID_0 : vec3<u32>)
{
    var dispatchThreadID_1 : vec3<i32> = vec3<i32>(dispatchThreadID_0);
    outputBuffer_0[i32(0)] = result_0;
    return;
}

I can reproduce with slangc if I add the -minimum-slang-optimization option! This will make it easier to investigate.

After some debugging based on the above, I have discovered that running simplifyIR at various places in linkAndOptimizeIR resolves the issue.
That feels like overkill though...
The basic issue is that static const int result = EnsureCompileTimeEval<int>.getValue<Impl>(); gets hoisted out to global scope by the time we get to WGSL. (I believe constants must be at global scope in WGSL.)
It seems to me that whatever code is hoisting this variable should trigger some kind of more targeted simplification to avoid illegal function calls at global scope level.
I noticed that in HLSL we do end up with a global function call, though it's allowed:
static const int result_0 = EnsureCompileTimeEval_getValue_0();
For GLSL, it seems the required simplification is running even with -minimum-slang-optimization.
Probably WGSL should be handled in the same way as GLSL, so now I'm investigating how GLSL avoids this issue.

This call here may be difference between WGSL and GLSL in this case:
https://github.com/shader-slang/slang/blob/master/source/slang/slang-emit.cpp#L1466
At least, if I comment this out then GLSL generates code with similar problem (call expression at global scope).

This call here may be difference between WGSL and GLSL in this case: https://github.com/shader-slang/slang/blob/master/source/slang/slang-emit.cpp#L1466
At least, if I comment this out then GLSL generates code with similar problem (call expression at global scope).

Running the same code for WGSL gets rid of the function call at global scope if I just have -minimum-slang-optimization on the command line. However slang-test still ends up generating the function call at global scope.
I believe slang-test is compiling in debug mode. Indeed if I add -g1 then that reintroduces the function call at global scope issue.
Debugging further, I found that WGSL emit logic works differently in these two cases: the call is deemed to possibly have side effects when I run via slang-test, and so shouldFoldInstIntoUseSites returns false, whereas it returns true when I run slangc (at least without -g1).
I also noticed that -g1 causes GLSL to generate the call at global scope, so I don't expect to find a solution by looking at how GLSL handles this, because it seemingly doesn't!

I assume it's correct that the call may have side effects: in debug mode any call could have the side effect of e.g. breaking into the debugger.
One way around this would be to say that the call can be folded into usage sites on the condition that it's also possible to then completely inline it so that there is no call anymore: hence no unintended side effects.

Yong pointed out yesterday that static const values get lowered to global constants right away when producing the initial IR, and also that the SPIR-V backend doesn't have this problem.
The reason is that SPIR-V IR legalization contains some code that will inline such global constants.
The task is now to make that code reusable and then run it for WGSL as well. (I also noticed that GLSL seems to have the same issue when

When I try to reuse the same kind of legalization as SPIR-V does (https://github.com/aleino-nv/slang/tree/aleino/wgpu), the reference to the
global call gets inlined into the function, but unfortunately the global call remains.
@binding(0) @group(0) var<storage, read_write> outputBuffer_0 : array<i32>;

fn EnsureCompileTimeEval_getValue_0() -> i32
{
    return i32(4);
}

const result_0 : i32 = EnsureCompileTimeEval_getValue_0();
@compute
@workgroup_size(1, 1, 1)
fn computeMain(@builtin(global_invocation_id) dispatchThreadID_0 : vec3<u32>)
{
    var dispatchThreadID_1 : vec3<i32> = vec3<i32>(dispatchThreadID_0);
    var result_1 : i32 = EnsureCompileTimeEval_getValue_0();
    var result_2 : i32 = EnsureCompileTimeEval_getValue_0();
    outputBuffer_0[i32(0)] = result_2;
    return;
}

I tried adding the same kind of "legalization cleanup" that's done for SPIR-V, but the
same code as above is still generated.
@csyonghe I guess I need some tweaks to the way that inlining is done in this case..

You will need to delete the global insts after they have been inlined.

You will need to delete the global insts after they have been inlined.

Sure, in one way or another... but this is now the same logic as for the SPIR-V legalization.
I guess for SPIR-V, the global gets cleaned up by some other means?

The spirv emit logic will not emit anything not referenced by the EntryPoint. But wgsl backend will simply emit everything in the module so it doesn’t hurt to just remove the unused global for both backends.

Ok, I added some code to remove any globals that are left unused after the inlining, and now the test is passing.

Here is a PR  https://github.com/shader-slang/slang/pull/5768

There is an issue where after removing the inlined IRInst's we end up deleting an SPIRVAsm instruction for tests/spirv/global-compute.slang.
The instruction is representing static const int vmin = min(1,2); as SPIRVAsm.
Then later on, for some reason spvtools ends up crashing (dereferencing the result type, which is nullptr) when optimizing this instruction.

I think I have a proper fix for the issue in the above PR now -- it's now in review.

Found out in review that another fix is needed, so this required another attempt which I've just submitted, so the patch is in review again.

It turned out there was a problem with the existing inlining code, that only became apparent when I added my change to delete the inlined nodes. The inlining problem should now be solved, as well.