-
Notifications
You must be signed in to change notification settings - Fork 6
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
add components representation and JSON response endpoint #281
Conversation
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac/40/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-154.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/930/NOTEBOOK TEST RESULTS |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1145/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-154.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/930/NOTEBOOK TEST RESULTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea to show the various capabilities to help interoperability is very useful.
If we keep the current form, rename the included script.
But in the current form, maybe some private config might leak out.
Maybe each component can declare how it wants to be shown instead so then it can decide to not show anything as well, if it is a private component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea, can't really judge how it's done.
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac/49/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-36.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/939/NOTEBOOK TEST RESULTS |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1154/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-36.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL : http://daccs-jenkins.crim.ca:80/job/PAVICS-e2e-workflow-tests/job/master/939/NOTEBOOK TEST RESULTS |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac/52/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-36.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1157/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-36.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
I think I have a cheap solution to this: add a new var |
We can either filter out |
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1166/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-88.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
1efb04b
to
122f196
Compare
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1167/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-88.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After 122f196 I still see my private components in external repos listed with their full path.
$ curl --silent https://medus.ouranos.ca/components/
{"components": ["bird-house/birdhouse-deploy:optional-components/canarie-api-full-monitoring",
"bird-house/birdhouse-deploy:optional-components/wps-healthchecks",
"bird-house/birdhouse-deploy:optional-components/testthredds",
"bird-house/birdhouse-deploy:optional-components/generic_bird",
"bird-house/birdhouse-deploy:components/weaver",
"bird-house/birdhouse-deploy:components/scheduler",
"bird-house/birdhouse-deploy:components/monitoring",
"/path/to/repo1/config-dir",
"/path/to/repo2/config-dir"]}
Maybe you want to add some absolute path in your env.local
for testing.
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1169/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-46.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on my staging machine.
However, chdir
is a typo and please do not exit
directly in this script to avoid leaving the entire platform down during unattended autodeploy.
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1171/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-46.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1172/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-46.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use exit
in this script and no need for any cd
.
fi | ||
|
||
# resolve path considering if sourced or executed, and whether from current dir, pavics-compose include or another dir | ||
BIRDHOUSE_DEPLOY_COMPONENTS_ROOT=$(dirname -- "$(realpath "$0")") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure why you need to discover BIRDHOUSE_DEPLOY_COMPONENTS_ROOT
. Since this script is being source by pavics-compose.sh
its PWD
will always be the same location of pavics-compose.sh
since pavics-compose.sh
needs to enforce that so it can find the docker-compose.yml
.
So no need to perform any cd
in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to avoid getting this issue if we ever end up calling it instead of sourcing it. This is the actual reason why it didn't filter your absolute paths the first time, while it was working on my side. I was sourcing it directly from another dir to test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok. Just curious, in what other scenario would you want to just source this one outside of pavics-compose.sh
?
In fact, testing it outside of pavics-compose.sh
is dangerous since you will forget to test it with pavics-compose.sh
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested both to be sure afterward, but I prefer to test it directly than having to go through pavics-compose and quickly breaking out of it. Anyway, they should both work for now and simply remain empty if anything fails.
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1173/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-46.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
…SON resolution on error
E2E Test ResultsDACCS-iac Pipeline ResultsBuild URL : http://daccs-jenkins.crim.ca:80/job/DACCS-iac-birdhouse/1174/Result : failure BIRDHOUSE_DEPLOY_BRANCH : add-json-components-endpoint DACCS_CONFIGS_BRANCH : master PAVICS_E2E_WORKFLOW_TESTS_BRANCH : master PAVICS_SDI_BRANCH : master DESTROY_INFRA_ON_EXIT : true PAVICS_HOST : https://host-140-46.rdext.crim.ca PAVICS-e2e-workflow-tests Pipeline ResultsTests URL :NOTEBOOK TEST RESULTS
|
@fmigneault I found out on pour production curl https://pavics.ouranos.ca/components/ is empty, it was deployed by the autodeploy. Have you tested this feature under the autodeploy environment? |
No. We are not using autodeploy anywhere on our side. |
Overview
New endpoint for reporting platform components.
Changes
Non-breaking changes
Proxy: add
/components
endpoint that provides a JSON list of loaded components by the platform.Prior to this functionality, it was impossible to know which potential capabilities, services or behaviors were to be
expected by a given DACCS/PAVICS/birdhouse instance. Using this endpoint, nodes can obtain minimal machine-readable
details about their supported capabilities, allowing better interoperability.
Furthermore, developers maintaining distinct stacks and integrating different features can have a better
understanding of behaviors by the various web services when performing requests against a given node.
Breaking changes
Related Issue / Discussion
Additional Information
The sample JSON output in the script is the actual response received when requesting
/components
on a test instance.