text:
How to enable sensitive log information in AVS SDKv1.5?

What platform/OS are you using?
What compiler are you using? what version?
What's your CMake arguments?
Can you provide a TRACE level log? (sanitize any sensitive information)

Hi,
I have enabled "ACSDK_EMIT_SENSITIVE_LOGS" macro while building SampleApp with Debug mode. I want logs for every streem under "ACSDK_EMIT_CURL_LOGS" macro in the file "sdk-source/avs-device-sdk-master/ACL/src/Transport/HTTP2Stream.cpp" . Even though I enabled  "ACSDK_EMIT_CURL_LOGS" macro, I am not getting logs. In that  file below code returning every time without creating logs. If I mask "return" it is creating logs, but for one query it is creating 4 logs. how to configure to get logs?
CODE:
void HTTP2Stream::initStreamLog() {
std::string streamLogPrefix;
configuration::ConfigurationNode::getRoot()[ACL_CONFIGURATION_KEY].getString(
STREAM_LOG_PREFIX_KEY, &streamLogPrefix);
if (streamLogPrefix.empty()) {
return;
}
if (m_streamLog) {
    m_streamLog->close();
    m_streamLog.reset();
}

if (m_streamInDump) {
    m_streamInDump->close();
    m_streamInDump.reset();
}

if (m_streamOutDump) {
    m_streamOutDump->close();
    m_streamOutDump.reset();
}

// Include a 'session id' (just a time stamp) in the log file name to avoid overwriting previous sessions.
static std::string sessionId;
if (sessionId.empty()) {
    sessionId = std::to_string(std::chrono::system_clock::now().time_since_epoch().count());
    ACSDK_INFO(LX("initStreamLog").d("sessionId", sessionId));
}

auto basePath = streamLogPrefix + STREAM_LOG_NAME_PREFIX + sessionId + "-" + std::to_string(m_logicalStreamId);

auto streamLogPath = basePath + STREAM_LOG_NAME_SUFFIX;
m_streamLog.reset(new std::ofstream(streamLogPath));
if (!m_streamLog->good()) {
    m_streamLog.reset();
    ACSDK_ERROR(LX("initStreamLogFailed").d("reason", "fileOpenFailed").d("streamLogPath", streamLogPath));
}

auto streamInDumpPath = basePath + STREAM_IN_DUMP_SUFFIX;
m_streamInDump.reset(new std::ofstream(streamInDumpPath, std::ios_base::out | std::ios_base::binary));
if (!m_streamInDump->good()) {
    m_streamInDump.reset();
    ACSDK_ERROR(LX("initStreamLogFailed").d("reason", "fileOpenFailed").d("streamInDumpPath", streamInDumpPath));
}

auto streamOutDumpPath = basePath + STREAM_OUT_DUMP_SUFFIX;
m_streamOutDump.reset(new std::ofstream(streamOutDumpPath, std::ios_base::out | std::ios_base::binary));
if (!m_streamOutDump->good()) {
    m_streamOutDump.reset();
    ACSDK_ERROR(LX("initStreamLogFailed").d("reason", "fileOpenFailed").d("streamOutDumpPath", streamOutDumpPath));
}

}

I think you have the wrong repository.  You probably want to post this on:
https://github.com/alexa/avs-device-sdk

authors: bretambrose kunasiramesh


text:
Mono.Cecil.ResolutionException: Failed to resolve Amazon.S3.Transfer.TransferUtilityDownloadDirectoryRequest

I am getting following Assembly linker issue whenever i reference to S3 DownloadXXXXX APIs & their objects in my code. For ex.
TransferUtilityDownloadRequest
TransferUtilityDownloadDirectoryRequest
DownloadAsync
DownloadDirectoryAsync
For some reason the linker is scoping the AWSSDK.S3 to version 3.3.0.0 though my .NET Shared Project refers to AWSSDK.S3 version 3.3.103.4
However i dont face this issue for any references to the UploadXXXX APIs & their objects like
TransferUtilityUploadRequest
UploadAsync
This is a bit wierd....Appreciate a quick support from Xamarin Team
//////////////////////////////////////////////////////////////////////////////////////////////
Severity	Code	Description	Project	File	Line	Suppression State
Error		The "LinkAssemblies" task failed unexpectedly.
Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'Amazon.S3.Transfer.TransferUtilityDownloadDirectoryRequest' (defined in assembly 'TipssyAutomation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') with scope 'AWSSDK.S3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604'. When the scope is different from the defining assembly, it usually means that the type is forwarded. ---> Mono.Cecil.ResolutionException: Failed to resolve Amazon.S3.Transfer.TransferUtilityDownloadDirectoryRequest
at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
at Mono.Linker.Steps.MarkStep.MarkFields(TypeDefinition type, Boolean includeStatic, Boolean markBackingFieldsOnlyIfPropertyMarked)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
--- End of inner exception stack trace ---
at Java.Interop.Tools.Diagnostics.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()	TipssyAutomation.Android
//////////////////////////////////////////////////////////////////////////////////////////////

Hi @cjkarande, I suspect that this issue isn't caused by the AWS .NET SDK but rather version dependency conflicts caused by your code or third parties.  There seem to be a lot of resources about this type of error online.  Could you please look over some of them and see if making some changes to your .csproj files resolves your issue?  Here's an example of a resource that might help:  StackOverflow:  Can't build my app in release mode.
If you come across something that you think we need to take action on to fix your problem, please let us know.

source: gharchive/issue

authors: cjkarande klaytaybai

repo: aws/aws-sdk-net

license_type: permissive

license_source: github-api


text:
ASP.NET Core 2.0 Web API Middleware - HttpContext Response OnStarting is not called

I have created a middleware to parse the response body and change the status code based on response. I have tested on my local, and it works fine. However, when I deployed the solution to AWS Lambda, it did not work. I have put some logs to see where does the execution goes; but have been unsuccessful.
public class ResponseFailureMiddleware
    {
        private readonly RequestDelegate _next;

        public ResponseFailureMiddleware(RequestDelegate next)
        {
            _next = next;
        }

        public async Task Invoke(HttpContext context)
        {
            LambdaLogger.Log("ResponseFailureMiddleware Invoked");

            context.Response.OnStarting(state => {
                LambdaLogger.Log("ResponseFailureMiddleware OnStarting");
                if (context.Response != null && context.Response.ContentType != null && context.Response.ContentType.Contains("application/json"))
                {
                    try
                    {
                        LambdaLogger.Log("Reading response body");
                        using (Stream stream = context.Response.Body)
                        {
                            stream.Seek(0, SeekOrigin.Begin);
                            var body = JsonConvert.DeserializeObject<dynamic>(new StreamReader(stream).ReadToEnd());

                            LambdaLogger.Log($"Read response body. API returned success: {body.success}");
                            // If success is false, then change the response status code to 400
                            if (body.success == false)
                            {
                                var httpContext = (HttpContext)state;
                                httpContext.Response.StatusCode = 400;
                                LambdaLogger.Log($"Setting response status code to: {400}");
                            }
                        }
                    }
                    catch (Exception)
                    {
                        Console.WriteLine("Unable to parse the response. Skipping middleware logic.");
                    }
                }
                return Task.FromResult(0);
            }, context);

            await _next(context);
        }

Could it be that this event is not suppose to be called on AWS Lambda  @environment? If so, then is there any other event that I can capture in my code to transform the response? Thanks.

As an alternative to above, I am using the code below to transform the response:
 ```

public async Task Invoke(HttpContext context)
{
LambdaLogger.Log("ResponseFailureMiddleware Invoked");
        var originBody = context.Response.Body;

        var newBody = new MemoryStream();

        context.Response.Body = newBody;

        await _next(context);

        if (context.Response != null && context.Response.ContentType != null && context.Response.ContentType.Contains("application/json"))
        {
            try
            {
                LambdaLogger.Log("Reading response body");
                newBody.Seek(0, SeekOrigin.Begin);
                string json = new StreamReader(newBody).ReadToEnd();
                var body = JsonConvert.DeserializeObject<dynamic>(json);

                LambdaLogger.Log($"Read response body. API returned success: {body.success}");
                // If success is false, then change the response status code to 400
                if (body.success == false)
                {
                    context.Response.StatusCode = 400;
                    LambdaLogger.Log($"Setting response status code to: {400}");
                }

                context.Response.Body = originBody;

                await context.Response.WriteAsync(json);
            }
            catch (Exception)
            {
                Console.WriteLine("Unable to parse the response. Skipping middleware logic.");
            }
        }
    }

What did you mean by "it did not work"?  Could you elaborate on what's logged in cloudwatch or what error response you get from Lambda?

Oh, I think I did not put it correctly. What I mean is that OnStarting delegate of HttpContext.Response is not invoked when API is hosted in Lambda. However, the same event is fired when I test on my local. There is no error caused by this; it just that it simply does not invoke the delegate just before the headers are sent to the client.
Also, the only log I see in CloudWatch around this is (since OnStarting is never invoked):
ResponseFailureMiddleware Invoked
I will do a sample application and upload it for your test on your local system and lambda.

Attached is the sample application which demonstrates the issue I mentioned above.

Download and run the solution on your local
Send a GET request (in my case I did: /api/values/5) through any REST client and notice that OnStarting delegate gets invoked in the middleware. (also note that there is a log which should appear in CloudWatch when the same thing is executed in Lambda)
Publish the solution in AWS
Send the same GET on the new URL
Notice that in CloudWatch there is no log from OnStarting delegate

Here's the CloudWatch log from my test:
[Warning] Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository: Using an in-memory repository. Keys will not be persisted to storage.
[Warning] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: Neither user profile nor HKLM registry available. Using an ephemeral key repository. Protected data will be unavailable when application exits.
[Information] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: Creating key {48100f92-957f-4ca2-b124-a7aee046ad3a} with creation date 2018-02-06 01:37:47Z, activation date 2018-02-06 01:37:47Z, and expiration date 2018-05-07 01:37:47Z.
[Warning] Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager: No XML encryptor configured. Key {48100f92-957f-4ca2-b124-a7aee046ad3a} may be persisted to storage in unencrypted form.
START RequestId: 5543201e-0ade-11e8-a90e-65f9554675e9 Version: $LATEST
Incoming GET requests to /api/values/5
ASP.NET Core Request PathBase: /Prod, Path: /api/values/5
[Information] Microsoft.AspNetCore.Hosting.Internal.WebHost: Request starting GET https://xi1kn1cz91.execute-api.ap-southeast-1.amazonaws.com/Prod/api/values/5
Middleware Invoked
[Information] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker: Executing action method ResponseMiddlewareTest.Controllers.ValuesController.Get (ResponseMiddlewareTest) with arguments (5) - ModelState is Valid
[Information] Microsoft.AspNetCore.Mvc.Internal.ObjectResultExecutor: Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext.
[Information] Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker: Executed action ResponseMiddlewareTest.Controllers.ValuesController.Get (ResponseMiddlewareTest) in 198.7709ms
[Information] Microsoft.AspNetCore.Hosting.Internal.WebHost: Request finished in 962.0843ms 0 text/plain; charset=utf-8
Response Base 64 Encoded: False
END RequestId: 5543201e-0ade-11e8-a90e-65f9554675e9
REPORT RequestId: 5543201e-0ade-11e8-a90e-65f9554675e9	Duration: 1652.77 ms	Billed Duration: 1700 ms Memory Size: 256 MB	Max Memory Used: 58 MB

ResponseMiddlewareTest.zip

I see we need to implement the OnStarting method in our IHttpResponseFeature. Right now it is just a stub. I'll work on getting those properly implemented.
https://github.com/aws/aws-lambda-dotnet/blob/6bb119c3fec64d9afd8580b7184ed92615ece28f/Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/InvokeFeatures.cs#L141

I released version 2.0.1 of Amazon.Lambda.AspNetCoreServer that now implements the OnStarting and OnComplete callbacks. Keep in mind for the Lambda context OnStarting and OnComplete are called when the response to API Gateway is being created. Not when the results are actually sent to the client.

authors: frankyvij normj sstevenkang


text:
unify manual and credential chain credentials

removed a credential resolution function that always returned undefined
fetch (potentially cached) credentials when needed--at the challange
Issue #, if available: https://github.com/aws/aws-sigv4-auth-cassandra-nodejs-driver-plugin/issues/4
Description of changes: brings the manually submitted credentials and the default credentials onto the same level by leveraging AWS.CredentialProviderChain which will manage all issues of credential caching and retrieval for default (or externally configured) credential providers. added appropriate tests
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bhouse99 no problem, is 1.0.3 the next version you want?

I tested this against different configs, and I think I'll just merge in the branch and update the changes myself.  :).  Again thanks!

Any reason why hasn't this version been released on npm?

source: gharchive/pull-request

authors: JoshRagem bhouse99 rizblie


text:
Choice states cannot be chained

I'm currently adopting this package in place of own code to generate a state machine definition and one of our main patterns is to have a choice state that checks for a certain variable and kicks off previous step again if the condition was met, or move to the next step if not.
Example (failing) code:
import stepfunctions

first_job = stepfunctions.steps.Pass('First job')
second_job = stepfunctions.steps.Pass('Second job')

check = stepfunctions.steps.Choice('Check first job')
check.add_choice(
    rule=stepfunctions.steps.ChoiceRule.BooleanEquals(
        variable='$run_me_again',
        value=True
    ),
    next_step=first_job
)
check.default_choice(second_job) # This could be set automatically

chain = stepfunctions.steps.Chain([first_job, check, second_job])

This code currently gives State type `Choice` does not support method `next`.
I understand that the choice state was designed to branch the workflow and that terminates the chain. Please correct me if i'm wrong but in my opinion the presence of the next step can be treated as the default_choice for the choice state.
Here is a quick workaround that solves our issue:
class ChainableChoice(stepfunctions.steps.Choice):
    def next(self, next_step):
        self.default_choice(next_step)
        return next_step

I'd be more than happy to submit a proper PR, please let me know what do you think about it.

i just had the same issue. it looks like that after a coice state you cannot add anymore steps to the Chain.
if you do
chain = stepfunctions.steps.Chain([first_job, check])
you step function should work

I am having similar issue. @vincentclaes thanks for the pointer. This kind of took me out of the woods  for the second iteration.
In my pipeline, I have several choice steps that needs to be in series.
second_job.next(third_job)
third_job.next(new_check)

At this time, I am getting the same error State type `Choice` does not support method `next`.

looking at https://states-language.net/spec.html#choice-state
The values of the “And” and “Or” operators MUST be non-empty arrays of Choice Rules that MUST NOT contain “Next” fields; the “Next” field can only appear in a top-level Choice Rule.
Trying to understand this..

Hi @ctippur, in the Choice state, there is no Next field, so we don't support chaining it.

Why does it make sense for Choice state to not have Next field? It sounds like a natural thing for the State to have. I am wondering if I am conceptually missing something

Let me explain our use case of needing Choice state to have the Next field.
Our use case is Machine learning workflow automation. So our customers are scientists that are submitting the list of Steps they would like to do in a JSON file. Each Step in the JSON can have "prior step" dependency, so essentially I am converting the JSON to a DAG of Steps. Each Step can be a "TrainingStep", "LambdaStep", or a Choice state with multiple Lambda Steps (execute-wait, etc).
When I have a DAG and try to convert it to a State Machine with Data Science SDK, I am creating these steps then programatically determining the "next" relationships (with DFS traversal using Chain/parallel). This means that I create a Choice state, then later determine what that Choice state's "next" field should be. But since Choice state does not support method "next", I am not able to do this.
I think supporting Choice state to have a "next" method is useful for more complex use cases like mine where we are programatically creating State Machines.

I'm currently adopting this package in place of own code to generate a state machine definition and one of our main patterns is to have a choice state that checks for a certain variable and kicks off previous step again if the condition was met, or move to the next step if not.
Example (failing) code:
import stepfunctions

first_job = stepfunctions.steps.Pass('First job')
second_job = stepfunctions.steps.Pass('Second job')

check = stepfunctions.steps.Choice('Check first job')
check.add_choice(
    rule=stepfunctions.steps.ChoiceRule.BooleanEquals(
        variable='$run_me_again',
        value=True
    ),
    next_step=first_job
)
check.default_choice(second_job) # This could be set automatically

chain = stepfunctions.steps.Chain([first_job, check, second_job])

This code currently gives State type `Choice` does not support method `next`.
I understand that the choice state was designed to branch the workflow and that terminates the chain. Please correct me if i'm wrong but in my opinion the presence of the next step can be treated as the default_choice for the choice state.
Here is a quick workaround that solves our issue:
class ChainableChoice(stepfunctions.steps.Choice):
    def next(self, next_step):
        self.default_choice(next_step)
        return next_step

I'd be more than happy to submit a proper PR, please let me know what do you think about it.

I maybe have a solution for this; since the check is already attached to first_job and second_job you don't need to provide it in the chain. If you just do

chain = stepfunctions.steps.Chain([first_job, second_job])

it should work.

I maybe have a solution for this; since the check is already attached to first_job and second_job you don't need to provide it in the chain. If you just do

chain = stepfunctions.steps.Chain([first_job, second_job])

it should work.

so i tested and my proposed solution works.
@piotrdrazikowski i used your example on this SO question, i hope you don't mind :)
https://stackoverflow.com/questions/64371015/aws-step-functions-sdk-state-type-choice-does-not-support-method-next/64371016#64371016

By design, Choice states in Amazon States Language do not have a Next field. The purpose of the Choice state is to determine the next state transition based on the provided Choice Rules to enable conditional control flow. This differs from other non-terminal states where Next specifies an unconditional transition.

This AWSs example post mentions about the next_step in the choice state. Not sure !?
https://aws.amazon.com/blogs/machine-learning/building-machine-learning-workflows-with-amazon-sagemaker-processing-jobs-and-aws-step-functions/

This AWSs example post mentions about the next_step in the choice state. Not sure !?
https://aws.amazon.com/blogs/machine-learning/building-machine-learning-workflows-with-amazon-sagemaker-processing-jobs-and-aws-step-functions/

@nsankar Those links are correct. At the top-level, a Choice state has no Next field. The next state is determined by one or more ChoiceRules that specify the next transition based on a condition. You call choice.add_choice(rule, next_step) to add a rule to a Choice state. A Choice state may have a top-level Default state to transition to if none of the ChoiceRules match. This is done in the SDK by calling choice. default_choice(next_step).
Consider the following if/else code block that executes a different function by comparing the input string.
def make_a_choice(input):
    if input == "A":
        a()
    elif input == "B":
        b()
    else:
        c() # Fall back to c() if none match

To model something similar in the Step Functions SDK as a Choice state would look something like this:
# Some other states:
step_a = Pass(state_id="A")
step_b = Pass(state_id="B")
step_c = Pass(state_id="C")

choice_state = Choice("Make a Choice")

# If input is "A", go to step "A" next
choice_state.add_choice(
    rule=ChoiceRule.StringEquals(variable="$", value="A"),
    next_step=step_a # this could also be a Chain instead of a single state
)

# Else, if input is "B", go to step "B" next
choice_state.add_choice(
    rule=ChoiceRule.StringEquals(variable="$", value="B"),
    next_step=step_b
)

# Else, go to step "C" next
choice_state.default_choice(step_c)

I created a gist demonstrating how to use Choice states in the SDK with several examples so you can see what the code looks like and how they can be chained to other states in the workflow: https://gist.github.com/wong-a/e0ef01e4cb717ee277ed90d8eda8dbb7. The embedded images of the graph's don't render in gist, but will if you open it in Jupyter and they are attached.  Hopefully this clears up how to use Choice states.
Based on the feedback here and some internal conversations with the Step Functions team, the current behaviour isn't very obvious. We are considering making ergonomic improvements to make Choice states chainable, where would set the top-level Default field instead of Next.

Relevant docs:

https://aws-step-functions-data-science-sdk.readthedocs.io/en/stable/states.html#stepfunctions.steps.states.Choice
https://aws-step-functions-data-science-sdk.readthedocs.io/en/stable/choicerules.html?highlight=choice rule
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html
https://states-language.net/spec.html#transition
https://states-language.net/spec.html#choice-state

@nsankar Those links are correct. At the top-level, a Choice state has no Next field. The next state is determined by one or more ChoiceRules that specify the next transition based on a condition. You call choice.add_choice(rule, next_step) to add a rule to a Choice state. A Choice state may have a top-level Default state to transition to if none of the ChoiceRules match. This is done in the SDK by calling choice. default_choice(next_step).
Consider the following if/else code block that executes a different function by comparing the input string.
def make_a_choice(input):
    if input == "A":
        a()
    elif input == "B":
        b()
    else:
        c() # Fall back to c() if none match

To model something similar in the Step Functions SDK as a Choice state would look something like this:
# Some other states:
step_a = Pass(state_id="A")
step_b = Pass(state_id="B")
step_c = Pass(state_id="C")

choice_state = Choice("Make a Choice")

# If input is "A", go to step "A" next
choice_state.add_choice(
    rule=ChoiceRule.StringEquals(variable="$", value="A"),
    next_step=step_a # this could also be a Chain instead of a single state
)

# Else, if input is "B", go to step "B" next
choice_state.add_choice(
    rule=ChoiceRule.StringEquals(variable="$", value="B"),
    next_step=step_b
)

# Else, go to step "C" next
choice_state.default_choice(step_c)

I created a gist demonstrating how to use Choice states in the SDK with several examples so you can see what the code looks like and how they can be chained to other states in the workflow: https://gist.github.com/wong-a/e0ef01e4cb717ee277ed90d8eda8dbb7. The embedded images of the graph's don't render in gist, but will if you open it in Jupyter and they are attached.  Hopefully this clears up how to use Choice states.
Based on the feedback here and some internal conversations with the Step Functions team, the current behaviour isn't very obvious. We are considering making ergonomic improvements to make Choice states chainable, where would set the top-level Default field instead of Next.

Relevant docs:

https://aws-step-functions-data-science-sdk.readthedocs.io/en/stable/states.html#stepfunctions.steps.states.Choice
https://aws-step-functions-data-science-sdk.readthedocs.io/en/stable/choicerules.html?highlight=choice rule
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html
https://states-language.net/spec.html#transition
https://states-language.net/spec.html#choice-state

@wong-a  Thank you for enlightening and providing the examples. It really helps.
I have a couple of related questions.
(1) Is there a way to get the actual elapsed time from a wait state and use it in a choice state ? something like as follows  ?    Kindly let me know how this can be done if feasible.
 wait_state = Wait(
        state_id='Wait120',
        seconds=120,
        )
// Call a lambda state when the elapsed time is 60 secs in the wait state..
choice_wait_state1 = Choice(
    state_id="60secs time elapsed?"
)
choice_wait_state.add_choice(ChoiceRule.NumericEquals(wait_state.output()["seconds"], 60), , my_lambda_state)

(2) Which are the states including the common SFN states for which outputs are applicable ? This is not in the document unless we see an example, for instance, as an example output is applicable to the processing step which can be then used in a choice state as below:
processing_step = ProcessingStep(
    "SageMaker processing step",
    processor=script_processor,
    job_name=execution_input["PreprocessingJobName"], ## placeholder per schema above. Later in workflow execute() below pass the uuid of jobname
    inputs=inputs,
    outputs=outputs,
    # container_arguments=["--train-test-split-ratio", "0.2"],
    container_entrypoint=["python3", "/opt/ml/processing/input/code/myprogram.py"],
)

choice_state1.add_choice(ChoiceRule.StringEquals(processing_step**.output()**["ProcessingJobStatus"], "Completed"), lambda_state1)

@wong-a  Thank you for enlightening and providing the examples. It really helps.
I have a couple of related questions.
(1) Is there a way to get the actual elapsed time from a wait state and use it in a choice state ? something like as follows  ?    Kindly let me know how this can be done if feasible.
 wait_state = Wait(
        state_id='Wait120',
        seconds=120,
        )
// Call a lambda state when the elapsed time is 60 secs in the wait state..
choice_wait_state1 = Choice(
    state_id="60secs time elapsed?"
)
choice_wait_state.add_choice(ChoiceRule.NumericEquals(wait_state.output()["seconds"], 60), , my_lambda_state)

(2) Which are the states including the common SFN states for which outputs are applicable ? This is not in the document unless we see an example, for instance, as an example output is applicable to the processing step which can be then used in a choice state as below:
processing_step = ProcessingStep(
    "SageMaker processing step",
    processor=script_processor,
    job_name=execution_input["PreprocessingJobName"], ## placeholder per schema above. Later in workflow execute() below pass the uuid of jobname
    inputs=inputs,
    outputs=outputs,
    # container_arguments=["--train-test-split-ratio", "0.2"],
    container_entrypoint=["python3", "/opt/ml/processing/input/code/myprogram.py"],
)

choice_state1.add_choice(ChoiceRule.StringEquals(processing_step**.output()**["ProcessingJobStatus"], "Completed"), lambda_state1)

@nsankar Sorry for the delayed reply but I'm glad that helped.
(1) : If you want to start something after a certain time, you should use a Wait state. The state after a Wait state is only entered once the time condition is met (120 seconds in your example).
It is not possible to compare elapsed time using a ChoiceRule unless you calculate that using a Task to compute it.
(2): Can you create a separate issue? This one is for Choice state chaining. It seems like there is some documentation to improve around Placeholder usage but I don't quite understand the problem you are coming across.

@nsankar Sorry for the delayed reply but I'm glad that helped.
(1) : If you want to start something after a certain time, you should use a Wait state. The state after a Wait state is only entered once the time condition is met (120 seconds in your example).
It is not possible to compare elapsed time using a ChoiceRule unless you calculate that using a Task to compute it.
(2): Can you create a separate issue? This one is for Choice state chaining. It seems like there is some documentation to improve around Placeholder usage but I don't quite understand the problem you are coming across.

Thank you for the detailed description of the problem. In my particular case, I created a very ad hoc solution by overriding Choice.next() method and adding Succeed() to the end of the Chain(). Described that in this article in a bit more detail. But I did not arrive at a more abstract/generalized approach.

Released in v2.1.0: https://github.com/aws/aws-step-functions-data-science-sdk-python/releases/tag/v2.1.0

authors: anatoly-scherbakov ctippur jennakwon06 nsankar piotrdrazikowski shunjd vincentclaes wong-a


text:
eks-anywhere-test: cleanup attribution handling for helm chart

Issue #, if available:
Description of changes:
Follow up to #226, an attempt to improve the Attribution file handling.  Since we want to include the attribution in the helm chart, we can copy it into the output dir before calling helm just like we do for images.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

authors: TerryHowe jaxesn

repo: aws/eks-anywhere-build-tooling


text:
Git tests fix

Issue #, if available:
Description of changes:
make sure to enable generic git provider
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/override eks-anywhere-presubmit
/override eks-anywhere-e2e-presubmit
/override eks-anywhere-attribution-files-presubmit

/approve

/override eks-anywhere-attribution-files-presubmit
/override eks-anywhere-presubmit
/override eks-anywhere-e2e-presubmit

authors: danbudris taneyland

repo: aws/eks-anywhere


text:
curatedpackages/packageclient: idiomatic go Writer

The DisplayPackages and DisplayConfigurationOptions functions are modified to
take an io.Writer into which they'll write. This better conforms with go
idioms, makes testing easier, and will make it easier to add CLI flags to
write to a file in the future.
In the process of doing so, a customized tabwriter is implemented to make
working with tabwriter more uniform. Helpers for instantiation and writing a
table from a 2-D slice of strings make the code easier to read, and should
make changes to the output less error prone (less fiddling with '\t' and other
spacings).
Issue #, if available:
Description of changes:
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

replaced by #3533


text:
adding helm logging to release branch

Signed-off-by: jonahjon jonahjones094@gmail.com
Issue #, if available:
Description of changes:
Testing (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve

/override eks-anywhere-attribution-files-presubmit

authors: abhay-krishna jonahjon


text:
Bump Ansible version on builder-base

Bumping Ansible on builder-base to the version required by image-builder v0.1.26.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm

/approve

/approve

/retest

authors: abhay-krishna bhavi-koduru

repo: aws/eks-distro-build-tooling


text:
Update 1.28 to use kops 1.28.0-beta.1

Issue #, if available:
Description of changes:
⚠⚠⚠⚠⚠⚠⚠⚠
/hold until https://github.com/aws/eks-distro-build-tooling/pull/1141 merges and we're ready to deal with potential kops issues
⚠⚠⚠⚠⚠⚠⚠⚠
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve
/unhold

authors: kschumy markapruett

repo: aws/eks-distro


text:
Update to React Router v7

Description
React Router v7 provides some nice capabilities that we can tie in to for the URL sharing feature, as well as just generally.
This change only does the dependency update and minor code changes for the basic client side version. I am experimenting with the server side options in a different branch.
Validation

Smoke tested locally

Related Issues

Part of #719

Check List

[x] I confirm that my contribution is made under the terms of the Apache 2.0
license.
[x] I have run pnpm checks to ensure code compiles and meets standards.
[x] I have run pnpm test to check if all tests are passing.
[ ] I have covered new added functionality with unit tests if necessary.
[x] I have added an entry in the Changelog.md.

Merging without review since this is a simple dependency update without major code changes.

repo: aws/graph-explorer


text:
chore(ci): remove check against source tree from CodeBuild buildspec

Modification to the check introduced in #668
CodePipeline downloads the source as a zip from the source provider rather than doing a Git clone.
This means the .git folder won't be retained and git commands won't work in CodeBuild.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I think @RomainMuller also added this to the aws-cdk repo...

good callout, will check and do the same once I verify that this fixes it

repo: aws/jsii


text:
ci: bump eksctl in e2e

Fixes #N/A
Description
Bump remaining eksctl version references.
How was this change tested?
Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build 7674342452

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.648%

Totals

Change from base Build 7674239270:
0.0%

Covered Lines:
5006

Relevant Lines:
6057

💛  - Coveralls

authors: coveralls jmdeal

repo: aws/karpenter-provider-aws


text:
add back TopologyManagerPolicy to bottlerocketsettings

Currently, no topology-manager-policy setting appears in instance userdata if it is set in EC2NodeClass userdata
It seems like this setting was inadvertently removed in https://github.com/aws/karpenter-provider-aws/pull/3264/files#diff-a3cbfce28a0ecf65dea19fa09613d36dc9d5c653ff993472e70820de27f03efeL70

Fixes #N/A
Description
How was this change tested?
Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build 9167852758
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.05%) to 82.5%

Totals

Change from base Build 9165375744:
0.05%

Covered Lines:
5497

Relevant Lines:
6663

💛  - Coveralls

authors: clhuang coveralls


text:
make node names unique in tests

1. Issue, if available:
N/A
2. Description of changes:

make node names unique with a sequential ID
if the node already exists, log a debug message

3. How was this change tested?
Unit tests & scaling up/down inflate on EKS.
4. Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: link to issue
[X] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I would guess the comment is correct that this is rare, but did you check this in a real cluster to make sure that debug doesn't spam in the common case?
otherwise, lgtm

Yup, nothing normally logs in a real cluster in my testing, I'm not sure how often kubelet would beat us to the node creation, but it doesn't seem likely:
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:05.858Z	INFO	controller.provisioning	Batched 5 pods in 1.071391856s	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:06.009Z	DEBUG	controller.provisioning	Discovered security groups: [sg-00c5fed6615db429d sg-063c542ddd4538485]	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:06.011Z	DEBUG	controller.provisioning	Discovered kubernetes version 1.21	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:06.062Z	DEBUG	controller.provisioning	Discovered ami-05f60cea94ba81bec for query /aws/service/eks/optimized-ami/1.21/amazon-linux-2/recommended/image_id	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:06.227Z	DEBUG	controller.provisioning	Created launch template, Karpenter-tnealt-karpenter-demo-1937467200527745945	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:09.255Z	INFO	controller.provisioning	Launched instance: i-0983db01fa351a7a6, hostname: ip-192-168-24-90.us-west-2.compute.internal, type: t3a.2xlarge, zone: us-west-2b, capacityType: on-demand	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:09.273Z	INFO	controller.provisioning	Created node with 5 pods requesting {"cpu":"5125m","pods":"8"} from types c1.xlarge, c3.2xlarge, c4.2xlarge, c6i.2xlarge, c5d.2xlarge and 205 other(s)	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:09.326Z	INFO	controller.provisioning	Waiting for unschedulable pods	{"commit": "8b286f8", "provisioner": "default"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:09.326Z	DEBUG	controller.selection	Relaxing soft constraints for pod since it previously failed to schedule, adding: toleration for PreferNoSchedule taints	{"commit": "8b286f8", "pod": "default/inflate-6b88c9fb68-qlm94"}
karpenter-84894b6b77-7j5gb controller 2022-03-30T16:13:10.327Z	INFO	controller.provisioning	Batched 1 pods in 1.000529468s	{"commit": "8b286f8", "provisioner": "default"}

If it does log, it will be Debug only.

repo: aws/karpenter


text:
Can't open project on amazon sagemaker

Hello, I can't open my project on amazon sagemaker. When I am clicking the 'open project' button, it is loading indefinitely, and I can't do anything with the files. I have restarted my project, browser, laptop, cleared cache, tried from other browsers, changed the env from GPU to CPU but nothing did work. Can you please take a look into my account and resolve the issue? A screenshot is attached here to understand better. Thanks!

Not sure if your issue has been resolved or not.
A quick fix is to delete your account and recreate. You will by pass the approval process if you use the same email that has already been approved.

@bsaha205 do you still have the problem to open the project? Please let us know about your situation.

I'll close the issue. If you have the trouble. please try @MicheleMonclova solution.

Hi @icoxfog417, yes the issue is resolved. Thanks.

I am glad to hear that. Please enjoy your ML journey!

repo: aws/studio-lab-examples


text:
WIP: Move expansions to more generic

Make the expansion contents more generic
Make the yasb module more responsible for translating it's collection.

This is working fine and has uncovered a couple of missing restrictions in xwing-data2.

license: MIT


text:
cmake error :

hi everyone,
im building the environment using ./install-script-mac.
this is giving error like makefile recipe for target all failed.
hardware used : raspberry pi3
sdk used : c++
please help me.
Thanks

Dear Anand,
The script is currently supporting Mac OS v 10.12.4 and above. The main purpose of the script is to pull down and build the open source dependencies for the C++ SDK and the samples it includes. The core or the SDK build is based on cmake with the main build file (CMakeList.txt) located in amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/ directory.
We will be updating the script for Linux based systems shortly.
Kindest regards!

thank you so much sir. any alternative ?

Update the install script for Ubuntu based systems. As I mentioned, the core SDK build is cmake based. If you have all the dependencies in your system you can modify the CMakeList.txt in the kinesis-video-native-build directory to remove the locally built references to build against your system versions.
This said, please give the instal script a try.

Thank you so much sir.
sir CMakeList.txt file seems to be very complex. please could you suggest
me the solution in steps ?
i would be very thankful to you.
Thanks and Regards
Anand
On Fri, Dec 1, 2017 at 4:53 PM, MushMal notifications@github.com wrote:

Closed #1
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1#event-1367470799,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgezkdytDBO_9wTJ1ECCxl8HxzOFbNwxks5s7-GmgaJpZM4Qx_v1
.

The latest commit contains install-script which can run on Ubuntu based Linux.

I'm running it on raspberry pi 3. And based on my understanding,error is in
pynt createstack step.because of Rollback. Could you please tell me steps
to avoid this error ?
On Dec 1, 2017 11:04 PM, "MushMal" notifications@github.com wrote:

The latest commit contains install-script which can run on Ubuntu based
Linux.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1#issuecomment-348558142,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgezkbHZgFu60QtcoubbXK5fV4W7ZSf4ks5s8DifgaJpZM4Qx_v1
.

Hi Anand, I am not sure I understand as I am not familiar with pynt or Rollback. Can you please clarify if you are running install-script? This script pulls down and installs open source components which are needed for the build. The last two lines invoke the cmake for the core SDK build. If you are running the install-script then can you tell which open source component it is failing to build? Could you run the same on an ubuntu box?

Additionally, here's a link to a Getting Started example for Raspberry Pi: https://s3-us-west-2.amazonaws.com/kinesis-video-streaming/kinesis-video-raspberry-pi-getting-started.pdf

thank you so much sir. i will follow this pdf. and if any issue aries, i
will let you know
On Sat, Dec 2, 2017 at 12:19 AM, gauravgh notifications@github.com wrote:

Reopened #1
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1#event-1368206898,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgezkeyDdJjhqPK-HOJiJbsEUkaUoO-nks5s8EpBgaJpZM4Qx_v1
.

hello sir,
im not able to find ./install_kinesis_video_demo.sh
please would you tell me the location of the file
thanks
On Sat, Dec 2, 2017 at 10:10 AM, Anand Panchal anandpanchal91@gmail.com
wrote:

thank you so much sir. i will follow this pdf. and if any issue aries, i
will let you know
On Sat, Dec 2, 2017 at 12:19 AM, gauravgh notifications@github.com
wrote:

Reopened #1
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/1#event-1368206898,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AgezkeyDdJjhqPK-HOJiJbsEUkaUoO-nks5s8EpBgaJpZM4Qx_v1
.

cmake issue in macOS
if test "emacs" != "no"; then
am__dir=. am__subdir_includes='';
case po-compat.elc in /)
am__dir=echo 'po-compat.elc' | sed 's,/[^/]*$,,';
am__subdir_includes="-L $am__dir -L ./$am__dir";
esac;
test -d "$am__dir" || ../../build-aux/install-sh -c -d "$am__dir" || exit 1;
emacs --batch

$am__subdir_includes -L . -L .
--eval "(defun byte-compile-dest-file (f) "po-compat.elc")"
--eval "(unless (byte-compile-file "po-compat.el") (kill-emacs 1))";
else :; fi
Wrote /Users/XXXXXXXXXX/Downloads/amazon-kinesis-video-streams-producer-sdk-cpp-master/kinesis-video-native-build/downloads/gettext-0.19.8/gettext-tools/misc/po-compat.elc
if test -f archive.dir.tar; then
inputfile=archive.dir.tar;
else
inputfile='.'/archive.dir.tar;
fi;
./convert-archive dir git "$inputfile" archive.git.tar.gz
fatal: Failed to resolve 'HEAD' as a valid ref.
convert-archive: *** git init failed
convert-archive: *** Stop.
make[4]: *** [archive.git.tar.gz] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

will be helpful to get this script ./install_kinesis_video_demo.sh

@arunned could you please try the latest commit? We have made some improvements and updated the README.md with instructions on the build-time dependencies. Could you check your build tools versions?
Also, the install-script will handle the Raspberry PI

authors: MushMal anandpanchal arunned gauravgh


text:
only working when using localhost:3001 but cannot use ip like 192.168.x.x:3001

-webpack.dev.config.js

i added  host: '0.0.0.0' in webpack.dev.config.js
and then try to call the test page using ip (like 192.168.x.x:3001)
while connecting to the signal client, it returns error

do anyone experiencing a similar problem?

dont know why but when i run npm run release , everything is working

Yes i am also experiencing the same problem.

Hey @anson1788, can you try the latest and also visit your browser's debug console and see what it prints out?

Closing due to no response.
If the error is related to getUserMedia, please refer to the documentation: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia


text:
G bajwa

Hi,
The following changes have been made to enable LambdaRunner to also run "AnalyzeVacuumUtility".
New methods have been added to "analyze-vacuum-schema.py", which can be invoked from the LambdaRunner's "lambda_function.py" and run the VACUUM utility.
Please review and suggest changes if required.
Thank you.

This has now been consolidated in the RedshiftAutomation project

authors: IanMeyers gurpreetbajwa

repo: awslabs/amazon-redshift-utils


text:
Fix enable_sm_project function

Fix enable_sm_project function issue which was introduced by braking change in urllib3 version 2. Similar issue: https://github.com/psf/requests/issues/6443
Otherwise, error in cloudformation was raised
Received response status [FAILED] from custom resource. Message returned: Error: Unable to import module 'index': cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_

Description of changes:
Locking the version of urllib3 to be below 2.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks for working on it! Curious to know if you were able to perform a full deploy with this change made?

I did incremental deployments while debugging. Tomorrow ill destroy and deploy from scratch manifests/mlops-sagemaker/deployment.yaml

I have destroyed and deployed again. All good

authors: srinivasreddych zaremb


text:
refactor(aws-ecs): rename NamespaceOptions to CloudMapNamespaceOptions

Rename NamespaceOptions to CloudMapNamespaceOptions.
BREAKING CHANGE: Renamed NamespaceOptions to CloudMapNamespaceOptions.

Please read the contribution guidelines and follow the pull-request checklist.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@eladb @rix0rrr please merge

repo: awslabs/aws-cdk


text:
fix: sam local start-api now uses the right stage name

Issue #, if available:
https://github.com/awslabs/aws-sam-cli/issues/292
Description of changes:
Added additional stage_name field to the Api and Route objects so that sam local can use the correct api name in events.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@keetonian Sorry for the slow response time on this PR!

@jfuss No worries! You have a lot to cover right now. Thanks for the feedback!

Any updates? Would be great to have this working!

authors: ekcrisp jfuss keetonian

repo: awslabs/aws-sam-cli


text:
authenticationInput.lastKnownUsername is hashed

I have created a cognito User pool. I have chosen to let the user to use an email address as their "username" to sign up and sign in ("Allow email checked")
When the user launch the mobile app, the login screen is presented and the login field is filled if a lastKnownUser exists :
extension SignInViewController: AWSCognitoIdentityPasswordAuthentication {

public func getDetails(_ authenticationInput: AWSCognitoIdentityPasswordAuthenticationInput, passwordAuthenticationCompletionSource: AWSTaskCompletionSource<AWSCognitoIdentityPasswordAuthenticationDetails>) {
        self.passwordAuthenticationCompletion = passwordAuthenticationCompletionSource
        DispatchQueue.main.async {
            if (self.username?.text == nil || (self.username?.text?.isEmpty)!) {
                self.username?.text = authenticationInput.lastKnownUsername
            }
        }
    }

The problem is that I get a hashed username  in lastKnownUsername instead of the email used by the previous user to log in
How can I get the mail of the lastKnownUsername or should I modify the Cognito settings ?
Thks

Hello @pdegouville
You should be able to get the username of the last authenticated user using this API http://aws.github.io/aws-sdk-ios/docs/reference//Classes/AWSCognitoIdentityUserPool.html#//api/name/currentUser.
Please try this and let us know if you run into issues.

Hi @cbommas,
The result i received from currentUser.username is still a Hash String?
Any idea how to get the original username ?
Thanks

You should call this function to get the email address in hash map task.result?.userAttributes
func getUserAttribute() {
        mPool?.currentUser()?.getDetails().continueWith(block: { (task) -> Any? in
            print("AWSCognitoManager getUserAttribute \(task.result?.userAttributes) ")
        })
    }

This looks like it is resolved. Open another issue if this is not resolved. Closed issues are not monitored.

authors: DiFilosofa HayTran94 cbommas minbi pdegouville

repo: awslabs/aws-sdk-ios-samples

license_source: bigquery


text:
can't run handler asynchronously

const serverless = require('aws-serverless-express')
const express = require('express')
const app = express()
app.post('/some', async (request, response) => {
  response.json({ some: 'thing' })
})
const server = serverless.createServer(app)
exports.handler = /* this */ async /* this */ (event, context) => serverless.proxy(server, event, context)

I want to run exports.handler asynchronously, timeout each time with the following error.
ERROR: aws-serverless-express error
TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at Function.Buffer.from (buffer.js:202:9)
    at getEventBody (/var/task/node_modules/aws-serverless-express/src/index.js:25:17)
    at mapApiGatewayEventToHttpRequest (/var/task/node_modules/aws-serverless-express/src/index.js:46:18)
    at forwardRequestToNodeServer (/var/task/node_modules/aws-serverless-express/src/index.js:135:28)
    at proxy (/var/task/node_modules/aws-serverless-express/src/index.js:202:7)
    at Server.startServer.on (/var/task/node_modules/aws-serverless-express/src/index.js:206:32)
    at emitNone (events.js:111:20)
    at Server.emit (events.js:208:7)
    at emitListeningNT (net.js:1394:10)
    at _combinedTickCallback (internal/process/next_tick.js:135:11)

I tried to figure out how to solve it, but I did not know it, so I made an issue.
Can I get help?

Oh.
I have solved it.
https://github.com/awslabs/aws-serverless-express/issues/181

repo: awslabs/aws-serverless-express


text:
Sample for multi master model

This video shows examples of multi master model very quickly and does not give much details. I am also not able to find much details anywhere.
1.Where can i find the test application that was shown in the video?
2. How to get access to dynamo db tool box console? This library does not have code for the UI.
Please help.

I'm looking for the same thing. This seems to be the old solution. Now there's a new library, but I can't find where I can add code for conflicts resolution.  Is there a way to do it ?

did u manage to get the multimaster mode working with default conflict resolution?

I don't think it's an option of this library if I look at the code. I think the video present an older project no longer maintained.
I'm not sure this one is either.

Here is a high level description of a multi-master implementation that uses the concept of region-to-key mastership to decide which stream update to propagate to other regions. A code sample is a good idea and is probably something that could be added as part of an integration test

This site seems to describe where to download the UI  - https://dynamodb-cross-region.s3-external-1.amazonaws.com/DynamoDBReplicationCoordinatorApplicationBundle.zip

fwiw - AWS re:Invent 2016: Cross-Region Replication with Amazon DynamoDB Streams (DAT201) has some info on how aws lambda was used with cross-region replication of dynamodb tables - (with some adaptations of the tables)

+1

After our discussion with support team it was told to us that the UI shown in the video  is not supported anymore. We have to use the cross region replication library only.

@akshetty9 , @miclefebvre, @jedi4ever , @abadyan-vonage You might want to take a look at my PR which does master-master replication.
Feature Issue
Pull request

authors: abadyan-vonage akshetty9 amcp anirban-roy jedi4ever miclefebvre

repo: awslabs/dynamodb-cross-region-library


text:
Understanding pricing when using DynamoDB Titan

Hi,
this is not an issue, rather a fuzzy question.
I would like to get a good understanding of what would be the price (in terms of $) of using DynamoDB Titan. For this, I need to be able to understand when DynamoDB Titan does reads and writes. Right now I am pretty clueless.
Ideally I would like to run a testcase which adds some vertices, edges and then does a rather simple traversal and then see how many reads and writes were done. Any ideas of how I can achieve this? Possibly through metrics?
if it turns out I can't extract this information myself, I would very much appreciate a first brief explanation about when DynamoDB Titan performs reads and writes.
Thank you!

For all Titan backends, to understand and estimate the number of writes, we rely on estimating the number of columns for a given KCVStore. You can also measure the number of columns that get written using metrics when using the DynamoDB Storage Backend for Titan.
To enable metrics, enable the configuration options listed here:
https://github.com/awslabs/dynamodb-titan-storage-backend/blob/1.0.0/src/test/resources/dynamodb.properties#L6
Specifically, enable lines 7-11.
Note the max-queue-length configuration property:
https://github.com/awslabs/dynamodb-titan-storage-backend/blob/1.0.0/src/test/resources/dynamodb.properties#L45
If the executor-queue-size metric hits max-queue-length
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.TitanDBMetrics.html#Tools.TitanDBMetrics.ExpandedMetrics
for a particular tx.commit() call, then you know that the queue / storage.buffer-size were not large enough. Once the executor-queue-size metric peaks without reaching max-queue-length, you know you have captured all the columns being written in a tx.commit() call, so that will give you the number of columns being changed in a tx.commit(). You can look at UpdateItem metrics for edgestore and graphindex to understand the spread of columns between the two tables.
All Titan storage backends implement KCVStore, and the keys and columns have different meanings depending on the kind of store. There are two stores that get the bulk of writes, assuming you have not turned on user-defined transaction logs. They are edgestore and graphindex.
The edgestore KCVStore is always written to, regardless of whether you configure composite indexes. Each edge and all of the edge properties of that edge are represented by two columns (unless you set the schema of that edge label to be unidirectional). The key of edge columns are the out-vertex of an edge in the direct column, and the in-vertex of an edge in the reverse. Again, the column of an edge is the in-vertex of an edge in the direct column, and the out-vertex of an edge in the reverse. Each vertex is represented by at least one column for the VertexExists hidden property (https://github.com/thinkaurelius/titan/blob/1349a5edd1149a00da6a37a4584aed25a8164a14/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/types/system/BaseKey.java#L26), one column for a vertex label (optional) and one column for each vertex property. The key of vertices is the vertex id and the columns correspond to vertex properties, hidden vertex properties, and labels.
The graphindex KCVStore will only be written to if you configure composite indexes in the Titan management system. You can index vertex and edge properties. For each pair of indexed value and edge/vertex that has that indexed value, there will be one column in the graphindex KCVStore. The key will be a combination of the index id and value, and the column will be the vertex/edge id.
Now that you know how to count columns, you can use this knowledge to estimate the size and number of writes to edgestore and graphindex when using the DynamoDB Storage Backend for Titan. If you use the multiple-item data model for a KCVStore, you will get one item for each key-column pair. If you use the single-item data model for a KCVStore, you will get one item for all columns at a key (this is not necessarily true when graph partitioning is enabled but this is a detail I will not discuss now). As long as each vertex property is less than 1kb, and the sum of all edge properties for an edge are less than 1 kb, each column will cost 1 WCU to write when using multiple-item data model for edgestore. Again, each column in the graphindex will cost 1 WCU to write if you use the multiple-item data model.
Lets assume you did your estimation and you use multiple-item data model throughout. Lets assume you estimate that you will be writing 750 columns per second to edgestore and 750 columns per second to graphindex, and that you want to drive this load for a day. You can set the read capacity for both tables to 1, so you know each table will start off with one physical DynamoDB partition to begin with. In us-east-1, the cost for writes is $0.0065 per hour for every 10 units of write capacity, so 24 * 75 * $0.0065 is $11.70 per day for writes for each table. This means the write capacity would cost $23.40 per day for edgestore and graphindex together. The reads could be set to 1 read per second for each of the tables, making the read cost 2 * 24 * $0.0065 = $0.312 for both tables per day. If your AWS account is new, the reads would fall within the free tier, so effectively, you would only be paying for the writes.
Another aspect of DynamoDB pricing is storage (https://aws.amazon.com/dynamodb/pricing/). If you write 750 columns per second, that is 64.8 million items per day to one table, that means 1.9 billion (approximately 2 billion) items per month. The average number of items in the table in a month is then 1 billion. If each items averages out to 412 bytes, and there is 100 bytes of overhead, then that means 1 billion 512 byte items are stored for a month, approximately 477 GB in a month. 477 / 25 rounded up is 20, so storage for the first month at this load would cost 20 * $0.25 dollars a month. If you keep adding items at this rate without deleting them, the monthly storage cost will increase by approximately 5 dollars per month.
If you do not have super nodes in your graph, or vertices with a relatively large number of properties, then the writes to the edgestore will be distributed evenly throughout the partition key space. That means your table will split into 2 partitions when it hits 10GB, and then each of those partitions will split into a total of 4 partitions when they hit 10GB, and so on and so forth. the nearest power of 2 to 477 GB / (10 GB / partition) is 2^6=64, so that means your edgestore would split 6 times over the course of the first month. You would probably have around 64 partitions at the end of the first month. Eventually, your table will have so many partitions that each partition will have very few IOPS. This phenomenon is called IOPS starvation. You should have a strategy in place to address IOPS starvation. Two commonly used strategies are 1. batch cleanup/archival of old data and 2. rolling (time-series) graphs. In option 1, you spin up an EC2 instance to traverse the graph and write old data to a colder store (S3, Glacier etc) and delete it from DynamoDB. In option 2, you direct writes to graphs that correspond to a time period (weeks - 2015W1, months - 2015M1, etc). As time passes, you down provision the writes on the older tables, and when time comes to migrate them to colder storage, you read the entire graph for that time period and delete the corresponding DynamoDB tables. The advantage of this approach is that it allows you to manage your write provisioning cost with higher granularity, and it allows you to avoid the cost of deleting individual items (because you delete a table for free instead of incurring at least 1 WCU for every item you delete).

Wow, thank you so much for all this information Alexander!! It is very nice of you to share so much knowledge with the community, I really appreciate it.
I will now spend some days processing this information and reading up on some of the concepts you mentioned.
Thank you again!

This response goes into DynamoDB pricing considerations in great detail.
I do not want it to get lost in a closed GitHub issue, so can you post it to SO please?
Thanks
Alex

authors: amcp jordi-chacon

repo: awslabs/dynamodb-titan-storage-backend


text:
Add Neuronx TGI 0.0.23

Description of changes:
Add NeuronX TGI image 0.0.23.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

There may be another reason to hold it.  https://github.com/huggingface/optimum-neuron/issues/617

authors: dacorvo jimburtoft

repo: awslabs/llm-hosting-container


text:
Ephemeral CSI support

/feature
Is your feature request related to a problem? Please describe.
Kubernetes pods can use https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volumes
To directly specify config for volumes so that users can use their own buckets/credentials with their workloads without involving cluster-admins.
Describe the solution you'd like in detail
The driver should set the Ephemeral volumeLifecycleModes property of the CSIDriver object: https://kubernetes-csi.github.io/docs/csi-driver-object.html#what-fields-does-the-csidriver-object-have
And support the bucket name via attributes. If they need to specify their credentials, https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/596-csi-inline-volumes/README.md#secret-reference can be used to pass in a secret from the users namespace. Alternately, it may be possible to get a projected service account token for the workload to federate via oidc.

Thank you for the feature request. We are planning to publish a public roadmap shortly and will provide updates on the timeline for adding this feature.

any news on this?

There's no update we can share right now.
If you would like to show interest on this feature, please use the thumbs up reaction (👍) on the main issue as this is our primary way to track interest on GitHub.

There are few requested enhancements with a range of interest on them. Is there any roadmap or issue tracker where we can see which features are currently being worked on and prioritised?
(I am particularly interested in this one. Already put a 👍)

authors: jjkr kfox1111 muddyfish treksler tvandinther


text:
Add s2n_stuffer_read_bytes proof.

Fix bug in s2n_stuffer_read_bytes to make proof succeed.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

:exclamation: No coverage uploaded for pull request head (stuffer_read_bytes@03a5f35). Click here to learn what that means.
The diff coverage is n/a.

We should add preconditions to the functions that we are proving, but this will require an efficient way to do preconditions.  Pushing that to https://github.com/awslabs/s2n/issues/1407

authors: codecov-io danielsn rday


text:
Offer a way to get the ARN of the AWS::Serverless::Function IAM role

Currently AWS::Serverless::Function offer Ref and the Arn as only possible return values. When creating a AWS::Serverless::Function and directly attaching IAM policies to it, there is no way to get the ARN of the automatically created AWS::IAM::Role.
That's e.g. a problem when trying to grant a AWS::Serverless::Function access to a KMS key via the key policy of that key. In that case the key policy requires the role ARN of the function as principal, but there is no way to get the ARN of this role.
The current workaround is to create an AWS::IAM::Role separately and use the Role attribute of the AWS::Serverless::Function to attach it to the function, but it would be easier to be able to define the policies directly in the AWS::Serverless::Function and do something like !GetAtt my_serverless_function.RoleArn to get the ARN of the automatically created role.

You should be able to do !GetAtt my_serverless_functionRole.Arn
At first it is a little weird referring to Resources that aren't specifically defined in your template, but it works fine. You may find it interesting to take a look at the fully expanded transformed template in the CloudFormation console.

Ok, that's interesting. Thanks for pointing it out. It's even documented, so I guess it's somehow officially supported?! Are there any guarantees, that the implementation won't change in future, thus breaking templates using it?
Even if that's the case it still feels weird referencing a resource which isn't defined in the template.

Personally I can't see them making a breaking change just to rename a role, especially as it's part of the documentation. And if they ever did it'd fall over before you could deploy it anyway

@samallisonds is correct, this is a valid way of referencing the arn of the generated role. This is a supported feature of SAM.

authors: Dunedan keetonian samallisonds

repo: awslabs/serverless-application-model


text:
Feat: Add tag related permissions to S3FullAccess policy

Issue #, if available:
#1063
Description of changes:
Updated the policy template as described in the issue, and related tests.
Let me know if there is anything else I need to do!
Description of how you validated changes:
Ensured that the tests worked, and tested by running bin/sam-translate.py on a test template yaml and manually checking the transformed template to ensure that the additional actions were present.
Checklist:

[x] Write/update tests
[x] make pr passes
[ ] Update documentation
[x] Verify transformed template deploys and application functions as expected
[ ] Add/update example to examples/2016-10-31

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #1072 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1072   +/-   ##
========================================
  Coverage    94.81%   94.81%
========================================
  Files           69       69
  Lines         3276     3276
  Branches       639      639
========================================
  Hits          3106     3106
  Misses          89       89
  Partials        81       81

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 527c190...0323425. Read the comment docs.

authors: codecov-io sambattalio


text:
Handling Large Lambda zip file sizes when deploying

I made a small change to the thumbor.conf file (added a security key and set ALLOW_UNSAFE_URLS to false), and then used the build-s3-dist.sh script to zip up the files and then uploaded them to S3.
However, when I attempt to redeploy the Serverless Image Handler with CloudFormation, I get an error for the Lambda being too big. On inspection of the zip file, I noticed that the package is about 75mb zipped/289mb unzipped, far above the 50mb/250mb limits mentioned for Lambdas.
I am wondering if I missed step somewhere before zipping, or if I need to change some dependencies somewhere. However since I didn't really change much aside from the 2 lines in the thumbor.conf file, I'm not sure why it got so big.
One additional note, I did make a slight change in the deploy script to downgrade pip pip install "pip==9.0.3", since the source files for this solution don't appear to support the default pip solution installed (18).
My OS is macOS High Sierra, 10.13.6, if that helps.

UPDATE:
Turns out it was mostly my fault, for trying to package up the lambda on macOS. Doing it on linux worked a lot better, making a zip only half the size.
And in hindsight, building a package like this on an environment as close to the system as possible would be the better choice.
I'd like to submit a clarification to the README describing that linux is required (I was testing things on my local macOS machine before the final deploy, and thought that yum was just considered a 'generic package manager' and that another OS/manager could be used). It might also be useful to point people to what appears to be an official 'close enough' Docker image that can be used for packaging the lambda code, from amazonlinux:latest.
But for now I'll just close the issue, since I resolved my problem.

repo: awslabs/serverless-image-handler


text:
Refactor the aws_smithy_client::hyper_ext module into a crate

aws_config::provider_config::with_tcp_connector and aws_smithy_client::conns both belong there too.

This isn't going to happen before GA.

authors: Velfi jdisanti

repo: awslabs/smithy-rs


text:
Use the same protocol dispatcher logic used in the client codegen

Motivation and Context
Migrate the server-codegen to the same protocol dispatcher mechanism used in the client. The operation traits are generate by ServerHttpProtocolGenerator which uses the more specific ServerRestJson implementation for things such has content-type, serializers, parser, etc..
This will open the possibility to implement more protocols.
NOTE: The RestJson1.kt file is completely integrated inside ServerHttpProtocolGenerator.kt
Description
The server protocol dispatch and code generation is implemented by
having the HTTP logic inside ServerHttpProtocolGenerator and using
specification we can apply specific ser/de and code.
Protocols (like ServerRestJson) can inherit from ServerHttpProtocolGenerator
and tune their implementations.
Other class that have been added:

The ProtocolLoader is implemented inside ServerProtocolLoader
(ServerProtocol.kt)
It matches the right protocol and casts it to
a ServerProtocolGenerator that can be used inside the
ProtocolGeneratorFactory.
The ProtocolGenerator is implemented inside ServerProtocolGenerator (
ServerProtocolGenerator.kt)
It implements serverProtocolOperation() that can build the
operation definition as we like. This method is than called by
ServiceGenerator per every operation in the model.
RestJson and RestJsonFactory are implemented in RestJson.kt and
inherit from ServerHttpProtocolGenerator
Implement the HTTP protocol definition and adapt tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Looks good, minor comments. Thanks for sprinkling comments over the codebase.

authors: crisidev david-perez


text:
travis CRON job fails due to connection timeout in Autopilot test

It seems that travis CRON jobs are failing due to a connection timeout in the Autopilot test when trying to download this file (for example see here: https://travis-ci.org/awslabs/sockeye/jobs/423743734#L6676):
Download: https://nlp.stanford.edu/projects/nmt/data/wmt14.en-de/newstest2014.de
Traceback (most recent call last):
  File "/opt/python/3.5.6/lib/python3.5/urllib/request.py", line 1254, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 1107, in request
    self._send_request(method, url, body, headers)
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 1152, in _send_request
    self.endheaders(body)
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 1103, in endheaders
    self._send_output(message_body)
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 934, in _send_output
    self.send(msg)
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 877, in send
    self.connect()
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 1253, in connect
    super().connect()
  File "/opt/python/3.5.6/lib/python3.5/http/client.py", line 849, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/opt/python/3.5.6/lib/python3.5/socket.py", line 712, in create_connection
    raise err
  File "/opt/python/3.5.6/lib/python3.5/socket.py", line 703, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

Maybe the URL has changed?

Looks like the Stanford NLP site that hosts the files is down.  I added #523 to route around this.

Thanks!

authors: fhieber mjdenkowski

repo: awslabs/sockeye


text:
Build against Java 17, 18, 19

Since we've upgraded main to Spring Boot 3 and Java 17, we also need to include Java 18 and Java 19 in Github actions builds.

Hi @maciejwalkowiak,
Can I get this issue?

@mcruzdev go for it!

Hi @maciejwalkowiak,

There are just version 17 and 19 on sdkman version 5.16.0

@mcruzdev makes sense! Let's skip 18. I think this PR would be ready for review then, right?

I opened the PR #550, thank you :)

Closed in #550
Thanks @mcruzdev!

authors: maciejwalkowiak mcruzdev

repo: awspring/spring-cloud-aws


text:
[QUES] Does Parsr support splitting of PDFs?

Hello, I was wondering if Parsr can split a PDF file?
Thank you!

No. Some other tools can do it.

repo: axa-group/Parsr


text:
Clipper2 1.2.2

THIS PROJECT IS IN DEVELOPMENT MODE. Any pull requests should merge to branch dev, otherwise will be rejected immediately.
Describe your changes
Clipper2. 1.2.2
adapt also CCautoPolygon.cpp to Clipper2 1.2.2
Issue ticket number and link
Checklist before requesting a review

[x] I have performed a self-review of my code.
[ ] If it is a core feature, I have added thorough tests.
[x] I have checked readme and add important infos to this PR (if it needed).
[] I have added/adapted some tests too.

ready for merge

Please also update thirdparty/README.md.in .

I mean this file https://github.com/axmolengine/axmol/blob/dev/thirdparty/README.md.in

@halx99
maybe its better we use only "the pure text file (readme.in) as readme.md and can remove the "formated "readme.md"?
Improvement:

easier handling and the information can be better used for automatic processes too

Why is it failed? I changed only the redme files

repo: axmolengine/axmol


text:
⚖ Register Validator: WayneWayner

Network Choice
dentrite-1
Who are you?
No response
Delegator address
axone1lg22awy3736gkl786qjgukj4zamqz55fuhhhv7
gentx
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"WayneWayner","identity":"3D726987CB38C0D2","website":"https://waynewayner.de","security_contact":"waynewayner@protonmail.com","details":"WayneWayner"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"axonevaloper1lg22awy3736gkl786qjgukj4zamqz55fvzm9ku","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"8Fsz7hTuslPgIs7alTrPFCJKQ5mYLFcOHVCvcifGqN8="},"value":{"denom":"uaxone","amount":"1000000000000"}}],"memo":"1d4256993f1c08571c3bf4e9362246b736b12125@10.10.10.103:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ar6gtynMLe54/wYj/PGh56X3p5UgiPOs56c5dsTMUFaz"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["POSnfU8w1ACF5F1RtaRmLySjFoQRhTDP5+0TE4/vrRcjk9aTkbxtna9RINAsMklXJGPo4XAF4xzDh3uzTUARFQ=="]}

😉 Here is the corresponding PR: https://github.com/axone-protocol/networks/pull/798

authors: WayneWayner bot-anik

repo: axone-protocol/networks


text:
aya-log: Remove i128 and u128 types

They are not supported by eBPF VM and we are going to use arrays for
IPv6.
Signed-off-by: Michal Rostecki vadorovsky@gmail.com

Hello, is there a small example of an ipv6 address being printed with the info!() macro? Specifically, what field of an Ipv6Hdr can be passed in to be printed with {:ipv6}.
Passing in the src_addr field throws up the error of there being no write method on an in6_addr.

repo: aya-rs/aya


text:
Does language check have a different font color with the code ?

I open a shell script, and find many check errors, these error has the same font color with shell code, and I could NOT distinguish them easily:

Is there a different color setting for the check results ?

And any switch to hide the check results ?

Your colorscheme likes so wired. You can use catppuccin and check what's wrong.
https://github.com/ayamir/nvimdots/issues/178#issuecomment-1210538073

Using catppuccin, it seems worse that before:

How can I check the reason?

What terminal do you use? Does it support 256 color?

I tried wezterm, it's good:

But too few light background schemes (only catppuccin-latte / delek / morning / quiet / shine / zellner), and all of them are in low contrast, too difficult for me to see code clearly, so I give up。
To walk away this problem by changing terminal is not a good idea,  I think. As people are familiar with their own terminals, change on terminal may take a lot of time.
So, is there any way just to change the color settings of selected scheme?

But too few light background schemes (only catppuccin-latte / delek / morning / quiet / shine / zellner), and all of them are in low contrast, too difficult for me to see code clearly, so I give up。

You can add more ligth theme on your own, like https://github.com/ayamir/nvimdots/issues/353

Effect of using scheme 'edge' with wezterm:

Supplement
according to this article
I test wezterm:

and mac term:

wezterm support true color, but mac term only support 256 color, is that the key different?

First of all, You must set your terminal theme to a light theme before using nvim's light theme. This is also true for dark theme.
Secondly, as you can see, the test result of mac terminal is abnormal. I don't use mac and mac builtin terminal too, so I have no idea about it. You either need to make it works normal like wezterm or use a terminal which can provide correct color support such as wezterm or kitty.

Okay，I‘ll try GNU terminal on Ubuntu, if there is no problem, this is a certain problem about mac terminal
Supplement
I use light scheme on mac term:

authors: ayamir goodpaperman

repo: ayamir/nvimdots


text:
A(n incomplete and growing) list of Map Algebra operations that would be nice to support

Local Operations

[x] localAdd
[x] localSubtract
[x] localDivide
[x] localMultiply
[x] reclassify
[x] mask
[ ] localSqrt
[ ] localRound
[ ] localLog
[ ] localLog10
[ ] localFloor
[ ] localCeil
[ ] localNegate
[ ] unary_- (multiply by -1)
[ ] localNot
[ ] localAbs
[ ] localAcos
[ ] localAsin
[ ] localAtan2
[ ] localAtan
[ ] localCos
[ ] localCosh
[ ] localSin
[ ] localSinh
[ ] localTan
[ ] localTanh

Focal Operations

[ ] focalMin
[ ] focalMax
[ ] focalMode
[ ] focalMedian
[ ] focalMean
[ ] focalSum
[ ] slope
[ ] aspect

Zonal Operations

[ ] Zonal Statistics

Global Operations

[ ] Distance / Proximity
[ ] Cost Distance
[ ] Viewshed

Zonal operations, Distance, Cost Distance, and Viewshed. There four are part of the ML SBIR scope of work.

Also. I have made this point in conversation, but I'd like to get it down here in the event of discussion
I do not think there should be separate tools/nodes for the majority of the local and focal operations. There can be one tool called Calculator where you can just type in any of the operators

(layer1 + layer2 / layer1 - layer2**2) + cos(layer3)  etc etc.
Just to do an NDVI would otherwise take 3 nodes of tools. (localAdd, localSubtract, localDivision) versus one tool - calculator

Same for focal - I imagine one tool. With on option to select from [min, max, mean, median, std, etc]

authors: moradology rossbernet

repo: azavea/raster-foundry


text:
Feature/lk/default projects

Overview
Add a default_projects user which we can add projects to in order to seed new user accounts
Add code to seed new user accounts
Checklist
~- [ ] Styleguide updated, if necessary~
~- [ ] Swagger specification updated, if necessary~
~- [x] Symlinks from new migrations present or corrected for any new migrations~
Notes
If the cloning queries are not successful, they will fail silently and not prevent the user from logging in.  The new projects probably won't show up right away (for instance, if you instantly nav to the projects view).
Testing Instructions

Add some projects with sensible settings / scenes to you database (you can manually copy them from an existing user and change the owner, created_by, and modified_by fields to the default_projects user
Create a new user
Log in using the user and verify that the projects were cloned successfully

Closes #1724

re: the seed projects, I'm not sure we can put that in a migration -- I think we may have to do that manually right? Or we'd have to ensure every environment has those projects available

Yeah -- just talked to @Lknechtli -- I agree that that's currently correct. I don't think it needed to be correct -- we would have needed a new dev db that was a subset of production to keep the ids fixed. But that's not where we're going anyway.

authors: Lknechtli jisantuc notthatbreezy


text:
🛑 Sakai Wolford Bot is down

In 15c7af5, Sakai Wolford Bot (https://57807cee-a496-49db-810c-9184cf7f0693-00-7nhexelkttqj.asia-a.replit.dev/) was down:

HTTP code: 503
Response time: 1458 ms

Resolved: Sakai Wolford Bot is back up in 817e8fd after 4 days, 18 hours, 31 minutes.

repo: azrielbsi/monitor


text:
Ansible inaccessible from vscode user

The Dockerfile currently installs ansible 2.10 using pip3, but it does so while logged in as root.  This results in the ansible binary being located at /root/.local/bin/ansible which is inaccesable from the default vscode user.
Aside from that, Ansible documentation still says that 2.9 should continue to be used on RHEL distros at this time, so I'm not 100% certain this installation would even be reliable:
Link

Since Ansible 2.10 for RHEL is not available at this time, continue to use Ansible 2.9.

Suggestion: please fall back on the standard yum/2.9 installation that can then be accessible from the default vscode user.

hi @Justin-DynamicD we have issued an new version of rover that should resolve that, you can use: aztfmod/roverdev:2010.141511. Please let us know if it resolves the issue.

Confirmed: as vscode I can load 2.9.13:
[vscode@74a922efb9ed rover]$ ansible --version
ansible 2.9.13
  config file = None
  configured module search path = ['/home/vscode/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Apr  2 2020, 13:34:55) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

authors: Justin-DynamicD arnaudlh

repo: aztfmod/rover


text:
Add Option hide > inactive_window

I've used lualine before and I could hide the status line in inactive window, why doesn't incline have such functionality?
When I split the current window vertically, I see the incline status message on both windows, which is annoying.

That can be achieved by setting your render to something like this
require('incline').setup({
  render = function(props)
    if props.focused then
      return require('incline.presets').basic(props)
    end

    return nil
  end,
})

I don't think the additional options are needed as the render option already gives us a lot of customization flexibility

@fitrh Thanks for reply! Your solution works for my problem but has side effects on floating windows. I use "carbon-steel/detour.nvim" to edit the file in a floating window. When the floating window is displayed, the "incline" status message disappears.

I has a solution like this:
..
          render = function(props)
            if not props.focused and not w.is_floating() then
                return
            end

and is_floating() like this:
M.is_floating = function()
local parent = vim.api.nvim_get_current_win()
return vim.api.nvim_win_get_config(parent).relative ~= ''
end

The default behavior is to ignore floating windows, configurable via ignore.floating_wins, so
require('incline').setup({
  render = function(props)
    if props.focused then
      return require('incline.presets').basic(props)
      -- or return whatever you want to render in the focused window
    end

    return nil
  end,
  ignore = {
    floating_wins = false,
  },
})

Maybe achieve what you want

ignore.floating_win does not achieve what I want!

Hello I have a question and I am sorry for reviving this thread, but my question is the same thing at its core - rendering incline differently based on props.focused. Everything seems pretty clear yet, I fail trying to do a similar condition. Apply different colors based of off the condition. I did something like that: ```lua
config = function()
local center_hl = vim.api.nvim_get_hl(0, { name = "InclineCenter" })
local outer_hl = vim.api.nvim_get_hl(0, { name = "InclineOuter" })
local center_hl_inactive =
vim.api.nvim_get_hl(0, { name = "InclineCenterInactive" })
local outer_hl_inactive =
vim.api.nvim_get_hl(0, { name = "InclineOuterInactive" })
require("incline").setup {
  window = {
    margin = { vertical = 0, horizontal = 0 },
    options = { signcolumn = false, wrap = false },
    padding = 0,
  },
  hide = {
    cursorline = false,
  },
  render = function(props)
    local filename =
      vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
    if vim.bo[props.buf].modified then
      filename = filename .. "  "
    end

    local active_pill_end_hl = {
      guifg = "#" .. string.format("%06x", outer_hl.fg),
      guibg = "#" .. string.format("%06x", outer_hl.bg),
    }
    local active_pill_center_hl = {
      guifg = "#" .. string.format("%06x", center_hl.fg),
      guibg = "#" .. string.format("%06x", center_hl.bg),
    }
    local inactive_pill_end_hl = {
      guifg = "#" .. string.format("%06x", outer_hl_inactive.fg),
      guibg = "#" .. string.format("%06x", outer_hl_inactive.bg),
    }
    local inactive_pill_center_hl = {
      guifg = "#" .. string.format("%06x", center_hl_inactive.fg),
      guibg = "#" .. string.format("%06x", center_hl_inactive.bg),
    }

    local icon, color =
      require("nvim-web-devicons").get_icon_color(filename)
    if props.focused then
      return {
        {
          "",
          guifg = active_pill_end_hl.guifg,
          guibg = active_pill_end_hl.guibg,
        },
        {
          icon,
          guifg = color,
          guibg = active_pill_center_hl.guibg,
        },
        {
          " ",
          guibg = active_pill_center_hl.guibg,
        },
        {
          filename,
          guibg = active_pill_center_hl.guibg,
          guifg = active_pill_center_hl.guifg,
        },
        {
          "",
          guifg = active_pill_end_hl.guifg,
          guibg = active_pill_end_hl.guibg,
        },
      }
    end
    return {
      {
        "",
        -- guifg = inactive_pill_end_hl.guifg,
        -- guibg = inactive_pill_end_hl.guibg,
        -- testing with plai
        guifg = "#ffffff",
        guibg = "#000000",
      },
      {
        icon,
        -- guifg = color,
        -- guibg = inactive_pill_center_hl.guibg,
        guifg = "#ffffff",
        guibg = "#000000",
      },
      {
        " ",
        -- guibg = inactive_pill_center_hl.guibg,
        guibg = "#000000",
      },
      {
        filename,
        -- guibg = inactive_pill_center_hl.guibg,
        -- guifg = inactive_pill_center_hl.guifg,
        guifg = "#ffffff",
        guibg = "#000000",
      },
      {
        "",
        -- guifg = inactive_pill_end_hl.guifg,
        -- guibg = inactive_pill_end_hl.guibg,
        guifg = "#ffffff",
        guibg = "#000000",
      },
    }
  end,
}

end,
As you can see, I did plain and clear black and white color definitions for the returned result for "inactive" just to see if the condition works. It does not. All my incline instances are rendered with the active colors. Anything obvious I might be missing here or is it worth investigating deeper? I'd be glad to provide details if needed.  I use self modded config grown on top of nvchad base, the highlights I pull in for "active" are custom and they work (the behavior is as if all the splits returned focused=true). I am not using any plugins that might affect how splits are created. I'd appreciate a quick glance at this issue.

![image](https://github.com/b0o/incline.nvim/assets/109661595/056dc9b4-1c40-4612-9340-510b2ebeb947)

Hi @tom-gora. The issue with your config seems to be caused by window.options.signcolumn = false. false is not a valid value for the signcolumn option. This is causing an error, but Incline isn't displaying that error message, so it's failing silently and putting incline into a broken state.
You can fix this by changing it to window.options.signcolumn = 'no'.
I am going to make sure that an error message is displayed in a case like this so it doesn't fail silently.
Side note: I'm curious to know why you're setting signcolumn in the first place?

@tom-gora Here's how I would simplify your config. This should be functionally equivalent:
require('incline').setup {
  window = {
    margin = { vertical = 0, horizontal = 0 },
    -- You can probably omit this because it should not be necessary
    options = { signcolumn = 'no', wrap = false },
    padding = 0,
  },
  -- Omit this if you've already set these highlight groups somewhere else in your config
  highlight = {
    groups = {
      InclineOuter = { guifg = 'red' },
      InclineCenter = { guibg = 'red', guifg = 'white' },
      InclineOuterInactive = { guifg = 'gray' },
      InclineCenterInactive = { guibg = 'gray', guifg = 'white' },
    },
  },
  hide = {
    -- You can omit this because false is the default value
    cursorline = false,
  },
  render = function(props)
    local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t')
    if vim.bo[props.buf].modified then
      filename = filename .. '  '
    end
    local suffix = props.focused and '' or 'Inactive'
    local outerGroup = 'InclineOuter' .. suffix
    local centerGroup = 'InclineCenter' .. suffix
    local icon, iconColor = require('nvim-web-devicons').get_icon_color(filename)
    -- the result table can contain nested tables.
    -- This works similar to how nested HTML tags work, making it easier to apply
    -- styles to overlapping parts of the statusline without repeating yourself.
    -- Styles defined in the nested tables will override styles defined in the parent table.
    return {
      '',
      {
        { icon, guifg = iconColor },
        ' ',
        filename,
        group = centerGroup,
      },
      '',
      group = outerGroup,
    }
  end,
}

Wow thank you for the quick response. I got an idea for my implementation from craftzdog's dotfiles. I copied some stuff from him where he had it set to true. Naturally I assumed false as opposite. I'll look into it after work. Thank you so much!

Confirmed, works. The issue was me in the end not being able to track it down and not knowing enough vim quirks like that some opts take a bool while others take a string as a value. Thanks again!

Ah, and regarding sidenote 2:
Signcolumn? I was under the impression this is where the spacing to the left came from (next to my rounded "pill" char) until I realised it was actually padding. It was wrong of me to keep settings I since knew were wrong, and then it turned out this was causing error. Learning every day IG. Wrap I set because I have seen it in someone else's config and I assumed it prevents wrapping on long filenames, diagnostics and other stuff like it. I will ditch it if you say it has no effect. Thanks!

authors: b0o fitrh jonahfang tom-gora