A number of the blocks and elements on project pages seems to be held in cache much longer than they are supposed to or are somehow not being refreshed or rebuilt as needed.
For example, I bunch a pile of issues for http://drupal.org/project/apachesolr but the listed # of open issues has stayed at 277 for 2 days. A check of the pages shows it's really < 250.
I also had a bad experience last Wed when we were doing a security release of tagdelic, and the 6.x-1.3 release would not show on the project page despite editing/saving both the release node and the project page itself. dww finally ran a drush command that forced it.
| Comment | File | Size | Author |
|---|---|---|---|
| #42 | 1098536-part2-fix-another-taxonomy-glitch.patch | 1.07 KB | bdragon |
| #41 | 0001-Marking-my-suspicion.patch | 851 bytes | bdragon |
| #30 | 1098536-project_security_tid_borkenness.patch | 1.13 KB | bdragon |
| #22 | available_updates.png | 46.73 KB | becw |
| #22 | drush_pm-releases.png | 23.54 KB | becw |
Comments
Comment #1
dww#1077880-4: Block cache of issue counts on project pages is not invalidated when it should be
Comment #2
pwolanin commentedpartial dup to #1077880: Block cache of issue counts on project pages is not invalidated when it should be so let's just focus this issue on why a sec release doesn't show up correctly in the releases block.
Comment #3
dwwSorry, I missed the 2nd part of this. Agreed that's not duplicate, and yes, we need an issue open about it.
However, I don't think this bug with the release table was actually anything to do with caching. The problem was that project_release_check_supported_versions() wasn't getting called when it should have been. That's the real bug. Once I forced that to happen via drush, it all worked as expected. So, I'm guessing this is a bug in project_release somewhere...
Comment #4
mikeryanBeta releases I added yesterday for Migrate still aren't showing up on the project page - @dww, could you try that magic drush command?
I was concerned that I had screwed it up by initially adding tags 6.x-2.x-beta1 and 7.x-2.x-beta1 instead of 6.x-2.1-beta1 and 7.x-2.1-beta1 - if the drush command doesn't work, maybe there's something to that theory...
Thanks.
Comment #5
dww@mikeryan: Nope, that's not a bug at all. That's expected behavior. See #647428: Show latest prerelease (if different from recommended release) with dev releases for a feature request about enhancing the current behavior to handle the case you're in right now.
Comment #6
pwolanin commentedhaving this bug again now for http://drupal.org/project/profile2
I just published the beta3 http://drupal.org/node/1181018 but it's not listed on the project page.
Comment #7
gábor hojtsyMarked #1179726: project_release_supported_versions not updated when release is manually published as duplicate. I'm marking this as critical, since it clearly means that people will be suggested to download insecure releases even though releases with security fixes are available.
Comment #8
gregglesThe query for that part of the download table for profile2 is:
I found that the where clause that causes the problem is:
(project_release_supported_versions_project_release_nodes.recommended_release = node.nid)It appears that the recommended_release column still has the old value instead of the new 1181018 value.
Comment #9
fagoI was able to work-a-round the bug for profile2, by editing+saving the release-node of beta3 again. Now it appears in the block.
Comment #10
gábor hojtsyThat did not work for me back with l10n_install. Damien ran drush commands locally to fix the recommended release info. :|
Comment #11
fagoBefore that, I tried changing the "Recommended major version" to none and setting it back afterwards, but that didn't help. Maybe it was a combination of both.
Comment #12
gábor hojtsyI did both (and other things like editing the project page) on the l10n_install release and nothing helped. Only Damien's intervention with drush helped.
Comment #13
gerhard killesreiter commentedI am having the same problem with the 6.x-1.1 security release for the spam module.
Comment #14
gerhard killesreiter commentedfixed it manually through drush
Comment #15
pwolanin commented@killes - can you document the manual fix? Just eval?
Comment #16
mermentau commentedThinking this is the same issue here: The release page for Installation Profile grandfoo_profile shows updates available for IMCE and Token modules, but they are already updated in the .make file and packaged with the newer releases. I examined the package today and all is in order there.
Comment #17
gerhard killesreiter commentedYes, just eval:
http://drupal.org/node/1179726#comment-4569012
Comment #18
mstef commented+1 http://drupal.org/project/commons_release (1.6 should be shown)
Comment #19
dave reidWe just hit this with http://drupal.org/project/workbench_moderation with a manual security release - now we are linking to a still insecure release. :(
Comment #20
dave reidFYI http://drupal.org/project/filedepot also has this problem with a security release not showing on project page.
Comment #21
dave reidCommon element here seems to be these are all security releases. This is a pretty critical bug if we are showing insecure releases to new users.
Comment #22
becw commentedI'm finding that the latest Workbench Moderation release is not showing up in the Update module's "Available updates" report, either--in fact, Update module reports that there are no available releases. See the attached file,
available_updates.png.However, the latest release is showing up when I run
drush pm-releases workbench_moderation; seedrush_pm-releases.png.Comment #23
gregglesI just had to do this for role_delegation.
The recipe is:
drush php-eval 'project_release_check_supported_versions($pid, $tid, $major, $delete);'
The pid is the project node id.
The tid is either 103 for 7x or 87 for 6x.
The major is an integer 7.x-MAJOR.x (just enter the integer for the major version, not the whole version string itself)
The delete should almost always be false.
For role delegation release 7.x-1.1 I used:
drush php-eval 'project_release_check_supported_versions(169314, 103, 1, FALSE);'
Comment #24
dave reidFor anyone who cares to bughunt: http://drupalcode.org/project/project.git/blob/HEAD:/release/project_rel...
Comment #25
mr.baileysFWIW, I've seen this happen 3 times in the last week, once on Mail Logger and twice for Forward. In all three cases, editing and saving the release nodes without making any changes fixed the issue and made the releases show up on the project node.
Comment #26
coltranesubscribe
Comment #27
gregglesSo, one theory I just had is that this works for mr.baileys because he is not a "project administrator" on d.o while many of the people who have this issue ARE project administrators.
Comment #28
gregglesAnother data point: after I published it, mikesteff edited his own release node and it showed up on the project page.
Comment #29
dwwCurrently happening now with views 6.x-3.0-rc2 it seems.
Interesting theory about the "project administrator" permission. Hrm. I'll try to investigate a bit.
Comment #30
bdragon commentedSo I was debugging why security releases were acting so weird in the tables, and found this...
(my reimplementation may or may not be sane, but I think ya'll get the general idea here...)
Comment #31
gregglesbdragon shared his debugging notes with me in irc - "on initial save it looks like array(4 => array(array(54 => '54')) and on update it looks like array(4 => array(array(0 => '54'))"
There's also the trick that it looks different when the administrator edits (i.e. the security update tag is in the form) and when a regular user edits (the security update tag is somewher else.)
Comment #32
bdragon commentedThe values I mentioned correspond to my local test site. For drupal.org the tid is 100 and the vid is 7. For an admin it was consistently being keyed by the tid, but for normal developers it was being keyed by tid on initial creation and then unkeyed for updates.
This was causing {project_release_nodes}.security_update to be 0 for security releases depending on who edited the release node last, which then affected the calculations for {project_release_supported_versions}...
Comment #33
gregglesThe test won't respond because the branch is currently broken. http://qa.drupal.org/pifr/test/48308
I don't get why it's broken with all passes and 3 exceptions, but pifr thinks it is.
Comment #34
bdragon commentedI know why, I just need to get around to fixing the 6.x-1.x tests and rerun the branch test.
I will do so shortly.
Comment #35
bdragon commentedThere we go.
Comment #36
dwwWow, awesome work bdragon! Thanks!!!
Given how long this has languished, I lean towards just committing this as-is.
However, this seems like it's just masking a deeper bug. WTF is going on where the structure of
$node->taxonomyon release nodes is so fragile and changing depending on who edits and when? I'd be more okay committing this as a stop-gap if we opened another bug report about this and added a code comment about it or something.Also, although the fact that tests are passing is a good sign, it doesn't tell us anything about if this bug itself is fixed, since there are no tests for this case. So, we probably need more testing before we deploy this, and/or ideally, a unit test that covers this bug.
Thanks again!
-Derek
Comment #37
gregglesIn my experience this weirdness is more about taxonomy system than nodes.
This issue kills like 10 minutes of time for 2 people very Wednesday. I'd love a shiny unicorn patch with tests, but let's not postpone improvement in search of perfect for too long.
Comment #38
bdragon commenteddww: WTF is going on is that the structure is subtly different when dealing with something coming from the form values vs the automatically reconstituted version that is coming from loading the preexisting node. (which is used instead if the multiselect is locked down...)
It's just one of those things that sucks about dealing with the taxonomy array during saving (on d6 at least..)
There are something around 330 release nodes on d.o that I measured were misfiled as non security due to this bug. (give or take)
And yeah, it does need tests.
Comment #39
bdragon commentedGoing back to active (needs tests, deployment)
I still fail to break it after hacking on simpletests for a while, so I am happy with it and will go forward with it now.
http://drupalcode.org/project/project.git/commit/b8ad71ab82c5ec707d7b14b...
The bit of code that was disabling the vocab in the first place was found in drupalorg_project, but I can imagine other sites having similar problems after doing a similar workflow, so I think we need to go with checking the values instead of the keys anyway... (in the future once #642106: Add native support in project_release for a "Release type" vocabulary and #642110: Add native support in project_release for a "Security update" term are completed this will all be a moot point, but for now let's just cope with the fact that we can't trust the array keys...)
Comment #40
bdragon commentedDeployed.
Verified that it fixes {project_release_nodes}.security_update upon editing broken nodes.
I'm not seeing latest_security_release update however. I just spotted a possibility as to why it's not updating though. Investigating....
Comment #41
bdragon commentedIt's getting late.
As my normal drupal.org user, touching issues is fixing {project_release_nodes} but it is not propagating to {project_release_supported_versions}.
In the attached patch, I mark where I think things aren't working. It's just a guess because my local test site is not behaving the same and I'm having trouble reproducing.
It's possible this may not actually be a problem in practice due to the way release nodes get published when an SA is published. I do not know.
Comment #42
bdragon commentedSpun up a test site today and it looks like my suspicions are correct.
What is happening is that it is not checking if $node->taxonomy[$vid] is a tid or an array of tids, and then attempting to call project_release_check_supported_versions() with an array for the core version tid. This obviously doesn't work and therefore the table doesn't get updated properly.
Comment #43
bdragon commentedGiven that I already tested this against a full drupal.org development environment on stagingvm, I am confident that it works.
I will plan on deploying it later today.
Comment #44
bdragon commentedDeployed, verified that editing a broken release fixes both tables in the db.
http://drupalcode.org/project/project.git/commit/edc8023f3008cffad1de801...
Dropping down to normal priority, just coming up with some way to test this remaining. It may be necessary to do the tests in drupalorg_project, during my hacking around with tests yesterday I was finding it impossible to reproduce because part of the bug depends on how drupalorg_project was altering stuff, but I would have to modify the test to be drupalorg_project specific....
Comment #45
drumm