Cheyenne has joined #buildbot
mark_ is now known as mjw
vext01_ has joined #buildbot
<
vext01_>
How can i get the plain text of a secret to pass to an attribute that doesn't understanbd secrets?
<
vext01_>
I have a util.Secret
<
vext01_>
s/attribute/argument/
<
cmouse>
util.Interpolate("%s(secret:name)_")
<
cmouse>
but that's going to end up exactly same as util.Secert
<
cmouse>
vext01_: can you give bit more context?
<
vext01_>
I've made a reporter for pushing messages to mattermost
<
vext01_>
it takes a serverUrl, like many reporters
<
vext01_>
but the URL itself is secret
<
vext01_>
serverUrl=util.Secret("yk-mm-nightly-webhook"),
<
vext01_>
doesn't work
<
vext01_>
builtins.AttributeError: 'Secret' object has no attribute 'endswith'
<
vext01_>
so either the plugin renders the secret somehow, or i pass plain text
<
vext01_>
cmouse: makes sense?
<
vext01_>
self.renderSecrets(token) maybe?
<
cmouse>
or yield util.Secret()
<
cmouse>
it's a deferred object so it needs to be yielded
<
vext01_>
seems to have worked
<
vext01_>
next question, should I attempt to upstream this?
<
cmouse>
upstream what?
<
vext01_>
I've only implemented the bare minimum of what our team needs
<
vext01_>
a mattermost notifier
<
vext01_>
or reporter
<
cmouse>
ah, there wasn't one already?
<
vext01_>
whatever you call it
<
cmouse>
did you build it over HTTPNotifier?
<
cmouse>
or Reporter
<
vext01_>
i copied reporters/http.py and ammended it
<
cmouse>
you could've use that as base class
<
cmouse>
instead of amending it
<
vext01_>
yeah, i got confused by the complexity of it all and just started hacking
<
cmouse>
idk about upstreaming, feel free to open issue (i'm not a developer here)
<
vext01_>
it should be doable with no buildbot changes using the http pusher
<
vext01_>
but the docs are wrong and I couldnt figure it out
<
vext01_>
I wish I'd subclassed it now
<
vext01_>
maybe it isn't so hard
<
cmouse>
it's usually super easy
<
cmouse>
there are already some other http reporters
<
vext01_>
uh, my version of buildbot is old enough that none of the reporters actually subclass the http one
Cheyenne has joined #buildbot
SirScott has joined #buildbot
halstead has quit [Server closed connection]
halstead has joined #buildbot
vmeson has quit [Quit: Konversation terminated!]
vvmeson has joined #buildbot
mjw has quit [Killed (NickServ (GHOST command used by mark_!~mjw@gnu.wildebeest.org))]
mark_ has joined #buildbot
Cheyenne has joined #buildbot