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

Fix logic to disable server default plugins loading #953

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

diegoferigo
Copy link
Contributor

@diegoferigo diegoferigo commented Aug 2, 2021

Summary

#281 introduced the new default behavior of loading server plugins from a configuration file. After the discussion in #281 (comment), if IGN_GAZEBO_SERVER_CONFIG is set but empty, no server plugins should loaded and the server.config file should be ignored.

I'm testing this functionality and it seems not working correctly. In fact, the return value of ignition::common::env complies with the intended logic only in the variant that accepts the _allowEmpty=true argument, which was missing.

To provide extra downstream content, I'm experimenting loading plugins with the new method introduced in #936. I'm trying to implement robotology-legacy/gym-ignition#378, but as soon as I removed the only plugin that I was loading, the server automatically reverted to the default list of plugins part of server.config. This was already known, as ticketed in robotology-legacy/gym-ignition#289.

cc @mjcarroll

Note: accordingly to the documentation, this logic will not likely work in Windows due to the its behavior with empty environment variables.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

@diegoferigo diegoferigo requested a review from chapulina as a code owner August 2, 2021 10:17
@github-actions github-actions bot added the 🏰 citadel Ignition Citadel label Aug 2, 2021
@codecov
Copy link

codecov bot commented Aug 2, 2021

Codecov Report

Merging #953 (eb5e585) into ign-gazebo3 (59a2faf) will not change coverage.
The diff coverage is n/a.

❗ Current head eb5e585 differs from pull request most recent head 8ebd8f2. Consider uploading reports for the commit 8ebd8f2 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##           ign-gazebo3     #953   +/-   ##
============================================
  Coverage        77.80%   77.80%           
============================================
  Files              220      220           
  Lines            12579    12579           
============================================
  Hits              9787     9787           
  Misses            2792     2792           
Impacted Files Coverage Δ
src/ServerConfig.cc 90.95% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59a2faf...8ebd8f2. Read the comment docs.

Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@chapulina chapulina merged commit ad27b27 into gazebosim:ign-gazebo3 Aug 2, 2021
@diegoferigo diegoferigo deleted the patch-1 branch August 2, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants