[ckan-dev] Filestore changes between 2.2a and 2.2b

David Raznick david.raznick at okfn.org
Fri Feb 21 01:11:36 UTC 2014


On 20 February 2014 14:01, Stéphane Guidoin <stephane at opennorth.ca> wrote:
>> I think there is some confusion here.
>> We never support 2.2a or 2.2b and have not got a particular branch for
>> either.  Anybody using 2.2a and 2.2b should be using 2.2 now.   They
>> stand for 2.2 alpha and 2.2 beta and are all made in preparation to
>> the 2.2 release so can change a lot.  Please look at the changelog for
>> all official releases.
>
>
> ok, my bad. From the online documentation, it sounded like 2.2a was a
> release.
>
>> > Does anyone knows why and what should be done to upload file for 2.2a?
>> > What will happen to the resources (and their URL) if upgrading from 2.2a
>> > to
>> > 2.2b?
>> Uploaded files will still be accessible after the upgrade as long as
>> you keep the same ofs.* config arguments
>
>
> So files should be available both with the new and the old url?

If you do the migration that it will be at the new url, if you don't
the files will keep at the old one.   All new files though will be
uploaded to the new url.

>
> More generally, do you know if we have to go through a "migration" process
> to go from 2.2a (or 2.2b) to the official 2.2 release?

The migration process is outlined
http://docs.ckan.org/en/latest/maintaining/filestore.html#migration-from-2-1-to-2-2
its up to you if you do it though.  If you do not want any old urls
changing you do not need to. If you do not mind changing the urls for
the old files (for consistency) then run the migration.

>
> Stéphane
>
>
> On Wed, Feb 19, 2014 at 1:58 PM, David Raznick <david.raznick at okfn.org>
> wrote:
>>
>> On 19 February 2014 15:28, Stéphane Guidoin <stephane at opennorth.ca> wrote:
>> > Hello,
>> >
>> > There seem to have some changes in the CKAN filestore (and its API)
>> > between
>> > 2.2a and 2.2b.
>> >
>> > First the url changes (from a timestamp to the resource id), that's ok.
>> >
>> > But to upload via the API, it seems it also changed. With 2.2b, I am
>> > able to
>> > upload a file with this command:
>> >
>> > curl -v http://myinstance/api/3/action/resource_create -H
>> > "X-CKAN-API-Key:1111-22222-33333-44444" --form
>> > upload=@/my/file/example.xml
>> > --form package_id=warandpeace
>> >
>> > But it does not work with 2.2a (get an JSON error)...
>> >
>> > Erreur JSON : Error decoding JSON data. Error:
>> > JSONDecodeError('Expecting
>> > value: line 1 column 2 (char 1)',) JSON data extracted from the request:
>> > '------------------------------3051bfd2dd4a;\\r\\nContent-Disposition:
>> > form-data; name=\"upload\"; filename=\"resource.csv\"\\r\\nContent-type:
>> >
>> > application/octet-stream\\r\\n\\r\\nfield1,field2,field3\\n1,2,3\\n4,5,6\\n7,8,9\\n\\r\\n------------------------------3051bfd2dd4a;\\r\\nContent-Disposition:
>> > form-data;
>> >
>> > name=\"package_id\"\\r\\n\\r\\njuliotest\\r\\n------------------------------3051bfd2dd4a;--'"(ckanprod2.2a)
>> >
>> >
>> > Does anyone knows why and what should be done to upload file for 2.2a?
>> > What will happen to the resources (and their URL) if upgrading from 2.2a
>> > to
>> > 2.2b?
>> Uploaded files will still be accessible after the upgrade as long as
>> you keep the same ofs.* config arguments
>>
>> >
>> > Lastly: the management of releases since 2.2 is a bit startling. There's
>> > just one tag/branch for 2.2 but obviously some serious code changes
>> > between
>> > 2.2a and 2.2b but there is not way to specifically request on subversion
>> > or
>> > the other.
>>
>> I think there is some confusion here.
>> We never support 2.2a or 2.2b and have not got a particular branch for
>> either.  Anybody using 2.2a and 2.2b should be using 2.2 now.   They
>> stand for 2.2 alpha and 2.2 beta and are all made in preparation to
>> the 2.2 release so can change a lot.  Please look at the changelog for
>> all official releases.
>>
>> http://docs.ckan.org/en/ckan-2.2/changelog.html
>>
>> Thanks
>>
>> David
>>
>> >
>> > Thanks
>> >
>> > Stéphane
>> >
>> >
>> >
>> > _______________________________________________
>> > ckan-dev mailing list
>> > ckan-dev at lists.okfn.org
>> > https://lists.okfn.org/mailman/listinfo/ckan-dev
>> > Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>> >
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
>
>
> --
> Stéphane Guidoin
> Director, Transportation
> Open North
> 514-862-0084
> http://opennorth.ca
> Twitter: @opennorth / @hoedic
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>



More information about the ckan-dev mailing list