-
Notifications
You must be signed in to change notification settings - Fork 113
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
Efss backend fixes #3526
Efss backend fixes #3526
Conversation
…to efss-backend-fixes
Thanks for creating a PR from your fork. This way the CI will run even faster since more runners are available to work in parallel (we just have 8 self-hosted runners so far). |
@gmgigi96 it's green now :) |
log.Info().Msgf("pkg/ocm/share/manager/json providerId: %s", fmt.Sprintf("%s:%s", md.StorageId, md.OpaqueId)) | ||
log.Info().Msgf("pkg/ocm/share/manager/json owner: %s", userID.OpaqueId) | ||
log.Info().Msgf("pkg/ocm/share/manager/json protocol: %s", protocol) | ||
log.Info().Msgf("pkg/ocm/share/manager/json meshProvider: %s", userID.Idp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These seems to be debug logs, can you remove them? Or log them better?
}, | ||
} | ||
} | ||
|
||
log := appctx.GetLogger(ctx) | ||
log.Info().Msg("pkg/ocm/share/manager/nextcloud calls sender.Send") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@@ -498,33 +543,32 @@ func (sm *Manager) ListReceivedShares(ctx context.Context) ([]*ocm.ReceivedShare | |||
if err != nil { | |||
return nil, err | |||
} | |||
var pointers = make([]*ocm.ReceivedShare, len(respArr)) | |||
var pointersBaseShare = make([]*ocm.Share, len(respArr)) | |||
var pointersReceivedShare = make([]*ocm.ReceivedShare, len(respArr)) | |||
for i := 0; i < len(respArr); i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a for-range loop here.
pointersBaseShare should be initialized with make([]*ocm.Share, 0, len(respArr))
} | ||
return nil, errors.New("received an unreadable share object from the EFSS backend") | ||
} | ||
pointersBaseShare[i] = &ocm.Share{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the append function to add the struct to the list
user, err := getUser(ctx) | ||
if err != nil { | ||
// log.Error().Msg("error getting user!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove all these commented lines
Continuation of #3524