Author Archives: nicolexin

Status Reports – November 29, 2014

Barret Rennie

What project are you working on?
Multi-commit review requests.

What did you accomplish this week?
Fixed a few issues with the database model and have been working on implementing the API endpoint but have been having a few issues. Namely, the commit api endpoint wont show up in the base /api/ list of URIs.

Links to anything done this week?
https://reviews.reviewboard.org/r/6649/
https://reviews.reviewboard.org/r/6648/
https://reviews.reviewboard.org/r/6618/
https://reviews.reviewboard.org/r/6645/
https://reviews.reviewboard.org/r/6642/

What do you plan to do next week?
Fix the Commit endpoint so that it appears in the list of URIs and
then work on getting it to accept and retrieve data for commits.
Adding Commit support to other related API endpoints.

What, if anything, is blocking you from making progress?
The bug I mentioned above.

Any other questions?
None.


David Kus

What project are you working on?
Drag ’n Drop Inline Images in the Markdown Editor
 
What you accomplished this week?
All of my patches are out of WIP.
I’ve been working on making changes based on feedback from code reviews.
 
Links to anything you’ve done this week?
 
What you plan to do next week?
Continue to work on improving my patches.
 
What, if anything, is blocking you from making progress?
Nothing
 
Any other questions?
None

Mark Loyzer

Project:
Working on exporting Review Request as PDF and XML.
 
Accomplished:
I finished adding a Data Extraction object for Reviews, tidied up some of the code then started the XML stuff.
I wasn’t able to get the URLs working (I’m not sure how to create unique urls for Action Hooks) otherwise I would have removed the WIP tags.
 
Links:
 
Next week:
Add any changes from reviews and get the front end link working.
 
Impediments:
I have everything working but the actual link/anchor tag the sends the request to the server.  My status is:
1) When I hover over the link it produces the correct URL in the bottom left of the screen (good).
2) When I click on the link, no request is sent to the server (suggests something wrong with the front end/client side).
3) I have tried substituting the old ReviewRequestDropdownActionHook for my newly defined Hook and the same error persists. (Which suggests I didn’t introduce errors from the Hook side)
 
Questions:
How do I resolve the above issue?

Nicole Xin

What project are you working on?
‘rbt stamp’: Adding the review request url to last commit message
 
What you accomplished this week?
– Finished implementation of ‘rbt stamp’ (Git only)
– Tested ‘rbt stamp’
 
Links to anything you’ve done this week
 
What you plan to do next week?
– Do some peer reviews
– Get some reviews and Improve my projects
 
What, if anything, is blocking you from making progress?
Nope
 
Any other questions?
Nope

Ryan Done

What project are you working on?
File Attachment Revision Slider
 
What you accomplished this week
Implemented working slider behaviour for image, text and rendered text attachments through hard redirects.
This also involved adding urls for file attachments and modifying the text.html template to display two files side by side (if the view is a diff).
 
Links to anything you’ve done this week
 
What you plan to do next week?
Finish as many extra tasks to improve the file attachment slider as time permits.
 
What, if anything, is blocking you from making progress?
Nothing at the moment
 
Any other questions?
1. Is the appearance of the text attachment slider satisfactory (note the shadow)? If not, what can be done to improve it? CSS changes?
2. I’m still unsure about how to manage swapping between “diff mode” and “view single file mode”. But I have a suggestion: Perhaps a button or control that allows the user to switch between 2 handles on the slider (for diffing) and 1 handle (for viewing each revision).
3. ChipX86 mentioned last meeting that we needed to make sure my code would not impact the diff viewer (image review ui in the diff viewer I believe), but I haven’t had a chance to look into this at all….

Azad Salahli

I’m sorry, I haven’t worked on the project this week. Recent days has been busy with other courses. But I’ll make up for it until pencils down.
I apologize.

Andrew Hong

What project are you working on?
Download review request attachments as tarball
Aggressive autocomplete bug
 
What you accomplished this week
Implemented functionality for retrieving files off S3 along with file attributes (date modified, date created, size), should work with OpenStack Swift as well.
Documented code
More sanity testing just to be sure everything is working good.
Generated diff file for containsQ, see links.
 
Links to anything you’ve done this week
ContainsQ implementation in webapi for users/groups/search: http://pastie.org/private/djpown9hkdzs9ry7hxrgww
Awaiting review and make changes from there, otherwise, going to read over code once more to be sure, and also test it.
 
What, if anything, is blocking you from making progress?
A crazy crazy week, one of my profs decided to go nuts and make everything due Monday 😦
 
Any other questions?
Nope.

Justin Maillet

What project are you working on?
I’m working on sandboxing the new hooks.
 
What you accomplished this week
This week, I fixed some PEP-8 issues in all the modules, and a bug that causes tabs to appear in the Subject line of emails.
 I’ve also finished the last of the new hooks, and I’m almost done sandboxing them.
One of the new hooks, the bug fix, and the sandboxing have yet to be submitted.
 
Links to anything you’ve done this week
 
What you plan to do next week?
This week I plan to warp up sandboxing the new hooks, and get the rest of my patches submitted.
 
What, if anything, is blocking you from making progress?
Nothing is blocking me.
 
Any other questions?
How do you build the docs?

Meeting Minutes: Nov 9, 2014

Mentors:

  • m_conley (Mike Conley)
  • ChipX86 (Christian Hammond)
  • heapify (Anselina Chia)
  • purple_cow (David Trowbridge)

Students:

  • rdone (Ryan Done)
  • andrewhong (Andrew Hong)
  • mloyzer (Mark Loyzer)
  • justy777 (Justin Maillet)
  • nicole_xin- (Nicole Xin)
  • asalahli (Azad Salahli)
  • dkus_ (David Kus)
  • brennie (Barret Rennie)

Announcements

heapify:
so there are 3 meetings left before pencils down, just keep that in mind and try to plan around that.

purple_cow:

as we head into the home stretch, if you need review on something, please let us know. don’t wait until the meeting!

Round Robin

rdone (Ryan Done)

  • paginator review requests have been there for about a week, wondering if theres anything more to do there.c
    • heapify: we’ll be sure to get a review done this week

andrewhong (Andrew Hong)

  • I’m looking at the autocomplete for Groups and People again and wondering how it should behave if the user inputs something that is not the start of the string. When I type “Smith” it brings up results with all users that have the last name (in People) “Smith”. But in Groups, I have a group called “Cat Smith” and no results come up if I type “Smith” into the field. It would only show when “Cat” is typed. Should it be left the way it is or should we make the functionality in those two fields similar?
    • purple_cow: I think left the way it is, people are a special case because they mostly have three names.
    • ChipX86: Sounds like there were issues with the tarball generation. The secnod version of the snippet I posted was tested with a 860MB file, compressed. Can you put the integrated version up?
      • andrewhong: yeah, i tried it with a pdf file of 8MB and it didnt fully write all the bytes.
      • ChipX86: was this the version I had or the integrated version?
      • andrewhong: Revision 2. I haven’t integrated it yet, i was testing the snippet and getting familiar with it. Need to explore this more later.
  • other than that, i made a quick note about the rbtools project that I started and might not be able to go through with it all. I have made notes on what i’ve seen in the code and how i planned on implementing it so i can put those up. I will look at it again if there is time.

mloyzer (Mark Loyzer)

  • For Change Descriptions, is there anyway to properly display the changes made?  Right now I’m using a dictionary to map that maps ‘plus’ to the attribute that represents what was added (either ‘added’ or new’).  But even then sometimes the value is an array or an array of arrays. I know that is extremely vague, so, in summary, I am trying to display the changes made to the Review Request through the ChangeDescription’s ‘fields_changed’ attribute,  Do you suggest any way to properly print the information in this dictionary?
    • ChipX86: so the JSON blob can really hold anything, and it depends on the field (you’ll know that the ReviewRequestField instances may choose how to store data). that said, there are some common patterns. so changedescs/models.py, record_field_change, you’ll see the default behavior for storing field data. if the data naturally fits into a list (list of bugs, reviewers, etc), you’ll have a dictionary with ‘old’ (the complete old list), ‘new’ (complete new list), ‘added’ (which items were added), and ‘removed’ (which were removed).if it’s smoething that’s not a list, like the Description field, you’ll just get ‘old’ and ‘new’, with the value as 1 item in a tuple. the trick is though that the value inside is an encoded version of the content, so it may be a tuple containing additional information so it will depend on the field.
    • ChipX86: you’ll need to handle it per-field. every field may have a different way of storing the encoded content. if there was a clean way of taking HTML adn converting to PDF, you could use existing APIs to do the rendering, which would work with extensions as well. that is, custom fields provided by extensions.
  • in regard to my review request, when i finish PDF can i create a new one for XML, just so i can somewhat develop in parallel (or at least more organized)?
    • approved by heapify and ChipX86

justy777 (Justin Maillet)

  • waiting for a bugfix to go in before finishing up sandboxing, a few questions on the new hook extensions:
    • How does reviewboard currently find/get SCMTools?
      • ChipX86: right now, they’re all registered in the database. SCMTool.objects.all() will return them all. that’s not ideal. I’d like to eventually make it more like mimetypes, review UIs, etc.
      • justify777: so for now, just pull the defaults out of the database or put third party SCMTools into the database?
      • ChipX86: well, right now I don’t think we can cleanly do third-party SCMTools through extension hooks. there is a mechanism in place today for third-party registration of SCMTools. It’s just not extension-based so I’d skip that hook for now.
  • question about working on RB after the semester:
    • ChipX86: Anybody who wants to work on RB is absolutely welcome to. generally, we’d have you work toward things not on the Student Projects list after the semester, and of course there’s no status reports needed.
    • Heapify: some students finished up loose ends of their projects after the semester, and you’re all free to do that, or pick entirely new projects!

nicole_x- (Nicole Xin)

  • What do those txt files in the reviewboard/templates/notifications for? I can see that they are different from those html emails, but how are they different and why?
    • purple_cow: when we send an e-mail, it contains both text and html versions because some people have their e-mail clients set to never show them HTML.

asalahli (Azad Salahli)

  • first of all, my WIP request is out. It’d be great if I can get some reviews: https://reviews.reviewboard.org/r/6509/
  • cannot call rbt patch inside rbt land
    • purple_cow: you just need to create your own argv list with the arguments that you would be calling ‘rbt patch’ on the command-line with, which would probably look something like argv = [‘rbt’, ‘patch’, ‘-c’, review_request]
  • I don’t know how should I check the outcome of merging/committing/pushing
    • purple_cow: for #2, the execute() method provides a variety of ways of getting that. by default, if a sub-process fails (returns with an exit code other than 0), it will call die(), but you can pass in various arguments to change that.
      ignore_errors=True, none_on_ignored_error=False means that execute() will return None if it failed and there are other combinations too. if you read through execute() you should see what’s available.

dkus_ (David Kus)

  • need more reviews on https://reviews.reviewboard.org/r/6454/
  • Should we have some way for users to attached files to the RR when a markdown editor is open (since we need to turn off the DnD overlay)?
    • purple_cow: maybe we can just have a small drop area over the attachment thumbnails?
    • ChipX86: we don’t have an area for that if there aren’t any thumbnails yet, we used to expand that area and make a drop zone. the drop zone is created when we detect a drag over the window. that code is entirely responsible for how that appears and what it does. perhaps we can, for review requests, create several drop zones. One for the whole review request, and then one per field that’s open, hide the bottom one when the drop is over the editor, to make it more clear where it’ll be dropped.
  • Should we keep track of file upload progress using a progress bar? I think it would be feasible to do, just not sure if it’s in scope or would be useful.
    • purple_cow: have a spinner to show that something is still in progress

brennie (Barret Rennie)

  • all is well!

Status Reports: Oct 4, 2014

Questions:

What project are you working on?
What you accomplished this week?
Links to anything you’ve done this week
What you plan to do next week
What, if anything, is blocking you from making progress?
Any other questions?

Nicole Xin

What project are you working on?

Same as last week.

I’m currently working on “General comments(with issues)”. Reviewboard now support comments on diffs, file attachments and screenshots, but there is no generic comment type that can open an issue tracking. So we would like to add that.

What you accomplished this week

I already set up the backend comment model. It’s posted and not a WIP, so welcome to review it! I’m started working on web-api also. But I don’t want to post a WIP since it looks messy now. I’ll post it after I’m done.

Links to anything you’ve done this week

Project: https://reviews.reviewboard.org/r/6375/

What you plan to do next week.

Keep working on my project, and hopefully finish web-api next week. I am having 3 midterms and a G2 Road Test next week. So… wish me luck!!

What, if anything, is blocking you from making progress?

Nothing at the moment.

Any other questions

All good for now.

Andrew Hong

What project are you working on?

Same project as last week: https://reviewboard.hackpad.com/bWzTgtBtq9f#:h=Add-a-

What you accomplished this week?

Implemented bulk of the feature which seems to be working great so far.

Links to anything you’ve done this week

https://reviewboard.hackpad.com/Andrew-Hongs-Development-Log-cXtoZbAyag7#:h=Download-All-File-Attachments-

What you plan to do next week?

I have a few things left to do on this feature, like adding a button and making it work on attachments not stored locally on the server.

Post it up for review (hopefully today/tomorrow) and make adjustments as necessary.

Start looking into another project?

What, if anything, is blocking you from making progress?

I’m talking to myself on IRC, but answering my own questions in the process 🙂

Any other questions?

Nope!

Barret Rennie

What project are you working on?

1. Excluded files support

2. Expanding the diff fragments in review comments

What you accomplished this week?

This week I’ve worked on a few things. I finished up exclude files support for Perforce, adding in support for excluding files based on depot patterns as well as relative paths[1]. I’ve also modified the exclude files support for Bazaar, CVS, Git, Mercurial, and SVN to interpret patterns as relative to the current working directory[2]. While working on [2] I noticed that `rbt diff` for SVN and CVS `SCMClients` generate their diffs only for the current working directory and its subdirectories, so I updated their `diff` methods to move to the root directory of the repository before running the diff and then move back to the original working directory [3].

Finally, I’ve started working on expanding the diff fragments in review comments. I’ve modified the API endpoint for genereting diff fragments to take an extra parameter, `lines-of-context`, which indicates how many lines above and below the fragment it should include in the response. The generated response also contains links for expanding the relevant diff fragments. My WIP is available at [4].

Links to anything you’ve done this week

[1]: https://reviews.reviewboard.org/r/6376/

[2]: https://reviews.reviewboard.org/r/6383/

[3]: https://reviews.reviewboard.org/r/6388/

[4]: https://reviews.reviewboard.org/r/6380/

[5]: https://code.google.com/p/reviewboard/issues/detail?id=3565

What you plan to do next week?

During the next week I want to get the UI for [4] to look and function like the diffviewer UI (i.e., expanding up/down to previous/next function definition, expanding the whole file, etc.). I also want to fix issue 3565[5] to generate a better error message (or possibly behave properly) now that I’m more familiar with how `rbtools` works. While working on these, I will start looking for another project to take over after I am finished.

What, if anything, is blocking you from making progress?

I’m moving forward and nothing is blocking my progress.

Any other questions?

No new questions so far.

David Kus

What project are you working on?

The same project as last week. Drag ‘n Drop Inline Images

What you accomplished this week?

Nearly finished the web API for user file attachments. The file attachment resources can be created / updated / deleted, though I do have a few questions around permissions (see below).

Links to anything you’ve done this week.

Review Request [WIP]: https://reviews.reviewboard.org/r/6351/

Dev Log: https://reviewboard.hackpad.com/dkus-Development-Log-LpIrKtA6wfI

What you plan to do next week?

Finish up the API, try to write some tests for it, and also start working on the view that will redirect to file attachment’s URL given the file attachment ID.

What, if anything, is blocking you from making progress?

Nothing that is completely blocking me, though I do have a few questions (technical / design related):

1) In the project description, it recommends sub-classing BaseFileAttachmentResource. This resource is pretty heavily dependent on the file attachment being associated with a review request, which is not the case for user file attachments. Does it make more sense to just sub-class WebAPIResource instead?

2) What should be the requirements for users to view / create / update / delete these file attachment resources? Right now, I have that:

 – Creating: user just needs to be authenticated.

 – Updating / Deleting: user needs to be the ‘owner’ of the resource.

 – Viewing: nothing right now

3) When deleting a file attachment resource from the database, should the actual file be deleted as well?

4) When testing the web API for creating the file attachment resource: After making a request with Basic Auth, and then removing the auth headers and making another request, the ‘request.user’ is still set to the last user that I made a request with, and so request.user.is_authorized() returns true even though I’m not providing any auth headers with the request. Is this supposed to be happening? Seems a little strange.

Any other questions?

No other questions.

Ryan Done:

What project are you working on?

Same as last week, the alphabetic paginator for the users list.

What you accomplished this week?

Created a hackpad and wrote about how the paginator works.

Fixed an few bugs in my changes, re factored some of my code

Did a pretty thorough verification test of the paginator changes. (Made sure that any other child classes of the djblets’ datagrid are not impacted)

Currently adding a “non-alphabetic character” button to the paginator. Should be done by Sunday.

Links to anything you’ve done this week

https://reviews.reviewboard.org/r/6369/

https://reviews.reviewboard.org/r/6368/

https://reviewboard.hackpad.com/rdone-development-log-LK0GSpfQxxN

What you plan to do next week?

Put any last finishing touches on the paginator if I haven’t already.

Start with users list “search” box.

What, if anything, is blocking you from making progress?

All good for now.

Any other questions?

Once we wrap up (or are close to wrapping up) a project, do we just go and take another off the list? Should we still make an effort to take on bug fixes from the issue list?

Mark Loyzer

What project are you working on?

Same as last week – I am currently working on adding an extension to Review Board that will allow people to export a review request as PDF or CSV.

What you accomplished this week

I submitted a WIP review request for my project (link below).

I finished implementing all the hooks necessary to get the dropdown menu in place along with its list items.

I started implementing the backend (generating a file representative of the review request and sending it to the user).  I was able to send a file already stored on disk and started looking into dynamically generating files when I talked to m_conley regarding potential layouts and contents of the document and he said that it would be a good idea to create a mock document in to get some reviews regarding that.  Secondly, my questions also concerned which python packages could be used (because I don’t want to add dependencies if I don’t need to and I want to make sure everything is fine on the licensing side as well).  So, in summary I am still in the process of creating this (PDF) file.  I have come up with a rough draft and am converting it to an electronic file and will be done this weekend.

Did a couple code reviews.

Links to anything you’ve done this week

Project:

Hackpad

https://reviews.reviewboard.org/r/6393/

What you plan to do next week.

Get a sample PDF template file to work from in creating one dynamically with python (and a package).

May end up doing CSV files first because I think that would be easier.

Both of these tasks involve confirming which information should be present in the files…so this will be my priority.

What, if anything, is blocking you from making progress?

None

Any other questions

For testing, how do I add changes/diffs to Review Board on my localhost?  I will want to make sure the change sets and any comments referencing the code is tested.

Justin Maillet

What project are you working on?

I’m still working on sandboxing extensions.

What you accomplished this week?

I’ve got tests running, however it’s still a work in progress.

Links to anything you’ve done this week

[WIP] patch: https://reviews.reviewboard.org/r/6399/

What you plan to do next week?

I plan to do some deep-diving into django hooks and backends, and Reviewboard’s hooks and backends.

After that I will finish writing the tests, and actually start sandbox extensions if I have the time.

What, if anything, is blocking you from making progress?

My limited knowledge of how the authBackend and hooks work is blocking me from making tests that initially fail and succeed after sandboxing.

Any other questions?

Can someone show me some code of a Reviewboard extension using hooks or point me in  the direction of a cleanly written one?

Azad Salahli

What project are you working on?

Same as last week, I’m working on “Update ‘rbt post’ to use the “Validate Diff” API resource”

What you accomplished this week?

I’ve changed ‘rbt post’ command to make a Validate Diff API request before creating or updating the review request. As of now, “rbt post” terminates if the diff doesn’t pass validation and leaves the actual review request unmodified.

Links to anything you’ve done this week

I haven’t posted a review yet.

What you plan to do next week?

In the meeting, I want to make sure I’m on the right track, and maybe correct my mistakes afterwards by the end of Sunday. What I will do next week will depend on the meeting tomorrow.

What, if anything, is blocking you from making progress?

Not enough knowledge about diffs and how they work. I cannot experiment with different diff files because of this. Basically what I want to do is, upload different kinds of diff files to see how the system behaves with and without Diff Validation.

Any other questions?

Not any specific questions, but I’m looking forward to the meeting to get some help.