Skip to content

Commit

Permalink
Merge branch 'master' into fix-downtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhish2702 authored Jan 23, 2025
2 parents 39be2b5 + c10bf66 commit badc6e6
Show file tree
Hide file tree
Showing 17 changed files with 109 additions and 292 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/image-reuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
with:
cosign-release: 'v2.2.0'

- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0

- name: Setup tags for container image as a CSV type
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:

- name: Build and push container image
id: image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 #v6.10.0
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d #v6.12.0
with:
context: .
platforms: ${{ inputs.platforms }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
go-version: ${{ env.GOLANG_VERSION }}

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
Expand All @@ -107,7 +107,7 @@ jobs:
make manifests IMAGE_TAG=${{ github.ref_name }}
- name: Draft release
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v0.1.15
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v0.1.15
with:
tag_name: ${{ github.event.inputs.tag }}
draft: true
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
/tmp/sbom.tar.gz
- name: Upload SBOM and signature assets
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v0.1.15
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v0.1.15
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
run: |
go tool covdata textfmt -i=coverage-output-unit/,coverage-output-e2e/ -o full-coverage.out
- name: Upload code coverage information to codecov.io
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
with:
file: full-coverage.out
fail_ci_if_error: false
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@

<a name="v1.8.0-rc2"></a>
## [v1.8.0-rc2](https://github.com/argoproj/argo-rollouts/compare/v1.8.0-rc1...v1.8.0-rc2) (2024-12-17)

### Ci

* add testing for k8s 1.30 and 1.31 ([#3858](https://github.com/argoproj/argo-rollouts/issues/3858))

### Docs

* **analysis:** add docs for consecutiveSuccessLimit ([#3996](https://github.com/argoproj/argo-rollouts/issues/3996))

### Fix

* don't over reconcile on error ([#4005](https://github.com/argoproj/argo-rollouts/issues/4005))
* remove ReplicaSet write-back ([#4044](https://github.com/argoproj/argo-rollouts/issues/4044))
* **controller:** Fixed broken pprof links [#4037](https://github.com/argoproj/argo-rollouts/issues/4037) ([#4038](https://github.com/argoproj/argo-rollouts/issues/4038))
* **experiments:** move recorder event to after experiment reconciliation, fixes [#4021](https://github.com/argoproj/argo-rollouts/issues/4021) ([#4022](https://github.com/argoproj/argo-rollouts/issues/4022))

<a name="v1.8.0-rc1"></a>
## [v1.8.0-rc1](https://github.com/argoproj/argo-rollouts/compare/v1.7.2...v1.8.0-rc1) (2024-12-06)

Expand Down
2 changes: 2 additions & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit
1. [PagerDuty](https://www.pagerduty.com/)
1. [PayPal](https://www.paypal.com/)
1. [PayPay](https://paypay.ne.jp/)
1. [Plaid](https://plaid.com/)
1. [Priceline](https://priceline.com)
1. [Productboard](https://www.productboard.com)
1. [Quipper](https://www.quipper.com/)
Expand All @@ -52,6 +53,7 @@ Organizations below are **officially** using Argo Rollouts. Please send a PR wit
1. [Skillz](https://www.skillz.com)
1. [Spotify](https://www.spotify.com/)
1. [Synamedia](https://www.synamedia.com)
1. [Taboola](https://www.taboola.com)
1. [TBC Bank](https://tbcbank.ge/)
1. [Trustly](https://www.trustly.com/)
1. [Tuhu](https://www.tuhu.cn/)
Expand Down
17 changes: 7 additions & 10 deletions controller/profiling.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
package controller

import (
"fmt"
"net/http"
"net/http/pprof"
)

const (
ProfilingPath = "/debug/pprof"
)

// NewPProfServer returns a new pprof server to gather runtime profiling data
func NewPProfServer() *http.ServeMux {
mux := http.NewServeMux()

mux.HandleFunc(ProfilingPath, pprof.Index)
mux.HandleFunc(fmt.Sprintf("%s/cmdline", ProfilingPath), pprof.Cmdline)
mux.HandleFunc(fmt.Sprintf("%s/profile", ProfilingPath), pprof.Profile)
mux.HandleFunc(fmt.Sprintf("%s/symbol", ProfilingPath), pprof.Symbol)
mux.HandleFunc(fmt.Sprintf("%s/trace", ProfilingPath), pprof.Trace)
// TODO: Remove enumerating all pprof endpoints if/when a more ergonomic
// attachment solution is introduced. See: https://github.com/golang/go/issues/71213.
mux.HandleFunc("/debug/pprof/", pprof.Index)
mux.HandleFunc("/debug/pprof/cmdline/", pprof.Cmdline)
mux.HandleFunc("/debug/pprof/profile/", pprof.Profile)
mux.HandleFunc("/debug/pprof/symbol/", pprof.Symbol)
mux.HandleFunc("/debug/pprof/trace/", pprof.Trace)

return mux
}
17 changes: 16 additions & 1 deletion experiments/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"sync"
"time"

corev1 "k8s.io/api/core/v1"

log "github.com/sirupsen/logrus"
appsv1 "k8s.io/api/apps/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -318,6 +320,7 @@ func (ec *Controller) syncHandler(ctx context.Context, key string) error {
}

func (ec *Controller) persistExperimentStatus(orig *v1alpha1.Experiment, newStatus *v1alpha1.ExperimentStatus) error {
prevStatus := orig.Status
ctx := context.TODO()
logCtx := logutil.WithExperiment(orig)
patch, modified, err := diff.CreateTwoWayMergePatch(
Expand All @@ -336,15 +339,27 @@ func (ec *Controller) persistExperimentStatus(orig *v1alpha1.Experiment, newStat
return nil
}
logCtx.Debugf("Experiment Patch: %s", patch)
_, err = ec.argoProjClientset.ArgoprojV1alpha1().Experiments(orig.Namespace).Patch(ctx, orig.Name, patchtypes.MergePatchType, patch, metav1.PatchOptions{})
patched, err := ec.argoProjClientset.ArgoprojV1alpha1().Experiments(orig.Namespace).Patch(ctx, orig.Name, patchtypes.MergePatchType, patch, metav1.PatchOptions{})
if err != nil {
logCtx.Warningf("Error updating experiment: %v", err)
return err
}
logCtx.Info("Patch status successfully")
ec.recordEvent(patched, prevStatus, newStatus)
return nil
}

func (ec *Controller) recordEvent(ex *v1alpha1.Experiment, prevStatus v1alpha1.ExperimentStatus, newStatus *v1alpha1.ExperimentStatus) {
if prevStatus.Phase != newStatus.Phase {
eventType := corev1.EventTypeNormal
switch newStatus.Phase {
case v1alpha1.AnalysisPhaseError, v1alpha1.AnalysisPhaseFailed, v1alpha1.AnalysisPhaseInconclusive:
eventType = corev1.EventTypeWarning
}
ec.recorder.Eventf(ex, record.EventOptions{EventType: eventType, EventReason: "Experiment" + string(newStatus.Phase)}, "Experiment transitioned from %s -> %s", prevStatus.Phase, newStatus.Phase)
}
}

// enqueueIfCompleted conditionally enqueues the AnalysisRun's Experiment if the run is complete
func (ec *Controller) enqueueIfCompleted(obj any) {
run := unstructuredutil.ObjectToAnalysisRun(obj)
Expand Down
9 changes: 0 additions & 9 deletions experiments/experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ func (ec *experimentContext) ResolveAnalysisRunArgs(args []v1alpha1.Argument) ([
}

func (ec *experimentContext) calculateStatus() *v1alpha1.ExperimentStatus {
prevStatus := ec.newStatus.DeepCopy()
switch ec.newStatus.Phase {
case "":
ec.newStatus.Phase = v1alpha1.AnalysisPhasePending
Expand Down Expand Up @@ -568,14 +567,6 @@ func (ec *experimentContext) calculateStatus() *v1alpha1.ExperimentStatus {
}
}
ec.newStatus = calculateExperimentConditions(ec.ex, *ec.newStatus)
if prevStatus.Phase != ec.newStatus.Phase {
eventType := corev1.EventTypeNormal
switch ec.newStatus.Phase {
case v1alpha1.AnalysisPhaseError, v1alpha1.AnalysisPhaseFailed, v1alpha1.AnalysisPhaseInconclusive:
eventType = corev1.EventTypeWarning
}
ec.recorder.Eventf(ec.ex, record.EventOptions{EventType: eventType, EventReason: "Experiment" + string(ec.newStatus.Phase)}, "Experiment transitioned from %s -> %s", prevStatus.Phase, ec.newStatus.Phase)
}
return ec.newStatus
}

Expand Down
30 changes: 15 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ require (
github.com/antonmedv/expr v1.15.5
github.com/argoproj/notifications-engine v0.4.1-0.20240219110818-7a069766e954
github.com/argoproj/pkg v0.13.6
github.com/aws/aws-sdk-go-v2 v1.32.6
github.com/aws/aws-sdk-go-v2/config v1.28.6
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.3
github.com/aws/aws-sdk-go-v2 v1.33.0
github.com/aws/aws-sdk-go-v2/config v1.29.0
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.43.8
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.31.3
github.com/aws/smithy-go v1.22.1
github.com/blang/semver v3.5.1+incompatible
Expand All @@ -24,7 +24,7 @@ require (
github.com/juju/ansiterm v1.0.0
github.com/machinebox/graphql v0.2.2
github.com/mitchellh/mapstructure v1.5.0
github.com/newrelic/newrelic-client-go/v2 v2.51.3
github.com/newrelic/newrelic-client-go/v2 v2.52.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_model v0.6.1
Expand All @@ -38,10 +38,10 @@ require (
github.com/stretchr/testify v1.10.0
github.com/tj/assert v0.0.3
github.com/valyala/fasttemplate v1.2.2
golang.org/x/oauth2 v0.24.0
golang.org/x/oauth2 v0.25.0
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53
google.golang.org/grpc v1.69.0
google.golang.org/protobuf v1.36.0
google.golang.org/grpc v1.69.4
google.golang.org/protobuf v1.36.3
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.29.3
k8s.io/apiextensions-apiserver v0.29.3
Expand Down Expand Up @@ -81,17 +81,17 @@ require (
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
github.com/aws/aws-sdk-go v1.44.116 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.47 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.53 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.24 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.29.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.7 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.10 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.8 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
Expand Down
Loading

0 comments on commit badc6e6

Please sign in to comment.