Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/argoproj/argo-cd into ui-…
Browse files Browse the repository at this point in the history
…8598-show-sync-wave-in-ui
  • Loading branch information
ciiay committed Apr 27, 2022
2 parents 32b0569 + 5f0e58d commit 038fd98
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 4 additions & 1 deletion applicationset/services/scm_provider/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
16 changes: 8 additions & 8 deletions applicationset/services/scm_provider/gitea_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
Expand All @@ -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)
}
Expand Down
5 changes: 3 additions & 2 deletions ui/src/app/applications/components/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,16 @@ export const deletePopup = async (ctx: ContextApis, resource: ResourceTreeNode,
onChange={() => handleStateChange('foreground')}
defaultChecked={true}
style={{marginRight: '5px'}}
id='foreground-delete-radio'
/>
<label htmlFor='foreground-delete-radio' style={{paddingRight: '30px'}}>
Foreground Delete {helpTip('Deletes the resource and dependent resources using the cascading policy in the foreground')}
</label>
<input type='radio' name='deleteOptions' value='force' onChange={() => handleStateChange('force')} style={{marginRight: '5px'}} />
<input type='radio' name='deleteOptions' value='force' onChange={() => handleStateChange('force')} style={{marginRight: '5px'}} id='force-delete-radio' />
<label htmlFor='force-delete-radio' style={{paddingRight: '30px'}}>
Force Delete {helpTip('Deletes the resource and its dependent resources in the background')}
</label>
<input type='radio' name='deleteOptions' value='orphan' onChange={() => handleStateChange('orphan')} style={{marginRight: '5px'}} />
<input type='radio' name='deleteOptions' value='orphan' onChange={() => handleStateChange('orphan')} style={{marginRight: '5px'}} id='cascade-delete-radio' />
<label htmlFor='cascade-delete-radio'>Non-cascading (Orphan) Delete {helpTip('Deletes the resource and orphans the dependent resources')}</label>
</div>
</div>
Expand Down

0 comments on commit 038fd98

Please sign in to comment.