Skip to content
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

Esgf cwt process #23

Closed
wants to merge 52 commits into from
Closed

Esgf cwt process #23

wants to merge 52 commits into from

Conversation

davidcaron
Copy link
Contributor

@davidcaron davidcaron commented Mar 19, 2019

  • Executing the aggregate process using boreas data
  • Executing the subset process using boreas data
  • Add a unit test for subset (aggregate wouldn't be necessary, as subset requires more parameters)

(https://aims2.llnl.gov/wps/ is down)

  • Executing the aggregate process using esgf data
  • Executing the subset process using esgf data

The unchecked tasks will be in a different PR.

@fmigneault fmigneault self-requested a review March 20, 2019 01:35
@fmigneault fmigneault added WIP Work in progress process/esgf-cwt Issue related to ESGF-CWT components. labels Mar 20, 2019
@davidcaron davidcaron force-pushed the esgf-cwt-process branch 2 times, most recently from 245d066 to 0f41b5d Compare March 25, 2019 19:08
@davidcaron davidcaron changed the title [WIP] Esgf cwt process Esgf cwt process Mar 25, 2019
@davidcaron davidcaron changed the base branch from master to wps1-auto-deploy March 25, 2019 19:10
@davidcaron
Copy link
Contributor Author

davidcaron commented Mar 25, 2019

@fmigneault This branch would be ready to merge. I'll wait for your OK, because there are some things you may want to take a look at that should have been in another PR:

  • in weaver/processes/wps1_process.py I changed some logic when converting from cwl inputs to pywps
  • in weaver/wps_restapi/processes/processes.py I added a reset_connection argument, to be called from the forked celery process. I was getting a connection error from pymongo when I was accessing the connection for the first time in the celery worker.

I think the rest should not break this branch, although it's possible I missed some things when merging.

@davidcaron davidcaron removed the WIP Work in progress label Mar 26, 2019
@davidcaron
Copy link
Contributor Author

@fmigneault I would be ready to merge this, let me know if you have any questions.

@fmigneault
Copy link
Collaborator

@davidcaron @dbyrns
don't know what is causing it, but many tests fail.
they are all passing on master

setup.cfg Outdated Show resolved Hide resolved
weaver/wps_restapi/processes/processes.py Outdated Show resolved Hide resolved
weaver/processes/wps_package.py Outdated Show resolved Hide resolved
weaver/wps_restapi/processes/processes.py Show resolved Hide resolved
weaver/wps_restapi/processes/processes.py Outdated Show resolved Hide resolved
@@ -185,4 +185,7 @@ def includeme(config):
wps_path = get_wps_path(settings)
config.add_route("wps", wps_path)
config.add_view(pywps_view, route_name="wps")

config.add_static_view(get_wps_output_path(config), get_wps_output_dir(config))
Copy link
Collaborator

Choose a reason for hiding this comment

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

this shouldn't be required
will cause problems with nginx that is currently doing it

Copy link
Contributor Author

@davidcaron davidcaron Mar 28, 2019

Choose a reason for hiding this comment

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

Wouldn' t nginx override this? The way I see it it doesn't cause any harm because nginx catches the route before weaver does. And adding this makes it possible to run a local weaver without the need to have nginx running.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point David.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, isn't this the idea for #5?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If it works in both cases, great.
Actually, we could remove it altogether from nginx, because weaver.wps_output_dir and weaver.wps_output_path are hardcode in it.
This variant is better if workflows are functional with it.

Copy link
Contributor Author

@davidcaron davidcaron Mar 28, 2019

Choose a reason for hiding this comment

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

I didn't think about large files... wouldn't nginx be more appropriate for large files?

Also, wouldn't setting weaver.wps_output_path = "/my-new-path" break the correct saving of outputs anyway, even in the current setup?

I think we can have both... keep the static route in weaver, remove nginx in the config/buildout of weaver, but when we deploy, configure another instance of nginx to serve static content on a specific route.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The idea with weaver.wps_output_path is to specify which weaver url to call to obtain the process results. I couldn't find a way to cleanly match nginx's, pywps's and weaver's configs together under this same setting. So currently, it just "works" because the values are all the same...
I managed to somehow patch the pywps/weaver configs with this setting, but not nginx. I was counting on #5 to just drop it.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's not only large file, there is simultaneously access... Nginx will serve multiples files at the same time without issues while we will rapidly run out of python workers all strugling to serve the files.
For the config issue why not using an environment variable both used in the nginx and weaver config files with the template setup we have?

Copy link
Collaborator

@fmigneault fmigneault Mar 28, 2019

Choose a reason for hiding this comment

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

An external nginx in the compose to serve the files is an interesting idea.
We would need to make sure that add_static_view works standalone so that anyone can still run weaver by itself (although slower file transfer).

Copy link
Contributor

Choose a reason for hiding this comment

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

The external nginx is already serving the files using the volume wps_outputs.
so I think we got a consensus that #5 is the way to go and adding the static serve is helpful in debugging and not harmful in production. Config wise using the compose volume wps_outputs and mounting it in both docker image at a proper place should do it.

@davidcaron
Copy link
Contributor Author

aims2 is up this morning. I will test the workflows requiring aims2.

@davidcaron
Copy link
Contributor Author

aims2 is still down, I think it's been close to 2 weeks now...

@fmigneault fmigneault mentioned this pull request May 7, 2020
35 tasks
@github-actions github-actions bot added ci feature/CWL Issue related to CWL support ci/tests Tests of the package and features process/wps1 Issue related to WPS 1.x processes support process/wps2 Issue related to WPS 2.x processes support process/wps3 Issue related to WPS 3.x (REST-JSON) processes support labels May 13, 2020
@matprov
Copy link
Contributor

matprov commented Jul 2, 2020

This pull request will not be merge.
See esgf-cwt-process-rebase, for an updated version.
Closing this old PR.

@matprov matprov closed this Jul 2, 2020
@fmigneault fmigneault deleted the esgf-cwt-process branch April 24, 2021 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/tests Tests of the package and features feature/CWL Issue related to CWL support process/esgf-cwt Issue related to ESGF-CWT components. process/wps1 Issue related to WPS 1.x processes support process/wps2 Issue related to WPS 2.x processes support process/wps3 Issue related to WPS 3.x (REST-JSON) processes support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants