Skip to content

Commit 1a6bc73

Browse files
committed
remove INSTANCE_* vars from _environment.py
1 parent 8e6fbc3 commit 1a6bc73

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

ci/praktika/_environment.py

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,24 @@ def from_env(cls) -> "_Environment":
138138
else:
139139
assert False, "TODO: not supported"
140140

141-
INSTANCE_TYPE = (
142-
os.getenv("INSTANCE_TYPE", None)
143-
or Shell.get_output("ec2metadata --instance-type")
144-
or ""
145-
)
146-
INSTANCE_ID = (
147-
os.getenv("INSTANCE_ID", None)
148-
or Shell.get_output("ec2metadata --instance-id")
149-
or ""
150-
)
151-
INSTANCE_LIFE_CYCLE = (
152-
os.getenv("INSTANCE_LIFE_CYCLE", None)
153-
or Shell.get_output(
154-
"curl -s --fail http://169.254.169.254/latest/meta-data/instance-life-cycle"
155-
)
156-
or ""
157-
)
141+
# NOTE (strtgbb): Disable instance metadata, we don't use it
142+
# INSTANCE_TYPE = (
143+
# os.getenv("INSTANCE_TYPE", None)
144+
# or Shell.get_output("ec2metadata --instance-type")
145+
# or ""
146+
# )
147+
# INSTANCE_ID = (
148+
# os.getenv("INSTANCE_ID", None)
149+
# or Shell.get_output("ec2metadata --instance-id")
150+
# or ""
151+
# )
152+
# INSTANCE_LIFE_CYCLE = (
153+
# os.getenv("INSTANCE_LIFE_CYCLE", None)
154+
# or Shell.get_output(
155+
# "curl -s --fail http://169.254.169.254/latest/meta-data/instance-life-cycle"
156+
# )
157+
# or ""
158+
# )
158159

159160
else:
160161
print("WARNING: Local execution - dummy Environment will be generated")

0 commit comments

Comments
 (0)