Default to correct config file paths in run.py

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: rfkelly, Assigned: rfkelly)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa+])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Currently our run.py scripts default to e.g. /etc/aitc/production.ini for the config file, but we change this with an environment variable in production to be /etc/mozilla-services/aitc/production.ini.  We should just default to the correct path.
Whiteboard: [qa+]
(Assignee)

Comment 1

6 years ago
Created attachment 654109 [details] [diff] [review]
patch to load production .ini from correct location

Patch updating server-aitc to look in the correct place for the production .ini file.  :bobm does this look right to you?

I will also make a corresponding change for syncstorage.
Attachment #654109 - Flags: review?(bobm)
Comment on attachment 654109 [details] [diff] [review]
patch to load production .ini from correct location

Looks good to me.  What is the purpose of the fallback to tests.ini?  Wouldn't we want it to break in production if the .ini file was missing?  Or will it be very _vocal_ about using tests.ini?
Attachment #654109 - Flags: review?(bobm)
Attachment #654109 - Flags: review+
Attachment #654109 - Flags: feedback+
(Assignee)

Comment 3

6 years ago
(In reply to Bob Micheletto [:bobm] from comment #2)
> Looks good to me.  What is the purpose of the fallback to tests.ini? 
> Wouldn't we want it to break in production if the .ini file was missing?  Or
> will it be very _vocal_ about using tests.ini?

Hmmm...the original intention was to be able to run a test server without having to configure anything.  You're right though, this does seem like it could be dangerous by masking errors and/or running with an insecure config by accident.
(Assignee)

Comment 4

6 years ago
Created attachment 654497 [details] [diff] [review]
patch to load production .ini from correct location, raising error if not found

This patch raises a descriptive error message instead of falling back to the testing config file.
Assignee: nobody → rfkelly
Attachment #654109 - Attachment is obsolete: true
Attachment #654497 - Flags: review?(bobm)

Updated

6 years ago
Attachment #654497 - Flags: review?(bobm) → review+
You need to log in before you can comment on or make changes to this bug.