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

Remove unnecessary Big Query environment variable #7356

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUTHENTICATION_FALLBACK=
BIG_QUERY_API_JSON_KEY=
BIG_QUERY_DATASET=
BIGQUERY_DATASET=
DATABASE_URL=
DFE_SIGN_IN_HIRING_STAFF_ROLE_ID=
DFE_SIGN_IN_IDENTIFIER=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Base
attr_reader :dataset

def initialize(bigquery: Google::Cloud::Bigquery.new)
@dataset = bigquery.dataset(Rails.configuration.big_query_dataset)
@dataset = bigquery.dataset(Rails.configuration.bigquery_dataset)
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/services/publishers/vacancy_stats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def number_of_unique_views
# with the Vacancy anonymised id to the new views associated with the real Vacancy id.
sql = <<~SQL
SELECT SUM(#{field}) AS #{field}
FROM `#{Rails.configuration.big_query_dataset}.#{TABLE_NAME}`
FROM `#{Rails.configuration.bigquery_dataset}.#{TABLE_NAME}`
WHERE id IN ("#{vacancy.id}", "#{StringAnonymiser.new(vacancy.id)}")
AND publish_on = "#{vacancy.publish_on.iso8601}"
SQL
Expand Down
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ class Application < Rails::Application
config.analytics = config_for(:analytics)
config.analytics_pii = config_for(:analytics_pii)

config.big_query_dataset = ENV.fetch("BIG_QUERY_DATASET", nil)

config.enforce_local_authority_allowlist = ActiveModel::Type::Boolean.new.cast(ENV.fetch("ENFORCE_LOCAL_AUTHORITY_ALLOWLIST", nil))

config.geocoder_lookup = :default
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

config.middleware.use RackSessionAccess::Middleware

config.big_query_dataset = "test_dataset"
config.bigquery_dataset = "test_dataset"

# Use test geocoder lookup, unless otherwise specified
config.geocoder_lookup = :test
Expand Down
2 changes: 1 addition & 1 deletion terraform/workspace-variables/production_app_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
APP_ROLE: production
AUTHENTICATION_FALLBACK: false
AUTHENTICATION_FALLBACK_FOR_JOBSEEKERS: false
BIG_QUERY_DATASET: production_dataset
BIGQUERY_DATASET: production_dataset
DFE_SIGN_IN_ISSUER: https://oidc.signin.education.gov.uk
DFE_SIGN_IN_REDIRECT_URL: https://teaching-vacancies.service.gov.uk/auth/dfe/callback
DFE_SIGN_IN_REGISTRATION_URL: https://profile.signin.education.gov.uk/register
Expand Down
2 changes: 1 addition & 1 deletion terraform/workspace-variables/qa_app_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
APP_ROLE: qa
AUTHENTICATION_FALLBACK: false
AUTHENTICATION_FALLBACK_FOR_JOBSEEKERS: false
BIG_QUERY_DATASET: staging_dataset
BIGQUERY_DATASET: staging_dataset
DFE_SIGN_IN_ISSUER: https://test-oidc.signin.education.gov.uk
DFE_SIGN_IN_REDIRECT_URL: https://qa.teaching-vacancies.service.gov.uk/auth/dfe/callback
DFE_SIGN_IN_REGISTRATION_URL: https://test-profile.signin.education.gov.uk/register
Expand Down
2 changes: 1 addition & 1 deletion terraform/workspace-variables/review_app_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
APP_ROLE: review
AUTHENTICATION_FALLBACK: true
AUTHENTICATION_FALLBACK_FOR_JOBSEEKERS: true
BIG_QUERY_DATASET: staging_dataset
BIGQUERY_DATASET: staging_dataset
DFE_SIGN_IN_REGISTRATION_URL: https://test-profile.signin.education.gov.uk/register
DISABLE_DATABASE_ENVIRONMENT_CHECK: 1
DISABLE_EMAILS: false
Expand Down
2 changes: 1 addition & 1 deletion terraform/workspace-variables/staging_app_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
APP_ROLE: staging
AUTHENTICATION_FALLBACK: false
AUTHENTICATION_FALLBACK_FOR_JOBSEEKERS: false
BIG_QUERY_DATASET: staging_dataset
BIGQUERY_DATASET: staging_dataset
DFE_SIGN_IN_ISSUER: https://pp-oidc.signin.education.gov.uk
DFE_SIGN_IN_REDIRECT_URL: https://staging.teaching-vacancies.service.gov.uk/auth/dfe/callback
DFE_SIGN_IN_REGISTRATION_URL: https://pp-profile.signin.education.gov.uk/register
Expand Down