Skip to content

Microcks tests#12

Draft
mathieu-benoit wants to merge 9 commits intomainfrom
microcks-test
Draft

Microcks tests#12
mathieu-benoit wants to merge 9 commits intomainfrom
microcks-test

Conversation

@mathieu-benoit
Copy link
Contributor

@mathieu-benoit mathieu-benoit commented Mar 13, 2026

TODOs:

How to test this branch/PR:

cd samples/traderx
make compose-mock-up
docker ps

Go to http://localhost:8080.

TODOs outside of this PR:

For later consideration, out of scope of this PR:

  • Should we rename endpoint by service for the resource type?
  • Could we have a better UX for the artifacts param as an array instead of a string?

Signed-off-by: Mathieu Benoit <[email protected]>
@mathieu-benoit mathieu-benoit marked this pull request as draft March 13, 2026 13:57
…dpoint dependencies + database actually not used in trade-service

Signed-off-by: Mathieu Benoit <[email protected]>
Signed-off-by: Mathieu Benoit <[email protected]>
openapi_file: ../api-mocks/people-service-openapi.json
openapi_title: FINOS TraderX People Service
port: 18090
artifacts: api-mocks/people-service-openapi.json:true,api-mocks/people-service-metadata.yaml:false,api-mocks/people-service-examples.yaml:false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, for now, I'll see later if an array can be used, etc. But focusing on making it working for now ;)

@lbroudoux
Copy link
Contributor

make compose-mock-up starts correctly and Microcks is correctly configured with the artifacts.

However, as you noticed, there are issues when loading http://localhost:8080/trade that tries to load:

But we have other issues as well on the Microcks side ....

  1. Trying curl -X GET 'http://localhost:9090/rest/FINOS+TraderX+Account+Service/0.1.0/account' that should be invoked doesn't work ... This is because there's a mismatch in the URL! OpenAPI from the Account Service mentioned /account/ with a trailing slash.
    curl -X GET 'http://localhost:9090/rest/FINOS+TraderX+Account+Service/0.1.0/account/' works fine in Microcks. So we must: either change the Finos Account Service to remove the trailing slashes OR make Microcks or Nginx more tolerant, fallbacking to URL with trailing /

  2. Trying curl -X GET 'http://localhost:9090/rest/FINOS+TraderX+Reference+Data/1.0/stocks' that should be invoked doesn't work ... Looks like we have an issue in loading the samples coming from the reference-data-examples.yaml. Investigating further on this.

Signed-off-by: Mathieu Benoit <[email protected]>
@lbroudoux
Copy link
Contributor

Looks like the 3 containers people-service-mock, reference-data-mock and account-service-mock have issues. They keep on restarting. account-service-mock and people-service-mock execute correctly though. reference-data-mock encounters issues with Microcks returning Got error when invoking Microcks client importing Artifact: {"timestamp":1773592997971,"status":500,"error":"Internal Server Error","path":"/api/artifact/upload"}. Investigating further.

@lbroudoux
Copy link
Contributor

Looking at https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/microcks.tpl it seems like there's a volume size limit for /tmp and this is actually the location where uploadede files are stored. I think we hit the limit here because I have errors like No space left on device on the Microcks pod side. Is it required? If yes, can we make the limits bigger?

Signed-off-by: Mathieu Benoit <[email protected]>
@mathieu-benoit
Copy link
Contributor Author

mathieu-benoit commented Mar 15, 2026

Looking at https://raw.githubusercontent.com/score-spec/community-patchers/refs/heads/main/score-compose/microcks.tpl it seems like there's a volume size limit for /tmp and this is actually the location where uploadede files are stored. I think we hit the limit here because I have errors like No space left on device on the Microcks pod side. Is it required? If yes, can we make the limits bigger?

I just doubled the size, let me know if you still see the error. I don't see it on my end. This can be locally updated here: ./score-patchers/compose/microcks.tpl if needed, which is now used in make compose-mock-up.

@mathieu-benoit
Copy link
Contributor Author

I'm also seeing this error in the microcks-uber container:

22:01:41.944 ERROR 1 --- [-handler-2] i.g.m.web.UploadArtifactController       : Exception while reading uploaded item reference-data-examples.yaml

And:

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning a quoted scalar
 in 'reader', line 635, column 26:
                companyName: "
                             ^
found unexpected end of stream
 in 'reader', line 635, column 47:
    McKesson Corporation
                        ^

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants