[Thu 8 Apr 13:11:01 CEST 2021] Was assigned a task. 'Implement Driver Vendor passthru' About Drivers: https://docs.openstack.org/api-ref/baremetal/?expanded=id154-detail,id151-detail#drivers-drivers Stuff to implement: https://docs.openstack.org/api-ref/baremetal/?expanded=id154-detail,id151-detail#driver-vendor-passthru-drivers Reading through the code. I have been pointed to look - here: https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/baremetal/v1/driver.py and here: https://opendev.org/openstack/openstacksdk/src/branch/master/openstack/baremetal/v1/_proxy.py I think the latter is where the code I write will go into. Glad to have found something to do. Was feeling a bit down earlier about just strolling aimlessly, not knowing what to do. The task looks simple enough, on the surface. I need to find out how it fits in the overall structure though of the ~~codebase~~ sdk/module. On some reading, I've identified that I may also need to look into these - openstack/resource.py - openstack/proxy.py Am on it! [Thu 8 Apr 13:36:21 CEST 2021] Okay. I need to implement a method(/class?) `vendor_passthrough` as a submethod of the driver class. I think.. [Thu 8 Apr 18:18:48 CEST 2021] LOl, first (commiting) day here. I think I was useful somehow. Ran across a (weird, rare) bug apparently. Interacting with people trying to diagnose it. It's fun! Hope I am useful in the info I provide and they get something frmo it. [Fri 9 Apr 18:07:18 CEST 2021] Long day. Not at work, but personal work. Took (much!) longer than I expected. Tired but got to get something done today. Rn I'm building the domumentation for the 'sdk' I'm working on. I need to get an overview of the code, and how this sdk works. Otherwise I'm feeling blind going in and editing those files I'm told to. (I don't even know how it works, haha. yet.). Side effect - also found instructions to setup the tests. Doing that too. Should come in handy when I make changes. Here are the setup instructions btw : https://docs.openstack.org/openstacksdk/latest/contributor/setup.html#required-tools Should have gotten there sooner. Oh well. Am now. p.s: maybe i'm doing too much research for something silly lol. we'll see. [Fri 9 Apr 18:53:29 CEST 2021] Unrelated. But i have often been confused by venv/virtualenv and other env stuff. discussion: https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe [Fri 9 Apr 21:17:48 CEST 2021] Uwu found something really tasty (er.. useful) for the assignment. this: https://docs.openstack.org/openstacksdk/latest/contributor/layout.html and this: https://docs.openstack.org/openstacksdk/latest/contributor/index.html#adding-features [Sat 10 Apr 08:59:52 CEST 2021] Back to work [Sat 10 Apr 14:09:33 CEST 2021] Submitted a patch today, for review. I am not really sure if what I did is the right way to implement whatwas asked. Am really confused. But from what I've read (in contribution tips), and the look of the code in the file I'm editing, it seems right. We'll see. I've made a little change first, a simpler addition, I'm going to have ask more questions about the next more complex feature anyway. So, based on if I did this right I'll have to ask questions and learn more. If it was wrong hopefully I'll be pointed to something more correct. [Sat 10 Apr 22:05:29 CEST 2021] Today I learnt quite a few new things. - TypedDict https://www.python.org/dev/peps/pep-0589/ - Dict (with the capital D) and refreshed on annotations in general - refreshed my knowledge of python classes https://docs.python.org/3/tutorial/classes.html - came across super // (saw super() in someone eles code earlier too, maybe now i'll find out what it means) [Mon 12 Apr 20:53:24 CEST 2021] Was feeling a bit down earlier today, stuck on the patch I was making. It had gone out of hand, the complexity of the whole sdk was getting to me. In my defence I was trying to plug a simple job into the major structures I saw in the file I was editing (and the modules it referenced). Also, the contributor guidelines for new features. The mentor advised me to focus on how a particular method implements a similar functionality. And well, monkey see monkey do :p, I could translate and modify those building blocks into what I was doing. Simpler now. Butit wasn't easy. I wouldn't have chosen that way without the pointing. For one the tool it uses (a `session` object) seems nowhere to be found in the code. It's definition I mean. So it's like a black box. And I'm only looking at it's usage to infer it acts like `requests` module. Oh well, whatever works. [Wed 14 Apr 08:42:11 CEST 2021] I think I was useful yetsreday. I mean I made a couple of patches. Not sure if they are "right". But it felt right, and felt good.. Waiting on feedback now. And some help with somewhere I'm stuck (tests). Hmm. it's been a week, almost about. since I have been assigned this `Task`. I'd have hoped for faster progress, but it is what it is. Would be a lie though to say I'm totally cool with it. Insecurity lingers. Unsure if I've got this. And I MAY have come close to crying feeling incable. It's whatever though, Imma do my best and see what happens. If I fail learn more and try my best again. (Keep learning either way). What else can you do. It's not time to concede. [Wed 14 Apr 17:49:55 CEST 2021] Back to square one. Feeling silly. :( Hang in there. Keep doing something, you have a bunch of stuff to do. [Thu 15 Apr 21:31:26 CEST 2021] Sorry, don't have much to say. /me busy's self. [Thu 29 Apr 23:44:15 CEST 2021] OKay. That was a long break huh? Well it was a combined planned time off (of ~1week) + unplanned ...episode of an illness/condition (mind related). Am better now, done with the crying and the venting and the brooding .ideating and what not. Anyway, here's what I got done today right after "I'm back!" The first three are recieved code-review suggestions that i followed as is. Rest involved more thinking and reading and writing code. [v] verb, method, body (re)arrange [v] Move response dict to docstring [v] :str not needed [in format-string], it's the default [v] Read about mock. Thank you! I had thought mock was a custom module here so never considered looking up in pythondocs. That linke was very helpful [v] sane tests. ~ mocked result for list_vendor_methods [v] sane_tests. ~ assert session called with correct parameters in list and call So! I'm back. Does it matter? I don't think so (expect the worst right?) But as they (eh.. Nick Fury) say.. work like the world intends to keep spinning tommorow. And so I should too just focus on doing what I can now, and completing my work, and learning what I can. There will always be a tomorrow* - take what you can learn today, or whatever little progress you can make, it'll come in handy, maybe not tomorrow but some day by when this progress accumulates. *Until there isn't, but then it won't matter. You won't be there to proove me wrong :p Ciao! [Mon May 3 12:28:16 AM CEST 2021] OKay! Have an update. Took up another project to sign-up/apply for. A few days before deadline though, so it's a rush. Anyway, the contribution task? Here's my pick: https://wiki.qemu.org/Contribute/BiteSizedTasks#Coroutines (update-link 2020-05-20: https://gitlab.com/qemu-project/qemu/-/issues/185) Basically hunt down functions with coroutine_fn, then anyone that call them, and mark them too! Okay maybe that sounds a bit sinister.:) I am thinkin of it like coloring. Color the dots game! So, what's the update? Well doing it manually seems impossible (there's soo many functions!). A simple text search for `_co_` in the folder resulted in 2000+ instances. Not gonna review that manually. And that's just `_co_`. So I wrote code (after completing `_co` manually :P) My code runs a .c file through `cflow`(a call-flow tool) and parses tht into a _networkx_ graph. Then (now) I can target the ones I know and and parent back to who's calling them. And mark them. That second part is left to do. So little time. :) [Thu May 20 10:13:52 PM CEST 2021] Okay quite a while since the last entry. I've been.. doing things. Did you know? I learnt about patch emails! That's so cool. So you can in a way export a git commit (or a bunch of em) in a file that is in an email format. Then the reciever can just import it into their local git and it's applied. awesome! simple too. Here's how to export: `git format-patch -s -1` The `-s` is for signing off (meaning you sign off for inclusion in project). The `-1` means use prior 1 commit. And to import: `git apply patchfile` or `git am` followed by Ctrl+D This was for the patch I sent for QEMU BiteSizedTasks#Coroutines task btw. Yup I completed that second part too. It's working *fairly* nicely. Still needs manual review though. It doesn't really understand context. The second week of this month I also learnt about python asyncio. One of the mentors set up a nice little test for me to try my newly learnt knowledge. I had to implement some simple functionality on an irc bot they gave me. With a count down timer on! :p And had to make sure the features implemented were *actually* running async (non-blocking code). It was fun seeing the bot do it's thing live, responding to their prodding, running some lines written by me! I succesfully completed most of the requirements. One of them (non-blocking part) was a bit tricky and I did trip over it for a bit. But it worked in the end. The one requirement I failed was about resource clean up. We discussed it after. I was told I did good. :) [Thu May 20 11:04:36 PM CEST 2021] One more thing to say is that I finally found something (that i was scratching my head about)! I have an inkling of what the `session` object is now. (from Apr 12 entry) After learning the first bits about asyncio in python docs I was just browsing and exploring interesting links, one of note: aiohttp. Check this: https://docs.aiohttp.org/en/stable/#getting-started Notice the session? Even better: https://docs.aiohttp.org/en/stable/http_request_lifecycle.html#aiohttp-request-lifecycle So it's probably something like that. One of those perhaps. Explains why using it felt a bit like `requests` that I've know from before. Also gives me a point to dig in for details. Haven't yet taken the dive into documentation of that object, but meaning to. For now noting it for reference. [Thu May 20 11:20:48 PM CEST 2021] Now here's the secret part. I'm a bit nervous about this internship. I don't know if I should take it. What if I ~~fuck~~ mess(ed) up?! Oh.. wait, did I tell you? I got accepted!! Yay! It was a bit unbelievable when I heard actually. I wasn't expecting it, but it came as a (pleasant?) surprise. I'm a bit doubtful about the pleasant part because I'm hella nervous. It was ..smile-inducing though :) when I found out, after a few moments of bewilderment ofcourse. The past few days I've been considering taking it (signing the agreement). I was supposed to answer soon (as they need time to arrange replacement otherwise). And yeah, that was(is) stressful. Trying to find persons to talk to hurriedly. It's tough for me **knowing** what to do in these situations. I wish I had more time, but it is what it is. I had already decided to make my final decision long enough before the deadline, considering their reqest. And that date is today (the deadline is still a couple days away). I was able to talk to someone, and they did allay my fears, to a great extent. Yeah, I think imma do it. I hope it's the right choice. 😢 p.s: Wanted to talk to one other person, before I did this (or two). But I can't find them, so it's now on me. nervous. I've already made the decision (i think), I'm taking it, this opportunity. Just need to build the courage to press that button and say I agree. :crossed_fingers: [Mon 24 May 16:51:23 CEST 2021] Ran across a weird weird bug, yet AGAIN! Why are bugs so attracted to me? It was this one - https://stackoverflow.com/questions/31044234/git-clone-gnutls-recv-error-9-a-tls-packet-with-unexpected-length-was-recei - https://stackoverflow.com/questions/40195898/git-clone-gnutls-recv-error-9-a-tls-packet-with-unexpected-length-was-receiv#40195947 Here was the symptom: git clone -v --origin origin https://opendev.org/openstack/ironic /opt/stack/ironic Cloning into '/opt/stack/ironic'... fatal: unable to access 'https://opendev.org/openstack/ironic/': GnuTLS recv error (-9): Error decoding the received TLS packet. Weirdness in that most other repos WERE downloading, but not this specific one. I was repeatedly retrying thinking of it as a network problem (or bad actor in the middle.., but why would they specificaly target an ironic repo for ME?) Also it worked from another machine but not this one (the VM i was using.) So I felt it could be VM related too. Such a strange bug with a strange ~~solution~~ workaround. It had me scratching and being frustrated for hours. The worse part about it was that there wasn't even something to learn from it or figure out about this. What I noticed following the workaround was that purging did the additional clearing out of the config, this must have reset it's state somehow. And there it was working again after. Fun fact: I hit it again! soon after. Might be abad connectivity involving issue too. Because my git clones are failing randomly sometimes, and this happens right after when I retry. Bad bug :( [Tue 25 May 16:14:05 CEST 2021] Hey, did you know? You can run tests restricted to previously failing tests using tox? tox -e py3 -- --failing [Thu 27 May 19:36:38 CEST 2021] Phew busy day, Lots of reading, lots of distractions (irc stuff, + @home), a little bit of drawing (I'm not really fluent at this lol.). Anyway, was able to do something overall (learning some atleast). Although I did have to put in an extra few/many hours. So.. gotta be more efficient I guess. I know it could have gone better. Lets try again next shift. [Mon May 31 09:56:26 CEST 2021] Not much work work the past couple of days. Blogging, setting up personal (work) finances and transition across irc networks. sigh! I need to get these sorted soon and focus on [real] work. I am excited (to get working on the code) but these things seem to have an earlier due date. :/ Hope I don't dissapoint my mentor too much. // By brain is spinning now, ttyl. [Tue Jun 01 08:04:41 CEST 2021] Alright. So I have sceduled some of those miscellaneous tasks and am focussing on work work for today. > an interesting exercise for you would be to take some API call (e.g. creating a node) and follow its path in the code > from the API layer up to the database That's something my mentor suggested. It's a cool trick it seems to me. And we're going to do that. Let's hunt trough the code and get the lay of the land. Howdy comrdes, yeehaw! Oh wait so as a summary here's the actionable stuff I'm going to do. - open the repo locally and find that api call / related stuff - look around and stroll and report back when tired, then we'll see what next [Tue Jun 08 17:39:36 CEST 2021] "Does anybody know what `interface` is? It seems so familiar but also so vague. And pops up everywhere. What kind of entities / concepts have you seen it being refered to? I came across 'interface' recently on the project I've been working on. In ironic project which is (*in my words*) a full machine (not VMs) cloud managing system. An interface is a python method that allows you to control a hardware type (for things like power off, deploy etc ). Also when reading about licensing issues regarding merging code from FOSS projects, I've read confusing stuff about how some projects can't include the code but can 'interface' with a binary etc. " - @ zulip chat with other interns on topic, foss related terms/jargon. [Fri Jun 18 06:24:56 CEST 2021] yay! Back to [serious] work. We're going to write code today.