profile
viewpoint
Cuong Manh Le cuonglm Hanoi https://cuonglm.xyz defer profile.RUnlock()

cuonglm/gocmt 53

Add missing comment on exported function, method, type, constant, variable in go file

cuonglm/gogi 46

Go client for gitignore.io

cuonglm/flycheck-checkbashisms 12

Flycheck linter for checkbashisms

cuonglm/envim 11

Go environment variables for human

cuonglm/godt 5

Golang library for getting docker image tags

cuonglm/emacs.d 4

My emacs config

cuonglm/dtim 3

Python DateTime IMprovement

cuonglm/flask-papertrail 3

Easily setup papertrail to your Flask application

cuonglm/pikago 3

Go client for https://pikab.in

cuonglm/managesieve 2

ManageSieve client implementation in Go

Pull request review commentherdius/herdius-core

get balance from an address

+package sync++import (+	"testing"++	"github.com/stretchr/testify/assert"+)++func TestGetBalance(t *testing.T) {

Should be TestGetETHBalance

phuongnc

comment created time in 3 days

Pull request review commentherdius/herdius-core

get balance from an address

 func (es *EthSyncer) getNonce(client *ethclient.Client, account common.Address, 	} 	return nonce, nil }++func (es *EthSyncer) getBalance(address string) (*big.Int, error) {+	httpClient := newHTTPClient()+	config := config.GetConfiguration("dev")+	balanceurl := config.EthRPCURL + address+	resp, err := httpClient.Get(balanceurl)++	if err != nil {+		return nil, err+	}+	defer resp.Body.Close()++	type AddressBalance struct {+		Status  bool     `json:"status"`+		Message string   `json:"message"`+		Data    *big.Int `json:"data"`+	}++	bodyBytes, _ := ioutil.ReadAll(resp.Body)+	balanceInfo := new(AddressBalance)+	json.Unmarshal(bodyBytes, balanceInfo)++	if !balanceInfo.Status {+		return nil, err

err is nil here, please return an error to indicate what was wrong. Maybe errors.New("failed to get balance info")

phuongnc

comment created time in 3 days

Pull request review commentherdius/herdius-core

get balance from an address

+package sync++import (+	"testing"++	"github.com/stretchr/testify/assert"+)++func TestGetBalance(t *testing.T) {+	es := newEthSyncer()+	_, err := es.getBalance("0xE4148EAa01846729B6596d3939cc2B342CB4701D")+	assert.Equal(t, err, nil)

use assert.NoError(t, err) instead.

phuongnc

comment created time in 3 days

Pull request review commentherdius/herdius-core

get balance from an address

 func (es *EthSyncer) getNonce(client *ethclient.Client, account common.Address, 	} 	return nonce, nil }++func (es *EthSyncer) getBalance(address string) (*big.Int, error) {+	httpClient := newHTTPClient()+	config := config.GetConfiguration("dev")+	balanceurl := config.EthRPCURL + address+	resp, err := httpClient.Get(balanceurl)++	if err != nil {+		return nil, err+	}+	defer resp.Body.Close()++	type AddressBalance struct {+		Status  bool     `json:"status"`+		Message string   `json:"message"`+		Data    *big.Int `json:"data"`+	}++	bodyBytes, _ := ioutil.ReadAll(resp.Body)+	balanceInfo := new(AddressBalance)+	json.Unmarshal(bodyBytes, balanceInfo)

Missing error checking here.

phuongnc

comment created time in 3 days

Pull request review commenttendermint/tendermint

consensus: stricter on LastCommitRound check

 func (cs *State) updateToState(state sm.State) {  	// Reset fields based on state. 	validators := state.Validators-	lastPrecommits := (*types.VoteSet)(nil) 	if cs.CommitRound > -1 && cs.Votes != nil { 		if !cs.Votes.Precommits(cs.CommitRound).HasTwoThirdsMajority() { 			panic("updateToState(state) called but last Precommit round didn't have +2/3") 		}-		lastPrecommits = cs.Votes.Precommits(cs.CommitRound)+		cs.LastCommit = cs.Votes.Precommits(cs.CommitRound)

@ebuchman @melekes Any updates on this?

cuonglm

comment created time in 4 days

issue commentgolang/go

net/http: new TestDontCacheBrokenHTTP2Conn fails

@bcmills is there anyone I can add to reviewers list?

@bradfitz seems to be busy at this time.

cuonglm

comment created time in 7 days

push eventcuonglm/managesieve

Cuong Manh Le

commit sha 7998a1b486648cc193fe5ea42d22902f29ca1007

drop test on go tip

view details

push time in 8 days

push eventcuonglm/managesieve

Cuong Manh Le

commit sha e892cb0396dfffa711a84fa36cdc4bc046bdb2ef

Add godoc badge

view details

push time in 8 days

push eventcuonglm/managesieve

Cuong Manh Le

commit sha b147d42536af87ebc106d5d4ef377bb66ce73769

Add travis badge

view details

push time in 8 days

push eventcuonglm/managesieve

Cuong Manh Le

commit sha 29c0913c443c07921aeb91f9c89cb6315dcbbe1c

Fix golint

view details

push time in 8 days

create barnchcuonglm/managesieve

branch : master

created branch time in 8 days

created repositorycuonglm/managesieve

ManageSieve client implementation in Go

created time in 8 days

issue commentgolang/go

net/http: TestDontCacheBrokenHTTP2Conn flakes

Duplicated of https://github.com/golang/go/issues/35113

There’s CL under review

josharian

comment created time in 8 days

issue openedagola-io/agola

services/gateway/client: Register method call API with wrong path

What happened:

services/gateway/client.Client.Register method call API with wrong path. In https://github.com/agola-io/agola/blob/42785a1aeec56b01dd262458df4215045e61c750/services/gateway/client/client.go#L433

Client.Register call Client.getParsedResponse, which internally call to Client.doRequest, which always use /api/v1alpha as prefix https://github.com/agola-io/agola/blob/42785a1aeec56b01dd262458df4215045e61c750/services/gateway/client/client.go#L58

Why the endpoint for registering is /api/register.

What you expected to happen:

Registering user via API success.

How to reproduce it (as minimally and precisely as possible):

Create a services/gateway/client.Client then calling its Register method.

Anything else we need to know?:

Environment:

  • Agola version: 42785a1aeec56b01dd262458df4215045e61c750
  • Agola running environment (if useful to understand the bug): via docker
  • Others:

created time in 9 days

issue commentjordan-wright/email

Emails with no body insert attachment as text.

@krolaw Which server generates above email content?

Here's an example from postfix:

MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="------------364886E9732896FFFA961C46"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------364886E9732896FFFA961C46
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit



--------------364886E9732896FFFA961C46
Content-Type: text/plain; charset=UTF-8;
 name="test.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="test.txt"

MQo=
--------------364886E9732896FFFA961C46--

and it's parsed correctly after #89

krolaw

comment created time in 11 days

startedjordan-wright/email

started time in 11 days

push eventcuonglm/email

Luke Ross

commit sha 503093522e0fca88102516d3ca87134f679a10fd

NewEmailFromReader now adds attachments If the part has the header 'Content-Disposition' with a value of 'attachment' then add the part as an attachment to the Email.

view details

push time in 11 days

fork cuonglm/email

Robust and flexible email library for Go

fork in 11 days

PR closed agola-io/agola

Reviewers
Pinned go-autorest to v13.3.3

Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: https://github.com/Azure/go-autorest/issues/414

+3 -1

3 comments

2 changed files

cuonglm

pr closed time in 14 days

PR closed agola-io/agola

Reviewers
Add auth type token

This PR add authentication type token to remote source. Basically, it's just the same as auth type password, but use a pre-defined token for authorize instead of doing normal password login step to get token.

This feature is useful in case of integrating agola with git provider transparently for user. The user don't have to go through agola-web to register/login and create project.

+91 -7

5 comments

13 changed files

cuonglm

pr closed time in 14 days

push eventpatcito/agola

Cuong Manh Le

commit sha 1832871652b6bc43947108f7157005f483d909cd

Pinned go-autorest to v13.3.3 Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency. So pinning Azure/go-autorest to v1.13.3 to prevent this issue. See: https://github.com/Azure/go-autorest/issues/414

view details

push time in 14 days

PR merged patcito/agola

Pinned go-autorest to v13.3.3

Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: https://github.com/Azure/go-autorest/issues/414

+3 -1

0 comment

2 changed files

cuonglm

pr closed time in 14 days

PR opened patcito/agola

Pinned go-autorest to v13.3.3

Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: https://github.com/Azure/go-autorest/issues/414

+3 -1

0 comment

2 changed files

pr created time in 14 days

pull request commentagola-io/agola

Pinned go-autorest to v13.3.3

@cuonglm Usually this kind of dependency issues could be fixed on the final package and not in an upstream one. Can you provide a reproducer of your issue? We have some external components relying on the agola client and haven't see the issue you're reporting (please also note that the agola api is not stable).

This only applies if external component also depends on go-autorest. You can try this PR from gitea:

$ go1.13.8 get agola.io/agola@v0.4.0
go: finding agola.io v0.4.0
$ go1.13.8 mod tidy
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob imports
	github.com/Azure/azure-storage-blob-go/azblob tested by
	github.com/Azure/azure-storage-blob-go/azblob.test imports
	github.com/Azure/go-autorest/autorest/adal: ambiguous import: found github.com/Azure/go-autorest/autorest/adal in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/adal)
	github.com/Azure/go-autorest/autorest/adal v0.5.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest/adal@v0.5.0)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest: ambiguous import: found github.com/Azure/go-autorest/autorest in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest)
	github.com/Azure/go-autorest/autorest v0.9.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest/azure: ambiguous import: found github.com/Azure/go-autorest/autorest/azure in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/azure)
	github.com/Azure/go-autorest/autorest v0.9.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest@v0.9.0/azure)
code.gitea.io/gitea/modules/storage imports
	gocloud.dev/blob/azureblob tested by
	gocloud.dev/blob/azureblob.test imports
	github.com/Azure/go-autorest/autorest/azure/auth imports
	github.com/Azure/go-autorest/autorest/azure/cli imports
	github.com/Azure/go-autorest/autorest/date: ambiguous import: found github.com/Azure/go-autorest/autorest/date in multiple modules:
	github.com/Azure/go-autorest v12.0.0+incompatible (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest@v12.0.0+incompatible/autorest/date)
	github.com/Azure/go-autorest/autorest/date v0.1.0 (/Users/cuonglm/go/pkg/mod/github.com/!azure/go-autorest/autorest/date@v0.1.0)
cuonglm

comment created time in 14 days

push eventpatcito/agola

Cuong Manh Le

commit sha 205f746411531e89ff78363bc678b03f08287935

Pinned go-autorest to v13.3.3 Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency. So pinning Azure/go-autorest to v1.13.3 to prevent this issue. See: https://github.com/Azure/go-autorest/issues/414

view details

push time in 14 days

pull request commentagola-io/agola

Add auth type token

Instead you are defining a remote source where you define a global remote source token. I can't understand how this will work (how can register and login flow works?).

My use case is that I want to integrate agola with my gitea, but in a transparent way for user. With this auth token, eveyrytime I created an user in gitea, I can create a remote resource for that user with given token, then do all the work in agola side (register, login, create project ...).

I don't see why this hard to understand, it's just the same with auth password type, but instead of asking username/password to get token from gitea, we already stored a fix token in agola and use this token instead.

cuonglm

comment created time in 14 days

PR opened agola-io/agola

Pinned go-autorest to v13.3.3

Azure/go-autorest version less than v12.0.0 causes ambiguous imports. Though it's not agola direct dependency, it causes problem when others use agola.io/agola as dependency.

So pinning Azure/go-autorest to v1.13.3 to prevent this issue.

See: https://github.com/Azure/go-autorest/issues/414

+3 -1

0 comment

2 changed files

pr created time in 14 days

create barnchpatcito/agola

branch : feature/upgrade-go-autorest

created branch time in 14 days

issue closedgolang/go

cmd/vet: `GO111MODULE=off go test -count=1 cmd/vet` fails

What version of Go are you using (go version)?

<pre> $ go version go version devel +9be2d46422 Fri May 17 06:01:17 2019 +0000 linux/amd64 </pre>

Does this issue reproduce with the latest release?

No

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/cuonglm/.cache/go-build" GOENV="/home/cuonglm/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/cuonglm/go" GOPROXY="direct" GOROOT="/home/cuonglm/sources/go" GOSUMDB="off" GOTMPDIR="" GOTOOLDIR="/home/cuonglm/sources/go/pkg/tool/linux_amd64" GCCGO="/usr/local/bin/gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build714996541=/tmp/go-build -gno-record-gcc-switches" </pre></details>

What did you do?

$ GO111MODULE=off go vet cmd/vet/testdata/unsafeptr
$ GO111MODULE=on go vet cmd/vet/testdata/unsafeptr
# cmd/vet/testdata/unsafeptr
cmd/vet/testdata/unsafeptr/unsafeptr.go:12:6: possible misuse of unsafe.Pointer

What did you expect to see?

go vet produces output regardless of GO111MODULE value.

What did you see instead?

go vet does not produce output when GO111MODULE=off.

closed time in 15 days

cuonglm

startedjemalloc/jemalloc

started time in 15 days

push eventpatcito/agola

Cuong Manh Le

commit sha 14ad78f5324cfd3f0a56af216b8d6579a57b5d6c

internal/services: validate auth type token requests

view details

Cuong Manh Le

commit sha 44d3dcd2adb126976bd78e35e133d20d36c7b453

internal/services/common: fix wrong error message Error message for GetPasswirdSource/GetTokenSource should not be "oauth" type. This seems to be a copy/paste error.

view details

Cuong Manh Le

commit sha 829ae20666fa7769ba1478c35b9cb4de6496e877

cmd,internal,servies: add update auth token request

view details

push time in 15 days

pull request commentagola-io/agola

Add auth type token

@cuonglm Thanks for the PR.

Before doing a review I'd like to better understand how this will work. Can you provide more details on how this could be used and with which provider does it currently work?

It works with gitea:

agola --token "admintoken" --gateway-url http://127.0.0.1:8000 remotesource create \
--name gitea-cuong \
--type gitea \
--api-url http://192.168.64.21 \
--auth-type token \
--auth-token 6746290e522e0ac5679353cb3216795e05e128a5 \
--skip-ssh-host-key-check

auth token is the one I generated in gitea dashboard.

After running above command, I can go to http://127.0.0.1:8000/register and click my account without interact with gitea. Normal oauth flow will redirect me to gitea page.

cuonglm

comment created time in 15 days

PR opened agola-io/agola

Add auth type token

This PR add authentication type token to remote source. Basically, it's just the same as auth type password, but use a pre-defined token for authorize instead of doing normal password login step to get token.

This feature is useful in case of integrating agola with git provider transparently for user. The user don't have to go through agola-web to register/login and create project.

+88 -6

0 comment

11 changed files

pr created time in 15 days

delete branch patcito/agola

delete branch : feature/add-auth-type-token

delete time in 15 days

push eventpatcito/agola

Cuong Manh Le

commit sha a7cf6397fa23165d7df1ec0bfd500981036b5c9f

cmd,internal,servies: add update auth token request

view details

push time in 15 days

PR opened patcito/agola

Feature/add auth type token
+32 -2

0 comment

4 changed files

pr created time in 15 days

create barnchpatcito/agola

branch : feature/add-auth-type-token

created branch time in 15 days

delete branch patcito/agola

delete branch : feature/add-auth-type-token

delete time in 15 days

PR opened patcito/agola

Reviewers
all: add auth type token

So we can use user's personal token to register and authenticate without browser. Adding remotesource command:

agola --token "admintoken" --gateway-url http://127.0.0.1:8000 remotesource create \                                                                                                                                                        gitchai/git/feature/agola !
  --name gitea \
  --type gitea \
  --api-url http://192.168.64.21 \
  --auth-type token \
  --auth-token 122b1c7df3c45fe94083d2cb8250c310c4fc0713 \
  --skip-ssh-host-key-check
+46 -5

0 comment

8 changed files

pr created time in 15 days

create barnchpatcito/agola

branch : feature/add-auth-type-token

created branch time in 15 days

startedgoogle/tcmalloc

started time in 15 days

issue commentagola-io/agola

Installation k8s examples failed

@camandel Using sorintlab/agola works, but now I get different error:

Events:
  Type     Reason     Age                  From               Message
  ----     ------     ----                 ----               -------
  Normal   Scheduled  2m53s                default-scheduler  Successfully assigned default/agola-5dfb95f478-cc9ql to minikube
  Normal   Pulling    42s (x4 over 2m51s)  kubelet, minikube  Pulling image "sorintlab/agola"
  Normal   Pulled     38s (x4 over 94s)    kubelet, minikube  Successfully pulled image "sorintlab/agola"
  Normal   Created    38s (x4 over 94s)    kubelet, minikube  Created container agola
  Normal   Started    38s (x4 over 93s)    kubelet, minikube  Started container agola
  Warning  BackOff    9s (x7 over 89s)     kubelet, minikube  Back-off restarting failed container
cuonglm

comment created time in 16 days

startedminio/simdjson-go

started time in 16 days

startedgliderlabs/ssh

started time in 16 days

issue openedagola-io/agola

Installation k8s examples failed

Using the kubernetes example in https://github.com/agola-io/agola/blob/master/examples/kubernetes/simple/agola.yml

I got this error:

Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  20m (x2 over 20m)     default-scheduler  pod has unbound immediate PersistentVolumeClaims
  Normal   Scheduled         20m                   default-scheduler  Successfully assigned default/agola-84995864dc-snxxh to minikube
  Normal   Pulling           18m (x4 over 19m)     kubelet, minikube  Pulling image "agola"
  Warning  Failed            18m (x4 over 19m)     kubelet, minikube  Failed to pull image "agola": rpc error: code = Unknown desc = Error response from daemon: pull access denied for agola, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
  Warning  Failed            18m (x4 over 19m)     kubelet, minikube  Error: ErrImagePull
  Normal   BackOff           9m51s (x41 over 19m)  kubelet, minikube  Back-off pulling image "agola"
  Warning  Failed            4m51s (x63 over 19m)  kubelet, minikube  Error: ImagePullBackOff

Sounds like the image is not published yet?

created time in 16 days

PR opened gomodule/redigo

Simplify string reply check

The go compiler is smart enough to optimize string([]byte) conversion.

name old time/op new time/op delta DoPing-12 29.2µs ± 3% 29.3µs ± 4% ~ (p=0.730 n=9+9)

name old alloc/op new alloc/op delta DoPing-12 0.00B 0.00B ~ (all equal)

name old allocs/op new allocs/op delta DoPing-12 0.00 0.00 ~ (all equal)

+3 -3

0 comment

1 changed file

pr created time in 17 days

push eventcuonglm/redigo

Cuong Manh Le

commit sha e3ac7bdbac785c33993f723231e350e9afd2d0cd

Simplify string reply check The go compiler is smart enough to optimize string([]byte) conversion. name old time/op new time/op delta DoPing-12 29.2µs ± 3% 29.3µs ± 4% ~ (p=0.730 n=9+9) name old alloc/op new alloc/op delta DoPing-12 0.00B 0.00B ~ (all equal) name old allocs/op new allocs/op delta DoPing-12 0.00 0.00 ~ (all equal)

view details

push time in 17 days

fork cuonglm/redigo

Go client for Redis

fork in 17 days

startedtailscale/tailscale

started time in 17 days

startedgoogle/syzkaller

started time in 18 days

issue commentgolang/go

cmd/compile: suspicious symbol generation for args_stackmap

@randall77 Can you elaborate what is exactly the same fix?

Does it mean:

lsym := Ctxt.Lookup(fn.Func.lsym.Name + ".args_stackmap")

or:

lsym := Ctxt.Lookup(fn.funcname()+ ".args_stackmap")
mdempsky

comment created time in 21 days

issue commenttektoncd/cli

Add sub-command to manage secrets

@cuonglm I am not familiar with drone secret. Would you mind explaining key features of it that you find useful?

I do agree that it would be great to add something for managing secrets, but my thought would be that it would need to be something that kubectl does not offer with regard to working with Tekton. Similar thoughts to @ImJasonH on this.

drone secret allow you to create/remove/update/list/get details secrets.

cuonglm

comment created time in 21 days

issue commenttektoncd/cli

Add sub-command to manage secrets

What is your ideal UX for this surface? tkn secrets create <secret> ...? What would this surface do that kubectl doesn't today?

From developer point of view, it will be easier if I can manage everything from tekton side. Example in my code base, I use this function to query pipeline run of given pipeline:

func getPipelineRunName(p cli.Params, pipelineName string) (string, error) {
        lOpts := metav1.ListOptions{
                LabelSelector: fmt.Sprintf("tekton.dev/pipeline=%s", pipelineName),
        }

        prs, err := prhelper.GetAllPipelineRuns(p, lOpts, 1)
        if err != nil {
                return "", err
        }

        if len(prs) == 0 {
                return "", fmt.Errorf("No pipeline run found")
        }

        return strings.Fields(prs[0])[0], nil

}

For now, if I want to create a secret and attach it to a service account, I have to create a kubernetes client.

cuonglm

comment created time in 21 days

issue openedtektoncd/cli

Add sub-command to manage secrets

Version and Operating System

tkn Version: Client version: 0.6.0

Operating System: Darwin Cuongs-MacBook-Pro.local 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64

Expected Behavior

Managing secrets via a sub-command, the same as drone secret.

Actual Behavior

No available sub-command to manage secrets.

Steps to Reproduce the Problem

Additional Info

created time in 21 days

issue commentgolang/go

cmd/go: allow proxy '@v/list' endpoint to indicate incompleteness?

This proxy behavior makes sense to me, but it takes a bit of unpacking.

If the repo was removed entirely, then it would probably be more helpful to serve the list of known versions, but serving an error won't break any existing users — existing users all have some explicit version already. However, if the repo was converted from public to private, the only “correct” behavior is to serve a 404 or 410 so that the go command will fall back to direct access (possibly with private, local credentials) and get the up-to-date version list.

Given the privacy properties of hosting services, the proxy cannot, in general, distinguish between removing a repo and making it private.

CC @katiehockman @heschik @hyangah @jayconrod @matloob

@bcmills I think in any case, an error should only be returns if proxy does not know anything about the module. Here at least one version v0.0.0-20151229125003-e54d722c3aff presents.

The use case for it is if I want to check a module exists in proxy or not.

cuonglm

comment created time in 22 days

issue openedgolang/go

proxy.golang.org: can not get list of version if modules was removed

What version of Go are you using (go version)?

<pre> $ go version

</pre>

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

<details><summary><code>go env</code> Output</summary><br><pre> $ go env

</pre></details>

What did you do?

$ curl https://proxy.golang.org/github.com/belogik/goes/@v/list
not found: github.com/belogik/goes@latest: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/0c31a160b38443d5e33ca2a5e60e51734d83293b66dc3d9b0c12699f8d2b5cec: exit status 128:
	fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.

What did you expect to see?

List of available versions.

What did you see instead?

Error.

The reason seems due to github.com/belogik/goes was recently removed by the author. If I query for specific version, proxy still returns the result.

$ curl https://proxy.golang.org/github.com/belogik/goes/@v/v0.0.0-20151229125003-e54d722c3aff.info
{"Version":"v0.0.0-20151229125003-e54d722c3aff","Time":"2015-12-29T12:50:03Z"}

created time in 22 days

issue commentgolang/go

Internal compiler error when trying to compare two imaginary literals

Duplicated of https://github.com/golang/go/issues/32723

cfhay

comment created time in 23 days

issue commentgolang/go

cmd/compile: confusing error message for 'a == x && b = y'

Seems not worth to fix as pointing out by @griesemer in https://github.com/golang/go/issues/23385

josharian

comment created time in 23 days

issue commentgolang/go

cmd/compile: confusing error message for 'a == x && b = y'

@josharian This is probably a simple fix for binary op:

diff --git a/src/cmd/compile/internal/syntax/parser.go b/src/cmd/compile/internal/syntax/parser.go
index f3c2c60ec8..ae26c4a396 100644
--- a/src/cmd/compile/internal/syntax/parser.go
+++ b/src/cmd/compile/internal/syntax/parser.go
@@ -1888,7 +1888,12 @@ done:
                // further confusion.
                str := String(s)
                if as, ok := s.(*AssignStmt); ok && as.Op == 0 {
-                       str = "assignment " + str
+                       prefix := "assignment "
+                       if lhs, ok := as.Lhs.(*Operation); ok && lhs.Y != nil {
+                               as.Lhs = lhs.Y
+                               str = String(as)
+                       }
+                       str = prefix + str
                }
                p.syntaxError(fmt.Sprintf("%s used as value", str))
        }

not sure it's applied for unary op or not 🤔

josharian

comment created time in 24 days

issue commentgolang/go

cmd/compile: confusing error message for 'a == x && b = y'

It seems that the parser think the LHS of assignment is a == "a" && b and the RHS is b.

josharian

comment created time in 24 days

starteda-schaefers/systemE

started time in a month

pull request commentgo-gitea/gitea

Add bucket storage support

How about to improve the docs about visit s3 with tokens?

Not sure it's worth, since when we point to go-cloud documentation for different cloud providers bucket syntax.

cuonglm

comment created time in a month

delete branch herdius/herdius-core

delete branch : feature/atomicicy-lock-redeem-tx

delete time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha bf293fe6d80ce00c5cc5e0b41aadf9b8dea1b294

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha 13bb30bc92281ebbcdc747a852f017be03b547ba

tx,supervisor: move verify tx signature to a function

view details

Cuong Manh Le

commit sha 519f75ca086b879dd66707864a8790f360cae8a0

Merge pull request #213 from herdius/feature/atomicicy-lock-redeem-tx Feature/atomicicy lock redeem tx

view details

push time in a month

PR merged herdius/herdius-core

Reviewers
Feature/atomicicy lock redeem tx

Problem

Notion Link: https://www.notion.so/herdius/b081bd4254c14b1eb2ada917ce4ef406?v=7fec7434ea0849afa3c4db6676e9eb76&p=76b23d3b43124a239b0381714b277c49

We must verify tx in HDKM-API before sending it to herdius-core.

Solution

Make verify tx signature a function so we can re-use it in other places.

Testing Done and Results

Passed.

Follow-up Work Needed

Update HDKM-API to use this function.

+60 -53

0 comment

6 changed files

cuonglm

pr closed time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha bf293fe6d80ce00c5cc5e0b41aadf9b8dea1b294

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha 13bb30bc92281ebbcdc747a852f017be03b547ba

tx,supervisor: move verify tx signature to a function

view details

push time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha 5e5c5c2649d7ac81626c16257936e8c910a9c642

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha 39a4562e8d895064b152df0c09640dfd569c276e

tx,supervisor: move verify tx signature to a function

view details

push time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha 33af031c0ccad6fb66dbf8ccc37225b397c2ba15

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha cc87b2d703b6033cf70c17c0940620903935edb4

tx,supervisor: move verify tx signature to a function

view details

push time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha 6f6b59a805d91c1283a5dd6fa59c13f5ffb792d1

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha df9c1078221c85822cc6d8ff7d3ab0c04545caa1

tx,supervisor: move verify tx signature to a function

view details

push time in a month

push eventherdius/herdius-core

Cuong Manh Le

commit sha 2a037100764cf5b7b8db746c93fca6c5eee91231

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha 6efc3cc46a9e0d8e78f47d892b901821d55d23dd

tx,supervisor: move verify tx signature to a function

view details

push time in a month

push eventherdius/herdius-core

Lingraj Mahanand

commit sha 43064742520aed919230b374c22e21e771bc95e0

Balance credit during defi redeem

view details

Lingraj Mahanand

commit sha 009cc75884fd6fbde4966ff53c27b2991768a1a3

Balance debit during mint

view details

Lingraj Mahanand

commit sha 1b4b705b946ff268c3de7eaf1b6d0af3f26d46aa

Merge pull request #210 from herdius/reduce-logs Reduce logs

view details

Lingraj Mahanand

commit sha b82e91a1e3c77db387c84ae505fe0d34904e45fe

Corda and Fabric integration

view details

Lingraj Mahanand

commit sha 9ee4eb79902b619a50596c3cd11a41f837d0af5d

review comment change

view details

Lingraj Mahanand

commit sha f0ec9c099d235d3d8ee58ec9190dd5d8c8f60682

Merge pull request #211 from herdius/reduce-logs Corda and Fabric integration

view details

Cuong Manh Le

commit sha eca973d8bcb867e3aa030911a4d62db6727fadb5

Change go tezos to v1.0.0 v1.0.9 was removed somehow.

view details

Cuong Manh Le

commit sha 848d428adfc3696f85f4ca4893238bf9398cebc4

tx,supervisor: move verify tx signature to a function

view details

push time in a month

PR opened herdius/herdius-core

Reviewers
Feature/atomicicy lock redeem tx

Problem

Notion Link: https://www.notion.so/herdius/b081bd4254c14b1eb2ada917ce4ef406?v=7fec7434ea0849afa3c4db6676e9eb76&p=76b23d3b43124a239b0381714b277c49

We must verify tx in HDKM-API before sending it to herdius-core.

Solution

Make verify tx signature a function so we can re-use it in other places.

Testing Done and Results

Passed.

Follow-up Work Needed

Update HDKM-API to use this function.

+50 -44

0 comment

5 changed files

pr created time in a month

create barnchherdius/herdius-core

branch : feature/atomicicy-lock-redeem-tx

created branch time in a month

pull request commentgo-gitea/gitea

Add bucket storage support

Please resolve the conflicts.

Done

Oops! One more conflict appeared. 😅

Fixed

cuonglm

comment created time in a month

push eventpatcito/gitea

Lunny Xiao

commit sha d92781bf941972761177ac9e07441f8893758fd3

Refactor repository check and sync functions (#9854) Move more general repository functions out of models/repo.go

view details

zeripath

commit sha d730725e5cb87f895e057a6fa536755cb5024fcd

fix broken link (#9901) Co-authored-by: Lauris BH <lauris@nix.lv>

view details

David Svantesson

commit sha 9bc841353464049080a5bd0fffa433fd8ba09930

Add documentation how to render PlantUML in code blocks. (#9894) * Add documentation how to render plantuml in code blocks. * Review comments * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>

view details

GiteaBot

commit sha e7322a1138ec0285091abbfc51e3ac1d47ae0fb2

[skip ci] Updated translations via Crowdin

view details

Masudur Rahman

commit sha a7816e434fd20a1288e8077c1d73f1771fae6e18

Add Bucket Storage Support for files Signed-off-by: Masudur Rahman <masud@appscode.com>

view details

Masudur Rahman

commit sha 6684ff78f505cc9729e5131e16b6542f7ebfa42e

Fix fw.Clowe()

view details

Cuong Manh Le

commit sha d31e562e53945b11774140ca29160728265e7dd0

Add integrations test for s3

view details

Cuong Manh Le

commit sha e45b398d29d493b835fd34d3d5b628ed9abfe2ec

Checking error return by *blob.Writer The Write is only guaranteed to have succeeded if Close returns no error.

view details

Cuong Manh Le

commit sha 05e8c89218578f88b3ccca27ca0c267ae4c38c82

Fix wrong syntax in .drone.yml

view details

Cuong Manh Le

commit sha 33284241669ffd8fb0a2830bca6bab250dd33cad

Add gcp test

view details

Cuong Manh Le

commit sha fca36219afbd8e1f4a2e537abe7237e9b29b4dea

Fix GCP test

view details

Cuong Manh Le

commit sha d7c5d829456fd7642420862129aee91bfa5a30d8

Bump cloud.google.com/go/storage to v1.4.0 This is necessary for testing client without authentication.

view details

Cuong Manh Le

commit sha 799f3bf91208b7536f50b281d4eec29923bcb62e

Make fake gcs server serves HTTP

view details

Cuong Manh Le

commit sha d756c18a4ac76acd29a5c83f3840552d6ce5b82b

Temporary pin gocloud.dev to 61f2150e3d63fcb3adf1b63fc3b7b3ae142dbea9 To get the change to test gcp.

view details

Cuong Manh Le

commit sha d6a747dcc81f863070b9f3563d6a5a85154cd807

Fix test-gcp - Use the right public-host for fake-gcs-server - Running TestGit in separated command to prevent using all available ports of the container.

view details

Cuong Manh Le

commit sha 7bec813c5bd58590c8871893a169649c981a4a6e

modules/lfs: do not mask Verify error ContentStore.Verify always return non-nil error, which seems to be wrong behavior. In case error occured, we should return instead of masking it like current behavior.

view details

Cuong Manh Le

commit sha 63de58456e41f1d75b44061f4aad0abb4c77b213

Reduce LFS big size when testing GCP GCS client calls are asynchronous, with large upload files, it causes the CI container run out of resources quickly.

view details

Cuong Manh Le

commit sha c26ac9783ffc243432e003afe6eaf2f4005a9f73

modules/storage: do not fatal when failed to create local file We should not exit gitea if we can not create local file, just return the error to the caller instead.

view details

Cuong Manh Le

commit sha 810d90faee33ea5954816ceab25100417456ca67

cmd,modules/storage: add storage migration command This PR adds subcommand "storage-migrate" command to allow migration from local to cloud storage and vice versa. To migrate from local to cloud: gitea storage-migrate --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' To migrate from cloud to local: gitea storage-migrate --local --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' Absolute paths are not supported, since when storage.OpenBucket always assumes local path if the path is absolute.

view details

Cuong Manh Le

commit sha 8f88aa34984d204208e1f9a2dbfbd8282584cd6f

modules/storage: add wrapper for creating FileStorage objects

view details

push time in a month

pull request commentgo-gitea/gitea

Add bucket storage support

Please resolve the conflicts.

Done

cuonglm

comment created time in a month

push eventpatcito/gitea

Lunny Xiao

commit sha d32eac44b16c7b3320b586f402621de84fafa185

Move RepoWorkingPool to services/repository package (#9754) * Move RepoWorkingPool to services/repository package * Make repoWorkingPool private Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>

view details

GiteaBot

commit sha 324672106bfd775d61eb7d8baabe63ed45393e53

[skip ci] Updated translations via Crowdin

view details

Antoine GIRARD

commit sha 203e063846f7d79860b702e9776b15fef6c6266a

ci: move some integration tests on arm64 (#9747)

view details

GiteaBot

commit sha 7e44995a5129f27182e42ed6b290dbb45a302f57

[skip ci] Updated translations via Crowdin

view details

techknowlogick

commit sha 6b1fa1235904947187266789b204f19bc03872be

use arm drone agent for docs (#9776)

view details

zeripath

commit sha 66ee9b87f9aaabef836ec72bfaf8032b359b29c1

Add require signed commit for protected branch (#9708) * Add require signed commit for protected branch * Fix fmt * Make editor show if they will be signed * bugfix * Add basic merge check and better information for CRUD * linting comment * Add descriptors to merge signing * Slight refactor * Slight improvement to appearances * Handle Merge API * manage CRUD API * Move error to error.go * Remove fix to delete.go * prep for merge * need to tolerate \r\n in message * check protected branch before trying to load it * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * fix commit-reader Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>

view details

Bagas Sanjaya

commit sha 3f1e062d216a444cce3004623338833543f05b1f

err_admin_name_pattern_not_allowed String Clarification (#9731) * err_admin_name_pattern_not_allowed clarification edit * Apply suggestion from @zeripath Context: username that provided as admin Co-Authored-By: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>

view details

GiteaBot

commit sha 4e566df1c694e47908e59a6db163e5a98d144b83

[skip ci] Updated translations via Crowdin

view details

Lunny Xiao

commit sha 2b3e931cde3e3d70b69202164f35fc6f2c609ade

Migrate reactions when migrating repository from github (#9599) * Migrate reactions when migrating repository from github * fix missed sleep * fix tests * update reactions when external user binding * Fix test * fix tests * change the copy head * fix test * fix migrator add/delete reaction

view details

GiteaBot

commit sha 3ac79b7101f8d84eab1c956676b39b9709cd6a51

[skip ci] Updated translations via Crowdin

view details

David Svantesson

commit sha f162a3260430f35864b346892dee4cea150f4442

Fix #9662 (#9767) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

view details

Lunny Xiao

commit sha 9343d2fc857e884180e03c7f42767302cec0f06d

Fix missing msteam webhook on organization (#9781)

view details

zeripath

commit sha e7923c4bc06ecf887a9405e9c7cc8e7e482762d4

Fix missing unlock in uniquequeue (#9790)

view details

6543

commit sha 665d7e91a8e1194c5273d969d5f0db5aa4d8cddc

Fix signing info on PR view if not signed in (#9788)

view details

silverwind

commit sha 8716752d22778048a067f1603105e1ae7f2c6049

update supported browsers and add a few more (#9734) Now includes Firefox ESR, Opera and a few more browser with usages between 0.5% and 1%. defaults resolves to > 0.5%, last 2 versions, Firefox ESR, not dead. Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

view details

John Olheiser

commit sha 176e7fb5d54aff955eef863f62cc232eaf8eb590

Fix push-to-create (#9772) * Fix push-to-create Signed-off-by: jolheiser <john.olheiser@gmail.com> * Check URL path and service Signed-off-by: jolheiser <john.olheiser@gmail.com> * Send dummy payload on receive-pack GET Signed-off-by: jolheiser <john.olheiser@gmail.com> * The space was actually a NUL byte Signed-off-by: jolheiser <john.olheiser@gmail.com> * Use real bare repo instead of manufactured payload Signed-off-by: jolheiser <john.olheiser@gmail.com>

view details

6543

commit sha 3ae5f8ef1118eba999f055267f3a2d9a01e77343

[Docs] Update Feature 'Reject unsigned commits' (#9793) * update docs * add link to feature

view details

Damien Cassou

commit sha c6a32ddb4708638e32bdc86b16339b9c0621c9c3

Update go-org to 0.1.9 (#9782) * Update go-org to 0.1.9 What I did to generate this commit: $ go get github.com/niklasfasching/go-org * make vendor

view details

Moritz

commit sha f740943df4fab9c50eb44261569eb4366447c93e

Fix markdown anchor links (#9673) Co-authored-by: Lauris BH <lauris@nix.lv>

view details

Lunny Xiao

commit sha dbd89acf980d7ab9f28cdcd33657a9699e65f52d

Remove unnecessary permissions load (#9796) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net>

view details

push time in a month

fork cuonglm/aktion

Translates GitHub Actions into Tekton and Knative Objects

https://triggermesh.com

fork in a month

fork cuonglm/aktion

Translates GitHub Actions into Tekton and Knative Objects

https://triggermesh.com

fork in a month

push eventcuonglm/cuonglm.xyz

Cuong Manh Le

commit sha 779ab43b6248a95b5680460f3fe5c515bb0685de

static: update resume

view details

push time in a month

push eventcuonglm/dot_config_file

Cuong Manh Le

commit sha 69a0c1f31c96efa959bf80ff433dccbc1317a5ba

add settings for Rust

view details

push time in a month

push eventpatcito/gitea

Masudur Rahman

commit sha 97e409607fe513a5a64565d05351522a5819074b

Add Bucket Storage Support for files Signed-off-by: Masudur Rahman <masud@appscode.com>

view details

Masudur Rahman

commit sha 54aff3ae8ff7e10eb9f0764e15d1752be5067381

Fix fw.Clowe()

view details

Cuong Manh Le

commit sha 9acb145d0d702c800ee552802079e59f1c96df84

Add integrations test for s3

view details

Cuong Manh Le

commit sha ca21955cd1b3e2710ab1cb2b47f9b77ea8c56f8e

Checking error return by *blob.Writer The Write is only guaranteed to have succeeded if Close returns no error.

view details

Cuong Manh Le

commit sha 4204cb2f07dc4cfe1c971769d0d6adde6d46bb3f

Fix wrong syntax in .drone.yml

view details

Cuong Manh Le

commit sha cfb5b551fd6575781af02203eb03f2da82636448

Add gcp test

view details

Cuong Manh Le

commit sha 49a17aafa205cbd97b5d0b7ddcca1fafae59882b

Fix GCP test

view details

Cuong Manh Le

commit sha 86c243295b5220b1a07cac7c0a7661d315f4d0df

Bump cloud.google.com/go/storage to v1.4.0 This is necessary for testing client without authentication.

view details

Cuong Manh Le

commit sha f05af3f6ef4ca2225a0a12bdb4b792a0d79f58dc

Make fake gcs server serves HTTP

view details

Cuong Manh Le

commit sha 493c5b6f84417454c1d58421954556ad92437a34

Temporary pin gocloud.dev to 61f2150e3d63fcb3adf1b63fc3b7b3ae142dbea9 To get the change to test gcp.

view details

Cuong Manh Le

commit sha b88794ba3b7c845c51948e5bbd6fc63e09dd6c55

Fix test-gcp - Use the right public-host for fake-gcs-server - Running TestGit in separated command to prevent using all available ports of the container.

view details

Cuong Manh Le

commit sha edeb07f94d74cd18c4485aa4ab04ad005b61cb32

modules/lfs: do not mask Verify error ContentStore.Verify always return non-nil error, which seems to be wrong behavior. In case error occured, we should return instead of masking it like current behavior.

view details

Cuong Manh Le

commit sha 56e4f41caef5227061588baf05a6b1751476f1d2

Reduce LFS big size when testing GCP GCS client calls are asynchronous, with large upload files, it causes the CI container run out of resources quickly.

view details

Cuong Manh Le

commit sha ee232870b311f61f853e320c32883aaf4cb1c7c6

modules/storage: do not fatal when failed to create local file We should not exit gitea if we can not create local file, just return the error to the caller instead.

view details

Cuong Manh Le

commit sha a57cb68f0cfc995b8eb3e4163baf0a8bb7e7742f

cmd,modules/storage: add storage migration command This PR adds subcommand "storage-migrate" command to allow migration from local to cloud storage and vice versa. To migrate from local to cloud: gitea storage-migrate --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' To migrate from cloud to local: gitea storage-migrate --local --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' Absolute paths are not supported, since when storage.OpenBucket always assumes local path if the path is absolute.

view details

Cuong Manh Le

commit sha bf575dd88ac1e902d1eec5f02cc675c46d8d7946

modules/storage: add wrapper for creating FileStorage objects

view details

Cuong Manh Le

commit sha b80584c176fa38e548deeb347eb3b9c7372c69b8

models,modules,services: migrate all attachments usage to FileStorage

view details

Cuong Manh Le

commit sha a2d8d125db4487513f167adf236c64c1b700d9a3

models: AttachmentBashPath -> BasePath

view details

Cuong Manh Le

commit sha 9c98a8e046394c5d9315a6a2adc18695e191bf95

models: remove CustomAvatarPath

view details

Cuong Manh Le

commit sha 27f402deda2de8e98fd7c7f7b86e1edfeac4aa20

models/migratios: change avatar migrations to use storage

view details

push time in a month

pull request commentgo-gitea/gitea

Add bucket storage support

The two files options/gitignore/JBoss and another one should be reverted.

Done

cuonglm

comment created time in a month

Pull request review commentgo-gitea/gitea

Add bucket storage support

 func (a *Attachment) APIFormat() *api.Attachment { 	} } -// AttachmentLocalPath returns where attachment is stored in local file-// system based on given UUID.-func AttachmentLocalPath(uuid string) string {-	return path.Join(setting.AttachmentPath, uuid[0:1], uuid[1:2], uuid)+// AttachmentBasePath returns the base path of attachment in storage.+func AttachmentBasePath(uuid string) string {

@lunny what's exactly need to be changed? you mean the function/method name or the return value?

cuonglm

comment created time in a month

issue commentgolang/go

Invalid garbage collection of structure pointers.

uintptr is not considered as pointer so converting uintptr field to unsafe.Pointer is not allowed in vet tools. Objects allocated on the stack may be re-allocated in stack expansion, and uintptrs will not be updated to new addresses. Check unsafe.Pointer's doc for more details: https://golang.org/pkg/unsafe/#Pointer

But how come this affects the contents of the allocated Buf []byte within NewAlignmentBuffer ? I cast over that byte array specifically to do so on an object which is not a uintptr, not unsafe and that it's explicitly kept around. This is what confuses me.

Because you did invalid unsafe.Pointer arithmetic, the result can lead to invalid memory the pointer points to.

abarisani

comment created time in a month

issue commentgolang/go

Invalid garbage collection of structure pointers.

With tip and upcoming go1.14, you can try:

go build -gcflags=all=-d=checkptr main.go

Then run:

./main
building
fatal error: checkptr: unsafe pointer arithmetic

goroutine 1 [running]:
runtime.throw(0x10e9146, 0x23)
	/Users/cuonglm/sources/go/src/runtime/panic.go:1112 +0x72 fp=0xc00009a9d0 sp=0xc00009a9a0 pc=0x102e922
runtime.checkptrArithmetic(0xc0000b8000, 0x0, 0x0, 0x0)
	/Users/cuonglm/sources/go/src/runtime/checkptr.go:41 +0xb5 fp=0xc00009aa00 sp=0xc00009a9d0 pc=0x1005ae5
main.buildDTD(0x0, 0x1, 0x10e4600, 0xc00009acd8, 0x200, 0x200, 0x0, 0x9, 0x0)
	/Users/cuonglm/main.go:89 +0x74 fp=0xc00009aa40 sp=0xc00009aa00 pc=0x10ac464
main.main()
	/Users/cuonglm/main.go:115 +0xdc fp=0xc00009af88 sp=0xc00009aa40 pc=0x10ac6cc
runtime.main()
	/Users/cuonglm/sources/go/src/runtime/proc.go:203 +0x212 fp=0xc00009afe0 sp=0xc00009af88 pc=0x1030f72
runtime.goexit()
	/Users/cuonglm/sources/go/src/runtime/asm_amd64.s:1375 +0x1 fp=0xc00009afe8 sp=0xc00009afe0 pc=0x105b651

to see invalid unsafe.Pointer usage in your program.

abarisani

comment created time in a month

push eventpatcito/gitea

Cuong Manh Le

commit sha 2eaba71b223a36f74d5738d540ddd69f3d7e4e1c

Fix GCP test

view details

Cuong Manh Le

commit sha 4b7368e49ba7c903143d3a499ee2fa255dc94567

Bump cloud.google.com/go/storage to v1.4.0 This is necessary for testing client without authentication.

view details

Cuong Manh Le

commit sha 397bdb4ed76bb6d086233a0c50dc3c92a24da3f8

Make fake gcs server serves HTTP

view details

Cuong Manh Le

commit sha f866f5fef0997ec69769fcebc3ad586bdae010a7

Temporary pin gocloud.dev to 61f2150e3d63fcb3adf1b63fc3b7b3ae142dbea9 To get the change to test gcp.

view details

Cuong Manh Le

commit sha af24920ba01ec6a6d52bec6a4ea6c3175094b010

Fix test-gcp - Use the right public-host for fake-gcs-server - Running TestGit in separated command to prevent using all available ports of the container.

view details

Cuong Manh Le

commit sha dfa0b311844da34f60ab89d377fb57c9077d51c0

modules/lfs: do not mask Verify error ContentStore.Verify always return non-nil error, which seems to be wrong behavior. In case error occured, we should return instead of masking it like current behavior.

view details

Cuong Manh Le

commit sha 7bfb6cff687516e1854cec98c61ec31c169e38f9

Reduce LFS big size when testing GCP GCS client calls are asynchronous, with large upload files, it causes the CI container run out of resources quickly.

view details

Cuong Manh Le

commit sha 306c5f1c9e0a81d0b13c00b4a7e97f07bbf57ea1

modules/storage: do not fatal when failed to create local file We should not exit gitea if we can not create local file, just return the error to the caller instead.

view details

Cuong Manh Le

commit sha 32a1f858e2b204dde550b4c4233851133fc53410

cmd,modules/storage: add storage migration command This PR adds subcommand "storage-migrate" command to allow migration from local to cloud storage and vice versa. To migrate from local to cloud: gitea storage-migrate --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' To migrate from cloud to local: gitea storage-migrate --local --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' Absolute paths are not supported, since when storage.OpenBucket always assumes local path if the path is absolute.

view details

Cuong Manh Le

commit sha e0c0c101cf49906cf487d213cf577dd6a4766329

modules/storage: add wrapper for creating FileStorage objects

view details

Cuong Manh Le

commit sha 05eb68d47a1fa3466836879e55021701798b75d6

models,modules,services: migrate all attachments usage to FileStorage

view details

Cuong Manh Le

commit sha c331d80b815d333a66a7c0ad728c0dac2da6c2d2

models: AttachmentBashPath -> BasePath

view details

Cuong Manh Le

commit sha 230856225080fb84c9f6dd7d0fa450730ab9dcb7

models: remove CustomAvatarPath

view details

Cuong Manh Le

commit sha 6f90947c9f5ab5036fdbbe947c3a1a89a9f0a187

models/migratios: change avatar migrations to use storage

view details

Cuong Manh Le

commit sha 5affb547879d55e27b106174df934a70713b122c

inntegrations: use storage in TestGetAttachment

view details

Cuong Manh Le

commit sha 8f9c0b5096e21750e41a39244eb523382774aad9

modules/migrations: wrap download attachment in closure To make sure response body is closed immediately.

view details

Cuong Manh Le

commit sha df4a49a504e554a836fba4fbc24c07dc54a2da64

modules,routers: add missing copyright, remove un-necessary file

view details

push time in a month

push eventpatcito/gitea

Cuong Manh Le

commit sha c4b8a5509e2459330d958381a0d740f82880f074

Add integrations test for s3

view details

Cuong Manh Le

commit sha b900eb9745fd4aef116de97cd4e29a48d60608ba

Checking error return by *blob.Writer The Write is only guaranteed to have succeeded if Close returns no error.

view details

Cuong Manh Le

commit sha 1ba98545155d0691f7940e4815c80ff5300b7194

Fix wrong syntax in .drone.yml

view details

Cuong Manh Le

commit sha 1dd3cb3ebdd4cee921c9096dfaf96ce73de98439

Add gcp test

view details

Cuong Manh Le

commit sha 779025ce1eff5c59585112b038b28ce87e184739

Fix GCP test

view details

Cuong Manh Le

commit sha 7c6e3705049c97da8ab5ec338c6ec66cb7bfa711

Bump cloud.google.com/go/storage to v1.4.0 This is necessary for testing client without authentication.

view details

Cuong Manh Le

commit sha aba58cb6a3588882c47a556ed283ac37a186d23f

Make fake gcs server serves HTTP

view details

Cuong Manh Le

commit sha 22aa6fb6a76104e5229ee83b556aaf8faac85572

Temporary pin gocloud.dev to 61f2150e3d63fcb3adf1b63fc3b7b3ae142dbea9 To get the change to test gcp.

view details

Cuong Manh Le

commit sha b6cb49aa7c97a49701545d6b8c924de0f7e86ac1

Fix test-gcp - Use the right public-host for fake-gcs-server - Running TestGit in separated command to prevent using all available ports of the container.

view details

Cuong Manh Le

commit sha 79f90c58119f9d52e186020589431a64fa88f315

modules/lfs: do not mask Verify error ContentStore.Verify always return non-nil error, which seems to be wrong behavior. In case error occured, we should return instead of masking it like current behavior.

view details

Cuong Manh Le

commit sha 08df75d66d3b2e9e7af716d1590e2f559009da52

Reduce LFS big size when testing GCP GCS client calls are asynchronous, with large upload files, it causes the CI container run out of resources quickly.

view details

Cuong Manh Le

commit sha 64c8fd43c700d894ce24db6bde3c9af46747071c

modules/storage: do not fatal when failed to create local file We should not exit gitea if we can not create local file, just return the error to the caller instead.

view details

Cuong Manh Le

commit sha b14b03d3517070415eab132ab140a371fb7b56bb

cmd,modules/storage: add storage migration command This PR adds subcommand "storage-migrate" command to allow migration from local to cloud storage and vice versa. To migrate from local to cloud: gitea storage-migrate --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' To migrate from cloud to local: gitea storage-migrate --local --bucket='s3://gitea?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true&region=us-east-1' Absolute paths are not supported, since when storage.OpenBucket always assumes local path if the path is absolute.

view details

Cuong Manh Le

commit sha ba0c11632120ad8df0f9a66104b13566bf69dc93

modules/storage: add wrapper for creating FileStorage objects

view details

Cuong Manh Le

commit sha e14986f9e6f14bc8121043d3c81c511350d09a97

models,modules,services: migrate all attachments usage to FileStorage

view details

Cuong Manh Le

commit sha 9b21c06dfab120bddc21cbb41f75d251a16d244b

models: AttachmentBashPath -> BasePath

view details

Cuong Manh Le

commit sha c3f01577a579378503d7ac2d46721f5b2e43b60d

models: remove CustomAvatarPath

view details

Cuong Manh Le

commit sha 0585a2f8f051a4e5c29c1b200350d2eae9721543

models/migratios: change avatar migrations to use storage

view details

Cuong Manh Le

commit sha 8bb630883e252901dad67f8b9c028db453e669f1

inntegrations: use storage in TestGetAttachment

view details

Cuong Manh Le

commit sha 205e4433c17a440112c6f7681b9b8c31cd239b9e

modules/migrations: wrap download attachment in closure To make sure response body is closed immediately.

view details

push time in a month

push eventpatcito/gitea

6543

commit sha 7e4f490482014fa52d15902b5aa20952461c64f4

[Docs] introduce "make help" (#9604) * introduce "make help" * fix + add more routienes * Update Makefile * add make vet Co-authored-by: techknowlogick <matti@mdranta.net>

view details

6543

commit sha 133ae18b61c5d3bdfc7670b8320abe84dd96cbe2

[BugFix] Hide public repos owned by private orgs (#9609) * Restrict AllPublic to actually public repos. * Add new parameter to add in AllLimited Repos

view details

zeripath

commit sha 2a1cf5bae975e59cb27a74cbe443d25ba329145c

Add some padding to the shadowed comment box (#9612) * Add some padding to the shadowed comment box * prevent the padding affecting the other comments

view details

6543

commit sha bcac7cb9342e17bdb80028f342fb911dcb854c25

fix swagger description of reaction API (#9617)

view details

Timon Engelke

commit sha abc0f53539e3b96dd73c80615fc5409758cc028f

Add a /user/login landing page option (#9622) * Add a /user/login landing page option * Add test case for login landing page

view details

GiteaBot

commit sha 5749b26cdd017869d1c78c5bce0a43fa7e46945b

[skip ci] Updated translations via Crowdin

view details

8ctopus

commit sha 143f88d9757303dc742102b0f4cba5bff6143d63

More extensive robots.txt docs (#9566)

view details

GiteaBot

commit sha f71e1c8e796b099f4634bcd358e48189a97dcbad

[skip ci] Updated translations via Crowdin

view details

zeripath

commit sha 62eb1b0f2530a5ae1ce9b729378c0c8066174215

Graceful Queues: Issue Indexing and Tasks (#9363) * Queue: Add generic graceful queues with settings * Queue & Setting: Add worker pool implementation * Queue: Add worker settings * Queue: Make resizing worker pools * Queue: Add name variable to queues * Queue: Add monitoring * Queue: Improve logging * Issues: Gracefulise the issues indexer Remove the old now unused specific queues * Task: Move to generic queue and gracefulise * Issues: Standardise the issues indexer queue settings * Fix test * Queue: Allow Redis to connect to unix * Prevent deadlock during early shutdown of issue indexer * Add MaxWorker settings to queues * Merge branch 'master' into graceful-queues * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/indexer/issues/indexer.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Update modules/queue/queue_disk.go * Update modules/queue/queue_disk_channel.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Rename queue.Description to queue.ManagedQueue as per @guillep2k * Cancel pool workers when removed * Remove dependency on queue from setting * Update modules/queue/queue_redis.go Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * As per @guillep2k add mutex locks on shutdown/terminate * move unlocking out of setInternal * Add warning if number of workers < 0 * Small changes as per @guillep2k * No redis host specified not found * Clean up documentation for queues * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md * Update modules/indexer/issues/indexer_test.go * Ensure that persistable channel queue is added to manager * Rename QUEUE_NAME REDIS_QUEUE_NAME * Revert "Rename QUEUE_NAME REDIS_QUEUE_NAME" This reverts commit 1f83b4fc9b9dabda186257b38c265fe7012f90df. Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

view details

GiteaBot

commit sha c88f0fed360516715053b17ef30087fca2e892c0

[skip ci] Updated translations via Crowdin

view details

zeripath

commit sha 0d515474b81f39bfafae8cdee4aed27277297308

Remove stray printf (#9631)

view details

GiteaBot

commit sha b6fa229dcfbe4ad64fe758ef92abaf7a80e6f700

[skip ci] Updated translations via Crowdin

view details

6543

commit sha 940636863370855f39688ddf0aae41667ac8935c

Fix Issue Unsubscription (#9634)

view details

zeripath

commit sha e5d8e2d10c6798e57ac855f71b025b087b664799

Branches not at ref commit ID should not be listed as Merged (#9614) Once a branch has been merged if the commit ID no longer equals that of the pulls ref commit id don't offer to delete the branch on the pull screen and don't list it as merged on branches. Fix #9201 When looking at the pull page we should also get the commits from the refs/pulls/x/head Fix #9158

view details

Lunny Xiao

commit sha b9309e52f0b08a554107d888029d62f9b7904ca0

Move wiki related funtions from models to services/wiki (#9355) * Move wiki related funtions from models to services/wiki

view details

Shashvat Kedia

commit sha 1e9b3d4743dc3b1726470a2316b7608427ec5635

Fix #9530: admin auth list make readable and admin auth delete bug fix (#9628)

view details

David Svantesson

commit sha c181070f9e538e295134bf3a798dc45862810726

Repository teams - disable remove button when have access to all (#9640) Co-authored-by: zeripath <art27@cantab.net>

view details

6543

commit sha bb4476908d53f247024e1647c59a259922a5d031

Changelog for 1.11.0-RC1 (#9636) * generated Changelog * cormat, sort, fix * teamwork :) Co-Authored-By: techknowlogick <matti@mdranta.net> Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * next() * Next() * add last change * as @jolheiser suggested * Apply suggestions from code review Co-Authored-By: techknowlogick <matti@mdranta.net> * Apply suggestions from code review * Update CHANGELOG.md * Update CHANGELOG.md Co-Authored-By: John Olheiser <42128690+jolheiser@users.noreply.github.com> * Update CHANGELOG.md Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * add bugfix + topic is plural * rest * Apply suggestions from code review * Apply suggestions from code review Co-Authored-By: techknowlogick <matti@mdranta.net> Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: John Olheiser <42128690+jolheiser@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>

view details

Matti R

commit sha fe2e812121dae629acc23188eb868025b1457d73

empty commit to start 1.12-dev

view details

techknowlogick

commit sha 8e132cd16a7ea2a3924663c854051e9aa519eb3c

Update date for new year (#9644)

view details

push time in a month

Pull request review commentfsouza/fake-gcs-server

fakestorage: add logging to server

 func NewServerWithOptions(options Options) (*Server, error) { 		return s, nil 	} -	s.ts = httptest.NewUnstartedServer(s.mux)+	s.ts = httptest.NewUnstartedServer(handlers.LoggingHandler(logrus.New().Writer(), s.mux))

@fsouza fixed

cuonglm

comment created time in a month

push eventcuonglm/fake-gcs-server

Cuong Manh Le

commit sha 2be1564d2812daa9134221bcb0ed6cab397a7af8

fakestorage: add logging to server

view details

push time in a month

Pull request review commentfsouza/fake-gcs-server

fakestorage: add logging to server

 func NewServerWithOptions(options Options) (*Server, error) { 		return s, nil 	} -	s.ts = httptest.NewUnstartedServer(s.mux)+	s.ts = httptest.NewUnstartedServer(handlers.LoggingHandler(logrus.New().Writer(), s.mux))

@fsouza Ah ok, just because I see we're using logrus already. My concern is that we can't pass the io.Writer via command line argument.

cuonglm

comment created time in a month

push eventcuonglm/fake-gcs-server

francisco souza

commit sha aec31b8250d1dcde9d6b08ea3b0ce835569a804a

internal/backend/fs: create rootDir on initialization Closes #114.

view details

francisco souza

commit sha c3fe37bd2c86a15148dcd86a32665bc3a619929f

github/workflows: use master version of upstream actions

view details

francisco souza

commit sha 0578798096a4afb5afbcc6d6306800825ca4304c

golangci: disable gomnd

view details

Cuong Manh Le

commit sha fe6c4b436ba3ba6f5f924ec24336a01828e756b6

Update example test to use NewServerWithOptions (#156)

view details

dependabot-preview[bot]

commit sha 00529994c037b56e9b8b5667881255a56dff193f

build(deps): bump golang from 1.13.5 to 1.13.6 (#162)

view details

francisco souza

commit sha 2f2defa8fdd4863bf09c53f09776af0e46e534e7

Bump go-cmp to 0.4.0

view details

dependabot-preview[bot]

commit sha 1d820bcb6c3b115eec321c4ab06cdd4215e85065

build(deps): bump google-cloud-storage in /examples/python (#158)

view details

dependabot-preview[bot]

commit sha e677d0ef25832c950de2724525886a653e09a8b1

build(deps): bump @google-cloud/storage in /examples/node (#157)

view details

Cuong Manh Le

commit sha 91e743c89a3df5a27657cf4b6a7e3ba836d568e7

fakestorage: add logging to server

view details

push time in a month

Pull request review commentfsouza/fake-gcs-server

fakestorage: add logging to server

 import ( 	"sync"  	"cloud.google.com/go/storage"-	"github.com/fsouza/fake-gcs-server/internal/backend"+	"github.com/gorilla/handlers" 	"github.com/gorilla/mux"+	"github.com/sirupsen/logrus" 	"google.golang.org/api/option"++	"github.com/fsouza/fake-gcs-server/internal/backend"

FIxed

cuonglm

comment created time in a month

push eventcuonglm/fake-gcs-server

Cuong Manh Le

commit sha 976bb2b4eed18e1a5e518c85b924d47f6cf53c55

fakestorage: add logging to server

view details

push time in a month

Pull request review commentfsouza/fake-gcs-server

fakestorage: add logging to server

 func NewServerWithOptions(options Options) (*Server, error) { 		return s, nil 	} -	s.ts = httptest.NewUnstartedServer(s.mux)+	s.ts = httptest.NewUnstartedServer(handlers.LoggingHandler(logrus.New().Writer(), s.mux))

@fsouza I think a bool flag is enough

cuonglm

comment created time in a month

Pull request review commentfsouza/fake-gcs-server

fakestorage: add logging to server

 func NewServerWithOptions(options Options) (*Server, error) { 		return s, nil 	} -	s.ts = httptest.NewUnstartedServer(s.mux)+	s.ts = httptest.NewUnstartedServer(handlers.LoggingHandler(logrus.New().Writer(), s.mux))

👍

cuonglm

comment created time in a month

delete branch cuonglm/fake-gcs-server

delete branch : cuonglm/update-example

delete time in a month

startedpornin/shabal

started time in 2 months

more