-
Notifications
You must be signed in to change notification settings - Fork 45
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
arrangement 6: add deprecation warnings to conf.get_* #765
Conversation
osbs/conf.py
Outdated
return self._get_value("odcs_insecure", self.conf_section, "odcs_insecure", | ||
default=False, is_bool_val=True) | ||
return self._get_deprecated("odcs_insecure", self.conf_section, "odcs_insecure", | ||
default=False, is_bool_val=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
osbs/conf.py
Outdated
|
||
def get_odcs_openidc_secret(self): | ||
return self._get_value("odcs_openidc_secret", self.conf_section, "odcs_openidc_secret") | ||
return self._get_deprecated("odcs_openidc_secret", self.conf_section, | ||
"odcs_openidc_secret") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
osbs/conf.py
Outdated
return self._get_value("pdc_insecure", self.conf_section, "pdc_insecure", | ||
default=False, is_bool_val=True) | ||
return self._get_deprecated("pdc_insecure", self.conf_section, "pdc_insecure", | ||
default=False, is_bool_val=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
osbs/conf.py
Outdated
@@ -102,6 +102,12 @@ def get_value_from_conf(): | |||
else: | |||
return value | |||
|
|||
def _get_deprecated(self, args_key, conf_section, conf_key, default=None, is_bool_val=False): | |||
logger.warning("user configuration %s in section %s is ignored in arrangement %s", | |||
args_key, conf_section, DEFAULT_ARRANGEMENT_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when the default is arrangement 7? Maybe mention that this is true for arrangement versions greater than or equal to REACTOR_CONFIG_ARRANGEMENT_VERSION
?
osbs/conf.py
Outdated
|
||
def get_username(self): | ||
return self._get_value("username", self.conf_section, "username") | ||
return self._get_deprecated("username", self.conf_section, "username") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for authenticating against OpenShift instance. It's still used by osbs-client when creating builds, if username/password auth is to be used.
osbs/conf.py
Outdated
|
||
def get_password(self): | ||
return self._get_value("password", self.conf_section, "password") | ||
return self._get_deprecated("password", self.conf_section, "password") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is password for authenticating against OpenShift instance. It's still used by osbs-client when creating builds, if username/password auth is to be used.
osbs/conf.py
Outdated
|
||
def get_client_cert(self): | ||
return self._get_value("client_cert", self.conf_section, "client_cert") | ||
return self._get_deprecated("client_cert", self.conf_section, "client_cert") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cert for authenticating against OpenShift instance. It's still used by osbs-client when creating builds, if cert auth is to be used.
osbs/conf.py
Outdated
|
||
def get_client_key(self): | ||
return self._get_value("client_key", self.conf_section, "client_key") | ||
return self._get_deprecated("client_key", self.conf_section, "client_key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is key for authenticating against OpenShift instance. It's still used by osbs-client when creating builds, if cert auth is to be used.
osbs/conf.py
Outdated
|
||
def get_build_imagestream(self): | ||
return self._get_value("build_imagestream", self.conf_section, "build_imagestream") | ||
return self._get_deprecated("build_imagestream", self.conf_section, "build_imagestream") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for creating builds, it must be in osbs-client.
osbs/conf.py
Outdated
|
||
def get_build_from(self): | ||
return self._get_value("build_from", self.conf_section, "build_from") | ||
return self._get_deprecated("build_from", self.conf_section, "build_from") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for creating builds, it must be in osbs-client.
|
||
def get_client_config_secret(self): | ||
return self._get_value("client_config_secret", self.conf_section, | ||
"client_config_secret") | ||
return self._get_deprecated("client_config_secret", self.conf_section, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're still using this in arrangement 6. But it's now configured in reactor config map, so let's deprecate it here.
osbs/conf.py
Outdated
@@ -529,25 +535,23 @@ def get_arrangement_version(self): | |||
raise OsbsValidationException("Invalid arrangement_version: %s" % value) | |||
|
|||
def get_can_orchestrate(self): | |||
return self._get_value("can_orchestrate", self.conf_section, "can_orchestrate", | |||
default=False, is_bool_val=True) | |||
return self._get_deprecated("can_orchestrate", self.conf_section, "can_orchestrate", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to know this before we can create the Build object in OpenShift. It shouldn't be deprecated.
if value: | ||
return [x.strip() for x in value.split(',')] | ||
else: | ||
return [] | ||
|
||
def get_equal_labels(self): | ||
equal_labels = [] | ||
equal_labels_str = self._get_value("equal_labels", self.conf_section, | ||
"equal_labels") | ||
equal_labels_str = self._get_deprecated("equal_labels", self.conf_section, "equal_labels") | ||
if equal_labels_str: | ||
# must be in correct format | ||
# e.g. `name1:name2:name3, release1:release2, version1:version2` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't comment any further, but shouldn't get_platform_descriptors
also be deprecated now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I got platform_descriptors and node_selectors confused. Fixed along with all the others.
Not sure why the centos 6 build failed. Restarted it to make sure it's not one of those random failures. |
Ok, some progress in figuring out what's happening in CentOS 6. |
See #766 for CentOS 6 test fix. |
A lot of conf arguments have been deprecated and moved to reactor_config_map. Replace _get_value with _get_deprecated and print a warning message for all get_* functions in conf where the value is not in the accepted parameters list for BuildRequestV2. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
added to the release notes under "Improvements":
|
A lot of conf arguments have been deprecated and moved to reactor_config_map.
Replace _get_value with get_deprecated and print a warning message for
all get* functions in conf where the value is not in the accepted parameters
list for BuildRequestV2.
Signed-off-by: Mark Langsdorf mlangsdo@redhat.com