Skip to content

Commit

Permalink
changes, working
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Jan 6, 2025
1 parent 5ed4479 commit 4aee694
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
5 changes: 1 addition & 4 deletions docs/reference/auditing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ lakeFS Enterprise
{: .label .label-purple }

{: .note}
> Auditing is only available for [lakeFS Cloud]({% link cloud/index.md %}).
{: .warning }
> Please note, as of Jan 2024, the queryable interface within the lakeFS Cloud UI has been removed in favor of direct access to lakeFS audit logs. This document now describes how to set up and query this information using [AWS Glue](https://aws.amazon.com/glue/) as a reference.
> Auditing is only available for [lakeFS Cloud]({% link cloud/index.md %}) and [lakeFS Enterprise]({% link enterprise/index.md %}).
The lakeFS audit log allows you to view all relevant user action information in a clear and organized table, including when the action was performed, by whom, and what it was they did.

Expand Down
17 changes: 9 additions & 8 deletions pkg/api/helpers/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/treeverse/lakefs/pkg/api/apigen"
"github.com/treeverse/lakefs/pkg/api/apiutil"
"github.com/treeverse/lakefs/pkg/block/azure"
"github.com/treeverse/lakefs/pkg/graveler"
"github.com/treeverse/lakefs/pkg/httputil"
"golang.org/x/sync/errgroup"
)
Expand Down Expand Up @@ -384,16 +383,18 @@ func (u *presignUpload) uploadObject(ctx context.Context) (*apigen.ObjectStats,
if err != nil {
return nil, fmt.Errorf("link object to backing store: %w", err)
}

if linkResp.JSON200 != nil {
return linkResp.JSON200, nil
}
if linkResp.JSON403 != nil {
return nil, graveler.ErrWriteToProtectedBranch
}
if linkResp.JSON409 != nil {
return nil, ErrConflict
}
return nil, fmt.Errorf("link object to backing store: %w (%s)", ErrRequestFailed, linkResp.Status())
return nil, ResponseAsError(linkResp)
// if linkResp.JSON403 != nil {
// return nil, graveler.ErrWriteToProtectedBranch
// }
// if linkResp.JSON409 != nil {
// return nil, ErrConflict
// }
// return nil, fmt.Errorf("link object to backing store: %w (%s)", ErrRequestFailed, linkResp.Status())
}

func (u *presignUpload) Upload(ctx context.Context) (*apigen.ObjectStats, error) {
Expand Down

0 comments on commit 4aee694

Please sign in to comment.