hephaestus 0.8.20.2 → 0.8.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/config/initializers/environment.rb +7 -3
- data/config/initializers/opentelemetry.rb +2 -0
- data/lib/hephaestus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53416bfb62985d1d007171eaa75e37bb5f515c8b4a72ce3f01973a616882b9d6
|
4
|
+
data.tar.gz: 9d17c563b01088561e63d79c9130e8490002f442e9e257a2b705d690d9651fc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22f602cdf989439edfdcf2844a6477be03aeaa620120c27882966a698ecaa4f5cb1f9c95c713db2aee3b44b2982e041961c525053b718bbabfc4dc9bbff06f20
|
7
|
+
data.tar.gz: 94cfafad858c244394907fed6939c38592f6f8bd4a5cff767cefc1538dd07c0195134155961186112303b0ce34c2339b9adc0be265775fec09ff0cc43629dde4
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,7 @@ OP_VAULT_SECRETS = {}
|
|
5
5
|
OP_INFRA_SECRETS = {}
|
6
6
|
|
7
7
|
def fetch_vault_secret(label:, default: "")
|
8
|
-
if productionish?
|
8
|
+
if productionish? && !compiling_assets?
|
9
9
|
OP_VAULT_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
|
10
10
|
else
|
11
11
|
ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
|
@@ -13,7 +13,7 @@ def fetch_vault_secret(label:, default: "")
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def fetch_infra_secret(label:, default: "")
|
16
|
-
if productionish?
|
16
|
+
if productionish? && !compiling_assets?
|
17
17
|
OP_INFRA_SECRETS.delete(label) || Rails.logger.error("Secret `#{label}` not found in 1Password")
|
18
18
|
else
|
19
19
|
ENV.fetch(label, default.is_a?(Pathname) ? default.read : default)
|
@@ -40,6 +40,10 @@ def productionish?
|
|
40
40
|
Rails.env.production? || Rails.env.staging?
|
41
41
|
end
|
42
42
|
|
43
|
+
def compiling_assets?
|
44
|
+
ENV.fetch("PRECOMPILING", nil).present?
|
45
|
+
end
|
46
|
+
|
43
47
|
def print_user_api_errors?
|
44
48
|
(Rails.env.development? || Rails.env.staging?) || ENV.fetch("DEBUG", false)
|
45
49
|
end
|
@@ -106,7 +110,7 @@ module Hephaestus
|
|
106
110
|
|
107
111
|
# Every plug has secrets; to reduce the amount of API calls to 1Password,
|
108
112
|
# we can grab one document that contains all the secrets we need
|
109
|
-
if productionish?
|
113
|
+
if productionish? && !compiling_assets?
|
110
114
|
res = JSON.parse(op_load_vault_into_env(vault: "Plug-#{plug_name}", tag: ENV["RAILS_ENV"]))
|
111
115
|
["Common", "Unique", "Yetto"].each do |section_label|
|
112
116
|
res["fields"].select { |f| f["section"] && f["section"]["label"] }.each do |field|
|
@@ -5,6 +5,8 @@
|
|
5
5
|
return if Rails.env.development?
|
6
6
|
return if defined?(Rails::Console)
|
7
7
|
|
8
|
+
return if compiling_assets?
|
9
|
+
|
8
10
|
# establish the environment for OTEL
|
9
11
|
ENV["OTEL_EXPORTER_OTLP_ENDPOINT"] = "http://service-otelcol-#{Rails.env}.internal:4318"
|
10
12
|
ENV["OTEL_EXPORTER_OTLP_HEADERS"] = "x-honeycomb-dataset=plug-#{plug_shortname}-#{Rails.env}"
|
data/lib/hephaestus/version.rb
CHANGED