Feature | cdn-s3-frontend/ Update versions constraint + Update modules versions

What?

Update and test Ref Architecture layers  with tf latest versions, Leverage CLI latest version and SSO feature enabled.

How?

Update tf version constrains v1.1.3
Update module version to the latest available
Modify deprecated parameter "logging_enabled" for  "cloudfront_access_logging_enabled"

Environment Versions

Leverage CLI : v1.7.2
Terraform:  v1.1.9
provider registry.terraform.io/hashicorp/aws v3.75.2
provider registry.terraform.io/hashicorp/local v2.2.3
provider registry.terraform.io/hashicorp/random v3.3.2
provider registry.terraform.io/hashicorp/time v0.7.2

Layers
apps-devstg/us-east-1/cdn-s3-frontend/
apps-prd/us-east-1/cdn-s3-frontend/
Why?
Keeping Leverage Reference Architecture up to date.
References
GitHub issue https://github.com/binbashar/le-tf-infra-aws/issues/370

TF COMMANDS
$ leverage terraform init
[13:44:13.380] INFO     Checking environment name definition in account.tfvars...
[13:44:13.389] INFO     ✔ OK
[13:44:13.397] INFO     Checking backend key...
[13:44:13.398] INFO     Found: 'apps-devstg/cdn-s3-frontend/terraform.tfstate'
[13:44:13.400] INFO     ✔ OK
[13:44:13.404] INFO     Checking backend.tfvars:
[13:44:13.406] INFO     Checking if profile starts with bb-apps-devstg...
[13:44:13.408] INFO     ✔ OK
[13:44:13.411] INFO     Checking if bucket starts with bb-apps-devstg...
[13:44:13.412] INFO     ✔ OK
[13:44:13.414] INFO     Checking if dynamodb table starts with bb-apps-devstg...
[13:44:13.417] INFO     ✔ OK

[16:44:15]    INFO	Attempting to get temporary credentials for apps-devstg account.
[16:44:17]    INFO	Using already configured temporary credentials.
[16:44:17]    INFO	Attempting to get temporary credentials for shared account.
[16:44:19]    INFO	Using already configured temporary credentials.
Initializing modules...
Downloading git::https://github.com/binbashar/terraform-aws-cloudfront-s3-cdn.git?ref=0.82.4 for dev_aws_binbash_com_ar...
- dev_aws_binbash_com_ar in .terraform/modules/dev_aws_binbash_com_ar
Downloading registry.terraform.io/cloudposse/route53-alias/aws 0.13.0 for dev_aws_binbash_com_ar.dns...
- dev_aws_binbash_com_ar.dns in .terraform/modules/dev_aws_binbash_com_ar.dns
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for dev_aws_binbash_com_ar.dns.this...
- dev_aws_binbash_com_ar.dns.this in .terraform/modules/dev_aws_binbash_com_ar.dns.this
Downloading registry.terraform.io/cloudposse/s3-log-storage/aws 0.26.0 for dev_aws_binbash_com_ar.logs...
- dev_aws_binbash_com_ar.logs in .terraform/modules/dev_aws_binbash_com_ar.logs
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for dev_aws_binbash_com_ar.logs.this...
- dev_aws_binbash_com_ar.logs.this in .terraform/modules/dev_aws_binbash_com_ar.logs.this
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for dev_aws_binbash_com_ar.origin_label...
- dev_aws_binbash_com_ar.origin_label in .terraform/modules/dev_aws_binbash_com_ar.origin_label
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for dev_aws_binbash_com_ar.this...
- dev_aws_binbash_com_ar.this in .terraform/modules/dev_aws_binbash_com_ar.this

Initializing the backend...

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- terraform.io/builtin/terraform is built in to Terraform
- Finding hashicorp/local versions matching ">= 1.2.0"...
- Finding hashicorp/aws versions matching ">= 2.0.0, >= 3.0.0, ~> 3.0, >= 3.64.0, < 4.0.0"...
- Finding hashicorp/random versions matching ">= 2.2.0"...
- Finding hashicorp/time versions matching ">= 0.7.0"...
- Installing hashicorp/local v2.2.3...
- Installed hashicorp/local v2.2.3 (signed by HashiCorp)
- Installing hashicorp/aws v3.75.2...
- Installed hashicorp/aws v3.75.2 (signed by HashiCorp)
- Installing hashicorp/random v3.3.2...
- Installed hashicorp/random v3.3.2 (signed by HashiCorp)
- Installing hashicorp/time v0.7.2...
- Installed hashicorp/time v0.7.2 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

$ leverage terraform apply
[16:12:20]    INFO	Attempting to get temporary credentials for apps-devstg account.
[16:12:22]    INFO	Using already configured temporary credentials.
[16:12:22]    INFO	Attempting to get temporary credentials for shared account.
[16:12:24]    INFO	Using already configured temporary credentials.
Acquiring state lock. This may take a few moments...

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create
 <= read (data resources)

Terraform will perform the following actions:

  # aws_route53_record.priv_oring_dev_aws_binbash_com_ar will be created
  + resource "aws_route53_record" "priv_oring_dev_aws_binbash_com_ar" {
      + allow_overwrite = (known after apply)
      + fqdn            = (known after apply)
      + id              = (known after apply)
      + name            = "dev.devstg.aws.binbash.com.ar"
      + type            = "A"
      + zone_id         = "Z0XXXXXXXXXXXXXXXXPDJ"

      + alias {
          + evaluate_target_health = false
          + name                   = (known after apply)
          + zone_id                = (known after apply)
        }
    }

  # module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.combined[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "combined"  {
      + id                      = (known after apply)
      + json                    = (known after apply)
      + source_policy_documents = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.s3_origin[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "s3_origin"  {
      + id            = (known after apply)
      + json          = (known after apply)
      + override_json = (known after apply)

      + statement {
          + actions   = [
              + "s3:GetObject",
            ]
          + resources = [
              + "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin/*",
            ]
          + sid       = "S3GetObjectForCloudFront"

          + principals {
              + identifiers = [
                  + (known after apply),
                ]
              + type        = "AWS"
            }
        }
      + statement {
          + actions   = [
              + "s3:ListBucket",
            ]
          + resources = [
              + "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin",
            ]
          + sid       = "S3ListBucketForCloudFront"

          + principals {
              + identifiers = [
                  + (known after apply),
                ]
              + type        = "AWS"
            }
        }
    }

  # module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.s3_ssl_only[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "s3_ssl_only"  {
      + id   = (known after apply)
      + json = (known after apply)

      + statement {
          + actions   = [
              + "s3:*",
            ]
          + effect    = "Deny"
          + resources = [
              + (known after apply),
              + (known after apply),
            ]
          + sid       = "ForceSSLOnlyAccess"

          + condition {
              + test     = "Bool"
              + values   = [
                  + "false",
                ]
              + variable = "aws:SecureTransport"
            }

          + principals {
              + identifiers = [
                  + "*",
                ]
              + type        = "*"
            }
        }
    }

  # module.dev_aws_binbash_com_ar.aws_cloudfront_distribution.default[0] will be created
  + resource "aws_cloudfront_distribution" "default" {
      + aliases                        = [
          + "dev.devstg.aws.binbash.com.ar",
        ]
      + arn                            = (known after apply)
      + caller_reference               = (known after apply)
      + comment                        = "Managed by Terraform"
      + default_root_object            = "index.html"
      + domain_name                    = (known after apply)
      + enabled                        = true
      + etag                           = (known after apply)
      + hosted_zone_id                 = (known after apply)
      + http_version                   = "http2"
      + id                             = (known after apply)
      + in_progress_validation_batches = (known after apply)
      + is_ipv6_enabled                = true
      + last_modified_time             = (known after apply)
      + price_class                    = "PriceClass_100"
      + retain_on_delete               = false
      + status                         = (known after apply)
      + tags                           = {
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + tags_all                       = {
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + trusted_key_groups             = (known after apply)
      + trusted_signers                = (known after apply)
      + wait_for_deployment            = true

      + default_cache_behavior {
          + allowed_methods        = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + cached_methods         = [
              + "GET",
              + "HEAD",
              + "OPTIONS",
            ]
          + compress               = true
          + default_ttl            = 60
          + max_ttl                = 15552000
          + min_ttl                = 0
          + target_origin_id       = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar"
          + trusted_key_groups     = []
          + trusted_signers        = []
          + viewer_protocol_policy = "redirect-to-https"

          + forwarded_values {
              + headers                 = [
                  + "Access-Control-Request-Headers",
                  + "Access-Control-Request-Method",
                  + "Origin",
                ]
              + query_string            = false
              + query_string_cache_keys = []

              + cookies {
                  + forward           = "none"
                  + whitelisted_names = (known after apply)
                }
            }
        }

      + logging_config {
          + bucket          = (known after apply)
          + include_cookies = false
        }

      + origin {
          + connection_attempts = 3
          + connection_timeout  = 10
          + domain_name         = (known after apply)
          + origin_id           = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar"

          + s3_origin_config {
              + origin_access_identity = (known after apply)
            }
        }

      + restrictions {
          + geo_restriction {
              + locations        = (known after apply)
              + restriction_type = "none"
            }
        }

      + viewer_certificate {
          + acm_certificate_arn            = "arn:aws:acm:us-east-1:52XXXXXXXXX4:certificate/52ed035XXXXXXXXXXXXXXXXe21774"
          + cloudfront_default_certificate = false
          + minimum_protocol_version       = "TLSv1"
          + ssl_support_method             = "sni-only"
        }
    }

  # module.dev_aws_binbash_com_ar.aws_cloudfront_origin_access_identity.default[0] will be created
  + resource "aws_cloudfront_origin_access_identity" "default" {
      + caller_reference                = (known after apply)
      + cloudfront_access_identity_path = (known after apply)
      + comment                         = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar"
      + etag                            = (known after apply)
      + iam_arn                         = (known after apply)
      + id                              = (known after apply)
      + s3_canonical_user_id            = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket.origin[0] will be created
  + resource "aws_s3_bucket" "origin" {
      + acceleration_status         = (known after apply)
      + acl                         = "private"
      + arn                         = (known after apply)
      + bucket                      = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = true
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Attributes"  = "origin"
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + tags_all                    = {
          + "Attributes"  = "origin"
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule {
          + allowed_headers = [
              + "*",
            ]
          + allowed_methods = [
              + "GET",
            ]
          + allowed_origins = [
              + "dev.devstg.aws.binbash.com.ar",
            ]
          + expose_headers  = [
              + "ETag",
            ]
          + max_age_seconds = 3600
        }

      + object_lock_configuration {
          + object_lock_enabled = (known after apply)

          + rule {
              + default_retention {
                  + days  = (known after apply)
                  + mode  = (known after apply)
                  + years = (known after apply)
                }
            }
        }

      + server_side_encryption_configuration {
          + rule {
              + apply_server_side_encryption_by_default {
                  + sse_algorithm = "AES256"
                }
            }
        }

      + versioning {
          + enabled    = true
          + mfa_delete = false
        }
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket_ownership_controls.origin[0] will be created
  + resource "aws_s3_bucket_ownership_controls" "origin" {
      + bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin"
      + id     = (known after apply)

      + rule {
          + object_ownership = "ObjectWriter"
        }
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket_policy.default[0] will be created
  + resource "aws_s3_bucket_policy" "default" {
      + bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin"
      + id     = (known after apply)
      + policy = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.time_sleep.wait_for_aws_s3_bucket_settings[0] will be created
  + resource "time_sleep" "wait_for_aws_s3_bucket_settings" {
      + create_duration  = "30s"
      + destroy_duration = "30s"
      + id               = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.module.logs.data.aws_iam_policy_document.aggregated_policy[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "aggregated_policy"  {
      + id            = (known after apply)
      + json          = (known after apply)
      + override_json = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.module.logs.data.aws_iam_policy_document.bucket_policy[0] will be read during apply
  # (config refers to values not yet known)
 <= data "aws_iam_policy_document" "bucket_policy"  {
      + id   = (known after apply)
      + json = (known after apply)

      + statement {
          + actions   = [
              + "s3:*",
            ]
          + effect    = "Deny"
          + resources = [
              + (known after apply),
              + (known after apply),
            ]
          + sid       = "ForceSSLOnlyAccess"

          + condition {
              + test     = "Bool"
              + values   = [
                  + "false",
                ]
              + variable = "aws:SecureTransport"
            }

          + principals {
              + identifiers = [
                  + "*",
                ]
              + type        = "*"
            }
        }
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default[0] will be created
  + resource "aws_s3_bucket" "default" {
      + acceleration_status         = (known after apply)
      + acl                         = "log-delivery-write"
      + arn                         = (known after apply)
      + bucket                      = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs"
      + bucket_domain_name          = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = true
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "Attributes"  = "logs"
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + tags_all                    = {
          + "Attributes"  = "logs"
          + "Environment" = "apps-devstg"
          + "Name"        = "devstg.aws.binbash.com.ar"
          + "Namespace"   = "bb-apps-devstg-frontend"
          + "Stage"       = "dev"
          + "Terraform"   = "true"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + lifecycle_rule {
          + abort_incomplete_multipart_upload_days = 5
          + enabled                                = true
          + id                                     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs"

          + expiration {
              + days = 90
            }

          + noncurrent_version_expiration {
              + days = 90
            }

          + noncurrent_version_transition {
              + days          = 30
              + storage_class = "GLACIER"
            }

          + transition {
              + days          = 30
              + storage_class = "STANDARD_IA"
            }
          + transition {
              + days          = 60
              + storage_class = "GLACIER"
            }
        }

      + object_lock_configuration {
          + object_lock_enabled = (known after apply)

          + rule {
              + default_retention {
                  + days  = (known after apply)
                  + mode  = (known after apply)
                  + years = (known after apply)
                }
            }
        }

      + server_side_encryption_configuration {
          + rule {
              + apply_server_side_encryption_by_default {
                  + sse_algorithm = "AES256"
                }
            }
        }

      + versioning {
          + enabled    = false
          + mfa_delete = false
        }
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_ownership_controls.default[0] will be created
  + resource "aws_s3_bucket_ownership_controls" "default" {
      + bucket = (known after apply)
      + id     = (known after apply)

      + rule {
          + object_ownership = "BucketOwnerPreferred"
        }
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_policy.default[0] will be created
  + resource "aws_s3_bucket_policy" "default" {
      + bucket = (known after apply)
      + id     = (known after apply)
      + policy = (known after apply)
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_public_access_block.default[0] will be created
  + resource "aws_s3_bucket_public_access_block" "default" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

  # module.dev_aws_binbash_com_ar.module.logs.time_sleep.wait_for_aws_s3_bucket_settings[0] will be created
  + resource "time_sleep" "wait_for_aws_s3_bucket_settings" {
      + create_duration  = "30s"
      + destroy_duration = "30s"
      + id               = (known after apply)
    }

Plan: 12 to add, 0 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│
│   with module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default,
│   on .terraform/modules/dev_aws_binbash_com_ar.logs/main.tf line 1, in resource "aws_s3_bucket" "default":
│    1: resource "aws_s3_bucket" "default" {
│
│ Use the aws_s3_bucket_server_side_encryption_configuration resource instead
│
│ (and 18 more similar warnings elsewhere)
╵

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

   This may take a few moments...

Apply complete! Resources: 12 added, 0 changed, 0 destroyed.

resources created
$ leverage tf shell
/binbash/apps-devstg/us-east-1/cdn-s3-frontend # terraform state list
data.aws_iam_policy_document.additional_bucket_policy
data.terraform_remote_state.certificates
data.terraform_remote_state.dns-shared
aws_route53_record.priv_oring_dev_aws_binbash_com_ar
module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.combined[0]
module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.s3_origin[0]
module.dev_aws_binbash_com_ar.data.aws_iam_policy_document.s3_ssl_only[0]
module.dev_aws_binbash_com_ar.data.aws_partition.current[0]
module.dev_aws_binbash_com_ar.aws_cloudfront_distribution.default[0]
module.dev_aws_binbash_com_ar.aws_cloudfront_origin_access_identity.default[0]
module.dev_aws_binbash_com_ar.aws_s3_bucket.origin[0]
module.dev_aws_binbash_com_ar.aws_s3_bucket_ownership_controls.origin[0]
module.dev_aws_binbash_com_ar.aws_s3_bucket_policy.default[0]
module.dev_aws_binbash_com_ar.time_sleep.wait_for_aws_s3_bucket_settings[0]
module.dev_aws_binbash_com_ar.module.logs.data.aws_caller_identity.current
module.dev_aws_binbash_com_ar.module.logs.data.aws_iam_policy_document.aggregated_policy[0]
module.dev_aws_binbash_com_ar.module.logs.data.aws_iam_policy_document.bucket_policy[0]
module.dev_aws_binbash_com_ar.module.logs.data.aws_partition.current
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default[0]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_ownership_controls.default[0]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_policy.default[0]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_public_access_block.default[0]
module.dev_aws_binbash_com_ar.module.logs.time_sleep.wait_for_aws_s3_bucket_settings[0]

$ leverage terraform destroy
[16:31:13]    INFO	Attempting to get temporary credentials for apps-devstg account.
[16:31:22]    INFO	Credentials for apps-devstg account written successfully.
[16:31:22]    INFO	Attempting to get temporary credentials for shared account.
[16:31:33]    INFO	Credentials for shared account written successfully.
Acquiring state lock. This may take a few moments...
module.dev_aws_binbash_com_ar.aws_s3_bucket.origin[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin]
module.dev_aws_binbash_com_ar.aws_cloudfront_origin_access_identity.default[0]: Refreshing state... [id=XXXXXXXXXXX]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs]
module.dev_aws_binbash_com_ar.aws_s3_bucket_policy.default[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_public_access_block.default[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs]
module.dev_aws_binbash_com_ar.aws_cloudfront_distribution.default[0]: Refreshing state... [id=XXXXXXXXXXX]
module.dev_aws_binbash_com_ar.time_sleep.wait_for_aws_s3_bucket_settings[0]: Refreshing state... [id=2022-07-15T16:13:53Z]
module.dev_aws_binbash_com_ar.aws_s3_bucket_ownership_controls.origin[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_policy.default[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs]
module.dev_aws_binbash_com_ar.module.logs.time_sleep.wait_for_aws_s3_bucket_settings[0]: Refreshing state... [id=2022-07-15T16:13:53Z]
module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_ownership_controls.default[0]: Refreshing state... [id=bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs]
aws_route53_record.priv_oring_dev_aws_binbash_com_ar: Refreshing state... [id=XXXXXXXXXXX_dev.devstg.aws.binbash.com.ar_A]

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

Terraform will perform the following actions:

  # aws_route53_record.priv_oring_dev_aws_binbash_com_ar will be destroyed
  - resource "aws_route53_record" "priv_oring_dev_aws_binbash_com_ar" {
      - fqdn    = "dev.devstg.aws.binbash.com.ar" -> null
      - id      = "XXXXXXXXXXX_dev.devstg.aws.binbash.com.ar_A" -> null
      - name    = "dev.devstg.aws.binbash.com.ar" -> null
      - records = [] -> null
      - ttl     = 0 -> null
      - type    = "A" -> null
      - zone_id = "XXXXXXXXXXX" -> null

      - alias {
          - evaluate_target_health = false -> null
          - name                   = "d3XXXXXXXXb.cloudfront.net" -> null
          - zone_id                = "XXXXXXXXXXX" -> null
        }
    }

  # module.dev_aws_binbash_com_ar.aws_cloudfront_distribution.default[0] will be destroyed
  - resource "aws_cloudfront_distribution" "default" {
      - aliases                        = [
          - "dev.devstg.aws.binbash.com.ar",
        ] -> null
      - arn                            = "arn:aws:cloudfront::52XXXXXXXX4:distribution/XXXXXXXXXXX" -> null
      - caller_reference               = "terraform-20220715161322655500000002" -> null
      - comment                        = "Managed by Terraform" -> null
      - default_root_object            = "index.html" -> null
      - domain_name                    = "d3vz2av3uh41b.cloudfront.net" -> null
      - enabled                        = true -> null
      - etag                           = "E242O348V7HKZT" -> null
      - hosted_zone_id                 = "XXXXXXXXXXX" -> null
      - http_version                   = "http2" -> null
      - id                             = "XXXXXXXXXXX" -> null
      - in_progress_validation_batches = 0 -> null
      - is_ipv6_enabled                = true -> null
      - last_modified_time             = "2022-07-15 16:13:24.271 +0000 UTC" -> null
      - price_class                    = "PriceClass_100" -> null
      - retain_on_delete               = false -> null
      - status                         = "Deployed" -> null
      - tags                           = {
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null
      - tags_all                       = {
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null
      - trusted_key_groups             = [
          - {
              - enabled = false
              - items   = []
            },
        ] -> null
      - trusted_signers                = [
          - {
              - enabled = false
              - items   = []
            },
        ] -> null
      - wait_for_deployment            = true -> null

      - default_cache_behavior {
          - allowed_methods        = [
              - "GET",
              - "HEAD",
              - "OPTIONS",
            ] -> null
          - cached_methods         = [
              - "GET",
              - "HEAD",
              - "OPTIONS",
            ] -> null
          - compress               = true -> null
          - default_ttl            = 60 -> null
          - max_ttl                = 15552000 -> null
          - min_ttl                = 0 -> null
          - smooth_streaming       = false -> null
          - target_origin_id       = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar" -> null
          - trusted_key_groups     = [] -> null
          - trusted_signers        = [] -> null
          - viewer_protocol_policy = "redirect-to-https" -> null

          - forwarded_values {
              - headers                 = [
                  - "Access-Control-Request-Headers",
                  - "Access-Control-Request-Method",
                  - "Origin",
                ] -> null
              - query_string            = false -> null
              - query_string_cache_keys = [] -> null

              - cookies {
                  - forward           = "none" -> null
                  - whitelisted_names = [] -> null
                }
            }
        }

      - logging_config {
          - bucket          = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs.s3.amazonaws.com" -> null
          - include_cookies = false -> null
        }

      - origin {
          - connection_attempts = 3 -> null
          - connection_timeout  = 10 -> null
          - domain_name         = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin.s3.amazonaws.com" -> null
          - origin_id           = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar" -> null

          - s3_origin_config {
              - origin_access_identity = "origin-access-identity/cloudfront/XXXXXXXXXXX" -> null
            }
        }

      - restrictions {
          - geo_restriction {
              - locations        = [] -> null
              - restriction_type = "none" -> null
            }
        }

      - viewer_certificate {
          - acm_certificate_arn            = "arn:aws:acm:us-east-1:52XXXXXXXX4:certificate/52XXXX5e-XXXXX-XXXXX-XXXXXX-8XXXXXX774" -> null
          - cloudfront_default_certificate = false -> null
          - minimum_protocol_version       = "TLSv1" -> null
          - ssl_support_method             = "sni-only" -> null
        }
    }

  # module.dev_aws_binbash_com_ar.aws_cloudfront_origin_access_identity.default[0] will be destroyed
  - resource "aws_cloudfront_origin_access_identity" "default" {
      - caller_reference                = "terraform-20220715161302940200000001" -> null
      - cloudfront_access_identity_path = "origin-access-identity/cloudfront/XXXXXXXXXXX" -> null
      - comment                         = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar" -> null
      - etag                            = "XXXXXXXXXXX" -> null
      - iam_arn                         = "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity XXXXXXXXXXX" -> null
      - id                              = "XXXXXXXXXXX" -> null
      - s3_canonical_user_id            = "c525071XXXXXXXXXXXXXXXXX7c98" -> null
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket.origin[0] will be destroyed
  - resource "aws_s3_bucket" "origin" {
      - acl                         = "private" -> null
      - arn                         = "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - bucket                      = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - bucket_domain_name          = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin.s3.amazonaws.com" -> null
      - bucket_regional_domain_name = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin.s3.amazonaws.com" -> null
      - force_destroy               = true -> null
      - hosted_zone_id              = "XXXXXXXXXXX" -> null
      - id                          = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - object_lock_enabled         = false -> null
      - region                      = "us-east-1" -> null
      - request_payer               = "BucketOwner" -> null
      - tags                        = {
          - "Attributes"  = "origin"
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null
      - tags_all                    = {
          - "Attributes"  = "origin"
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null

      - cors_rule {
          - allowed_headers = [
              - "*",
            ] -> null
          - allowed_methods = [
              - "GET",
            ] -> null
          - allowed_origins = [
              - "dev.devstg.aws.binbash.com.ar",
            ] -> null
          - expose_headers  = [
              - "ETag",
            ] -> null
          - max_age_seconds = 3600 -> null
        }

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

      - versioning {
          - enabled    = true -> null
          - mfa_delete = false -> null
        }
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket_ownership_controls.origin[0] will be destroyed
  - resource "aws_s3_bucket_ownership_controls" "origin" {
      - bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - id     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null

      - rule {
          - object_ownership = "ObjectWriter" -> null
        }
    }

  # module.dev_aws_binbash_com_ar.aws_s3_bucket_policy.default[0] will be destroyed
  - resource "aws_s3_bucket_policy" "default" {
      - bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - id     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:GetObject"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity XXXXXXXXXXX"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin/*"
                      - Sid       = "S3GetObjectForCloudFront"
                    },
                  - {
                      - Action    = "s3:ListBucket"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity XXXXXXXXXXX"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin"
                      - Sid       = "S3ListBucketForCloudFront"
                    },
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = {
                          - AWS = "*"
                        }
                      - Resource  = "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin/*"
                      - Sid       = "EnforceSSlRequestsOnly"
                    },
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = "*"
                      - Resource  = [
                          - "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin/*",
                          - "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-origin",
                        ]
                      - Sid       = "ForceSSLOnlyAccess"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # module.dev_aws_binbash_com_ar.time_sleep.wait_for_aws_s3_bucket_settings[0] will be destroyed
  - resource "time_sleep" "wait_for_aws_s3_bucket_settings" {
      - create_duration  = "30s" -> null
      - destroy_duration = "30s" -> null
      - id               = "2022-07-15T16:13:53Z" -> null
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default[0] will be destroyed
  - resource "aws_s3_bucket" "default" {
      - acl                         = "log-delivery-write" -> null
      - arn                         = "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - bucket                      = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - bucket_domain_name          = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs.s3.amazonaws.com" -> null
      - bucket_regional_domain_name = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs.s3.amazonaws.com" -> null
      - force_destroy               = true -> null
      - hosted_zone_id              = "XXXXXXXXXXX" -> null
      - id                          = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - object_lock_enabled         = false -> null
      - region                      = "us-east-1" -> null
      - request_payer               = "BucketOwner" -> null
      - tags                        = {
          - "Attributes"  = "logs"
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null
      - tags_all                    = {
          - "Attributes"  = "logs"
          - "Environment" = "apps-devstg"
          - "Name"        = "devstg.aws.binbash.com.ar"
          - "Namespace"   = "bb-apps-devstg-frontend"
          - "Stage"       = "dev"
          - "Terraform"   = "true"
        } -> null

      - lifecycle_rule {
          - abort_incomplete_multipart_upload_days = 5 -> null
          - enabled                                = true -> null
          - id                                     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
          - tags                                   = {} -> null

          - expiration {
              - days                         = 90 -> null
              - expired_object_delete_marker = false -> null
            }

          - noncurrent_version_expiration {
              - days = 90 -> null
            }

          - noncurrent_version_transition {
              - days          = 30 -> null
              - storage_class = "GLACIER" -> null
            }

          - transition {
              - days          = 30 -> null
              - storage_class = "STANDARD_IA" -> null
            }
          - transition {
              - days          = 60 -> null
              - storage_class = "GLACIER" -> null
            }
        }

      - server_side_encryption_configuration {
          - rule {
              - bucket_key_enabled = false -> null

              - apply_server_side_encryption_by_default {
                  - sse_algorithm = "AES256" -> null
                }
            }
        }

      - versioning {
          - enabled    = false -> null
          - mfa_delete = false -> null
        }
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_ownership_controls.default[0] will be destroyed
  - resource "aws_s3_bucket_ownership_controls" "default" {
      - bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - id     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null

      - rule {
          - object_ownership = "BucketOwnerPreferred" -> null
        }
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_policy.default[0] will be destroyed
  - resource "aws_s3_bucket_policy" "default" {
      - bucket = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - id     = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - policy = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "s3:*"
                      - Condition = {
                          - Bool = {
                              - "aws:SecureTransport" = [
                                  - "false",
                                ]
                            }
                        }
                      - Effect    = "Deny"
                      - Principal = "*"
                      - Resource  = [
                          - "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs/*",
                          - "arn:aws:s3:::bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs",
                        ]
                      - Sid       = "ForceSSLOnlyAccess"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket_public_access_block.default[0] will be destroyed
  - resource "aws_s3_bucket_public_access_block" "default" {
      - block_public_acls       = true -> null
      - block_public_policy     = true -> null
      - bucket                  = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - id                      = "bb-apps-devstg-frontend-dev-devstgawsbinbashcomar-logs" -> null
      - ignore_public_acls      = true -> null
      - restrict_public_buckets = true -> null
    }

  # module.dev_aws_binbash_com_ar.module.logs.time_sleep.wait_for_aws_s3_bucket_settings[0] will be destroyed
  - resource "time_sleep" "wait_for_aws_s3_bucket_settings" {
      - create_duration  = "30s" -> null
      - destroy_duration = "30s" -> null
      - id               = "2022-07-15T16:13:53Z" -> null
    }

Plan: 0 to add, 0 to change, 12 to destroy.
╷
│ Warning: Argument is deprecated
│
│   with module.dev_aws_binbash_com_ar.module.logs.aws_s3_bucket.default,
│   on .terraform/modules/dev_aws_binbash_com_ar.logs/main.tf line 1, in resource "aws_s3_bucket" "default":
│    1: resource "aws_s3_bucket" "default" {
│
│ Use the aws_s3_bucket_versioning resource instead
│
│ (and 10 more similar warnings elsewhere)
╵

Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

   This may take a few moments...

Destroy complete! Resources: 12 destroyed.

Warning messages
Warning messages during execution of $leverage terrraform plan about deprecated arguments .

to see all of them in one place, we can use the following command:
$ leverage terraform shell

$ terraform validate -json | \
> jq '.diagnostics[] |  {severity:.severity, summary:.summary, detail: .detail, address: .address, filename: .range.filename, start_line: .range.start.line}'

All the warnings are about deprecated parameters that are used by the source module but it not affect the creation of resources.
All of them are documented here:
https://registry.terraform.io/providers/hashicorp/aws/3.75.2/docs/resources/s3_bucket


Create release for Event Hubs.

Description
Prepare release for Event Hubs in November.
All SDK Contribution checklist:

[x] The pull request does not introduce [breaking changes]
[x] CHANGELOG is updated for new features, bug fixes or other significant changes.
[x] I have read the contribution guidelines.

General Guidelines and Best Practices

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


Attach CSV Tables Shortcode

Feature Request
I wanted to include a CSV file in my posts. This blog post discusses how to implement this with inline CSV. A shortcode that can do this straight away is much easier to work with.
Is your feature request related to a problem? Please describe.
I understand it's possible to embed google sheets, but I want to keep my data within my git repo.
Describe the solution you'd like
Read CSV from

[x] page dir
[x] remote url
[ ] inline csv

Also,

[x] support files with any delimiter other than a comma

Describe alternatives you've considered
Embed google sheets
Additional context
Add any other context or screenshots about the feature request here.

Check out the following link for an example.
https://bevs.xyz/resource/movies/


Init requires a a token not API key

Hello a couple of suggestions to make it a bit easier to understand the documentation.
Would it be possible to update the documentation to explicitly say that the init function requires the token?
In addition it would be helpful if it explained that "billybob" could be substituted for the distinct id of the user. Fairly obvious when you get into it bit just something that you should not have to check.
Happy to add this via pull request if you would like.
Thanks!

Good call! I also tripped over this. I naturally assumed the secret would be needed here.

Sure, there are a lot of things we tend to take for granted in the Mixpanel libs that could be clearer, such as that you can't use our tracking libs without a token. If you'd like to throw together a quick PR with changes you'd like in the docs, that would be super helpful!


Hover punctum not working

When inserting neume, the updateFollowPunctum function not working and nothing appears on the editor when moving the mouse around.

Fixed in 812329ffb9867677d8c442129a990dadb70c43b9


Please consider adding example code

The provided snipped on the project's readme doesn't even state which classes it's importing. I was unable to find out what argument is or where it is coming from. That's just one example but there are many more. I think a full example of a few simple commands should suffice.

You can for example see it being used in the tests, see:
https://github.com/Mojang/brigadier/blob/bbfb8a7da1b4836eefe580438b47769fd0d69254/src/test/java/com/mojang/brigadier/CommandSuggestionsTest.java#L22

After digging through the test cases I think I got a fairly good understanding how to use this library, thanks for the hint. However I'm still unable to compile even the base example. Here is a minimal example I created to test the issue:
import com.mojang.brigadier.CommandDispatcher;

import static com.mojang.brigadier.arguments.IntegerArgumentType.*;
import static com.mojang.brigadier.builder.LiteralArgumentBuilder.*;
import static com.mojang.brigadier.builder.RequiredArgumentBuilder.*;

public class BrigadierMinimal {

	public static void main(String[] args) {
		CommandDispatcher<String> dispatcher = new CommandDispatcher<>();
		dispatcher.register(literal("foo")
			.then(argument("bar", integer())
				.executes(c -> {
					System.out.println("Bar is " + getInteger(c, "bar"));
					return 1;
				})
			)
			.executes(c -> {
				System.out.println("Called foo with no arguments");
				return 1;
			})
		);
	}
}

The error reported by the compiler (JDK 10.0.2) is as follows
Error:(21, 58) java: incompatible types: com.mojang.brigadier.builder.LiteralArgumentBuilder<java.lang.Object> cannot be converted to com.mojang.brigadier.builder.LiteralArgumentBuilder<java.lang.String>

Apparently, Java is unable to correctly infere the generic type of argument and literal which should be String and instead comes to the conclusion that the generic type must be Object. Explicitly setting the proper type (see https://stackoverflow.com/a/5297999) solves the issue but makes me wonder if this is actually intended behavior. I noticed that all tests are using Object as the generic sender type and thous will never encounter this issue.
So I'm uncertain if I just ran into a strange compiler bug that only affects my specific setup or if I'm actually doing something wrong.

It's a more general thing.  MC itself defines more specific versions to work around that and statically imports those instead:
    public static LiteralArgumentBuilder<CommandSource> literal(String name) {
        return LiteralArgumentBuilder.<CommandSource>literal(name);
    }

    public static <T> RequiredArgumentBuilder<CommandSource, T> argument(String name, ArgumentType<T> type) {
        return RequiredArgumentBuilder.<CommandSource, T>argument(name, type);
    }

Can anyone show me a good example of using fork, redirect and forward. i has look in the tests but still doesn't understand it clearly.

So I am new to modding minecraft but figured I would mod 1.14 since it is the latest at the moment of writing this.  I stuck the code from the readme into my mod but it does not seem to link to the in-game console.  I want to create a custom command: "/import" that opens a dialog window but when I type the command in the console it says 'Unknown command'.
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.common.MinecraftForge;
import com.mojang.brigadier.CommandDispatcher;

@Mod("importexportmod")
public class ImportExportMod {
    private final Logger log = LogManager.getLogger();
    private final ImportScreen importScreen = new ImportScreen();

    public ImportExportMod() {
        log.info("new ImportExportMod");

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);

        CommandDispatcher<CommandSource> dispatcher = new CommandDispatcher<>();
        dispatcher.register(Commands.literal("import").executes(command -> {
            log.info("import command dispatched");

            //importScreen.show();

            return 0;
        }));
    }
}

I imagine I am doing something wrong creating a new CommandDispatcher instead of acquiring one already created and linked to the command console.

I agree that some example code is needed, especially code that shows people how to properly create new arguments!

Have a +1 from me.
I too want some kind of workable sample code of how you use this. More than the fragmented snippets seen in this thread, that is.

So I did write up a tutorial on how to use brigadier within a fabric context but I did explain much of brigadier's logic including creating an argument type to parse a uuid which applies to about any project that would use brigadier (including some examples and even chainable commands [not exactly with any current logic to in a slight example).
https://fabricmc.net/wiki/tutorial:commands#brigadier_explained
This is also a great explanation on how to do brigadier a bit less messy. I've been using this personally in recent weeks.
https://gist.github.com/falkreon/f58bb91e45ba558bc7fd827e81c6cb45

I struggle with creating a command source object,
Whenever I try creating a CommandDispatcher with my own CommandSource as the  type, my compiler starts complaning that CommandSource can't be converted to Object.
Clearly something is wrong, but I can't tell if the fault lies in my code or Brigadier.
All the test-code I find in the sourcecode all use Object as the source type. And the example in the readme don't show how the argument classes are imported.
Please, we need a proper example code that shows how to properly set this up!


Could not access data at URI for repository [hello-world-local]

Steps for reproducing the issue:
Run ./build.sh in /frameworks/helloworld
Run dcos package install helloworld
I get:

Could not access data at URI for repository [hello-world-local]: http://<IP_ADDRESS>:42512/stub-universe-hello-world.json

When visiting http://<IP_ADDRESS>/#/universe/packages/
I get this:

This got solved after I installed Marathon in my local environment. Deploying an application generated with new-framework.sh and deploying it generates the same error.


GR-SAKURA has been added to the UsbVid

Support GR-SAKURA
refs https://github.com/ksksue/PhysicaloidLibrary/pull/13

v1.0.2


broken local snapshotrevert action in one_vmm_exec

Description
local override of the snapshotrevert action is not working.
To Reproduce

define a local override script for snapshotrevert in the VM_MAD ARGUMENTS -l snapshotrevert=snapshot_revert.local ...
issue VM snapshot revert command

The remote snapshot revert command is called.
Expected behavior
The defined local script should be called
Details

Affected Component: [one_vmm_exec]
Hypervisor: [KVM]
Version: [6.8.0]

Additional context
The bug is introduced with https://github.com/OpenNebula/one/commit/2efd9766453a45aae69bcc5bbdf952c50c942d9c

Progress Status

[ ] Code committed
[ ] Testing - QA
[ ] Documentation (Release notes - resolved issues, compatibility, known issues)

edit: fix action name: it is revert not restore

I have a workaround, defining ... -l snapshot_revert=local_snapshot_revert ... but it is inconsistent with the rest of the overrides (snapshocreate and snapshotdelete)


Code update

Please update this code to your file, your code is old and will not run,
fileprivate extension CGPath {
  func apply(closure: CGPathApplierClosure) {
    self.apply(info: unsafeBitCast(closure, to: UnsafeMutableRawPointer.self)) { (info, element) in
      let block = unsafeBitCast(info, to: CGPathApplierClosure.self)
      block(element.pointee)
    }
  }
}

replace above function with
fileprivate extension CGPath {
    func apply(closure: CGPathApplierClosure) {
        withoutActuallyEscaping(closure) { escapedClosure in
            self.apply(info: unsafeBitCast(escapedClosure, to: UnsafeMutableRawPointer.self)) { (info, element) in
                let block = unsafeBitCast(info, to: CGPathApplierClosure.self)
                block(element.pointee)
            }
        }
    }
}

also, there are few warnings, please check and update it, if possible give cocoa pods support for this feature.
i want to thank you for creating this file, this helps me so much that i can not able to get any kind of solution on internet.

Should be fixed by #11


2019-03-19T08:50:42.1182599Z ##[error]Microsoft.TeamFoundation.DistributedTask.Task.TestExecution.NoTestPointsException: No automated test cases were found matching the specified test plan, test suites, test configuration. Ensure that right values were specified and try again.

Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Environment

Server - Azure Pipelines or TFS on-premises?

If using TFS on-premises, provide the version:

If using Azure Pipelines, provide the account name, team project name, build definition name/build number:

Agent - Hosted or Private:

If using Hosted agent, provide agent queue name:

If using private agent, provide the OS of the machine running the agent and the agent version:

Issue Description
[Include task name(s), screenshots and any other relevant details]
Task logs
[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]
Error logs
[Insert error from the logs here for a quick overview]

@RajnishGitHub - can you fill out the template with the details and then title?


Unable to read Sentinel-2 products from archive

When given an archive for S2 products, eoreader raises an exception when it is trying to access the band data.
This error was encountered when tested through extreactEO.
It works like intended when given a SAFE product, only the archive creates an issue.
This is the complete error :
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/extracteo/orchestrators/sequential.py", line 264, in run_sequential
    module.in_product_loop(eeo_data)
  File "/usr/local/lib/python3.9/site-packages/extracteo/modules/analysis/emsr_formatting.py", line 269, in in_product_loop
    stack_path = self.stack(
  File "/usr/local/lib/python3.9/site-packages/extracteo/modules/analysis/emsr_formatting.py", line 360, in stack
    prod.stack(
  File "/usr/local/lib/python3.9/site-packages/eoreader/products/product.py", line 1668, in stack
    band_xds = self.load(bands, pixel_size=pixel_size, size=size, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/eoreader/products/product.py", line 891, in load
    band_xds = self._load(unique_bands, pixel_size, size, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/eoreader/products/product.py", line 989, in _load
    loaded_bands = self._load_bands(
  File "/usr/local/lib/python3.9/site-packages/eoreader/products/optical/s2_product.py", line 1227, in _load_bands
    band_paths = self.get_band_paths(bands, pixel_size=pixel_size, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/eoreader/products/optical/s2_product.py", line 646, in get_band_paths
    raise InvalidProductError(
eoreader.exceptions.InvalidProductError: Non existing SpectralBandNames.RED (04) band for /home/data/DATA/test_EEO/S2B_MSIL1C_20240507T155819_N0510_R097_T17TQG_20240507T193837.zip

eoreader version: 0.21.1 (through extractEO stable)

Fixed 😉
You'll have to wait for next version of EEO though.


If you add the static library to the NativeReferences folder, a linkwith.cs file is not generated as this doc suggests.

In this section's step 3:
https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/walkthrough?tabs=macos#including-the-static-library-in-the-binding-project
It says that, "When the .a file is added to the project, Xamarin.iOS will automatically set the Build Action of the file to ObjcBindingNativeLibrary, and create a special file called libInfColorPickerSDK.linkwith.cs."
But this is only true if you add the .a file to the root of the binding projevct and not to the NativeReferences folder. If you add the .a file to the NativeReference folder, then you can use the properties for the NativeReference to set the things that otherwise would be set in the .linkwith.cs file. So either change how the .a static library is added to the project or talk about setting the properties for the .a file and don't mention the linkwith.cs file.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c37f6af1-e697-321a-a3ac-077446a8a3fe
Version Independent ID: f3e6b4c1-6910-f7ec-6f3b-0d3709ce2a82
Content: Walkthrough: Binding an iOS Objective-C Library - Xamarin
Content Source: docs/ios/platform/binding-objective-c/walkthrough.md
Product: xamarin
Technology: xamarin-ios
GitHub Login: @lobrien
Microsoft Alias: laobri

I too am not seeing this file get created

Hi,
Though I set the properties for .a file, It gets crashed on the device.
like-

This is a helpful question! Could you please point what should the end result be? Should I add the .a file to NativeReferences folder or the root directory?

You can add it either place. The difference is just how you set the build and linker properties for the file, whether in the properties pane if the static library is added to the NativeReferences folder, or in the *.linkwith.cs file if it is added to the root directory.

Thanks for submitting an issue and we apologize for the delayed response. The requested updates haven't been made since the creation of the issue, and the timeline for resolution may vary based on resourcing, so the issue is being moved to an internal repo to better track it.


Rootful connection refused for Java app

Podman 1.8.2
Fedora 31 Workstation

Given this Containerfile:
FROM openjdk:15

RUN yum install unzip -y && \
    curl https://languagetool.org/download/LanguageTool-4.9.zip -o lt.zip

RUN unzip lt.zip && \
    mv LanguageTool-4.9 /opt/languagetool

ADD startup.sh /startup.sh

EXPOSE 8081

CMD /startup.sh

And this startup.sh:
#!/bin/sh

/usr/bin/java -cp /opt/languagetool/languagetool-server.jar org.languagetool.server.HTTPServer --allow-origin '*'

I then run podman build . -t langtool:latest, once for my regular user and once for root user.
Then when I run it as regular user with podman run -p 8081:8081 localhost/langtool:latest and try to access it curl localhost:8081 I get, as expected:
Error: Missing arguments for LanguageTool API. Please see https://languagetool.org/http-api/swagger-ui/#/default

When I run the same command as root, all I get is:
curl: (7) Failed to connect to localhost port 8081: Connection refused

Same happens if I curl container IP etc. If I exec into container and try from the inside, it works fine.
Seems like while rootless slirp2netns works fine, regular rootfull CNI has some issues in this case.
It gets weirder when I try to run, for example, community nginx image:
podman run -P nginx

Then, when I compare two containers:
# podman ps
CONTAINER ID  IMAGE                           COMMAND               CREATED         STATUS             PORTS                    NAMES
2f1013925bdb  docker.io/library/nginx:latest  nginx -g daemon o...  30 seconds ago  Up 29 seconds ago  <IP_ADDRESS>:45181->80/tcp    interesting_dubinsky
aa709df10d30  localhost/langtool:latest       /bin/sh -c /start...  39 seconds ago  Up 39 seconds ago  <IP_ADDRESS>:36817->8081/tcp  elastic_lumiere

# curl localhost:45181
<!DOCTYPE html>

<title>Welcome to nginx!</title>

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.

For online documentation and support please refer to
nginx.org.

Commercial support is available at
nginx.com.

Thank you for using nginx.

```

```
# curl localhost:36817
curl: (7) Failed to connect to localhost port 36817: Connection refused

Nothing suspicious in ss -tupln:
tcp       LISTEN     0          4096                                         <IP_ADDRESS>:36817              <IP_ADDRESS>:*        users:(("conmon",pid=87819,fd=5),("podman",pid=87704,fd=17),("podman",pid=87704,fd=16))
tcp       LISTEN     0          4096                                         <IP_ADDRESS>:45181              <IP_ADDRESS>:*        users:(("conmon",pid=87976,fd=5),("podman",pid=87860,fd=17),("podman",pid=87860,fd=16))

No clear difference in iptables rules:
# iptables-save|grep '45181'
-A CNI-DN-83908cab65618efe2e9f7 -s <IP_ADDRESS>/32 -p tcp -m tcp --dport 45181 -j CNI-HOSTPORT-SETMARK
-A CNI-DN-83908cab65618efe2e9f7 -s <IP_ADDRESS>/32 -p tcp -m tcp --dport 45181 -j CNI-HOSTPORT-SETMARK
-A CNI-DN-83908cab65618efe2e9f7 -p tcp -m tcp --dport 45181 -j DNAT --to-destination <IP_ADDRESS>:80
-A CNI-HOSTPORT-DNAT -p tcp -m comment --comment "dnat name: \"podman\" id: \"2f1013925bdba80c5e4468024e012c398e1bd4b8ba75dcb366eb6a7d2b2d434e\"" -m multiport --dports 45181 -j CNI-DN-83908cab65618efe2e9f7

# iptables-save|grep '36817'
-A CNI-DN-6e9529d0cf961e8ec49e2 -s <IP_ADDRESS>/32 -p tcp -m tcp --dport 36817 -j CNI-HOSTPORT-SETMARK
-A CNI-DN-6e9529d0cf961e8ec49e2 -s <IP_ADDRESS>/32 -p tcp -m tcp --dport 36817 -j CNI-HOSTPORT-SETMARK
-A CNI-DN-6e9529d0cf961e8ec49e2 -p tcp -m tcp --dport 36817 -j DNAT --to-destination <IP_ADDRESS>:8081
-A CNI-HOSTPORT-DNAT -p tcp -m comment --comment "dnat name: \"podman\" id: \"aa709df10d30b185ed89987c9cf26aaa851c96d304cc37ee502a68bf2e5f90d4\"" -m multiport --dports 36817 -j CNI-DN-6e9529d0cf961e8ec49e2

But in case of Java app, I get connection refused and in case of nginx it seems to just work.
And when I do the same rootless, Java app just works.
So I am a bit confused whats happening here, any advice?

Something to add - if I use --network host it works fine, of course.

Also could be of interest - if I run firewall-cmd --reload then it still does not work, but instead of connection refused it times out.

I figured out the problem - by default LangTool server runs only on localhost, so it does not listen on the interface that CNI gives to the container. Adding --public option solves the issue.
I was just confused it was working just fine in rootless mode, without --public. I guess it makes sense it works this way, but it was not obvious and confused the hell out of me.
In any case, excuse me for the spam. I hope this issue with detailed problem description will be helpful for someone who ends up with similar situation. Closing it now.
P.S.
Still, strange that firewall-cmd --reload breaks connections. And may be behaviour of slirp4netns/rootless should be aligned with rootful/CNI behaviour.

@Fodoj The firewall thing is known, and has a separate bug (can't find the link right now, sorry) - the brief version is that firewall-cmd --reload removes all non-permanent rules, which our container rules are counted as (making them permanent would let them survive reboot, which would be bad for different reasons). I'm looking to add a command that will re-initialize container networks to re-add the rules, which isn't exactly an optimal solution, but is better than our current one.


Support HTML responses

An API that I'd like to mock is not returning some JSON but raw HTML, and it seems that only JSON responses are supported.
Any way of returning raw HTML? or is it something that you would accept as a contribution?

Please feel free to add this feature as a contribution :)


Custodian stake

Use the token contract for custodian staking, this involves responding to stakeobsv actions and if the proposed unstake would violate the custodian staking requirements it will assert.
This solves a lot of problems we have been having with holding stake in the custodian contract and will use a consistent staking method as non-custodian token holders.  There is no difference to voting calculations if tokens are staked, but a DAC can change this by installing a contract in the VOTE_WEIGHT dacdirectory entry for that DAC and sending weightobsv actions to the custodian contract.
Removes all old functions and actions which involve staking.

I havent included the migrate action in this branch, it is in the migrate_custodian_stake branch by itself I dont think we need to merge that into master

Makes sense to have the migration out of master.


Rename temp variable to more generic one.

Signed-off-by: Cervenka Dusan<EMAIL_ADDRESS>Pull request
Choose Correct

[ ] bug
[X] feature

Describe the pull request

It looks like i need more temp variables in generated output. So i changed name for this one.
To Reproduce

Expected behavior

Screenshots

Desktop (please complete the following information):

OS:
eRPC Version:

Steps you didn't forgot to do

[X] I checked if other PR isn't solving this issue.
[X] I read Contribution details and did appropriate actions.
[X] PR code is tested.
[X] PR code is formatted.
[X] Allow edits from maintainers pull request option is set (recommended).

Additional context

@MichalPrincNXP i think this one can be merged.

Thank you for the effort and the patience.


Create README

README should include:

Description
Build

Dependencies

CLI commands to run

License

And this should be good enough for starters.
See https://gist.github.com/PurpleBooth/109311bb0361f32d87a2 for a general idea.


tour: a Reader 'emits'? confusing

Context: http://<IP_ADDRESS>:3999/methods/22
It sais "Implement a Reader type that emits an infinite stream of the ASCII character 'A'. "
Starting with the exercise it was very confusing for me that a Reader would 'emit' something. For me it is more logical a Writer 'emits' and a Reader 'absorbs'. I sort of got blocked by this.
After having done the exersize, I understand the Reader function 'fills' (the slice). I still think 'emits' confuses.

A Reader read from a source to your program. So it emits to you.
A Writer write from your program to a sink. So it 'absorbs' from you.
For me the provident description sounds logically.


Microsoft api versioning swagger autogen

Just a comment - I find it odd there is no mention of the autogen provided via the Microsoft api versioning package?
https://github.com/microsoft/aspnet-api-versioning/wiki/API-Documentation#aspnet-core

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f34eea37-51a4-6227-f5ed-6501624ad045
Version Independent ID: 2994cf60-0cb7-afa2-20b8-7e2b1117f964
Content: ASP.NET Core Web API help pages with Swagger / OpenAPI
Content Source: aspnetcore/tutorials/web-api-help-pages-using-swagger.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @RSuter
Microsoft Alias: scaddie

@thangchung please review.

Hi @Rick-Anderson What can I do in this case?


HMR not working using vite as middleware over HTTPS

Describe the bug
I want to use a https and create a server using selfsigned certificate (for development).
I have my own request listener (I am using express) and use ViteJS as a middleware.
I specify the certificate options for the server and the ViteJS middelware.
In dev mode I expect to have HMR working.
However the Websocket connection fails and HMR does not work.
Reproduction
https://github.com/elturpin/vitejs-https-hmr
Steps to reproduce
npm i && npm run dev
Open a browser with the JS console. Observe that it fails the websocket connection
System Info
System:
    OS: Linux 5.15 Linux Mint 21 (Vanessa)
    CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
    Memory: 2.87 GB / 7.28 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v20.9.0/bin/yarn
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    pnpm: 8.10.0 - ~/.nvm/versions/node/v20.9.0/bin/pnpm
  npmPackages:
    vite: ^5.0.0 => 5.0.4

Used Package Manager
npm
Logs
The vite client script tries to create a websocket on the host wss://localhost:24678 with protocol "vite-hmr".
Note that if you do not provide certificate information when creating the Vite dev server
const vite = await createViteServer({
  server: {
      middlewareMode: true,
  },
  appType: 'custom',
})

The problem still occurs, but you can manually create a websocket using a = new WebSocket("ws://localhost:24678/", "vite-hmr") inside the js console, i.e. without asking TLS protocol.
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Thanks for the repro. I tested it locally and actually it seems working on my end. Could it be a browser or local https setup issue?
screenshot to show css hmr

Not sure if it helps, but on a related note, there is a server.hmr.server option to reuse main server for websocket request. I think this is Vite's (semi) official recommendation found in https://github.com/sapphi-red/vite-setup-catalogue/blob/48cde75352005aa1c1780f5eccf022db5619e285/examples/middleware-mode/server.js (further explained in https://github.com/sapphi-red/vite-setup-catalogue/pull/16).
In your case, the usage would look like below and this works locally for me as well (but I suspect your issue might be a different cause...)
  const server = createHttpServer({key, cert}, app)
  const vite = await createViteServer({
    clearScreen: false,
    server: {
        middlewareMode: true,
        // ++++ handle websocket on the same server instance
        hmr: {
          server
        },
        // ---- no need to pass separate key/cert
        // https: {key, cert},
    },
    appType: 'custom',
  })

So many thanks,
Using the hmr option to reuse the same server works perfectly !
I still do not know why it does not work on my browser. I am using Firefox 120.0.1.
I am closing the issue.
Again, thanks a lots !


Implement Display traits for errors

Motivation

Future Work

Current dependencies on/for this PR:

main

PR #54   👈

This comment was auto-generated by Graphite.


Python - generator already executing

From a community user: https://community.neo4j.com/t/python-generator-already-executing/38288
Hi,
We are using Neo4j driver for python(version 4.2.1).
We have a live system that writes/read from the neo4j cluster all the time, And once in a while we are getting this exception:
Traceback (most recent call last):
  File "main.py", line 85, in on_new_snapshot
    response = customers_list[customer_id]['customer_model_handler_obj']\
  File "/ms_topology_center/../ms_topology_center/customer_model_handler.py", line 130, in on_new_snapshot
    return self.load_last_snapshot_to_graphdb(timestamp=timestamp,
  File "/ms_topology_center/../ms_topology_center/customer_model_handler.py", line 119, in load_last_snapshot_to_graphdb
    self.modeler.create_services('agnostic', region_snapshot_data['created'], account_id, region, timestamp)
  File "/ms_topology_center/../ms_topology_center/modeler.py", line 115, in create_services
    self.graph_db.commit_transaction()
  File "/ms_topology_center/../shared/graph_db.py", line 135, in commit_transaction
    self._transaction.commit()
  File "/usr/local/lib/python3.9/site-packages/neo4j/work/transaction.py", line 134, in commit
    self._connection.fetch_all()
  File "/usr/local/lib/python3.9/site-packages/neo4j/io/_bolt4.py", line 429, in fetch_all
    detail_delta, summary_delta = self.fetch_message()
  File "/usr/local/lib/python3.9/site-packages/neo4j/io/_bolt4.py", line 334, in fetch_message
    details, summary_signature, summary_metadata = next(self.inbox)
  File "/usr/local/lib/python3.9/site-packages/neo4j/io/_common.py", line 79, in __next__
    tag, fields = self.pop()
  File "/usr/local/lib/python3.9/site-packages/neo4j/io/_common.py", line 73, in pop
    return next(self._messages)
ValueError: generator already executing

After this exception appers  we are getting several other very strange exceptions:

Failed to read from defunct connection IPv4Address(('<IP_ADDRESS>', 7687)) (IPv4Address(('<IP_ADDRESS>', 7687)))

No data

Internal server error (Failed to write to closed connection IPv4Address(('<IP_ADDRESS>', 7687)) (IPv4Address(('<IP_ADDRESS>', 7687))))

File "/ms_topology_center/../shared/graph_db.py", line 135, in commit_transaction
    self._transaction.commit()
  File "/usr/local/lib/python3.9/site-packages/neo4j/work/transaction.py", line 133, in commit
    self._connection.send_all()
  File "/usr/local/lib/python3.9/site-packages/neo4j/io/_bolt4.py", line 296, in send_all
    raise ServiceUnavailable("Failed to write to closed connection {!r} ({!r})".format(
neo4j.exceptions.ServiceUnavailable: Failed to write to closed connection IPv4Address(('<IP_ADDRESS>', 7687)) (IPv4Address(('<IP_ADDRESS>', 7687)))

[Errno 9] Bad file descriptor

After I restart the pod everything back to normal.
Any idea why it's happened to us and how can we avoid this kind of errors?
Thanks ,
Dan Yazerski

This sounds like a concurrency issue outside of the driver. However, without seeing a code sample that is capable of reproducing this bug, I won't be able to say for sure. ValueError: generator already executing is raised when multiple threads try to consume from one generator. Note that the driver object is thread safe, the session objection isn't. You have to spawn (at least) one session per thread.

I'm closing this as I'm pretty sure it's nothing with the driver.
If my last comment doesn't help, please provide a minimal example to reproduce the error. We can re-open the issue then and I'll dig deeper.


Downstream koji builds: what to do when a build with given NVR already exists

https://sentry.io/organizations/red-hat-it/issues/3372559893/?project=1767823&query=is%3Aunresolved

Agreed there is not much to do on our side when a build with a given NVR already exists.

Yes, not much to do on our side. But the sentry issues are actually a good thing: we know something's up and can react. Let's give this a bigger priority once we get a lot such issues.


[Feature Request] Indexing specs

Motivation
We can stack specs, but not index them.
Indexing should work as it does for tensordict:

[ ] integers
[ ] tensors and lists
[ ] ranges
[ ] slices
[ ] ellipsis
[ ] None (adds a singleton dimension where needed)

For example:
>>> spec = CompositeSpec(shape=[3, 4])
>>> spec[:].shape
torch.Size([3, 4])
>>> spec[:1].shape
torch.Size([1, 4])
>>> spec[1].shape
torch.Size([4])
>>> spec[..., :2].shape
torch.Size([3, 2])

Completed


onClick not invoked if onMouseDown is present and updates state

Let me start by saying that this is a very weird bug. I tried investigating your source code and I could not find anything that would possible lead to this.
It also happens if ouMouseUp, onMouseOver are provided.
Version
2.1.1
This bug happens with or without the babel plugin.
Reproduction
https://codesandbox.io/s/mZz51wGPG
Steps to reproduce
Just add a onMouseDown and onClick together where the onMouseDown update the react state.
const TestDiv = styled.div``;
 <TestDiv onMouseDown={() => this.setState({ hi: true })} onClick={() => alert('hi')}>click me, it does not work</TestDiv>

Expected Behavior
onClick is called
Actual Behavior
onClick is not called

Is setState returning false somehow and aborting the cascade?
On Mon, Jul 24, 2017 at 10:21 PM Alan Souza<EMAIL_ADDRESS>wrote:

Let me start my saying that this is a very weird bug. I tried
investigating your source code and I could not find anything that would
possible lead to this.
It also happens if ouMouseUp, onMouseOver are provided.
Version
2.1.1
This bug happens with or without the babel plugin.
Reproduction
https://codesandbox.io/s/mZz51wGPG
Steps to reproduce
Just add a onMouseDown and onClick together where the onMouseDown update
the react state.
const TestDiv = styled.div``;
<TestDiv onMouseDown={() => this.setState({ hi: true })} onClick={() => alert('hi')}>click me, it does not work
Expected Behavior
onClick is called
Actual Behavior
onClick is not called
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/styled-components/styled-components/issues/1029, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAiy1qPDTg0CgL8-40mTbkOKlR4GQ1PRks5sRVFEgaJpZM4Oh-7y
.

Not from the caller's perspective. You can check the code sandbox I'm not aborting the cascade.

On Jul 24, 2017, at 9:40 PM, Evan Scott<EMAIL_ADDRESS>wrote:
Is setState returning false somehow and aborting the cascade?
On Mon, Jul 24, 2017 at 10:21 PM Alan Souza<EMAIL_ADDRESS>wrote:

Let me start my saying that this is a very weird bug. I tried
investigating your source code and I could not find anything that would
possible lead to this.
It also happens if ouMouseUp, onMouseOver are provided.
Version
2.1.1
This bug happens with or without the babel plugin.
Reproduction
https://codesandbox.io/s/mZz51wGPG
Steps to reproduce
Just add a onMouseDown and onClick together where the onMouseDown update
the react state.
const TestDiv = styled.div``;
<TestDiv onMouseDown={() => this.setState({ hi: true })} onClick={() => alert('hi')}>click me, it does not work
Expected Behavior
onClick is called
Actual Behavior
onClick is not called
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/styled-components/styled-components/issues/1029, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAiy1qPDTg0CgL8-40mTbkOKlR4GQ1PRks5sRVFEgaJpZM4Oh-7y
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

To clarify, this is unlikely to be a bug with SC :wink: But let's keep investigating

Yeah I agree that is unlikely to be a bug in SC. But how do we explain the fact that the last example in the code sandbox works just by switching from SC to a regular react div?

@alansouzati You were creating the styled component dynamically on every render. Thus it unmounts and the event is aborted / not captured. https://codesandbox.io/s/v2MzwvyKM
Please consult our docs for guides, intros, and usage of styled-components :wink: https://www.styled-components.com/docs

nicely done. thanks for the quick follow up.

FYI. In my case I was doing stuff like this:
import StyledButton from './StyledButton';

const Button = ({ href, ...rest }) => {
  let Tag = StyledButton;
  if (href) {
     Tag = StyledButton.withComponent('a');
  }
  return (
    <Tag {...rest} href={href} />
  );
};

Based on your finds and the documentation, I replaced it to be something like this (which makes totally sense):
import StyledButton from './StyledButton';

const AnchorStyledButton = StyledButton.withComponent('a');

const Button = ({ href, ...rest }) => {
  const Tag = href ? AnchorStyledButton : StyledButton;
  return (
    <Tag {...rest} href={href} />
  );
};

I'm sharing here just in case hits a similar problem 👍


[QUESTION] Support for multiple bots?

Heya, is there support for multiple bots with Dimscord? If not, I'd like to see it implemented since the Python lib i normally has that and I'm quite reliant on it, thanks!
(Also do you have a discord server for this lib? If not, I recommend making one)

A friend told me that Dimscord does support multiple clients so nvm :P


Move ReadMe.md to README.md for @all-contributors bot

@all-contributors please add @Gcenx for code


Update code lens of inactive editors when typing in another editor

Little bug here with codelens and multiple splitted window editor.
codelens will auto update only if we nav between slots from the same window editor.
But if we toggle between 2 windows frames, codelens will not auto update.
So i alway need to switch between files in the same window to get codelens auto update.
It possible to add codelens update between toggle window editors ?
it's a bit boring for productivity, i toggle a lot between editors groups.

You can try with this setup and share reference between those files.
Then with your mouse or keyboard toggle change ctrl+p *2 time.
codelens will not detect update.

files0.js ex: in bottom window editor frame
class test0 {
    constructor() {

    };
};

files1.js ex: in upper window editor frame
class test1 {
    constructor() {
// add after created the 2 test files and toggle between files, codelens will not update!
        console.log(test0);
    };
};

Possible solution?
Maybe add a update between toggle window ?!

Version.
Version : 1.39.2 (user setup)
Validation : 6ab598523be7a800d7f3eb4d92d7ab9a66069390
Date : 2019-10-15T15:35:18.241Z
Électron : 4.2.10
Chrome : 69.0.3497.128
Node.js : 10.11.0
V8 : 6.9.427.31-electron.0
OS : Windows_NT x64 10.0.18362

We do update when toggling but depending on the project size it might take a while to happen (this depends on how fast extensions can run). Can you try to simply wait after switching to the editor? It should eventually update

@jrieken I just make a try and wait about ~2min and nothing happen.
Maybe something is break in the refresh sorry.
It a very big projet, but i also have a very big machine, so i dont think is related to the latence update.

can you try with a smaller project then? as said, there is an explicit update when changing editors and it seems that your update missing because of something else.

Try in empty project, 3 min ...

The update work only if we change file from same editor focused.
If i change file and come back the update is instant.

ok, now you have just changed (or clarified) the steps here. Yes, when typing a file A and file B is visible then its code lenses don't update. That kinda by design because it quite expensive to update N editor when typing in 1 editor...

ok sure, i made you a video thats show the workflow issue.
I dont think is critical ! but a little embarrassing because the information is misleading and it can become confusing in a big projects with a lot of references.
https://youtu.be/LFlq4KBXW3w
thanks again and hope the video will help you understand how i use vscode in my workflow.

I have pushed a change that updates code lenses of an editor when it gains focus. That means inactive editor won't update while typing in another editor but as soon as you make them active again.

\closedWith 351e617


Warning in docs before bumping master branch

Fix #24479

Hi, @Ildarik! Looks like you've opened a PR against your own master branch. Is that intentional or did you mean to open it against gatsby?

You can ignore me if I'm jumping the gun. Just trying to follow up on docs issues!

@AishaBlake you're right! Thank you!


Systemd service override

toggle_clean_bluez overrides the bluetooth.service systemd file in /lib. It would be better to put the ExecStart change in /run/systemd/system/bluetooth.service.d/nxbt.conf. That way, reverting would be done by simply deleting this file. The change would also not survive reboots.

As a quick and dirty change, I did the following change which works:
    for i in range(0, len(lines)):
        line = lines[i]
        if line.startswith("ExecStart="):
            # If we want to ensure the plugin is enabled
            if not toggle:
                exec_start = re.sub(" --compat --noplugin=\*", "", line)
            else:
                exec_start = line + " --compat --noplugin=*"

    service = f"[Service]\nExecStart=\n{exec_start}"
    out_file_dir = "/run/systemd/system/bluetooth.service.d/"
    out_file = out_file_dir + "nxbt.conf"
    if toggle:
        os.makedirs(out_file_dir, exist_ok=True)
        with open(out_file, "w") as f:
            f.write(service)
    else:
        os.remove(out_file)

I've accepted your PR to get things rolling with cleaning up the toggle_clean_bluez function. When I find some time, I'll see about prioritizing further cleanup (eg: removing the for loop).
Thanks again for contributing this 👍


add LOG_ENABLED

Hello @Pluies,
i would like to add a way to enable disable log event, if you are OK to merge, could we create a new tag after it ?
Thanks,
Pierre

Hi @pporee !
Sory about the late reply - I understand the noise, and I've made logging this event opt-in via the VERBOSE flag (cf #7 ).
A new tag is ready as v0.0.3 :)

Florent


security_monkey should add SNS/SQS notification options

Current security_monkey notifications are over email.
It can be kinda spammy, depending on what you sign up for.
security_monkey should also allow notifications over sns/sqs.
Web UI functionality should be built out so you can be notified if a certain security group or iam role is modified.
This SNS/SQS notifications could also be invoked when an issue is justified or an item comment is added.
People could listen for these SNS/SQS messages and do whatever they'd like with them.  An example is to update a chat room with important events.

duplicate of #554. Closing


Correction for raw affiliation UMR Inserm U930 Imagerie & Cerveau - Universite Francois Rabelais, 10 ter bd Tonnelle, 37032 Tours Cedex 1, France.,France

Correction needed for raw affiliation UMR Inserm U930 Imagerie & Cerveau - Universite Francois Rabelais, 10 ter bd Tonnelle, 37032 Tours Cedex 1, France.,France
raw_affiliation_name: UMR Inserm U930 Imagerie & Cerveau - Universite Francois Rabelais, 10 ter bd Tonnelle, 37032 Tours Cedex 1, France.,France
new_rors: 02wwzvj46;02vjkv261;01eem7c55
previous_rors: 02wwzvj46;02vjkv261
works_examples: W2328137365
contact: a9fdbbb5911b2e3aee12fc536260a3c7:a4acff8af11e80173b79d304a16ec43d848ac1f5e7 @ recherche.gouv.fr

This issue was accepted and ingested by the OpenAlex team on 2024-12-19. The new affiliations should be visible within the next 7 days.


feat: implement order cancellation for limit orders

Description
Implements limit order cancellation.
Note order list refreshing doesnt work and needs page refresh - this will be implemented in a different PR
Includes bigboi refactoring to cowswap singing utils so the logic is shared between spot trades and limit orders, including cancellations.
Issue (if applicable)

closes #6201
closes #7921
Risk

High Risk PRs Require 2 approvals

High risk 👍

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

Engineering

Operations

[ ] :checkered_flag: My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)
Demo. Note order list refreshing doesnt work and needs page refresh - this will be implemented in a different PR:
https://jam.dev/c/9344f1fa-9415-4df4-9acc-9568f03025a1

I can't because

@NeOMakinG This is expected, allowance approvals arent implemented yet - #8154 will do this but it's blocked for now. Until then, for testing purposes head on over to swap.cow.fi to create a limit order you can use to cancel in this PR.
I'll update the testing notes so this is clear.

Confirming successful cowswap
https://explorer.cow.fi/arb1/orders/0xa1883229ae7f248d8683f562d5259daa968545f5b980aa91e4c8292ba6d909cc34b5d5153fc1a2107a311ce6412fb69a30d78e156750e882?tab=overview


Cargo always updates the registry index with -Zbuild-std

It looks like currently Cargo will  always update the registry index when using -Zbuild-std:
$ cargo new foo
$ cd foo
$ cargo +nightly build -Zbuild-std --target ...
    Updating crates.io index
...

Bisection points to this being a regression from #8834, I'm currently poking around to see if I can find something.

☹ Oh, that's a tricky one.  I think the issue is that the original Cargo.lock has rustc-workspace-std-* packages registered as local path packages (because the lock was built with those in the [patch] table), but the vendored dependencies (like cfg-if) are registered in the lock as crates.io packages.  By adding cfg-if to the patch set, cfg-if ends up with an unlocked dependency for rustc-workspace-std-core (because cfg-if is expecting that dependency to be from crates.io), which triggers the update.
I can't think of a simple way to fix that.  Vendoring should probably use source replacement (not patches), but source replacement is a global setting that can't be easily enabled just for resolving std.

I think this also stops you from using --offline with build-std.

Hm so this is one possible solution:

diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs
index 0380c447d..38f00d045 100644
--- a/src/cargo/core/registry.rs
+++ b/src/cargo/core/registry.rs
@@ -726,7 +726,9 @@ fn lock(

         // If this dependency did not have a locked version, then we query
         // all known locked packages to see if they match this dependency.
-        // If anything does then we lock it to that and move on.
+        // If anything does then we lock it to that and move on. This will help
+        // us to use an existing lock file as much as possible, even when new
+        // nodes and dependencies are introduced.
         let v = locked
             .get(&(dep.source_id(), dep.package_name()))
             .and_then(|vec| vec.iter().find(|&&(id, _)| dep.matches_id(id)));
@@ -737,6 +739,25 @@ fn lock(
             return dep;
         }

+        // Ok and failing all that, we make one last ditch attempt to search the
+        // patches as well. If our dependency matches a patch and that patch is
+        // additionally locked already, then we unconditionally use the locked
+        // patched dependency's version.
+        let v = patches
+            .get(dep.source_id().canonical_url())
+            .and_then(|vec| vec.iter().find(|id| dep.matches_ignoring_source(**id)));
+        if let Some(id) = v {
+            if let Some(locked_list) = locked.get(&(id.source_id(), id.name())) {
+                if locked_list.iter().any(|(a, _)| id == a) {
+                    trace!("\tthird hit on {}", id);
+                    let mut dep = dep;
+                    let req = VersionReq::exact(id.version());
+                    dep.set_version_req(req);
+                    return dep;
+                }
+            }
+        }
+
         trace!("\tnope, unlocked");
         dep
     })
diff --git a/tests/testsuite/patch.rs b/tests/testsuite/patch.rs
index 8e2a3b1a3..20a82b32d 100644
--- a/tests/testsuite/patch.rs
+++ b/tests/testsuite/patch.rs
@@ -2012,3 +2012,66 @@ fn can_update_with_alt_reg() {
         )
         .run();
 }
+
+#[cargo_test]
+fn use_for_new_registry_dependencies() {
+    Package::new("dep1", "0.1.0").dep("bar", "0.1").publish();
+    Package::new("bar", "0.1.0").publish();
+    let p = project()
+        .file(
+            "Cargo.toml",
+            r#"
+                 [package]
+                 name = "foo"
+                 version = "0.1.0"
+
+                 [dependencies]
+                 dep1 = "0.1"
+
+                 [patch.crates-io]
+                 bar = { path = "bar" }
+            "#,
+        )
+        .file("src/lib.rs", "")
+        .file("bar/Cargo.toml", &basic_manifest("bar", "0.1.0"))
+        .file("bar/src/lib.rs", "")
+        .file(
+            "dep2/Cargo.toml",
+            r#"
+                 [package]
+                 name = "dep2"
+                 version = "0.1.0"
+
+                 [dependencies]
+                 bar = "0.1"
+            "#,
+        )
+        .file("dep2/src/lib.rs", "")
+        .build();
+
+    p.cargo("check").run();
+    p.change_file(
+        "Cargo.toml",
+        r#"
+             [package]
+             name = "foo"
+             version = "0.1.0"
+
+             [dependencies]
+             dep1 = "0.1"
+             dep2 = { path = 'dep2' }
+
+             [patch.crates-io]
+             bar = { path = "bar" }
+        "#,
+    );
+    p.cargo("check")
+        .with_stderr(
+            "\
+[CHECKING] dep2 [..]
+[CHECKING] foo [..]
+[FINISHED] [..]
+",
+        )
+        .run();
+}

This is arguably a preexisting bug where if you add a dependency which transitively depends on something already patched it updates the index unnecessarily. I'm not overly confident in this diff though, it feels a bit too situation-specific and possibly runs afoul of making a too-constrained dependency graph.

Hm with this and #8963 should we consider backing out #8834? This is probably more breakage than expected...

There is also https://github.com/rust-lang/rust/issues/79218.  Unless @Gankra wants to put significant effort to fix the issues before the next beta, I think it might be a good idea to revert that and https://github.com/rust-lang/rust/pull/78790.  I am unlikely to put in the effort over the next 3 weeks to fix those issues.

Yeah I think reverting is entirely reasonable, we can always reland

Fixed with https://github.com/rust-lang/cargo/pull/8968 being merged


Upgrade Reactor version

This is on par with https://github.com/spring-cloud/spring-cloud-deployer-cloudfoundry/pull/116

Looks good from the CI results on the deployer. Rebased and merged as 0464a81