diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 077e68ba3989f..be33dcd2ff111 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -14,6 +14,10 @@ env: # Golang version to use across CI steps GOLANG_VERSION: '1.18' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: check-go: name: Ensure Go modules synchronicity diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 44f1a05d70185..ff8bd02cc4c2a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,6 +9,10 @@ on: schedule: - cron: '0 19 * * 0' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: CodeQL-Build: if: github.repository == 'argoproj/argo-cd' diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml index 99db85e7c7a7f..db9dd36234979 100644 --- a/.github/workflows/image.yaml +++ b/.github/workflows/image.yaml @@ -12,6 +12,10 @@ on: env: GOLANG_VERSION: '1.18' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: publish: if: github.repository == 'argoproj/argo-cd' diff --git a/applicationset/services/scm_provider/gitea.go b/applicationset/services/scm_provider/gitea.go index 15e8f1a9adbc1..971e92497b497 100644 --- a/applicationset/services/scm_provider/gitea.go +++ b/applicationset/services/scm_provider/gitea.go @@ -46,7 +46,10 @@ func NewGiteaProvider(ctx context.Context, owner, token, url string, allBranches func (g *GiteaProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error) { if !g.allBranches { - branch, _, err := g.client.GetRepoBranch(g.owner, repo.Repository, repo.Branch) + branch, status, err := g.client.GetRepoBranch(g.owner, repo.Repository, repo.Branch) + if status.StatusCode == 404 { + return nil, fmt.Errorf("got 404 while getting default branch %q for repo %q - check your repo config: %w", repo.Branch, repo.Repository, err) + } if err != nil { return nil, err } diff --git a/applicationset/services/scm_provider/gitea_test.go b/applicationset/services/scm_provider/gitea_test.go index e3992b3987371..c585aafe1a679 100644 --- a/applicationset/services/scm_provider/gitea_test.go +++ b/applicationset/services/scm_provider/gitea_test.go @@ -19,20 +19,20 @@ func TestGiteaListRepos(t *testing.T) { { name: "blank protocol", allBranches: false, - url: "git@gitea.com:gitea/go-sdk.git", - branches: []string{"master"}, + url: "git@gitea.com:test-argocd/pr-test.git", + branches: []string{"main"}, }, { name: "ssh protocol", allBranches: false, proto: "ssh", - url: "git@gitea.com:gitea/go-sdk.git", + url: "git@gitea.com:test-argocd/pr-test.git", }, { name: "https protocol", allBranches: false, proto: "https", - url: "https://gitea.com/gitea/go-sdk", + url: "https://gitea.com/test-argocd/pr-test", }, { name: "other protocol", @@ -43,14 +43,14 @@ func TestGiteaListRepos(t *testing.T) { { name: "all branches", allBranches: true, - url: "git@gitea.com:gitea/go-sdk.git", - branches: []string{"master", "release/v0.11", "release/v0.12", "release/v0.13", "release/v0.14", "release/v0.15"}, + url: "git@gitea.com:test-argocd/pr-test.git", + branches: []string{"main"}, }, } for _, c := range cases { t.Run(c.name, func(t *testing.T) { - provider, _ := NewGiteaProvider(context.Background(), "gitea", "", "https://gitea.com/", c.allBranches, false) + provider, _ := NewGiteaProvider(context.Background(), "test-argocd", "", "https://gitea.com/", c.allBranches, false) rawRepos, err := ListRepos(context.Background(), provider, c.filters, c.proto) if c.hasError { assert.NotNil(t, err) @@ -61,7 +61,7 @@ func TestGiteaListRepos(t *testing.T) { repos := []*Repository{} branches := []string{} for _, r := range rawRepos { - if r.Repository == "go-sdk" { + if r.Repository == "pr-test" { repos = append(repos, r) branches = append(branches, r.Branch) } diff --git a/ui/src/app/applications/components/utils.tsx b/ui/src/app/applications/components/utils.tsx index c8a78dd832b6d..49b868f4ccfb6 100644 --- a/ui/src/app/applications/components/utils.tsx +++ b/ui/src/app/applications/components/utils.tsx @@ -272,15 +272,16 @@ export const deletePopup = async (ctx: ContextApis, resource: ResourceTreeNode, onChange={() => handleStateChange('foreground')} defaultChecked={true} style={{marginRight: '5px'}} + id='foreground-delete-radio' /> - handleStateChange('force')} style={{marginRight: '5px'}} /> + handleStateChange('force')} style={{marginRight: '5px'}} id='force-delete-radio' /> - handleStateChange('orphan')} style={{marginRight: '5px'}} /> + handleStateChange('orphan')} style={{marginRight: '5px'}} id='cascade-delete-radio' />