-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(bootstraper): fix version inconsistencies and #19 regressions #34
Conversation
pypgstac
versions and fix regression introduced by #19
pypgstac
versions and fix regression introduced by #19pypgstac
versions and fix regression introduced by #19
pypgstac
versions and fix regression introduced by #19pypgstac
versions and fix regression introduced by #19
pypgstac
versions and fix regression introduced by #19
I tested this in an AWS deployment. I am posting this to the collections endpoint :
And I am getting an error in the database side. Here is the log :
@vincentsarago @alukach any idea ? This PR is bumping the database Also @alukach -- do you have a way to test TypeScript changes in a deployment before publishing these changes ? I have been trying to point my package.json file to a github branch or local cdk-pgstac directory, without success so far. I keep encountering Typescript compiling errors. The way I did this test above is to reference the latest published version of cdk-pgstac in the package.json file, and then manually add the few modifications I made in this PR directly in the cdk-pgstac code in my In case that helps understanding what I want to do : if it was python I would |
@emileten Given some oddities with
I'm not certain all this is fully necessary, but I ran into numerous cases where my target CDK project was using a cached version of the locally compiled package so I've been using this approach to ensure I'm always using the compiled code I expect. |
cc @bitner An ideas on why |
You say "posting this to the endpoint". Is this being posted to a stac-fastapi endpoint or to something that is using pypgstac? For pypgstac, the read_json function (https://github.com/stac-utils/pgstac/blob/64221059916d4e182c938c86799bf77d9c403965/pypgstac/pypgstac/load.py#L145) expects either a json string or an iterable of python dicts |
@bitner something that is using I think the problem is indeed in the type of the object we pass to the collections loader. However, I am having a hard time verifying this locally, and I could get some help from you on that. Here is an idea of what I am trying to do : https://gist.github.com/emileten/bd7ef3dbdd1cf642b79fa0a0efab10f8. This code is attempting to load a collection to a pgstac database running locally (version 0.6.13). It reproduces the bug I posted. The collection json that is referenced can be found here : https://gist.github.com/emileten/90e87db0af340f3542726d6146f95f87. I feel that in this line https://gist.github.com/emileten/bd7ef3dbdd1cf642b79fa0a0efab10f8#file-use-pypgstac-py-L35 Now, I have this locally running pgstac instance, thanks to the helpful pgstac docs. The way I got it up and running is by running the update script and then the server script. However, I would like to be able to iterate quickly on local changes to So my question is -- what is your typical workflow to get that kind of local setup ? Thanks ! |
@sharkinsspatial could you review the new commit I am mentioning in the first bullet point below. With this fix I can now push collections. Except if I get other bugs with items ingestions, we might then be good to merge.
|
@emileten This looks good to me and nice catch. This is a great example of why we need #13 (which would have caught this regression which actually got introduced across 2 PRs) as well as configuring type checking in our Can you add a unit test for https://github.com/developmentseed/cdk-pgstac/blob/main/lib/ingestor-api/runtime/src/collection.py which validates that |
pypgstac
versions in bootstrapper and stac-ingestorpypgstac.load
does not have aload_collection
but aload_collections
method. I am unsure about my fix : it looks likeload_collections
excepts a json containing a list of collection metadata. How is it going to behave if we have a single collection in it ?file
parameter of thepypgstac
collection loader is alist
ofdict
.