Skip to content

Feat/v2 workspaces#122

Merged
St4NNi merged 11 commits intofeat/version2.0reworkfrom
feat/v2_workspaces
Sep 28, 2023
Merged

Feat/v2 workspaces#122
St4NNi merged 11 commits intofeat/version2.0reworkfrom
feat/v2_workspaces

Conversation

@lfbrehm
Copy link
Copy Markdown
Member

@lfbrehm lfbrehm commented Sep 28, 2023

Workspaces

  • Adds missing gRPC requests

Hooks

  • Adds template support

General

  • Fixes some sync issues
  • Adds partial unique constraints on db-level for internal relations

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 28, 2023

Codecov Report

Attention: 308 lines in your changes are missing coverage. Please review.

Comparison is base (89419dc) 47.71% compared to head (029d2e0) 46.74%.
Report is 1 commits behind head on feat/version2.0rework.

Additional details and impacted files
@@                    Coverage Diff                    @@
##           feat/version2.0rework     #122      +/-   ##
=========================================================
- Coverage                  47.71%   46.74%   -0.97%     
=========================================================
  Files                         69       69              
  Lines                       9753    10028     +275     
=========================================================
+ Hits                        4654     4688      +34     
- Misses                      5099     5340     +241     
Files Coverage Δ
src/database/dsls/endpoint_dsl.rs 89.61% <ø> (ø)
src/middlelayer/create_db_handler.rs 73.21% <100.00%> (ø)
src/middlelayer/workspace_request_types.rs 0.00% <0.00%> (ø)
src/grpc/users.rs 4.68% <0.00%> (-0.10%) ⬇️
src/database/dsls/workspaces_dsl.rs 41.93% <0.00%> (+41.93%) ⬆️
src/middlelayer/hooks_request_types.rs 0.00% <0.00%> (ø)
src/database/dsls/object_dsl.rs 84.58% <0.00%> (-1.24%) ⬇️
src/utils/conversions.rs 42.73% <0.00%> (-0.74%) ⬇️
src/grpc/hooks.rs 0.00% <0.00%> (ø)
src/middlelayer/update_db_handler.rs 69.84% <26.92%> (-3.41%) ⬇️
... and 4 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@das-Abroxas das-Abroxas left a comment

Choose a reason for hiding this comment

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

Two comments that can be addressed before merge.

Comment thread src/database/dsls/object_dsl.rs Outdated
client: &Client,
) -> Result<()> {
let query = "UPDATE objects
SET data_class = ('CONFIDENTIAL'), created_by = $1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

But the claimed objects do not meet the requirements for our definition of the data class 'Confidential'?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right, this should be set to PRIVATE.

Comment thread src/grpc/hooks.rs Outdated
Comment on lines +211 to +227
let client = tonic_internal!(
self.database_handler.database.get_client().await,
"Internal database error"
);
let hook = tonic_invalid!(
Hook::get(request.hook_id.clone(), &client).await,
"Hook not found"
)
.ok_or_else(|| tonic::Status::not_found("Hook not found"))?;

if user != hook.owner {
return Err(tonic::Status::unauthenticated("Access not allowed"));
}
tonic_internal!(
self.database_handler.append_project_to_hook(request).await,
"HookCallback failed"
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This could be moved into the middlelayer.

Copy link
Copy Markdown
Member

@St4NNi St4NNi left a comment

Choose a reason for hiding this comment

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

gogo!

@St4NNi St4NNi merged commit fcc6241 into feat/version2.0rework Sep 28, 2023
@St4NNi St4NNi deleted the feat/v2_workspaces branch September 28, 2023 13:26
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