feat(cli): CTF aws-install ec2ssm

This PR contains the implementation for the ec2ssm subcommand of Project Capture
The Flag.
Fixes RAIN-38281
Signed-off-by: nschmeller<EMAIL_ADDRESS>
Summary
Install agents on EC2 instances using SSM.

How did you test this change?

Integration test at https://github.com/lacework/agent/pull/1699
Issue

https://lacework.atlassian.net/browse/RAIN-38281

Design decision: whether to use Commands or shells for SSM...
I feel like a Command might be the kosher way of doing things with SSM. In order to use Commands, I think we'd have to create the Commands as infrastructure, and we'd have to have a Command for each operation we want to do (verify access, check if the agent is already installed, and install the agent). But that would be a lot of overhead to set up.
Alternatively, we could use shells. I think that would be a lot simpler. But it might be more difficult to audit / less official.
I haven't made up my mind yet, but I'm going to first investigate using shells, and then take a look at Commands if shells don't fit just right.

Another design decision: using Pulumi or Terraform to create SSM Documents / Commands and the IAM role?
I don't know enough about Pulumi to completely answer this. But my impression of Pulumi is that we won't have to specify separate Terraform files that we then apply and maintain state for. I think that Pulumi will allow us to specify infrastructure in the CLI code, apply that infra during the CLI execution, and maintain state in memory. And if all of those things are true, then I think Pulumi is the right tool for the job here.
Plus points for Terraform are that I'm familiar with it, and that it seems a little more established than Pulumi, so customers might be familiar with it too.

I took a look at the GuardRails issues, the ones that are "Medium" or "High" all do not have a patch available. So I guess we can ignore them.

TODO at checkpoint for today: attach policies to the role, attach the role to the instance profile, test the role (Terratest?)

Design decision: how to handle pre-existing instance profiles?
Annoyingly, AWS has a rule that an EC2 instance can only have one instance profile associated with it. And, an instance profile can only have one role associated with it. So, if we want to install an agent on an EC2 instance, we had better hope there isn't an instance profile already associated with it.
Two ways we could approach the problem when the instance already has an instance profile associated with it:

Remove the existing instance profile, add ours, run the operation, remove ours, re-add the old instance profile

This would be pretty risky: 1) the customer may need the instance profile to stay attached to the instance continuously, 2) if the aws-install ssm execution fails or is interrupted before we can clean up and re-add the old instance profile, we've just vandalized the customer's infrastructure

Quietly fail on the instance. Give it a best-effort try, but if there's an instance profile, then we can't install an agent.

I'm thinking we should take the second option, since it's a lot less risky.

Getting a strange error when associating the instance profile to the instance:
{
  "level": "debug",
  "ts": "2022-12-01T20:25:17Z",
  "caller": "cmd/agent_aws-install_ssm.go:151",
  "msg": "failed to attach instance profile to runner",
  "error": "operation error EC2: AssociateIamInstanceProfile, https response error StatusCode: 400, RequestID: c4d2ef17-efeb-4745-835a-d2ea1e100ff7, api error InvalidParameterValue: Value (arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile) for parameter iamInstanceProfile.arn is invalid. Invalid IAM Instance Profile ARN",
  "instance ID": "i-0f273822d1847344e",
  "role": {
    "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
    "CreateDate": "2022-12-01T20:25:16Z",
    "Path": "/",
    "RoleId": "AROAYFH3WMUJEXV4PGX2X",
    "RoleName": "Lacework-Agent-SSM-Install-Role",
    "AssumeRolePolicyDocument": "%7B%0A%09%22Version%22%3A%20%222012-10-17%22%2C%0A%09%22Statement%22%3A%20%5B%0A%09%09%7B%0A%09%09%09%22Effect%22%3A%20%22Allow%22%2C%0A%09%09%09%22Principal%22%3A%20%7B%20%22AWS%22%3A%20%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%20%7D%2C%0A%09%09%09%22Action%22%3A%20%22sts%3AAssumeRole%22%0A%09%09%7D%0A%09%5D%0A%7D",
    "Description": null,
    "MaxSessionDuration": null,
    "PermissionsBoundary": null,
    "RoleLastUsed": null,
    "Tags": null
  },
  "instance profile": {
    "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
    "CreateDate": "2022-12-01T20:25:17Z",
    "InstanceProfileId": "AIPAYFH3WMUJBLWYT3FFP",
    "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
    "Path": "/",
    "Roles": [],
    "Tags": null
  }
}

When I use these values in the CLI (aws ec2 associate-iam-instance-profile --iam-instance-profile Arn=arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile --instance-id i-07d5abe315618b5aa) it works fine.
Still digging into this...

I managed to reproduce the above error in the CLI:
❯ aws ec2 associate-iam-instance-profile --iam-instance-profile Arn=arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile --instance-id i-07d5abe315618b5aa

An error occurred (InvalidParameterValue) when calling the AssociateIamInstanceProfile operation: Value (arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile) for parameter iamInstanceProfile.arn is invalid. Invalid IAM Instance Profile ARN

This happened when the given instance profile didn't exist. So now I'm going to check if the CLI is deleting the instance profile before we can use it...

I confirmed that the instance profile we're creating does exist when we try to associate it with the instance.
  "level": "debug",
  "ts": "2022-12-01T21:37:14Z",
  "caller": "cmd/agent_aws-install_ssm.go:175",
  "msg": "DEBUG instance profile associations",
  "output": null,
  "error": "operation error EC2: AssociateIamInstanceProfile, https response error StatusCode: 400, RequestID: 2fc208b9-2d72-44b7-9bcf-ec1facd8c56b, api error InvalidParameterValue: Value (arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile) for parameter iamInstanceProfile.arn is invalid. Invalid IAM Instance Profile ARN",
  "instance profile": {
    "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
    "CreateDate": "2022-12-01T21:37:13Z",
    "InstanceProfileId": "AIPAYFH3WMUJA6X5HDLBC",
    "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
    "Path": "/",
    "Roles": [],
    "Tags": null
  },
  "fresh lookup of instance profile": {
    "InstanceProfile": {
      "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
      "CreateDate": "2022-12-01T21:37:13Z",
      "InstanceProfileId": "AIPAYFH3WMUJA6X5HDLBC",
      "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
      "Path": "/",
      "Roles": [
        {
          "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
          "CreateDate": "2022-12-01T21:37:13Z",
          "Path": "/",
          "RoleId": "AROAYFH3WMUJNE2BTZZUW",
          "RoleName": "Lacework-Agent-SSM-Install-Role",
          "AssumeRolePolicyDocument": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22AWS%22%3A%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D",
          "Description": null,
          "MaxSessionDuration": null,
          "PermissionsBoundary": null,
          "RoleLastUsed": null,
          "Tags": null
        }
      ],
      "Tags": []
    },
    "ResultMetadata": {}
  }
}

Interestingly, if I create an instance profile by hand (using the AWS CLI), and I hardcode its ARN into the CLI debugging code I added, it works fine...
{
  "level": "debug",
  "ts": "2022-12-01T21:48:50Z",
  "caller": "cmd/agent_aws-install_ssm.go:180",
  "msg": "DEBUG instance profile associations",
  "output": {
    "IamInstanceProfileAssociation": {
      "AssociationId": "iip-assoc-05ffd85cf5eda9774",
      "IamInstanceProfile": {
        "Arn": "arn:aws:iam::561021084946:instance-profile/Test-Instance-Profile-Debugging",
        "Id": "AIPAYFH3WMUJLTNO3GRGU"
      },
      "InstanceId": "i-05dcbf5301fb8e547",
      "State": "associating",
      "Timestamp": null
    },
    "ResultMetadata": {}
  },
  "error": null,
  "instance profile": {
    "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
    "CreateDate": "2022-12-01T21:48:50Z",
    "InstanceProfileId": "AIPAYFH3WMUJGKNSFD47T",
    "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
    "Path": "/",
    "Roles": [],
    "Tags": null
  },
  "fresh lookup of instance profile": {
    "InstanceProfile": {
      "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
      "CreateDate": "2022-12-01T21:48:50Z",
      "InstanceProfileId": "AIPAYFH3WMUJGKNSFD47T",
      "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
      "Path": "/",
      "Roles": [
        {
          "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
          "CreateDate": "2022-12-01T21:48:50Z",
          "Path": "/",
          "RoleId": "AROAYFH3WMUJCAO4CVJ6W",
          "RoleName": "Lacework-Agent-SSM-Install-Role",
          "AssumeRolePolicyDocument": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22AWS%22%3A%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D",
          "Description": null,
          "MaxSessionDuration": null,
          "PermissionsBoundary": null,
          "RoleLastUsed": null,
          "Tags": null
        }
      ],
      "Tags": []
    },
    "ResultMetadata": {}
  }
}

Looks like it's a problem with the way we're creating the instance profile -- when I create it via the CLI, it works... so it's something about the way we're creating it in CTF
{
  "level": "debug",
  "ts": "2022-12-01T23:18:43Z",
  "caller": "cmd/agent_aws-install_ssm.go:180",
  "msg": "DEBUG instance profile associations",
  "output": {
    "IamInstanceProfileAssociation": {
      "AssociationId": "iip-assoc-0bd8f9a41fd68573b",
      "IamInstanceProfile": {
        "Arn": "arn:aws:iam::561021084946:instance-profile/Test-Debugging-Instance-Profile",
        "Id": "AIPAYFH3WMUJDZTUEWUK4"
      },
      "InstanceId": "i-047d98483e704633a",
      "State": "associating",
      "Timestamp": null
    },
    "ResultMetadata": {}
  },
  "error": null,
  "instance profile": {
    "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
    "CreateDate": "2022-12-01T23:18:42Z",
    "InstanceProfileId": "AIPAYFH3WMUJLSHXL6MZT",
    "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
    "Path": "/",
    "Roles": [],
    "Tags": null
  },
  "fresh lookup of instance profile": {
    "InstanceProfile": {
      "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
      "CreateDate": "2022-12-01T23:18:42Z",
      "InstanceProfileId": "AIPAYFH3WMUJLSHXL6MZT",
      "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
      "Path": "/",
      "Roles": [
        {
          "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
          "CreateDate": "2022-12-01T23:18:42Z",
          "Path": "/",
          "RoleId": "AROAYFH3WMUJHUL37ED5R",
          "RoleName": "Lacework-Agent-SSM-Install-Role",
          "AssumeRolePolicyDocument": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22AWS%22%3A%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D",
          "Description": null,
          "MaxSessionDuration": null,
          "PermissionsBoundary": null,
          "RoleLastUsed": null,
          "Tags": null
        }
      ],
      "Tags": []
    },
    "ResultMetadata": {}
  }
}

I'm trying to figure out what is different between the instance profile I create by hand and the one that CTF creates.
I thought it might be that the ARN is much longer for the one that CTF creates, so I tried creating the one by hand with a much longer name, and it worked fine. So that's that theory done.
{
  "level": "debug",
  "ts": "2022-12-01T23:50:42Z",
  "caller": "cmd/agent_aws-install_ssm.go:181",
  "msg": "DEBUG instance profile associations",
  "output": {
    "IamInstanceProfileAssociation": {
      "AssociationId": "iip-assoc-00f76fda818afbfd8",
      "IamInstanceProfile": {
        "Arn": "arn:aws:iam::561021084946:instance-profile/Test-Debugging-Instance-Profile-Additional-Chars-Lacework-Agent-SSM-Install-Instance-Profile",
        "Id": "AIPAYFH3WMUJOMAWW5W5X"
      },
      "InstanceId": "i-04540037809aae452",
      "State": "associating",
      "Timestamp": null
    },
    "ResultMetadata": {}
  },
  "error": null,
  "instance profile": {
    "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
    "CreateDate": "2022-12-01T23:18:42Z",
    "InstanceProfileId": "AIPAYFH3WMUJLSHXL6MZT",
    "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
    "Path": "/",
    "Roles": [
      {
        "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
        "CreateDate": "2022-12-01T23:18:42Z",
        "Path": "/",
        "RoleId": "AROAYFH3WMUJHUL37ED5R",
        "RoleName": "Lacework-Agent-SSM-Install-Role",
        "AssumeRolePolicyDocument": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22AWS%22%3A%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D",
        "Description": null,
        "MaxSessionDuration": null,
        "PermissionsBoundary": null,
        "RoleLastUsed": null,
        "Tags": null
      }
    ],
    "Tags": []
  },
  "fresh lookup of instance profile": {
    "InstanceProfile": {
      "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
      "CreateDate": "2022-12-01T23:18:42Z",
      "InstanceProfileId": "AIPAYFH3WMUJLSHXL6MZT",
      "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
      "Path": "/",
      "Roles": [
        {
          "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
          "CreateDate": "2022-12-01T23:18:42Z",
          "Path": "/",
          "RoleId": "AROAYFH3WMUJHUL37ED5R",
          "RoleName": "Lacework-Agent-SSM-Install-Role",
          "AssumeRolePolicyDocument": "%7B%22Version%22%3A%222012-10-17%22%2C%22Statement%22%3A%5B%7B%22Effect%22%3A%22Allow%22%2C%22Principal%22%3A%7B%22AWS%22%3A%22arn%3Aaws%3Asts%3A%3A561021084946%3Aassumed-role%2FIntegrationTestsRole%2Fnick_integration_tests_role%22%7D%2C%22Action%22%3A%22sts%3AAssumeRole%22%7D%5D%7D",
          "Description": null,
          "MaxSessionDuration": null,
          "PermissionsBoundary": null,
          "RoleLastUsed": null,
          "Tags": null
        }
      ],
      "Tags": []
    },
    "ResultMetadata": {}
  }
}

The one that CTF creates (this one has the role attached, that might be part of it):
❯ aws-vault exec integration-tests -- aws iam get-instance-profile --instance-profile-name Lacework-Agent-SSM-Install-Instance-Profile
❯ {
    "InstanceProfile": {
        "Path": "/",
        "InstanceProfileName": "Lacework-Agent-SSM-Install-Instance-Profile",
        "InstanceProfileId": "AIPAYFH3WMUJLSHXL6MZT",
        "Arn": "arn:aws:iam::561021084946:instance-profile/Lacework-Agent-SSM-Install-Instance-Profile",
        "CreateDate": "2022-12-01T23:18:42+00:00",
        "Roles": [
            {
                "Path": "/",
                "RoleName": "Lacework-Agent-SSM-Install-Role",
                "RoleId": "AROAYFH3WMUJHUL37ED5R",
                "Arn": "arn:aws:iam::561021084946:role/Lacework-Agent-SSM-Install-Role",
                "CreateDate": "2022-12-01T23:18:42+00:00",
                "AssumeRolePolicyDocument": {
                    "Version": "2012-10-17",
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": "arn:aws:sts::561021084946:assumed-role/IntegrationTestsRole/nick_integration_tests_role"
                            },
                            "Action": "sts:AssumeRole"
                        }
                    ]
                }
            }
        ],
        "Tags": []
    }
}

The one I created by hand:
{
    "InstanceProfile": {
        "Path": "/",
        "InstanceProfileName": "Test-Debugging-Instance-Profile-Additional-Chars-Lacework-Agent-SSM-Install-Instance-Profile",
        "InstanceProfileId": "AIPAYFH3WMUJOMAWW5W5X",
        "Arn": "arn:aws:iam::561021084946:instance-profile/Test-Debugging-Instance-Profile-Additional-Chars-Lacework-Agent-SSM-Install-Instance-Profile",
        "CreateDate": "2022-12-01T23:48:21+00:00",
        "Roles": [],
        "Tags": []
    }
}

I had thought this was working, but it wasn't. I think I had just created the instance profile name via the AWS CLI instead of the SDK, so it worked fine. And it worked on repeat runs because I had commented out the code to tear down infra in CTF. So when I commented the teardown code back in, it worked on the first try, but then it tore down the instance profile that I created via the AWS CLI. So when I did a second try, it created the instance profile using the SDK, which then failed to associate.

I just confirmed that when I associate the SDK-created instance profile to an instance using the AWS CLI, it works fine. So the problem is when I try to associate the SDK-created instance profile to an instance using the SDK.
The other combinations (associate CLI-created instance profile using the SDK, associate SDK-created instance profile using the CLI, associate CLI-created instance profile using the CLI) all work. So strange...

Another piece of interesting info: associating an SDK-created instance profile using the SDK works when the SDK is re-using the instance profile (aka, it was created on one SDK run and not torn down, then on another SDK run the SDK found it and reused it).
When I did this, I also associated the instance profile to one instance using the AWS CLI. So on the second SDK run, it did not associate the already-associated instance profile, but it successfully associated the other two instance profiles that the SDK created in a previous run. I need to test if it works if I don't do this.

Jackpot -- I just ran it without the complicating factor that I mentioned above (about associating with one instance but not the others). The same result happened. So it's either 1) re-using does not return the same result as creating, and re-using is correct, or 2) there's a timing issue, and the instance profile needs a few seconds (perhaps to become eventually-consistent?) before it's ready to be associated.
I'll add a 1min sleep and see if that does anything. If it works with that's then it's (2). Otherwise I'll take a look at the reuse vs create logic.

It's a timing thing -- I added a 1min sleep, and it worked without any reusing. Woohoo!!!!!!!
I tried seeing if we could do retries every second to see if the instance profile was settled in, but the only API I could think of for this, get-instance-profile, showed it was available right after creation (when it clearly isn't, since we can't associate it). So we just have to pick the smallest sleep time that will work 99% of the time and hope that's enough.
Now the goal is to figure out what that time is. 30sec and 15sec worked. I'll do some more experiments tomorrow. But for now, this is working!!

Another thought I have is, instead of sleeping for 30 seconds, we could do retries when associating the instance profile. This has the advantage that we don't need to sleep when creating the instance profile, but it might take longer to fail when associating the instance profile, and we might run into rate limits if all the goroutines are making API calls every second.
This article (http://www.it-automation.com/2021/06/06/how-to-deal-with-eventual-consistency-in-AWS-IAM.html) has a pretty good writeup about the problem that we're facing here. Their suggestion was retries or sleep for 45 seconds (apparently this was what AWS recommended, but I haven't cross-referenced it).
For now, I'm tempted to go with the sleep for 45 seconds option, since it's simpler, and it's working right now.

Currently the machines I'm using to test this code are not working with SSM. I'm not sure if this is a problem with this code or a problem with the machines. I'm hoping it's a problem with this code.
The error specifically is operation error SSM: SendCommand, https response error StatusCode: 400, RequestID: 9ea1cda8-55f0-4f6a-a130-aa9cce4ba933, InvalidInstanceId: Instances [[i-0629883c23865f080]] not in a valid state for account<PHONE_NUMBER>46. I tried to see if SSM was working in general for these machines, so I ran aws ssm start-session, and got An error occurred (TargetNotConnected) when calling the StartSession operation: i-0629883c23865f080 is not connected.. I reran aws ssm start-session with fresh machines, and I got the same error. This makes me think that there is a problem with SSM on the testing machines.
This is just an update on progress. Next step is to figure out why SSM doesn't work for the testing machines (ideally it should work for all machines!).

The last update I wrote on this PR was discussing why we were getting the error InvalidInstanceId: Instances [[i-0629883c23865f080]] not in a valid state for account<PHONE_NUMBER>46. I thought at the time that it was an error with the test machines because I reproduced the error without running CTF SSM. But actually it is most likely an error with CTF SSM, because the "instance is not connected" error is a blanket error for any IAM misconfiguration.
I figured out a few more things in the last two days with this implementation. Although the same bug is occurring, hopefully it's now occurring for different reasons. The first realization was that I had forgotten to write code to actually assume the role we were creating. The second was that the calling user should not assume the role, but rather the EC2 instance should assume the role (which is done when associating the instance profile). This also meant I had to edit the trust relationship in the role's trust policy so that the EC2 service could assume instead of the calling user.
These are two critical things to realize for a working implementation, but I'm still not sure why we're getting the InvalidInstanceId error...

I think the IAM configuration may actually be correct in this case -- I created the IAM role and instance profile using CTF SSM, but didn't tear them down after. Then I manually attached that instance profile using the CLI, and then I successfully ran aws ssm start-session using the CLI. So I think CTF SSM is creating the correct IAM infra. This means that there are two possibilities for what's going wrong: 1) CTF SSM is not associating the instance profiles correctly, or 2) CTF is not calling SendCommand correctly.
I tested (1) by rerunning CTF SSM (without the teardown) and manually running aws ssm start-session using the CLI on the instance that CTF SSM configured. This failed with the same error (An error occurred (TargetNotConnected) when calling the StartSession operation: i-0df549e9d2380150a is not connected.). So it looks like CTF SSM is not associating the instance profiles correctly.

Now I don't have confidence that the IAM configuration is correct here. I reran the experiment I did above, where I created the IAM role and instance profile using CTF SSM and then manually associated and tested using the CLI. Previously SSM worked, but this time SSM did not work...

Okay, I'm going to do the CTF SSM steps using the CLI, and if that works, bisect down to what part breaks.
Steps using CLI:

Create a role with the trust relationship of: "Version": "2012-10-17",
 "Statement": [
 	{
 		"Effect": "Allow",
 		"Principal": { "Service": "ec2.amazonaws.com" },
 		"Action": "sts:AssumeRole"
 	}
 ]
}

Attach the SSM policy arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore to this role
Create an instance profile
Add the role to the instance profile
Associate the instance profile to the instance

Execution output:

aws iam create-role --role-name DebugCTFSSMRoleDeleteMe --assume-role-policy-document file://EC2Trust.json
Output:{
 "Role": {
     "Path": "/",
     "RoleName": "DebugCTFSSMRoleDeleteMe",
     "RoleId": "AROAYFH3WMUJDZFL6TIXX",
     "Arn": "arn:aws:iam::561021084946:role/DebugCTFSSMRoleDeleteMe",
     "CreateDate": "2023-01-05T21:21:30+00:00",
     "AssumeRolePolicyDocument": {
         "Version": "2012-10-17",
         "Statement": [
             {
                 "Effect": "Allow",
                 "Principal": {
                     "Service": "ec2.amazonaws.com"
                 },
                 "Action": "sts:AssumeRole"
             }
         ]
     }
 }
}

aws-vault exec integration-tests -- aws iam attach-role-policy --role-name DebugCTFSSMRoleDeleteMe --policy-arn arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
aws-vault exec integration-tests -- aws iam create-instance-profile --instance-profile-name DebugCTFSSMInstanceProfileDeleteMe
Output:{
"InstanceProfile": {
    "Path": "/",
    "InstanceProfileName": "DebugCTFSSMInstanceProfileDeleteMe",
    "InstanceProfileId": "AIPAYFH3WMUJPMYRJXAD6",
    "Arn": "arn:aws:iam::561021084946:instance-profile/DebugCTFSSMInstanceProfileDeleteMe",
    "CreateDate": "2023-01-05T21:24:25+00:00",
    "Roles": []
}
}

aws-vault exec integration-tests -- aws iam add-role-to-instance-profile --instance-profile-name DebugCTFSSMInstanceProfileDeleteMe --role-name DebugCTFSSMRoleDeleteMe
aws-vault exec integration-tests -- aws ec2 associate-iam-instance-profile --iam-instance-profile Name=DebugCTFSSMInstanceProfileDeleteMe --instance-id i-078072e926510f45a
Output:{
 "IamInstanceProfileAssociation": {
     "AssociationId": "iip-assoc-035352d8c9424f4ae",
     "InstanceId": "i-078072e926510f45a",
     "IamInstanceProfile": {
         "Arn": "arn:aws:iam::561021084946:instance-profile/DebugCTFSSMInstanceProfileDeleteMe",
         "Id": "AIPAYFH3WMUJPMYRJXAD6"
     },
     "State": "associating"
 }
}

aws ec2 describe-iam-instance-profile-associations --filters Name=instance-id,Values=i-078072e926510f45a
Output:{
 "IamInstanceProfileAssociations": [
     {
         "AssociationId": "iip-assoc-035352d8c9424f4ae",
         "InstanceId": "i-078072e926510f45a",
         "IamInstanceProfile": {
             "Arn": "arn:aws:iam::561021084946:instance-profile/DebugCTFSSMInstanceProfileDeleteMe",
             "Id": "AIPAYFH3WMUJPMYRJXAD6"
         },
         "State": "associated"
     }
 ]
}

aws ssm start-session --target i-078072e926510f45a
Output:
An error occurred (TargetNotConnected) when calling the StartSession operation: i-078072e926510f45a is not connected.
I then ran aws ssm start-session --target i-078072e926510f45a again, and it worked (gave me a shell in the instance). This was a few minutes later. So we can't rely on the state being correct when the describe-iam-instance-profile-associations command says that the instance profile is associated, which is a little frustrating. But at least it's working.

Now I'm going to run the same experiment as above, but use the role created by CTF SSM, with the policy already attached to the role by CTF SSM:

aws iam create-instance-profile --instance-profile-name DebugCTFSSMInstanceProfileDeleteMe2
Output:{
 "InstanceProfile": {
     "Path": "/",
     "InstanceProfileName": "DebugCTFSSMInstanceProfileDeleteMe2",
     "InstanceProfileId": "AIPAYFH3WMUJGXGF6Y2MV",
     "Arn": "arn:aws:iam::561021084946:instance-profile/DebugCTFSSMInstanceProfileDeleteMe2",
     "CreateDate": "2023-01-05T21:49:12+00:00",
     "Roles": []
 }
}

aws-vault exec integration-tests -- aws iam add-role-to-instance-profile --instance-profile-name DebugCTFSSMInstanceProfileDeleteMe2 --role-name Lacework-Agent-SSM-Install-Role
aws-vault exec integration-tests -- aws ec2 associate-iam-instance-profile --iam-instance-profile Name=DebugCTFSSMInstanceProfileDeleteMe2 --instance-id i-0c159fa19e6b36094
Output:{
 "IamInstanceProfileAssociation": {
     "AssociationId": "iip-assoc-0ce2bf4c72cc0ef3e",
     "InstanceId": "i-0c159fa19e6b36094",
     "IamInstanceProfile": {
         "Arn": "arn:aws:iam::561021084946:instance-profile/DebugCTFSSMInstanceProfileDeleteMe2",
         "Id": "AIPAYFH3WMUJGXGF6Y2MV"
     },
     "State": "associating"
 }
}

aws ssm start-session --target i-0c159fa19e6b36094 worked!!

I ran a new experiment where I tried associating the instance profile created by CTF SSM to the instance:

aws-vault exec integration-tests -- aws ec2 associate-iam-instance-profile --iam-instance-profile Name=Lacework-Agent-SSM-Install-Instance-Profile --instance-id i-0bfc34480a45456ca
aws-vault exec integration-tests -- aws ssm start-session --target i-0bfc34480a45456ca did not succeed after 2min, but it did succeed after 4min...

So it looks like we need to try waiting for a while for CTF SSM, like 5min. That seems extravagant, but whatever it takes to work.

I tested the 5min sleep yesterday, and it worked (!!). It's a frustatingly long amount of time to sleep. Maybe we can do retries...

The CLI integration tests are failing for an unrelated reason (https://g.codefresh.io/build/63be2cfa65ff901d108d6511?step=Integration&tab=output&logs=terminal). I asked about this in Slack: https://lacework.slack.com/archives/C01RSNZ0C5V/p1673409107239759. Hopefully it's resolved quickly!

It would be great if we can get a review from the security team on the IAM stuff.

It would be great if we can get a review from the security team on the IAM stuff.

I agree, but I'm curious what specifically you think they'd care about? Is the thought that we want to make sure we're creating least-privilege role + instance profile?

It would be great if we can get a review from the security team on the IAM stuff.

I agree, but I'm curious what specifically you think they'd care about? Is the thought that we want to make sure we're creating least-privilege role + instance profile?

Yes, I wanted a sanity check that we're creating a role with least-privileges required and that we're not going to open up a security hole in customer environments.

One last change to make: the run at https://github.com/lacework/agent/actions/runs/3942421877/jobs/6746065889#step:6:8207 is failing because we're not describing EC2 instances that we can install on correctly for SSM.
Specifically, https://github.com/lacework/go-sdk/blob/64142fa67c8e5853da30e19ce654e07bb2580102/lwrunner/awsrunner.go#L152 will check that we have a specific SSH username for the instance so we can use SSH-based install methods (i.e. ec2ic and ec2ssh). But since SSM doesn't use SSH, we don't need to provide an SSH username.
I'll do this tomorrow!

@cirego @nschmeller at what point are we going to start writing Unit Tests for this code?
I know we talked that integration tests would be done over in the agent repo but, unit tests should still exist in this repo, specially since some of the functions have increased in complexity and small modifications could impact other features/functionalities. Also, it is easier to review.

Hi @afiune, can you help define what kind of unit tests you're looking for? Many of these functions are making direct API calls to AWS services, which makes them complicated to unittest. We could look a building a mock AWS SDK for testing and I think we should talk about the relative priority of that work. Each of these PRs have been accompanied by an integration test in the Agent repo, which we should look at moving into this repo soon. I will talk with @nschmeller about using a mock service.


Mention in README needing to run "chmod" on file to get it working

Thanks for the plugin, just missing one helpful step in the README

I don't think this is necessary. The script is already marked as executable. Unless you copy and paste to a new file this isn't an issue.
(I just realized how old this is, whoops.)


Integrate all relevant jbox2d features (joints, chains, liquid, etc)

Moved to https://github.com/AlmasB/FXGL/wiki/Issue-Feature-Question


Deprecates specialized residual norm classes

This PR adds the [[deprecate]] attribute to the specialized residual norm classes, in order to make it clearer that they should not be used.
Partially fixes #1097.

rebase!


Add avformat.Dictionary helpers for iteration and key retrieval

Allows iterating over a dictionary, like:
var dict *avformat.Dictionary

...

var entry *avformat.DictionaryEntry
for entry = dict.Next(nil); entry != nil; entry = dict.Next(entry) {
    fmt.Printf("%s: %s\n", entry.Key(), entry.Value())
}

Thanks for your pull request. However, I feel like iterating over something like that really does not feel like go.
As the main goal of this project is to make ffmpeg feel like it was written in and for go, this does not feel right.
This would be the way I would expect it to work in go:
var dict *avformat.Dictionary
// ...
for _, entry := range dict.Entries() {
    fmt.Printf("%s: %s\n", entry.Key(), entry.Value())
}

(I only added the .Entries() because I doubt that just range dict is not possible.)
It has been some time since I worked on this project but I think I solved this problem before. Maybe not for Dictionaries but to have the same C-like pattern behave in a go way using defers.
Maybe you could look into that? I will look for it myself over the weekend.

I actually found it. I made it to iterate over devices, using channels, not defers.
https://github.com/targodan/ffgopeg/blob/03a156338e8574ed1d33d4570f5d24b1c15b660a/avfilter/filter.go#L41

That's a fair goal, I only chose this iteration method because it maps to FFMPEG example code.  If I was going to make results look more like common Go structures, I'd probably just convert Dictionaries to map[string]strings, or maybe just create a method to do so.
However, Dictionaries look an awful lot like linked lists to me, though I haven't looked at the C implementation, and a pattern similar to Next() is generally how you deal with linked-lists, whatever language it is.
This does touch on an issue I was going to raise in another PR to make Rational types usable: there's a real problem with the way constants mapping to C types have been created for every package.  Because avformat.Dictionary is not avfilter.Dictionary, and this makes adding functionality really difficult for types used in multiple packages, because either you have to copy-pasta the types between every package, or (more sensible, but a huge breaking change) move types to the package that declares them in the C lib.  The latter would result in most types ending up in avutil, but it would make things vastly easier to manage.
See https://github.com/pdf/ffgopeg/commit/6c2a3b84efa3cf4f4ce7c291dadb4ebc1eef0e96 for an example of what I'm talking about.  I haven't quite finished with that code, and I was considering there whether it was worth implementing all the C function bindings, or whether just converting to/from *big.Rat was more sensible, which is vaguely similar to this scenario.

FYI, in your avfilter.Filters() you'll leak goroutines/channels if the consumer doesn't take all filters.

Thanks for that info, I'll make that an issue and tend to it when I find the time.
I would be alright with a two way solution. One that would allow for using a for each loop and one using the c-like iteration.

Regarding having multiple Dictionary versions: I fully agree that types which are the same should be merged. When I forked the original project I even experimented with it a little, but didn't find a proper solution. When using only one go representation I still kept getting conversion problems when talkin to the c structs. However, I didn't look into it too deeply as I found other things to be more importent at the time.
If you can get it to work I would be glad to add it to the project! :)

This is my first foray into cgo, but I now understand how it works.  C types cannot be shared across packages, so whilst the multi-package approach of goav seems like a good fit, it actually makes life particularly difficult.
I'm going to close this for now, and try to work out how to approach these problems.


Connection to database could not be established.

Hello,
I was trying to connect to my database on mac.
I installed the Importer/Exporter Version 5.2.0, and modified the information in the file: /3dcitydb/postgresql/ShellScripts/Unix/CONNECTION_DETAILS.sh  (export PGBIN=/Library/PostgreSQL/14/bin)
But when I tried to connect, the console shows:

[14:09:44 ERROR] Connection to database could not be established.
[14:09:44 ERROR] Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
[14:09:44 ERROR] Caused by: java.net.UnknownHostException

Do you know what is the problem? Thank you!

Thank you.
I have changed the Importer/Exporter-Database-Server to the IP address, the problem stay same.
I have successfully connected with the same setting on Windows, so I don't know what else I can do?


Mute and Unmute icon are always in loading state .

Hi all
your app is perfectly working fine for us, expect audio is not working properly every I see loading icon on audio, please resolve

Hi,
Thanks for reporting this! Currently all of the developers of this app are working on their respective thesis. We will definitely get back to it after those is done and rewrite the app using the newest version of flutter as well. This issue is most likely related to #197 so you can check that issue for further information.
We will keep this issue in mind during the rewrite!


Use uint32 for Nim (as in Rust)

C version uses a 32-bit int too (although signed), maybe need to change it as well?

Thank you. I tried both versions, they gave the same results. So I would leave the original integer types.

I changed Rust's u32's to i32's, there is no difference in the runtime speed.

I changed Rust's u32's to i32's, there is no difference in the runtime speed.

Now change it to int64 and change C to use int64_t so the benchmarks are actually fair.

With Nim I made an int32 and an int64 version. Same speed.

@jabbalaci then I don't see the point of the benchmark - usually it's to compare roughly SAME implementations in different languages (with same int sizes, etc)

They are roughly the same, yes.

I'm in agreement with @Yardanico, it should be the same for all languages.

I'm in agreement with my previous comment: "Make your own tests with 32 and 64 bit integers. If you find a difference, let me know."


add 2 new setting variables for more granular failure limit control

Closes #108.

not sure why those tests fail 😕

I fixed failing test cases now. There's still one failing though because the assertion methods seems to go bonkers. The response objects' content contains the correct messages:
def test_username_failure_limit(self):
    ...
    response = self._login(username=VALID_USERNAME)
    # response.content contains locked message, assertion fails though
    self.assertContains(response, self.LOCKED_MESSAGE)
    ...
    response = self.client.get(ADMIN_LOGIN_URL)
    # response.content contains locked HTML message, assertion fails though
    self.assertContains(response, self.LOCKED_MESSAGE)

Fixed test now. The test case was invalid - when only blocking the username we expected the admin login view to return locked out message from a GET, which it should not.

Coverage increased (+0.05%) to 91.429% when pulling 32919d39e52549d58961560b2e15fb3fd047f840 on williamboman:different-thresholds-for-ip-and-username into 50e2962fd57edfa67b0390e6690e072d3612aacd on kencochrane:master.

Coverage increased (+0.05%) to 91.429% when pulling 32919d39e52549d58961560b2e15fb3fd047f840 on williamboman:different-thresholds-for-ip-and-username into 50e2962fd57edfa67b0390e6690e072d3612aacd on kencochrane:master.

Thanks! Do you think you could make a new release?

yes, I can't do it right now, so I'll try and do it tonight.

@williamboman release is done: https://pypi.python.org/pypi/django-defender/0.5.4


Reporting input files for a job and stage in mode (local or fallback) to the Dashboard

This is required to monitor use of fallback through xrootd using dashboard and popularity service.
This is the description I received from Julia which sums it up nicely:

The set of parameters reported per each job are:
 - inputBlocks: which support a list of blocks separated by 2 colons "::"
 - Basename: which is the maximum common part amongs all the files' LFN read by the job
 - inputFiles: which is composed by: the remaining part of the LFN (so that base name plus this gives the full LFN of the file),
the success flag to determine if the file was correctly read or not, filetype which is kind of obvious,
protocol which at the moment can be Remote or Local,
lumi relative id which corresponds to the element with that id in the lumisRange parameter list;
these parameters are separated by 2 colons "::", files are separated by semicolon ";"
 - lumisRange: a run lumi information with: run, lumi ranges, relative lumi id used to link it to inputFiles; also these parameters are separated by 2 colons "::"

Then there are the very same parameters but for the parent files (if any…):
 - BasenameParent, lumisParentRange and parentFiles

Most of this information is required by Popularity. In the context of WMAgent considering monitoring of xrootd remote access , the useful attributes would be Basename and inputFiles, though if inputBlocks are correctly reported this won't harm as well.

Examples:
 inputBlocks /GenericTTbar/HC-CMSSW_5_3_1_START53_V5-v1/GEN-SIM-RECO#289639b0-146f-411b-a220-fcdff0a13cd9
 Basename:
/store/mc/HC/GenericTTbar/GEN-SIM-RECO/CMSSW_5_3_1_START53_V5-v1/0011/
inputFiles
BA2FB326-56F8-E111-94A8-003048D374CA.root::1::EDM::Remote::1;3C1C6D3B-1EF8-E111-9E6A-001D09F24024.root::1::EDM::Remote::2;
lumisRange
1::::1;1::794,1006::2;1::4112,4144::3;1::4169,4183::4;

I think we can do everything but the input blocks, jobs don't know about blocks.

I have no idea about the current fallback monitoring. Since it's from 2012, I'd say it's ok to close it.
@ericvaandering I'm sure you have a better input than me xD

No, leave this open. We and CRAB still have to report to dashboard when xrootd is used.


fix(theme): Add an X to Bordeaux

Related: https://github.com/plouc/mozaik-website/pull/7

I've renamed this theme to wine but I understand you were concerned about this one ;)

Don't mess with my city 😏


Not an issue, just a thank you

Thank you for writing Marin3r and making it open source! It's very useful but even more than that I've learned a lot from reading the code. Much appreciated!

Thank you very much @acnodal-tc , you are very kind!
Could I ask you how you are using Marin3r? That would be interesting to know, to see if the usage is similar to what we do ourselves or not. It would also be useful to take into account when adding new features :)

We're planning to use Marin3r in what I think is a "standard" way but with one wrinkle. We anticipate that our application will have a lot of churn of the upstream cluster endpoints, so we've implemented an EDS server based on go-control-plane. Marin3r serves the baseline configuration which points to our EDS server. This is more user-friendly in our use case because it means that Marin3r's EnvoyConfigRevisions are more meaningful. If we didn't do this then endpoint changes would spam the EnvoyConfigRevision list and make it difficult to find important configuration changes, i.e., changes made by people, not endpoint add/delete.
Marin3r is feature-complete for what we're doing. I think our only "ask" would be to make it easier to see the feedback from Envoy when it rejects a configuration. It's there in the EnvoyConfigRevisions but it's awkward to find.


std.uni: roll back module-scope selective import that slipped through

Ping @DmitryOlshansky, this slipped through in #4365.

LGTM

Auto-merge toggled on


Automated cherry pick of #9381

Cherry pick of #9381 on cloud.
/cc  @AshishDhama
NONE

/update-branch


Coloring based on values

Hi
I am aware of colorAxis but it is not what I am looking for.
I want to color different ranges of values different colors to signify different things.
Currently the colorAxis just takes all your values and relative to that and generates colors relative to your other values. I want either to define the color for set ranges of values or have it generate a color based on the current value relative to the maximum possible value.
Ex: Green for values 0 and Red for 90
Thank you

You can manually set the min and max for a colorAxis:
var colorAxis = chart.addColorAxis("MyDimension", ["Green", "Red"]);
colorAxis.overrideMin = 0;
colorAxis.overrideMax = 90;

Is that what you are after?

Hi John
I already tried that. Though it is not exactly what I am after, it would still be nice if it worked properly. I assumed it would try to divide the  overrideMax by the number of colors present in the color array and set specific colors for those intervals. However, this is not the behaviour that I am seeing. If i only have 2 points, even if the point is say 20 and the overridemax is 81, this point is at the other end of the extremity of colors. I am using more than just 2 colors so it is not related to a limited colour array.
Thanks


pylint: Super of 'HighPerformanceImage' has no 'bind' member (no-member)

Introduced in https://github.com/realitix/vulk/commit/a75390fc0179873796109571941a942862d21e78.

Fixed
https://github.com/realitix/vulk/blob/master/vulk/vulkanobject.py#L1017


Enhancement in website

#34 #35 #36 Issues are fixed and ready to be merged.

Hey, thanks for the PR!! It looks great.
Also, I am going to send you an invite to join the ScanAPI org on GitHub. We invite everyone that has contributed with a merged PR in any of our repos. Here you can check our Community Continuity Guidelines  so you can understand better how it works.
And once again, thank you very much!! 🙇♀

It has been my pleasure as it was one of my initial Open Source Contributions and I want to know how to join ScanAPI org.


fix setup.py, test voxel generation (for potential future collision detection)

@googlebot I fixed it.

@googlebot I fixed it.


Add Layer to Stage

Hello, I have problem with layer, i would like to create layer management, when user click button the layer is added to Stage, but this does not work, when i create file in createsandbox this work, but in my code no, i don't have idea why.
code is simple :
let layer = new Konva.Layer();
this.stage.getStage().add(layer);
and this does not work.

I fixed my issue.

Can you please share the fix? I am facing same issue and could not find anything in the documentation for react.

I don't remember but I think I forgot to update stage, try this.stage.getStage().draw()


Add comments on version compatbility to the maintainers guide

@nikeethr, @mareecarroll  and @nicholasloveday  I have merged these notes into the maintainers guide, in response to issue #675. I think these notes are good and also got @Steph-Chong to do a review, but please feel free raise a new PR with any further changes you would like to see.


hi,i have some question about code

The module is here https://github.com/anita-hu/MSAF/blob/master/MSAF.py


Add collaborators to this repo

Comment below to be added as a collaborator
We will all be using this repository today. Even though it's public right now, you will not be able to make changes until you're given the correct permissions. We've automated this process via the GitHub API. Once you comment, we will add you as a collaborator.
You'll start to receive a lot of emails. (❗) You can slow these down immediately by clicking the Unwatch button at the top of the page and selecting either the Participating and @mentions or Ignore option.

[ ] Rick is cool!

🐳

Hello people

:)

🎧

Hi

Hello

Hello!

👍🏽

👍

:tangerine:

¡Buenos días!

Got it

:-) Here

Hi

New account


Zero Downtime Projection Rebuilds

This is a big request, and there's plenty to talk about.
Some thoughts:

I think we're gonna have to introduce some sort of projection versioning and tracking projection versions in the database
Needs to be triggered as part of the normal deployment. Like maybe Marten on startup can determine there's a new version of a projection, and trigger a rebuild if it hasn't already been rebuilt.
If we can specify that the Marten user has rights to create new schema objects, we could rebuild the projection in parallel with the current app in a different schema, then copy the data over to the main schema when the rebuilding projection gets close.
Probably dependent upon some of the fancier leader election work in the async daemon
For aggregate projections, maybe this could be sped up by building aggregate by aggregate to minimize the number of database reads and writes compared to just reading the events in the order they come in.
For aggregations across streams, maybe you try to label events upfront as to what aggregate they belong to, then rebuild by aggregation

I just ran into this existing issue while pondering what happens when you startup an application while projections aren't fully rebuilt yet. For inline projects it would be great if Marten could somehow check during startup that it has to either rebuild or not rebuild a projection and could delay startup until the rebuild has happened. Manually tracking which projections require a rebuild is sometimes difficult. The current solution I have is to have a versioning table within the database and manually apply versioning to my projections.

I'm declaring success for now


python3Packages.notion-client: init at 2.0.0

Description of changes
I would like to be able to use the notion-client python library to interact with Notion from within nixpkgs!
Things done

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[X] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[X] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 208390 run on x86_64-linux 1

2 packages built:

python310Packages.notion-client
python39Packages.notion-client


Update the links for rocminfo and rocm-bandwidth-test

These should be Intersphinx links https://rocm.docs.amd.com/projects/rocm-docs-core/en/latest/developer_guide/projects_yaml.html

https://github.com/ROCm/rocm-docs-core/commit/f8c96964cdc5c95bee53be372d369034b975acbd


New lines

I get \n instead of newlines. How do I combat this?

Replace \n with  works fine for me.


Is there a way to use consul keygen & encrypt?

Hi, Brian;
I love this role and I've used it quite a bit both for learning and in production. I'm in the process of switching over to TLS but for the short term is there a way to use the encrypt value in the config?
My current config looks like this:
{
    "bootstrap": true,
    "server": true,
    "datacenter": "stuff",
    "data_dir": "/var/consul",
    "encrypt": "QyYc0lVJXcNl3idBPREjIYww==",
    "log_level": "INFO",
    "statsd_addr": "<IP_ADDRESS>:8125",
    "enable_syslog": true,
    "start_join": ["consul2.server.prod", "consul3.server.prod"]
}

Thanks in advance!

Hi Jason,
Thanks for the kind words!
I am not sure I understand your request here; it sounds like you might be conflating the difference between the RPC API encryption (the encrypt configuration option) and TLS, which is only used for the HTTP API. These are separate forms of encryption and both must be used to provide complete encryption of all network traffic.
The role already supports TLS encryption of the HTTP API in a separate configuration file as it is a bit easier to maintain features as separate files. Consul then reads them all in from the configuration directory and applies them to the agent configuration at runtime.
If you could clarify a bit about what you need to achieve, I'd be happy to help.
Cheers and Happy New Year!

Thanks for the reply, Brian.
You're absolutely right. TLS is a much better option and certainly the way
to go. I've updated my ansible role to generate the cert if it's not found
and drop it in place .. Or use an existing if it's found.
On Sat, Dec 31, 2016 at 11:43 AM, Brian Shumate<EMAIL_ADDRESS>wrote:

Hi Jason,
Thanks for the kind words!
I am not sure I understand your request here; it sounds like you might be
conflating the difference between the RPC API encryption (the encrypt
configuration option) and TLS, which is only used for the HTTP API. These
are separate forms of encryption and both must be used to provide complete
encryption of all network traffic.
The role already supports TLS encryption of the HTTP API in a separate
configuration file as it is a bit easier to maintain features as separate
files. Consul then reads them all in from the configuration directory and
applies them to the agent configuration at runtime.
If you could clarify a bit about what you need to achieve, I'd be happy to
help.
Cheers and Happy New Year!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/brianshumate/ansible-consul/issues/23#issuecomment-269872796,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJryY99_aMGPeZ61J9cY9MkbMSsuE8KQks5rNoY9gaJpZM4LWYBu
.

Hey Jason,
Sounds good. I am going to go ahead and close this issue now.


Transpose analysis

Coverage increased (+0.07%) to 82.61% when pulling 1e2d975d00899e382a3a3493b4a295763454ab1a on agayev:transpose-analysis into 3020a740e6499e50fac92c6396895620629f4e75 on IntelLabs:master.


Fixed Kubernetes runtime bug

Motivation
/ are not allowed in labels.
Modifications
Describe the modifications you've done.
Result
After your change, what will change.

@cckellogg

run integration tests

#3122


Extend to Linked Tables

In the current version, the generator knows how to deal with isolated tables.
The goal of the new iteration is to support linked tables like this sample:
Sample Models

Product Model

ID (numeric, autoincrement)
name (string)
price (numeric)
information (string)

Sales Model

ID (numeric, autoincrement)
Product (1-1 relation with product)  # <-- THIS IS DIFFERENT
quantity (numeric)
fees (numeric)
purchase_date (UNIX timestamp)
refunded (boolean)
comments (string)

Currently, this is the flow:

Models need to exist & migrated on DB
User edits the configuration and adds the models

see the syntax on README

Run the generator via CLI

python manage.py generate-api

Use the code in the APP

Ty!

Hello @app-generator.
Could you give me a detailed sample of what exactly the post, put, and get should be like for the example above?

Hello @masoom80
The easy way is to install the library and generate the API for Product Model
All the flow is documented on the README.
Once this phase is done, and you're accommodated with the concept, try to generate the code for a Sales model that has a link to Products.
In the current version, the API generator works for isolated tables.
The evolution needs to handle the case when the tables are linked.
Let me know if you have further Q.
Ty!

Hi again  @app-generator.
I worked it out and now am familiar with the current flow.
I don't know what the problem is.
Should the new one show the full products fields(currently it only shows their id.)?

Hello @masoom80
I'm testing the latest features& created a test project where we will experiment all cases.
Please wait.

validated. closing.


Numpy

been having issues all day.
previous resolved issue related to JSON resolved now doing this.

for me it was solved by going to the DEV branch, and do a complete runtime, and then go back to the MAIN branch.

Not sure how to do that. Am using a Colgan notebook

Colab

go to: https://github.com/WASasquatch/easydiffusion

and then

and then click on

and then click op open colab

When you say do a complete runtime? That means run an iteration and then simply switch back to main and run per usual?

more info if helpful. Still getting numpy error.
Perhaps missing a step or incorrect setting during your fix?

I can't see the full stracktrace, so I don't know where this is coming from. I haven't had these issues on my runs, so wondering if there is certain features you are using?

Inpainting mode. No bells and whistles (e.g upscaling, chromatic aberration, 512x512, etc…)

How do I send full stack trace?

How do I send full stack trace?

You just click the word that says like "5 Frames" with the up and down arrows icon, and it will open the full stack trace.,
Inpainting should be fixed. They made changes that broke it for awhile.


text-aligned right on developer page past button

Looks great! Thanks for the first pr! Ship it when green


Add: Software engineering job description

Delta from the initial contribution: https://github.com/baloise/ccc/compare/be12d1dae0ac8a749296a351b84cd731d01e7f43..6904c2eec1555c0a0d9ed47ec9ca391ef09a8e13

Delta from initial contribution
https://github.com/baloise/ccc/compare/be12d1dae0ac8a749296a351b84cd731d01e7f43..ce28653?short_path=8f28ce2#diff-8f28ce22a41ae100c607c87d5b1f5e33


Feat/jenkins int

Fixes #
Proposed Changes

Build now

build now

build now

build now

build now

Can one of the admins verify this patch?

build now

No test results found.

No test results found.

No test results found.

build now

No test results found.

No test results found.

No test results found.

build now

No test results found.

No test results found.

build now


setPrecision(pricePrecision, volumePrecision) not working on Y-Axis labels

I have set setPrecision(6, 2) and the precisions working on low, high, last price, and also on the crosshair price or volume count. But not working on Y-axis labels.

How to apply precision on Y-Axis labels (red marked on image)?

The current y-axis accuracy will not be affected by the settings. The problem in the screenshot should be the reason for the consistent data. You can try to upgrade to v5.3.0. hope this helps.

"The current y-axis accuracy will not be affected by the settings." - but I think there should be a function that provides us the facility to round y-axis labels.
I think setPrecision should affect the y-axis labels too.
BTW thanks for this great lib :)

Version 5.5.0 has been released and this feature is already supported.


Convert Unix paths to Windows format under Cygwin

I've encountered the same problem as raised in issue #78, Unix style paths being passed to non-Cygwin binaries such as CScript.exe or node.js which then fail because of this.
This is a tidied up version of the code that they suggested which detects when running under a Cygwin environment and then uses the cygpath binary to convert the Unix style path to the temporary script file to its Windows equivalent.
If you would prefer the path conversion to occur in a different place in the code I'm very happy to adjust as required.

Superseded by #155


https://github.com/MayankSingh1993/Java-Code-Examples/issues

ℹ Repository information
https://github.com/MayankSingh1993/Java-Code-Examples/issues
The repository has:

[x] At least three issues with the good first issue label.
[ ] At least 10 contributors.
[x] Detailed setup instructions for the project.
[x] CONTRIBUTING.md
[x] Actively maintained.

Hey @MayankSingh1993  ! I tried to contribute to this repo as well but I haven't seen any activity in the last few months. I decided to fork it to keep it alive. Please see https://github.com/lucavallin/gfi and feel free to open a pull request there. At this time I am setting up the hosting and cleaning up the code. If you're up for it, I could use some help to convert the app from Nuxt.js & Python to Next.js & Typescript.


SegmentLoadDropHandler: Fix deadlock when segments have errors loading on startup.

The "lock" object was used to synchronize start/stop as well as synchronize removals
from segmentsToDelete (when a segment is done dropping). This could cause a deadlock
if a segment-load throws an exception during loadLocalCache. loadLocalCache is run
by start() while it holds the lock, but then it spawns loading threads, and those
threads will try to acquire the same lock if they want to drop a corrupt segment.
I don't see any reason for these two locks to be the same lock, so I split them.

Does it make sense to backport to 0.12.1 even though this bug existed even before 0.12.0?

I think probably not, since it's not a regression and we already started the RC train. Although if we end up doing an rc2 for some other reason, maybe we could include this one too, since why not.

👍

Since we will create another rc for 0.12.1, I think this is also worthwhile to backport.

@jihoonson sounds good to me, it's in #5755.

@gianm thanks!


feature: pass arguments to contract init

Closes #789

LogicManager passes requests on to the VM Context and engine.init and engine.invoke have an optional parameter request which contains the request object.
Changes

LogicManager.getInvokeCall passes context.request on (9849dd13fd7ad8e391e3531a1698894f2fc16aaa)
enine.invoke adds request to context (b92240b005cd042cc80bf43dd454da221a942ef5)

Flags

I tested this with empty init requests, but maybe there was a reason for not passing on context.request?

Related Issues

Issue #789
Issue https://github.com/accordproject/cicero/issues/604

Don't think there is a bug here really. For invoke the parameters should be an object with the parameters in the Ergo clause i.e., { param1: value1, ... } but not a single request. This allows for calls to clause without parameters or with more than one parameter.

I don't think this is right, closing this for now. See details in the issue.


fix: fix project start date

Project TiDB:
The first commit time: 2015-09-06
Project TiKV:
The first commit time: 2016-01-07
Open source time: 2019-12-26 (Not completely sure)
Project Chaos Mesh:
The first commit time: September 4, 2019
Open source time: December 26, 2019 (Not completely sure)
The first open event occurred: December 31, 2019

/merge


Feat(eos_designs): VLAN Aware Bundle if evpn_vlan_bundle defined even if common evpn_vlan_aware_bundles is false

Change Summary
If for a l2vlan or svi in network_services a "evpn_vlan_bundle" is defined the common setting of "evpn_vlan_aware_bundle" is ignored. Meaning even if evpn_vlan_aware_bundle:false a vlan aware bundle will be used for a l2vlan/svi when the "evpn_vlan_bundle" is defined for it.
Related Issue(s)
Fixes #3355
Component(s) name
arista.avd.eos_designs
Proposed changes
check if evpn_vlan_bundle is defined for l2vlan or svi and in case that is, configure it as vlan aware bundle else depend on the common evpn_vlan_aware_bundle setting.
How to test
Moleclue test is provided
evpn_vlan_aware_bundles: false
...
tenants:
  - name: BLS
    vlan_aware_bundle_number_base: 300
    mac_vrf_vni_base: 20000
    l2vlans:
      - id: 10
        name: storage_prod
        tags: ['storageProd']
      - id: 90
        name: vlan90
        tags: ['ipmi']
        evpn_vlan_bundle: bundle3
    vrfs:
      - name: SIT_VRF
        vrf_vni: 789654
        svis:
          - id: 1008
            name: SVI_1
            enabled: true
            evpn_vlan_bundle: bundle3
            tags: ['sit']

evpn_vlan_bundles:
  - name: bundle3
    id: 3
    rt_override: 333
    rd_override: <IP_ADDRESS>:333

Checklist
User Checklist

N/A

Repository Checklist

[x] My code has been rebased from devel before I start
[x] I have read the CONTRIBUTING document.
[x] My change requires a change to the documentation and documentation have been updated accordingly.
[x] I have updated molecule CI testing accordingly. (check the box if not applicable)

Please also update the doc for the root evpn bundle key, since it's behavior is now to force evpn vlan bundle for all VLANs. And maybe hint that if they only wish to enable bundles for some vlans they can be set with the new(er) key.


Intermittent NPE in Jersey BasicRequestTest

Happened on PR against 2.3.3 branch (#3373).
java.lang.NullPointerException
	at io.helidon.common.reactive.BufferedEmittingPublisher$1.request(BufferedEmittingPublisher.java:96)
	at io.helidon.media.common.DataChunkInputStream.read(DataChunkInputStream.java:164)
	at io.helidon.media.common.DataChunkInputStream.read(DataChunkInputStream.java:109)
	at java.base/java.io.FilterInputStream.read(FilterInputStream.java:83)
	at org.glassfish.jersey.message.internal.EntityInputStream.read(EntityInputStream.java:69)
	at io.helidon.jersey.connector.BasicRequestTest.testInputStreamEntity(BasicRequestTest.java:262)

No further information found.

Caused by RC between request
https://github.com/oracle/helidon/blob/bdf53d6d974b1d8bcecea36ce2f5c789a55788df/common/reactive/src/main/java/io/helidon/common/reactive/BufferedEmittingPublisher.java#L95-L97
and terminal clean up
https://github.com/oracle/helidon/blob/bdf53d6d974b1d8bcecea36ce2f5c789a55788df/common/reactive/src/main/java/io/helidon/common/reactive/BufferedEmittingPublisher.java#L470-L473


Update community documentation

This allows github to auto detect the license for increased visability.

@Sean-Nishi there was an error in a link, can you re-review when you get the chance?


Working prefs components

apply side components for the admin functionality of working prefs changes.

@tomlovesgithub we need to update these with latest code and then ensure they are used in admin and apply (if we still think this is a good idea).


Income desync issue

Hi,
Firstly, thanks for all the effort getting this mod to how it is. Very well done.
I tested this with a friend last night and everything works as expected for 15 minutes then my friend suddenly reports 0 income. Everything else continues to work fine.
Any thoughts on what could be the issue.
Many thanks.

To add to this, when another client takes a loan, the server doesn't take it as well, but money is still added. The incomes are synced, until the point where the other client has interest applied to their weekly income, thus leading to different incomes, and the server never gets interest, with free money. The server player then reloads the save, and it's as if money came from nowhere for free without any problems, but a single reload of the game.


Lab 05: Creating a VM by CLI

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az acr build
Errors:
The command failed with an unexpected error. Here is the traceback:
'NoneType' object is not callable
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/build.py", line 109, in acr_build
    variant=platform_variant
TypeError: 'NoneType' object is not callable

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az acr build --registry {} --image {} {}

Expected Behavior
Environment Summary
Linux-5.4.0-1051-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.26.0

Extensions:
ai-examples 0.2.5
ssh 0.1.5

Additional Context

route to service team

This seems related to #18841 . Can you try using Version 2.26.1 for the cli?:
https://docs.microsoft.com/en-us/cli/azure/release-notes-azure-cli?tabs=azure-cli#july-14-2021

Thanks for reporting it and sorry for the inconvenience.
2.26.1 has been released to address the issue.
https://docs.microsoft.com/en-us/cli/azure/release-notes-azure-cli?tabs=azure-cli


DO NOT MERGE Pulumi code to deploy a tezos chain on aws

This is what I used to deploy https://spruce.tqhosted.com on AWS.
It requires more work. We should probably set up some CI autodeploy
to keep the account organized.
I am not even sure if this code belongs to tezos-k8s or we should
set up a different repo.
To use:
mkchain pulumi
cd pulumi
pulumi up

There are 2 manual steps related to the https endpoint that require
further automation.

replaced by #118


Fix empty tags in the search output

Hi!
In case of using search field, the navbar can contain empty tags which can annoy if we have many tags. In order to avoid a long list of empty tags in the navbar, empty tags can be skipped during the render if they don't contain any path.

thank you for the PR @poadoc , the feature addition have greatly improved our filter UX


Change model name in request/response json

My  external models are suffixed with Dto, for example PersonDto.
Is it possible to make Swagger just render "Person" for all references to the PersonDto type?  It would make my documentation a lot cleaner for external parties.
Thanks.

Have you looked at the SchemaId config option?
https://github.com/domaindrivendev/Swashbuckle#schemaid
Something along the following lines should do it:
c.SchemaId(t => t.Name.Replace("Dto", ""));

Great!  That works for the right hand side where the model | model schema are listed, but how do I make this change propagate to the left hand side where the parameters are listed also?

I'm guessing I can get that to work with an OperationFilter.

I was able to get this to work with an OperationFilter.  Please close this issue if this is the intended approach.


Show verification modal instead of redirecting to concierge

Details
Instead of redirecting directly to concierge after adding the 3 validation amounts, if the domain is not auto-provisioned, let's show a new validation modal.
Fixed Issues

$ https://github.com/Expensify/Expensify/issues/171381
Tests

Create a new account on a private domain + validate it

Create a new chat with a random user and make sure you are navigated to that chat

Create a workspace on this account via Expensify.cash green floating button (create menu)

Navigate to the workspace page and tap Get Started

Verify the Add Bank Account modal appears and follow the instructions here to create a PENDING bank account.

Keep submitting information until you get to the Validate step.

Enter the three amounts to validate the account!

Verify that you now see a new modal + copy with a link to your chat with Concierge.

Tap this link and verify you are brought to your chat with Concierge

Navigate back to your workspace page and verify you now see Finish Setup for the button.

Tap this button and verify you are brought back to the Validate step.

QA Steps
Internal -Same steps as above
Tested On

[x] Web
[x] Mobile Web
[x] Desktop
[x] iOS
[x] Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

I have read the CLA Document and I hereby sign the CLA

@thienlnam can you take a look at this?

@thienlnam Could you review this today pls since it's a daily and it's blocking n6? Do you want me to add someone else for the review?

Oh I just saw @kevinksullivan's comment, sorry for being too intense hahaha

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging         in version: 1.0.82-8🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@pecanoro @thienlnam Hello! Not sure if we're able to test this on our side. Our testing domains already have the Expensify card so the option to "Finish setup" is not available for us

We could de-provision the Expensify Card from testing domains you use @isagoico. Then you would be able to add it again. What do you think?

mmm I think that could work, Can you do it for the Applause.expensifail domain? We don't use that domain for expensify card tests.

Can do! What specific Applause.expensifail account should I de-provision @isagoico ? Thanks!

We also tested this on staging and it worked like charm. Thanks for the quick turnaround @pecanoro !

So I think we can check this one off @isagoico

Ok great, thanks @kevinksullivan - Yes lets tick this off!

🚀 Deployed to production by @francoisl in version: 1.0.83-1 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
failure ❌

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Add ignore_missing_files Hive config

Spark provides support for the data source configuration
spark.sql.files.ignoreMissingFiles, to ignore missing files while reading data
from files.
https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html#ignore-missing-files
Introduce Hive config ignore_missing_files to match this behavior.

@rui-mo and @mbasmanova , could you help review this PR?
Thanks.

@zhli1142015 This change is breaking Prestissimo tests.
[ RUN      ] BroadcastTest.invalidBroadcastFilePath
fbcode/github/presto-trunk/presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp:339: Failure
Value of: e.message().find("No such file or directory") != std::string::npos
  Actual: false
Expected: true
Expected error message to contain 'No such file or directory', but received 'file /tmp/this-should-not-exist/velox--missing-broadcast-file.bin does not exist.'.

Maybe change
VELOX_FILE_NOT_FOUND_ERROR("file {} does not exist.", path);

to
VELOX_FILE_NOT_FOUND_ERROR("No such file or directory: {}", path);

Updated, thanks.


add dialogue for new api key

Before the button is clicked (same as before):

\
New dialogue after the button is clicked. First button is now disabled. "Yes" kicks off the new key/logout, "No" returns to previous screen.

Note, I (purposely) didn't put a big effort into the wording or styling because I want to get Christine's input first. (Is she on GitHub?)

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

I would add some spacing between elements but not a deal-breaker!

@tadler Are there defined patterns in the existing CSS? Or should I just make up some classes?

Styled:


Inappropriate migration file 'people' created instead of 'person'

Laravel Version: 5.3.23
PHP Version: 5.6.26

Description:
While I tried to make a new model Person and let laravel to produce its migration file for me it produced a file 2016_11_21_190948_create_people_table.php for table people which is incompatible with my new model Person.
Steps To Reproduce:
Run the following command from within a fresh installed Laravel project directory: php artisan make:model Person -m then look at the file database/migrations/#_#_#_#_create_people_table.php.

Yep Laravel pluralizes the table and leaves your model on singular thats the default behavior and your model should be working as expected.

@fernandobandeira Thank you I got it and I will close it.

What about the foreign key?
"person_id" or "people_id"?

Thank you but the problem was solved, and it was caused by as @fernandobandeira replied.


[FIX] Fix executable search

Building ontop of the knowledge gained in PR #181 and #182 and with help of the source code of bash, this fixes all the exec_path search behaviors, error messages and exit codes.

If the exit code is 126 (CMD_EXEC_FAILED), it means execve() failed.
After that, the error message that gets printed depends on the reason for the failure and depends on errno.
If the exit code is 127 (CMD_NOT_FOUND), the process exited before execve().
This happens if no valid executable file was found. An appropriate error message gets printed before exiting.

Resolves #156
Resolves #132
Resolves #128
Resolves #98
Resolves #110

We have to test these test cases of the tester that apparently got worse:

[ ] 1:

mkdir tmp_path_test1 tmp_path_test2
printf '#include <unistd.h>\nint main(){write(1, \"1\\n\", 2);}' > tmp_path_test1/test1.c
gcc tmp_path_test1/test1.c -o tmp_path_test1/a.out
printf '#include <unistd.h>\nint main(){write(1, \"2\\n\", 2);}' > tmp_path_test2/test2.c
gcc tmp_path_test2/test2.c -o tmp_path_test2/a.out
export PATH=tmp_path_test1:tmp_path_test2
a.out
export PATH=tmp_path_test2:tmp_path_test1
a.out
/bin/rm -rf tmp_path_test1 tmp_path_test2

[ ] 2:

ls | wc -l | xargs echo

It is so weird... No execve fails, and the final_cmd_tables from the main branch and this PR branch look exactly the same.


Where is the fine-tuned model output?

I’m new to using AutoTrain on Hugging Face and I encountered an issue during my first attempt at fine-tuning a model. I have a free account, because I want to see whether I can get something to work before I start paying for training. Here’s a summary of what I did and the problem I’m facing:
Training Configuration:
I trained using Mistral-7B-Instruct-v0.2 and also openai-community/gpt2.
Dataset: I uploaded a tiny JSONL file (24 records) with a single “text” field for training.
Training Parameters: I set the training to run for one epoch.
Training Process:
The training ran for a couple of seconds.
I received a message that the space was paused, which I assumed meant the training had completed.
Issue:
After the training supposedly completed, I can’t find any output files or trained models.
I checked all available tabs and sections in the AutoTrain interface but didn’t see anything labeled “Models,” “Artifacts,” “Results,” or similar.
I reviewed the logs but didn’t find any clear indications of where the output is stored.
I checked my Hugging Face profile under the “Models” heading, but it says “None yet.”
Questions:
Where should I look in the AutoTrain interface to find the trained model and output files?
Are there any additional steps I need to take to ensure the trained model is saved and accessible?
With a free account, I don’t have any GPUs assigned. But is that a problem with only 24 short training samples and one epoch?
Any guidance or tips would be greatly appreciated!

paused space can also mean that the training failed.
if training finished, you will find the model files in your hf namespace. if it failed, you can check logs of space to know why.

It seems the logs go away when the space pauses.
Is it possible that the problem is that I don't have persistent storage with my free account?

no. logs do remain when space pauses if you didnt restart. could you share space link and i can check internally?

Thank you very much.
https://huggingface.co/spaces/RonPisaturo/autotrain-advanced

thanks. i was able to identify the issue and fix it. it should work as expected now. please note: you seem to be using cpu for a large model, it might not alwways work. please factory rebuild your autotrain space and make sure you are on version: 0.7.129+

Thank you so much!  was able to fine-tune a small Microsoft model and gpt2 using T4 small. Now I will try to fine-tune Mistral-7B-Instruct-v0.3 using T4 medium.
Thank you again!


More informative Gmsh error message [gmsh-err-dev]

This PR is intended to help users track down a common issue with Gmsh meshes.  This was suggested by @benzwick in issue #2045.

PR
Author
Editor
Reviewers
Assignment
Approval
Merge

#2048
@mlstowell
@tzanio
@tzanio + @bslazarov
02/11/21
⌛due 02/25/21
⌛due 03/04/21

Merged in next for testing...


Initrd vs predictable interface names

Describe the bug
Initrd networking does not use predictable interface names, but does enable DHCP on the interfaces that are specified by the normal (networking.) configuration.
To Reproduce
Steps to reproduce the behavior:

Enable boot.initrd.network
Enable predictable interface names (default)
Enable useDHCP on one interface
Boot to initrd

Expected behavior
DHCP should be used on all interfaces that have DHCP enabled.
Screenshots

Additional context
Add any other context about the problem here.
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
I can't because I can not unlock the root drive without networking ;)
But here's the info from another computer running the same channel and kernel:

system: "x86_64-linux"
host os: Linux 5.4.0, NixOS, 20.03.20191125.89b2c0b (Markhor)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.4pre20191022_9cac895
channels(root): "nixos-20.03pre202991.57cf4eb83bc"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- boot.initrd.network

CC @edolstra

I am using the following workaround now: https://discourse.nixos.org/t/disk-encryption-on-nixos-servers-how-when-to-unlock/5030/8?u=petabyteboy
However this should be the default behaviour.


refactor: change namespace in modified json11.

The LightGBM library includes code from the json11 library (https://github.com/dropbox/json11), with some minor changes for internal use.
When attempting to integrate the LightGBM library into another project that already relies on the unmodified json11 library, it doesn't compile due to multiple definition of methods.
Using a single version of json11 for everything doesn't work because some method signatures were changed in https://github.com/microsoft/LightGBM/pull/2975/commits/346db12e706a46541c2b079c158b72cde95f08ac.
This problem can be easily resolved by changing the namespace, and since this project is the one using a modified version of json11, I think that the change should be implemented here.

@microsoft-github-policy-service agree


refactor: change pathTrie per-file to per-directory

Now the pathTrie aligns with the directory tree, not full fs tree which includes files. Aligning with the directory tree makes more sense to me, and I think will make it simpler to do things like load BUILDs concurrently while doing the fs-traversal (and persisting that in the pathTrie) etc.
What type of PR is this?

Other

What package or component does this PR mostly affect?

all

What does this PR do? Why is it needed?
Performance + simplifying things for future changes.

Windows is broken? 😒

Fixed it on master and rebased


Implement cacheAsBitmap

Although cacheAsBitmap is currently, this would be valuable to trigger rendering to a framebuffer. This enables post-process shaders and other additional features

https://trello.com/c/JBPb6fyr/24-add-further-cacheasbitmap-support-on-all-renderers


[Bug]: add autocomplete="off" (and autofocus) to "Search for name, fqdn…" search input in Projects

Error Message and Logs
Search field gets auto-filled with email in Chrome.
Once you try to to click on one of your apps, search gets triggered and all your apps dissapear (since none of them match an auto-filled value). This requires a user to clear the input field every time they use Coolify

Once you click on any project (without clearing the Search field), search gets triggered and all projects disappear:

Steps to Reproduce

Go to a project
For some users your search input will get autofiled with e.g. email
Once you try and click on a project, the search gets triggered and all projects dissapear

Example Repository URL
No response
Coolify Version
v4.0.0-beta.345
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu
Additional Information
No response

It has been fixed in the latest version. Can you please upgrade and test it again?

It has been fixed in the latest version. Can you please upgrade and test it again?

Just updated to  v4.0.0-beta.347 - same issue :/

spent some time googling… Chrome disregards autocomplete="off"
best thread i found on this: https://stackoverflow.com/questions/15738259/disabling-chrome-autofill
some suggest autocomplete="false" instead of autocomplete="off"
or to autocomplete="new-password"
ps.
thanks for looking into this! seems like a small bug - but it's super annoying :(

i think the issue is just a lack of a valid name attribute, since it wouldn't get autofilled with email if it was named something else entirely, same when deleting

please fix this, evreytime i click any card/project it treats as some sort of submit and adds email to search bar - which means i have to click on a project, clear email go again and click on project @andrasbacsai - this is a massive issue

it's really bad. my current workaround is to run Tampermonkey chrome plugin with a script that removes the search field altogeather
(function() {
    'use strict';
    document.querySelectorAll('input[name="null"]').forEach(input => input.remove());

    // Your code here...
})();

imho, if the Resources page does not have pagination, it's best to remove the search field altogether. People know how to use Command+F to search on page…

I released a fix that set autocomplete to off, and removes autofocus. Can you please check with v349?

Hi @andrasbacsai
I tested with v4.0.0-beta.349 and chrome Version 128.0.6613.137 (Official Build) (64-bit) and the issue is still there, with the new release the field gets prefilled but doesnt filter until you click anywhere on the page which is super confusing.
It is sad how the chrome decided to not respect autocomplete=off.
Based on my previous experience if you have 1 field with type="password" in page then it will treat some of the fields as username field by force. The easiest way to fix it is to wrap the password fields by <form> element.
From what I see this is what causing the bug

wrap this div and any other div with something like <form onsubmit="return false"> and it could be fixed

Hi @andrasbacsai
I tested with v4.0.0-beta.349 and chrome Version 128.0.6613.137 (Official Build) (64-bit) and the issue is still there, with the new release the field gets prefilled but doesnt filter until you click anywhere on the page which is super confusing.
It is sad how the chrome decided to not respect autocomplete=off.
Based on my previous experience if you have 1 field with type="password" in page then it will treat some of the fields as username field by force. The easiest way to fix it is to wrap the password fields by <form> element.
From what I see this is what causing the bug

wrap this div and any other div with something like <form onsubmit="return false"> and it could be fixed

Thanks for the investigation. I will try to fix it (again and again, until it will work).
The one thing I do not understand is that why it came up now. I did not change anything that is related to this. 🤔

the enter password to delete project was added

Inputs should always be wrapped in a <form>, so you can use the onsubmit handler when the user presses the ENTER key.

Hi @andrasbacsai
I tested with v4.0.0-beta.349 and chrome Version 128.0.6613.137 (Official Build) (64-bit) and the issue is still there, with the new release the field gets prefilled but doesnt filter until you click anywhere on the page which is super confusing.
It is sad how the chrome decided to not respect autocomplete=off.
Based on my previous experience if you have 1 field with type="password" in page then it will treat some of the fields as username field by force. The easiest way to fix it is to wrap the password fields by <form> element.
From what I see this is what causing the bug
wrap this div and any other div with something like <form onsubmit="return false"> and it could be fixed

This breaks a lot of things. :(
So I am still open for suggestions.

Found the issue. It is in this file, if it is not there, everything works.

Yes, it's the password input at https://github.com/coollabsio/coolify/blob/main/resources/views/components/modal-confirmation.blade.php#L275
That makes Chrome take any preceding input as the username field.
Wrapping either of those fields (best the password field) into its own <form>, prevents chrome from autofilling both.

This one is causing it (wtf):

just remove that step :D

Yes, it's the password input at https://github.com/coollabsio/coolify/blob/main/resources/views/components/modal-confirmation.blade.php#L275
That makes Chrome take any preceding input as the username field.
Wrapping either of those fields (best the password field) into its own <form>, prevents chrome from autofilling both.

Yes, wrapping it in <form action="return false"> fixes the issue. wtf #2
I will start making games with Godot. okthxbye

✅ nice! it worked! can confirm ✅


Fix typo

Hi. I am an automated pull request bot named Curry. There are commits in this pull request whose authors are not yet authorized to contribute to Chef Software, Inc. projects or are using a non-GitHub verified email address. To become authorized to contribute, you will need to sign the Contributor License Agreement (CLA) as an individual or on behalf of your company. You can read more on Chef's blog.
GitHub Users Who Are Not Authorized To Contribute
The following GitHub users do not appear to have signed a CLA:

@whitekid

Please sign the CLA here.

Hi. Your friendly Curry bot here. Just letting you know that all commit authors have become authorized to contribute. I have added the "Signed CLA" label to this issue so it can easily be found in the future.

ARGH just lost +30 minutes for this fuckin' wrong README, please MERGE ASAP @someara @juliandunn @jtimberman
I see in the changelog that the class rename was reverted, but not the README.
warning: toplevel constant OpenSSL referenced by Chef::OpenSSL

================================================================================
Recipe Compile Error in /tmp/kitchen/cache/cookbooks/zabbix/recipes/default.rb
================================================================================

NameError
uninitialized constant OpenSSL::Password

Done!

Thanks! :beers:


Not balanced

This game is still seriously unbalanced so it will need some fixing

Make the value of a healing item linear/descending ascending
Make the increase of maximum hp less fast


DTLS handshake failed when 2 Edge clients attampt to connect each other

Browsers and versions affected
Browser: Edge 41 for both clients
Version: latest adapter.js (https://webrtc.github.io/adapter/adapter-latest.js)
Description
We were unable to establish connection with Edge - Edge in a demo page of manual SDP exchange  (Chrome - Chrome works fine). When it fails, a DTLS handshake failed message is shown in Edge console.
The cause of DTLS fail is still unknown to us. It would be great to hear your idea about these questions:

Is it more likely an issue of that page, or adapter.js?
What can possibly cause DTLS handshake to fail in edge?

Our issue is similar to #306, but we are using latest adapter.js including fix in that issue.
Steps to reproduce

Open this page with 2 Edge (A and B) windows running on same PC.
In both A and B, click "start media"
In A, click "connect".
Copy from "SDP to send" in A to "SDP to receive" in B, and click "Receive remote SDP" in B.
Copy from "SDP to send" in B to "SDP to receive" in A, and click "Receive remote SDP" in A.

Expected results
Connect get established, A and B can see video stream from the other.
Actual results
No stream is displayed. The following error is shown in console:
ORTC18615: ORTC RTCDtlsTransport: DTLS handshake failed. hr=c004e00f

FWIW: This sample does work for me with Edge 41.

I'd like to know how to solve DTLS handshake problem.
Not only the page I presented, my product has same promlem.
I don’t know which of this page or adaptor.js cause DTLS handshake to fail.

do those failures happen on the local network?
Do ICE candidates get exchanged and can you see STUN messages going back and forth when using Wireshark?
Are there any DTLS packets showing up in Wireshark?

I can imagine this being a DTLS role conflict where both sides think they take the server role. A pcap trace would help.


mentioning bazel-msbuild in the Bazel newsletter for Bazel 0.12.0?

Hi,
I'm Laszlo and I work on Bazel-on-Windows. We found your tool a couple of weeks ago and I think it would be really useful to some of our users! Would you mind if we mentioned it in the newsletter for the upcoming Bazel release?
I'd like to phrase it like so:

Tools:

Tyler Mandry wrote a Visual Studio project generator for C++ rules: https://github.com/tmandry/bazel-msbuild

Please let me know what you think!
/cc @philwo

Hi Laszlo! I would be happy if you featured the project. The wording sounds good. I just updated the README so it's slightly less barebones.
Thanks!

Also, let me know if you have suggestions for wording changes or clarification to the README or anything else.

Hi Tyler,
Great, thank you! I'll add this entry to the newsletter then.
The only thing I noticed in the README is in the "Usage" section: it's not clear which terminal the user should run the commands in, cmd.exe or MSYS Bash. Otherwise it looks good, it's simple and clear!
Cheers,
Laszlo

Hey @laszlocsomor, congrats on a successful 0.12 release!
Odd timing perhaps, but FYI, I just changed the project name to Lavender. I'd also like to request that the announcement in the blog post be converted to links instead of text URLs. Those URLs aren't clickable on the blog.
Thanks for the announcement!

FYI @laurentlb for the blog post

You can send a PR here: https://github.com/bazelbuild/bazel-blog/blob/master/_posts/2018-04-11-bazel-0.12.md
(I think all links have been fixed now)

Ah, did not know about the repo. Looks like everything is fixed now. Thanks!


[FileSelector][web] openFiles never returns when user presses "cancel" in system UI file picker

Reproduce
With the following in pubspec.yaml:
environment:
  sdk: '>=2.19.2 <3.0.0'

dependencies:
  flutter:
    sdk: flutter
  file_selector:
  file_selector_web:

and main.dart:
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark(),
      home: Scaffold(
        body: Center(
          child: TextButton(
            child: const Text("OPEN FILES"),
            onPressed: () async {
              try {
                print("opening");
                final r = await openFiles(); // doc: "Returns an empty list if the user cancels the operation."
                print("done: $r");
              } catch (e) {
                print("ERROR: $e");
              }
            },
          ),
        ),
      ),
    );
  }
}

start debugging in web
press "OPEN FILES" button
wait for system UI
press "CANCEL" in system UI file picker

Expectation
openFiles returns an empty list after the user presses the "Cancel" button
debug console output:
opening
done: []

Actual
openFiles does not return at all
debug console output:
opening

Compare with selecting a file (works as expected)

press "OPEN FILES" button
wait for system UI
select any file
press "Open" in system UI file picker

debug console output:
opening
done: [Instance of 'XFile']

doctor
[✓] Flutter (Channel stable, 3.7.3, on macOS 12.1 21C52 darwin-arm64, locale en-DE)
    • Flutter version 3.7.3 on channel stable at /Users/gian/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (2 weeks ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/gian/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.74.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 12.1 21C52 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 110.0.5481.177

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

The underlying issue is discussed in https://github.com/flutter/flutter/issues/92176; the fix will need to be applied to both plugins.

Fixed by https://github.com/flutter/packages/pull/3683