Fix xml config with xml path#3189
Open
cbellot000 wants to merge 7 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3189 +/- ##
==========================================
- Coverage 82.90% 82.88% -0.02%
==========================================
Files 93 93
Lines 11603 11605 +2
==========================================
Hits 9619 9619
- Misses 1984 1986 +2 |
PProfizi
reviewed
May 12, 2026
Contributor
|
Thanks for this @cbellot000 ! |
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
cbellot000
commented
May 12, 2026
cbellot000
commented
May 12, 2026
BClappe
reviewed
May 13, 2026
| AvailableServerContexts.premium, | ||
| ): | ||
| run_cmd.append(f"--context {int(context.licensing_context_type)}") | ||
| if context.licensing_context_type == 2 and len(context.xml_path) > 0: |
Contributor
There was a problem hiding this comment.
What is 2?
Could you provide an enum or a constant?
cbellot000
commented
May 13, 2026
BClappe
reviewed
May 13, 2026
Comment on lines
+149
to
+152
| if context.licensing_context_type == 2 and len(context.xml_path) > 0: # 2 == custom xml | ||
| run_cmd.append(f"--context {context.xml_path}") | ||
| else: | ||
| run_cmd.append(f"--context {int(context.licensing_context_type)}") |
Contributor
There was a problem hiding this comment.
What if licensing_context_type == 2 and len(context.xml_path) == 0?
It will specify --context 2, with no path to xml. Is it a problem?
cbellot000
commented
May 13, 2026
BClappe
approved these changes
May 13, 2026
PProfizi
reviewed
May 13, 2026
Comment on lines
173
to
186
| @pytest.mark.skipif( | ||
| not SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_10_0, reason="not working properly before 25R2" | ||
| ) | ||
| @pytest.mark.skipif(running_docker, reason="server start using custom xml not working on Docker") | ||
| def test_server_context_custom_xml(remote_config_server_type, testfiles_dir): | ||
| from pathlib import Path | ||
|
|
||
| context = dpf.core.AvailableServerContexts.no_context | ||
| context.xml_path = Path(testfiles_dir) / "DpfCustomDefinedTest.xml" | ||
| server_plugins = start_local_server(config=remote_config_server_type, context=context).plugins | ||
| ref = ["grpc", "native"] | ||
| assert sorted(list(server_plugins.keys())) == ref | ||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
@cbellot000 this one is actually useless, right?
PProfizi
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the server config: when an xml was provided, it was never given to the server