Re: [BuildStream] [Git][BuildStream/buildstream][135-expire-artifacts-in-local-cache] _context.py: Add simpler message handlers
- From: Agustín Benito Bethencourt <agustin benito codethink co uk>
- To: buildstream-list gnome org
- Subject: Re: [BuildStream] [Git][BuildStream/buildstream][135-expire-artifacts-in-local-cache] _context.py: Add simpler message handlers
- Date: Mon, 23 Jul 2018 09:07:51 +0200
Hi,
On Monday, 23 July 2018 07:50:34 CEST Sander Striker wrote:
I believe these should be sent including full diffs to a separate
buildstream-commits mailinglist. That saves a bit of subject munging, and
puts more relevant content at the start of the subject line.
I am fine with setting up another list. Tristan seems to be in favor of a
different list too.
The risk though is to split the technical discussions because people answer to
the commits directly.
I will set it up.
Cheers,
Sander
On Tue, Jul 17, 2018, 21:11 Agustín Benito Bethencourt via Buildstream-list
<buildstream-list gnome org> wrote:
Hi,
this is a kindly reminder for you to evaluate if these notifications
coming
from Gitlab (MR including diffs) should be or not be sent to this mailing
list. Please read below.
Otherwise I will proceed with the implementation as soon as I can.
On Tuesday, 10 July 2018 07:42:26 PDT Agustín Benito Bethencourt via
Buildstream-list wrote:
Hi,
please check below what can be sent to the mailing list by default by
Gitlab. The interesting options available are:
* To include or not the diffs
* Include more than one recipient. In this case we are talking about the
mailing list. * More information about the feature:
https://docs.gitlab.com/ee/user/project/
integrations/emails_on_push.html
As you can see, these mails can be easily filtered since the Subject
start
by
[Git][Group/project]
Please let me know if this is what you want to activate it.
Further functionality requires the usage of Webhooks. I would need the
help
of an engineer for doing more complex/customized stuff.
######
Tristan Maat pushed to branch 135-expire-artifacts-in-local-cache at
BuildStream / buildstream
Commits:
a6a7a01f by Tristan Maat at 2018-07-10T14:25:44Z
_context.py: Add simpler message handlers
- - - - -
13 changed files:
- buildstream/_artifactcache/artifactcache.py
- buildstream/_context.py
- buildstream/_scheduler/jobs/cachesizejob.py
- buildstream/_scheduler/jobs/cleanupjob.py
- buildstream/_scheduler/jobs/job.py
- buildstream/_scheduler/queues/buildqueue.py
- buildstream/_scheduler/queues/fetchqueue.py
- buildstream/_scheduler/queues/pullqueue.py
- buildstream/_scheduler/queues/pushqueue.py
- buildstream/_scheduler/queues/queue.py
- buildstream/_scheduler/queues/trackqueue.py
- buildstream/_scheduler/resources.py
- buildstream/_scheduler/scheduler.py
Changes:
=====================================
buildstream/_artifactcache/artifactcache.py
=====================================
@@ -217,8 +217,10 @@ class ArtifactCache():
default_conf =
os.path.join(os.environ['XDG_CONFIG_HOME'],
'buildstream.conf')
detail = ("There is not enough space to build the
given
element.\n" - "Please increase the
cache-quota in
{}." - .format(self.context.config_origin or
default_conf)) + "Please increase the
cache-quota
in {}.\n" + "Space usage: {:,} B/{:,} B"
+ .format(self.context.config_origin or
default_conf, +
self.calculate_cache_size(), self.context.cache_quota))
if self.calculate_cache_size() >
self.context.cache_quota:
raise ArtifactError("Cache too full. Aborting.",
=====================================
buildstream/_context.py
=====================================
@@ -393,6 +393,30 @@ class Context():
self._message_handler(message, context=self)
return
+ def msg(self, text, *, plugin=None, msg_type=None, **kwargs):
+ self.message(Message(plugin, msg_type, str(text), **kwargs))
+
+ def debug(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.DEBUG,
**kwargs) +
+ def status(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.STATUS,
**kwargs) +
+ def info(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.INFO,
**kwargs)
+
+ def warn(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.WARN,
**kwargs)
+
+ def error(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.ERROR,
**kwargs) +
+ def bug(self, text, *, plugin=None, **kwargs):
+ self.msg(text, plugin=plugin, msg_type=MessageType.BUG,
**kwargs)
+
+ def log(self, text, *, plugin=None, **kwargs):
--
Agustín Benito Bethencourt
Principal Consultant
Codethink Ltd
We respect your privacy. See https://www.codethink.co.uk/privacy.html
_______________________________________________
Buildstream-list mailing list
Buildstream-list gnome org
https://mail.gnome.org/mailman/listinfo/buildstream-list
--
Agustín Benito Bethencourt
Principal Consultant
Codethink Ltd
We respect your privacy. See https://www.codethink.co.uk/privacy.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]