3

Firefox Engineering Show & Tell - August 6, 2021

 3 years ago
source link: https://mozilla.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=bd0c503d-903f-4829-9c9d-ad7c011cee9b
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Firefox Engineering Show & Tell
search
Details
Captions
Discussion
Hi, everybody,
welcome to welcome to this and another installment of the Firefox engineering show and tell Annie and I will be leading this round of Shantelle.
And we'll probably get started in a in a minute or two as people, the new connections slow down.
This meeting is being recorded and people the presenters have given us only some of the presenters have given us links to share,
and I've posted those links on Slack in the desktop channel.
I can also post those links and Matrixx in town developers, but will be doing the moderation by taking most of the questions and.
I guess you could pick me if you wanted to hear Matrix. Um.
And then afterwards, we'll share this recording along with the links that people have provided actually before we proceed,
are you do you have a way of disabling the notification sounds for when people enter the meeting?
And we'll see. Chris. Hi, everyone, I'm Annie, co-host today to.
If anybody knows how to do that, please share, I don't know how to do it, but I turn off the joint sounds.
Think you can do it once the media is actually running? I think it's the way you set up a meeting in the first.
OK. Got it. Thank you. OK.
And on. So so this link is shared pretty widely so but we're just going to I was just thinking we try and go to the.
Open and free, so. The world, the way it'll work is the presenters will just share their screen and, you know, work like that,
but I'll go ahead and start by muting all and then anything going on that we can just in case anybody forgot to you.
OK, so so today's agenda will start with Mossop material tips and tricks,
and then following that up will go to Marco Barnardo with Gmail filtering with Google Apps script.
So, David, you wanna take it away? And sure.
Sorry, it's been OK. You can see my terminal is the text readable began.
So, yes, you're good to go. All right, thank you. OK, so again, curiosities and tricks.
I've been using material since Mazola started using material, which was many, many, many years ago now.
And so I've learned quite a bit about it. I think one of the things I like most about material is how customizable and extensible it is.
And until you've really kind of dug into the kinds of things you can do, I think you're missing out on quite a lot.
So I kind of wanted to just go over some of the things that I use and material to help me get my work done,
help me find stuff in the tree and things like that. And I'm not going to go into too much detail on anything.
Mostly I just kind of wanted to cover the the different things that are available,
just kind of whet your appetite if you want to try things out that you can love me and I'll sleep in the right direction for documentation.
So we all just have a whole extension system.
I'm not even going to go into that kind of conflict that or I'm just going to talk about right now is things that are available online.
So the first thing I want to mention is current defaults, the basic ones all the time.
So as an example,
you we tell me all of the revisions that are waiting to be pushed out to the central right now is the very brief information about each thing.
Maybe that's not enough and also has a useful option, which will give you information about the files that's included in every change that.
That's pretty handy, I think, and it actually just makes up the difference.
It's a different section in D.C. and for every single command, you can just add some facts that you want.
And then whenever you don't recommend it just passes box by default, you don't have to take them out every single time.
And so there's a whole bunch of different amounts of.
So, yeah, you can take it with the mountains and make all kinds of changes to your heart's content, so that's where to go.
Another interesting thing you do is templating do the default and you log.
Show it in its different format.
You might want to display different information, though, you might want to reduce the amount of information you just like the log accepts a.
Template documents. There is a very brief example, and this is going to do is just for every single change that it's going to show.
The short version of the change that nobody and the first line of the description so much more concise.
But there's all kinds of different things, different information about the change system, including that you cut the formatting.
You can do all kinds of stuff if you read into the manual.
It's extremely long because there's so much stuff to do and you can really customizable about to show you exactly what you need a particular time.
Next, overthinks, who represents? These are ways to select what revisions you want to see from material and so.
You might know some very feisty, you might just say, like, I don't see a lot of change that.
That's why simple, straightforward and you can also do things like that.
Change that. That's a simple but this whole kind of query language on top of the repository
that allow you to search through all the revisions for different things.
So as an example time, I want to find the revisions that I wrote and the.
A very useful one is to search for all of the revisions that a draft revisions, so these are ones that have been pushed into the center.
So I can see about three revisions in one repository right now that have been pushed to the side of Central.
If you've got the zone material exemptions and still has a few extra reps that's available to you,
this seems like show me obviously had some interest in this case.
I've got Central checked out into the streets, chosen those. I can also.
Such revisions by review, by reviewed. So watch yourself that I read.
It gets more powerful when you combine these things so I can search for every
revision that is both ahead so it doesn't have any child revisions and drafts.
So in this case, it's just so you can do all kinds of combinations and social conservatives and all
kinds of stuff you can do to select the sets of issues that you want to see for.
Typing those out is a bit boring, and sometimes you can define your own results in the conflict file.
So very quick example is the president's.
This one right here, this is going to find all the head overdrive, the drive.
It doesn't have a certain thing. Just go.
So that's basically all the patches that I'm working on.
And then you can do fun stuff like you can write your own custom commands, so I have this nice one and she catches what that is doing.
Is it just a log with the patches were upset using a custom template that I wrote to show what I'm interested in.
10:09
And so these are the patches that I'm working on, some command that will tell me, OK, what are the files of this revision touches?
10:19
And all of this, you can just do it in Countryfile, but just this analysis, she's going to end.
10:34
It's just saying when I do actually just do a Sheilagh, this revision using the style stylus,
10:40
just a different way of defining a template for the file. Now.
10:47
And. Yes, so you can pretty much do all kinds of stuff like that I like a lot is this one,
10:53
because it will show the stack of patches that I'm working on down to the patch that is that is on top of several new management patch you through it.
11:04
But as you can imagine, this is the kind, endless styles, different ways to such revisions.
11:16
It's pretty neat initial manual pages to look at, just like templates, websites, file sets of files,
11:23
the patches, textures are tons of useful information that's interested in learning about the stuff.
11:35
It's a. That's a really awesome day.
11:45
Thank you. And one of the things I was wondering if you could share as I watched was I think on the.
11:54
An. Right. Yeah, could could you potentially share your HGC file on the contents of it or like a you know, oh yeah, yeah, yeah, yeah,
12:04
yeah, that would be great because there were some really nice commands and then I would love to throw them into my.
12:17
All right, I didn't see any questions for Dave there,
12:26
and I think I see my kindly posted some information in the impounds about Slack, if you want to check that out.
12:31
Next, we'll move to our second presenter, Marco Gmail, filtering with Google Apps script.
12:40
You. Can you just set up this window OK?
12:48
OK, is it visible? Yes, thank you.
12:59
So I can imagine that many of you receive a lot of emails every day, especially if you're a for component watching BEXELL.
13:04
So it is critical to be able to filter, organize and prioritize those emails every day.
13:12
Some of you are probably using an external client for that, but many are probably sticking with the default mode web app.
13:19
So the most common thing that most of us are doing probably is to define a label inside Gmail.
13:27
Like I have this nested mentor label. You can defy labels from the settings.
13:32
In the labels section, and you can address labels like you're a bookseller and an astute mentor,
13:39
it once they have a label, they can, of course, create a filter.
13:46
So I define, for example, a filter where I say, if the e-mail is coming from bookseller Deman at Mozilla to talk,
13:49
and it contains the special baccelli header for mentors, then added to that label Zilberman to add to those three subjects elemental label.
13:55
So it will basically end up here. And this is, for example, very useful if you're mentoring bugs,
14:07
because then you immediately notice if someone is commenting in the back that you're mentoring,
14:12
that the problem is that this is based mostly on what you can search in Gmail.
14:17
So if you like, copy and paste it in the search field, you basically.
14:23
But in this case, I probably did something wrong.
14:30
But okay. This one. You get basically the same confidence of the label.
14:33
What is the problem? The problem is that I wanted, for example, to distinguish images by specific values inside their content.
14:41
So, for example, for intermittent failures, each email thread contains a ratio of the failure.
14:49
So, for example, it says this test failed it two times in three thousand pushes.
14:58
So it has a ratio of zero zero zero one.
15:04
I would like to be able to say, OK, let's group all the images that they have a ratio that is smaller than zero zero zero three, for example.
15:07
And this is not possible through Gmail because I should basically insert all the
15:16
numbers in the filter to be able to get zero zero one zero zero two zero zero zero.
15:20
Anything else. So what I discovered is that I can use Google Apps a script to do that thing.
15:26
So if you go to a script, a Google dot com, you can create a new project.
15:35
You give a title to your project, like, for example, my Gmail filter.
15:43
Your name, and then here you can write normal JavaScript code based on the Google Apps API.
15:49
For example, I prepared this piece of code that I will now comment.
15:57
So basically, I just define a regular expression that extracts the number for the failure ratio.
16:05
Then I use the Gmail app API, I run a search of it,
16:13
so I reduce the total number of threads just through the emails that come from Brazil, for example,
16:17
only intermittent failure because all of them contain the intermittent failure text and all the ariat emails,
16:23
then they can apply a filter to those threads. In this case, my filter is basically check all the messages.
16:30
And if there is any message that contains a value that is more and 003, then I want to keep it.
16:37
So I just this is just the normal JavaScript filter function.
16:44
I get my label that I previously created in Gmail, so I created these Bucksey Last Lauret intermittent label DNS, that label under Bobzilla,
16:49
and then I can just call these Adisa threads method that basically applies
16:59
this label to all the existing threads that I just found through this filter.
17:06
As you can imagine, this is just an example where they applied to low intermittent emails,
17:12
but you could apply the same to telemetry emails or any other kind of email, and you can do many other things using the Gmail app API.
17:18
There is actually a reference overview that contains all the APIs, for example, for Gmail, but also for docs or maps or any other thing.
17:30
And this documentation contains the description for all the meters that you can use.
17:41
Of course. This is, as I said, just for Gmail, but by looking through this reference,
17:52
you can find medals for docs to do the same thing so you can really create your own nested labels, group all your emails and find them more easily.
18:00
That's it.
18:14
Wow, that was really awesome, and I saw many other people commenting on Slack about how this changes things and it makes it really powerful.
18:18
So I didn't see any questions there. But this is really cool.
18:29
Really, really cool. And I think, um. Would you be able to share also that sample script that absolutely, yes, great.
18:36
I think they would really be cool because I think some of us might want to use the exact script there as well.
18:48
Yes, it is an example. It may not be perfect or it may not do very crazy things, but it is a good starting point if you want to play with it.
18:53
Yeah, for sure, for sure. Oh, actually, I forgot one thing, can I still show one thing?
19:02
Of course, because I forget about it. I'm sorry.
19:07
OK, once you have your filter, I forgot to explain how to run it, actually.
19:17
So that is pretty important. So once you have it and you can save, like, the normalcy I can, then you go either where there is triggers.
19:22
The trigger is how the script is being run, so you click on triggers, you are the trigger and then you basically choose how often you should run.
19:33
You should run daily, weekly, monthly, hourly, every six hours, every hour.
19:42
And you can also be notified, if you wish, about the failures of those rights so you can be notified hourly or weekly.
19:47
I usually pick weekly because the failures are not so critical to run.
19:53
And then, of course, if you go to your subscription page, you can see this is the feature that I'm using.
19:58
You can go through executions and see that the filter runs correctly every every hour in my case.
20:05
Sorry about the miss. Oh, thank you. That's very valuable that that you added that part.
20:14
Thank you. OK, we'll move to the next presentation now by how with those tools you might not know about.
20:19
Hello, friends, yes, that is me, so I wanted to get the set up,
20:29
I wanted to talk about some things that are available on Windows that some of you may know about, but some of you won't.
20:35
And a lot of it's built in. You already have this stuff or if not, it comes from Microsoft.
20:42
So it's official basically just to demonstrate that you can, in fact, have nice things on the Windows platform.
20:48
So I'm going to try to go real fast because I got a bunch of stuff I got to get through.
20:56
First of all, is Windows terminal. I'm hoping, I'm sure in the right desktop and you can see this, but yeah,
21:01
this is a like just modern, real, actual terminal out for Microsoft, for Windows.
21:09
It's in the App Store. Or if you're on Windows 11, I think it's built in to Windows 11.
21:16
But yeah, if you have store, we have tabs. I can open as many shelves as I want.
21:21
I have multiple shelves set up so I can just open my Mozilla build.
21:28
So if I want to do that, I have a really quite ridiculous amount of settings that are available.
21:34
Everything you might possibly want, including a profile and a lot of default stuff.
21:42
Let's see what else, um, yeah, this terminal also has like full antsy terminal military support,
21:49
which I think is a thing that people don't realize you can have on windows without doing something weird.
22:01
But no, it's all right here. And so to demonstrate that, I'm going to play Tetris.
22:06
Yeah, so all of this like weird terminal trickery stuff that you have to do in order to get Tetris stolen works perfectly well in the terminal.
22:16
So, yeah, absolutely, very strongly recommend this. If you are doing anything whatsoever on Windows, this is a really, really great tool.
22:26
I'm bad at Tetris also. What did I just do to get this weird Tetris app on Windows?
22:34
That's that's a little mix up, right? Well, I'm running SL two,
22:44
which is a built in Windows feature that puts just takes a real Linux kernel and
22:49
runs it in a virtual machine on top of Windows and you just have a show on it.
22:56
This is this is actual Linux right now that I just am talking to.
23:02
In fact, if I if you do a couple of steps, if you set up an X server,
23:08
you can actually run Linux GUI apps with this window, you can actually run Linux, GUI apps on Windows.
23:15
You can see this is the this is the ability distribution of Firefox and it's just running as if it were any other window just on my Windows box.
23:25
You could just do that. That just works in Windows 11.
23:34
You actually don't even need to do the setup of installing the extra when everything gets all just built in.
23:38
This all just works at the box, which is kind of incredible.
23:43
There's several different distributions available for WSU. I'm running Ubuntu in the App Store.
23:49
You can get several other distributions. You can get Colly if you want.
23:56
So you have options there. So I talk about, oh, filesystem access.
24:00
So as you can see, the directory I'm in right now is actually my Windows Phone directory because from WSO you
24:06
can just use them Antigoni Drive Laeter and you will get the windows drive at that path,
24:12
but you can also access the Linux file system from within Windows.
24:22
And to do that you open just any file explorer window and you browse to select or specialized
24:28
WCL dollar sign and then you will see a list of all the distributions you have installed.
24:37
And then here is just the file system from that distribution.
24:42
And you can use it just like any any Windows file system.
24:47
And it basically just works. Symbolics don't work because of the way the sharing is done, but for the most part, yeah,
24:50
this system is just here and you can interact with it as if it were any network share.
24:57
So that's nice. What else? Talk about let's see, um,
25:02
I am going to have a tough time demonstrating this because I am on Windows 11 and it's pretty broken right now and Windows 11.
25:07
But there is a Windows feature, which is called Sandbox.
25:14
And what this does is just start a VM with a brand new, fresh, clean image of your copy of Windows every time you run it.
25:19
None of this, nothing you do in here has persisted.
25:31
So it's really it's a really good way to just try something out that you think might be dangerous or you don't
25:34
work around your real system or run 12 Firefox installers because you don't want 12 boxes on your system,
25:39
as I have had to do on many occasions. Yeah, it's a really great way to test out one off stuff like that.
25:48
And I really recommend trying it out. If you find yourself constantly wanting a Windows VM, for some reason you can just use this.
25:56
It works for a lot of things, it works just as well as having an actual team, uh.
26:04
Next, Windows, Windows 10 has SFH built and now you can run SFH and it's just there.
26:11
I feel like people to know about this. You don't have to do anything. It's just there.
26:21
You can just run it and it works fine. There's even a server you can turn on and you can turn on SS HD if you want for windows.
26:25
I think I in the document, I think I have a link to how to turn that on, but it's you know, there's nothing to say about it.
26:33
It's just, as I say, you know how to use it. It's already there. Next, let's see.
26:38
I want to talk about process monitor because Process Monitor is one of my absolute favorite tools ever, period at all.
26:44
This thing is a superpower. So let me pull this up.
26:53
And you can see in the default mode, it's capturing everything from every process.
26:57
So what this is showing me is every single Windows Kernel API call that every process on my system is making right now.
27:02
That's kind of a lot. We should probably filter that. Let me. Have a look at just what Firefox is doing.
27:12
Hmm, yep. OK, so now I can see just what Fox is doing.
27:23
I can see TCP connections that happen. I can see all of the filesystem calls that happen.
27:28
Registry stuff is all logged in here, processing threat activity.
27:34
Any time anything happens to a process or thread within that context, it gets logged here.
27:38
So this is this is a really incredible tool. You can see absolutely everything.
27:43
There's really powerful filtering. So you don't have to see absolutely everything if you don't want to.
27:49
But, yeah, this is a great way to understand the behavior of something that you don't necessarily have great visibility
27:55
into or to see a little more macro view of what a process is doing than you can get from the debugger.
28:00
If you're interested in like characteristics or something like that, it'll show you every operation that happens.
28:08
A good way to gauge AIO performance that way actually, because you can see if something is doing suboptimally because there's,
28:14
there's thousands and thousands of things that still does it.
28:21
It's just incredible and I love it and I don't have time to go through it all.
28:24
You should explore it. OK, I'm probably out of time.
28:28
Let me do one more thing. Did you know that if you whatever you run mock configure on windows and you have a comp. toolchain, not Ferrare that builds,
28:32
you have campell targets set up, you automatically get visual studio projects generated for the entire.
28:43
In your Observer MSNBC directory, there's a file called Mozilla, SLN, and that is this, so you have a project for every single binary that's built,
28:51
you have a project for every others, every source directory, basically that generates native code.
29:04
And you can use this you can use it as just an editor if you want, just as an IP.
29:13
But it's also a really, really good debugger. It's Visual Studio is my favorite GUI debugger for any platform.
29:18
So it's really easy to just plop down breakpoints anywhere you want.
29:28
You can you can do see you can do this where if you if you start the debugger by clicking step into instead of start,
29:35
it will run the process and then automatically break as soon as it gets to main.
29:47
So you can you know, if you need to get in very early, that's very easy to do. Uh, what else?
29:54
Well, let's see. Let's step into here so I can just more stuff.
29:58
Yeah, so you have, like, automatic variable, you know, value listing, stuff like that, you can hover and see values like this.
30:03
Very nice. There's just a memory viewer where you can just, like, give it any any pointer and just see that memory,
30:14
all kinds of stuff, list of threads, list delivered in modules and you watch points.
30:24
You have lots and lots of stuff in here. It's a really nice debugger.
30:28
Try it out. And also, if for whatever reason, you can't use the visual studio debugger, there are reasons it may not work.
30:32
There is a new version of the old venerable Windi bug that is in the Microsoft store called Lindeberg
30:43
Preview that has this whole nice new gooey situation where you can actually find things that you want to do.
30:50
And also it has. Time travel, debugging, you have to run it is that which I forgot to do, but you have time trouble debugging here,
30:58
which does something similar to where it collects a trace of the process running and then attaches to the one or
31:08
two that trace so you can step backwards and forwards through the entire execution and do whatever you want,
31:16
which is really super nice to have. There's a checkbox here to automatically attach to every child process.
31:21
So you don't need, like, weird command line argument to do that.
31:29
Uh, yeah, and just the just the overall environment is a lot nicer to use than the old one.
31:32
It's, you know, a totally newly developed guey doesn't have a lot of the sort of crust that the old one had developed over time.
31:38
One last thing real quick. In the Windows SDK, if you go into the source directory in the SDK Root Root directory,
31:48
you can actually find the source code for the Microsoft C runtime.
32:01
They just put that here in the SDK now. So if you want to see how you know, one of the console functions is implemented, here it is.
32:06
You can you can just go look at and this is a great way to see to to see how awesome C
32:17
runtime behavior works that you're maybe unsure about or have some questions about.
32:22
It's also a sometimes an interesting way to see like an example of how to use Windows APIs,
32:27
because here you can find implementations of like standard library functions that,
32:35
you know, in terms of Windows APIs, because that's how all of this is done.
32:40
That's just making one thirty two goals. So it's a really it's a good way to see how to do some of that kind of stuff.
32:44
OK, that's all I had on my list to talk about. There's a bunch there's so much more stuff I can go through.
32:52
If this was helpful to anybody, let me know. And maybe next time I can do a whole ton more.
32:57
But yeah, that's it for today. Thanks, everybody. Thank you, Malik.
33:02
Thanks so much for that. And I think there was a back channel in the desktop,
33:12
so people were amazed that there are still debugging Windows and then the next presenter we have as Bryce debugging remote resources via proxy.
33:18
And bribes from the media to him,
33:32
and I'm going to be doing a really high level overview of a technique that I really like and it's quite powerful for debugging resources.
33:34
So I'm not going to go into any specific tools.
33:42
But if you have questions about how to use more specific tools, I'm happy to follow up and other channels afterwards.
33:44
And if you just found this interesting and take a more detailed write up would be useful.
33:51
Let me know because it's something I've been thinking of writing up and haven't gotten around to. So that feedback is useful for me.
33:55
All right. Let me just get my very professional slide up here.
34:00
Here we go. So often when we're.
34:05
Doing debugging as Firefox Dempster's Gecko devs, we're talking to some remote server and we typically don't control that server.
34:12
So we have us on the left here hack of people, and we have this remote server on the right.
34:20
And for a long time when I was doing this kind of work, I was frustrated by the assumption that to get the resources on the remote server to change,
34:25
I need to work with the people who administer that remote server.
34:34
And sometimes you're debugging problems where you aren't even communicating with those people.
34:37
Sometimes you debugging problems with those people, uncooperative, whatever it may be. So it comes the proxy.
34:42
For a long time,
34:48
I figured that a proxy was just at all for intercepting traffic in between me and the server and that all I could do was inspect that traffic.
34:48
Not so a lot of proxies these days offer a rich toolset for rewriting that traffic so you can intercept requests,
34:57
intercept the responses, change the headers, change the data. Also, there's a lot of tools to do that.
35:07
And I've got some in the notes for this talk. But there's tons.
35:12
It's really whatever whatever you find that works for you.
35:17
So I've got a couple of examples where this has been useful for me and my Firefox debugging the media specific.
35:20
But this is just really a very broadly applicable technique that I think is really cool.
35:28
So. My first example is recent report that we got where a site was serving DRM media to Firefox and that media wasn't working,
35:33
it was a very broad bug report where they essentially said the media is not working help.
35:43
So I started debugging this iterating and came to the conclusion that I think this site was serving us malformed data.
35:47
It was a media file that contained both audio and video and the way that Firefox actually fetch that file.
35:56
As we receive the manifest, we passed the manifest and we download the different streams in that manifest.
36:02
So first and foremost, I wanted to narrow down the case that I was looking at.
36:07
So I grabbed the manifest, saved it locally and chopped it up so that it was only grabbing one stream at a time.
36:12
And then I used my proxy to intercept the request for the manifest from the remote server
36:19
and instead serve my local hacked ones so that I only got video once or audio ones.
36:25
Video worked fine. Audio didn't work. So narrow down the problem to the audio stream.
36:30
So again, start looking at the audio stream figure that that's probably malformed.
36:36
The people administering the site were not.
36:41
Particularly helpful at getting me a workstream, so I took it upon myself to check that that file downloaded locally and started hacking it.
36:44
So eventually I came to the conclusion that they had some bad encryption information on their.
36:53
Managed to hack it out myself and got this dream working by intercepting the
37:00
stream and serving my own local one instead of the one coming from the side.
37:05
So I'm still receiving all the same information aside from the manifest and the streams from the site to the side still has the same styling,
37:08
et cetera, et cetera, still functions. But I'm able to narrow down this issue and intervene by messing with these
37:15
files without any any interaction with the people who own the site remotely.
37:22
A similar case and maybe one that's more broadly applicable outside of media.
37:28
As we were debugging a very popular music streaming site and this music streaming
37:31
site did assembly of the media locally in your Firefox using JavaScript.
37:39
So you download some of the media, but it would actually take that media to JavaScript scripts and put a file together.
37:45
So it was very complicated figuring out how these files came to be.
37:51
And you didn't ever see the actual finished file on the wire coming to you in Firefox because it was all assembled locally.
37:54
So it became a rather arduous task of debugging this JavaScript. And the JavaScript was, of course, obfuscated, very heavily obfuscated.
38:00
And it was it was more than 100000 lines.
38:08
So it was it was throwing up issues just to even debug this thing and the Firefox JavaScript debugger.
38:12
But also we wanted to prune it back and prettify it and whatnot so that we could more easily debug
38:17
it and maybe even edit it to see if changing the script would give us files that work properly.
38:24
So I downloaded this file instead of messing with it, use my proxy to replace the file that was being served from the remote server with
38:28
this locally Hack's JavaScript and after some time was able to figure out that it was
38:36
indeed this JavaScript that was creating malformed files for Firefox and that if they
38:41
change this JavaScript or if we made Firefox a little more tolerant of these files,
38:46
we could play these these media files from this very popular music streaming site.
38:50
So in both those cases, historically,
38:55
I would have thought it was nigh impossible to debug these things without interaction from the people who own the remote server.
38:58
But indeed, by using a proxy to just rewrite the stuff myself, it made these problems significantly easier to debug.
39:04
And in the case of the music streaming site, I don't think I would have been able to get to the bottom of the problem without using this technique.
39:10
So these are media focused examples.
39:18
But I think in general you can javascript is something that's applicable to all of us that we have to deal with debugging.
39:20
And I'm sure there are other things that aren't media that.
39:25
Folks in different domains of downloading that you want to you want to mess with it and change to see if it's malformed enough,
39:29
getting a better phone response from the site is going to work in Firefox. So that's it again.
39:33
Please let me know if that's interesting and if you think a more detailed look at this would be useful,
39:40
because I think it's neat and I need a little push to do a more detailed write up on it.
39:45
So thank you for your time. Thank you, Bryce.
39:51
I would have never thought using your proxy to debunk these kinds of things could work.
39:58
I think I would definitely appreciate having a more detailed write up on it for sure.
40:03
I don't think there are any questions. Bryce. Cool.
40:12
Next up is Jodi Circusy for a visual studio crowd.
40:18
Take it away, everyone, from Jodi. And I'm going to show and tell you a thing that I made earlier this year.
40:24
So is that right? Yeah.
40:33
All right. So you should be seeing my brother here with the extension homepage.
40:37
Yeah. This is SII for vets code.
40:42
I made it up in January and it's been it's a little rough around the edges still, but it's been very helpful, at least in my own workflow.
40:45
So I'm going to give you a demonstration to make this a little bit larger here.
40:54
If you're at all familiar with the circle, you'll these will look fairly familiar to you at its very basic level.
40:58
It's just it's it's listing all the workflows and jobs related to the project that you're working in.
41:04
And it drives the project by looking at your get remote the origin and then set yourself and feeds it into the extension.
41:12
It actually handily watches the current branch that you're on.
41:25
So if you are working on a feature branch and you want to check out the jobs occurring on that branch,
41:28
you can just branch and you'll notice that this is now changed to that that workflow showed.
41:35
I'm not I'm not sure if see things changing for we just I just see the homepage here, see OK.
41:48
Maybe show that I should the wrong the wrong screen here.
41:56
Clarence. Hey, there we go.
42:04
You can probably see this code now, right? Yes, cool. All right.
42:12
Let me start that again. Well, I'm just going to keep jumping into it.
42:16
So, yeah, this is the extension. I live in code.
42:19
So, yeah, as I said, if you're familiar with this code, you can see all these little icons here.
42:23
It's displaying all the workflow jobs for my branch that I'm currently on.
42:29
You can also set it to always monitors Pitstick.
42:35
So I've got main attack here at my settings. And so you'll see that if we refresh this, we've got all the jobs occurring on Main here.
42:40
If I was to want to inspect, say, failing tests, for example, if your tests output,
42:49
the XML made it metadata to circle, you can actually dig in and view them right in the circle.
42:56
As I said, there's some rough edges still, but this will show all the all the tests occurring for that job.
43:03
And then two things that you're not seeing here.
43:11
So you've got a successful successful jobs and failed jobs.
43:14
Do things that aren't occurring here are actively running jobs.
43:19
So this will show like a blue loading icon and then you can actually approve drugs that are on hold.
43:22
You just right. Click and approve them. With any of these, you can go straight to the browser if you want to view the open.
43:30
Yeah, it'll open up in your browser, you can see the whole project in your browser,
43:42
you can with like failed workflows, for example, you can do basically what Circle does.
43:47
You can try all of them. You can try it only failed once. And you can also see here you can look up artifacts.
43:53
So for this one, I say builds an image and we can see what the result of that is.
44:03
Just artifacts in a log file. Oh, here.
44:09
So you can integrate into interview as code for things like zip files,
44:19
it just loads and open to find her window and try to give you as much information as possible about what you're currently working on.
44:22
That's more or less it, as I said, I it's a little rough around the edges,
44:34
but I know it seems to have been pretty handy for me so far and I'd love to hear what you think.
44:38
If you give it, give it a try. I'll do that.
44:45
Thank you, Judy. Maybe you could post the link to the download page in the channel for sure.
44:59
Awesome. Looks great.
45:10
And next up, we have a do you think was Moore's work for AIDS for post lending, pruning, tough Kluster job application and more.
45:15
Hey, I'll see what I get through. All right, I'll play that.
45:28
Sharing. OK, so I figured for a lightning talk, I'll do a metal lightning talk, I'm going to see how many tools I can get through here.
45:37
The first one is something I recently called landed.
45:49
If you only use Kit, then you can fall asleep for about 60 seconds here.
45:53
The you would use this if you've landed a stack of patches.
45:58
So, you know, for example, in this repository, I have this ugly list of patches, some of which have landed.
46:02
And my usual workflow used to be that after I landed, I would rebase whatever's left or, well,
46:10
rebase my stack on top of Central and pray that material, you know, worked it out without conflicts.
46:18
If you have multiple patches touching the same pile, that's not going to go well.
46:25
So with this slanted tool, I will just run that and it will scan through the last two years worth of revisions in Central by default.
46:29
Search it. A number of these were not actually landed, so I didn't find those.
46:42
A couple of them were. And so it will create a command that will obsolete those patches and set the successors properly so that, you know,
46:46
rebasing and things will work a little more nicely and it'll ask you whether you actually want to run that.
46:57
So that's tool number one. Oh, actually, one last thing about that.
47:06
It is it defaults to matching on the fabricator revision that stored in the in the comment.
47:11
If that's not available, it'll use the text of the first line of the message.
47:17
Next tool is called Run Test Clustered Job, so the scenario here is you have a failure in automation,
47:24
you can't reproduce locally and you would like to reproduce it somehow.
47:32
And so this is kind of a wrapper around what is it, Mark TASC Cluster load.
47:37
And I think that's the name of it.
47:45
Yeah, something like that, which is a little bit tricky to use because generally I have a task that I want to reproduce.
47:49
It will pull down an image using the task ID of the toolchain test that actually produced that image.
47:58
So if I actually feed the task in that I want to replicate, it won't actually work with Martek task force,
48:06
although the image I'm not actually going to do a full demo of this because it has to pull down big images and has to climb the tree and all of that.
48:12
But the basic idea is you pass in this log task ID, it will pull down the log file, grep out the right task ID for it to load in,
48:23
which is a slow task idea which you could pass in directly that will pass it into muck load test cluster image,
48:36
and then it will go back to that original task and pull down the JSON information that that describes the task,
48:47
including such things as the command to be executed and the environment variables it sets.
48:56
And then it will run a.
49:02
It'll run darker, but it will also set it up so that it drops the right environment variable settings into a file in your life,
49:07
you profile that guy so that the shell it's running actually has the right environment to set up.
49:16
And in addition, it sets a cap Stollar command.
49:21
It's not here. So I can't look at what it is that stores the command that would actually be executed by the command.
49:27
So you can either adjust to the command center and it'll do everything exactly as it would on task,
49:35
Kluster, or you can edit it and make it do weird things.
49:40
The default behavior is going to be to pull down a gecko tree generally, which will take quite a long time and take a lot of disk space.
49:44
And I don't have a good way of hacking around that other than editing the run test coil script automatically.
49:54
But that is still number two to number three is a lot simpler.
50:01
Again, and I've got a bunch of local patches and oftentimes I want to edit just the files that are particular changes that touch it.
50:08
So, for example, you've got you've put it up for review, you've gotten feedback and you want to apply that feedback.
50:19
So I have a command here, actually. OK, now I'm not going to pop up a window.
50:25
I want to. So let's say.
50:35
I have that particular change that I want to edit things, all the files in there, the DESPUES, just so it'll tell us what it's actually doing.
50:41
So it's not only going through that change set to get the file names,
50:53
but it also looks at the first change that you've made in that file and takes you straight to that that line.
50:58
No. And strangely, this will work for Emax if your all caps, Ed, is set to like the code or something, it will work for the code.
51:07
I even stuck in something for them and it attempts to get the line numbers for all of those.
51:21
It won't actually work for some of them, like B, it'll only get the first one.
51:26
And if you make a link to it named Vestine and will default using the passcode instead of Emax.
51:33
So that would be to number three you set up.
51:40
So this is the scenario where let's say you do reboot Linux and Windows, but you occasionally want to you know,
51:43
you want to use Windows at times without actually rebooting and losing your environment.
51:51
So, hey, you want to run it at a VM. But I personally don't really like maintaining two separate windows installations because every time I use them,
51:57
I have to spend a day fixing them to work again. So I run the my actual physical installation of windows in a VM and I do that by creating kind of a
52:06
dummy view of my disk drive where I mask out all of the stuff I don't want windows to have access to.
52:20
I don't want to touch like my Linux partition and everything and but do expose the Windows things.
52:29
And then for some of the partitions, like the boot related ones,
52:37
I actually make a copy of it so that Windows can edit it all at once, but it won't actually affect my real one.
52:40
So it's it's safe. And I call that view set up.
52:47
If I run it right now with no options, it's going to yell at me because I have multiple disks that I could be doing this way.
52:50
I'll do it on my website. On this one, this isn't really doing as much as it seems.
52:57
No, it's not doing it at all. They've already created it.
53:07
Well, maybe I'll do the help. So this kind of goes in steps.
53:11
First, you kind of create this mapping file and then it'll create a map or device here.
53:18
And I'll prove that it's actually real map or. So this is an actual device that is really comprised of a bunch of lookback, files and things,
53:25
but if I look at it, it says, see, mom, it's it's a full, full disk and this is enough for me to get it to work.
53:39
I create a virtual box VM. You can you can use other virtualization tools as well to run windows and windows, actually, OK,
53:48
booting half the time off of physical hardware and half the time off of like virtual
54:01
box virtual device things it switches between them surprisingly seamlessly.
54:05
Final tool is called the bug. I will not go very far into this.
54:15
I've given a talk and one of our all hands on it.
54:18
But the basic idea, Tarapur for all kinds of debugging tasks that I commonly do in this case,
54:24
I can say you can actually see my full screen so I don't need to go text mode.
54:34
But this is a case where I used to debug.
54:39
I want it to record, which means run this command in hour after it finishes running, restart it as a replay inside of Emax.
54:42
You know, running are in a debugger there, so they're just went by the initial run, its single line that crashes.
54:56
Here it is. I can't explain that. But running in Emax, I'll get my pretty pruners loaded continue through.
55:05
You know, it takes me to. Whatever line it crashed on, sorry, our fingers, my alias for a reverse finish, you know,
55:16
you can do all of your usual our tricks and you can see that your variables have been optimized out.
55:29
We. This also includes I have a bunch of configuration files that kind of enhance are I'll reverse finish to the
55:35
beginning of this thing so I can actually see some of these variables without having them optimize out.
55:46
So, for example, if I say. Well,
55:51
I want to identify this this particular address when I see it again and I can label
55:54
any expression that'll set a convenience variable like easy access now that thing.
56:00
But if I just print out an expression or maybe a structure that contains a pointer to this,
56:07
it will replace all instances of that hex value by the convenience variable.
56:14
It's a bunch more than that, but I think that's all I'm going to cover today.
56:20
Thank you, Steve, and I think there's a question actually from my capley about the Alanda tool, I'm just going to read it out loud.
56:31
Can you talk about landed?
56:40
This looks like a tool I've been wanting to get that gets rid of all heads and work in progress that's already been checked out.
56:41
And I question, how can I switch landed to another tree, for example, plane?
56:49
So you use a branch pine and then, you know, rather than looking for duplicates in Central, it would use your pine.
56:54
Three, if I understand this correctly, gets.
57:04
Yeah, it's not just a heads, it's any, you know, patches, you know, in a stack, even if it's not a top large head and you can give it,
57:10
you know, revisions so you could, you know, list out, you know, those three things.
57:20
Plus, you know, if I had e0, you know, it'll it'll take any set of revisions.
57:26
If you happen to know those are the ones that are landed. You don't have to let it just scan and find things.
57:35
So I think that answers the question. Awesome.
57:44
Thank you. I'm sorry, maybe the last thing I should say is that these are all available in my strict
57:51
rules repository that's available either mercurial or get and Charles set out,
57:59
I think, a link to that earlier. Yeah, Jared posted the links, all relevant links a bit earlier in the journal.
58:05
Great. I think we're almost running out of time and we have one more presenter.
58:27
Thank you, Steve. Michael, you are still good to present.
58:35
Yes, I have to run to be able to push my next meeting just a little bit.
58:42
Thanks so much. I need you. If it's all right to stop sharing, please.
58:48
So, Michael, we will talk about multiple conflicts with Muskaan pick rapper.
58:53
Yes, this is a sales pitch. Hello, everyone. OK, so Maskin, big rapper, a sales pitch I am calling.
58:58
What kinds of things can you build from Missoula's central or missileers unified. So many things.
59:05
Artifact builds like Beita build debug off like there's so many things you can build
59:10
and moze config files are how you generally configure yourself to build a thing.
59:15
And if you're trying to build multiple things, like maybe you've been hacking on Mozilla Central and you're doing an opt build,
59:21
but now you have to switch to using and debug build and editing.
59:27
Amma's config file is a big pain.
59:31
You could use a Moore's config environment and if Moore's config files for each different like configuration that you want to use, I used to do that.
59:34
If you're like me, you used to do that.
59:44
And that's a pain because then every command that you run like moch run would also have to have the MOZE config environment variable set.
59:46
And so you'd have to remember to set it. Well, worry no longer a HAL rotas a tool called Moore's Config Rappard.
59:53
This is what I use now and you maybe should use it to its open source and you can get it here.
59:59
I will post the link in the channel later. Let me give you a brief example of how it works.
1:00:05
This is a Moore's config for an artifact build, and I've set it to point at you know, the operator is now this object artifact folder.
1:00:09
So that's where all of my, like, binary artifacts and all the build stuff is going to go.
1:00:17
And I could use that right now to I'm going to try and escape them.
1:00:24
I could use that right now to like build an artifact build. But suppose I also want to do an opt build, maybe even at the same time.
1:00:29
Well, Moore's config wrapper gives me a bunch of tools.
1:00:36
One of them is Moore's config, which allows me to, like, manage a list of multiple Moore's can and then I can choose to build with a particular one.
1:00:40
Like right now I've chosen to build with artifact I could choose to build with default.
1:00:48
That's what I call my, like, opt binary build. And so then I could do a mock build and that's going to build with default.
1:00:53
And I can use Micron and then we'll use that build and that obiter and I can then switch if I wanted to moze build with debug opt,
1:01:00
if I happen to want to run with debug mode on but with an optimized build so I can get like crashes and stuff.
1:01:10
So how how how do you create these things, what's going on while there is this tool called EMK Moore's config,
1:01:18
which would allow you to create a new one, like my new mass config?
1:01:24
And then it creates it and then it will show up in the list of can fix it already switched to it, you can see the little star there.
1:01:29
And then if I need to edit it, I do my config dashi to edit the smallest config and point it wherever I want.
1:01:37
I have a tendency to point all of my operators to like some obj dash something.
1:01:43
Usually the name of the thing I'm trying to build. It already knows I'm trying to build Firefox Oates's enable application browser.
1:01:48
I could all my like fitly add options or acad options in here and then moch build.
1:01:54
In a way I go and you can add and remove MOCs config.
1:02:00
That's, that's the sales pitch. You can if you find yourself having to build multiple kinds of things.
1:02:06
This is easier than trying to manage like hand manage multiple mods config.
1:02:13
So once again that that tool is called moze config wrapper ehow from I think he works in tools and automation or something.
1:02:17
Very handy tools that that fellow wrote and you should check it out.
1:02:28
And the instructions on how to install it and how to use it are all in here. That is my talk.
1:02:31
Thank you. Well, thank you, Mike. That was really, really cool tool.
1:02:36
I am also in the Stone Age there, so I need to switch over to my figure out the thank you, everybody, for attending today.
1:02:43
A lot of fun. I really enjoyed it. This meeting is being recorded and I'll share out the recording later today once it's been processed.
1:02:51
Also, this will be hosted on Almanzo under Firefox's folder.
1:02:59
I guess it's a little more details there to come to learn about for myself.
1:03:04
We'll also be sharing out the links that were submitted with people's presentation proposals, as well as links that were shared in the channel.
1:03:09
Thank you again for showing up and we'll schedule another one of these.
1:03:18
They've been a lot of fun. Thank you.
1:03:22

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK