Mailing List Archive

synchronize reports for multiple TRAC repos
Hello

We have multiple TRAC repos (approx. 10 of them). And we to ensure that
all repos share a common set of custom reports.

I have read:
https://trac.edgewall.org/wiki/TracReports

The only perspective I can see is to use direct SQL access to the
database and overwrite the `report` table on all our repos.

Am I missing something?

Anybody has a better idea?

Will this work for reports in SQL-query style (contain SELECT) as well
as for reports with Traq-Query style (contains query:)?

Any clue how I could synchronize (i.e. centrally overwrite) only
specific reports? Because overwriting the entire `report` database table
will loose all custom reports which users have saved.

Thanks
Clemens

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/a632ee60-42ce-f0c9-1292-34db5b2d6a85%40osypkamed.com.
Re: synchronize reports for multiple TRAC repos [ In reply to ]
On Tuesday, September 7, 2021 at 4:09:02 AM UTC-7 Clemens Feige wrote:

> Hello
>
> We have multiple TRAC repos (approx. 10 of them). And we to ensure that
> all repos share a common set of custom reports.
>
> I have read:
> https://trac.edgewall.org/wiki/TracReports
>
> The only perspective I can see is to use direct SQL access to the
> database and overwrite the `report` table on all our repos.
>
> Am I missing something?
>
> Anybody has a better idea?
>

That's your only option until a trac-admin command is implemented:
https://trac.edgewall.org/ticket/1549


> Will this work for reports in SQL-query style (contain SELECT) as well
> as for reports with Traq-Query style (contains query:)?
>

Yes, it should.


> Any clue how I could synchronize (i.e. centrally overwrite) only
> specific reports? Because overwriting the entire `report` database table
> will loose all custom reports which users have saved.
>

The report table auto-increments, so you could reserve a range for a
standard set of reports, say 1-100. You could synchronize your reports
using SQL and insert them in this id range, and move your user custom
reports to start at id 101.

https://trac.edgewall.org/browser/tags/trac-1.4.3/trac/db_default.py#L163

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/fcea5a99-0a02-44f5-a6a9-3e05d9218bb2n%40googlegroups.com.
Re: Re: synchronize reports for multiple TRAC repos [ In reply to ]
RjOllos wrote on 08.09.2021 at 02:22:
>
> On Tuesday, September 7, 2021 at 4:09:02 AM UTC-7 Clemens Feige wrote:
>
> Hello
>
> We have multiple TRAC repos (approx. 10 of them). And we to ensure
> that
> all repos share a common set of custom reports.
>
> I have read:
> https://trac.edgewall.org/wiki/TracReports
> <https://trac.edgewall.org/wiki/TracReports>
>
> The only perspective I can see is to use direct SQL access to the
> database and overwrite the `report` table on all our repos.
>
> Am I missing something?
>
> Anybody has a better idea?
>
>
> That's your only option until a trac-admin command is implemented:
> https://trac.edgewall.org/ticket/1549
>
> Will this work for reports in SQL-query style (contain SELECT) as
> well
> as for reports with Traq-Query style (contains query:)?
>
>
> Yes, it should.
>
> Any clue how I could synchronize (i.e. centrally overwrite) only
> specific reports? Because overwriting the entire `report` database
> table
> will loose all custom reports which users have saved.
>
>
> The report table auto-increments, so you could reserve a range for a
> standard set of reports, say 1-100. You could synchronize your reports
> using SQL and insert them in this id range, and move your user custom
> reports to start at id 101.
>
> https://trac.edgewall.org/browser/tags/trac-1.4.3/trac/db_default.py#L163
>
> Ryan
>

Thanks for your reply, Ryan.

Must reports-IDs be strictly sequential? Can I omit some IDs?

For example, can I have reports IDs 1,2,3, (4-99 are missing) 100,101,102?

I have understood that the report-ID must be unique and has
auto-increment. I also understand your proposal to reserve id=1...100
for standard reports (to be synchronized with SQL) and to have user
custom reports start with id=101. Interesting trick! My above question
is about to only reserve the report IDs 1-100 but not being forced to
actually have 100 of them. This is what you mean, isn't it?

Thank
Clemens


--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4857ce2a-fe92-5a95-0129-658ad67652cf%40osypkamed.com.
Re: Re: synchronize reports for multiple TRAC repos [ In reply to ]
On Tuesday, September 7, 2021 at 11:47:24 PM UTC-7 Clemens Feige wrote:

> RjOllos wrote on 08.09.2021 at 02:22:
>
>
> On Tuesday, September 7, 2021 at 4:09:02 AM UTC-7 Clemens Feige wrote:
>
>> Hello
>>
>> We have multiple TRAC repos (approx. 10 of them). And we to ensure that
>> all repos share a common set of custom reports.
>>
>> I have read:
>> https://trac.edgewall.org/wiki/TracReports
>>
>> The only perspective I can see is to use direct SQL access to the
>> database and overwrite the `report` table on all our repos.
>>
>> Am I missing something?
>>
>> Anybody has a better idea?
>>
>
> That's your only option until a trac-admin command is implemented:
> https://trac.edgewall.org/ticket/1549
>
>
>> Will this work for reports in SQL-query style (contain SELECT) as well
>> as for reports with Traq-Query style (contains query:)?
>>
>
> Yes, it should.
>
>
>> Any clue how I could synchronize (i.e. centrally overwrite) only
>> specific reports? Because overwriting the entire `report` database table
>> will loose all custom reports which users have saved.
>>
>
> The report table auto-increments, so you could reserve a range for a
> standard set of reports, say 1-100. You could synchronize your reports
> using SQL and insert them in this id range, and move your user custom
> reports to start at id 101.
>
> https://trac.edgewall.org/browser/tags/trac-1.4.3/trac/db_default.py#L163
>
> Ryan
>
>
> Thanks for your reply, Ryan.
>
> Must reports-IDs be strictly sequential? Can I omit some IDs?
>
> For example, can I have reports IDs 1,2,3, (4-99 are missing)
> 100,101,102?
>
Yes, I believe it will work with all 3 supported databases.

I have understood that the report-ID must be unique and has auto-increment.
> I also understand your proposal to reserve id=1...100 for standard reports
> (to be synchronized with SQL) and to have user custom reports start with
> id=101. Interesting trick! My above question is about to only reserve the
> report IDs 1-100 but not being forced to actually have 100 of them. This is
> what you mean, isn't it?
>
Yes, but I'm not doing as much Trac dev these days so such things aren't
top-of-mind. You may want to verify before trusting ;)

Ryan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4f90fa9e-784e-477f-b28b-a1a080959117n%40googlegroups.com.
Re: Re: synchronize reports for multiple TRAC repos [ In reply to ]
RjOllos wrote on 08.09.2021 at 08:55:
>
> On Tuesday, September 7, 2021 at 11:47:24 PM UTC-7 Clemens wrote:
>
> RjOllos wrote on 08.09.2021 at 02:22:
>>
>> On Tuesday, September 7, 2021 at 4:09:02 AM UTC-7 Clemens wrote:
>>
>> Hello
>>
>> We have multiple TRAC repos (approx. 10 of them). And we to
>> ensure that
>> all repos share a common set of custom reports.
>>
>> I have read:
>> https://trac.edgewall.org/wiki/TracReports
>> <https://trac.edgewall.org/wiki/TracReports>
>>
>> The only perspective I can see is to use direct SQL access to
>> the
>> database and overwrite the `report` table on all our repos.
>>
>> Am I missing something?
>>
>> Anybody has a better idea?
>>
>>
>> That's your only option until a trac-admin command is implemented:
>> https://trac.edgewall.org/ticket/1549
>> <https://trac.edgewall.org/ticket/1549>
>>
>> Will this work for reports in SQL-query style (contain
>> SELECT) as well
>> as for reports with Traq-Query style (contains query:)?
>>
>>
>> Yes, it should.
>>
>> Any clue how I could synchronize (i.e. centrally overwrite) only
>> specific reports? Because overwriting the entire `report`
>> database table
>> will loose all custom reports which users have saved.
>>
>>
>> The report table auto-increments, so you could reserve a range
>> for a standard set of reports, say 1-100. You could synchronize
>> your reports using SQL and insert them in this id range, and move
>> your user custom reports to start at id 101.
>>
>> https://trac.edgewall.org/browser/tags/trac-1.4.3/trac/db_default.py#L163
>> <https://trac.edgewall.org/browser/tags/trac-1.4.3/trac/db_default.py#L163>
>>
>> Ryan
>>
>
> Thanks for your reply, Ryan.
>
> Must reports-IDs be strictly sequential? Can I omit some IDs?
>
> For example, can I have reports IDs 1,2,3, (4-99 are missing)
> 100,101,102?
>
> Yes, I believe it will work with all 3 supported databases.
>
> I have understood that the report-ID must be unique and has
> auto-increment. I also understand your proposal to reserve
> id=1...100 for standard reports (to be synchronized with SQL) and
> to have user custom reports start with id=101. Interesting trick!
> My above question is about to only reserve the report IDs 1-100
> but not being forced to actually have 100 of them. This is what
> you mean, isn't it?
>
> Yes,  but I'm not doing as much Trac dev these days so such things
> aren't top-of-mind. You may want to verify before trusting ;)
>
> Ryan
>

I just successfully tested. We can leave out report-IDs as we discussed.
The "Available Report" page will only list the actually existing
reports. Thanks to auto-increment new created reports will get the
highest ID+1. I tested this.

Issue SOLVED!

Many Thanks
Clemens

Cl

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/4e8787d7-cab3-5b8a-2db6-edbbd6b0c7bf%40osypkamed.com.