Description of problem: pulp-admin /pulp-client consumer history --end_date does not include the history from the end date specified. Notice that the history has 27, 28 and 29th. But if you specify --end_date as 2010-09-28 on the record from 2010-09-27 is shown. The history from 2010-09-28 is excluded [root@preethi ~]# pulp-admin consumer history --id=preethi.usersys.redhat.com +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Repo Bound Timestamp 2010-09-29 11:06:00.451000 Originator admin Repo ID f13 Event Type Repo Bound Timestamp 2010-09-28 13:06:10.470000 Originator admin Repo ID f13-updates Event Type Consumer Created Timestamp 2010-09-27 16:00:42.813000 Originator admin [root@preethi ~]# pulp-admin consumer history --id=preethi.usersys.redhat.com --start_date=2010-09-27 --end_date=2010-09-28 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2010-09-27 16:00:42.813000 Originator admin [root@preethi ~]# pulp-admin consumer history --id=preethi.usersys.redhat.com --start_date=2010-09-27 --end_date=2010-09-29 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Repo Bound Timestamp 2010-09-28 13:06:10.470000 Originator admin Repo ID f13-updates Event Type Consumer Created Timestamp 2010-09-27 16:00:42.813000 Originator admin [root@preethi ~]#
commit 2a11e2af9d08b22dff5335efd6ee4cde7f04fdfb tree 5c6ae3dd1b8da489df2ecde3f66120f251676029 638715 - Changed behavior of history date queries to include the dates specified. src/pulp/client/core/consumer.py src/pulp/server/api/consumer_history.py test/unit/test_consumer_history_api.py Changed both the behavior and wording in the CLI for history queries. Now events that occur on both the start and end dates will be included in the query. The rationale surrounded the use case of getting all events that occur in a given month. Given the previous behavior, to get all events in April the query would have to specify: Start Date: March 31 End Date: May 1 With these changes, all events for April can be found with: Start Date: April 1 End Date: April 30
Fixed in build 0.76.
fails_qa [root@preethi ~]# rpm -qa pulp pulp-0.0.76-1.fc13.noarch [root@preethi ~]# rpm -qa pulp-client pulp-client-0.0.76-1.fc13.noarch [root@preethi ~]# pulp-client consumer history --start_date=2010-10-26 --end_date=2010-10-27 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2010-10-26 16:04:47.365000 Originator admin Event Type Consumer Deleted Timestamp 2010-10-26 16:04:42.086000 Originator admin Event Type Consumer Created Timestamp 2010-10-26 16:03:14.234000 Originator admin Event Type Consumer Deleted Timestamp 2010-10-26 15:39:05.124000 Originator admin Event Type Consumer Created Timestamp 2010-10-26 15:38:53.357000 Originator admin [root@preethi ~]# pulp-client consumer history --end_date=2010-10-26 +------------------------------------------+ Consumer History +------------------------------------------+ [root@preethi ~]# pulp-client consumer history --start_date=2010-10-26 --end_date=2010-10-26 +------------------------------------------+ Consumer History +------------------------------------------+ [root@preethi ~]# pulp-admin consumer history --id=preethi.usersys.redhat.com --start_date=2010-10-26 --end_date=2010-10-26 +------------------------------------------+ Consumer History +------------------------------------------+
Git web is down so I can't get the specific commit information. src/pulp/server/api/consumer_history.py src/pulp/server/webservices/controllers/consumers.py The issue was that the end date parameter didn't take the time of day into account. I changed it to manually set the time on the end date parameter to 11:59:59pm as it is parsed, ensuring we'll get all items from jdob@guardian ~ -> sudo pulp-admin consumer history --id guardian --start_date 2011-02-02 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2011-02-02 16:02:21 Originator admin jdob@guardian ~ -> sudo pulp-admin consumer history --id guardian --end_date 2011-02-02 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2011-02-02 16:02:21 Originator admin jdob@guardian ~ -> sudo pulp-admin consumer history --id guardian +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2011-02-02 16:02:21 Originator admin jdob@guardian ~ -> sudo pulp-admin consumer history --id guardian --end_date 2011-02-03 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Consumer Created Timestamp 2011-02-02 16:02:21 Originator admin jdob@guardian ~ -> sudo pulp-admin consumer history --id guardian --end_date 2011-02-01 +------------------------------------------+ Consumer History +------------------------------------------+
Fixed in 0.135.
[root@preethi ~]# rpm -q pulp pulp-0.0.200-1.fc14.noarch [root@preethi ~]# pulp-admin consumer history --id=pulp-client1 --start_date=2011-07-06 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Package Installed Timestamp 2011-07-06 08:14:53-04:00 Originator SYSTEM Packages ['zsh-4.3.10-6.fc14.x86_64'] None Event Type Package Installed Timestamp 2011-07-06 07:56:44-04:00 Originator SYSTEM Packages ['zsh-4.3.10-6.fc14.x86_64'] None Event Type Repo Bound Timestamp 2011-07-06 07:52:38-04:00 Originator pulp-client1 Repo ID f14 Event Type Consumer Created Timestamp 2011-07-06 07:44:30-04:00 Originator pulp-client [root@preethi ~]# pulp-admin consumer history --id=pulp-client1 --end_date=2011-07-06 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Package Installed Timestamp 2011-07-06 08:14:53-04:00 Originator SYSTEM Packages ['zsh-4.3.10-6.fc14.x86_64'] None Event Type Package Installed Timestamp 2011-07-06 07:56:44-04:00 Originator SYSTEM Packages ['zsh-4.3.10-6.fc14.x86_64'] None Event Type Repo Bound Timestamp 2011-07-06 07:52:38-04:00 Originator pulp-client1 Repo ID f14 Event Type Consumer Created Timestamp 2011-07-06 07:44:30-04:00 Originator pulp-client [root@pulp-cds2 ~]# pulp-client consumer history --start_date=2011-07-05 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Repo Bound Timestamp 2011-07-05 10:57:45-04:00 Originator admin Repo ID f14 Event Type Consumer Created Timestamp 2011-07-05 09:06:52-04:00 Originator admin [root@pulp-cds2 ~]# pulp-client consumer history --end_date=2011-07-05 +------------------------------------------+ Consumer History +------------------------------------------+ Event Type Repo Bound Timestamp 2011-07-05 10:57:45-04:00 Originator admin Repo ID f14 Event Type Consumer Created Timestamp 2011-07-05 09:06:52-04:00 Originator admin [root@pulp-cds2 ~]#
Closing with Community Release 15 pulp-0.0.223-4.