AV-83476 - Enable dns private resolution in cluster creation

Jira

AV-83476

Description
Please include a summary of the fix/feature/change, including any relevant motivation and context.

Type of Change

[ ] Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
[x] New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR.
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR.
[ ] This change requires a documentation update
[ ] Documentation fix/enhancement

Manual Testing Approach
How was this change tested and do you have evidence? (REQUIRED: Select at least 1)

[x] Manually tested
[ ] Unit tested
[ ] Acceptance tested
[ ] Unable to test / will not test (Please provide comments in section below)

Testing

Testing

Setting enable_private_dns_resolution = true -

terraform plan
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 1s

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # couchbase-capella_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

terraform apply-
enable_private_dns_resolution = true
 terraform apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # couchbase-capella_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/20"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = true
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

   Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

cluster_id = "391eb24a-52ef-4071-b249-956783712473"
clusters_list = {
  "data" = tolist(null) /* of object */
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
}
new_cluster = {
  "app_service_id" = tostring(null)
  "audit" = {
    "created_at" = "2024-08-02 20:54:21.07775863 +0000 UTC"
    "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "modified_at" = "2024-08-02 21:00:42.208574667 +0000 UTC"
    "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "version" = 4
  }
  "availability" = {
    "type" = "multi"
  }
  "cloud_provider" = {
    "cidr" = "<IP_ADDRESS>/20"
    "region" = "us-east-1"
    "type" = "aws"
  }
  "couchbase_server" = {
    "version" = "7.6"
  }
  "current_state" = "healthy"
  "description" = "My first test cluster for multiple services."
  "enable_private_dns_resolution" = true
  "etag" = "Version: 4"
  "id" = "391eb24a-52ef-4071-b249-956783712473"
  "if_match" = tostring(null)
  "name" = "New Terraform Cluster"
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
  "service_groups" = toset([
    {
      "node" = {
        "compute" = {
          "cpu" = 4
          "ram" = 16
        }
        "disk" = {
          "autoexpansion" = tobool(null)
          "iops" = 5000
          "storage" = 50
          "type" = "io2"
        }
      }
      "num_of_nodes" = 3
      "services" = toset([
        "data",
        "index",
        "query",
      ])
    },
  ])
  "support" = {
    "plan" = "developer pro"
    "timezone" = "PT"
  }
}

Without adding the field in the request-

terraform plan
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # couchbase-capella_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

terraform apply -
enable_private_dns_resolution = false for new cluster-
terraform apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
data.couchbase-capella_clusters.existing_clusters: Reading...
data.couchbase-capella_clusters.existing_clusters: Read complete after 0s

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # couchbase-capella_cluster.new_cluster will be created
  + resource "couchbase-capella_cluster" "new_cluster" {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + cluster_id    = (known after apply)
  + new_cluster   = {
      + app_service_id                = (known after apply)
      + audit                         = (known after apply)
      + availability                  = {
          + type = "multi"
        }
      + cloud_provider                = {
          + cidr   = "<IP_ADDRESS>/23"
          + region = "us-east-1"
          + type   = "aws"
        }
      + couchbase_server              = (known after apply)
      + current_state                 = (known after apply)
      + description                   = "My first test cluster for multiple services."
      + enable_private_dns_resolution = (known after apply)
      + etag                          = (known after apply)
      + id                            = (known after apply)
      + if_match                      = null
      + name                          = "New Terraform Cluster 2"
      + organization_id               = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      + project_id                    = "c3610699-6eea-45f4-8d22-e87145460059"
      + service_groups                = [
          + {
              + node         = {
                  + compute = {
                      + cpu = 4
                      + ram = 16
                    }
                  + disk    = {
                      + autoexpansion = (known after apply)
                      + iops          = 5000
                      + storage       = 50
                      + type          = "io2"
                    }
                }
              + num_of_nodes = 3
              + services     = [
                  + "data",
                  + "index",
                  + "query",
                ]
            },
        ]
      + support                       = {
          + plan     = "developer pro"
          + timezone = "PT"
        }
    }

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

   Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

cluster_id = "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc"
clusters_list = {
  "data" = tolist([
    {
      "app_service_id" = tostring(null)
      "audit" = {
        "created_at" = "2024-08-02 20:54:21.07775863 +0000 UTC"
        "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
        "modified_at" = "2024-08-02 21:00:43.106558626 +0000 UTC"
        "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
        "version" = 5
      }
      "availability" = {
        "type" = "multi"
      }
      "cloud_provider" = {
        "cidr" = "<IP_ADDRESS>/20"
        "region" = "us-east-1"
        "type" = "aws"
      }
      "couchbase_server" = {
        "version" = "7.6.2"
      }
      "current_state" = "healthy"
      "description" = "My first test cluster for multiple services."
      "enable_private_dns_resolution" = true
      "id" = "391eb24a-52ef-4071-b249-956783712473"
      "name" = "New Terraform Cluster"
      "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
      "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
      "service_groups" = tolist([
        {
          "node" = {
            "compute" = {
              "cpu" = 4
              "ram" = 16
            }
            "disk" = {
              "autoexpansion" = tobool(null)
              "iops" = 5000
              "storage" = 50
              "type" = "io2"
            }
          }
          "num_of_nodes" = 3
          "services" = tolist([
            "index",
            "data",
            "query",
          ])
        },
      ])
      "support" = {
        "plan" = "developer pro"
        "timezone" = "PT"
      }
    },
  ])
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
}
new_cluster = {
  "app_service_id" = tostring(null)
  "audit" = {
    "created_at" = "2024-08-02 21:39:18.025023295 +0000 UTC"
    "created_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "modified_at" = "2024-08-02 21:42:03.432727052 +0000 UTC"
    "modified_by" = "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU"
    "version" = 5
  }
  "availability" = {
    "type" = "multi"
  }
  "cloud_provider" = {
    "cidr" = "<IP_ADDRESS>/23"
    "region" = "us-east-1"
    "type" = "aws"
  }
  "couchbase_server" = {
    "version" = "7.6"
  }
  "current_state" = "healthy"
  "description" = "My first test cluster for multiple services."
  "enable_private_dns_resolution" = false
  "etag" = "Version: 5"
  "id" = "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc"
  "if_match" = tostring(null)
  "name" = "New Terraform Cluster 2"
  "organization_id" = "5c307b62-f552-4911-a2a2-b72e5b96371a"
  "project_id" = "c3610699-6eea-45f4-8d22-e87145460059"
  "service_groups" = toset([
    {
      "node" = {
        "compute" = {
          "cpu" = 4
          "ram" = 16
        }
        "disk" = {
          "autoexpansion" = tobool(null)
          "iops" = 5000
          "storage" = 50
          "type" = "io2"
        }
      }
      "num_of_nodes" = 3
      "services" = toset([
        "data",
        "index",
        "query",
      ])
    },
  ])
  "support" = {
    "plan" = "developer pro"
    "timezone" = "PT"
  }
}

Created successfully-

cluster metadata-
We can see "enablePrivateDNSResolution": true for cluster 391eb24a-52ef-4071-b249-956783712473 , and none for the other one.

[
  {
    "cpapi": {
      "_type": "dataplane.clusters",
      "config": {
        "backupDisabled": false,
        "baseHostname": "jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "connect": {
          "privateZone": false,
          "srv": "cb.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com"
        },
        "enablePrivateDNSResolution": true,
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "intendedState": "healthy",
        "manage": {
          "agent": "agent.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
          "metrics": "https://metrics.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com:12003/metrics",
          "modifiedAt": "0001-01-01T00:00:00Z"
        },
        "provider": "hostedAWS",
        "region": "us-east-1",
        "resourceContainer": {
          "kind": "hosted"
        },
        "singleAz": false,
        "specs": [
          {
            "compute": {
              "cpu": 4,
              "memoryInGb": 16,
              "type": "m5.xlarge"
            },
            "count": 3,
            "disk": {
              "iops": 5000,
              "sizeInGb": 50,
              "type": "io2"
            },
            "diskAutoScaling": {
              "enabled": true
            },
            "services": [
              {
                "memoryAllocationInMb": 4139,
                "type": "index"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "kv"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "n1ql"
              }
            ]
          }
        ],
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        }
      },
      "createdAt": "2024-08-02T20:54:21.07775863Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "description": "My first test cluster for multiple services.",
      "id": "391eb24a-52ef-4071-b249-956783712473",
      "modifiedAt": "2024-08-02T21:00:43.106558626Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "name": "New Terraform Cluster",
      "package": {
        "key": "developerPro",
        "timezone": "PT"
      },
      "playgroundDisabled": false,
      "preAuthorizeSupport": true,
      "projectId": "c3610699-6eea-45f4-8d22-e87145460059",
      "status": {
        "state": "healthy",
        "stateEnteredAt": "2024-08-02T21:00:42.208541459Z"
      },
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 5
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.clusters",
      "config": {
        "backupDisabled": false,
        "baseHostname": "f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com",
        "connect": {
          "privateZone": false,
          "srv": "cb.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com"
        },
        "encryption": {
          "providerId": "8bf62805-a279-4234-8397-b3d4ad64bfb5"
        },
        "intendedState": "healthy",
        "manage": {
          "agent": "agent.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com",
          "metrics": "https://metrics.f7hpv8vgkr-jx1pe.aws-guardians.nonprod-project-avengers.com:12003/metrics",
          "modifiedAt": "0001-01-01T00:00:00Z"
        },
        "provider": "hostedAWS",
        "region": "us-east-1",
        "resourceContainer": {
          "kind": "hosted"
        },
        "singleAz": false,
        "specs": [
          {
            "compute": {
              "cpu": 4,
              "memoryInGb": 16,
              "type": "m5.xlarge"
            },
            "count": 3,
            "disk": {
              "iops": 5000,
              "sizeInGb": 50,
              "type": "io2"
            },
            "diskAutoScaling": {
              "enabled": true
            },
            "services": [
              {
                "memoryAllocationInMb": 4139,
                "type": "index"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "kv"
              },
              {
                "memoryAllocationInMb": 4139,
                "type": "n1ql"
              }
            ]
          }
        ],
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        }
      },
      "createdAt": "2024-08-02T21:39:18.025023295Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "description": "My first test cluster for multiple services.",
      "id": "7a04a8e3-7ad3-4302-ad0d-647eeb5ef3cc",
      "modifiedAt": "2024-08-02T21:42:03.432727052Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "name": "New Terraform Cluster 2",
      "package": {
        "key": "developerPro",
        "timezone": "PT"
      },
      "playgroundDisabled": false,
      "preAuthorizeSupport": true,
      "projectId": "c3610699-6eea-45f4-8d22-e87145460059",
      "status": {
        "state": "healthy",
        "stateEnteredAt": "2024-08-02T21:42:02.496814927Z"
      },
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 5
    }
  }
]

node metadata for cluster 391eb24a-52ef-4071-b249-956783712473, managementHostname is populated -

[
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": false,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "",
          "public": ""
        },
        "compute": {
          "cpu": 4,
          "image": "",
          "memoryInGb": 16,
          "providerId": "",
          "type": "m5.xlarge"
        },
        "disk": {
          "providerId": "",
          "sizeInGb": 1024,
          "type": "gp3"
        },
        "diskAutoScaling": {
          "enabled": false
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 0,
        "subnetId": "subnet-0f5d317996de10c98",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-backup-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1c"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T21:00:19.395873837Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "9a9e30f3-9b7b-42e6-a5ca-3db92e65d0ff",
      "modifiedAt": "2024-08-02T21:00:19.395873837Z",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "pending",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "backup",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 1
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "<IP_ADDRESS>",
          "public": "<IP_ADDRESS>"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-034487a4d5fe4ae77",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-01523ba292437e861",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-003.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-003-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 3,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0e6f169a00a1dcec0",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1f"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.527879588Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "a7070d3e-c63e-4f52-a3c3-41efe861bd5e",
      "modifiedAt": "2024-08-02T20:59:51.763071463Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "<IP_ADDRESS>",
          "public": "<IP_ADDRESS>"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-0523093d444ba90e8",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-0c1efde598535e8b1",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-001.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-001-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 1,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0f5d317996de10c98",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1c"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.529533422Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "b7cb250d-72ef-441e-b106-76b8f19383ea",
      "modifiedAt": "2024-08-02T20:59:51.781694922Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  },
  {
    "cpapi": {
      "_type": "dataplane.nodes",
      "certificatesInstalled": true,
      "clusterId": "391eb24a-52ef-4071-b249-956783712473",
      "config": {
        "address": {
          "private": "<IP_ADDRESS>",
          "public": "<IP_ADDRESS>"
        },
        "compute": {
          "cpu": 4,
          "image": "ami-09ff8357ed3e5ba3b",
          "memoryInGb": 16,
          "providerId": "i-08b7025f71e5c37d6",
          "type": "m5.xlarge"
        },
        "disk": {
          "iops": 5000,
          "providerId": "vol-0f7d11954163b3c04",
          "sizeInGb": 50,
          "throughputMbps": null,
          "throughputMbpsOverride": null,
          "type": "io2"
        },
        "diskAutoScaling": {
          "enabled": true
        },
        "encryption": {
          "providerId": "2e60eac4-d218-401e-afc4-65817bd88247"
        },
        "hostname": "svc-dqi-node-002.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "isColumnarNode": false,
        "isServerlessNode": false,
        "managementHostname": "svc-dqi-node-002-mg.jjcgfxbsgxgzfbo.aws-guardians.nonprod-project-avengers.com",
        "provider": "hostedAWS",
        "region": "us-east-1",
        "serverGroup": 2,
        "services": [
          {
            "memoryAllocationInMb": 4139,
            "type": "index"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "kv"
          },
          {
            "memoryAllocationInMb": 4139,
            "type": "n1ql"
          }
        ],
        "subnetId": "subnet-0b3a3e60d8d88a388",
        "version": {
          "agent": {
            "hash": "2ec23006"
          },
          "backupImageOverRide": null,
          "image": "couchbase-cloud-server-7.6.2-3721-x86_64-v1.0.35",
          "observer": null,
          "releaseId": "1.0.35",
          "server": "7.6.2",
          "shoreline": {
            "setting": "inherit",
            "version": "16.0.25"
          }
        },
        "vpcId": "vpc-029e702667142457e",
        "zone": "us-east-1d"
      },
      "couchbaseServerStopped": false,
      "createdAt": "2024-08-02T20:54:51.528250297Z",
      "createdByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "id": "dfd6d7d5-77b6-4ec4-b867-434f7f4882c2",
      "modifiedAt": "2024-08-02T20:59:55.956866424Z",
      "modifiedByProxyUserID": "",
      "modifiedByUserID": "KXtAubW3QfWy4bu6edBDNiwPaKrSLkhU",
      "status": "member",
      "tenantId": "5c307b62-f552-4911-a2a2-b72e5b96371a",
      "type": "couchbase",
      "upsertedAt": "0001-01-01T00:00:00Z",
      "upsertedByUserID": "",
      "version": 7
    }
  }
]

Required Checklist:

[x] I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
[x] I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
[x] I have added any necessary documentation (if required)
[x] I have run make fmt and formatted my code

Further comments

closing as stale, please reopen when ready to merge


Need an install instruction in a Python IDE

Hi,
I am a beginner and need an install  instruction of  robosat in the Google colab or some simple known IDE,
Is there any help?
Best Regards
Mary

This repo is unmaintained for the last 2+ years. See the note in
https://github.com/mapbox/robosat/blob/master/README.md
by now you'd have to upgrade pytorch, torchvision, cuda drivers in the dockerfiles, and so on.
I'm sorry.

Dear Daniel,
thanks for your reply and the useful Robosat program,
You mentioned some program needs to update, with these points, is it
possible to run it in ubuntu?
and does it install on an old and relative weak system?
Best Regards
Mary
On Wed, Dec 9, 2020 at 5:32 PM Daniel J. H<EMAIL_ADDRESS>wrote:

This repo is unmaintained for the last 2+ years. See the note in
https://github.com/mapbox/robosat/blob/master/README.md
by now you'd have to upgrade pytorch, torchvision, cuda drivers in the
dockerfiles, and so on.
I'm sorry.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mapbox/robosat/issues/214#issuecomment-741790283, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AOOPU2TG3S2GHXSPUGBYINDST57QXANCNFSM4UTHSR7Q
.

The docker images should still work; for that you'd need
https://docs.docker.com/engine/install/
and when you want to run on GPUs
https://github.com/NVIDIA/nvidia-docker
follow the instructions in
https://github.com/mapbox/robosat#installation
But also

and does it install on an old and relative weak system?

for prediction it should work, for training you will need GPUs.

Thanks, I'll check it out.
On Fri, Dec 11, 2020 at 1:54 PM Daniel J. H<EMAIL_ADDRESS>wrote:

The docker images should still work; for that you'd need
https://docs.docker.com/engine/install/
and when you want to run on GPUs
https://github.com/NVIDIA/nvidia-docker
follow the instructions in
https://github.com/mapbox/robosat#installation
But also
and does it install on an old and relative weak system?
for prediction it should work, for training you will need GPUs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mapbox/robosat/issues/214#issuecomment-743110548, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AOOPU2V5IHEUWECKME7AMQ3SUHXNFANCNFSM4UTHSR7Q
.


Odd behavior with no-return

ls.zip

Looks like the problem is we fail to mark _err as noreturn. The data afterward is not code but rather the base for a jump table. It's marked as no return after where it should because it encounters an invalid instruction. So the disassembly is pretty much right if you ignore everything after the call to _err.

Fixed in dev


Source Code Files Missing?

The Packt course indicates that:  "The code files and all related files are updated on GitHub at https://github.com/PacktPublishing/The-Complete-Java-Developer-Course-From-Beginner-to-Master".  I don't see the source code (.java) files.

Hi,
Thank you so much for bringing this to our attention. We have updated the repository.
Happy learning!

Hi,
Thank you for bringing this to our attention. We have updated the repository.
Happy learning!


Create vuln-drivers.json

Based off of Microsoft's recommended driver block list for WDAC
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/microsoft-recommended-driver-block-rules

This leverages the key hash which is not yet supported in Surveyor. Support for that needs to be included in Surveyor before this PR can be merged.


artalk: build frontend from source

artalk: build frontend from source
nixosTests.artalk: add auth test

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[x] 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

[ ] 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/)
25.05 Release Notes (or backporting 24.11 and 25.05 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

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg test artalk

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 357762

x86_64-linux

:white_check_mark: 1 package built:

artalk

aarch64-darwin

:white_check_mark: 1 package built:

artalk

@ofborg test artalk


unreal client

Can anyone write the unreal client for this example

Maybe someday, I'm thinking about starting some projects with Unreal...


fix: Only parse response body as json when server returns 200 in modal.

Set up this project once again and went to create a class, I found some runtime error. It was because we were parsing json on a non 200 response from the API. Before/After pics included.
The reason why I was getting 403 was because my database was set up wrong so unlikely this error would show up in production, still better to handle errors properly on client side for any other kinds of errors (like 500 due to timeout).

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)

Thanks for this fix, Rob.


Version 3.5.4

Product owner assigned Release notes

Updates NewsItem.js component.
Sinopia Wiki

[x] Create release.

[x] Pull latest master.
For the sinopia_editor only (sinopia_indexing_pipeline does not need to update the version number in the package.json file):

[x] Check out a branch and update the version in package.json
[x] npm i to regenerate package-lock.json (see note below)
[x] npm publish to publish the version to npm registry.
[x] Commit change to branch and push; create PR for version bump.  (You can't push directly to master, since it's a protected branch).
[x] Once PR is merged, publish a new release with a version like v1.0.2 and wait for Circleci to complete building and pushing docker images.

[x] AWS Images for supporting projects - the Sinopia stack requires
a number of other projects to run successfully both locally and on AWS. If any of
these projects changed between tagged releases, you will need to update and tag the
latest image on Dockerhub along with corresponding update to Terraform with the tagged
release.

[x] Sinopia Indexing Pipeline https://github.com/LD4P/sinopia_indexing_pipeline

[x] Publish a new release with version v2.1.7 and wait for Circleci to complete building and pushing docker images.

[x] Sinopia Exporter https://github.com/LD4P/sinopia_exporter

[x] Publish a new release with version like v2.0.4 and wait for Circleci to complete building and pushing docker images.

[x] Sinopia API https://github.com/LD4P/sinopia_api

[x] Publish a new release with version v1.1.6 and wait for Circleci to complete building and pushing docker images.

[x] Deploy to staging

[x] Follow instructions for pushing a release to staging. Make sure to update versions to Sinopia Editor, Sinopia Indexing Pipeline, and Sinopia Exporter.
[x] Submit a new terraform PR.

[x] Product owner decides whether to deploy to production (which may not occur for every tagged release)

[x] Create a new terraform PR for production, making similar changes to staging.
[x] Request that Ops deploy to production.

NOTE: if package-lock.json has links to unsecured http:// registries, try
deleting package-lock.json, remove the node modules rm -rf ./node_modules,
run npm cache clean --force, and then run npm i --prefer-online

Finished deployment to stage, open PR for ops to deploy to production


refactor: transactionList.ts

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
to resolve this one: https://codeclimate.com/github/kodadot/nft-gallery/composables/transaction/transactionList.ts
👇 __ Let's make a quick check before the contribution.
PR Type

[ ] Bugfix
[ ] Feature
[x] Refactoring

Context

[x] Part of #6782
[ ] Requires deployment <snek/rubick/worker>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality

Optional

[ ] I've tested it at </ksm/collection>
[ ] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Did your issue had any of the "$" label on it?

[x] Fill up your DOT address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 2888e8e
Refactored transaction execution code in composables/transaction/transactionList.ts to use a function map and helper functions for different urlPrefixes. This improves code readability and reduces duplication.

🤖 Generated by Copilot at 2888e8e

urlPrefix maps
to functions and arguments
cutting duplication

code lgtm

i've realized tests to check if those actions would trigger transactions (i did not went it them, just canceled when asked for signing):

buying : bsx✔ | rmrk1✔ | rmrk2✔ | Ahk ✔
mass minting : bsx✔ | rmrk1✔ | rmrk2✔ | Ahk ✔
collection creation : bsx ✔  | rmrk1✔ | rmrk2✔ | Ahk ✔
create token : bsx ✔ | rmrk1 ✔ | rmrk2 ✔ | Ahk ✔
drop container : no drop available
transfer : dot ✔| ksm ✔
gallery item offer ✔
transfer item on gallery : bsx ✔ | rmrk1✔ | rmrk 2 ✔ | Ahk ✔
relist: bsx ✔ | rmrk1✔ | rmrk2 ✔ | Ahk ✔

I've also verified the description on the transaction to see if matches the action

pay 30 usd

😍 Perfect, I’ve sent the payout
💵 $30 @ 4.43 USD/DOT ~ 6.772 $DOT
🧗 13rv1SWoLg9Gb3tmvHPZxb7JbVy51BtMziX7k9WQGSJ7Kp3A
🔗 0xd08f5d41548fa5765f580d6b7b3bfba663d1c1c7853bb54ab4fffa5809509b92
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Updated the README.md with instructions and added a requirements.txt …

…file to pre-install all external dependencies

Thanks!

My pleasure!


Create a rich README.md and CONTRIBUTION.md

A resolve for this #1

Well made! great job @harizMunawar


Duplicate Toast

I did the installation tutorial. Here's some snippet:
app.js
import './bootstrap';
import '../../vendor/masmerise/livewire-toaster/resources/js';
import './../../vendor/power-components/livewire-powergrid/dist/powergrid'
import './../../vendor/power-components/livewire-powergrid/dist/tailwind.css'
import flatpickr from "flatpickr";

import Alpine from 'alpinejs';

window.Alpine = Alpine;

Alpine.start();

app.blade.php
<!DOCTYPE html>
getLocale()) }}">

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="csrf-token" content="{{ csrf_token() }}">

        <title>{{ config('app.name', 'Elearning') }}</title>

        <link rel="preconnect" href="https://fonts.bunny.net">
        <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

        @vite(['resources/css/app.css', 'resources/js/app.js'])

            @include('layouts.navigation')

            @if (isset($header))

                        {{ $header }}

            @endif

                    {{ $slot }}

        <x-toaster-hub />

toaster.php is left unchanged, but I did publish it.
tailwind.config.js
import defaultTheme from 'tailwindcss/defaultTheme';
import forms from '@tailwindcss/forms';
const colors = require('tailwindcss/colors')

/** @type {import('tailwindcss').Config} */
export default {
    darkMode: 'class',

    content: [
        './vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
        './storage/framework/views/*.php',
        './resources/views/**/*.blade.php',
        './app/Http/Livewire/**/*Table.php',
        './vendor/power-components/livewire-powergrid/resources/views/**/*.php',
        './vendor/power-components/livewire-powergrid/src/Themes/Tailwind.php'
    ],

    theme: {
        extend: {
            fontFamily: {
                sans: ['Figtree', ...defaultTheme.fontFamily.sans],
            },
            colors: {
                "pg-primary": colors.zinc
            }
        },
    },

    plugins: [forms],
};

Here's how I'm using it. Though it happens everywhere, not just Livewire components.
Create.php
<?php

namespace App\Livewire\User;

use App\Models\User;
use Illuminate\Support\Facades\Redirect;
use Livewire\Component;
use Masmerise\Toaster\Toastable;

class Create extends Component
{
    use Toastable;

    public $name = '';
    public $email = '';
    public $password = '';

    public function save()
    {
        User::create(
            $this->only(['name', 'email', 'password'])
        );

        return Redirect::route('users.index')->success('User created successfully');
    }

    public function render()
    {
        return view('livewire.user.create');
    }
}

@mabdullahsari I'm seeing this too - double toasts when using redirect()->route('my.view', [...])->success('created!');
I'm also seeing console errors:
Uncaught ReferenceError: toasterHub is not defined

@mabdullahsari I'm seeing this too - double toasts when using redirect()->route('my.view', [...])->success('created!');
I'm also seeing console errors: Uncaught ReferenceError: toasterHub is not defined

Hi, can you inspect the network tab and see how many toasts are being dispatched in the response payload? You should see them under the effects key!

Apologies, @mabdullahsari where is the effects key?

I have sorted it I believe, Alpine/Livewire were being loaded twice.
I've removed the following from my resources/js/app.js:
import` Alpine from 'alpinejs';
Alpine.start();

... and it now works! Single Toast and no Duplicate Apline errors in console.
Thanks for your help @mabdullahsari, and @reihanboo I hope this is useful for you too.

I have sorted it I believe, Alpine/Livewire were being loaded twice.
I've removed the following from my resources/js/app.js:
import Alpine from 'alpinejs';
Alpine.start();

... and it now works! Single Toast and no Duplicate Alpine errors in console.
Thanks for your help @mabdullahsari, and @reihanboo I hope this is useful for you too.

I'm glad you got it sorted!


Invalid FCs are seemingly accepted.

e.g. '3'

If they aren't accepted, there's no proper error message

Can you clear your cache and see if it's fixed?

I'm going to close this tomorrow unless you let me know it is still an issue for you. I can't recreate this at all.

Alrighty, as mentioned I had a fix but hadn't pushed it up. It is now deployed.


kernel: add relro to the list of disabled hardening flags

Fixes https://github.com/NixOS/nixpkgs/issues/275424
cc @K900
The kernel is incompatible with relro binary hardening, as evidenced by the many instances of this warning in kernel build logs:
/nix/store/zzxh4c6lg7f04sav05h4hca94d4hch1m-binutils-2.40/bin/ld: warning: -z relro ignored
Disable relro to silence these warnings.
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] 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

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.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

[ ] Fits CONTRIBUTING.md.

Isn't it aarch64-only issue?

Indeed, I don't see any such warnings in the x86_64-linux build log.
However, if you look at the change I made, most of the hardening flags are disabled for the kernel already, and I'm just adding one more to the pile.

Why was this closed?


Upgrade rails 5.0.4

Coverage remained the same at 100.0% when pulling 9e4a5c92f9e665e27878d0aa6ed568048cbe9963 on upgrade/rails-5.0.4 into 719a0df40007d9bba9f4fa334212d05b79ed7c95 on master.


Load image from FileSystem

Description
It is possible to load image from the file system?
For example, path to image:
/Users/eagle/Library/Developer/CoreSimulator/Devices/27B0F9E8-8A9D-4F9B-943C-664517802A19/data/Containers/Data/Application/8F4E2B72-A66B-4D67-B872-A5FE28ADA032/tmp/ReactNative/C4719985-C6A0-4514-BA22-BCEEC6A43CEE.jpg

Not assets: require(....);
Not web url: 'http...';
Version
0.1.146
Steps to reproduce
Use image path from the file system, for example /Users/eagle/Library/Developer/CoreSimulator/Devices/27B0F9E8-8A9D-4F9B-943C-664517802A19/data/Containers/Data/Application/8F4E2B72-A66B-4D67-B872-A5FE28ADA032/tmp/ReactNative/C4719985-C6A0-4514-BA22-BCEEC6A43CEE.jpg
Snack, code example, screenshot, or link to a repository

Hi @NikitaDudin - would it be possible that you need to prefix the uri with file://? This is a known issue that also exists in React Native I think?

Hi @NikitaDudin - would it be possible that you need to prefix the uri with file://? This is a known issue that also exists in React Native I think?

Oh, after adding the file:// prefix it worked. Thank you!


Add files via upload

Chinese Remainder Theorem:
We are given two arrays num[0..k-1] and rem[0..k-1]. In num[0..k-1], every pair is coprime (gcd for every pair is 1). We need to find minimum positive number x such that:
 x % num[0]    =  rem[0],
 x % num[1]    =  rem[1],
 .......................
 x % num[k-1]  =  rem[k-1]

Basically, we are given k numbers which are pairwise coprime, and given remainders of these numbers when an unknown number x is divided by them. We need to find the minimum possible value of x that produces given remainders.

Number Theory Chinese Remainder Theorem


Standardised metrics

For discussion.
There is an initiative from Leo (Barcelona Supercomputer Centre) and a colleague to standardise the naming of a subset of metrics across clients. The idea is that this would make dashboards more portable between clients, and reduce client "lock-in" for users.
A draft proposal is here.

I've gone through and colour coded the appropriate fields, we've got some gaps that may be useful metrics...


Bump to DEV23

Checklist

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

Attention humans: Please don't merge this yet. Thanks!

We don't want to release this to the broader public yet, it has a few issues to fix first, including:

[ ] https://github.com/brightway-lca/brightway2-data/issues/147
[ ] https://github.com/brightway-lca/brightway2-data/issues/148

4.0.DEV23 has been yanked from pypi


[tasks] Update type of ModelData.base_model

needed for internal PR cc @davanstrien

@coyotte508 any way to do a release? 🙏

can you update the npm requirement on my moon-landing PR when it's released? thanks a lot!


issue with Bundesanzeiger?

I ran the sample code, but had the following error:

OSError                                   Traceback (most recent call last)
 in ()
1 from deutschland import Bundesanzeiger
----> 2 ba = Bundesanzeiger()
3 # search term
4 data = ba.get_reports("Deutsche Bahn AG")
5 # returns a dictionary with all reports found as fulltext reports
3 frames
/usr/local/lib/python3.7/dist-packages/keras/saving/save.py in load_model(filepath, custom_objects, compile, options)
202         if isinstance(filepath_str, str):
203           if not tf.io.gfile.exists(filepath_str):
--> 204             raise IOError(f'No file or directory found at {filepath_str}')
205
206           if tf.io.gfile.isdir(filepath_str):
OSError: No file or directory found at assets/model.h5

Hi,
have a look here. This should be fixed in the newest main but that's not released yet. You could try to build the package from the source.

Hey @ml0110 ,
We just did a new release. Can you give it another try?

Solved in the newest release. If not, feel free to open another issue.


Spinner should stop when an error is encountered

I love the new automatic loading indicator on startup, but when there is an error in the .yml, it just spins away like:

Here I edited the penguins URL to make it point to a non-existent file, and got no feedback that there was an error until I checked my command-line terminal.  A spinner is useful to the extent that it accurately conveys the state of the app, which in this case is an error; can it switch to an error indicator (a red exclamation point?) if the app raises an exception? Or at least stop spinning?

Plus that spinner is pretty dang big!

The spinner is sized relative to its container, but maybe we'll set a max-width in Panel.


Mobile App [Radzima UIKit, iOS] The button "Back" is missing on search field on "Карта" tab.

Precondition:

Run Radzima app;

Steps:

Tap on "Карта" tab;
Tap on "Search" button;
Check the "Back" button.

Expected results:

Tap "Карта" opens;
"Search" page opens;
Button "Back" is displayed.

Actual result:

Tap "Карта" opens;
"Search" page opens;
Button "Back" is not displayed.

UIKit:

Figma mockup:

It's a ViewController being presented modally, so it doesn't need back button.
https://developer.apple.com/design/human-interface-guidelines/ios/app-architecture/modality/

If container is pushed to navigation stack, it may be navigated back - in this case back button should present.
https://developer.apple.com/documentation/uikit/uinavigationcontroller?language=objc


Documentation: function/method parameter lists

I was working to clarify the meaning of some parameters in someone else's project and suddenly realized there was no explicit way to document this aspect of the code.
My stop-gap attempt is to drop a bullet list into the long description, but it might be nice to have special handling around this.
/// Draws the given `Drawable` object to the screen.
///
/// * `ctx` - The `Context` this graphic will be rendered to.
/// * `drawable` - The `Drawable` to render.
/// * `quad` - A portion of the drawable to clip.
/// * `dest` - the position to draw the graphic expressed as a `Point`.
/// * `rotation` - orientation of the graphic in radians.
///
pub fn draw(ctx: &mut Context,
            drawable: &mut Drawable,
            quad: Rect,
            dest: Point,
            rotation: f32)
            -> GameResult<()> {
    drawable.draw(ctx, quad, dest, rotation)
}

In a language like Python, documenting parameters has greater importance since it provides hints to the expected types, but it still offers a good opportunity to discuss usage of, and how incoming values contribute to a result.
class Client(object):

    def __init__(self, url, api, mappers=None, default_chunk_size=200):
        """
        :param str url: full url to the atlas instance.
        :param str api: the api version to use.
        :param dict mappers: mapper classes to use for the element types
                             named in the keys.
        :param int default_chunk_size: sets the cursor limit for times when it
                                       is not being explicitly set by the
                                       caller.
        :raises atlas.exceptions.ServerCompatError: if server url is for an
                                                    incompatible server
                                                    version.
        """
        # ...

While having this info show up in the docs, this could also be leveraged in tooling (IDEs, etc).

h/t to @jonathandturner for suggesting I file this! Thanks for the push.

I think /// and //! are interpreted in terms of items, but one could imaging tweaking that so that this parsed and did something nice :
/// Draws the given `Drawable` object to the screen.
pub fn draw(
        /// The `Context` this graphic will be rendered to.
        ctx: &mut Context,
        /// The `Drawable` to render.
        drawable: &mut Drawable,
        quad: Rect, //! A portion of the drawable to clip.
        dest: Point, //! the position to draw the graphic expressed as a `Point`.
        rotation: f32 //! orientation of the graphic in radians.
        ) -> GameResult<(
            u64,  //! `x` distance drawn
            u64,  //! `y` distance drawn
        )>
{
    drawable.draw(ctx, quad, dest, rotation)
}

Would love to see this for function parameters as well as macro parameters.
I would also prefer to see parameter documentation above the item rather than inline. If a specific parameter has a very long comment this breaks up the function signature making it difficult to read:
/// Draws the given `Drawable` object to the screen.
pub fn draw(
    /// The `Context` this graphic will be rendered to.
    ctx: &mut Context,
    /// The `Drawable` to render. This is going to be a very very very
    /// long docstring. With many sentences. Many many sentences.
    ///
    /// Maybe even a second paragraph.
    drawable: &mut Drawable,
) -> GameResult<(u64, u64)>
{
    ...
}


[Nest] 30  - 04/14/2024, 4:54:00 AM   ERROR [ExceptionsHandler] Can't add new command when connection is in closed state Error: Can't add new command when connection is in closed state

[Nest] 30  - 04/14/2024, 4:54:00 AM   ERROR [ExceptionsHandler] Can't add new command when connection is in closed state
Error: Can't add new command when connection is in closed state
Errors are reported automatically at regular intervals

Reading this issue(see here: https://github.com/sidorares/node-mysql2/issues/1898 )  is a problem with the mysql2 package

I'm still not gonna fix it，

我应该怎么修复这个错误

mmmh what version of the package are you using the latest 0.0.13? try to install nest-mysql version 0.0.12 maybe the problem was introduced with mysql v3.9.4, in version 0.0.12 there should be version 3.9.1 of the mysql2 package

nest-mysql is 0.0.13
mysql2 is 3.9.3

nest-mysql is 0.0.13 mysql2 is 3.9.3

try using these versions here:

nest-mysql v0.0.12
mysql2 v3.9.1

I've switched versions
I'll run some tests. Wait for my results

The same mistakes happen
The problem has not been solved
How do I create a connection pool to connect to the database

The same mistakes happen The problem has not been solved How do I create a connection pool to connect to the database

Okay, I released a new version 0.0.14 to make pool connections try doing that:
MysqlModule.forRoot({
    host: 'localhost',
    database: 'test2',
    password: 'root',
    user: 'root',
    port: 3306,
    waitForConnections: true,
    connectionLimit: 10,
    queueLimit: 0,
    pool: true,
}),

put the flag "pool:true" in the configuration, so it does the switch for the connection pool, let me know if it works

非常棒，我去实验一下，看看问题有没有被解决，可能会晚点回复你结果


Cargo should be explicit that it is querying git for modified files.

I'm working on this.


fix tests

What is the purpose of the change
(For example: This pull request makes user can stop workflow externally.)
Brief change log
(for example:)

Send StopDagEvent to Airflow scheduler via notification service
Once received StopDagEvent, Airflow scheduler kills all running dag runs

Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests.

Codecov Report

Merging #217 (eaf5a64) into master (75e3439) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
+ Coverage   65.47%   65.49%   +0.02%
==========================================
  Files         203      203
  Lines       15237    15237
  Branches     2298     2298
==========================================
+ Hits         9976     9980       +4
+ Misses       4732     4729       -3
+ Partials      529      528       -1

Impacted Files
Coverage Δ

ai_flow/endpoint/server/high_availability.py
27.90% <0.00%> (ø)

ai_flow/store/sqlalchemy_store.py
75.30% <0.00%> (+0.18%)
:arrow_up:

..._service/notification_service/high_availability.py
85.41% <0.00%> (+1.38%)
:arrow_up:

Continue to review full report at Codecov.

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


Revisit the Username Validation Logic during Self Registration

According to the current self registration implementation, we allow users to get registered to any tenant domain if the user has access to a SaaS application of one of the tenant domains. This will cause unintended behaviors in cases if a specific tenant domain intentionally requires users to be registered only through the exposed apps from that tenant domain. But due to the current behaviour, external users can get created in that tenant domain through SaaS apps of other tenants.
Therefore for self registration we should not allow user registration in other tenant domains even through SaaS applications. Users should be allowed to register only in the relevant tenant domain of the application that the user has access to.
In this case, users should only use the tenant aware username (only the username without appending the tenant domain) for both Saas and non-SaaS applications. Therefore the username validation logic should be changed to use the complete username, instead of using the tenantAwareUsername for validation[1][2].
[1] https://github.com/wso2-extensions/identity-governance/blob/master/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/signup/UserSelfRegistrationManager.java#L1290-L1298
[2] https://github.com/wso2-extensions/identity-governance/blob/master/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/signup/UserSelfRegistrationManager.java#L1447-L1449

In order to create a user in the other tenant domains (other than the application domain) 'self-registration' should be enabled in the other tenants. Anyway restricting the user onboarding if the application domain and the user domain are different can be done.

As mentioned in the above comment resolveUser method [1] can be updated to correctly resolve the complete username (including the substring after @). Resolved user object is then passed to the self signup API /validate-username endpoint where the tenant-aware username resolving logic in [2] [3] needs to be changed. After this improvement, through the myaccount application, users can self-register to the carbon.super domain only.
Note: Username regex validation at [3] currently consider tenant aware and userstore domain aware username for validation.
(Removing the substring after @ and the substring before /)
During testing the fix for this improvement, several existing issues could be observed in the password recovery flows when the email as username config is enabled

For SaaS applications, tenant domain is always resolved to be the domain of the application. So only super-tenant users can recover passwords using my account application
For tenanted non-SaaS applications, following error can be observed after submitting the new password

These issues should be fixed separately
[1] - https://github.com/wso2/carbon-identity-framework/blob/master/components/identity-mgt/org.wso2.carbon.identity.mgt.endpoint.util/src/main/java/org/wso2/carbon/identity/mgt/endpoint/util/IdentityManagementServiceUtil.java#L262
[2] - https://github.com/wso2/carbon-identity-framework/blob/master/components/identity-mgt/org.wso2.carbon.identity.mgt.endpoint.util/src/main/java/org/wso2/carbon/identity/mgt/endpoint/util/IdentityManagementServiceUtil.java#L262
[3] - https://github.com/wso2-extensions/identity-governance/blob/master/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/signup/UserSelfRegistrationManager.java#L1439

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Updated sumstats need re-harmonising - GCP000734

The user got in touch to update 2 sumstats files (originally submitted filtered by significance. Now replaced with full results.)
GCSTs have already been harmonised. These need deleting and to be redone.
IDs:
GCST90293086
GCST90293085

Submitted to codon-slurm.
         JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
      62991435  standard goci1231 gwas_lsf  R       0:04      1 hl-codon-11-01

The job in SLURM failed, submitted using LSF.
Job <92617909> is submitted to default queue <standard>.

The harmonisation is now complete and files are avaliable in the public ftp. https://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/GCST90293001-GCST90294000/


Add latency field to DNS trace gadget

Add latency field to DNS trace gadget
Derive DNS latency from the request and response timestamps. To avoid unbounded memory usage, set a limit on the number of outstanding requests, dropping old requests to make space if necessary.
DNS requests are tracked in userspace. I tried using BPF_MAP_TYPE_LRU_HASH in the eBPF program, but discovered that the LRU cache would evict entries when the program was executed on different CPUs, even when there were only a few entries in the map. For example, if nslookup queried for A and AAAA records, the second request executing on a different CPU could cause the first request to be evicted from the map. The userspace implementation avoids this issue.
Part of issue https://github.com/inspektor-gadget/inspektor-gadget/issues/1196
Depends on changes in https://github.com/inspektor-gadget/inspektor-gadget/pull/1205 to set the timestamp on the DNS event.
How to use
https://github.com/inspektor-gadget/inspektor-gadget/blob/main/docs/gadgets/trace/dns.md
Testing done

I am nonetheless not so sure about using golang map. Can you please give me more details regarding BPF_MAP_TYPE_LRU_HASH? I am not sure to understand clearly this part:

but discovered that the LRU cache would evict  when the program was executed on different CPUs, even when were only a few entries in the map

Particularly, when would the eviction occurs? Does the whole map is cleared if the eBPF program is scheduled on a different CPU than before?

The behavior I observed was that some entries would get evicted, but not the whole map. There are more details in these Slack discussions:

#inspector-gadget
cilium #ebpf

@mauriciovasquezbernal and I were both surprised by this behavior.

If so, what about using a simple eBPF hash map (i.e. not the LRU one)?

I think that's worth exploring! @alban suggested maybe using a BPF timer or golang ticker to expire old entries, but seems like that would require kernel versions > 4.10. Thoughts?

updated to:

fix linter violations (var/func naming)
use embedded sync.Mutex
fix TestDNS local-gadget unit test

one of the integration tests is failing, looking into it

@wedaly what's the memory usage limit you want for this gadget? Perhaps we can use a bigger sized on the LRU ebpf map and it'll avoid evicting the entries?

I think the exact limit doesn't matter so much, as long as it's bounded. I tried setting max_entries in the LRU map to 4096, which seemed to help, but I'd be nervous about relying on that without understanding the mechanism that's evicting the keys.

Otherwise, what about using an LRU golang map on user space instead of implementing our own logic? (something like https://github.com/hashicorp/golang-lru could work).

Yep, definitely open to that if you're comfortable taking the dependency.

last commit reimplements dnsLatencyCalculator using https://github.com/hashicorp/golang-lru to reduce the amount of custom code

@alban oof, thanks for catching that. I've attempted to address the issue of sharing the LRU cache across netns by including the netns in the LRU cache key. I've also removed the IP address from the cache key, since I think netns + DNS ID should be sufficient to correlate queries/responses.
While testing with -A to include all namespaces, I noticed another problem. For DNS queries from the host netns, we see four events, all in the same host netns with the same DNS ID:

Query with pkt type OUTGOING
Query with pkt type HOST
Reply with pkt type OUTGOING
Reply with pkt type HOST

The second query event resets the timestamp, and the first reply event deletes the cache entry.
Maybe there's a better way to handle this, but I'm thinking maybe we store the timestamp only for queries with pkt type OUTGOING, and calculate latency only for replies with pkt type HOST. I'd imagine that's what users of this tracer would care about: the latency between when a container sent the query and got a reply.
With these changes, the output running a trace with  -A looks like this:

I made those changes in the last two commits so they're easier to review. Thoughts on this approach?

seeing some test failures, but I think they're unrelated:

Integration tests (core, none) TestTraceTcpconnect failing with Error from server (InternalError): error when creating "STDIN": Internal error occurred: failed calling webhook "binding.spo.io": failed to call webhook: Post "[https://webhook-service.security-profiles-operator.svc:443/mutate-v1-pod-binding?timeout=10s](https://webhook-service.security-profiles-operator.svc/mutate-v1-pod-binding?timeout=10s)": dial tcp <IP_ADDRESS>:443: i/o timeout
Integration tests for local gadget (non-K8s, docker) TestTraceDns is failing with a missing event, but it passes locally for me.

Going to rebase onto the main branch to see if that helps.

Integration tests for local gadget (non-K8s, docker) TestTraceDns is failing with a missing event, but it passes locally for me.

This should be unrelated as well since from the logs here I believe we might need to wait for tracer to be ready like here before making the requests!

I tried using BPF_MAP_TYPE_LRU_HASH in the eBPF program, but discovered that the LRU cache would evict entries when the program was executed on different CPUs, even when there were only a few entries in the map.

Any other references about the LRU map? I can not see the content in the slack.
Thanks.
#inspector-gadget
cilium #ebpf

I can not see the content in the slack.

Oh yes, this is the thing I don't like about discussing on Slack, there is a barrier to access that information and old messages are removed in some cases.
Any way, this is the full discussion in cilium #ebpf:
Will Daly:

Hi, I've observed BPF_MAP_TYPE_LRU_HASH with max_entries set to 256 evicting an entry when there are only a few other entries in the map. The docs say "An LRU hash will automatically evict the least recently used entries when the hash table reaches capacity" so I expected no entries would be evicted until the number of entries approached max_entries.
I originally reproduced this working on inspektor-gadget (discussion here) but I'm also able to reproduce it using the "xdp" example in cilium/ebpf which uses an LRU hash with IP addresses as keys:

In the cilium/ebpf "examples" directory: go run -exec sudo ./xdp lo to start tracing packets on the loopback interface.
for i in {0..15}; do ping 127.0.0.${i} -c 1; sleep 1; done
I'd expect to see all 16 IP addresses in the LRU map, but the actual output shows keys missing (can see the same using bpftool map dump):
<IP_ADDRESS> => 17
<IP_ADDRESS> => 1
<IP_ADDRESS> => 1
<IP_ADDRESS> => 1
<IP_ADDRESS> => 1
<IP_ADDRESS> => 1

one of my colleagues was also able to reproduce this behavior with the test program here: https://github.com/mauriciovasquezbernal/lru_hash_experiment

could someone help us understand why BPF_MAP_TYPE_LRU_HASH might evict entries when the number of entries is much smaller than max_entries?

testing a bit more, it seems that when using this command, all the IPs show up in the map:
taskset -c 1 ping 127.0.0.${i} -c 1
so maybe this behavior has something to do with map updates from different CPUs?

Joe Stringer:

Yeah it's likely a multi-CPU thing. If you wanted perfect LRU, that could technically be done but it would be horribly inefficient when running the algorithm across various CPUs. So, the Linux implementation makes some tradeoffs around how strictly to enforce the LRU behaviour (ie not strictly) in order to improve performance.

I did a bit of a breakdown of some of the ways this works at Linux Plumbers Conference this year, that could be helpful for a bit of insight around the details on that platform.

(slides/video should be available, I don't have the links on hand but you might find them either with a slack search for Linux Plumbers / LPC, or through an internet search)

Will Daly:

thanks
@Joe Stringer
, I'll take a look!

I hope it helps.

@mauriciovasquezbernal Thanks, this helps a lot.


Why is django_q hitting redis so hard?

I have been using django-q against the ORM for quite a while, with success. I recently switched our project over to redis for general caching, which gave me more insight about how the cache is being used. We still want to use Django Admin for task management so I am still specifying "orm": "default" in the Q_CLUSTER settings. But I'm seeing some surprising traffic in redis that I can't explain.
If I run $ redis-cli monitor I get this approx. once per second even on a secret test server with no traffic, and after confirming that there are no queued jobs - qmonitor and qinfo confirm that there is nothing to do.
1558739051.906214 [0 <IP_ADDRESS>:45800] "GET" "iris:1:django_q:DjangORM:cluster"
1558739051.906444 [0 <IP_ADDRESS>:45800] "SET" "iris:1:django_q:DjangORM:cluster" "\x80\x04\x954\x01\x00\x00\x00\x00\x00\x00]\x94(\x8c\x1fdjango_q:DjangORM:cluster:15849\x94\x8c\x1fdjango_q:DjangORM:cluster:23247\x94\x8c\x1fdjango_q:DjangORM:cluster:25906\x94\x8c\x1fdjango_q:DjangORM:cluster:28570\x94\x8c\x1edjango_q:DjangORM:cluster:1910\x94\x8c\x1edjango_q:DjangORM:cluster:4503\x94\x8c\x1edjango_q:DjangORM:cluster:7636\x94\x8c\x1fdjango_q:DjangORM:cluster:12144\x94\x8c\x1fdjango_q:DjangORM:cluster:15147\x94e."
1558739051.906690 [0 <IP_ADDRESS>:45800] "SET" "iris:1:django_q:DjangORM:cluster:15147" "\x80\x04\x95\t\x02\x00\x00\x00\x00\x00\x00X\x02\x02\x00\x00.eJxVUEtOAkEQ1TB8hCgbImzdYQwk7DS9ZGVMxwR1aSYN00DL0D1010QgMdGFrnpH4f93D0_hGTyBN7AHY4K1qKqk8up9Lr35x-rKomwxOGOyp_xR3QCD2KD1jtyCM9y-wgus2uy50gOuDZ5ilc4JvSX0jtB7Qh8IfST0idBnQl8IfSXcpkC10eYCBhzEkC-vM2zms1_pzdJWLd09dCzRBKZu-CfHzYSshTfYQruhuZAdpiUDoaTBgxWb74SxAa59ESDdITZnuAQheYgUic38yS7_GqnHIEJT78ayk3xgIdqSH7LpxI-0Gk_8WEaiMwgTQVVb-YcBzaQJF8Rosz0OwMdJENbbDxzg2sVhc-1YhI7dEaYMaHeFRHYhUJL7I9-IKU80e31lwLkRWpjaojUau3vu61BJAUojfSO2AMwMlkCZKDZ97m7vxK4loTlrwwj7-UVylbJXWP_8xn4xCSpu138AcGOwvw:1hUJER:dwta3zIpSLGycI3lMungW9CGi-U\x94." "PX" "3000"

This is surprising in two ways:

I have not told django_q to use caching at all, so why is it hitting redis at all?
Why is the traffic to redis from django_q so constant even when there are no jobs to do?

Here are my full q_cluster project settings:
Q_CLUSTER = {
    "name": "DjangORM",
    "workers": 10,
    "timeout": 90,
    "retry": None,
    "queue_limit": 50,
    "bulk": 10,
    "orm": "default",
    "ack_failures": True,
}

Thanks.

Does anyone see similar behavior, or is something unexpected going on?

This looks to be a polling mechanism from this function:
https://github.com/Koed00/django-q/blob/c84fd11a67c9a47d821786dfcdc189bb258c6f54/django_q/cluster.py#L200
This function runs every half second and checks for any stopped components (workers, monitors, scheduler, etc). Maybe the authors of this library can correct me if I'm wrong.

Well-spotted @WTFox, thanks. So it looks like intended behavior. Would be helpful if the docs mentioned this behavior (though I do see now that there is a documented poll interval you can set).
Closing, thanks.