ConstructionFailure(MissingCredentials) when using IAM Roles attached to an instance

Describe the bug
We are running an SQS client as a Kubernetes pod on EC2.
When doing any SQS request, we get the following error:
Error: ConstructionFailure(MissingCredentials)
Expected Behavior
According to the documentation in https://docs.aws.amazon.com/sdk-for-rust/latest/dg/credentials.html, the request should work because "IAM Roles attached to an instance" is supported.
Current Behavior
We tested the EC2 policy using the AWS command line, and we were able to query the SQS queue without API keys.
We also have a number of services that access S3, and they also work correctly without API keys.
Reproduction Steps
I'm just building the client
        let mut conf = aws_config::load_from_env().await;
        let mut builder = aws_sdk_sqs::config::Builder::from(&conf);
        let client = aws_sdk_sqs::Client::from_conf(builder.build());

and sending the request
let get_url_resp = client.get_queue_url().queue_name("foo_queue").send().await?;

Possible Solution
No response
Additional Information/Context
No response
Version
├── aws-config v0.47.0
│   ├── aws-http v0.47.0
│   │   ├── aws-smithy-http v0.47.0
│   │   │   ├── aws-smithy-eventstream v0.47.0
│   │   │   │   ├── aws-smithy-types v0.47.0
│   │   │   ├── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-types v0.47.0
│   │   │   ├── aws-smithy-async v0.47.0
│   │   │   ├── aws-smithy-client v0.47.0
│   │   │   │   ├── aws-smithy-async v0.47.0 (*)
│   │   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   │   ├── aws-smithy-http-tower v0.47.0
│   │   │   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   │   ├── aws-smithy-types v0.47.0 (*)
│   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   ├── aws-smithy-types v0.47.0 (*)
│   ├── aws-sdk-sso v0.17.0
│   │   ├── aws-endpoint v0.47.0
│   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   ├── aws-types v0.47.0 (*)
│   │   ├── aws-http v0.47.0 (*)
│   │   ├── aws-sig-auth v0.47.0
│   │   │   ├── aws-sigv4 v0.47.0
│   │   │   │   ├── aws-smithy-eventstream v0.47.0 (*)
│   │   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   ├── aws-smithy-eventstream v0.47.0 (*)
│   │   │   ├── aws-smithy-http v0.47.0 (*)
│   │   │   ├── aws-types v0.47.0 (*)
│   │   ├── aws-smithy-async v0.47.0 (*)
│   │   ├── aws-smithy-client v0.47.0 (*)
│   │   ├── aws-smithy-http v0.47.0 (*)
│   │   ├── aws-smithy-http-tower v0.47.0 (*)
│   │   ├── aws-smithy-json v0.47.0
│   │   │   └── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-types v0.47.0 (*)
│   ├── aws-sdk-sts v0.17.0
│   │   ├── aws-endpoint v0.47.0 (*)
│   │   ├── aws-http v0.47.0 (*)
│   │   ├── aws-sig-auth v0.47.0 (*)
│   │   ├── aws-smithy-async v0.47.0 (*)
│   │   ├── aws-smithy-client v0.47.0 (*)
│   │   ├── aws-smithy-http v0.47.0 (*)
│   │   ├── aws-smithy-http-tower v0.47.0 (*)
│   │   ├── aws-smithy-query v0.47.0
│   │   │   ├── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-smithy-types v0.47.0 (*)
│   │   ├── aws-smithy-xml v0.47.0
│   │   ├── aws-types v0.47.0 (*)
│   ├── aws-smithy-async v0.47.0 (*)
│   ├── aws-smithy-client v0.47.0 (*)
│   ├── aws-smithy-http v0.47.0 (*)
│   ├── aws-smithy-http-tower v0.47.0 (*)
│   ├── aws-smithy-json v0.47.0 (*)
│   ├── aws-smithy-types v0.47.0 (*)
│   ├── aws-types v0.47.0 (*)
├── aws-sdk-s3 v0.17.0
│   ├── aws-endpoint v0.47.0 (*)
│   ├── aws-http v0.47.0 (*)
│   ├── aws-sig-auth v0.47.0 (*)
│   ├── aws-sigv4 v0.47.0 (*)
│   ├── aws-smithy-async v0.47.0 (*)
│   ├── aws-smithy-checksums v0.47.0
│   │   ├── aws-smithy-http v0.47.0 (*)
│   │   ├── aws-smithy-types v0.47.0 (*)
│   ├── aws-smithy-client v0.47.0 (*)
│   ├── aws-smithy-eventstream v0.47.0 (*)
│   ├── aws-smithy-http v0.47.0 (*)
│   ├── aws-smithy-http-tower v0.47.0 (*)
│   ├── aws-smithy-types v0.47.0 (*)
│   ├── aws-smithy-xml v0.47.0 (*)
│   ├── aws-types v0.47.0 (*)
├── aws-sdk-sqs v0.17.0
│   ├── aws-endpoint v0.47.0 (*)
│   ├── aws-http v0.47.0 (*)
│   ├── aws-sig-auth v0.47.0 (*)
│   ├── aws-smithy-async v0.47.0 (*)
│   ├── aws-smithy-client v0.47.0 (*)
│   ├── aws-smithy-http v0.47.0 (*)
│   ├── aws-smithy-http-tower v0.47.0 (*)
│   ├── aws-smithy-query v0.47.0 (*)
│   ├── aws-smithy-types v0.47.0 (*)
│   ├── aws-smithy-xml v0.47.0 (*)
│   ├── aws-types v0.47.0 (*)
├── aws-smithy-http v0.47.0 (*)
├── aws-types v0.47.0 (*)
├── aws_lambda_events v0.6.3

### Environment details (OS name and version, etc.)

Debian instance on EC2

### Logs

_No response_

I believe this issue is the same one as https://github.com/awslabs/aws-sdk-rust/issues/425
We don't yet support "anonymous" (from the SDK's point of view at least) requests. We posted a workaround in that past issue thread, here's an updated version for your use case. Would you mind trying it out to see if it works for you?
The required dependencies:
[dependencies]
aws-sdk-sqs = "0.17.0"
aws-smithy-client = "0.47.0"
aws-sig-auth = "0.47.0"
aws-smithy-http = "0.47.0"
aws-config = "0.47.0"
tokio = { version = "1.20.1", features = ["full"] }

The code:
use aws_sdk_sqs::operation::GetQueueUrl;
use aws_sdk_sqs::Credentials;
use aws_sig_auth::signer::OperationSigningConfig;
use aws_sig_auth::signer::SigningRequirements;
use aws_smithy_http::operation::Operation;

#[tokio::main]
async fn main() {
    let conf = aws_config::from_env()
        .credentials_provider(Credentials::new("stub", "stub", None, None, "faked"))
        .region("us-east-1")
        .load()
        .await;
    let conf = aws_sdk_sqs::Config::new(&conf);
    let client = aws_smithy_client::Builder::dyn_https()
        .middleware(aws_sdk_sqs::middleware::DefaultMiddleware::new())
        .build();

    let mut operation = GetQueueUrl::builder()
        .queue_name("foo_queue")
        .build()
        .unwrap()
        .make_operation(&conf)
        .await
        .unwrap();
    make_unsigned(&mut operation);
    let resp = client
        .call(operation)
        .await
        .expect("request should succeed");

    println!("{}", resp.queue_url().unwrap_or_default());
}

// this function will work on any S3 operation
fn make_unsigned(operation: &mut Operation) {
    let mut props = operation.properties_mut();
    let mut signing_config = props
        .get_mut::<OperationSigningConfig>()
        .expect("has signing_config");
    signing_config.signing_requirements = SigningRequirements::Disabled;
}

🤞

@Velfi I can confirm that your workaround works.
Thanks for the quick reply, I'll close this issue.

Sorry, I need to reopen this because I realized that, while the workaround prevents the client-side error and allows me to make the HTTP call to receive-messages, I'm now getting an Access Denied error from AWS.
I'll put some log lines here:
2022-08-19T16:08:45.515078Z TRACE receive{self=Queue { client: Client { connector: DynConnector, middleware: DefaultMiddleware, retry_policy: Standard { config: Config { initial_retry_tokens: 500, retry_cost: 5, no_retry_increment: 1, timeout_retry_cost: 10, max_attempts: 3, initial_backoff: 1s, max_backoff: 20s, base: 0x560edfac8b80 }, shared_state: CrossRequestRetryState { quota_available: Mutex { data: 500, poisoned: false, .. } } }, timeout_config: Config { api: Api { call: Unset, call_attempt: Unset }, http: Http { connect: Unset, write: Unset, read: Unset, tls_negotiation: Unset }, tcp: Tcp { connect: Unset, write: Unset, read: Unset } }, sleep_impl: Unset }, url: "https://sqs.eu-west-1.amazonaws.com/087849981844/excalibur-company-materializer-qrp-events", conf: Config }}:send_operation{operation="ReceiveMessage" service="sqs"}: aws_smithy_http_tower::dispatch: request=Request { method: POST, uri: https://sqs.eu-west-1.amazonaws.com/, version: HTTP/1.1, headers: {"content-type": "application/x-www-form-urlencoded", "content-length": "150", "user-agent": "aws-sdk-rust/0.47.0 os/linux lang/rust/1.61.0", "x-amz-user-agent": "aws-sdk-rust/0.47.0 api/sqs/0.17.0 os/linux lang/rust/1.61.0"}, body: SdkBody { inner: Once(Some(b"Action=ReceiveMessage&Version=2012-11-05&QueueUrl=https%3A%2F%2Fsqs.eu-west-1.amazonaws.com%2F087849981844%2Fexcalibur-company-materializer-qrp-events")), retryable: true } }

2022-08-19T16:08:45.541640Z TRACE receive{self=Queue { client: Client { connector: DynConnector, middleware: DefaultMiddleware, retry_policy: Standard { config: Config { initial_retry_tokens: 500, retry_cost: 5, no_retry_increment: 1, timeout_retry_cost: 10, max_attempts: 3, initial_backoff: 1s, max_backoff: 20s, base: 0x560edfac8b80 }, shared_state: CrossRequestRetryState { quota_available: Mutex { data: 500, poisoned: false, .. } } }, timeout_config: Config { api: Api { call: Unset, call_attempt: Unset }, http: Http { connect: Unset, write: Unset, read: Unset, tls_negotiation: Unset }, tcp: Tcp { connect: Unset, write: Unset, read: Unset } }, sleep_impl: Unset }, url: "https://sqs.eu-west-1.amazonaws.com/087849981844/excalibur-company-materializer-qrp-events", conf: Config }}:send_operation{operation="ReceiveMessage" service="sqs"}:load_response: aws_smithy_http::middleware: http_response=Response { status: 403, version: HTTP/1.1, headers: {"x-amzn-requestid": "9c900997-c548-5bc8-be2c-52ee7285eaeb", "connection": "close", "date": "Fri, 19 Aug 2022 16:08:45 GMT", "content-type": "text/xml", "content-length": "319"}, body: b"<?xml version=\"1.0\"?><ErrorResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><Error><Type>Sender</Type>AccessDenied<Message>Access to the resource https://sqs.eu-west-1.amazonaws.com/ is denied.</Message><Detail/></Error><RequestId>9c900997-c548-5bc8-be2c-52ee7285eaeb</RequestId></ErrorResponse>" }

The same operation, in the same environment, using the CLI, works correctly.

Can you use debug information to ensure you're hitting the same region and resolving the same credentials in the CLI and the Rust SDK? It appears to be dispatching the request succesfully
Seems like you're using the receive_message API here based on the logs? Please send the CLI command your invoking along side the Rust code

This is the CLI command:
aws sqs receive-message --queue-url=https://sqs.eu-west-1.amazonaws.com/087849981844/excalibur-company-materializer-qrp-events
The logs are a bit verbose, but we can already see that I'm hitting the correct URL/endpoint:
QueueUrl=https://sqs.eu-west-1.amazonaws.com/087849981844/excalibur-company-materializer-qrp-events
I'm not sure how to find out what credentials it's resolving. My understanding is that I'm not sending any credentials, and indeed I can't find any in the logs, but my knowledge of AWS credentials is still a bit sketchy.

@albx79 Would you be able to send us a minimum reproduction of what you're doing in your Rust code?

I finally got a k8s test environment set up and I'm looking into this.

Hey @albx70, after looking at this, I wasn't able to repro your issue so I have something for you to try (if you wouldn't mind.)
// [dependencies]
// aws-config = "0.47.0"
// aws-sdk-sqs = "0.17.0"
// aws-sdk-sts = "0.17.0"
// tokio = { version = "1.20.1", features = ["full"] }
// tracing = "0.1.36"
// tracing-subscriber = "0.3.15"

#[tokio::main]
async fn main() {
    tracing_subscriber::fmt::init();

    let conf = aws_config::load_from_env().await;

    {
        let client = aws_sdk_sts::Client::new(&conf);
        let res = client.get_caller_identity().send().await;
        tracing::info!("caller_identity = {:#?}", res)
    }

    let queue_name = std::env::var("SQS_QUEUE_NAME").unwrap();
    let client = aws_sdk_sqs::Client::new(&conf);

    let res = client
        .get_queue_url()
        .queue_name(queue_name)
        .send()
        .await
        .unwrap();
    let queue_url = res.queue_url().unwrap();

    let res = client.receive_message().queue_url(queue_url).send().await;

    match res {
        Ok(res) => tracing::info!("success: {:#?}", res),
        Err(e) => tracing::error!("failure: {:#?}", e),
    }
}

Run this like so:
RUST_LOG=debug cargo run

That will emit a bunch of logs related to resolving your credentials and they'll look something like this:
2022-08-26T15:50:00.558820Z DEBUG aws_config::fs_util: loaded home directory src="HOME"
2022-08-26T15:50:00.558912Z DEBUG load_config_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/config"
2022-08-26T15:50:00.559024Z DEBUG load_config_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/config" after="/root/.aws/config"
2022-08-26T15:50:00.559212Z DEBUG load_config_file: aws_config::profile::parser::source: config file not found path=~/.aws/config
2022-08-26T15:50:00.559344Z DEBUG load_config_file: aws_config::profile::parser::source: config file loaded path=~/.aws/config size=0
2022-08-26T15:50:00.559534Z DEBUG load_credentials_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/credentials"
2022-08-26T15:50:00.559694Z DEBUG load_credentials_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/credentials" after="/root/.aws/credentials"
2022-08-26T15:50:00.559771Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file not found path=~/.aws/credentials
2022-08-26T15:50:00.559821Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file loaded path=~/.aws/credentials size=0
2022-08-26T15:50:00.560030Z DEBUG aws_config::fs_util: loaded home directory src="HOME"
2022-08-26T15:50:00.560107Z DEBUG load_config_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/config"
2022-08-26T15:50:00.560170Z DEBUG load_config_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/config" after="/root/.aws/config"
2022-08-26T15:50:00.560232Z DEBUG load_config_file: aws_config::profile::parser::source: config file not found path=~/.aws/config
2022-08-26T15:50:00.560280Z DEBUG load_config_file: aws_config::profile::parser::source: config file loaded path=~/.aws/config size=0
2022-08-26T15:50:00.560379Z DEBUG load_credentials_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/credentials"
2022-08-26T15:50:00.560438Z DEBUG load_credentials_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/credentials" after="/root/.aws/credentials"
2022-08-26T15:50:00.560500Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file not found path=~/.aws/credentials
2022-08-26T15:50:00.560559Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file loaded path=~/.aws/credentials size=0
2022-08-26T15:50:00.574696Z DEBUG rustls::anchors: add_pem_file processed 137 valid and 0 invalid certs
2022-08-26T15:50:00.574890Z DEBUG aws_config::fs_util: loaded home directory src="HOME"
2022-08-26T15:50:00.575080Z DEBUG load_config_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/config"
2022-08-26T15:50:00.575153Z DEBUG load_config_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/config" after="/root/.aws/config"
2022-08-26T15:50:00.575216Z DEBUG load_config_file: aws_config::profile::parser::source: config file not found path=~/.aws/config
2022-08-26T15:50:00.575265Z DEBUG load_config_file: aws_config::profile::parser::source: config file loaded path=~/.aws/config size=0
2022-08-26T15:50:00.575366Z DEBUG load_credentials_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/credentials"
2022-08-26T15:50:00.575511Z DEBUG load_credentials_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/credentials" after="/root/.aws/credentials"
2022-08-26T15:50:00.575667Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file not found path=~/.aws/credentials
2022-08-26T15:50:00.575722Z DEBUG load_credentials_file: aws_config::profile::parser::source: config file loaded path=~/.aws/credentials size=0
2022-08-26T15:50:00.579122Z DEBUG aws_endpoint: resolved endpoint endpoint=AwsEndpoint { endpoint: Endpoint { uri: https://sts.us-east-1.amazonaws.com/, immutable: false }, credential_scope: CredentialScope { region: Some(SigningRegion("us-east-1")), service: None } } base_region=Region("us-east-1")
2022-08-26T15:50:00.579487Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::chain: provider in chain did not provide credentials provider=Environment context=environment variable not set
2022-08-26T15:50:00.579642Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}: aws_config::fs_util: loaded home directory src="HOME"
2022-08-26T15:50:00.579912Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_config_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/config"
2022-08-26T15:50:00.580176Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_config_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/config" after="/root/.aws/config"
2022-08-26T15:50:00.580385Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_config_file: aws_config::profile::parser::source: config file not found path=~/.aws/config
2022-08-26T15:50:00.580459Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_config_file: aws_config::profile::parser::source: config file loaded path=~/.aws/config size=0
2022-08-26T15:50:00.580590Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_credentials_file: aws_config::profile::parser::source: performing home directory substitution home="/root" path="~/.aws/credentials"
2022-08-26T15:50:00.580772Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_credentials_file: aws_config::profile::parser::source: home directory expanded before="~/.aws/credentials" after="/root/.aws/credentials"
2022-08-26T15:50:00.581278Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_credentials_file: aws_config::profile::parser::source: config file not found path=~/.aws/credentials
2022-08-26T15:50:00.581351Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=Profile}:load_credentials_file: aws_config::profile::parser::source: config file loaded path=~/.aws/credentials size=0
2022-08-26T15:50:00.581522Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::chain: provider in chain did not provide credentials provider=Profile context=No profiles were defined
2022-08-26T15:50:00.584774Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}: aws_endpoint: resolved endpoint endpoint=AwsEndpoint { endpoint: Endpoint { uri: https://sts.us-east-1.amazonaws.com/, immutable: false }, credential_scope: CredentialScope { region: Some(SigningRegion("us-east-1")), service: None } } base_region=Region("us-east-1")
2022-08-26T15:50:00.584990Z  INFO send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: aws_http::auth: provider returned CredentialsNotLoaded, ignoring
2022-08-26T15:50:00.585587Z DEBUG hyper::client::connect::dns: resolving host="sts.us-east-1.amazonaws.com"
2022-08-26T15:50:00.593329Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: hyper::client::connect::http: connecting to <IP_ADDRESS>:443
2022-08-26T15:50:00.595556Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: hyper::client::connect::http: connected to <IP_ADDRESS>:443
2022-08-26T15:50:00.595715Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::hs: No cached session for DNSNameRef("sts.us-east-1.amazonaws.com")
2022-08-26T15:50:00.595841Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::hs: Not resuming any session
2022-08-26T15:50:00.598147Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::hs: ALPN protocol is Some(b"http/1.1")
2022-08-26T15:50:00.598230Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::hs: Using ciphersuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
2022-08-26T15:50:00.598845Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::tls12: ECDHE curve is ECParameters { curve_type: NamedCurve, named_group: secp256r1 }
2022-08-26T15:50:00.598971Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::tls12: Server DNS name is DNSName("sts.us-east-1.amazonaws.com")
2022-08-26T15:50:00.602227Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: rustls::client::tls12: Session saved
2022-08-26T15:50:00.603036Z DEBUG hyper::proto::h1::io: flushed 1592 bytes
2022-08-26T15:50:00.813101Z DEBUG hyper::proto::h1::io: parsed 4 headers
2022-08-26T15:50:00.813163Z DEBUG hyper::proto::h1::conn: incoming body is content-length (2454 bytes)
2022-08-26T15:50:00.813270Z DEBUG hyper::proto::h1::conn: incoming body completed
2022-08-26T15:50:00.813660Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}:load_credentials{provider=WebIdentityToken}:load_credentials{provider="WebIdentityToken"}:send_operation{operation="AssumeRoleWithWebIdentity" service="sts"}: hyper::client::pool: pooling idle connection for ("https", sts.us-east-1.amazonaws.com)
2022-08-26T15:50:00.814788Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::chain: loaded credentials provider=WebIdentityToken
2022-08-26T15:50:00.816147Z DEBUG hyper::client::connect::dns: resolving host="sts.us-east-1.amazonaws.com"
2022-08-26T15:50:00.822082Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: hyper::client::connect::http: connecting to <IP_ADDRESS>:443
2022-08-26T15:50:00.824170Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: hyper::client::connect::http: connected to <IP_ADDRESS>:443
2022-08-26T15:50:00.824338Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::hs: Resuming session
2022-08-26T15:50:00.826515Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::hs: ALPN protocol is Some(b"http/1.1")
2022-08-26T15:50:00.826576Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::hs: Using ciphersuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
2022-08-26T15:50:00.827123Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::tls12: ECDHE curve is ECParameters { curve_type: NamedCurve, named_group: secp256r1 }
2022-08-26T15:50:00.827207Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::tls12: Server DNS name is DNSName("sts.us-east-1.amazonaws.com")
2022-08-26T15:50:00.829804Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: rustls::client::tls12: Session saved
2022-08-26T15:50:00.830450Z DEBUG hyper::proto::h1::io: flushed 1894 bytes
2022-08-26T15:50:00.844332Z DEBUG hyper::proto::h1::io: parsed 4 headers
2022-08-26T15:50:00.844365Z DEBUG hyper::proto::h1::conn: incoming body is content-length (535 bytes)
2022-08-26T15:50:00.844433Z DEBUG hyper::proto::h1::conn: incoming body completed
2022-08-26T15:50:00.844669Z DEBUG send_operation{operation="GetCallerIdentity" service="sts"}: hyper::client::pool: pooling idle connection for ("https", sts.us-east-1.amazonaws.com)
2022-08-26T15:50:00.845486Z  INFO imds_creds_missing_in_k8s: caller_identity = Ok(
    GetCallerIdentityOutput {
        user_id: Some(
            "AROA2LYEZOZTAQGKPRZO2:web-identity-token-1661529000581",
        ),
        account: Some(
            "712437757542",
        ),
        arn: Some(
            "arn:aws:sts::712437757542:assumed-role/EksCredentialsStack-helloekseksserviceaccountRole7-1ANCUXW66N12E/web-identity-token-1661529000581",
        ),
    },
)
2022-08-26T15:50:00.845648Z DEBUG rustls::session: Sending warning alert CloseNotify
2022-08-26T15:50:00.849351Z DEBUG aws_endpoint: resolved endpoint endpoint=AwsEndpoint { endpoint: Endpoint { uri: https://sqs.us-east-1.amazonaws.com/, immutable: false }, credential_scope: CredentialScope { region: Some(SigningRegion("us-east-1")), service: None } } base_region=Region("us-east-1")
2022-08-26T15:50:00.849601Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::lazy_caching: loaded credentials from cache
2022-08-26T15:50:00.850525Z DEBUG hyper::client::connect::dns: resolving host="sqs.us-east-1.amazonaws.com"
2022-08-26T15:50:00.857497Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: hyper::client::connect::http: connecting to <IP_ADDRESS>:443
2022-08-26T15:50:00.860509Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: hyper::client::connect::http: connected to <IP_ADDRESS>:443
2022-08-26T15:50:00.860635Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::hs: No cached session for DNSNameRef("sqs.us-east-1.amazonaws.com")
2022-08-26T15:50:00.860704Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::hs: Not resuming any session
2022-08-26T15:50:00.863080Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::hs: ALPN protocol is Some(b"http/1.1")
2022-08-26T15:50:00.863159Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::hs: Using ciphersuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
2022-08-26T15:50:00.864002Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::tls12: ECDHE curve is ECParameters { curve_type: NamedCurve, named_group: secp256r1 }
2022-08-26T15:50:00.864085Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::tls12: Server DNS name is DNSName("sqs.us-east-1.amazonaws.com")
2022-08-26T15:50:00.866850Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: rustls::client::tls12: Session saved
2022-08-26T15:50:00.867443Z DEBUG hyper::proto::h1::io: flushed 1960 bytes
2022-08-26T15:50:00.889446Z DEBUG hyper::proto::h1::io: parsed 4 headers
2022-08-26T15:50:00.889488Z DEBUG hyper::proto::h1::conn: incoming body is content-length (366 bytes)
2022-08-26T15:50:00.889572Z DEBUG hyper::proto::h1::conn: incoming body completed
2022-08-26T15:50:00.889883Z DEBUG send_operation{operation="GetQueueUrl" service="sqs"}: hyper::client::pool: pooling idle connection for ("https", sqs.us-east-1.amazonaws.com)
2022-08-26T15:50:00.890730Z DEBUG aws_endpoint: resolved endpoint endpoint=AwsEndpoint { endpoint: Endpoint { uri: https://sqs.us-east-1.amazonaws.com/, immutable: false }, credential_scope: CredentialScope { region: Some(SigningRegion("us-east-1")), service: None } } base_region=Region("us-east-1")
2022-08-26T15:50:00.890973Z DEBUG send_operation{operation="ReceiveMessage" service="sqs"}:provide_credentials{provider=default_chain}: aws_config::meta::credentials::lazy_caching: loaded credentials from cache
2022-08-26T15:50:00.891897Z DEBUG send_operation{operation="ReceiveMessage" service="sqs"}: hyper::client::pool: reuse idle connection for ("https", sqs.us-east-1.amazonaws.com)
2022-08-26T15:50:00.892229Z DEBUG hyper::proto::h1::io: flushed 2022 bytes
2022-08-26T15:50:01.006567Z DEBUG hyper::proto::h1::io: parsed 4 headers
2022-08-26T15:50:01.006619Z DEBUG hyper::proto::h1::conn: incoming body is content-length (240 bytes)
2022-08-26T15:50:01.006714Z DEBUG hyper::proto::h1::conn: incoming body completed
2022-08-26T15:50:01.007061Z DEBUG send_operation{operation="ReceiveMessage" service="sqs"}: hyper::client::pool: pooling idle connection for ("https", sqs.us-east-1.amazonaws.com)
2022-08-26T15:50:01.007642Z  INFO imds_creds_missing_in_k8s: success: ReceiveMessageOutput {
    messages: None,
}
2022-08-26T15:50:01.007777Z DEBUG rustls::session: Sending warning alert CloseNotify
2022-08-26T15:50:01.008784Z DEBUG rustls::session: Sending warning alert CloseNotify

What I'm hoping is that we'll see that it's either not loading your creds OR it's loading the wrong creds. Also, this will log the output of sts#GetCallerIdentity. Make sure that it returns the same output as when you run the AWS CLI because that'll show if the CLI and your app are accessing different identities.

I'm not sure what changed, but it's working now. Thanks for your help, and sorry for the inconvenience.

Glad it's working!


openssl fails to install

I've followed the procedure to make the standalone version (https://github.com/Homebrew/linuxbrew/wiki/Standalone-Installation) on a CentOS 5.11 macine. I've run into an issue with openssl:
[mk@mk-c5 ~]$ brew postinstall -v openssl
==> Downloading http://curl.haxx.se/ca/cacert.pem
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 1.8.7-374; x86_64-linux) http://curl.haxx.se/ca/cacert.pem -C 0 -o /home/mk/.cache/Homebrew/openssl--cacert-1.0.2.pem.incomplete --insecure
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  243k  100  243k    0     0   317k      0 --:--:-- --:--:-- --:--:--  436k
==> Verifying openssl--cacert-1.0.2.pem checksum
Error: SHA1 mismatch
Expected: e8e794392766cca1528858a229ac046b0f5d5801
Actual: 1d6fef5a6a5ad01f52e31e274e2d811b2b794e80
Archive: /home/mk/.cache/Homebrew/openssl--cacert-1.0.2.pem
To retry an incomplete download, remove the file above.

Here is the log: https://gist.github.com/45c167e860a47349f55a
Thanks.

Thanks for the helpful bug report, Migel.


feat: add version in region header

What's changed and what's your intention?

Please explain IN DETAIL what the changes are in this PR and why they are needed. :D

Checklist

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] I have passed make check and make test or make all in my local envirorment.

Related issues or PRs (optional)

Too old, I'll open a new PR.


chore: Update valibot dependency to version >=v0.33.0

Unfortunately, I introduced a breaking change in a type of Valibot v0.33.0. So I updated the dependencies.

Thanks for keeping us up to date!


PartitionSupervisorCore.RunAsync leaks System.Threading.CancellationTokenSource+Linked1CancellationTokenSource

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug
Instances of System.Threading.CancellationTokenSource+Linked1CancellationTokenSource are leaked by the PartitionSupervisorCore.RunAsync method via calls to CancellationTokenSource.CreateLinkedTokenSource which are stored in the processorCancellation member.
The caller, PartitionControllerCore.ProcessPartitionAsync, has a catch clause that handles FeedRangeGoneException, and calls PartitionControllerCore.HandlePartitionGoneAsync, which eventually loops back around to PartitionControllerCore.ProcessPartitionAsync again, which calls PartitionSupervisorCore.RunAsync, when in turn allocates another CancellationTokenSource, but without cleaning up the previous instance.
To Reproduce
I don't know how our application got into this state, but by the time we captured a dump, there were 6.7 million instances of
System.Threading.CancellationTokenSource+Linked1CancellationTokenSource allocated along the call stack mentioned above.
I suspect the leak was a side effect of some kind of infinite loop from FeedRangeGoneException being thrown over and over again, but I have no idea why this happened or how to reproduce it.
Expected behavior
The SDK doesn't leak memory.
Actual behavior
The SDK leaks System.Threading.CancellationTokenSource+Linked1CancellationTokenSource instances in the extreme.
Environment summary
SDK Version: 3.32 (I know this isn't the latest but there is no change to memory management that I can see in the most recent code).
Windows Server 2022
net 7.0.304
Additional context

@jahmai-ca Thanks for the report. I'm trying to follow the path you described but I'm having a hard time.
PartitionSupervisorCore has a single CreateLinkedTokenSource which populates the this.processorCancellation and that variable never gets overwritten, it is readonly. It gets disposed when the PartitionSupervisorCore gets disposed.
PartitionControllerCore will catch the FeedRangeGoneException and what it does is handle the split, and release the lease. At this moment, the PartitionSupervisorCore instance is no longer used. The only thing I can think of is that the GC is not disposing it due to some environment condition? Maybe calling Dispose explicitly there would fix it.
PartitionControllerCore does not create any LinkedCancellationToken so the only one that could be in play I believe is the one in the Supervisor.
One clarification: It is not a loop. Once the split is handled, the lease is released. The current or another ChangeFeedProcessor instance can Acquire it and start processing.
Getting continuous FeedRangeGoneException however means something is off, this is meant to signal that a partition has split and normally the resolution is in 1 step. Did you by any chance delete and recreate the monitored container with the processor running?

@ealsur
Not sure we're looking at the same code here...

this.processorCancellation and that variable never gets overwritten, it is readonly

It's not readonly: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionSupervisorCore.cs#L22
It can't be because it's being assigned outside the constructor by RunAsync: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionSupervisorCore.cs#L32-L36

PartitionControllerCore will catch the FeedRangeGoneException and what it does is handle the split, and release the lease.

It also throws it up to the caller:
https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionSupervisorCore.cs#L57-L61
The caller (PartitionControllerCore.ProcessPartitionAsync) catches it and calls HandlePartitionGoneAsync:
https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionControllerCore.cs#L149-L158
HandlePartitionGoneAsync calls AddOrUpdateLeaseAsync:
https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionControllerCore.cs#L172-L182
AddOrUpdateLeaseAsync calls ProcessPartitionAsync.
https://github.com/Azure/azure-cosmos-dotnet-v3/blob/07aa28eee6d869535f130a315f8ed52dcabcd648/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/FeedManagement/PartitionControllerCore.cs#L93
ProcessPartitionAsync calls PartitionSupervisorCode.RunAsync and we're back at square one.
I might be reading it wrong, but it seems to me that there is definitely a code loop there. Not sure what precise conditions are required for it to go around and around though.

@jahmai-ca You are right, the readonly is only on the renewerCancellation.
The loop whoever what it does is create new PartitionSupervisors right? Let's assume there is 1 lease in the beginning.

LoadLeasesAsync calls AddOrRemoveLeaseAsync once, it creates a Supervisor for that lease.
Calls ProcessPartitionAsync which calls RunAsync on the Supervisor.
RunAsync on the Supervisor creates a linked CT.
At some point, there is a Partition Gone.
Supervisor stops with LeaseGone, RunAsync exits.
Controller calls HandlePartitionGoneAsync.
HandlePartitionGoneAsync calls Synchronizer.HandlePartitionGoneAsync which returns 2 new leases.
AddOrRemoveLeaseAsync is called on the 2 new leases, 2 new Supervisors are created.
Each call calls ProcessPartitionAsync, which calls RunAsync on each Supervisor.
The original HandlePartitoinGoneAsync call from step 6 finishes
The original ProcessPartitionAsync (step 2) calls RemoveLeaseAsync and exits. At this point the Supervisor instance is no longer referenced and will be Garbage Collected, when it does, it will call Dispose and remove the processorCancellation and renewerCancellation.

So yes there is a loop, the loop however all it does is create new Supervisors, the old Supervisor is not used anymore and would eventually be Disposed.
This is what I mean that I don't see a leak. The Controller instance remains the same always, it is the Controller who spawns Supervisors and lets them run independently.
The only scenario where the CTs might leak is because the GC is not collecting/disposing the unreferenced Supervisor that are not used anymore?

@ealsur
Thanks for going through that detail, appreciated.
I'm still sifting through the memory dump, and it seems like all the retention is at the top level of PartitionControllerCore, specifically the shutdownCts member.

(The Next reference chain continues on like this for a very long time for this instance).
Counter example, this looks like a normal healthy instance:

Do you think its possible that the shutdownCts is holding strong references to the linked tokens even after the PartitionSupervisorCore instance is disposed / recreated?
Is there anything I should look at in this dump to help figure out what the cause is?

Do you think its possible that the shutdownCts is holding strong references to the linked tokens even after the PartitionSupervisorCore instance is disposed / recreated?

My guess is only if the GC is not Disposing the PartitionSupervisor instances after they go out of scope. CFP has been around for 6+ years and this is the same code in the V2 version: https://github.com/Azure/azure-documentdb-changefeedprocessor-dotnet/blob/master/src/DocumentDB.ChangeFeedProcessor/PartitionManagement/PartitionController.cs
We have never had any reports of this behavior, even on containers with thousands of partitions (hence thousands of supervisors). That's why this is kind of weird. Like I said, we are not explicitly calling Dispose (which I guess is something we could do) but the normal behavior is that Dispose on the PartitionSupervisor is called by GC. Unless in your case, GC is not running?

@ealsur
GC is definitely running. If it wasn't our memory dump would contain many other allocations that our app does.
The GC isn't actually responsible for calling Dispose. It only even calls Finalize (which may in turn call Dispose), but I don't see any finalizers defined for the types in question?
We've been using CosmosDB SDK for years too. On reflection this may have happened a few times but it is exceedingly rare. Normally we'd just restart the affected services and the problem would go away for a long time. On this occasion I took the time to capture a memory dump.

What we can do is explicitly call Dispose on the Supervisor, that should at least take care of disposing the CTs no longer in use.

See linked PR


Fix 404 issue for Github sample

The old link is invalid, got an 404 page not found error.

NetflixOSS » feign » feign-pull-requests #174 SUCCESS
This pull request looks good

actually, the link is referencing retrofit, which did rename their sample https://github.com/square/retrofit/blob/master/samples/src/main/java/com/example/retrofit/SimpleService.java

thanks @adriancole

NetflixOSS » feign » feign-pull-requests #175 SUCCESS
This pull request looks good

Thanks for the fix! Mind squashing these commits into one?
git rebase -i master
# change pick to s (for squash), fix the commit message and save
git push -f origin patch-1

Done.
Thanks for share git commands.

NetflixOSS » feign » feign-pull-requests #176 SUCCESS
This pull request looks good

NP cheers!


Cannot add folder: API call not recognized

Hopefully I'm just doing something wrong, but I don't seem to be able to add a folder.
root@cryptonode:~# siac host folder add /sia/ 6000GB
Could not add folder: API call not recognized: /host/storage/folders/add

Using a recent go get build<PHONE_NUMBER>682bf898779cb40a344574f308b07d)

Are you running siad with the hosting module enabled? IIRC it is disabled by default. Run siad modules for info on how to enable/disable specific modules.

  I mixed up the 'host' and 'renter' modules and wasn't running it.  I guess there could have been a more helpful error message, but I'll leave that up to you guys to decide if its worth ticketing.  I'm all set now so I'll close this out.  Thanks for getting to me so fast!


Add recursive Fibonacci implementation

Maybe solves issue #17

Thank you @amgodoi for your contribution!
Can't wait for ur next PR.


Ability to add ReadMe tags from create_repo

Is your feature request related to a problem? Please describe.
When calling create_repo, I sometimes want to add a specific tag to the README.md.  Which is a bit cumbersome, would be cool if I could do so from create_repo directly.
Describe the solution you'd like
Add a List[str] tags parameter to create_repo
huggingface_hub.create_repo(
    "freddyaboulton/llama-demo",
    repo_type="space",
    space_sdk="gradio",
    token=hf_token,
    tags=['llm', 'llamav2']
)

Describe alternatives you've considered
I have looked for existing solution and couldn't find it.
Additional context
Add any other context or screenshots about the feature request here.

have you seen the metadata_update function? might solve your use case
https://huggingface.co/docs/huggingface_hub/v0.16.3/en/package_reference/cards#huggingface_hub.metadata_update

Thank you @julien-c !! 🙏


Beta angles appear to be incorrect

I reconstructed the backbone for the protein 6MSP from the PDB, using real dihedral angles fed to Angles2Backbone.
I calculated planar angles for both the original backbone versus for the reconstruction.
The planar angles N-Cα-C etc. are constant in the reconstruction. In the original, they are of course slightly variable. However it looks like the typical values used in Angles2Backbone do not correspond to the correct triples. It is currently:
β(3j) = π − 2.1186
β(3j + 1) = π − 1.9391
β(3j + 2) = π − 2.061
However, from looking at this data, it looks like this is supposed to be:
β(3j) = π − 2.0610
β(3j + 1) = π − 2.1186
β(3j + 2) = π − 1.9391

Thank you, checking it right now.

The same problem is there for FullAtomModel.Angles2Backbone, can you please look into it? Thanks!

Fixed it for FullAtomModel.Angles2Backbone here:
https://github.com/truzmeto/TorchProteinLibrary/blob/9d08825248e362cac8888bca432f87e99fb88314/Layers/FullAtomModel/cGeometry.cpp#L17
Tested reconstruction with 42 residue peptide, which gave 1.6AA backbone rmsd difference. Previously difference was ~7AA when beta angle mean positions were swapped.


LaxOptionParser removed from Django 1.8

Just upgraded my project to Django 1.8 and ran into:
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    from configurations.management import execute_from_command_line
  File "/home/powellc/projects/plownow/venv/local/lib/python2.7/site-packages/configurations/management.py", line 1, in <module>
    from . import importer
  File "/home/powellc/projects/plownow/venv/local/lib/python2.7/site-packages/configurations/importer.py", line 8, in <module>
    from django.core.management import LaxOptionParser
ImportError: cannot import name LaxOptionParser

Oops, I'm an idiot ... should search through closed tickets first:
https://github.com/jezdez/django-configurations/issues/65
Thanks for a great library :smile:


Fix the plugin crash when IP access list change

What problem does this PR solve?
close #68
What is changed and how it works?
This PR is going to cover the following cases and prevent the plugin crash.

Block to add IP access list to the existing cluster, which doesn't have the IP access list.
Block to insert or delete the IP rule from the IP access list.

In addition, this PR is going to handle the following cases to avoid unexpected cases.

Allow to change the order of the rule in the list. Otherwise, the operation will be stopped even when the list is just reordered.
Prevent removing the IP access list from the tf file. Otherwise, Terraform cannot recognize the IP access anymore.

Check List

Possible to add a test?

Great work! thank you for your contribute


security/acme-client: Feature Request - Support for DNS-01 challenge using domain.com as registrar

When setting up a challenge of type DNS-01, there is no option in the drop-down list for domain.com.  Request it be added ASAP so I can generate wildcard SSL certificates for my company’s hosted services.  An alternative workaround would be appreciated also and in the meantime.  Thanks for an awesome plug-in that I can’t wait to use.  ;)

AFAICT, there is no support for domain.com in our upstream project acme.sh:
https://github.com/acmesh-official/acme.sh/wiki/dnsapi
acme.sh needs to support the DNS API, otherwise we can't integrate it into the acme-client plugin.

Acknowledged. Since domain.com supports an API, is this still a viable request?  It would simplify my hosting need by reducing the need to use clouddns.net since domain.com doesn’t allow for manual  TXT records that are needed for DNS-01 validation.

Yes, still a viable request. But we can't start to work on this until someone adds the required functionality to acme.sh.
(FYI, this issue will timeout soon. But it may be re-opened when/if the feature is available in acme.sh.)


Remove some unused imports.

Codecov Report

Merging #3991 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3991      +/-   ##
==========================================
- Coverage   89.72%   89.72%   -0.01%
==========================================
  Files          15       15
  Lines        1947     1946       -1
==========================================
- Hits         1747     1746       -1
  Misses        200      200

Impacted Files
Coverage Δ

requests/auth.py
86.41% <ø> (-0.09%)
:arrow_down:

requests/adapters.py
92.89% <ø> (ø)
:arrow_up:

requests/models.py
93.42% <100%> (ø)
:arrow_up:

requests/utils.py
84.98% <100%> (ø)
: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 44106f1...19ba9f1. Read the comment docs.


[MRG] Fix Travis badge

Fixes the double CircleCI badge issue in our README.

Codecov Report

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

@@           Coverage Diff           @@
##           master     #474   +/-   ##
=======================================
  Coverage   86.39%   86.39%
=======================================
  Files          22       22
  Lines        1588     1588
=======================================
  Hits         1372     1372
  Misses        216      216

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 e16bb15...5f0e07a. Read the comment docs.


.gitignore file never created

This repo contains a .gitignore file, but it seems that in the publishing process of the generator, the file is stripped out.
Similar thread here.
Expected behavior: an end user uses a command (like npx create-near-app path/to/your/new-awesome-app) and a .gitignore file exists in their project directory, making sure they don't add sensitive or unimportant files that may be pushed publicly.

I have the same experience here. It is a minor papercut, but still annoying during a hackathon.

linking discussion and eventual solution that will be in:
https://github.com/nearprotocol/create-near-app/pull/67

fixed


Uncaught Error: No such module "node:async_hooks".   imported from "worker.js"

Following the Tutorial at step Manual deploy 2 (https://www.breakp.dev/blog/email-flare-send-from-worker-for-free/#:~:text=worker.js.-,Drag%20and%20drop,-it%20on%20the), I get Uncaught Error: No such module "node:async_hooks".
imported from "worker.js" in the Workers code editor.
I did try the Auto deploy option first, but was getting a 400 error, so thought I would go manual and see what was going on.
I found some references to adding the nodejs_compat compatibility flag, but it seems you would have to do that in the wrangler.toml (https://developers.cloudflare.com/workers/runtime-apis/nodejs/#enable-nodejs-with-workers), which would change the steps in your Tutorial.
Before I went too far down the rabbit hole, I thought I would checkin and see if this is something that is already solved.
Thanks

Hi, 400 error means wrong data input. Another user was putting the wrong worker name. You should put only the name of the worker, not the entire address. For him, this fixed the issue.
If there's something else, could you mind posting a screen, like he did in #2
About manual deploy there's a issue with the nodejs_flag, as the cloudflare dashboard doesn't provide a way to activate it. I'm checking for a command that does that form the terminal. I will update the instructions.
Anyway, please, try again the auto deploy and let me know if it worked for you.

You got it exactly on the auto deploy, just the project name w/o domain!
For manual deploy, yes I saw in Pages you can set the nodejs_compat right in the Dashboard, but the same isn't there for Workers :(
Thanks for the assist

Happy it worked.
I will update EmailFlare with new features in the future.


Support severity for PagerDuty

Describe the feature request
Please allow the Severity to be controlled from the configuration of the monitored item.Like 122 in pagerduty.go is statically defined as 'critical'.
Why do you personally want this feature to be implemented?
We are considering moving our alerting from OpsGenie to PagerDuty due to an issue we have uncovered with the OpsGenie client on iOS and Android.  Now we have this tiny issue in Gatus.
How long have you been using this project?
6 months
Additional information
No response

@TwiN Colud you fast review it? #487


Release 5.1.0 before going 6.0.0?

Hi! :wave:
Since release 5.0.0 I believe we have merged the following pull requests to master:

#727
#729
#732
#735
#738
#739
#740
#743
#745
#746
#747
#748

I believe it would be nice to have one last 5.x.x release 5.1.0 with these changes before going 6.x.x.
@kevin1024 would you be up for cutting a release 5.1.0 from latest master shortly?
(Latest commit is e7c00a4bf9539bbe0fd04eabbeb28d1a92651795 as of the moment.)
Thanks and best, Sebastian
CC @jairhenrique

PS: Known upcoming for soon 6.0.0 so far:

#731

That is awesome! Yes I should have time soon.

released!

@kevin1024 thank you! :pray:


How to set Text in the Search View?

I want to set the text in the search view, so that the user can edit the text before submitting if there is an error or the voice intent doesn't recognize the word correctly.I can't find anything to set the text in the sample app.

Text will be in next version. It is already in my custom version.

When are you planning to release next version.?

After I will be done with my diploma thesis :)

Wish you very best for your thesis. :)
Can i have the link to your custom version till then ?

After I will release it, of course ;). I will try it ASAP.

i am waiting too

if you want then test version 0.1 is uploaded to jCenter. But be aware that version has a lot of changes and still has some bugs.

Any updates on this? Can I help in anyway? :/

Try getting a reference to SearchEditText and simply call setText on it.

@HusseinElFeky how do I get this reference? By reflection you mean?

@feinstein No need to use reflection, try to look through the search view layout and locate the SearchEditText so that you can get a reference to it later on by calling getChildAt. That should do the work temporarily.

@HusseinElFeky Ok, I will try and post here any codes that work, thanks!

Ok, if anyone is interested in a hack to set the text, firt get a reference to the SearchEditText:
SearchEditText searchEditText = (SearchEditText) ((ViewGroup)((ViewGroup)((ViewGroup)
                mSearchView.getChildAt(1))
                           .getChildAt(0))
                           .getChildAt(0))
                           .getChildAt(1);

and then you can set the text with:
searchEditText.setText(text);

BE AWARE this is hack, any changes on the library will brake this code!
I could have traversed the layout tree, nicely, checking for instanceof but this would have consumed me some time to code a proper traverser and have some performance impact at runtime unnecessarily.
It's a hack, while there isn't a better option coming, use at your own discretion.

@HusseinElFeky Digging more into the code I found:
public void setQuery(CharSequence query, boolean submit)
public void setTextOnly(CharSequence text)

Why did you told me I needed to find a hack? Any problems with these methods?

Actually, I haven't used the library since 2 months, so I started to forget the unused methods in the library, but yeah. As you mentioned, those methods should do the job perfectly. The ironic part is that I was the one who improved the code of setQuery and I forgot about that. 😂

I see... Well, thanks anyways... This would have been easier with better documentation...


Update image dependency for convenient_test_dev

Currently the image dependency in convenient_test_dev is set to version 3, could this be updated to version 4? This is causing dependency conflicts with packages which use image v4 (flutter_native_splash v2.2.17)

Sure, feel free to PR!


GPU support

First steps:

Nvidia GPUs support by writing a CUDA version of kernels packing and unpacking
Add examples

A CUDA backend is currently implemented with the same features of the CPU backend.
Examples use OpenACC but examples should be added using CUDA.

Support for AMD GPUs could be easily added because HIP runtime is very comparable to CUDA runtime.
The development can also be done on Nvidia GPUs because HIP supports CUDA in the backend.
The main issue right now is to get access to a feasible environment for development. Options are:

AMD GPUs, where HIP is usually well supported in terms of software stack
Nvidia GPUs with HIP software stack installed and well supported


fix: remove passing tags

add command to readme
close #84
two new failing tests since the last release see #88

@annekauf I would suggest to merge this and then rebase you PR on top of it. You should also run npm install as a few components where updated.
My test server is having unrelated issues. I ll add screenshots of ranking2 once I m back in the office.


Bug for week view with time.

If calendarConfig.showTimesOnWeekView = true; event position is incorrect according to day column. Especially after resize. Probably some offset is incorrect.
Have a look here http://plnkr.co/edit/CYpnBrH4fxwptqXP2dhh?p=preview
When u resize a window event position would be incorrect and some of them could be even on other day column

I can replicate this, thanks for reporting. I'll get it fixed in the next version 😄


Add app_name to urls.py

This fixes a deprecation error in Django 2.0.
https://stackoverflow.com/questions/48608894/impropyconfigurederror-about-app-name-when-using-namespace-in-include

Oops, made the pull to the wrong repo.


Migrate Mixed Reality Authentication to use azure-json serialization

See here for more information.

API change check
APIView has identified API level changes in this PR and created following API reviews.
com.azure:azure-mixedreality-authentication


Fix some typos

Codecov Report

Merging #270 (aa29656) into master (33b08bd) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #270   +/-   ##
=========================================
  Coverage     76.62%   76.62%
  Complexity      993      993
=========================================
  Files           140      140
  Lines          2648     2648
  Branches        356      356
=========================================
  Hits           2029     2029
  Misses          535      535
  Partials         84       84

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 33b08bd...aa29656. Read the comment docs.


Allow querying configured size

Surface::height / Surface::width would be nice to have, instead of having to query them from the window.

We should intrinsically take #177 into account when tackling this issue. On most platforms it appears window size (appearance on screen) != surface size (physical dimensions of a pixel buffer) is natively supported (by relying on scaling hardware via the compositor) and should be exposed to the user one way or the other.

On Android we "have to" call ANativeWindow_setBuffersGeometry() to change the buffer format, "and set a size". But it explicitly documents:

For all of these parameters, if 0 is supplied then the window's base value will come back in force.

And if I set the width and height to 0, the NativeWindowBufferLockGuard / ANativeWindow_Buffer struct returned by self.native_window.lock() contains the actual size of the buffer at that point in time, and follows resizes caused by the system.
(If we set a size ourselves, #177 with hardware scaling comes into effect).
So realistically (for #237) we should have the actual size available on the Buffer and allow Surface to either resize to a user-specified value, or to a "special value" where it automatically follows the "window size" all the time (which the user reads back on Buffer whenever it's "locked for writing")?

So it looks like we have 3 situations:

User doesn't set (or discards/resets) a Surface size. They read back the size of Buffer every time they draw, and expect this to follow the Window size;
User specifically requests a pixel size on Surface (which may or may not affect the size of the window on-screen) and can expect the returned Buffer to match;
If the Window size doesn't change (or we have an API to control that separately, or they control it via e.g. winit), they get implicit (hardware) scaling?

Yeah, that sounds right to me.
Question now is, do we want to support all of them? Would we be fine with not having hardware scaling, and just always have the buffer be the size of the surface? So e.g. remove resize, and add Buffer::width and Buffer::height (in case the buffer is used concurrently with the surface being changed)?

@madsmtm removing resize() is a step in the right direction to remove confusion and backend inconsistencies (does the user call this on startup? When their windowing system raises a resized event? When they want to change the size of the surface and possibly even the wrapped window?). And we could always reintroduce hardware scaling via a different/new function that more clearly annotates this?
And also, if possible on all platforms, redirect the user to their windowing system docs to resize the window if necessary.


🌐 Add French translation for docs/fr/docs/tutorial/index.md

Dear fellow translators 👋
This is a small PR to translate docs/tutorial/index.md to french 🇫🇷
Thanks 🍰

📝 Docs preview for commit 0b42c565deb6f8943396a588e26e7074d22fe731 at: https://649a1347d1bbbc0f1c60fa9a--fastapi.netlify.app

Thank you @JulianMaurin! 🍰
And thanks for the reviews as always @axel584 and @rjNemo ! ☕


[Bug] 404 Error on Clicking Review Button from the Menu

The user logs in, favorite a restaurant, and submits a review - When clicking the Review Page to view the review - getting a
404 error
Step 1: Log in to the app:https://dragon-fruit-app.herokuapp.com/reviews
Step 2: Perform a search and get search results.
Step 3: Open a result page. Ex: Veggie Grill.
Step 4: Mark it favorite.
Step 5: Create a Review by selecting the "stars" and writing into the "text area". Press Submit.
Step 6: Click the Review button from Menu on the Home Page - Get a 404 error

This should be fixed with the latest changes. That button should only be shown if you are logged in currently.


stockflows assume ternary+ operators can be expressed as distributive binary

Notice there are two f under op, when we're only applying it once.
As we don't currently expect any operands with arity > 2, not yet an issue.

Additional info: This is currently allowed to handle how Julia represents + and * in a lisp-like way, e.g., the expression tree of v = a + b + c + d * e * f * g appears in lisp notation as (+ a b c (* d e f g)). It assumes any function with arity > 2 is one of those two and rearranges it into a form accepted as a StockAndFlowF, such as, for the previous example,
v    = a + b + c + d * e * f * g
# becomes
tmp1 = a + b
tmp2 = tmp1 + c
tmp3 = d * e
tmp4 = tmp3 * f
tmp5 = tmp4 * g
v    = tmp5 + tmp2

(or some such)


Supports a full ActionRequest via command line/SDK

Adds support for creating the full ActionRequest document to the SDK and CLI.
Previously, when launching an Action, the only parameters that could be set on it were request_id and body. The full Action Request spec outlines that a POST to /run may also contain manage_by and monitor_by fields. Not specifying these was fine but it meant that if someone ever wanted to set/use them, they'd be unable to via the client. This change corrects that.
[ch2113]

Looks good. I kinda noticed this yesterday or so as well. Looks like this gets the job done nicely.


Ability to drag product image to upload

Is your feature request related to a problem? Please describe.
Ability to drag product images to upload product images.
Describe the solution you'd like
There should be an option for dragging and dropping the product's image while editing the product.
Describe alternatives you've considered
No response
Additional context
No response

Pls assign this issue to me.

please add Drag and Drop message in the category section.

@suraj-webkul It is working fine.


Get link endpoint

GetLink
Description:  Gets DDO files object for a job
Path:  GET /link?quoteId=xxx&nonce=1&signature=0xXXXXX
Input:

quoteId
nonce  (timestamp)  (has to be higher then previous stored nonce for this user)
signature:  user signed hash of SHA256(quoteID+nonce)

Returns:
[
    {
       "type": "filecoin",
       "CID": "xxxx",
       "dealIDs":["x" , "x2"]
    }
]

(see https://docs.oceanprotocol.com/core-concepts/did-ddo#files  for how each microservice is formatting the response, based on storage type)

@happy-dev @alexcos20 I do not get this sentence:

(see https://docs.oceanprotocol.com/core-concepts/did-ddo#files for how each microservice is formatting the response, based on storage type)

Is that unpredictable ?
In the example above, what are "dealIDs":["x" , "x2"] ? Is that of any interest ?

Sorry hadn't seen that one. Tell me if you need me to look at the DDO spec and summarize it for you


Issue with identification of some URLs

https://muchdogesec.github.io/fakeblog123/feed.xml
This is a valid atom feed, but seems to stick as running forever, with 0 feeds downloaded...
{
  "id": "82d56ea2-bbfa-47ce-a0c8-3da529b4fc0d",
  "created": "2024-08-14T10:22:02.304532Z",
  "state": "retrieving",
  "history4feed_status": "running",
  "item_count": 0,
  "processed_items": 0,
  "failed_processes": 0,
  "feed": "a111dc79-5cd3-5754-87fe-69d90f96abf9"
}

I fixed an issue causing no feed to be retrieved (the link in the atom is relative and we expect absolute), but I can't reproduce the "running" forever


Remove the need for AlwaysReceiveInput

The idea for this came when discussing with @default0 about how you can accidentally get weird side-effects by using AlwaysReceiveInput in combination with existing classes that handle certain input events.
Turns out, we don't need it and can simply handle input correctly for all visible drawables all the time. In fact, this fix sometimes avoids unnecessary input events from firing, while making the code substantially nicer.

Note: Performance isn't negatively affected at all. In contrary, in some rare cases it even goes up a bit due to this. :)

Performance implications should probably be double-checked on a weak device.

so basically "anything that isn't masked can now receive input"?

Yeah, but input still is only received when the thing is actually hovered. Basically, everything that's visible to the user now gets input by default. No more hackery with AlwaysReceiveInput to make input work with children poking out of their parents.


Unnecessary unsafe code

https://github.com/anatawa12/deflate64-rs/blob/2a3adc3c48e2fab315a23369f846d52740bca1ba/src/output_window.rs#L64 you can use slice::copy_within or slice::split_at_mut
P.S. I am a bit too busy to submit a PR right now.

I fixed in 46e0fb352a11b75af5ef3f464d9b9ebd70c7d301. I mistakenly pushed onto master sorry.


Feature Request: Don't do intellisense when confg file is not there.

This library is great job!
I'm opening a new project without windicss setup, but it gives me intellisense nevertheless. I had to disable windicss globally. I think we should use similar policy like eslint and tailwindcss, not to enable the plugin unless the user is explicitly using it.

I am working on a fix for this. You can try experimental state if the new pre-release version of the extension.