WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200718
results.webkit.org: Add database table to save zip archives to
https://bugs.webkit.org/show_bug.cgi?id=200718
Summary
results.webkit.org: Add database table to save zip archives to
Jonathan Bedard
Reported
2019-08-14 09:02:49 PDT
We should have a table in Cassandra which stores zip archives associated with a test run.
Attachments
Patch
(23.48 KB, patch)
2019-08-14 09:16 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(23.25 KB, patch)
2019-08-21 08:18 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Patch
(23.56 KB, patch)
2019-08-21 14:39 PDT
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Jonathan Bedard
Comment 1
2019-08-14 09:16:52 PDT
Created
attachment 376270
[details]
Patch
Kocsen Chung
Comment 2
2019-08-20 14:23:24 PDT
Comment on
attachment 376270
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376270&action=review
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:101 > + ttl=int((uuid // Commit.TIMESTAMP_TO_UUID_MULTIPLIER) + self.ttl_seconds - time.time()) if self.ttl_seconds else None,
Seems repeated code from initial `ttl` declaration above.
Jonathan Bedard
Comment 3
2019-08-20 15:10:54 PDT
Comment on
attachment 376270
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376270&action=review
>> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:101 >> + ttl=int((uuid // Commit.TIMESTAMP_TO_UUID_MULTIPLIER) + self.ttl_seconds - time.time()) if self.ttl_seconds else None, > > Seems repeated code from initial `ttl` declaration above.
It would seem like that....I'll change it.
Jonathan Bedard
Comment 4
2019-08-21 08:18:51 PDT
Created
attachment 376884
[details]
Patch
Aakash Jain
Comment 5
2019-08-21 13:46:57 PDT
Comment on
attachment 376884
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376884&action=review
rs=me
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:37 > + DEFAULT_LIMIT = 10
DEFAULT_LIMIT for? Can rename it to be more expressive.
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:74 > + self.cassandra.create_table(self.ArchivesByCommit)
Just to confirm, we won't be creating a new table each time we instantiate this class, right?
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:89 > + if isinstance(timestamp, datetime):
can we use the get_time() method here as well?
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:90 > + timestamp = calendar.timegm(timestamp.timetuple())
why do we use timestamp.timetuple() here but not inside get_time() method?
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:119 > + def get_time(time):
you might consider making this stand-alone method(_get_time()), outside find_archive(). Also renaming the parameter 'time' to something like 'input_time' might be more clear.
> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:122 > + elif time:
should convert this elif to if, since previous if has a corresponding 'return' statement.
> Tools/resultsdbpy/resultsdbpy/model/mock_model_factory.py:185 > + old = current - 60 * 60 * 24 * 21
can we store 60 * 60 * 24 * 21 in a variable to make it more readable.
Jonathan Bedard
Comment 6
2019-08-21 14:16:38 PDT
Comment on
attachment 376884
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376884&action=review
>> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:74 >> + self.cassandra.create_table(self.ArchivesByCommit) > > Just to confirm, we won't be creating a new table each time we instantiate this class, right?
Correct. The CassandraContext class is smart enough to only create the table if it doesn't exist.
>> Tools/resultsdbpy/resultsdbpy/model/archive_context.py:90 >> + timestamp = calendar.timegm(timestamp.timetuple()) > > why do we use timestamp.timetuple() here but not inside get_time() method?
Because the get_time method is wrong....calendar.timegm(...) requires the tuple
Jonathan Bedard
Comment 7
2019-08-21 14:39:00 PDT
Created
attachment 376923
[details]
Patch
WebKit Commit Bot
Comment 8
2019-08-21 17:21:57 PDT
Comment on
attachment 376923
[details]
Patch Clearing flags on attachment: 376923 Committed
r248979
: <
https://trac.webkit.org/changeset/248979
>
WebKit Commit Bot
Comment 9
2019-08-21 17:21:58 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10
2019-08-21 17:24:30 PDT
<
rdar://problem/54579632
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug