Closed (fixed)
Project:
Project
Version:
6.x-1.x-dev
Component:
Releases
Priority:
Critical
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
5 Feb 2009 at 21:08 UTC
Updated:
3 Jan 2014 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwwCommitted fixes for all this, and deployed. Now working ok. There are a few edge cases still in the CVS code, but they're not exactly critical for the d.o launch, and they seem to be only with cvs.module enabled, so I submitted those separately as #370603: Previewing HEAD release nodes is broken in 6.x.
Comment #2
dwwArgh, it seems that my changes didn't completely solve this problem, because I just tried creating project_issue 6.x-1.0-alpha1 on d6.d.o and it's missing its version string, which is the root cause of #376160: Filename of tarball missing version info in package-release-nodes.php...
Comment #3
dwwYay, working now after http://drupal.org/cvs?commit=172539 :
http://d6.drupal.org/node/367002
http://d6.drupal.org/files/projects/project_issue-6.x-1.0-alpha2.tar.gz
Comment #4
gábor hojtsyI've created a similar test release for project module: http://d6.drupal.org/node/367004 I did not notice any problems, so headed over to your example. The problem was not immediately obvious, so I needed to make a shot to show where is the problem.
Comment #5
gábor hojtsySo the issue is that the core files table does not have the proper file names. Apart from that, the file seems to be created properly. So when the files table is fed with the files, the version is not properly added to the name. Here is the corresponding files table entry for the project_issue release.
object(stdClass)[106]
public 'fid' => string '3028104' (length=7)
public 'uid' => string '46549' (length=5)
public 'filename' => string 'project_issue-.tar.gz' (length=21)
public 'filepath' => string 'files/projects/project_issue-.tar.gz' (length=36)
public 'filemime' => string 'application/octet-stream' (length=24)
public 'filesize' => string '72194' (length=5)
public 'status' => string '1' (length=1)
public 'timestamp' => string '1234943366' (length=10)
Comment #6
gábor hojtsyTried to track this down with the assumption that it would be a concatenation / variable rename issue in the packaging script. However realized that it already gets the data empty: "'SELECT * FROM project_release_nodes WHERE nid = 366998":
Comment #7
gábor hojtsyThis record is saved via project_release_db_save() which expects the version to be in
$node->project_release['version']. This is what it's phpdoc says:The version element is set up with this code:
However, when the HTML is generated, this field is neither under rel_id[] nor project_release[]:
I'd say this makes it end up disconnected to the project_release[] data. Hope this helps fixing the issue.
Comment #8
gábor hojtsyGosh, Chad just pointed out that the commit above was not actually pushed into production. Heh. At least I got a tour around some obscure parts of the the release system. We are trying to push the change out and retest.
Comment #9
gábor hojtsyOk, deployment of the change got the version field properly in the release table: 'SELECT * FROM project_release_nodes WHERE nid = 367006'
object(stdClass)[94]
public 'nid' => string '367006' (length=6)
public 'pid' => string '75232' (length=5)
public 'version' => string '4.6.x-1.x-dev' (length=13)
public 'tag' => string 'DRUPAL-4-6' (length=10)
public 'rebuild' => string '1' (length=1)
public 'version_major' => string '1' (length=1)
public 'version_minor' => null
public 'version_patch' => null
public 'version_extra' => string 'dev' (length=3)
This is a test release for an older project-issue version. This is better then before the push of the updated version, but still does not get the version to the actual file name: SELECT * FROM project_release_files WHERE nid = 367006:
object(stdClass)[94]
public 'fid' => string '3028104' (length=7)
public 'nid' => string '366998' (length=6)
public 'filehash' => string '562fd14f7db17478a856a36d9b259c5a' (length=32)
And the suffix is missing form the filename still: SELECT * FROM files WHERE fid = 3028104
Comment #10
gábor hojtsyDigging deeper, found that cvs.module tries to remove this file upload option so that the packager script can fill in the file info later:
However, there is still a file entry ending up in the database, so this is not effective. As far as I see, only project_release_node_submit() adds a file entry, and only if it sees a $new_file, so I suspect that something is going wrong with it still getting that $new_file.
That is only set however if either isset($form_state['project_release']['new_file']) or there was a temp file for this release. The new_file key is only set if there was a file uploaded with the key 'project_release_files', which the cvs module removal should prevent. The temp file code also looks like only acting if there was a file uploaded already.
Anyway, looks like despite the intention of cvs module, a file entry is added right away, and thus contains wrong data. Still needs fixing.
Comment #11
dwwI can't reproduce what Gabor is talking about here. I just created a new release node on d6.d.o and immediately investigated {files} and {project_release_file} and there are no leaked entries. Furthermore, his investigation above seems flawed. ;) In #4 he's got a screenshot of the test node I made before I deployed my fixes (http://d6.drupal.org/node/366998) which I link from #2 and was known to be broken. #9 is confusing, since he's looking at the nid of his new release node (367006) and then posts incorrect data from {project_release_file}. Here's the real deal:
So, the entry with the broken filename is from nid 366998, as expected.
Anyway, there's no bug in here. Everything works as indicated in #3. Moving on now... ;)