Loading buildstream/plugin.py +10 −0 Original line number Diff line number Diff line Loading @@ -757,6 +757,16 @@ class CoreWarnings(): which is found to be invalid based on the configured track """ URL_WITHOUT_ALIAS = "url-without-alias" """ This warning will be produced when a source is configured with a url which does not contain an alias. """ UNKNOWN_ALIAS = "unknown-alias" """ This warning will be produced when a source is configured with a url which does not contain an alias. """ __CORE_WARNINGS = [ value Loading buildstream/source.py +5 −2 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ from . import Plugin from . import _yaml, utils from ._exceptions import BstError, ImplError, ErrorDomain from ._projectrefs import ProjectRefStorage from .plugin import CoreWarnings class Consistency(): Loading Loading @@ -469,10 +470,12 @@ class Source(Plugin): project = self._get_project() if alias.lower() in utils._URI_SCHEMES: self.warn("{}: The use of an alias in urls is strongly advised.".format(self._get_provenance()), detail="See https://buildstream.gitlab.io/buildstream/format_project.html#source-aliases") detail="See https://buildstream.gitlab.io/buildstream/format_project.html#source-aliases", warning_token=CoreWarnings.URL_WITHOUT_ALIAS) elif not project.get_alias_uri(alias, first_pass=self.__first_pass) and len(url_parts) > 1: self.warn("{}: Unknown alias '{}' in url".format(self._get_provenance(), alias)) self.warn("{}: Unknown alias '{}' in url".format(self._get_provenance(), alias), warning_token=CoreWarnings.UNKNOWN_ALIAS) def get_source_fetchers(self): """Get the objects that are used for fetching Loading Loading
buildstream/plugin.py +10 −0 Original line number Diff line number Diff line Loading @@ -757,6 +757,16 @@ class CoreWarnings(): which is found to be invalid based on the configured track """ URL_WITHOUT_ALIAS = "url-without-alias" """ This warning will be produced when a source is configured with a url which does not contain an alias. """ UNKNOWN_ALIAS = "unknown-alias" """ This warning will be produced when a source is configured with a url which does not contain an alias. """ __CORE_WARNINGS = [ value Loading
buildstream/source.py +5 −2 Original line number Diff line number Diff line Loading @@ -137,6 +137,7 @@ from . import Plugin from . import _yaml, utils from ._exceptions import BstError, ImplError, ErrorDomain from ._projectrefs import ProjectRefStorage from .plugin import CoreWarnings class Consistency(): Loading Loading @@ -469,10 +470,12 @@ class Source(Plugin): project = self._get_project() if alias.lower() in utils._URI_SCHEMES: self.warn("{}: The use of an alias in urls is strongly advised.".format(self._get_provenance()), detail="See https://buildstream.gitlab.io/buildstream/format_project.html#source-aliases") detail="See https://buildstream.gitlab.io/buildstream/format_project.html#source-aliases", warning_token=CoreWarnings.URL_WITHOUT_ALIAS) elif not project.get_alias_uri(alias, first_pass=self.__first_pass) and len(url_parts) > 1: self.warn("{}: Unknown alias '{}' in url".format(self._get_provenance(), alias)) self.warn("{}: Unknown alias '{}' in url".format(self._get_provenance(), alias), warning_token=CoreWarnings.UNKNOWN_ALIAS) def get_source_fetchers(self): """Get the objects that are used for fetching Loading