Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(mergeq): Test merge queue workflow #51

Merged
merged 14 commits into from
Oct 28, 2024
Merged

ci(mergeq): Test merge queue workflow #51

merged 14 commits into from
Oct 28, 2024

Conversation

chris3ware
Copy link
Member

@chris3ware chris3ware commented Oct 25, 2024

PR to experiment with merge queues. It appears that you need to click the "merge when ready" button before the PR is approved or all checks have passed - when the PR is dirty!. If the PR is clean i.e approved and all checks have passed then you get an error:

Screenshot 2024-10-25 at 12 07 20

Or from the CLI:

gh pr merge --auto
GraphQL: Pull request Pull request is in clean status (enablePullRequestAutoMerge)

enable auto-merge has been ticked in the repository settings.

Copy link

infracost bot commented Oct 25, 2024

💰 Infracost report

Monthly estimate decreased by £228 📉

Changed project Baseline cost Usage cost* Total change New monthly cost
terraform-glb-org +£0 +£43 +£43 £43
tf-dev-cdn +£0 -£19 -£19 £0
tf-dev-vpc-peer -£72 -£35 -£107 £0
tf-glb-org +£0 -£43 -£43 £0
tf-prd-vpc -£90 -£12 -£102 £0

*Usage costs were estimated using Infracost Cloud settings, see docs for other options.

Estimate details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: terraform-glb-org
Module path: terraform/glb/org

+ module.s3_bucket.aws_s3_bucket.this[0]
  +£19

    + Standard
    
        + Storage
          +£4, +225 GB*
    
        + PUT, COPY, POST, LIST requests
          +£4, +1,000 1k requests*
    
        + GET, SELECT, and all other requests
          +£4, +12,500 1k requests*
    
        + Select data scanned
          +£4, +2,500 GB*
    
        + Select data returned
          +£4, +7,250 GB*

+ aws_cloudtrail.this
  +£12

    + Management events (additional copies)
      +£4, +2.5 100k events*

    + Data events
      +£4, +50 100k events*

    + Insight events
      +£4, +14.2857 100k events*

+ module.log_group.aws_cloudwatch_log_group.this[0]
  +£12

    + Data ingested
      +£4, +10 GB*

    + Archival Storage
      +£4, +166 GB*

    + Insights queries data scanned
      +£4, +1,000 GB*

Monthly cost change for terraform-glb-org (Module path: terraform/glb/org)
Amount:  +£43 (GBP) (£0.00 → £43)

──────────────────────────────────
Project: tf-dev-cdn
Module path: tf/dev/cdn

- module.s3_bucket.aws_s3_bucket.this[0]
  -£19

    - Standard
    
        - Storage
          -£4, -225 GB*
    
        - PUT, COPY, POST, LIST requests
          -£4, -1,000 1k requests*
    
        - GET, SELECT, and all other requests
          -£4, -12,500 1k requests*
    
        - Select data scanned
          -£4, -2,500 GB*
    
        - Select data returned
          -£4, -7,250 GB*

Monthly cost change for tf-dev-cdn (Module path: tf/dev/cdn)
Amount:  -£19 (GBP) (£19 → £0.00)

──────────────────────────────────
Project: tf-dev-vpc-peer
Module path: tf/dev/vpc-peer

- aws_instance.a4l_peering["a4l-vpca"]
  -£7

    - Instance usage (Linux/UNIX, on-demand, t2.micro)
      -£7

    - root_block_device
    
        - Storage (general purpose SSD, gp2)
          -£0.62

- aws_instance.a4l_peering["a4l-vpcb"]
  -£7

    - Instance usage (Linux/UNIX, on-demand, t2.micro)
      -£7

    - root_block_device
    
        - Storage (general purpose SSD, gp2)
          -£0.62

- aws_instance.a4l_peering["a4l-vpcc"]
  -£7

    - Instance usage (Linux/UNIX, on-demand, t2.micro)
      -£7

    - root_block_device
    
        - Storage (general purpose SSD, gp2)
          -£0.62

- module.endpoints["a4l-vpca"].aws_vpc_endpoint.this["ec2messages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpca"].aws_vpc_endpoint.this["ssm"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpca"].aws_vpc_endpoint.this["ssmmessages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcb"].aws_vpc_endpoint.this["ec2messages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcb"].aws_vpc_endpoint.this["ssm"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcb"].aws_vpc_endpoint.this["ssmmessages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcc"].aws_vpc_endpoint.this["ec2messages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcc"].aws_vpc_endpoint.this["ssm"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

- module.endpoints["a4l-vpcc"].aws_vpc_endpoint.this["ssmmessages"]
  -£9

    - Data processed (first 1PB)
      -£4, -500 GB*

    - Endpoint (Interface)
      -£6

Monthly cost change for tf-dev-vpc-peer (Module path: tf/dev/vpc-peer)
Amount:  -£107 (GBP) (£107 → £0.00)

──────────────────────────────────
Project: tf-glb-org
Module path: tf/glb/org

- module.log_group.aws_cloudwatch_log_group.this[0]
  -£12

    - Data ingested
      -£4, -10 GB*

    - Archival Storage
      -£4, -166 GB*

    - Insights queries data scanned
      -£4, -1,000 GB*

- aws_cloudtrail.this
  -£12

    - Management events (additional copies)
      -£4, -2.5 100k events*

    - Data events
      -£4, -50 100k events*

    - Insight events
      -£4, -14.2857 100k events*

- module.s3_bucket.aws_s3_bucket.this[0]
  -£19

    - Standard
    
        - Storage
          -£4, -225 GB*
    
        - PUT, COPY, POST, LIST requests
          -£4, -1,000 1k requests*
    
        - GET, SELECT, and all other requests
          -£4, -12,500 1k requests*
    
        - Select data scanned
          -£4, -2,500 GB*
    
        - Select data returned
          -£4, -7,250 GB*

Monthly cost change for tf-glb-org (Module path: tf/glb/org)
Amount:  -£43 (GBP) (£43 → £0.00)

──────────────────────────────────
Project: tf-prd-vpc
Module path: tf/prd/vpc

- aws_instance.a4l_bastion
  -£7

    - Instance usage (Linux/UNIX, on-demand, t2.micro)
      -£7

    - root_block_device
    
        - Storage (general purpose SSD, gp2)
          -£0.62

- aws_instance.a4l_internal
  -£7

    - Instance usage (Linux/UNIX, on-demand, t2.micro)
      -£7

    - root_block_device
    
        - Storage (general purpose SSD, gp2)
          -£0.62

- module.vpc.aws_nat_gateway.this[0]
  -£29

    - NAT gateway
      -£25

    - Data processed
      -£4, -111 GB*

- module.vpc.aws_nat_gateway.this[1]
  -£29

    - NAT gateway
      -£25

    - Data processed
      -£4, -111 GB*

- module.vpc.aws_nat_gateway.this[2]
  -£29

    - NAT gateway
      -£25

    - Data processed
      -£4, -111 GB*

Monthly cost change for tf-prd-vpc (Module path: tf/prd/vpc)
Amount:  -£102 (GBP) (£102 → £0.00)

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed
3 projects have no cost estimate changes.
Run the following command to see their breakdown: infracost breakdown --path=/path/to/code

──────────────────────────────────
*Usage costs were estimated using Infracost Cloud settings, see docs for other options.

66 cloud resources were detected:
∙ 3 were estimated
∙ 63 were free

Infracost estimate: Monthly estimate decreased by £228 ↓
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Changed project                                    ┃ Baseline cost ┃ Usage cost* ┃ Total change ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━┫
┃ terraform-glb-org                                  ┃           +£0 ┃        +£43 ┃         +£43 ┃
┃ tf-dev-cdn                                         ┃           +£0 ┃        -£19 ┃         -£19 ┃
┃ tf-dev-vpc-peer                                    ┃          -£72 ┃        -£35 ┃        -£107 ┃
┃ tf-glb-org                                         ┃           +£0 ┃        -£43 ┃         -£43 ┃
┃ tf-prd-vpc                                         ┃          -£90 ┃        -£12 ┃        -£102 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━┛
This comment will be updated when code changes.

Copy link

github-actions bot commented Oct 25, 2024

terraform apply -chdir='terraform/development/vpc'
Diff of changes.
+ module.vpc.aws_db_subnet_group.database[0] will be created
+ module.vpc.aws_default_network_acl.this[0] will be created
+ module.vpc.aws_default_route_table.default[0] will be created
+ module.vpc.aws_default_security_group.this[0] will be created
+ module.vpc.aws_internet_gateway.this[0] will be created
+ module.vpc.aws_route.public_internet_gateway[0] will be created
+ module.vpc.aws_route_table.private[0] will be created
+ module.vpc.aws_route_table.private[1] will be created
+ module.vpc.aws_route_table.private[2] will be created
+ module.vpc.aws_route_table.public[0] will be created
+ module.vpc.aws_route_table_association.database[0] will be created
+ module.vpc.aws_route_table_association.database[1] will be created
+ module.vpc.aws_route_table_association.database[2] will be created
+ module.vpc.aws_route_table_association.private[0] will be created
+ module.vpc.aws_route_table_association.private[1] will be created
+ module.vpc.aws_route_table_association.private[2] will be created
+ module.vpc.aws_route_table_association.public[0] will be created
+ module.vpc.aws_route_table_association.public[1] will be created
+ module.vpc.aws_route_table_association.public[2] will be created
+ module.vpc.aws_subnet.database[0] will be created
+ module.vpc.aws_subnet.database[1] will be created
+ module.vpc.aws_subnet.database[2] will be created
+ module.vpc.aws_subnet.private[0] will be created
+ module.vpc.aws_subnet.private[1] will be created
+ module.vpc.aws_subnet.private[2] will be created
+ module.vpc.aws_subnet.public[0] will be created
+ module.vpc.aws_subnet.public[1] will be created
+ module.vpc.aws_subnet.public[2] will be created
+ module.vpc.aws_vpc.this[0] will be created
Apply complete! Resources: 29 added, 0 changed, 0 destroyed.
By @chris3ware at 2024-10-28T14:09:05Z (view log).
module.vpc.aws_vpc.this[0]: Still creating... [10s elapsed]
module.vpc.aws_vpc.this[0]: Creation complete after 12s [id=vpc-0f9ba54f4696f7abf]
module.vpc.aws_default_route_table.default[0]: Creation complete after 0s [id=rtb-0bc7032b9a6586355]
module.vpc.aws_internet_gateway.this[0]: Creation complete after 1s [id=igw-0fac421bbe56255fc]
module.vpc.aws_route_table.private[2]: Creation complete after 1s [id=rtb-08d9e1e1c194a6851]
module.vpc.aws_route_table.public[0]: Creation complete after 1s [id=rtb-005f55f8cf9467b7d]
module.vpc.aws_subnet.database[0]: Creation complete after 1s [id=subnet-0964e9f7bde5d79b5]
module.vpc.aws_subnet.database[2]: Creation complete after 1s [id=subnet-00570eb3ba2c1b428]
module.vpc.aws_subnet.database[1]: Creation complete after 1s [id=subnet-012363f3fed7f367e]
module.vpc.aws_route_table.private[0]: Creation complete after 1s [id=rtb-00703d1f75a799d56]
module.vpc.aws_subnet.public[1]: Creation complete after 1s [id=subnet-0129ff3b9f2403c51]
module.vpc.aws_route_table.private[1]: Creation complete after 0s [id=rtb-0d7786d2cd89395db]
module.vpc.aws_default_network_acl.this[0]: Creation complete after 1s [id=acl-0bec0a4844d2f5934]
module.vpc.aws_subnet.public[0]: Creation complete after 0s [id=subnet-09b05bf6cc10033cc]
module.vpc.aws_default_security_group.this[0]: Creation complete after 2s [id=sg-0a20dfda33a0e4d96]
module.vpc.aws_subnet.private[2]: Creation complete after 1s [id=subnet-05a8a8d455432ecea]
module.vpc.aws_subnet.private[0]: Creation complete after 1s [id=subnet-040a0179a6eff022e]
module.vpc.aws_route_table_association.database[1]: Creation complete after 1s [id=rtbassoc-041eca16c471daace]
module.vpc.aws_route.public_internet_gateway[0]: Creation complete after 1s [id=r-rtb-005f55f8cf9467b7d1080289494]
module.vpc.aws_route_table_association.database[2]: Creation complete after 1s [id=rtbassoc-05f68b638ea04f959]
module.vpc.aws_subnet.public[2]: Creation complete after 1s [id=subnet-06449090f3f2fe289]
module.vpc.aws_route_table_association.database[0]: Creation complete after 1s [id=rtbassoc-01eb2877bf149101a]
module.vpc.aws_subnet.private[1]: Creation complete after 1s [id=subnet-0a17b3c8baaaa6df6]
module.vpc.aws_route_table_association.public[0]: Creation complete after 0s [id=rtbassoc-04f93971719a038da]
module.vpc.aws_route_table_association.public[1]: Creation complete after 0s [id=rtbassoc-024fd4453b230f253]
module.vpc.aws_route_table_association.private[2]: Creation complete after 0s [id=rtbassoc-0f9297c1f59c706c4]
module.vpc.aws_route_table_association.public[2]: Creation complete after 0s [id=rtbassoc-0f4564023fd366038]
module.vpc.aws_route_table_association.private[0]: Creation complete after 0s [id=rtbassoc-0c86c859850416d3a]
module.vpc.aws_route_table_association.private[1]: Creation complete after 0s [id=rtbassoc-00bcc72ecd97cfbdf]
module.vpc.aws_db_subnet_group.database[0]: Creation complete after 1s [id=a4l-vpc1-development]

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

No need to specify in terraform.tfvars now as using directories.
Copy link

github-actions bot commented Oct 25, 2024

terraform apply -chdir='terraform/production/vpc'
Diff of changes.
+ module.vpc.aws_db_subnet_group.database[0] will be created
+ module.vpc.aws_default_network_acl.this[0] will be created
+ module.vpc.aws_default_route_table.default[0] will be created
+ module.vpc.aws_default_security_group.this[0] will be created
+ module.vpc.aws_internet_gateway.this[0] will be created
+ module.vpc.aws_route.public_internet_gateway[0] will be created
+ module.vpc.aws_route_table.private[0] will be created
+ module.vpc.aws_route_table.private[1] will be created
+ module.vpc.aws_route_table.private[2] will be created
+ module.vpc.aws_route_table.public[0] will be created
+ module.vpc.aws_route_table_association.database[0] will be created
+ module.vpc.aws_route_table_association.database[1] will be created
+ module.vpc.aws_route_table_association.database[2] will be created
+ module.vpc.aws_route_table_association.private[0] will be created
+ module.vpc.aws_route_table_association.private[1] will be created
+ module.vpc.aws_route_table_association.private[2] will be created
+ module.vpc.aws_route_table_association.public[0] will be created
+ module.vpc.aws_route_table_association.public[1] will be created
+ module.vpc.aws_route_table_association.public[2] will be created
+ module.vpc.aws_subnet.database[0] will be created
+ module.vpc.aws_subnet.database[1] will be created
+ module.vpc.aws_subnet.database[2] will be created
+ module.vpc.aws_subnet.private[0] will be created
+ module.vpc.aws_subnet.private[1] will be created
+ module.vpc.aws_subnet.private[2] will be created
+ module.vpc.aws_subnet.public[0] will be created
+ module.vpc.aws_subnet.public[1] will be created
+ module.vpc.aws_subnet.public[2] will be created
+ module.vpc.aws_vpc.this[0] will be created
Apply complete! Resources: 29 added, 0 changed, 0 destroyed.
By @chris3ware at 2024-10-28T14:09:05Z (view log).
module.vpc.aws_vpc.this[0]: Still creating... [10s elapsed]
module.vpc.aws_vpc.this[0]: Creation complete after 13s [id=vpc-0ddf79e0777aa73d1]
module.vpc.aws_internet_gateway.this[0]: Creation complete after 1s [id=igw-012bc67dd079aad6d]
module.vpc.aws_default_route_table.default[0]: Creation complete after 1s [id=rtb-0549911276b539493]
module.vpc.aws_route_table.public[0]: Creation complete after 1s [id=rtb-06f3d757f92ce7efc]
module.vpc.aws_subnet.database[0]: Creation complete after 1s [id=subnet-0f8a96f543dec9faf]
module.vpc.aws_subnet.public[2]: Creation complete after 1s [id=subnet-00f7fa19cf1124e1e]
module.vpc.aws_subnet.database[2]: Creation complete after 1s [id=subnet-0abc0474eca6532ff]
module.vpc.aws_subnet.private[0]: Creation complete after 1s [id=subnet-0f04298c4231d19f7]
module.vpc.aws_subnet.private[1]: Creation complete after 1s [id=subnet-0aa75a1a27f638154]
module.vpc.aws_subnet.public[0]: Creation complete after 1s [id=subnet-0e3411faf4f92849f]
module.vpc.aws_default_network_acl.this[0]: Creation complete after 2s [id=acl-0cf82e496bbc30ffd]
module.vpc.aws_subnet.database[1]: Creation complete after 1s [id=subnet-0d08be973824168f7]
module.vpc.aws_subnet.public[1]: Creation complete after 1s [id=subnet-0f6ebe27b0457a0ac]
module.vpc.aws_subnet.private[2]: Creation complete after 1s [id=subnet-05ebc7396e2069017]
module.vpc.aws_route_table.private[1]: Creation complete after 1s [id=rtb-0c39668cb77efd10a]
module.vpc.aws_default_security_group.this[0]: Creation complete after 2s [id=sg-04bf2d1c74df422ce]
module.vpc.aws_route_table.private[0]: Creation complete after 1s [id=rtb-0f77c9fb43f70d1b8]
module.vpc.aws_route_table.private[2]: Creation complete after 1s [id=rtb-04794b05ee62e3499]
module.vpc.aws_route.public_internet_gateway[0]: Creation complete after 1s [id=r-rtb-06f3d757f92ce7efc1080289494]
module.vpc.aws_route_table_association.public[0]: Creation complete after 1s [id=rtbassoc-0626a30973766f76e]
module.vpc.aws_route_table_association.public[1]: Creation complete after 1s [id=rtbassoc-0b52705354d9b3967]
module.vpc.aws_route_table_association.public[2]: Creation complete after 1s [id=rtbassoc-0c01bf46091641d90]
module.vpc.aws_route_table_association.database[1]: Creation complete after 1s [id=rtbassoc-0ac4fcf263d3da5b9]
module.vpc.aws_route_table_association.database[0]: Creation complete after 1s [id=rtbassoc-0dbe0a425f4b11d88]
module.vpc.aws_route_table_association.database[2]: Creation complete after 1s [id=rtbassoc-0c8f569bd93b67989]
module.vpc.aws_route_table_association.private[1]: Creation complete after 1s [id=rtbassoc-0541be72b9cfedf44]
module.vpc.aws_route_table_association.private[0]: Creation complete after 1s [id=rtbassoc-0f3d35eaf6505d98f]
module.vpc.aws_route_table_association.private[2]: Creation complete after 1s [id=rtbassoc-013accabba7058c4c]
module.vpc.aws_db_subnet_group.database[0]: Creation complete after 2s [id=a4l-vpc1-production]

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

@james3ware james3ware marked this pull request as ready for review October 25, 2024 10:20
james3ware
james3ware previously approved these changes Oct 25, 2024
@chris3ware
Copy link
Member Author

Why isn't this auto merging when all requirements are met?

@chris3ware chris3ware disabled auto-merge October 25, 2024 20:37
@chris3ware chris3ware added this pull request to the merge queue Oct 25, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 25, 2024
@github-actions github-actions bot added the tf:apply Pull requests that apply TF code label Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@chris3ware chris3ware added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 8317dd4 Oct 28, 2024
3 checks passed
@chris3ware chris3ware deleted the ci-merge-q branch October 28, 2024 14:11
@3ware-release
Copy link
Contributor

3ware-release bot commented Nov 7, 2024

This PR is included in version 1.6.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tf:apply Pull requests that apply TF code tf:plan Pull requests that plan TF code
Development

Successfully merging this pull request may close these issues.

2 participants