-
Notifications
You must be signed in to change notification settings - Fork 5
Cli run commands #46
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
Cli run commands #46
Conversation
423e4ad to
e66e2bf
Compare
the config is needed in several places of the application therefor it makes sense to read it in a module that can be imported from other modules add github token and mongo db name the mongo db name should be seen as a setting the github token is needed so that the github api can be called also for private repos to check for the repos existence or for the existence of commit hashes in the repo
this function should be reusable not only in the context of handeling the mongodb: therefore it is moved in with other helper functions
e66e2bf to
bfe268a
Compare
these helper functions validate input form the command line interface: `parse` contains functions to parse and transform command line argumments such as ports or files `git` accesses the github api to check on repo urls and commit hashes `utils` contains utils to transform between formats
schema for components, versions and executions is changed to imporve usage versions now have an extended reference on components executions just reference versions and not anymore versions and components
adapt cli interface to the mongodb schema changes
a helper to get the version of odtp was added since it is also used when versions are added to the mongodb: by default they get a property odtp_version that has the current version of odtp
the component_version is used in the naming when the workflow of executions is run. Therefore it should be set
the version and component information has to be picked up differently now. It is used for naming in the workflow
bfe268a to
02fb4d3
Compare
|
Hello @sabinem, I found the problem when storing the I found another bug in which the So far I tested an execution with multiple components, and it works as expected. |
|
Hi @sabinem, I tried adding a new component version, and it works good. The new version is added without issues. However, I detected a problem. The |
|
@caviri Thanks a lot for the feedback: I will adapt this. Just one question: |
|
Hello @sabinem, good point. Is a list of ports. |
component carry only single ports: port mappings are defined only later for executions of the components
this just some minor renaming of the functions, so that is clearer where port mappings / ports are parsed and checked
a8056ab to
7a7d0bd
Compare
|
@caviri: I did the requested changes regarding the port for component entries. I tested again:
Please review again. If everything is fine, you may approve and merge. |
This PR adds validation to the mongo db creation of data:
for components and versions the git repo and the commit hash are checked: for private git repos a github token is needed and needs to be added to the
.envfile, see.env.distports are parsed from the cli into lists and then again checked before they are entered into the mongodb
paramaters are parsed from files and also checked before they are entered into the database
schema changes have been added on components, versions and executions: versions now contain an extended reference to executions