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

Unique resource name per resource class #1176

Merged
merged 1 commit into from
May 17, 2023

Conversation

nlabriet
Copy link
Contributor

@nlabriet nlabriet commented May 9, 2023

Description
Allow using the same resource name across classes.
I tested it in my setup and created a test that fails without this fix.

Checklist

  • Documentation for the feature
    • No documentation on this fix
  • Tests for the feature
  • PR has been tested

Fixes #1173

Fixes labgrid-project#1173

Signed-off-by: Nicolas Labriet <nlabriet@centralp.fr>
@codecov
Copy link

codecov bot commented May 9, 2023

Codecov Report

Patch coverage: 100.0% and project coverage change: +0.2 🎉

Comparison is base (f6d02f2) 62.7% compared to head (1f0c904) 63.0%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1176     +/-   ##
========================================
+ Coverage    62.7%   63.0%   +0.2%     
========================================
  Files         159     159             
  Lines       11653   11653             
========================================
+ Hits         7312    7346     +34     
+ Misses       4341    4307     -34     
Impacted Files Coverage Δ
labgrid/remote/client.py 51.3% <100.0%> (+1.8%) ⬆️
labgrid/resource/remote.py 82.5% <100.0%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@jluebbe jluebbe left a comment

Choose a reason for hiding this comment

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

Discussed this with @Emantor: While get_target_resources() returns a dict, we're never using it for lookups. So we should change this to a list or set of (resource_entry, name) tuples in the future.

@jluebbe jluebbe merged commit c3253c4 into labgrid-project:master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource names must be unique per resource class, not globally
2 participants