#8863 closed defect (fixed)
Cannot submit ticket in Mylyn
Reported by: | Owned by: | Daniel Kahn Gillmor | |
---|---|---|---|
Priority: | highest | Component: | SensitiveTicketsPlugin |
Severity: | blocker | Keywords: | ValueError, compatibility |
Cc: | Trac Release: | 0.12 |
Description
Error when converting value "true" to int.
It seems that Mylyn Trac connector sends true for boolean fields.
Attachments (0)
Change History (11)
comment:1 Changed 13 years ago by
Priority: | normal → highest |
---|
comment:2 Changed 13 years ago by
Keywords: | ValueError added |
---|---|
Owner: | changed from Sebastian Benthall to Daniel Kahn Gillmor |
Sure, this plugin could handle this values more gracefully, even entirely switch from 0
/1
to string representation of True
/False
(watch for backwards-compatibility then!).
But wouldn't it be more sensible to force MylynTracConnector to write values expected by this plugin to the Trac db in the first place? If you agree, I'd still recommend to improve this plugin towards recognition of a number of different representations of binary values before, and to forward this issue to MylynTracConnector afterwards.
comment:3 Changed 13 years ago by
Component: | SensitiveTicketsPlugin → MacroPostPlugin |
---|---|
Resolution: | → fixed |
Status: | new → closed |
this is now addressed by r11289. I would happily forward this to the MylynTracConnector, but its bugs are apparently supposed to be reported at the eclipse bug tracker, which i don't have a login for (and can't actually figure out how to get a login for).
So i'm marking this ticket fixed.
wrobel@…, if you have a login with the eclipse bugtracker, could you follow up there about the connector and report back here with the new bug number so that other people who may have stumbled into this issue will know where else to follow up?
comment:4 Changed 13 years ago by
Cool. +1 for using the Trac core native function as_bool
, although it's a TRac 0.12 feature, or 0.11.6 to be correct.
These days I'm already at 0.13dev-r10883, nevertheless I care for Trac support from 0.11 onwards for as many plugins as possible. So would you mind adding a fallback to remove the limitation to Trac >= 0.11.6 for this plugin?
comment:5 follow-up: 6 Changed 13 years ago by
0.11.7 is the recommended version for trac 0.11 (and 0.11 itself isn't recommended for new installs). If a trac admin cannot upgrade their trac instance to 0.11.7, i would suggest that they don't upgrade their SensitiveTicketsPlugin either.
Basically, i'm fine with requiring trac >= 0.11.6 for this, and i'd rather not carry an unneeded fallback mechanism.
Do you know if there's a way to indicate the dependency explicitly in the plugin?
comment:6 Changed 13 years ago by
Replying to dkg:
Basically, i'm fine with requiring trac >= 0.11.6 for this, and i'd rather not carry an unneeded fallback mechanism.
Do you know if there's a way to indicate the dependency explicitly in the plugin?
For some hints, you'll want to read the discussion in #9800 (and comment:4 in particular), but for whatever it is worth, +1 for supporting back to 0.11. It is really not that much trouble and usually only amounts to a few lines of code. I just do dev work on 0.11 and then test in 0.13dev (which was a practice I picked up at hasienda's suggestion) and it doesn't really cause any issues. There is a small group of us at least that considers this a best practice.
comment:7 follow-up: 9 Changed 13 years ago by
Thanks for the pointers to the version-checking, rjollos. I've incorporated osimons check as of r11293.
Can you explain why it's worth supporting 0.11.0 when that version of core doesn't seem to be supported upstream any more either? Are there important installations out there that can't or won't upgrade to the latest point release in the 0.11 line for some reason?
comment:8 Changed 13 years ago by
Component: | MacroPostPlugin → SensitiveTicketsPlugin |
---|
gah, i'm not sure how i switched the component by accident back in 3, but i'm fixing it now.
comment:9 Changed 13 years ago by
Keywords: | compatibility added |
---|
Replying to dkg:
Can you explain why it's worth supporting 0.11.0 when that version of core doesn't seem to be supported upstream any more either? Are there important installations out there that can't or won't upgrade to the latest point release in the 0.11 line for some reason?
There seem to be users that can't upgrade, perhaps in a corporate or regulated environments, or in companies that have particular IT policies. There are also users that install Trac from their package manager and have an older OS. I'm even more sensitive of the Python 2.4 issue than the Trac version issue, since Red Hat EL 5 is widely used and still running Python 2.4.
Sadly enough, from reviewing the Trac RSS timeline feed almost daily for a couple of years, there even seem to a significant number of users on 0.10.x (for example #9836 was opened today).
The decision to support 0.11+ rather than 0.11.4+ or some other arbitrary choice is somewhat subjective. However, I think the choice for 0.11 is made with the aim of supporting and building the Trac community as much as possible. The other obvious choice would be to support 0.11.7 and 0.12+, but by supporting 0.11+ we'll gain a few more users that can't upgrade, possibly get them to contribute some patches and it isn't much more effort on the developer's end.
So, it's definitely up to individual developers on what they choose to support, but we are talking about writing a best practices guide to plugin development and capturing the consensus of developers at to what the best practices are, and maybe the 0.11+ support recommendation makes it in there, or maybe not. From my point of view, a really good idea that I think hasienda originally proposed and that we've discussed quite a bit lately, is to add a trac-compatibility class to trac-hacks, which developers can include in their source. We'd copy functions such as as_bool
and javascript_quote
(added in 0.11.3) in that class, and then developers could just use:
from trac_11_compatibility import javascript_quote
and then trac-11-compatibility would try to import from trac.util.text import javascript_quote
and fallback to the copy it has.
Anyway, I'd just like to emphasize that these are just preferences and options, and I'm not trying to force anything just because it is my preferred best practice. It's up to individual developers as to what they choose to support.
comment:10 Changed 13 years ago by
Thans for the discussion, rjollos. I think i'm still unconvinced on the 0.11 front, mainly because the boundaries seem small:
for users forced by IT policies to avoid upgrades, they won't be able to upgrade sensitivetickets anyway to get the changes that we're introducing that rely on as_bool.
my usual metric for old OSes is debian oldstable (currently lenny), which is now out of security support. but even lenny has 0.11.7 available from lenny-backports; if you're running webapps from debian lenny without using backports, i'd be quite surprised.
I suspect that users who need to be able to enforce some level of privacy would be helped more by upgrading an out-of-date (and probably security-vulnerable) instance of trac than they would by installing sensitivetickets anyway, so i'd like to encourage that from a security perspective.
So i think i'm currently settling on supporting 0.11.6+ for sensitivetickets for now, unless other arguments come forward. I do appreciate the discussion, though!
comment:11 Changed 13 years ago by
Clearly you assume, that Trac installation/upgrade and plugin installation/upgrade are roughly the same thing, while I think they are considerably different. I spoke to a number of users and Trac admins, who could opt for specific plugins or even do changes on their own, while the Trac version was fixes like was the Python version of the system in question. This could happen due to various reasons. Inflexible hosters, policy to stick with some OS due to missing upgrade path or licensing issues for some other software, long-term lack of site administration capacity/capability,...
Regarding OS metrics, my own metric has been Debian too, but got brutally pushed back by !RedHat5. Ryan already mentioned most of the arguments I used to convince him about my idea of most sensible backwards-compatibility.
I'm still fine with your decision. Put it up-front in the plugin wiki documentation. And sure you can add a line to your setup.py
like so:
setup( ..., install_requires = ['Genshi >= 0.5', 'Trac >= 0.11.6'], ..., )
Additionally please note, that you could avoid hand-editing tickets with appropriate references to changesets using the ticket-commit-update, where some signal words will trigger a ticket comment action:
- closes #<ticket_nr> --> ticket will receive comment and get closed as fixed,
- refs #<ticket_nr> --> ticket will just receive a comment
There are more valid signal words, anyway that's just meant as a quick-starter, if you're really not aware of this by now.
Now my Trac is completely broken! How can I delete this broken ticket if most trac pages broke!