terraform-aws-modules / terraform-aws-atlantis

Terraform module to deploy Atlantis on AWS Fargate πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/atlantis/aws
Apache License 2.0
520 stars 351 forks source link

Job details lost after re-deployment #380

Closed remiflament closed 11 months ago

remiflament commented 11 months ago

Hello πŸ‘‹πŸ»

Description

I'm using the latest version of this module for Atlantis on ecs fargate, version 4.0.6. Atlantis v0.26.0 (v0.27.0 not pushed yet)

I'm using GitLab saas as vcs.

The problem is when I do re-deployment of this ecs service I lost all the information of previous https://${atlantis_url}/jobs/uuid. The link is working, but I have a black screen, no xterm outputs anymore.

I'm using the EFS config and the classic boltDB as k/v database for atlantis.

No mention of jobs details disappear in the GitHub of atlantis nor this module.

I am not talking about GitLab comments, but the jobs unique link with live terminal outputs.

Versions

Terraform v1.6.5 on darwin_arm64

Reproduction Code [Required]

module "atlantis" {
  source     = "terraform-aws-modules/atlantis/aws"
  version    = "4.0.6"

  # ....

  # EFS
  enable_efs = true
  efs = {
    mount_targets = {
      "${local.region}a" = {
        subnet_id = data.aws_subnets.private.ids[0]
      }
      "${local.region}b" = {
        subnet_id = data.aws_subnets.private.ids[1]
      }
      "${local.region}c" = {
        subnet_id = data.aws_subnets.private.ids[2]
      }
    }
  }

  # Atlantis configuration
  atlantis = {
    image = "ghcr.io/runatlantis/atlantis:${local.atlantis_version}"
    environment = [
      for key, value in local.atlantis_env_vars :
      {
        name  = key
        value = value
      }
    ]
  }

}

Steps to reproduce the behavior:

I'm using terraform workspace.

  1. Make a first success deployment
  2. do some CICD tests to get atlantis pipelines results
  3. Make a modification on this module (eg. var env) & re-deploy terraform
  4. Try to get info about previous atlantis pipelines.

Expected behavior

I should be able to get the details of previous jobs as I'm using persistant storage ?

Actual behavior

I lost every previous pipeline details with each re-deployment.

Additional context

Anyone success to keep a history of jobs details after atlantis modifications ?

Thank you

remiflament commented 11 months ago

I got my response, the jobs details are currently stored in memory : https://www.runatlantis.io/docs/streaming-logs.html#:~:text=terraform%20syntax%20highlighting.-,WARNING,pull%20request%20is%20closed%2C%20so%20this%20link%20shouldn%27t%20be%20persisted%20anywhere.,-Edit%20this%20page

github-actions[bot] commented 10 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.