Skip to content

Commit

Permalink
Backward compatibility 203 (#210)
Browse files Browse the repository at this point in the history
* add details to deploy the nasa skin, validated with docker deployment

* support opensearch source properties as arrays instead of string previously

* support also single string in elasticsearch for backward compatibility, add configuration for docker build in maven, mvn spring-boot:build-image

* addintegration test guidelines in README

* Update changelog

* support opensearch source properties as arrays instead of string previously

* support also single string in elasticsearch for backward compatibility, add configuration for docker build in maven, mvn spring-boot:build-image

* addintegration test guidelines in README

Co-authored-by: thomas loubrieu <[email protected]>
Co-authored-by: PDSEN CI Bot <[email protected]>
  • Loading branch information
3 people authored Dec 14, 2022
1 parent b5361f2 commit 3ca1e5b
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,53 @@ Builds the application:

cd service
mvn spring-boot:run

## Build a development docker image

Your local docker image will be used in the integration deployment described below.

mvn spring-boot:build-image


## View Swagger UI

Go to http://localhost:8080


## Integration deployment

You can deploy the registry-api together with all other components of the registry (harvest, opensearch, ...) and reference datasets.

Clone the `registry` repository, and launch the docker compose script as described in https://github.com/NASA-PDS/registry/tree/main/docker

For example, launch:

docker compose --profile int-registry-batch-loader up

The integration tests will be automatically applied. Check the results, update/complete them as necessary


## Tests

**Important note:** As a developer you are asked to complete the postman test suite according to the new feature you are developing. Do a pull request in the `registry` project to submit the updates.

Integration test are maintained in postman.

In the `registry` project:
### Edit/Run of the integration tests in postman GUI

Install the postman desktop, from https://www.postman.com/downloads/

Download and open the test suite found in https://github.com/NASA-PDS/registry/tree/main/docker/postman

### Run the integration tests in command line

In the `registry` project.

Launch the test in command line:

npm install newman
newman run docker/postman/postman_collection.json --env-var baseUrl=http://localhost:8080

Important note: As a developer you are asked to complete the postman test suite according to the new feature you are developing. Do a pull request in the `registry` project to submit the updates.



10 changes: 8 additions & 2 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@
</executions>
<configuration>
<mainClass>gov.nasa.pds.api.registry.SpringBootMain</mainClass>
<imageName>nasapds/registry-api-service</imageName>
<image>
<env>
<BP_JVM_VERSION>11</BP_JVM_VERSION>
</env>
</image>
</configuration>
</plugin>
<plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ public class EntityProduct {
@JsonProperty("product_class")
private String productClass;

// for compliance with data loaded with version of harvest < 3.7.4
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
@JsonProperty("pds:Time_Coordinates/pds:start_date_time")
private List<String> start_date_time; //test
private List<String> start_date_time;

// for compliance with data loaded with version of harvest < 3.7.4
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
@JsonProperty("pds:Time_Coordinates/pds:stop_date_time")
private List<String> stop_date_time; //test
private List<String> stop_date_time;

@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
@JsonProperty("pds:Modification_Detail/pds:modification_date")
Expand Down Expand Up @@ -70,8 +74,10 @@ public class EntityProduct {
@JsonProperty("vid")
private String version;

// for compliance with data loaded with version of harvest < 3.7.4
@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
@JsonProperty("ops:Label_File_Info/ops:file_ref")
private List<String> pds4FileReference; //test
private List<String> pds4FileReference;


@JsonProperty("ops:Tracking_Meta/ops:archive_status")
Expand Down

0 comments on commit 3ca1e5b

Please sign in to comment.