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

add support to ingest supported with roles #601

Merged
merged 9 commits into from
Aug 28, 2024

Conversation

maggie98choy
Copy link
Contributor

What

What does this PR add or remove?

Why

Why are these changes needed?

How

How do these changes achieve the goal?

Test

How has this been tested? How can a reviewer test it?

Checklist

  • I have self-reviewed this PR
  • I have added tests that prove the feature works or the fix is effective

@maggie98choy maggie98choy force-pushed the add-support-to-ingested-supported-with-role branch from d3643a2 to 5b01dfa Compare August 16, 2024 20:40
@@ -225,7 +225,7 @@ impl Serialize for FireboltPermission {
{
let s = self.cap.as_str();
let suffix = match self.role {
CapabilityRole::Use => "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This probably should not be removed

let mut perm_list: Vec<FireboltPermission> = Vec::new();
for perm in perm_strings {
if role_based_support {
let pattern = r"^xrn:firebolt:capability:([a-z0-9\\-]+)((:[a-z0-9\\-]+)?)$";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use serde_json::from_str::()?

Copy link
Collaborator

@satlead satlead left a comment

Choose a reason for hiding this comment

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

Please fix unsafe unwraps

@maggie98choy maggie98choy force-pushed the add-support-to-ingested-supported-with-role branch from fce2172 to 0915708 Compare August 23, 2024 21:07
@maggie98choy maggie98choy force-pushed the add-support-to-ingested-supported-with-role branch from 0915708 to 49b0c0b Compare August 27, 2024 18:53
@maggie98choy maggie98choy force-pushed the add-support-to-ingested-supported-with-role branch from c0b0ef1 to 73c1526 Compare August 28, 2024 15:57
Copy link

Code Coverage

Package Line Rate Health
core.main.src.firebolt 4%
core.main.src.firebolt.handlers 8%
core.main.src.state 26%
core.launcher.src.manager 7%
core.sdk.src.api.distributor 84%
core.sdk.src.api.device 77%
core.main.src.bootstrap.extn 0%
core.sdk.src.api.gateway 85%
core.sdk.src.extn.client 91%
core.main.src.broker.thunder 54%
core.tdk.src.gateway 100%
openrpc_validator.src 90%
core.main.src.service.extn 40%
device.thunder.src.bootstrap 0%
distributor.general.src 2%
core.sdk.src.extn.ffi 80%
core.main.src.service.apps 47%
core.main.src.utils 29%
core.main.src.processor 0%
core.sdk.src.api.manifest 91%
core.main.src.service 31%
core.launcher.src 0%
core.sdk.src.utils 53%
device.thunder_ripple_sdk.src.processors.events 0%
device.thunder_ripple_sdk.src.processors 10%
core.main.src.bootstrap.manifest 0%
core.tdk.src.utils 0%
core.sdk.src.framework 75%
core.main.src.bootstrap 0%
device.mock_device.src 52%
core.main.src.broker 43%
core.sdk.src.extn 83%
device.thunder.src 0%
device.thunder_ripple_sdk.src.bootstrap 0%
device.thunder_ripple_sdk.src.client 74%
core.sdk.src.api.firebolt 77%
core.sdk.src.api 78%
device.thunder_ripple_sdk.src 15%
core.main.src.state.cap 43%
core.main.src.processor.storage 0%
core.sdk.src.api.observability 68%
device.thunder_ripple_sdk.src.events 4%
core.main.src 0%
Summary 44% (17984 / 41245)

Minimum allowed line rate is 42%

@maggie98choy maggie98choy merged commit 14dff82 into main Aug 28, 2024
7 checks passed
@maggie98choy maggie98choy deleted the add-support-to-ingested-supported-with-role branch August 28, 2024 16:05
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.

3 participants