Skip to content

improve three debug messages#11908

Merged
mvdbeek merged 8 commits intogalaxyproject:devfrom
bernt-matthias:topic/2debugmsg
May 3, 2021
Merged

improve three debug messages#11908
mvdbeek merged 8 commits intogalaxyproject:devfrom
bernt-matthias:topic/2debugmsg

Conversation

@bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Apr 28, 2021

What did you do?

Small change to two three (debug) messages

Why did you make this change?

tool evaluation: for tools with many outputs its helpful to know which datasets and collections have been created.

drmaa: for debugging its more convenient to see the command that could be copy pasted

filter errors: debug is not shown in planemo output where it would be really helpful.

  • actually I would like to reraise here .. the try except block is there from the beginning 89ff0ef ... maybe this is now a feature ..

How to test the changes?

(select the most appropriate option; if the latter, provide steps for testing below)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

For UI Components

  • I've included a screenshot of the changes

tool evaluation: for tools with many outputs its helpful to know which datasets
and collections have been created.

drmaa: for debugging its more convenient to see the command that could be copy
pasted
@bernt-matthias bernt-matthias changed the title improve two debug messages improve three debug messages Apr 28, 2021
return True # do not create this dataset
except Exception as e:
log.debug('Tool %s output %s: dataset output filter (%s) failed: %s' % (tool.id, output.name, filter.text, e))
log.info(f'Tool {tool.id} output {output.name}: dataset output filter ({filter.text}) failed: {e}')
Copy link
Member

Choose a reason for hiding this comment

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

This should be at the debug level, that's going to spam the logs even if everything is alright. The log level for this module needs to be changed in planemo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright, then I revert this. Can you tell me an example when this is triggered and you do not want to see the message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

That's the rough idea, would be awesome if we can tune it there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bernt-matthias and others added 2 commits April 29, 2021 13:21
debug messages are not shown in planemo output where
the message can be really helpful.

Co-authored-by: David López <46503462+davelopez@users.noreply.github.com>
one could also pass `log_level="warning"` but this swallows some useful
messages at startup and shutdown, ie.

```
INFO:     Started server process [1394761]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8296 (Press CTRL+C to quit)
...
INFO:     Shutting down
INFO:     Waiting for application shutdown.
INFO:     Application shutdown complete.
INFO:     Finished server process [1394761]
```
from uvicorn.server import Server
from uvicorn.config import Config
config = Config(app, host=host, port=int(port))
config = Config(app, host=host, port=int(port), access_log=False)
Copy link
Member

Choose a reason for hiding this comment

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

Nice! But for Galaxy tests the access logs are useful sometimes. Maybe that could be controlled with an environment variable ? GALAXY_TEST_ACCESS_LOG ? Then planemo can set this but we keep the access logs in the CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure. is there an example where an env var is used somewhere in the code base?

Copy link
Member

Choose a reason for hiding this comment

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

@bernt-matthias
Copy link
Contributor Author

Do you also have a tip where in Planemo I would set the environment variable?

@mvdbeek
Copy link
Member

mvdbeek commented Apr 29, 2021

@bernt-matthias
Copy link
Contributor Author

Is there some place in the docs where such environment variables are listed and explained? If not it might be good to add it somewhere?

bernt-matthias added a commit to bernt-matthias/planemo that referenced this pull request Apr 29, 2021
@mvdbeek
Copy link
Member

mvdbeek commented May 3, 2021

Is there some place in the docs where such environment variables are listed and explained? If not it might be good to add it somewhere?

There's a somewhat complete listing in https://github.com/mvdbeek/galaxy/blob/926268ce6e1acd3db4e51ceb72e689899c545b9c/run_tests.sh#L181.
If you add it there we can later pull that out into https://docs.galaxyproject.org/en/master/dev/index.html ?

bernt-matthias and others added 2 commits May 3, 2021 12:53
Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
- fix and simplify reading of env variable
- shorten doc

Co-authored-by: Marius van den Beek <m.vandenbeek@gmail.com>
@mvdbeek mvdbeek merged commit 21796c3 into galaxyproject:dev May 3, 2021
@github-actions
Copy link

github-actions bot commented May 3, 2021

This PR was merged without a "kind/" label, please correct.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants