Closed Bug 1138418 Opened 9 years ago Closed 4 years ago

sanity check hash length+type

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: bhearsum, Unassigned)

References

Details

We made a silly error with a CDM blob change over the weekend where a sha256 was used, but the hashFunction was set to sha512. It would be good to verify that hashes are the correct length to avoid such sillyness in the future.
Mentor: bhearsum
Whiteboard: [lang=python][good first bug]
Hi --

I'd like to start helping close bugs here and contributing to OSS in general. I can work pretty well in a few languages, but I don't know how to get started. This bug looks like a good spot, though.

I've never used Mercurial, only Git. Any pointers?

Zach
Flags: needinfo?(bhearsum)
Zach and I exchanged some e-mail and it looks like he'll be taking a crack at this. I'll assign it to you to make sure no one else picks it up!

The best place to do this is probably in the individual blob classes that require a hash function (https://github.com/mozilla/balrog/blob/master/auslib/blobs/apprelease.py, https://github.com/mozilla/balrog/blob/master/auslib/blobs/gmp.py, and https://github.com/mozilla/balrog/blob/master/auslib/blobs/systemaddons.py). They will need to override the base class' validate method (but still call it to do the schema validation), and then walk through the blob data to ensure that all hashValues are the correct length for the given hashFunction.
Assignee: nobody → 16zzundel5
Flags: needinfo?(bhearsum)
Hey Zach, it's been awhile since I heard from you so I'm going to unassign this. You're welcome to pick it back up if you have time in the future.
Assignee: 16zzundel5 → nobody
I am new to OSS community. Looking for my first bug. This one seems intriguing. I would be very grateful to get directions for getting starting.Thank You.
(In reply to Siddhesh Pednekar from comment #4)
> I am new to OSS community. Looking for my first bug. This one seems
> intriguing. I would be very grateful to get directions for getting
> starting.Thank You.

Hi Siddhesh, sorry for the delay in response. To get started, I recommend installing Docker and Docker Compose, and making sure you can run Balrog locally with the instructions at https://wiki.mozilla.org/Balrog#Hacking.

Once you've got that, comment #2 has some details on the specifics of this bug.
Is this bug being worked upon? If not I can take over.
Flags: needinfo?(bhearsum)
(In reply to meet123mangukiya from comment #6)
> Is this bug being worked upon? If not I can take over.

Yep, it's available for you. Comment #2 has a rough description of what needs to be done, please let me know if you have any questions.
Assignee: nobody → meet123mangukiya
Flags: needinfo?(bhearsum)
Priority: -- → P3
I would like to pick up this bug. I've taken a look at it and am pretty sure what needs to happen, and I'm pretty sure I can just use or add to the existing tests to verify. I'll assign myself once I have, what I think, is a working solution.
Hi,
   Thanks for the interest.
(In reply to matthew.e.coleman from comment #8)
> I would like to pick up this bug. I've taken a look at it and am pretty sure
> what needs to happen, and I'm pretty sure I can just use or add to the
> existing tests to verify.
meetmangukiya seems to have done some initial work at https://github.com/mozilla/balrog/pull/190. But, it seems he is not working on it anymore. You can have a look at it and start working on it. Have a look at http://mozilla-balrog.readthedocs.io/en/latest/contribute.html

> I'll assign myself once I have, what I think, is a
> working solution.
I don't think you have assigning rights yet.

Leave a comment here if you have any questions.

@meetmangukiya  are still working on this?
Flags: needinfo?(meet123mangukiya)
Gotcha, thanks Ninad. I'll wait for a possible reply from @meetmangukiya and will look at the pull.
Matthew it seem meetmangukiya is on longer working on this, if you are still interested you can start working on it.
Flags: needinfo?(meet123mangukiya)
Yeah, please continue the work, and if it helps you can work on my existing pull :)
Existing pull at https://github.com/mozilla/balrog/pull/190
(In reply to meet123mangukiya from comment #12)
> Yeah, please continue the work, and if it helps you can work on my existing
> pull :)
> Existing pull at https://github.com/mozilla/balrog/pull/190

Sorry you're unable to finish up here. We appreciate the work you've done so far though!
Hello, I would like to pick up the work from where it was left. I ran the tests, and they all pass. However, when I try to bring the containers up, (`docker-compose up`), it fails with this error:

```
...
balrogadmin_1  | bash: scripts/initdb_and_run.sh: No such file or directory
balrogdb_1     | 2017-02-15T15:39:10.745436Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
balrogui_1     | /bin/bash: /app/docker-entrypoint.sh: No such file or directory
balrogpub_1    | /bin/bash: /app/scripts/run.sh: No such file or directory
balrogdb_1     | 2017-02-15T15:39:10.757294Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
balrogdb_1     | 2017-02-15T15:39:10.764731Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
balrogdb_1     | 2017-02-15T15:39:10.764935Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
balrogagent_1  | /bin/bash: /app/run.sh: No such file or directory
...
```
@Darshan
Possible Suggestions : 
1. Make sure to run the command from inside the repository.
2. Try running the same command as 'root' user and check the output. (this is a hack).
Hey @Darshan -- I'm still working on this guy. Would you be willing to pick up another?
Also, @meet123mangukiya -- yes, I can finish this if you'd like to assign it to me. Thanks.
(In reply to matthew.e.coleman from comment #17)
> Also, @meet123mangukiya -- yes, I can finish this if you'd like to assign it
> to me. Thanks.

Here ya go!

(In reply to Darshan Chaudhary from comment #14)
> Hello, I would like to pick up the work from where it was left. I ran the
> tests, and they all pass. However, when I try to bring the containers up,
> (`docker-compose up`), it fails with this error:
> 
> ```
> ...
> balrogadmin_1  | bash: scripts/initdb_and_run.sh: No such file or directory
> balrogdb_1     | 2017-02-15T15:39:10.745436Z 0 [Note] InnoDB: If the mysqld
> execution user is authorized, page cleaner thread priority can be changed.
> See the man page of setpriority().
> balrogui_1     | /bin/bash: /app/docker-entrypoint.sh: No such file or
> directory
> balrogpub_1    | /bin/bash: /app/scripts/run.sh: No such file or directory
> balrogdb_1     | 2017-02-15T15:39:10.757294Z 0 [Note] InnoDB: Highest
> supported file format is Barracuda.
> balrogdb_1     | 2017-02-15T15:39:10.764731Z 0 [Note] InnoDB: Creating
> shared tablespace for temporary tables
> balrogdb_1     | 2017-02-15T15:39:10.764935Z 0 [Note] InnoDB: Setting file
> './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
> balrogagent_1  | /bin/bash: /app/run.sh: No such file or directory
> ...
> ```

If you need help finding a different bug to look at, please let us know! Sorry the state of this one got so confusing.
Assignee: meet123mangukiya → matthew.e.coleman
Matthew, are you still planning to look at this?
Flags: needinfo?(matthew.e.coleman)
I am. I was planning on addressing it this week, sorry for the wait.
Flags: needinfo?(matthew.e.coleman)
(In reply to matthew.e.coleman from comment #20)
> I am. I was planning on addressing it this week, sorry for the wait.

No worries!
(In reply to matthew.e.coleman from comment #20)
> I am. I was planning on addressing it this week, sorry for the wait.

Someone else would like to work on this. I'm reassigned because it's been idle for awhile. If you'd like a different bug to work on please let me know.
Assignee: matthew.e.coleman → kushal.spiderman.singh
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/517bbc3a8dea3e200afa614ede7c9cd38f695f23
bug 1138418: Adds sanity check for hashLength for gmp blob type (#325). r=bhearsum
Depends on: 1374991
This seems to have been solved.
https://github.com/mozilla/balrog/pull/325
Flags: needinfo?(bhearsum)
(In reply to Karl Dubost :karlcow from comment #24)
> This seems to have been solved.
> https://github.com/mozilla/balrog/pull/325

We're still waiting on https://github.com/mozilla/balrog/pull/340
Flags: needinfo?(bhearsum)
(In reply to Ben Hearsum (:bhearsum) from comment #25)
> (In reply to Karl Dubost :karlcow from comment #24)
> > This seems to have been solved.
> > https://github.com/mozilla/balrog/pull/325
> 
> We're still waiting on https://github.com/mozilla/balrog/pull/340

Kushal, are you planning to finish this up? You're almost there!
Flags: needinfo?(kushal.spiderman.singh)
Sure , I'll take it up this weekend and make sure the issue gets closed soon. Sorry for the delay !
Flags: needinfo?(kushal.spiderman.singh)
(In reply to Kushal Singh from comment #27)
> Sure , I'll take it up this weekend and make sure the issue gets closed
> soon. Sorry for the delay !

No worries, just trying to keep the bug up to date.
Kushal, I'm unassigning you due to inactivity. You're welcome to pick this bug back up at a later time.
Assignee: kushal.spiderman.singh → nobody
Mentor: bhearsum
This has been implemented for GMP, but still needs to be implemented for SystemAddons and AppRelease blobs.
Hey I'm looking for a first good bug and would love to try this one! Can I be assigned to this please?
I'm a student at Seneca college learning open source, and I was hoping to work on this bug for my course.  If no one else is currently working on it, I'd like to give it a try.
(In reply to Phil from comment #31)
> Hey I'm looking for a first good bug and would love to try this one! Can I
> be assigned to this please?

You're welcome to. Please let me know if you have any questions about how to get started.
Assignee: nobody → pahenning-folz
Flags: needinfo?(pahenning-folz)
Unassigning due to inactivity.
Assignee: pahenning-folz → nobody
Flags: needinfo?(pahenning-folz)
Hi ben, I am searching for good python bug to work on . i am new to OSS would like to contribute to some issue. I would appreciate if you could help me to find a good starter bug. Thank you very much .
(In reply to rishikeshfanse from comment #35)
> Hi ben, I am searching for good python bug to work on . i am new to OSS
> would like to contribute to some issue. I would appreciate if you could help
> me to find a good starter bug. Thank you very much .

Hi, unfortunately I don't have the time to mentor someone at the moment. I see there's lots of of other bugs available on https://www.joshmatthews.net/bugsahoy/?py=1 though.
Whiteboard: [lang=python][good first bug]
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → MOVED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.