#dev-contrib
1 messages ยท Page 162 of 1
yea dm_sent lgtm
That's a lot of tests for the user command lmao
Thanks joe
I'm rather confused by this. Can it be ignored?
I've got 8 failing tests and no clue why
What's weird is that works fine on the above test
This is the breakdown of the errors:```py
FAILED tests/bot/exts/moderation/test_incidents.py::TestMakeEmbed::test_make_embed_content - AssertionError: 'this is an incident' != 'this is an incident\n\n__*Reported on <t:1:D> at ...'
FAILED tests/bot/exts/moderation/test_incidents.py::TestArchive::test_archive_clyde_username - AttributeError: 'NoneType' object has no attribute 'kwargs'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_can_explicitly_target_themselves - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_may_use_command_in_bot_commands_channel - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_staff_members_can_bypass_channel_restriction - AssertionError: expected call not found.
FAILED tests/bot/exts/moderation/test_incidents.py::TestProcessEvent::test_process_event_confirmation_task_is_awaited - AssertionError: Expected mock to have been awaited.
FAILED tests/bot/exts/moderation/test_incidents.py::TestArchive::test_archive_relays_incident - AssertionError: Expected 'send' to be called once. Called 0 times.```
Hmm I might have an idea
I think I branched from a different PR instead of main
That seems to most likely be a bug
The method is already an instance method (it's being called from self.cog), and you don't need to explicitly pass self in those cases
You'd really only pass self explicitly if you're calling it like Class.method() instead of Class().method()
Changes I wrote on branch x are also showing as unstaged changes on branch y and vice-versa
So remove the self.cog?
I assume so
Aight
Mind you I don't have actual context
๐จ
that never happened
I thought you were just making a joke lol
maybe, idek
What's the actual signature for that function
@command(name="user", aliases=["user_info", "member", "member_info", "u"])
async def user_info(self, ctx: Context, user_or_message: Union[MemberOrUser, Message] = None) -> None:
that's tests, isn't it?
Strange that it isn't complaining on the first one, really feels like it ought to
yeah
pretty sure the tests have self.cog
I mean yeah, that's what's giving the issue
Unless that method is mocked in the top example
is it Com and pushed cause I'll pull down and look at the tests
Nope
wery veird
going to my pc now
I told myself I wouldn't develop at all today...
but broke that... 5 minutes after midnight so
Keep in mind I didn't write these tests, so someone else passed self.cog in and they worked before my PR ๐คท
Nice lol
not even new years but we're already breaking resolutions
no, my monitor still works ๐คก
Do we know for a fact they are collected and ran ๐คก
I'd assume so
which branch or pull is this?
Anyways, as long as it works, I guess it's fine
From what Tizzy just said, I assume master
master.
checks didn't fail so
seems like incident-archive-msg-improvements @static canyon ?
also is it pushed
Yeah
Not pushed yet because I'm fixing stuff
ah, could you push what you have so i can debug the tests, or are they broken on what's pushed?
I removed self.cog from all the function calls and now there's 8 tests failing still but it's a different 8
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_staff_members_can_bypass_channel_restriction - TypeError: user_info() missing 1 required positional argument: 'ctx'
```niceee
Heh
The call in that one ispy await self.cog.user_info(ctx)
Can you show the init where it sets self.cog
So I guess for some reason self.cog doesn't get passed?
Err there's multiple definitions of self.cog
I think this is the one we want```py
@unittest.mock.patch("bot.exts.info.information.constants")
class UserCommandTests(unittest.IsolatedAsyncioTestCase):
"""Tests for the !user command."""
def setUp(self):
"""Set up steps executed before each test is run."""
self.bot = helpers.MockBot()
self.cog = information.Information(self.bot)
With that one, it'll definitely not require passing self.cog
Where are the other definitions
class UserInfractionHelperMethodTests(unittest.IsolatedAsyncioTestCase):
"""Tests for the helper methods of the `!user` command."""
def setUp(self):
"""Common set-up steps done before for each test."""
self.bot = helpers.MockBot()
self.bot.api_client.get = unittest.mock.AsyncMock()
self.cog = information.Information(self.bot)
self.member = helpers.MockMember(id=1234)```
;-; ~~a screenshot smh I can't copy paste that
tests/bot/exts/info/test_information.py
class InformationCogTests(unittest.IsolatedAsyncioTestCase):
"""Tests the Information cog."""
@classmethod
def setUpClass(cls):
cls.moderator_role = helpers.MockRole(name="Moderator", id=constants.Roles.moderators)
def setUp(self):
"""Sets up fresh objects for each test."""
self.bot = helpers.MockBot()
self.cog = information.Information(self.bot)
``````py
@unittest.mock.patch("bot.exts.info.information.constants.MODERATION_CHANNELS", new=[50])
class UserEmbedTests(unittest.IsolatedAsyncioTestCase):
"""Tests for the creation of the `!user` embed."""
def setUp(self):
"""Common set-up steps done before for each test."""
self.bot = helpers.MockBot()
self.bot.api_client.get = unittest.mock.AsyncMock()
self.cog = information.Information(self.bot)
``````py
@unittest.mock.patch("bot.exts.info.information.constants")
class UserCommandTests(unittest.IsolatedAsyncioTestCase):
"""Tests for the `!user` command."""
def setUp(self):
"""Set up steps executed before each test is run."""
self.bot = helpers.MockBot()
self.cog = information.Information(self.bot)
``````py
class UserInfractionHelperMethodTests(unittest.IsolatedAsyncioTestCase):
"""Tests for the helper methods of the `!user` command."""
def setUp(self):
"""Common set-up steps done before for each test."""
self.bot = helpers.MockBot()
self.bot.api_client.get = unittest.mock.AsyncMock()
self.cog = information.Information(self.bot)
self.member = helpers.MockMember(id=1234)```
These are the four definitions @gritty wind
!paste
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
They all just set up self.cog in the same way
Which tests fail
lol
Ah I see it up
Right now it's these that fail:```py
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_staff_members_can_bypass_channel_restriction - TypeError: user_info() missing 1 required positional argument: 'ctx'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_may_use_command_in_bot_commands_channel - TypeError: user_info() missing 1 required positional argum...
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_can_explicitly_target_themselves - AttributeError: Mock object has no attribute 'author'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member - AttributeError: Mock object has no attribute 'author'
FAILED tests/bot/exts/info/test_information.py::InformationCogTests::test_role_info_command - AttributeError: Mock object has no attribute 'send'
FAILED tests/bot/exts/info/test_information.py::InformationCogTests::test_roles_command_command - TypeError: roles_info() missing 1 required positional argument: 'ctx'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_member_cannot_target_another_member - AttributeError: Mock object has no attribute 'author'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_member_cannot_use_command_outside_of_bot_commands - TypeError: user_info() missing 1 required positional ...```
Yes you can, right click the image and click "copy image"
Not what they were after lol
big brain
Ohh
They wanted the file path copy-pasteable
dw, it was funny
Yeah ik
CC @gritty wind
...
all tests in tests/bot/exts/info/test_information.py pass locally
so uh
have fun ๐คก
lol
Well, did you make the changes locally lol
no, because i don't have said changes smh
they weren't pushed or pasted or anything ๐
The changes I pushed that broke the tests are on the branch you mentioned above
Wait no
user-improvement branch
oh
The incidents one is for a different pr
Yeah, I'm nowhere near done with that
So just ignore it all
that seems like just not finished rather than bug tho
yeah
although now i'm gonna run the tests on main jussst to have a local baseline
and then check out the actually correct branch
lol
Should I pass the self.cog back in again? Since that seems to be needed ๐คท @gritty wind
I had to write my own test suite and tests for my coursework
I guess so, but I still want to know what dark fuckery is being done to make that a thing
i copied the pydis mocks and then made some improvements for my own code
bot#1911 to share them upstream
Git blame says this is KS' doing ๐
Someone mocked the cog, instead of making an actual instance of the cog
Turns out it's not a very good mock /s
At least in the methods where it fails with the changes
I honestly have no idea where though lol
what if you use a mock cog and set functions to functions on the mock cog, so you'd be testing just the specific functions
^ that's not relevant but is speculation for later
Wait
Hm no
self.cog is a mock when the debugger is inside the actual function
It's because I'm looking at self when it's set to ctx because of the arg fuckery
So ignore that part
oh i get 12 failed tests
This might explain it though:
> type(self.cog)
<class 'bot.exts.info.information.Information'>
> type(self.cog.user_info)
<class 'bot.monkey_patches.Command'>
4(?) I fixed because it's just adding False to the end of each create_user_embed
!d unittest.IsolatedAsyncioTestCase
class unittest.IsolatedAsyncioTestCase(methodName='runTest')```
This class provides an API similar to [`TestCase`](https://docs.python.org/3/library/unittest.html#unittest.TestCase "unittest.TestCase") and also accepts coroutines as test functions.
New in version 3.8.
for those questioning my sanity, read what ppl who mentioned me wrote
I've now got only 5 failing tests
Now clue how but that's good
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_can_explicitly_target_themselves - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::InformationCogTests::test_role_info_command - AttributeError: Mock object has no attribute 'send'
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_staff_members_can_bypass_channel_restriction - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_may_use_command_in_bot_commands_channel - AssertionError: expected call not found.
should just make that have a default in the code lol
!d unittest.mock.patch
It looks weird with a default though because the command itself (which calls this function) has a default
unittest.mock.patch(target, new=DEFAULT, spec=None, create=False, spec_set=None, autospec=None, new_callable=None, **kwargs)```
[`patch()`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch "unittest.mock.patch") acts as a function decorator, class decorator or a context manager. Inside the body of the function or with statement, the *target* is patched with a *new* object. When the function/with statement exits the patch is undone.
If *new* is omitted, then the target is replaced with an [`AsyncMock`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.AsyncMock "unittest.mock.AsyncMock") if the patched object is an async function or a [`MagicMock`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.MagicMock "unittest.mock.MagicMock") otherwise. If [`patch()`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch "unittest.mock.patch") is used as a decorator and *new* is omitted, the created mock is passed in as an extra argument to the decorated function. If [`patch()`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch "unittest.mock.patch") is used as a context manager the created mock is returned by the context manager.
ah
Now 4 (fixed the attribute error)
i have 4 now too lol
Okay, cool
8 of them were missing args
Just to confirm, this is the 4 right?```py
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_staff_members_can_bypass_channel_restriction - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_may_use_command_in_bot_commands_channel - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_regular_user_can_explicitly_target_themselves - AssertionError: expected call not found.
FAILED tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member - AssertionError: expected call not found.
btw you might find this helpful: --sw or --stepwise
also
if you pass tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member to pytest
pytest tests/bot/exts/info/test_information.py::UserCommandTests::test_moderators_can_target_another_member
``` you can run just that specific test
๐
E AssertionError: expected call not found.
E Expected: create_user_embed(<MockContext spec_set='Context' id='1788322016032'>, <MockMember spec_set='Member' id='1788321768208'>)
E Actual: create_user_embed(<MockContext spec_set='Context' id='1788322016032'>, <MockMember spec_set='Member' id='1788321768208'>, False)
```Looks like I just need to update what it expects
Yep, all working now
@static canyon
create_embed.assert_called_once_with(ctx, self.target)```to```py
create_embed.assert_called_once_with(ctx, self.target, False)```etc.
lol we got it at the exact same time
I have @gritty wind to thank for helping me 10/10 support
Thanks guys ๐
1 test failed ๐
?
Any contribs around to merge bot#2028 please?
why the change from ctx.bot to self.bot?
Scale asked for it
and why is it being passed around when it's causing issues and is available from the global instance
To clarify, the typehint isn't wrong
What we're passing is wrong compared to the type hint
afaik we don't patch the internal ctx.bot object
just our global bot instance
Unless those are linked somehow?
pretty sure that should be our subclasses bot
ot names didn't change today 
Ah, that makes sense
bot redeployed at exactly the change time #dev-log message
oh lol i was like ok yeah makes sense bot wants a day off for christmas
which actually means... all tasks that were supposed to run probably
hmm did anything important not run
nah seems like they all ran or aren't important
!int e ```py
from bot.constants import Channels, MODERATION_ROLES
CHANNELS = (Channels.off_topic_0, Channels.off_topic_1, Channels.off_topic_2)
channel_0_name, channel_1_name, channel_2_name = await bot.api_client.get(
'bot/off-topic-channel-names', params={'random_items': 3}
)
channel_0, channel_1, channel_2 = (bot.get_channel(channel_id) for channel_id in CHANNELS)
await channel_0.edit(name=f'ot0-{channel_0_name}')
await channel_1.edit(name=f'ot1-{channel_1_name}')
await channel_2.edit(name=f'ot2-{channel_2_name}')
log.debug(
"Updated off-topic channel names to"
f" {channel_0_name}, {channel_1_name} and {channel_2_name}"
)
In [1]: from bot.constants import Channels, MODERATION_ROLES
...: CHANNELS = (Channels.off_topic_0, Channels.off_topic_1, Channels.off_topic_2)
...: channel_0_name, channel_1_name, channel_2_name = await bot.api_client.get(
...: 'bot/off-topic-channel-names', params={'random_items': 3}
...: )
...: channel_0, channel_1, channel_2 = (bot.get_channel(channel_id) for channel_id in CHANNELS)
...: await channel_0.edit(name=f'ot0-{channel_0_name}')
...: await channel_1.edit(name=f'ot1-{channel_1_name}')
...: await channel_2.edit(name=f'ot2-{channel_2_name}')
...: log.debug(
...: "Updated off-topic channel names to"
...: f" {channel_0_name}, {channel_1_name} and {channel_2_name}"
...: )
...:
Out[1]:
```... response truncated; full contents at https://paste.pythondiscord.com/daqipamozu.py
First time getting to see the changes roll out
coordinated scaleios clock
Wait is it? .timed is though
I just tried in #sir-lancebot-playground and it's not a thing
its an alias
Oh
But you gave me a great idea - we should have a .timezone-convert <time> <from which timezone> <to what timezone> that gives you the difference in # of hours between 2 timezones. What do people think about that?
(If we don't already have that, that is)
That's probably easy enough to do with an eval already
well yes but also... its implemented in tzdata which is imported with dateutil.tz and then you pass that to a method and then use datetime.datetime to get the current time and then shift it... etc
given we're adding .epoch, i don't see how a timezone command shouldn't be added because it can be done in eval
I misunderstood it as converting a time to a different timezone, which would be simpler. Anyway, that bot is just meant to be for fun and learning so I don't mind what gets added.
ah gotcha ๐
I mean, that's basically what I was proposing. I might open an issue about it soon
Ah i missed the <time> argument you had
So it would essentially be like
!e import arrow; print(arrow.utcnow().to("Europe/Berlin"))
@tawdry vapor :white_check_mark: Your eval job has completed with return code 0.
2021-12-26T05:02:19.194466+01:00
Yes, I think so.
They connect to the same host and I only see one redis container in prod
hmm?
my actually important review comment wasn't saved
oh lol
was about api requests
@thorny obsidian I believe the second PR you meant to link in your form issue is https://github.com/python-discord/forms-backend/pull/92, you linked our PR twice
also fwiw
returned to the frontend is documented on
I actually wonder in which cases 500 is returned
I guess a general 500 handler should be added
oi, I found a bug when reading the unittesting code (misuing strip)
and also it doesn't catch base exception from the user code meaning you could trick it into generating a 500
how do you make a token 
I guess you must run the frontend for that?
it would be nice to have a utility script to generate one
or even have just the backend drop one in the console if debug mode is enabled (cc @gritty wind)
Nah, it raises a user code load error, which is caught, and grouped with other bad user code
And reported as "failed" for the suite
Not possible, can't do the discord oauth
But we've added a special form for debug that will be sent if no other form exists, which does have oauth
so yes, you do need to run the frontend, but then you'll get a token
This is all documented in the getting started guide
The backend also has /admin_dev route which allows you to add any admin user without requiring a pre-existing admin account, which resolves that cyclical dependency
Because I've just done it right now, the steps to getting a full fledged admin token are:
- Run backend and frontend
- Go to frontend
- Auth with the only form there
- Copy the cookie
- Make a request to
/admin_devwith your ID - You're done
No, because the code catches Exception and not BaseException, and SystemExit inherits from the latter
Ah, I see what you mean
also could you assign me to the issue?
haha, thanks
Actually, if you get it in now, I can review
Right
no form currently in prod uses uppercase letters in its ID?
No
Sending DMs also sound interesting
It's more or less done iirc
Is it possible to have the form ID be automatically lowercased when fetching/writing from the DB? I have a feeling it'll get forgotten eventually
It might especially be lost in testing because people won't think to
that's what the constraint is doing
I mean for the other places where you're manually calling lower
I submitted a form called siGNUps and it saved it to the db as signups
ah, the problem is the frontend here
hmm
maybe a validator could do the trick
nope
I don't think that's a thing you can do
Alright thatโs fine
Thanks Chris, but Iโve hooked up my brain to the forms database
I know everything 
lol
plot twist, chris hooked his brain onto yours
I imagine you could do that is we used request models
then the pydantic convertor would work
Not possible, he hasnโt gone mad yet
Replying to this
lol yea
I think we do that with the validation already, just in some places we only need ID instead of an entire form object
would it actually run validation before fetching the DB?
This just means we donโt need to make all props optional, or require all props on all requests
Hm we could create a base form model thatโs just ID
It would run it on the arg passed to the requestitsef
also I'm not sure why you have pre=True on some models with a single validator haha
I more mean ```diff
- async def get(self, request: Request, form_id: some_con_str) -> JSONResponse:
- async def get(self, request: Request) -> JSONResponse:
"""Returns single form information by ID."""
admin = request.user.admin if request.user.is_authenticated else False -
form_id = request.path_params["form_id"].lower()
then you wouldn't need to lower() all the path params
How would the request actually look
since it's done by the type hint
I guess it is the same problem as you have to remember to use the constraint
true
the same
I usually do this with the decorator, so it might be slightly different syntax like this
IE ```py
@app.get("/foo/{bar}")
async def read_bar(bar: ham):
well you'd have to swap _id for form_id wouldn't you
depends what the actual request looks like
I'm not familiar with forms directly, but that's a format that would work at least
I had assumed since it was path_params["form_id"] the path param was form_id
it is a bit of a mixed bag, going by ak's memory haha
yeah in that case it is form_id
cool
cool
should be giveOwOy but oh well can't have everything in life
oh also fyi @vale ibex
Getting into a bad data situation like this is directly blocked in the command anyway, so shouldn't be possible.
Our github account is linked to our three discord accounts haha
if it doesn't break that's fine, we can just poke y'all :3
Ah right
well it won't break yea, dict generators just work
just the same as if you overwrite a dict key normally
yeah yeah, not sure why she wrote that
I wouldn't mind a subsequent PR to support multiple links, but don't have the time to do it myself atm
I would say it is fine
at least not until the new year
@vale ibex whenever you've got a moment, your requested changes on bot#1889 were addressed
now I wish we wouldn't have deleted our old test server
ah, not quite, I thought they were going to be implementing this pseudo code that we talked about #dev-contrib message
if not, it's something we can do in a following pr anyway
.
The main difference is that it still relies on there being a schema
Yea
I mean if this is a clear improvement, then we can merge
There's no particular rush, I'm just trying to clear filter-related PRs
yeah I can relock in the evening if no one gets to it
We'd lose policy bot then tho
oh hmm
I can give a contrib approval, that should work?
yea should do
jsut checking out the pr now
poetry lock takinga while on this laptop
might do a @hoary haven and buy a new macbook
I get the error that blue mentioned on the aoc role PR
it will error if someone is on the leaderboard and doesn't have any linked account, from what I can see
Ahhhhh, I thought he was referring to the member_aoc_info["name"] slice
but now I see it was the slice that uses that
I don't know how you managed that one chris lol
there are multiple programming error
diff --git a/bot/exts/events/advent_of_code/_cog.py b/bot/exts/events/advent_of_code/_cog.py
index 7315d166..90c42783 100644
--- a/bot/exts/events/advent_of_code/_cog.py
+++ b/bot/exts/events/advent_of_code/_cog.py
@@ -93,25 +93,25 @@ class AdventOfCode(commands.Cog):
# Only give the role to people who have completed all 50 stars
continue
- member_id = aoc_name_to_member_id[member_aoc_info["name"]]
+ member_id = aoc_name_to_member_id.get(member_aoc_info["name"], None)
if not member_id:
continue
- member = members.get_or_fetch_member(guild, member_id)
+ member = await members.get_or_fetch_member(guild, member_id)
if member is None:
continue
if member in completionist_role.members:
if await self.completionist_block_list.contains(member_id):
- await members.handle_role_change(member, member.remove_roles)
+ await members.handle_role_change(member, member.remove_roles, completionist_role)
continue
- await members.handle_role_change(member, member.add_roles)
+ await members.handle_role_change(member, member.add_roles, completionist_role)
members_who_deserve_role.add(member)
for member in set(completionist_role.members) - members_who_deserve_role:
# Remove the role from members who have it but don't deserve it (been removed from the leaderboard)
- await members.handle_role_change(member, member.remove_roles)
+ await members.handle_role_change(member, member.remove_roles, completionist_role)
@commands.group(name="adventofcode", aliases=("aoc",))
@whitelist_override(channels=AOC_WHITELIST)```
if you want to quickly fix them, this code should work
Sorry I caught a glimpse of myself in the mirror and have been distracted staring
Do you still need me for anything
kk bot#1889 is pushed up
I blame baileys
but it's pushed now
will squash before merge
Lmao
RE your comment on bot#2008: https://github.com/python-discord/bot/pull/2008#discussion_r771915170@vale ibex
(I asked for it to be a log.warning since it means we'd need to remove them via int e)
I suppose sending to mod-meta would work the same though (and arguably makes more sense)
imo, it shouldn't be a log, they should just be removed from the cache entirely
a message to mod-meta would make more sense over sentry, since this is mod domain, not core-dev
I wasn't sure whether that's something we wanted to do
Yeah, I just realised that
If this is an option then +1
Yea, I can't think of a reason why not to
Maybe just an info log saying they were removed and why
I think that could be helpful
Yeah that's basically what I was proposing, a simple time converter from one timezone to another
uhhh is lance broken
playing status, now I wonder if it was just a fluke
"playing since 60 minutes ago"
could someone on devops redeploy lance
smh you could have used king arthur
I donโt know the commands ๐ญ
arthur deployments redeploy sir-lancebot
restart, not redeploy iirc
I think itโs aliased to both
I've seen Chris use redeploy for restart
oh interesting
I don't think there's any difference really
you have to have the devops role
yeah
speaking of which @gritty wind congrats on devops!
I don't remember seeing it last I stalked viewed your profile
when you guys either move to a fork or implement them yourself. there's actually methods on the http object in dpy for slash commands, soooooo you don't actually need a fork.
Slash commands are actually really easy to write without a library
I can't run Arthur commands from my Apple Pencil
If weโre not doing gateway stuff
now I want to take the challenge
We'll do slash commands once they have good permissions
everything exists in dpy 2.0 to have slash commands
Itโs not a challenge, itโs doable in 200 lines with a decent http library
KA will get slash commands fairly early
Dude
Voice activated Arthur commands when
AI too so I donโt have to remember the exact thing
When can I just shout restart the mainframe and have it do something
TRUE
last you said it was when you moved to a fork I thought
that doesn't make the most sense to me
you can make some commands slash commands that never are intended to be hidden
before there's discord support to hide them
like /docs /pypi /tags /topic etc
yeah I haven't added any commands that require permissions to slash commands because discord
Apple Pencil is great I can write ยฏ_(ใ)/ยฏ and it writes ยฏ_(ใ)/ยฏ
joe uses 3 shrugs in a row-
ยฏ_(ใ)_/ยฏ
Lmao
imagine not shrugging
!e 5
@fallen patrol :warning: Your eval job has completed with return code 0.
[No output]
@patent pivot is this about to switch from @gritty wind's server back to pydis?
yes
noice
ah
wait it failed? #dev-log message
oh
lol
I see you already fixed that: https://github.com/python-discord/snekbox/commit/94627e22c118060bdec1676f9dca16691617fa7d
is the self hosted runner ran by pydis?
yeah
ah
it's on a deb 11 box we span up just for this
it means that all external contribs will need approval to run snekbox CI for all commits, but that isn't a major problem
yeah
what happened here? https://github.com/python-discord/snekbox/runs/4637369027?check_suite_focus=true#step:7:1125
something went wrong somewhere: shouldn't really affect the outcome but
uhh I don't see it
oh, wait until the run finishes then ๐
github streaming logs doesn't show them retroactively until the run is done
yeah makes sense
#19 3.419 WARNING: Ignoring invalid distribution -istlib (/root/.local/lib/python3.10/site-packages)
sometimes happens from a pip install
obviously meant distlib
oh yeah this is fine
it's just a warning
but how'd it do that in the first place
:white_check_mark: Restarted deployment bot in namespace default.
!eval import platform; print(platform.uname())
@patent pivot :white_check_mark: Your eval job has completed with return code 0.
uname_result(system='Linux', node='snekbox', release='5.10.0-9-cloud-amd64', version='#1 SMP Debian 5.10.70-1 (2021-09-30)', machine='x86_64')
okay we're back on pydis infra
in cluster
we figured that the stuff with cgroups wasn't exactly a bug
it was just a thing we had to handle
I'm guessing we'll go back in April?
what happens in april
I mean
April is after March and before may soooo
you kinda have to be prepared ๐คก
I remember something happening in april
Only thing that comes to mind is new Ubuntu LTS coming out
Ahhh yea
But that's only relevant for CI
thinking of discord message content intent?
No, what mark was saying
ah
We might go back to a debian box if we can get gvisor working on it
๐
kubernetes 1.24 is released in april
pay no attention to my IP ty
What's that update going to bring?
I can still IP ban you yk
hmmmm, full deprecation of dockershim is targeting 1.24 I think
KEP 2221 schedules removal of Docker support in Kubernetes for 1.24 now
it was gonna be 1.23
but got pushed forward, so April 2022
how does that affect snekbox and or pydis?
not much
scenario 1 is that Linode continue using an externally managed version of Dockershim and LKE clusters continue using Docker
how does pydis use dockershim*
scenario 2 is that Linode pick a better container runtime like containerd or CRI-O, then I have to go through our manifests and change alpine to docker.io/alpine, lol, and that's about it
container runtime
kubernetes doesn't work 100% with docker
so the kubernetes team wrote a tool called "Dockershim" which makes Kubernetes compatible with Docker runtime
but it's a big maintenance burden
and there are better runtimes approaching like containerd and CRI-O
that are built specifically for use in Kubernetes
whether we are on or off Kubernetes, we are looking at migrating away from Docker
there are much nicer container runtimes nowadays, if we're off Kubernetes there is https://podman.io/ which is absolutely fantastic
If we're on Kubernetes, probably containerd or CRI-O, which are good runtimes for kube
there is a nice FAQ about Dockershim removal at https://kubernetes.io/blog/2020/12/02/dockershim-faq/ and a good blog post at https://kubernetes.io/blog/2020/12/02/dont-panic-kubernetes-and-docker/
me and Volcyy are writing a paper on pydis devops
mayyyyyybe public we'll see
so docker-compose for running the projects wouldn't exist anymore?
It would
so just what you use internally then
We're talking production here
gotcha
Podman supports compose so we might advise you use that
My IP is 2a0f:85c1:0029:4269
Actually it isn't
But podman has full Docker compatibility
You can alias Docker to it and it works
April 2022
Kubernetes 1.24
Huh, I thought linode already switched to another runtime
Come to do, weโre already running containered ๐
They have not confirmed anything yet
Do you actually need to change to docker repo in the image?
I think Iโm running fine from just the pydis deployments, at least for snekbox lol
Podman advises you do, containerd might figure it out
Podman can support it
Podman can also run kubernetes pod specifications which is so cool
it also runs as non-root
which is cool
Do you like that more than Docker?
personally yeah
it's a drop in replacement that's getting a lot of community traction
I've been hearing a lot about it, maybe I'll try it out
if it's drop in, why use it in place of docker?
why does it exist if docker exists?
if its drop in, what doesn't actually work that does work with docker?
why use it in place of docker? docker makes a lot of decisions which are... decisions. it's just an alternate container runtime option, more details at https://podman.io/whatis.html. some of the great things about podman include that you can run things rootless containers and so on.
why does it exist? alternatives have to exist, it's what makes OSS software great. it exists because people didn't like how docker do specific things.
what doesn't work that works with docker? it's mostly 1-to-1, both docker and docker-compose will work with Podman socket. there are probably intricacies that are different but vast majority is 1-to-1.
it's important to remember that docker is a fairly thin layer, the majority of docker is in the build process and Dockerfiles and so on, the runtime just uses a lot of built-in Linux features
it's more if we removed k8s, we'd use podman, it's not the reason we'd drop k8s
I see
so
they explicitly don't support this, they recommend CRI-O for Kubernetes, but Podman will generate YAML for Kubernetes and can intepret it, it's just not meant to be a CRI tool
if people didn't like how docker does specific things but podman is 1:1, isn't that counteractive?
Interesting
no, it's about how docker does things, not how docker is used
it's under the hood changes
the API is the same because Docker is so widely used that it's almost standard
Dockerfiles, all in all, are pretty great
but for runtime, Docker uses a daemon, Podman is daemonless, which is a huge difference
er, what does that mean? ๐
Daemonless sounds very interesting
You don't need to have a master process running all the time, dockerd in the case of docker
Which allows you to more easily deploy on demand and stuff like that
but how would it work without one?
yeah, pretty much that
more importantly, how does it work with one?
also should we go to #tools-and-devops at this point lol
well, whenever you run a docker command, it is basically just an API call to the docker daemon
then that daemon builds/starts whatever you are working with
Through /var/docker.socket if I remember the path correctly
yeah something like that
podman still supports that, which is how docker-compose support works
but when you do podman run or whatever to start a container, instead of calling out to some API it interacts directly with runc
which is the tool for spawning OCI compliant containers https://github.com/opencontainers/runc
hahaha a very good question
I'm assuming some form of file storage?
mayyyybe, or maybe it can pull it back out of runc
Wouldn't that mean runc would run on a dameon then?
I guess it could list namespaces and all from the kernel
But I doubt every information can be taken back from the OS
don't think runc has a daemon nope
Yeah I'm pretty sure it doesn't
~/.local/share/containers/storage it seems like?
Or is that just the images
think that's just the storage
Someone just do strace -eopen podman run ... haha
maybe when you start a container it starts a daemon or something?
Strace best friend for life
or writes it to a file
it doesn't do daemons no, it just uses the containerisation tools that are built into the linux kernel
you'd be surprised how much of docker and containers are just linux features
lol ;-;
https://jvns.ca/blog/2016/10/10/what-even-is-a-container/ a great blog post
Basically there are a few new Linux kernel features (โnamespacesโ and โcgroupsโ) that let you isolate processes from each other. When you use those features, you call it โcontainersโ.
enter docker desktop for windows
which spawns a linux vm, lol
Is that the "containers aren't a thing" blog post
uhhh maybe
but yeah more or less it just breaks containers into "containers are fancy processes"
which actually cleared things up a lot for me
!remind 40M
Your reminder will arrive on <t:1640552840:F>!
uhhh i thought moby was the bit that docker used
unsure
oh maybe it is runc actually yeah
That one is a great read
To be fair, it is a mess haha
hahahhaa yeah
You have CRIO, Moby, runc, docker, docker-compose
it is all part of why I like podman though, it makes things a bit clearer
It is such a confusing stack
podman interfaces directly with runc, and that's it
it uses a cool tool called Buildah when you build Dockerfiles (well, you rename them to Containerfiles, lol) https://buildah.io/
Does it now
wtf fun ruined
Pretty sure it needs sysadmin capabilities for all the cgroup actions it has to do
Wait what do you mean by root
root user
Like, root user to start the daemon or run commands
Because if itโs the latter, thatโs what Iโm referring to
run the daemon
To start the daemon
Yeah of course if you set your socket perms properly you can use the client without root
Right, nvm then
But I heard from security consultants that you shouldn't
oh cool, my podman isn't using runc
it uses crun, hahahaha, what great naming
crun works with cgroups v2
Hold on lmao
Was it not confusing enough for ya lmao
i had this earlier when deploying that fix where self-hosted was deploying
the hosted runner took like 4 mins to boot because it kept failing to pull the action
good to see our self-hosted runner going strong though lol
boom another reason to drop k8s ๐
I tried re-running and it's still failing on it
I guess I'll just try again in an hour or something
Do we self host now?
Nice
looks like there might be some generic networking problems on the hosted runners today, 13 KiB/s pull speed lmfao
for snekbox we do, so that we get a cgroups v1 and v2 install to test on
Genuinely faster than my cellular rn ๐ฅฒ
cool, that's smart
yeah, I had a 5+ minute checkout earlier
@patent pivot is the runner set up on k8s and if yes are the manifest available somewhere?
it isn't nah
it's just on a debian 11 nanode we've spun up
install was fairly easy, just set up the runner & docker on that box
and it's good to go
Cool
Sorry, saying we instead of you out of habit
Would be nice to get more reviews on sir-lancebot#991
I don't reaaaally think that's a problem, given that you are still part of pydis (being a member) and a contributor
@static canyon heyo, just so you know, Iโve addressed your requested changes
this about the twemoji command?
Yep, I saw. I'm busy until new yearish probably; will try to review when I'm free
what issue number was that again (I can't remember if my review comment got saved or not)
github was bugging out and didn't save a few comments I made on different issues so I'm not sure
It's easy enough to find if you just go to the repo
It'll be basically at the top
ah yeah & I couldn't check out the branch so I need to debug that
I really ended up with a detached head and a load of other goodies
It's still right on top though lol
ยฏ\_(ใ)_/ยฏ
!remind 90m
Your reminder will arrive on <t:1877201974:F>!
Hey thanks for sharing that. I've never worked with containers and this article shed some light on what are they at their core
Edit duration
!remind edit duration 3825 90M
That reminder has been edited successfully!
๐ฏ! It's a great article, containers are nifty tech and understanding them for real makes them even more magic.
Yep, no stress ๐
(also if someone has some ideas as to why I kept getting invalid reference from the gh cli client, I'd love that)
I'm sorry if I'm annoying anyone by this, but sir-lancebot#901 has been up for a long time now and needs one more core dev review to get merged. Thanks!
Here's your reminder: https://jvns.ca/blog/2016/10/10/what-even-is-a-container/ a great blog post
[Jump back to when you created the reminder](#dev-contrib message)
that was a fast 40 minutes.
The article is small and reads in less than 5 minutes hah
Haha
And Joe how are you a first year student ? Did you start to code at 2 yo ?
8 years old, on a raspberry pi :)
So 10 years now
impressive ๐ฉ
Here's your reminder: I really ended up with a detached head and a load of other goodies
[Jump back to when you created the reminder](#dev-contrib message)
Lmao
i can review rn
Ahh I have some very small grammar nitpicks in the docstring for the AOC completer role but I don't know if I should post them given that they're the smallest nitpicks, and are probably unnecessary
haha, you can always approve and comment with a suggestion
as chris will squash the PR down anyway
Ahh
Why isn't my workflow executing in this PR https://github.com/python-discord/snekbox/pull/133
Do PRs only execute the workflows in the target branch, even if they've been changed in the source branch?
Oh never mind, it just errored out but the UI wasn't making it clear.
github failing to load for anyone else?
Hello
works for me
nope it's fine for me, maybe it's your wifi or something
Whoa writing
Can anyone think of a workaround for this? https://github.com/actions/runner/discussions/1419
Having to create a new commit to update the refs sucks.
That's an interesting problem. If no interpolation is done I can hardly think of a workaround.
pushing to a specific branch could be a quite janky solution
probably not worth doing at that point
workaround for which thing?
the whole issue?
Workaround for lack of interpolation support for the ref. I was looking at the JS actions to see if there's any way to execute a workflow from a YAML or something of that nature.
The only workaround for the whole issue that I know of is to use composite actions, but those suck because 1. it requires each action to be in a separate directory 2. actions cannot contain multiple jobs
Thereโs something planned thatโs somewhere between composite actions and normal actions (aka composite actions with jobs and what not), but that wonโt happen for a while. Even then, itโs only announced for enterprise, but I imagine itโll happen eventually
For now we just live with the duplication and dedup where we can (HassanAbouelela/actions was a start to that)
Makes me miss azure pipelines
what's HassanAbouelela? (joke, obviously)
My GH
and I wonder why I overuse the clown emoji ๐ฉ
wait it happens on other pulls now
something with git config perhaps?
yeah idfk what i did here
Can you checkout the usual git way?
what is the usual git way?
upstream is usually inferred, so just git pull && git checkout twemoji should work
!remind 7H review twemoji pr plz thx. and to actually stay focused, have you thought about a todo list?
Your reminder will arrive on <t:1640716396:F>!
what do you use for managing your dev todo? ๐คก
it is inferred if the branch name is only present on one remote
Aren't you supposed to not be awake rn? ๐ค
also fwiw I did pull from upstreamz even went as far to nuke the folder and reclone
.. maybe
what do you all use for managing what you need to do or something? like, what app or tool?
specifically talking like: fix up dev commit here, review that pull, finish an issue, etc
Jetbrains VCS integration >.>
did lance just die lol
It probably oomed on something, could look into it later
I donโt really have PC access this month :D
Kubenav is a great app haha
I don't really use any, but I know a few. One is Workflowy. Another is Google Tasks. Another is Outlook reminders maybe if you have that. Those are the only ones I can think of at the moment but give them a try.
I just use github notifications
OneNote for work, and for developing I just work slow enough to have 1 thing at a time
Good idea haha
And yeah OneNote also works
github notifications
@brisk brook @last patio https://github.com/python-discord/site/pull/508 merged, thanks for the reviews!
@eternal owl https://github.com/python-discord/bot/pull/1568 unstalled.
Awesome!
Lol just downloaded it a couple days ago
But internet is way too slow to reliably get anything
๐

lol
Forcepush to the AoC branch was just a squash
We all saw the token grabber you tried to push to that branch
It just emails me your dotenv on boot
I mean if you want it I can mail it to you
Like literally mail it
But you pay the postage
Hey @vocal wolf, feels like reviewing?
https://github.com/python-discord/sir-lancebot/pull/991
Poking the poking lead, we've come full circle
jokes on you I already poked myself heheheheheh
nooooooo
how is the message info calculated
its off by.... 20k messages
unless it doesn't include commands?
bot#2016
Here's your reminder: review twemoji pr plz thx. and to actually stay focused, have you thought about a todo list?
[Jump back to when you created the reminder](#dev-contrib message)
i timed that perfectly then
what the fuck
Do you guys fix style errors and write docstrings as you go, or do you do it all at the end?
all commands:
both, personally
like, I tend to do docstrings at the end, right before committing, but linting all the way through with a formatter
I despise writing docstrings and commit messages. It's almost more work than the coding itself
Conversely; it is the most important stuff so that people like me can understand what a function or a commit does
so that people can understand
FTFY
basically its not just you, its helpful for everyone
HAHA you know what? It's because I have to decipher what my code does and then explain it in a concise and eloquent way so nobody else gets confused
This
Message count is used for voice verification, so we ignore both bot command channels
so a bot command in a different channel is counted then
Yes
so I have 20k messages in #bot-commands and #sir-lancebot-playground
Counting starts August 25th 2020
I was here after then
and I only have about 2-3k messages in bot command channels so....
I find the same thing happens with emails / presentations at work. Trying to summarize a complex thing in a few bullet points that gets the key info right is really tough to do
yes
that's why it's wrong then
?
I previously asked Joe to delete my metricity data ๐คก
ah
any thoughts on why this isn't working
Did the other approach work?
Git fetch?
oof I missed it, will try shortly
@gritty wind i ran that
Can you list remotes
yes, yes i can
Idk try checkout instead of switch /shrug
this could be why....
the remote references aren't being saved, so its something with fetching
oh.
git config
remote.upstream.fetch=+refs/heads/main:refs/remotes/upstream/main
there. we. go.
for reference change this to remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
apparently github does this when you use gh repo clone
Why are you even using it?
using what
GH
That activity block count seems off
Pretty sure I had >30k blocks
You can look at my messages in mod-spam back when we were testing the lag
you use github smh
I can't find anything like that
Seems like you're at 16k
The GH client not just GitHub lol
why not use the gh cli client?
Iโm genuinely asking why you use it
Like what benefits does it give you over regular git
ah
fwiw I use it in combination with regular git
but it has api, browse, actions, gist, issue, pull, etc commands
so gh api /repos/python-discord/bot to make an api request to their,
gh browse to open the repo in the browser
gh gist to make gists
gh issue view num to view an issue
gh pr checkout num to checkout a pull, etc etc
I use the gh client since I'm too lazy to set up ssh and the auth is easy
yeah pretty much
Most of these things are pre-integrated into my IDE, so Iโve gotten kinda complacent about the whole thing
My IDE has the benefit of doing most of the heavy lifting while I give it vague instructions
I use it to check out PRs because I'm a lazy bastard
That is aaaallll
This isn't a self attributed lazy bastard title btw
lmfao @vocal wolf
Yes, I joined a server
its more like
all of you at once
but also
I didn't know that bots could join servers with invites ๐คก
Our raid channel says otherwise
yeah, saw it yesterday on stats.pydis
Looking for reviews on snekbox#132 and snekbox#136 - they're not too scary, I hope
๐ omg those are scary
Also sir-lancebot#901 needs a core dev review! Again, sorry if I'm being annoying about this but it's been up for a long time now. Thanks so much!
Is anyone able to give some insight as to what these test errors mean?```py
FAILED tests/bot/exts/moderation/test_incidents.py::TestArchive::test_archive_clyde_username - AttributeError: 'NoneType' object has no attribute 'kwargs'
FAILED tests/bot/exts/moderation/test_incidents.py::TestArchive::test_archive_relays_incident - AssertionError: Expected 'send' to be called once. Called 0 times.
FAILED tests/bot/exts/moderation/test_incidents.py::TestProcessEvent::test_process_event_confirmation_task_is_awaited - AssertionError: Expected mock to have been awaited.
No line number?
Because without one it would be hard to exactly know what happened, at least with the first one
The first one is the code didn't call send, and the second one ร certain task never got awaited
It says the test
Gimme a few mins, uploading what I've got at the moment to GitHub
Right, okay
@green oriole ```py
______________________________________________________________________________________ TestArchive.test_archive_clyde_username ______________________________________________________________________________________
self = <tests.bot.exts.moderation.test_incidents.TestArchive testMethod=test_archive_clyde_username>
async def test_archive_clyde_username(self):
"""
The archive webhook username is cleansed using `sub_clyde`.
Discord will reject any webhook with "clyde" in the username field, as it impersonates
the official Clyde bot. Since we do not control what the username will be (the incident
author name is used), we must ensure the name is cleansed, otherwise the relay may fail.
This test assumes the username is passed as a kwarg. If this test fails, please review
whether the passed argument is being retrieved correctly.
"""
webhook = MockAsyncWebhook()
self.cog_instance.bot.fetch_webhook = AsyncMock(return_value=webhook)
message_from_clyde = MockMessage(author=MockUser(name="clyde the great"))
await self.cog_instance.archive(message_from_clyde, MagicMock(incidents.Signal), MockMember())
self.assertNotIn("clyde", webhook.send.call_args.kwargs["username"])
E AttributeError: 'NoneType' object has no attribute 'kwargs'
tests\bot\exts\moderation\test_incidents.py:439: AttributeError
============================================================================================== short test summary info ==============================================================================================
FAILED tests/bot/exts/moderation/test_incidents.py::TestArchive::test_archive_clyde_username - AttributeError: 'NoneType' object has no attribute 'kwargs'
It's the webhook.send.call_args.kwargs["username"] giving the attribute error
But I didn't change that and it worked before my commits
It updated two libraries:```c
(bot-6mLjCNeK-py3.9) C:\Users\tizzy\bot>poetry install
Installing dependencies from lock file
Package operations: 0 installs, 2 updates, 0 removals
โข Updating pycares (4.0.0 -> 4.1.2)
โข Updating rapidfuzz (1.7.1 -> 1.8.0)
Installing the current project: bot (1.0.0)
Hmm, could you try to merge? (fetch and merge origin/main)
That worked, no conflicts
What about the tests
Wait, so your code probably broke it then haha
Can I get a diff?
It's the exact same just the archive message has more info
If you run tests you'll also get once saying the embed.description doesn't match but that's just because I forgot to remove the on in the test so that test can be ignored (have resolved locally)
Okay
One of the problem is the mock user doesn't have display_name working properly, I'm pretty sure
- message_from_clyde = MockMessage(author=MockUser(name="clyde the great"))
+ message_from_clyde = MockMessage(author=MockUser(display_name="clyde the great"))
Basically this
All three?
Sadge
Thanks for the role Chris
If that was you
Oh BTW you shouldn't be using now in your test
2nd test I'm looking at might be the same thing
They should be deterministic
Yep, it was
Yeah, I'll fix that later
Yeah it was him sir-lancebot#991
_________________________________________________________________________ TestProcessEvent.test_process_event_confirmation_task_is_awaited __________________________________________________________________________
self = <tests.bot.exts.moderation.test_incidents.TestProcessEvent testMethod=test_process_event_confirmation_task_is_awaited>
async def test_process_event_confirmation_task_is_awaited(self):
"""Task given by `Incidents.make_confirmation_task` is awaited before method exits."""
mock_task = AsyncMock()
with patch("bot.exts.moderation.incidents.Incidents.make_confirmation_task", mock_task):
await self.cog_instance.process_event(
reaction=incidents.Signal.ACTIONED.value,
incident=MockMessage(id=123),
member=MockMember(roles=[MockRole(id=1)])
)
> mock_task.assert_awaited()
tests\bot\exts\moderation\test_incidents.py:543:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AsyncMock id='1744593019040'>
def assert_awaited(self):
"""
Assert that the mock was awaited at least once.
"""
if self.await_count == 0:
msg = f"Expected {self._mock_name or 'mock'} to have been awaited."
> raise AssertionError(msg)
E AssertionError: Expected mock to have been awaited.
..\AppData\Local\Programs\Python\Python39\lib\unittest\mock.py:2188: AssertionError
========================================================================================= short test summary info =========================================================================================
FAILED tests/bot/exts/moderation/test_incidents.py::TestProcessEvent::test_process_event_confirmation_task_is_awaited - AssertionError: Expected mock to have been awaited.
Last one @green oriole
that looks weird
name isn't passed here in the MockMember but do I need to add display_name still?
Doesn't seem to fix it so guessing not
Yeah, I don't really know how to fix this one
What do you mean?
Is there a traceback further up in the output?
Nope
This is the enire traceback @vale ibex
can you do poetry run task retest and put the full output into a paste
yep
It's the same thing as what I sent above
alright, lemme pull you changes and take a look
There's no PR at the moment but this is the diff
Yea, I'm just gonna pull the branch
๐
What was your diff to fix test_make_embed_content
Just remove the on
๐
self.assertEqual(
f"{incident.content}\n\n__*Reported {day_timestamp} at {time_timestamp} ({relative_timestamp}).*__",
embed.description
)
```works
Alright, the problem is the same
it's because display_name isn't set
MockMember by default has it's name attribute set, but not display_name
see tests.helpers.MockMember
I tried specifying display_name but it didn't fix it
it's because Incidents.archive uses incident.author.display_name
which comes from the message that get's passed
not the member
Ah right

