Skip to content

Commit

Permalink
dfe-analytics v1.4, suppress dfe-analytics in CI, testing and review …
Browse files Browse the repository at this point in the history
…apps update blocklist
  • Loading branch information
kenfodder committed Sep 20, 2022
1 parent abfcc61 commit 1dae75e
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 43 deletions.
2 changes: 2 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ RAILS_ENV=test
ORDNANCE_SURVEY_API_BASE_URL=https://api.os.uk
ORDNANCE_SURVEY_CLIENT_PARAMS={"key": "api-key-value"}
STORAGE_BUCKET=test-bucket-name

SUPPRESS_DFE_ANALYTICS_INIT=true
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ RUN if [ ${RAILS_ENV} = "production" ]; then \
DQT_CLIENT_PARAMS= \
ADMIN_ALLOWED_IPS= \
ENVIRONMENT_NAME= \
SUPPRESS_DFE_ANALYTICS_INIT= \
bundle exec rake assets:precompile; \
fi
EXPOSE 3000
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem "dfe-analytics", github: "DFE-Digital/dfe-analytics", tag: "v1.3.2"
gem "dfe-analytics", github: "DFE-Digital/dfe-analytics", tag: "v1.4.0"
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/DFE-Digital/dfe-analytics.git
revision: 6dc16420e0b5c6b2b722887589b0bc2212798802
tag: v1.3.2
revision: 6e355be3bd65890887e2cdbc0588ff2a00a892e5
tag: v1.4.0
specs:
dfe-analytics (1.3.2)
dfe-analytics (1.4.0)
google-cloud-bigquery (~> 1.38)
request_store_rails (~> 2)

Expand Down
2 changes: 2 additions & 0 deletions azure/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module "container" {
environment = var.environment
canonical_hostname = var.canonical_hostname
bypass_dfe_sign_in = var.bypass_dfe_sign_in
suppress_dfe_analytics_init = var.suppress_dfe_analytics_init
}

module "app_service" {
Expand All @@ -39,4 +40,5 @@ module "app_service" {
canonical_hostname = var.canonical_hostname
bypass_dfe_sign_in = var.bypass_dfe_sign_in
pr_number = var.pr_number
suppress_dfe_analytics_init = var.suppress_dfe_analytics_init
}
6 changes: 6 additions & 0 deletions azure/terraform/modules/app_service/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ variable "pr_number" {
description = "Pull Request Number for Review App"
}

variable "suppress_dfe_analytics_init" {
type = string
description = "Stop DfE-analytics from booting"
default = null
}

locals {
stash_port = var.rg_prefix == "s118p01" ? "23888" : "17000"

Expand Down
2 changes: 2 additions & 0 deletions azure/terraform/modules/container/container_group.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ resource "azurerm_container_group" "cont_grp_01" {
"STORAGE_CREDENTIALS" = data.azurerm_key_vault_secret.StorageCredentials.value
"WORKER_COUNT" = "4"
"BYPASS_DFE_SIGN_IN" = var.bypass_dfe_sign_in
"SUPPRESS_DFE_ANALYTICS_INIT" = var.suppress_dfe_analytics_init
}

ports {
Expand Down Expand Up @@ -140,6 +141,7 @@ resource "azurerm_container_group" "cont_grp_02" {
"STORAGE_CREDENTIALS" = data.azurerm_key_vault_secret.StorageCredentials.value
"WORKER_COUNT" = "4"
"BYPASS_DFE_SIGN_IN" = var.bypass_dfe_sign_in
"SUPPRESS_DFE_ANALYTICS_INIT" = var.suppress_dfe_analytics_init
}

name = local.cont_02_name
Expand Down
5 changes: 5 additions & 0 deletions azure/terraform/modules/container/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ variable "bypass_dfe_sign_in" {
type = bool
description = "Bypass DFE Sign-In authentication and use a default role"
}
variable "suppress_dfe_analytics_init" {
type = string
description = "Stop DfE-analytics from booting"
default = null
}

locals {
stash_port = var.rg_prefix == "s118p01" ? "23888" : "17000"
Expand Down
6 changes: 6 additions & 0 deletions azure/terraform/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ variable "pr_number" {
default = null
}

variable "suppress_dfe_analytics_init" {
type = string
description = "Stop DfE-analytics from booting"
default = null
}

locals {
app_name = var.pr_number == null ? null : "pr-${var.pr_number}"
db_name = local.app_name == null ? var.environment : "${var.environment}-${local.app_name}"
Expand Down
3 changes: 2 additions & 1 deletion azure/terraform/workspace_variables/review.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"environment": "review",
"env_tag": "Dev",
"create_database": true,
"bypass_dfe_sign_in": true
"bypass_dfe_sign_in": true,
"suppress_dfe_analytics_init": true
}
38 changes: 1 addition & 37 deletions config/analytics.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
---
shared:
:delayed_jobs:
- id
- priority
- attempts
- handler
- last_error
- run_at
- locked_at
- failed_at
- locked_by
- queue
- created_at
- updated_at
- cron
:policy_configurations:
- id
- open_for_submissions
Expand Down Expand Up @@ -105,28 +91,6 @@ shared:
- date_of_birth_day
- date_of_birth_month
- date_of_birth_year
:claim_decisions:
- application_id
- decision_date
- trn
- application_decision
- application_policy
- subject
- school_name
- local_authorities_name
- local_authority_district_name
- claimant_age
- claimant_gender
- claimant_year_qualified
:claim_stats:
- claim_id
- policy
- claim_started_at
- claim_submitted_at
- decision_made_at
- result
- submission_length
- decision_length
:decisions:
- id
- result
Expand Down Expand Up @@ -283,7 +247,7 @@ shared:
- created_by_id
- created_at
- updated_at
:tps_data:
:teachers_pensions_service:
- id
- teacher_reference_number
- start_date
Expand Down
38 changes: 37 additions & 1 deletion config/analytics_blocklist.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
---
shared: {}
shared:
:delayed_jobs:
- id
- priority
- attempts
- handler
- last_error
- run_at
- locked_at
- failed_at
- locked_by
- queue
- created_at
- updated_at
- cron
:claim_decisions:
- application_id
- decision_date
- trn
- application_decision
- application_policy
- subject
- school_name
- local_authorities_name
- local_authority_district_name
- claimant_age
- claimant_gender
- claimant_year_qualified
:claim_stats:
- claim_id
- policy
- claim_started_at
- claim_submitted_at
- decision_made_at
- result
- submission_length
- decision_length

0 comments on commit 1dae75e

Please sign in to comment.